@decocms/mesh 2.128.2 → 2.128.3
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.
- package/dist/client/assets/{AlertCircle-Ci70K_EZ.js → AlertCircle-DQQcPtgD.js} +1 -1
- package/dist/client/assets/{AlertOctagon-CqLqdISi.js → AlertOctagon-hF9xAZsV.js} +1 -1
- package/dist/client/assets/{ArrowDown-BB4lqZfQ.js → ArrowDown-Cf0RNEZQ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DOvB9XQA.js → ArrowLeft-D7lFQljS.js} +1 -1
- package/dist/client/assets/{ArrowUp-ByjI1wop.js → ArrowUp-CKXiX_Ao.js} +1 -1
- package/dist/client/assets/{Check-Dnxirgog.js → Check-B_1XgGXq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DNKireMY.js → CheckCircle-teFEREuu.js} +1 -1
- package/dist/client/assets/{CheckDone01-BQB-AnYZ.js → CheckDone01-BlB1S8hb.js} +1 -1
- package/dist/client/assets/{CheckVerified02-I-XS300S.js → CheckVerified02-C72zve8A.js} +1 -1
- package/dist/client/assets/{ChevronDown-DlCNAUXg.js → ChevronDown-BCXsTPO0.js} +1 -1
- package/dist/client/assets/{ChevronRight-BjXZnVl8.js → ChevronRight-Dv5Kd3sh.js} +1 -1
- package/dist/client/assets/{Clock-CuTVdxgk.js → Clock-B4Ctq7dH.js} +1 -1
- package/dist/client/assets/{Code01-D62OImsE.js → Code01-gdNPPDL2.js} +1 -1
- package/dist/client/assets/{Container-NYiiZyd6.js → Container-JCSa3G3B.js} +1 -1
- package/dist/client/assets/{Copy01--WUANgtG.js → Copy01-B1lCFyqr.js} +1 -1
- package/dist/client/assets/{Dataflow03-r1iydeQd.js → Dataflow03-CmiJ_a2x.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CIJOriRT.js → DotsHorizontal-DYVOSQNI.js} +1 -1
- package/dist/client/assets/{DotsVertical-CdVqSSOc.js → DotsVertical-Dv4tBZU-.js} +1 -1
- package/dist/client/assets/{Download01-CB8jg-CL.js → Download01-DIwP2P7D.js} +1 -1
- package/dist/client/assets/{Edit01-DK-8NMEI.js → Edit01-DDXcCS4H.js} +1 -1
- package/dist/client/assets/{Eye-broatAu7.js → Eye-BZHp_wD7.js} +1 -1
- package/dist/client/assets/{File02-D0NaH0bX.js → File02-D8nm9j-J.js} +1 -1
- package/dist/client/assets/{File06-WXzmRYLt.js → File06-D-_j0iW5.js} +1 -1
- package/dist/client/assets/{FilterLines-frJ-GsBz.js → FilterLines-BP-6W-PZ.js} +1 -1
- package/dist/client/assets/{Globe01-VgVHGjyC.js → Globe01-BUQmYqse.js} +1 -1
- package/dist/client/assets/{Globe02-C0qeWKnK.js → Globe02-CitacpSB.js} +1 -1
- package/dist/client/assets/{Grid01-Dyv_Ip5i.js → Grid01-9bvbF-2s.js} +1 -1
- package/dist/client/assets/{Hash02-oBjA0qJC.js → Hash02-B1Ogol6o.js} +1 -1
- package/dist/client/assets/{Home02-DX25irYw.js → Home02-BQf2Bq1d.js} +1 -1
- package/dist/client/assets/{Image01-Dv4Xx4Vn.js → Image01-DQT9mrMs.js} +1 -1
- package/dist/client/assets/{Inbox01-Bh1zeW2m.js → Inbox01-jnM9oRqF.js} +1 -1
- package/dist/client/assets/{InfoCircle-C7uLV_XX.js → InfoCircle-CGMOojOv.js} +1 -1
- package/dist/client/assets/{Key01-DVkykkuH.js → Key01-xmVowZ8K.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D9NBeY0S.js → LinkExternal01-D9XuFg7K.js} +1 -1
- package/dist/client/assets/{List-C9ntvlpP.js → List-klt4Ktng.js} +1 -1
- package/dist/client/assets/{Loading01-D2eBBNoh.js → Loading01-fS4L07xH.js} +1 -1
- package/dist/client/assets/{Lock01-ep_v0VnB.js → Lock01-BKSJ7A3p.js} +1 -1
- package/dist/client/assets/{Play-DfNy_KGK.js → Play-xVtvzzCw.js} +1 -1
- package/dist/client/assets/{Plus-CoFNXdPs.js → Plus-J6pIe2uV.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-J5wqqeG_.js → RefreshCcw01-CL_G5oMs.js} +1 -1
- package/dist/client/assets/{Rows03-D7jJRDVm.js → Rows03-cUxIL8D0.js} +1 -1
- package/dist/client/assets/{Save01-DCBihulA.js → Save01-CdMTv6PL.js} +1 -1
- package/dist/client/assets/{SearchMd-WqvhRztL.js → SearchMd-CifRamFZ.js} +1 -1
- package/dist/client/assets/{Settings01-CF0yl6Tz.js → Settings01-B28HDbDZ.js} +1 -1
- package/dist/client/assets/{Shield01-BVTU_rBf.js → Shield01-BrHq9skT.js} +1 -1
- package/dist/client/assets/{Terminal-BWI5ji_M.js → Terminal-BPUAzvCO.js} +1 -1
- package/dist/client/assets/{Tool01-uNfJ4BgB.js → Tool01-6ldn8KE7.js} +1 -1
- package/dist/client/assets/{Trash01-Bilx6R4T.js → Trash01-BGRjTxek.js} +1 -1
- package/dist/client/assets/{Upload01-yL5uy1IO.js → Upload01-Z7XprHF7.js} +1 -1
- package/dist/client/assets/{Users03-ELQ8CczK.js → Users03-DkrzV9ZI.js} +1 -1
- package/dist/client/assets/{X-DlPknjOM.js → X-BY3es49B.js} +1 -1
- package/dist/client/assets/{XCircle-aBox2-uz.js → XCircle-DZ1yCOQ6.js} +1 -1
- package/dist/client/assets/{XClose-Baiitjul.js → XClose-Cc-gaidr.js} +1 -1
- package/dist/client/assets/agent-connections-preview-pDe7P7Ta.js +1 -0
- package/dist/client/assets/agent-detail-2TyklQZz.js +2 -0
- package/dist/client/assets/agents-DKPHVEr-.js +1 -0
- package/dist/client/assets/alert-dialog-Dcn63g6g.js +7 -0
- package/dist/client/assets/{auth-catchall-DmQOOeQy.js → auth-catchall-Dho6OcVz.js} +1 -1
- package/dist/client/assets/avatar-PHdbjFDw.js +1 -0
- package/dist/client/assets/badge-SF6wUW5L.js +1 -0
- package/dist/client/assets/{binder--zY5y66H.js → binder-D_h2ibfT.js} +1 -1
- package/dist/client/assets/breadcrumb-C0g6Pt2_.js +1 -0
- package/dist/client/assets/card-BdxqmIDs.js +1 -0
- package/dist/client/assets/chart-BUZSWI3B.js +15 -0
- package/dist/client/assets/checkbox-LKkMIiIW.js +1 -0
- package/dist/client/assets/{circle-alert-B7z6aEqV.js → circle-alert-tYCIieku.js} +1 -1
- package/dist/client/assets/{collection-detail-Nf6HLmBW.js → collection-detail-ByuFgV2Y.js} +4 -4
- package/dist/client/assets/collection-search-qyutGH6l.js +1 -0
- package/dist/client/assets/collection-tab-BbAfStP-.js +1 -0
- package/dist/client/assets/collection-table-wrapper-C9APekgb.js +1 -0
- package/dist/client/assets/collection-tabs-h2vOc-_S.js +1 -0
- package/dist/client/assets/command-FPE9wf0f.js +1 -0
- package/dist/client/assets/connect-CX8KQP6_.js +1 -0
- package/dist/client/assets/connection-card-ZsVFtnK9.js +1 -0
- package/dist/client/assets/connection-detail-pqk6mgg9.js +1 -0
- package/dist/client/assets/connections-BohwKULL.js +1 -0
- package/dist/client/assets/{constants-V7-3C38y.js → constants-CYyFC-Sp.js} +1 -1
- package/dist/client/assets/constants-DllrcpiP.js +1 -0
- package/dist/client/assets/{context-BBfuJWes.js → context-DCvH3r3j.js} +4 -4
- package/dist/client/assets/create-organization-dialog-BCgnCEPh.js +1 -0
- package/dist/client/assets/create-project-dialog-CrEm4IvG.js +1 -0
- package/dist/client/assets/dialog-DjBLF9Xz.js +1 -0
- package/dist/client/assets/dropdown-menu-dMkqHp7f.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-DnTEhExp.js +1 -0
- package/dist/client/assets/editable-thread-title-CGN0Mgzr.js +16 -0
- package/dist/client/assets/empty-state-B6tWKHPM.js +1 -0
- package/dist/client/assets/env-vars-editor-D0A2SEWh.js +1 -0
- package/dist/client/assets/{extract-connection-data-DyTSTIQR.js → extract-connection-data-Bc1UBsWZ.js} +1 -1
- package/dist/client/assets/file-browser-BAUqIo1x.js +2 -0
- package/dist/client/assets/form-DKDTPBJL.js +1 -0
- package/dist/client/assets/grid-view-DBeJ-u7v.js +1 -0
- package/dist/client/assets/home-o-8rSFPM.js +1 -0
- package/dist/client/assets/{index-kTXXfvC-.js → index-Bf_CY3qu.js} +1 -1
- package/dist/client/assets/index-BoZYckTW.js +1 -0
- package/dist/client/assets/{index-CI36RmtE.js → index-Cr71gOj3.js} +1 -1
- package/dist/client/assets/index-CxnWkZZb.js +1 -0
- package/dist/client/assets/index-DCxyPrpA.js +1 -0
- package/dist/client/assets/{index-uOrjFt6t.js → index-DL3qqjep.js} +36 -36
- package/dist/client/assets/{index-CW4zTmBX.js → index-DXe5aLcB.js} +1 -1
- package/dist/client/assets/{index-DTB_8xm9.js → index-EAWMJGj2.js} +11 -11
- package/dist/client/assets/{index-BpUpHsNU.js → index-nz17Zavj.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-DS9VDnBa.js → infiniteQueryObserver-QkJ406yX.js} +1 -1
- package/dist/client/assets/input-pcdA_rWs.js +1 -0
- package/dist/client/assets/integration-icon-CDKf5lkP.js +1 -0
- package/dist/client/assets/label-Cs0rMyA0.js +1 -0
- package/dist/client/assets/layout-BM96F8A6.js +1 -0
- package/dist/client/assets/{localstorage-keys-r_mW6Lq0.js → localstorage-keys-DuRbtKex.js} +1 -1
- package/dist/client/assets/login-UlwWZHgc.js +1 -0
- package/dist/client/assets/{markdown-BD6zDSJc.js → markdown-CN9uWcE5.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CDj0bpnF.js → mcp-oauth-1reN8tHJ.js} +1 -1
- package/dist/client/assets/mcp-server-card-BvqzVqbR.js +1 -0
- package/dist/client/assets/mcp-server-detail-44WaE8j1.js +2 -0
- package/dist/client/assets/members-Dlu0JdHg.js +3 -0
- package/dist/client/assets/{monitoring-FEHIw1jG.js → monitoring-BkGKM_nf.js} +3 -3
- package/dist/client/assets/monitoring-dashboard-edit-Bh6jLPJ-.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-eE4UAi9y.js → monitoring-dashboard-view-BR_gx-ah.js} +2 -2
- package/dist/client/assets/{oauth-callback-AmREHdz2.js → oauth-callback-My1FCnBz.js} +1 -1
- package/dist/client/assets/page-CTS2P4X2.js +1 -0
- package/dist/client/assets/page-CrdufU7i.js +1 -0
- package/dist/client/assets/{plugin-empty-state-OjZLLHuW.js → plugin-empty-state-BL9scDTN.js} +1 -1
- package/dist/client/assets/plugin-empty-state-CM6Dryag.js +1 -0
- package/dist/client/assets/plugin-header-C1mnXf_l.js +1 -0
- package/dist/client/assets/{plugin-header-DqYSY5WD.js → plugin-header-UsujlRy8.js} +1 -1
- package/dist/client/assets/popover-DVJVvDk4.js +1 -0
- package/dist/client/assets/project-layout-ChFI6quF.js +1 -0
- package/dist/client/assets/projects-list-tpjdpWOF.js +1 -0
- package/dist/client/assets/ranking-layout-CrYiPhgR.js +1 -0
- package/dist/client/assets/{readme-viewer-DAvIfvua.js → readme-viewer-B2f4puJD.js} +1 -1
- package/dist/client/assets/{registry-layout-BcVc2nNS.js → registry-layout-C0R7NUsH.js} +2 -2
- package/dist/client/assets/{registry-utils-CwZm8daW.js → registry-utils-D-aIeu5g.js} +1 -1
- package/dist/client/assets/reports-layout-DXj87viG.js +3 -0
- package/dist/client/assets/reset-password-BlWYJ3vA.js +1 -0
- package/dist/client/assets/resizable-BejyKOGo.js +1 -0
- package/dist/client/assets/save-actions-DT09KS_7.js +1 -0
- package/dist/client/assets/{scroll-area-BbTrJsHn.js → scroll-area-pgllOsbM.js} +2 -2
- package/dist/client/assets/select-Dz5z65Jw.js +1 -0
- package/dist/client/assets/shell-layout-BeWeSxb6.js +3 -0
- package/dist/client/assets/skeleton-tlo_AcXS.js +1 -0
- package/dist/client/assets/spinner-DL1kXbn_.js +1 -0
- package/dist/client/assets/{store-invite-CBtJIAbW.js → store-invite-KhqhYrJe.js} +1 -1
- package/dist/client/assets/switch-D5s4GvE7.js +1 -0
- package/dist/client/assets/table-JlnXtC1o.js +1 -0
- package/dist/client/assets/tabs-BMRmFudX.js +1 -0
- package/dist/client/assets/tasks-BdJ0UZyL.js +1 -0
- package/dist/client/assets/textarea-_RA9G-2H.js +1 -0
- package/dist/client/assets/{time-range-picker-jCfxVj6J.js → time-range-picker-Z6Jl1sx4.js} +4 -4
- package/dist/client/assets/toggle-group-X_GdAmsv.js +1 -0
- package/dist/client/assets/tools-list-RgSwLK9F.js +1 -0
- package/dist/client/assets/tooltip--eNCFRSk.js +1 -0
- package/dist/client/assets/{topbar-portal-CjBmYjs5.js → topbar-portal-D3cWepwE.js} +1 -1
- package/dist/client/assets/{types-jYkZj_oN.js → types-Dz8v8wA9.js} +1 -1
- package/dist/client/assets/use-binding-DWmbEHQx.js +1 -0
- package/dist/client/assets/{use-connection-DqGqpr6W.js → use-connection-CKm1ISVV.js} +1 -1
- package/dist/client/assets/{use-copy-CvA2en_g.js → use-copy-DvH_rwny.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DJv6y6EJ.js → use-create-virtual-mcp-Cl3FIypU.js} +1 -1
- package/dist/client/assets/use-deco-chat-open-BifT_Q7T.js +1 -0
- package/dist/client/assets/{use-install-from-registry-iT6pKCDG.js → use-install-from-registry-DxwNEXQz.js} +1 -1
- package/dist/client/assets/use-list-state-5G9UAtpG.js +1 -0
- package/dist/client/assets/{use-llm-CDYsARAu.js → use-llm-CZ5h-I5e.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B9LoAxha.js → use-mcp-prompts-C-kJi0NP.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DuTyW4Xm.js → use-mcp-tools-Du7LOEev.js} +1 -1
- package/dist/client/assets/{use-members-ByAHJbqb.js → use-members-JNLhgbe4.js} +1 -1
- package/dist/client/assets/{use-mobile-DA9mzCuy.js → use-mobile-BVeJwtRE.js} +1 -1
- package/dist/client/assets/{use-project-Cr1TKfdV.js → use-project-BznKdNgg.js} +1 -1
- package/dist/client/assets/{use-settings-modal-DVxljFTz.js → use-settings-modal-DikSOkid.js} +1 -1
- package/dist/client/assets/{use-view-mode-DJ9lvNoA.js → use-view-mode-BUENrs7s.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B7YffSTv.js → use-virtual-mcp-DQ9c7C3W.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-XciTiRf0.js +1 -0
- package/dist/client/assets/{useMutation-BYvhr9Wj.js → useMutation-UrnS9vWD.js} +1 -1
- package/dist/client/assets/useQuery-J1yQO0sX.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BcyK5gD4.js +1 -0
- package/dist/client/assets/workflow-Bed30GUE.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +168 -168
- package/dist/server/server.js +169 -169
- package/package.json +1 -1
- package/dist/client/assets/AlertTriangle-D2guHjVq.js +0 -1
- package/dist/client/assets/RefreshCw01-CyeiQkso.js +0 -1
- package/dist/client/assets/agent-connections-preview-Dn72V1xG.js +0 -1
- package/dist/client/assets/agent-detail-Dy29kukR.js +0 -2
- package/dist/client/assets/agents-KAvJ30x5.js +0 -1
- package/dist/client/assets/alert-dialog-DrmsJmsN.js +0 -7
- package/dist/client/assets/avatar-DjSt5kfT.js +0 -1
- package/dist/client/assets/badge-Dj7JdmaJ.js +0 -1
- package/dist/client/assets/breadcrumb-DmYstfbP.js +0 -1
- package/dist/client/assets/button-D10odSSz.js +0 -1
- package/dist/client/assets/card-9y5GtFsZ.js +0 -1
- package/dist/client/assets/chart-Bp3LQrS9.js +0 -15
- package/dist/client/assets/checkbox-D2YWMWVu.js +0 -1
- package/dist/client/assets/collection-search-BAmI-gVt.js +0 -1
- package/dist/client/assets/collection-tab-CQQXE46p.js +0 -1
- package/dist/client/assets/collection-table-wrapper-fcFg8ybt.js +0 -1
- package/dist/client/assets/collection-tabs-D2IJ4sD1.js +0 -1
- package/dist/client/assets/command-BMl6YeZX.js +0 -1
- package/dist/client/assets/connect-ezzuoZk1.js +0 -1
- package/dist/client/assets/connection-card-BPNLF3Zq.js +0 -1
- package/dist/client/assets/connection-detail-B931e97h.js +0 -1
- package/dist/client/assets/connections-Du--7tHh.js +0 -1
- package/dist/client/assets/constants-wwWYqq9s.js +0 -1
- package/dist/client/assets/create-organization-dialog-3HZ9Fapi.js +0 -1
- package/dist/client/assets/create-project-dialog-D87AirfP.js +0 -1
- package/dist/client/assets/dialog-bLBl7se3.js +0 -1
- package/dist/client/assets/dropdown-menu-D6LMimH3.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-Dl6SpfCc.js +0 -1
- package/dist/client/assets/editable-thread-title-C5iprBiE.js +0 -16
- package/dist/client/assets/empty-state-CPu-zZBv.js +0 -1
- package/dist/client/assets/env-vars-editor-DflzxmJb.js +0 -1
- package/dist/client/assets/error-boundary-apRp8Xmr.js +0 -1
- package/dist/client/assets/file-browser-D4rvNQn-.js +0 -2
- package/dist/client/assets/form-CSWi3me2.js +0 -1
- package/dist/client/assets/grid-view-CIKn_gai.js +0 -1
- package/dist/client/assets/home-urEawFOR.js +0 -1
- package/dist/client/assets/index-BsrQAmtK.js +0 -1
- package/dist/client/assets/index-CX1TvU3T.js +0 -1
- package/dist/client/assets/index-h05RWZry.js +0 -1
- package/dist/client/assets/input-C8Cn3OQt.js +0 -1
- package/dist/client/assets/integration-icon-CHvqhFEd.js +0 -1
- package/dist/client/assets/label-D84F6EwM.js +0 -1
- package/dist/client/assets/layout-14xmCS52.js +0 -1
- package/dist/client/assets/login-D-_vmeEI.js +0 -1
- package/dist/client/assets/mcp-server-card-B4JV-Q1h.js +0 -1
- package/dist/client/assets/mcp-server-detail-CsXpfhbo.js +0 -2
- package/dist/client/assets/members-B0_Xg_uw.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-D9Ku98yT.js +0 -1
- package/dist/client/assets/page-383FaDV2.js +0 -1
- package/dist/client/assets/page-thqQ0ll8.js +0 -1
- package/dist/client/assets/plugin-empty-state-Bi8TKl0X.js +0 -1
- package/dist/client/assets/plugin-header-NOGbkpim.js +0 -1
- package/dist/client/assets/popover-B_SzRtKR.js +0 -1
- package/dist/client/assets/project-layout-DxcVceRu.js +0 -1
- package/dist/client/assets/projects-list-FULLceFc.js +0 -1
- package/dist/client/assets/ranking-layout-B_B3SLxi.js +0 -1
- package/dist/client/assets/reports-layout-Cb_9di8U.js +0 -3
- package/dist/client/assets/reset-password-tNDIWT24.js +0 -1
- package/dist/client/assets/resizable-BvPyhOvU.js +0 -1
- package/dist/client/assets/save-actions-DTbCJcwB.js +0 -1
- package/dist/client/assets/select-BZB4uvGm.js +0 -1
- package/dist/client/assets/shell-layout-BHmLkMzR.js +0 -3
- package/dist/client/assets/skeleton-B9aXeb5e.js +0 -1
- package/dist/client/assets/spinner-BeYA_hqO.js +0 -1
- package/dist/client/assets/switch-CkEMQ9Z5.js +0 -1
- package/dist/client/assets/table-D_a-Z4Fv.js +0 -1
- package/dist/client/assets/tabs-Cqye-vZ-.js +0 -1
- package/dist/client/assets/tasks-DbmObaDD.js +0 -1
- package/dist/client/assets/textarea-CLWsfk4l.js +0 -1
- package/dist/client/assets/toggle-group-BUoI214e.js +0 -1
- package/dist/client/assets/tools-list-jE6c8Z18.js +0 -1
- package/dist/client/assets/tooltip-CooOHv4u.js +0 -1
- package/dist/client/assets/use-binding-9lQePXv2.js +0 -1
- package/dist/client/assets/use-deco-chat-open-DeWcxP9f.js +0 -1
- package/dist/client/assets/use-list-state-0IvPs7yX.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D4-rTdBB.js +0 -1
- package/dist/client/assets/useQuery-Vrc6Li_H.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D3F1c8oY.js +0 -1
- package/dist/client/assets/workflow-CsBV4dNN.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as b,c as y,j as s,u as ee,d as te,t as se}from"./index-uOrjFt6t.js";import{V as ie,C as j}from"./index-DTB_8xm9.js";import{E as le,i as re,T as oe,t as ne}from"./editable-thread-title-C5iprBiE.js";import{E as ae}from"./error-boundary-apRp8Xmr.js";import{u as U,b as ce}from"./context-BBfuJWes.js";import{I as G}from"./integration-icon-CHvqhFEd.js";import{P as me,a as de,b as fe}from"./popover-B_SzRtKR.js";import{S as K}from"./skeleton-B9aXeb5e.js";import{c as J,B as W}from"./button-D10odSSz.js";import{i as pe,d as ue}from"./constants-V7-3C38y.js";import{b as he}from"./use-virtual-mcp-B7YffSTv.js";import{i as xe}from"./ChevronRight-BjXZnVl8.js";import{t as Q}from"./Users03-ELQ8CczK.js";import{P as V}from"./index-CX1TvU3T.js";import{a as Z,b as D,T as q}from"./tooltip-CooOHv4u.js";import{s as je}from"./Plus-CoFNXdPs.js";import"./spinner-BeYA_hqO.js";import"./use-mcp-prompts-B9LoAxha.js";import"./useQuery-Vrc6Li_H.js";import"./dialog-bLBl7se3.js";import"./X-DlPknjOM.js";import"./form-CSWi3me2.js";import"./label-D84F6EwM.js";import"./input-C8Cn3OQt.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-ByjI1wop.js";import"./ChevronDown-DlCNAUXg.js";import"./Edit01-DK-8NMEI.js";import"./XCircle-aBox2-uz.js";import"./AlertCircle-Ci70K_EZ.js";import"./AlertTriangle-D2guHjVq.js";import"./tabs-Cqye-vZ-.js";import"./ArrowLeft-DOvB9XQA.js";import"./use-copy-CvA2en_g.js";import"./badge-Dj7JdmaJ.js";import"./use-deco-chat-open-DeWcxP9f.js";import"./localstorage-keys-r_mW6Lq0.js";import"./useMutation-BYvhr9Wj.js";import"./Check-Dnxirgog.js";import"./Code01-D62OImsE.js";import"./SearchMd-WqvhRztL.js";import"./use-create-virtual-mcp-DJv6y6EJ.js";import"./Copy01--WUANgtG.js";import"./marked.esm-BaswSlok.js";import"./markdown-BD6zDSJc.js";import"./types-jYkZj_oN.js";import"./Eye-broatAu7.js";import"./Globe02-C0qeWKnK.js";import"./RefreshCw01-CyeiQkso.js";import"./XClose-Baiitjul.js";import"./select-BZB4uvGm.js";import"./index-kTXXfvC-.js";import"./collection-search-BAmI-gVt.js";import"./Loading01-D2eBBNoh.js";import"./deco-constants-BmtTfZbQ.js";import"./use-connection-DqGqpr6W.js";import"./generate-id-Dyweu44Y.js";import"./Clock-CuTVdxgk.js";import"./Trash01-Bilx6R4T.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-CDYsARAu.js";import"./use-binding-9lQePXv2.js";import"./binder--zY5y66H.js";import"./File06-WXzmRYLt.js";import"./Grid01-Dyv_Ip5i.js";import"./Image01-Dv4Xx4Vn.js";import"./RefreshCcw01-J5wqqeG_.js";import"./Settings01-CF0yl6Tz.js";import"./useSuspenseInfiniteQuery-D3F1c8oY.js";import"./infiniteQueryObserver-DS9VDnBa.js";import"./Container-NYiiZyd6.js";import"./use-mobile-DA9mzCuy.js";const X=({size:e=24,color:t="currentColor",...i})=>b.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},b.createElement("path",{d:"m8.59 13.51 6.83 3.98m-.01-10.98-6.82 3.98M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM9 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm12 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}));X.displayName="Share07";function ge(e){const t=y.c(15),{agent:i}=e,{setVirtualMcpId:u}=U();let o;t[0]!==i.id||t[1]!==u?(o=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=o):o=t[2];const l=o;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=J("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const d=`Select agent ${i.title}`;let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Q,{size:20}),t[4]=r):r=t[4];let c;t[5]!==i.icon||t[6]!==i.title?(c=s.jsx(G,{icon:i.icon,name:i.title,fallbackIcon:r}),t[5]=i.icon,t[6]=i.title,t[7]=c):c=t[7];let a;t[8]!==i.title?(a=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=a):a=t[9];let n;return t[10]!==l||t[11]!==d||t[12]!==c||t[13]!==a?(n=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":d,children:[c,a]}),t[10]=l,t[11]=d,t[12]=c,t[13]=a,t[14]=n):n=t[14],n}function be(e){const t=y.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:o}=e,[l,m]=b.useState(!1),d=b.useRef(null);let r,c;t[0]!==l?(r=()=>{l&&setTimeout(()=>{d.current?.focus()},0)},c=[l],t[0]=l,t[1]=r,t[2]=c):(r=t[1],c=t[2]),b.useEffect(r,c);let a;t[3]!==o?(a=N=>{o(N),m(!1)},t[3]=o,t[4]=a):a=t[4];const n=a;let f;t[5]===Symbol.for("react.memo_cache_sentinel")?(f=J("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=f):f=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(me,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(xe,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let h;t[7]!==n||t[8]!==u||t[9]!==i?(h=s.jsx(de,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ie,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:n,searchInputRef:d})}),t[7]=n,t[8]=u,t[9]=i,t[10]=h):h=t[10];let g;return t[11]!==l||t[12]!==h?(g=s.jsxs(fe,{open:l,onOpenChange:m,children:[p,h]}),t[11]=l,t[12]=h,t[13]=g):g=t[13],g}function ye(){const e=y.c(20),t=he(),{selectedVirtualMcp:i,setVirtualMcpId:u}=U();let o,l,m,d,r,c;if(e[0]!==t){r=Symbol.for("react.early_return_sentinel");e:{const h=t.filter(_e).slice(0,6);if(h.length===0){r=null;break e}c=t.map(Se),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=d):d=e[7],o="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",l=h.map(Ne)}e[0]=t,e[1]=o,e[2]=l,e[3]=m,e[4]=d,e[5]=r,e[6]=c}else o=e[1],l=e[2],m=e[3],d=e[4],r=e[5],c=e[6];if(r!==Symbol.for("react.early_return_sentinel"))return r;const a=i?.id??null;let n;e[8]!==u||e[9]!==a||e[10]!==c?(n=s.jsx(be,{virtualMcps:c,selectedVirtualMcpId:a,onVirtualMcpChange:u}),e[8]=u,e[9]=a,e[10]=c,e[11]=n):n=e[11];let f;e[12]!==o||e[13]!==l||e[14]!==n?(f=s.jsxs("div",{className:o,children:[l,n]}),e[12]=o,e[13]=l,e[14]=n,e[15]=f):f=e[15];let p;return e[16]!==m||e[17]!==d||e[18]!==f?(p=s.jsxs("div",{className:m,children:[d,f]}),e[16]=m,e[17]=d,e[18]=f,e[19]=p):p=e[19],p}function Ne(e){return s.jsx(ge,{agent:e},e.id??"default")}function Se(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function _e(e){return e.id!==null&&!pe(e.id)}function ve(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(K,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ce)})]}),e[1]=i):i=e[1],i}function Ce(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(K,{className:"size-6 rounded-md shrink-0"}),s.jsx(K,{className:"h-4 w-full"})]},t)}function we(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(b.Suspense,{fallback:s.jsx(ve,{}),children:s.jsx(ye,{})}),e[0]=t):t=e[0],t}function ke(){const e=y.c(53),{org:t}=ee(),{data:i}=te.useSession(),{modelsConnections:u,isChatEmpty:o,activeThreadId:l,createThread:m,switchToThread:d,threads:r,selectedVirtualMcp:c}=ce();let a;if(e[0]!==l||e[1]!==r){let x;e[3]!==l?(x=Y=>Y.id===l,e[3]=l,e[4]=x):x=e[4],a=r.find(x),e[0]=l,e[1]=r,e[2]=a}else a=e[2];const n=a,[f,p]=b.useState(!1);let h;e[5]!==i?.user?.name?(h=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=h):h=e[6];const g=h;let N;e[7]!==t.id?(N=ue(t.id),e[7]=t.id,e[8]=N):N=e[8];const $=c??N;if(u.length===0){let x;return e[9]!==t?(x=s.jsx("div",{className:"flex flex-col size-full bg-background items-center justify-center",children:s.jsx(j.NoLlmBindingEmptyState,{org:t})}),e[9]=t,e[10]=x):x=e[10],x}let S;e[11]!==n?(S=n?.title&&s.jsx(le,{threadId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[11]=n,e[12]=S):S=e[12];let _;e[13]!==S?(_=s.jsx(V.Header.Left,{className:"gap-2",children:S}),e[13]=S,e[14]=_):_=e[14];let v;e[15]!==m?(v=()=>m(),e[15]=m,e[16]=v):v=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(je,{size:16}),e[17]=A):A=e[17];let C;e[18]!==o||e[19]!==v?(C=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:v,disabled:o,"aria-label":"New chat",children:A})}),e[18]=o,e[19]=v,e[20]=C):C=e[20];let H;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(D,{children:"New chat"}),e[21]=H):H=e[21];let w;e[22]!==C?(w=s.jsxs(q,{children:[C,H]}),e[22]=C,e[23]=w):w=e[23];let L;e[24]===Symbol.for("react.memo_cache_sentinel")?(L=()=>p(!0),e[24]=L):L=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(q,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:L,"aria-label":"Chat history",children:s.jsx(re,{size:16})})}),s.jsx(D,{children:"Chat history"})]}),e[25]=R):R=e[25];let B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(X,{size:16}),e[26]=B):B=e[26];let k;e[27]!==o?(k=s.jsx(Z,{asChild:!0,children:s.jsx(W,{type:"button",variant:"outline",size:"icon",className:"size-7 border border-input",onClick:Te,disabled:o,"aria-label":"Share chat",children:B})}),e[27]=o,e[28]=k):k=e[28];let O;e[29]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(D,{children:"Share chat"}),e[29]=O):O=e[29];let T;e[30]!==k?(T=s.jsxs(q,{children:[k,O]}),e[30]=k,e[31]=T):T=e[31];let M;e[32]!==T||e[33]!==w?(M=s.jsxs(V.Header.Right,{className:"gap-1",children:[w,R,T]}),e[32]=T,e[33]=w,e[34]=M):M=e[34];let z;e[35]!==M||e[36]!==_?(z=s.jsxs(V.Header,{className:"flex-none z-10 bg-background",children:[_,M]}),e[35]=M,e[36]=_,e[37]=z):z=e[37];let I;e[38]!==$||e[39]!==o||e[40]!==g?(I=o?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(G,{icon:$.icon,name:$.title,size:"md",fallbackIcon:s.jsx(Q,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",g,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(j.Input,{})}),s.jsx(j.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(we,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(j.Main,{children:s.jsx(j.Messages,{})}),s.jsx(j.Footer,{children:s.jsx(j.Input,{})})]}),e[38]=$,e[39]=o,e[40]=g,e[41]=I):I=e[41];let E;e[42]!==d?(E=async x=>{await d(x),p(!1)},e[42]=d,e[43]=E):E=e[43];let P;e[44]!==l||e[45]!==f||e[46]!==E||e[47]!==r?(P=s.jsx(oe,{open:f,onOpenChange:p,threads:r,activeThreadId:l,onThreadSelect:E}),e[44]=l,e[45]=f,e[46]=E,e[47]=r,e[48]=P):P=e[48];let F;return e[49]!==z||e[50]!==I||e[51]!==P?(F=s.jsxs(j,{children:[z,I,P]}),e[49]=z,e[50]=I,e[51]=P,e[52]=F):F=e[52],F}function Te(){se.info("Share feature coming soon")}function Me(e){const t=y.c(14),{error:i,onRetry:u}=e,o=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(V.Header,{className:"flex-none",children:[s.jsx(V.Header.Left,{className:"gap-2"}),s.jsx(V.Header.Right,{className:"gap-1"})]}),t[0]=l):l=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(ne,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const d=o?"Unable to load models":"Something went wrong";let r;t[2]!==d?(r=s.jsx("h3",{className:"text-lg font-medium",children:d}),t[2]=d,t[3]=r):r=t[3];const c=o?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let a;t[4]!==c?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=a):a=t[5];let n;t[6]!==r||t[7]!==a?(n=s.jsxs("div",{className:"space-y-2",children:[r,a]}),t[6]=r,t[7]=a,t[8]=n):n=t[8];let f;t[9]!==u?(f=s.jsx(W,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=f):f=t[10];let p;return t[11]!==n||t[12]!==f?(p=s.jsxs(j,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,n,f]})})]}),t[11]=n,t[12]=f,t[13]=p):p=t[13],p}function Jt(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ae,{fallback:ze,children:s.jsx(b.Suspense,{fallback:s.jsx(j.Skeleton,{}),children:s.jsx(ke,{})})}),e[0]=t):t=e[0],t}function ze(e){const{error:t,resetError:i}=e;return s.jsx(Me,{error:t,onRetry:i})}export{Jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Q,r as q,u as re,K as oe,bT as we,j as t,b as me,O as de,d as Ie,bU as Te,bV as ne,aC as Re}from"./index-uOrjFt6t.js";import{P as X}from"./index-CX1TvU3T.js";import{B as Pe,a as $e,b as ke,c as ze}from"./breadcrumb-DmYstfbP.js";import{i as ue}from"./AlertTriangle-D2guHjVq.js";import{i as fe}from"./FilterLines-frJ-GsBz.js";import{n as xe}from"./Inbox01-Bh1zeW2m.js";import{i as se}from"./Loading01-D2eBBNoh.js";import{s as ge}from"./RefreshCw01-CyeiQkso.js";import{i as pe}from"./SearchMd-WqvhRztL.js";import{u as he}from"./useQuery-Vrc6Li_H.js";import{u as Le}from"./useInfiniteQuery-D4-rTdBB.js";import{a as Fe,f as Ee,b as Oe}from"./registry-utils-CwZm8daW.js";import{u as je,W as Ke,a as _e,h as Ae,b as Me}from"./constants-V7-3C38y.js";import{f as Be,g as ye,h as De}from"./use-connection-DqGqpr6W.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{C as Ve,E as We}from"./collection-search-BAmI-gVt.js";import{M as ae}from"./mcp-server-card-B4JV-Q1h.js";import{c as ie,B as Y}from"./button-D10odSSz.js";import{I as Ue}from"./input-C8Cn3OQt.js";import{b as ve,P as be,a as Ne}from"./popover-B_SzRtKR.js";import{i as Ce}from"./Check-Dnxirgog.js";import{t as Se}from"./ChevronDown-DlCNAUXg.js";import{s as te}from"./XClose-Baiitjul.js";import{s as qe}from"./Plus-CoFNXdPs.js";import{u as He}from"./use-binding-9lQePXv2.js";import{L as Je,u as Qe}from"./localstorage-keys-r_mW6Lq0.js";import{E as Ye}from"./error-boundary-apRp8Xmr.js";import"./use-mobile-DA9mzCuy.js";import"./X-DlPknjOM.js";import"./tooltip-CooOHv4u.js";import"./index-kTXXfvC-.js";import"./ChevronRight-BjXZnVl8.js";import"./infiniteQueryObserver-DS9VDnBa.js";import"./useMutation-BYvhr9Wj.js";import"./CheckVerified02-I-XS300S.js";import"./Globe02-C0qeWKnK.js";import"./Lock01-ep_v0VnB.js";import"./Terminal-BWI5ji_M.js";import"./card-9y5GtFsZ.js";import"./integration-icon-CHvqhFEd.js";import"./Container-NYiiZyd6.js";import"./github-icon-Dp3wHhYE.js";import"./binder--zY5y66H.js";function Ze(s,e){const r=Q.c(4),[l,m]=q.useState(s),n=q.useRef(null),o=q.useRef(!0);let c,a;return r[0]!==e||r[1]!==s?(c=()=>{if(o.current){o.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(s)},e),()=>{n.current&&clearTimeout(n.current)}},a=[s,e],r[0]=e,r[1]=s,r[2]=c,r[3]=a):(c=r[2],a=r[3]),q.useEffect(c,a),l}function Xe(s){const e=Q.c(14),r=q.useRef(null),l=`scroll-position:${s}`,m=q.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const o=n;let c;e[2]!==l?(c=()=>{if(m.current===l)return;const j=sessionStorage.getItem(l);if(j&&r.current){const S=Number.parseInt(j,10);r.current.scrollTop=S}m.current=l},e[2]=l,e[3]=c):c=e[3];const a=c;let g;e[4]!==a||e[5]!==l?(g=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=g):g=e[6];const I=g;let i;e[7]!==a||e[8]!==l?(i=j=>{r.current=j,j&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=i):i=e[9];const p=i;let d;return e[10]!==I||e[11]!==o||e[12]!==p?(d={scrollRef:p,saveScrollPosition:o,handleScroll:I},e[10]=I,e[11]=o,e[12]=p,e[13]=d):d=e[13],d}const et=24;function tt(s){const e=Q.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=s,{org:o}=re();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[a,g]=q.useState(c);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[i,p]=q.useState(I),d=r||null;let j;e[2]!==o.id||e[3]!==d?(j={connectionId:d,orgId:o.id},e[2]=o.id,e[3]=d,e[4]=j):j=e[4];const S=je(j),R=!!m;let b;e[5]!==m||e[6]!==r?(b=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=b):b=e[7];let N;e[8]!==S||e[9]!==m?(N=async()=>{if(!m)return{tags:[],categories:[]};const f=await S.callTool({name:m,arguments:{}});return f.structuredContent??f},e[8]=S,e[9]=m,e[10]=N):N=e[10];let P;e[11]!==b||e[12]!==N?(P={queryKey:b,queryFn:N,staleTime:36e5,retry:2},e[11]=b,e[12]=N,e[13]=P):P=e[13];const{data:$}=he(P);let h,C,k;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==i||e[18]!==a){const f=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;h={limit:et,...a.length>0&&{tags:a},...i.length>0&&{categories:i},...f&&{where:f}},k=Le,C=oe.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=i,e[18]=a,e[19]=h,e[20]=C,e[21]=k}else h=e[19],C=e[20],k=e[21];let v;e[22]!==S||e[23]!==h||e[24]!==l?(v=async f=>{const{pageParam:Z}=f,le=Z?{...h,cursor:Z}:h,ee=await S.callTool({name:l,arguments:le});return ee.structuredContent??ee},e[22]=S,e[23]=h,e[24]=l,e[25]=v):v=e[25];let z;e[26]!==v||e[27]!==C?(z={queryKey:C,queryFn:v,initialPageParam:void 0,getNextPageParam:st,staleTime:36e5,placeholderData:we,retry:2},e[26]=v,e[27]=C,e[28]=z):z=e[28];const{data:w,fetchNextPage:x,hasNextPage:y,isFetchingNextPage:u,isFetching:T,isLoading:L,error:F}=k(z);let K;e:{if(!w?.pages||w.pages.length===0){K=null;break e}const f=w.pages[0];if(typeof f=="object"&&f!==null&&"totalCount"in f&&typeof f.totalCount=="number"){K=f.totalCount;break e}K=null}const _=K,E=w?.pages;let G;e[29]!==E?(G=Fe(E),e[29]=E,e[30]=G):G=e[30];const H=G;let V;e[31]!==n||e[32]!==i.length||e[33]!==a.length?(V=a.length>0||i.length>0||!!n?.trim(),e[31]=n,e[32]=i.length,e[33]=a.length,e[34]=V):V=e[34];const D=V,B=T&&!u&&!L&&D;let A;e[35]!==x||e[36]!==y||e[37]!==u?(A=()=>{y&&!u&&x()},e[35]=x,e[36]=y,e[37]=u,e[38]=A):A=e[38];const W=A,O=y??!1,M=R?$?.tags:void 0,U=R?$?.categories:void 0;let J;return e[39]!==D||e[40]!==T||e[41]!==u||e[42]!==B||e[43]!==L||e[44]!==H||e[45]!==F||e[46]!==W||e[47]!==i||e[48]!==a||e[49]!==O||e[50]!==M||e[51]!==U||e[52]!==_?(J={items:H,totalCount:_,hasMore:O,isLoadingMore:u,isFiltering:B,isInitialLoading:L,isFetching:T,error:F,loadMore:W,availableTags:M,availableCategories:U,selectedTags:a,selectedCategories:i,setSelectedTags:g,setSelectedCategories:p,hasActiveFilters:D},e[39]=D,e[40]=T,e[41]=u,e[42]=B,e[43]=L,e[44]=H,e[45]=F,e[46]=W,e[47]=i,e[48]=a,e[49]=O,e[50]=M,e[51]=U,e[52]=_,e[53]=J):J=e[53],J}function st(s){if(typeof s=="object"&&s!==null){const e=s.nextCursor||s.cursor;if(e)return e}}function rt(s,e){return[...s].sort((r,l)=>l.count-r.count).slice(0,e)}function ce(s){const e=Q.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:o}=s,[c,a]=q.useState(""),[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N,P,$,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==g||e[4]!==c||e[5]!==m){const x=[...c?l.filter(E=>E.value.toLowerCase().includes(c.toLowerCase())):l].sort(lt);d=m.length,p=ve,P=g,$=I;let y;e[17]!==r?(y=t.jsx("span",{children:r}),e[17]=r,e[18]=y):y=e[18];let u;e[19]!==d?(u=d>0&&t.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=u):u=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Se,{size:14,className:"opacity-50"}),e[21]=T):T=e[21],e[22]!==u||e[23]!==y?(h=t.jsx(be,{asChild:!0,children:t.jsxs(Y,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[y,u,T]})}),e[22]=u,e[23]=y,e[24]=h):h=e[24],i=Ne,R="w-64 p-0",b="start";let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(pe,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=L):L=e[25];let F;e[26]!==r?(F=r.toLowerCase(),e[26]=r,e[27]=F):F=e[27];const K=`Search ${F}...`;let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=E=>a(E.target.value),e[28]=_):_=e[28],e[29]!==c||e[30]!==K?(N=t.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:t.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[L,t.jsx(Ue,{type:"text",placeholder:K,value:c,onChange:_,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=c,e[30]=K,e[31]=N):N=e[31],j="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",S=x.length===0?t.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):x.map(E=>{const G=m.includes(E.value);return t.jsxs("button",{onClick:()=>n(E.value),className:ie("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",G?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[t.jsxs("span",{className:"truncate flex items-center gap-2",children:[G&&t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0"}),E.value]}),t.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:E.count})]},E.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=g,e[4]=c,e[5]=m,e[6]=i,e[7]=p,e[8]=d,e[9]=j,e[10]=S,e[11]=R,e[12]=b,e[13]=N,e[14]=P,e[15]=$,e[16]=h}else i=e[6],p=e[7],d=e[8],j=e[9],S=e[10],R=e[11],b=e[12],N=e[13],P=e[14],$=e[15],h=e[16];let C;e[32]!==j||e[33]!==S?(C=t.jsx("div",{className:j,children:S}),e[32]=j,e[33]=S,e[34]=C):C=e[34];let k;e[35]!==r||e[36]!==o||e[37]!==d?(k=d>0&&t.jsx("div",{className:"p-2 border-t border-border",children:t.jsxs(Y,{variant:"ghost",size:"sm",onClick:o,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=o,e[37]=d,e[38]=k):k=e[38];let v;e[39]!==i||e[40]!==k||e[41]!==R||e[42]!==b||e[43]!==N||e[44]!==C?(v=t.jsxs(i,{className:R,align:b,children:[N,C,k]}),e[39]=i,e[40]=k,e[41]=R,e[42]=b,e[43]=N,e[44]=C,e[45]=v):v=e[45];let z;return e[46]!==p||e[47]!==v||e[48]!==P||e[49]!==$||e[50]!==h?(z=t.jsxs(p,{open:P,onOpenChange:$,children:[h,v]}),e[46]=p,e[47]=v,e[48]=P,e[49]=$,e[50]=h,e[51]=z):z=e[51],z}function lt(s,e){return e.count-s.count}function nt(s){const e=Q.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:o,onCategoryChange:c}=s,a=r&&r.length>0||l&&l.length>0,g=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==o||e[1]!==m?(I=y=>{m.includes(y)?o(m.filter(u=>u!==y)):o([...m,y])},e[0]=o,e[1]=m,e[2]=I):I=e[2];const i=I;let p;e[3]!==c||e[4]!==n?(p=y=>{n.includes(y)?c(n.filter(u=>u!==y)):c([...n,y])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const d=p;let j;e[6]!==c||e[7]!==o?(j=()=>{o([]),c([])},e[6]=c,e[7]=o,e[8]=j):j=e[8];const S=j;let R,b,N,P,$,h,C;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==o||e[13]!==n||e[14]!==m||e[15]!==d||e[16]!==i){const y=l?rt(l,6):[];R=n,b=m,C=new Set(y.map(ot)),$="flex items-center border-b border-border";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:t.jsx(fe,{size:16})}),e[24]=u):u=e[24];let T;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==d?(T=l&&l.length>0&&t.jsx(ce,{label:"Categories",items:l,selectedItems:n,onToggle:d,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=d,e[29]=T):T=e[29];let L;e[30]!==r||e[31]!==o||e[32]!==m||e[33]!==i?(L=r&&r.length>0&&t.jsx(ce,{label:"Tags",items:r,selectedItems:m,onToggle:i,onClear:()=>o([])}),e[30]=r,e[31]=o,e[32]=m,e[33]=i,e[34]=L):L=e[34],e[35]!==L||e[36]!==T?(h=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[u,T,L]}),e[35]=L,e[36]=T,e[37]=h):h=e[37],N="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==n||e[39]!==d?(F=K=>{const _=n.includes(K.value);return t.jsxs("div",{onClick:()=>d(K.value),className:ie("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",_?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[t.jsx("span",{children:K.value}),_&&t.jsx("span",{onClick:E=>{E.stopPropagation(),d(K.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},K.value)},e[38]=n,e[39]=d,e[40]=F):F=e[40],P=y.map(F),e[9]=l,e[10]=r,e[11]=c,e[12]=o,e[13]=n,e[14]=m,e[15]=d,e[16]=i,e[17]=R,e[18]=b,e[19]=N,e[20]=P,e[21]=$,e[22]=h,e[23]=C}else R=e[17],b=e[18],N=e[19],P=e[20],$=e[21],h=e[22],C=e[23];let k;if(e[41]!==R||e[42]!==d||e[43]!==C){let y;e[45]!==C?(y=T=>!C.has(T),e[45]=C,e[46]=y):y=e[46];let u;e[47]!==d?(u=T=>t.jsxs("div",{onClick:()=>d(T),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:T}),t.jsx("span",{onClick:L=>{L.stopPropagation(),d(T)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`cat-${T}`),e[47]=d,e[48]=u):u=e[48],k=R.filter(y).map(u),e[41]=R,e[42]=d,e[43]=C,e[44]=k}else k=e[44];let v;if(e[49]!==b||e[50]!==i){let y;e[52]!==i?(y=u=>t.jsxs("div",{onClick:()=>i(u),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[t.jsx("span",{children:u}),t.jsx("span",{onClick:T=>{T.stopPropagation(),i(u)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:t.jsx(te,{size:12})})]},`tag-${u}`),e[52]=i,e[53]=y):y=e[53],v=b.map(y),e[49]=b,e[50]=i,e[51]=v}else v=e[51];let z;e[54]!==S||e[55]!==g?(z=g&&t.jsxs(Y,{variant:"ghost",size:"sm",onClick:S,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[t.jsx(te,{size:14}),"Clear all"]}),e[54]=S,e[55]=g,e[56]=z):z=e[56];let w;e[57]!==z||e[58]!==N||e[59]!==P||e[60]!==k||e[61]!==v?(w=t.jsxs("div",{className:N,children:[P,k,v,z]}),e[57]=z,e[58]=N,e[59]=P,e[60]=k,e[61]=v,e[62]=w):w=e[62];let x;return e[63]!==w||e[64]!==$||e[65]!==h?(x=t.jsxs("div",{className:$,children:[h,w]}),e[63]=w,e[64]=$,e[65]=h,e[66]=x):x=e[66],x}function ot(s){return s.value}function it(s,e){if(!e)return s;const r=e.toLowerCase();return s.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function at(s){return s.verified===!0||s._meta?.["mcp.mesh"]?.verified===!0}function ct(s){const e=Q.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=s,[o,c]=q.useState(""),a=Ze(o,300),g=me(),{org:I}=re(),{scrollRef:i,saveScrollPosition:p,handleScroll:d}=Xe(`store-discovery:${r}`);let j;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(j={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=j):j=e[4];const{items:S,hasMore:R,isLoadingMore:b,isInitialLoading:N,isFetching:P,error:$,loadMore:h,availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,setSelectedTags:w,setSelectedCategories:x,hasActiveFilters:y}=tt(j);let u,T,L,F;if(e[5]!==a||e[6]!==P||e[7]!==N||e[8]!==S||e[9]!==o||e[10]!==n){const O=o?it(S,o):S;F=n?O.filter(dt):O,u=(o!==a||P)&&!N&&!!o,L=F.filter(at),T=F.filter(M=>!L.find(U=>U.id===M.id)),e[5]=a,e[6]=P,e[7]=N,e[8]=S,e[9]=o,e[10]=n,e[11]=u,e[12]=T,e[13]=L,e[14]=F}else u=e[11],T=e[12],L=e[13],F=e[14];const K=T;let _;e[15]!==g||e[16]!==I.slug||e[17]!==r||e[18]!==p?(_=O=>{p();const M=Ge(O.name||O.title||O.server?.title||""),U=typeof O.id=="string"&&O.id.includes("/"),J=typeof O.server?.name=="string"&&O.server.name.includes("/"),f=U&&!J?O.id:O.server?.name||O.id||"";g({to:"/$org/$project/store/$appName",params:{org:I.slug,project:de,appName:M},search:{registryId:r,serverName:f}})},e[15]=g,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=_):_=e[19];const E=_;let G;e[20]!==d||e[21]!==R||e[22]!==b||e[23]!==h?(G=O=>{if(d(),!R||b)return;const M=O.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&h()},e[20]=d,e[21]=R,e[22]=b,e[23]=h,e[24]=G):G=e[24];const H=G;let V;e[25]!==u||e[26]!==o?(V=t.jsx(Ve,{value:o,onChange:c,placeholder:"Search for an MCP Server...",isSearching:u}),e[25]=u,e[26]=o,e[27]=V):V=e[27];let D;e[28]!==k||e[29]!==C||e[30]!==z||e[31]!==v||e[32]!==x||e[33]!==w?(D=t.jsx(nt,{availableTags:C,availableCategories:k,selectedTags:v,selectedCategories:z,onTagChange:w,onCategoryChange:x}),e[28]=k,e[29]=C,e[30]=z,e[31]=v,e[32]=x,e[33]=w,e[34]=D):D=e[34];let B;e[35]!==K||e[36]!==$||e[37]!==E||e[38]!==y||e[39]!==R||e[40]!==N||e[41]!==b||e[42]!==u||e[43]!==o||e[44]!==L||e[45]!==F?(B=t.jsx("div",{className:"p-5",children:t.jsx("div",{children:$&&!N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"size-8 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),$.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:$.message})]}),t.jsxs(Y,{variant:"outline",size:"sm",onClick:mt,children:[t.jsx(ge,{className:"size-4"}),"Try again"]})]}):N?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):F.length===0&&!y?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(xe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),t.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):F.length===0&&y&&!o?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(fe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):o&&F.length===0&&!u?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),t.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):t.jsxs("div",{className:"flex flex-col gap-8",children:[u&&F.length===0&&t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),L.length>0&&t.jsx(ae,{items:L,title:"Verified",onItemClick:E}),K.length>0&&t.jsx(ae,{items:K,title:L.length>0?"All":"",onItemClick:E}),R&&b&&t.jsx("div",{className:"flex justify-center py-8",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(se,{size:20,className:"animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=K,e[36]=$,e[37]=E,e[38]=y,e[39]=R,e[40]=N,e[41]=b,e[42]=u,e[43]=o,e[44]=L,e[45]=F,e[46]=B):B=e[46];let A;e[47]!==H||e[48]!==i||e[49]!==B?(A=t.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",onScroll:H,children:B}),e[47]=H,e[48]=i,e[49]=B,e[50]=A):A=e[50];let W;return e[51]!==V||e[52]!==D||e[53]!==A?(W=t.jsxs("div",{className:"flex flex-col h-full",children:[V,D,A]}),e[51]=V,e[52]=D,e[53]=A,e[54]=W):W=e[54],W}function mt(){return window.location.reload()}function dt(s){return s.is_public!==!0}function ut(s){const e=Q.c(11),{registryId:r,storePrivateOnly:l}=s,m=Be(r),n=m?.tools;let o;e[0]!==n?(o=Ee(n),e[0]=n,e[1]=o):o=e[1];const c=o;if(!c){let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"bg-muted p-3 rounded-full",children:t.jsx(xe,{className:"size-8 text-muted-foreground"})}),e[2]=d):d=e[2];let j;return e[3]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[d,t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=j):j=e[3],j}const a=m?.tools;let g;e[4]!==a?(g=Oe(a),e[4]=a,e[5]=g):g=e[5];const i=g||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==i?(p=t.jsx(ct,{registryId:r,listToolName:c,filtersToolName:i,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=i,e[10]=p):p=e[10],p}function ft(s){const e=Q.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:o,placeholder:c}=s,a=c===void 0?"Select a registry...":c,[g,I]=q.useState(!1);let i,p,d,j,S,R,b,N;if(e[0]!==g||e[1]!==a||e[2]!==r||e[3]!==l){let w;e[12]!==l?(w=y=>y.id===l,e[12]=l,e[13]=w):w=e[13];const x=r.find(w);p=ve,b=g,N=I,i=be,R=!0,d="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(j=ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=j):j=e[14],S=x?t.jsxs("span",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}):t.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=g,e[1]=a,e[2]=r,e[3]=l,e[4]=i,e[5]=p,e[6]=d,e[7]=j,e[8]=S,e[9]=R,e[10]=b,e[11]=N}else i=e[4],p=e[5],d=e[6],j=e[7],S=e[8],R=e[9],b=e[10],N=e[11];let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Se,{className:"size-4 opacity-50"}),e[15]=P):P=e[15];let $;e[16]!==d||e[17]!==j||e[18]!==S?($=t.jsxs("button",{type:d,className:j,children:[S,P]}),e[16]=d,e[17]=j,e[18]=S,e[19]=$):$=e[19];let h;e[20]!==i||e[21]!==R||e[22]!==$?(h=t.jsx(i,{asChild:R,children:$}),e[20]=i,e[21]=R,e[22]=$,e[23]=h):h=e[23];let C;if(e[24]!==m||e[25]!==r||e[26]!==l){let w;e[28]!==m||e[29]!==l?(w=x=>t.jsxs("button",{type:"button",onClick:()=>{m(x.id??x.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?t.jsx("img",{src:x.icon,alt:x.name,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.name.slice(0,1).toUpperCase()}),t.jsx("span",{children:x.name})]}),l===(x.id??x.name)&&t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(Ce,{className:"size-4"})})]},x.id??x.name),e[28]=m,e[29]=l,e[30]=w):w=e[30],C=r.map(w),e[24]=m,e[25]=r,e[26]=l,e[27]=C}else C=e[27];let k;e[31]!==n||e[32]!==o?(k=o.length>0&&t.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[t.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),o.map(w=>t.jsxs("button",{type:"button",onClick:()=>{n(w),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?t.jsx("img",{src:w.icon,alt:w.title,className:"w-4 h-4 rounded"}):t.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.title.slice(0,1).toUpperCase()}),t.jsx("span",{className:"flex-1",children:w.title})]}),t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:t.jsx(qe,{size:16})})]},w.id??w.title))]}),e[31]=n,e[32]=o,e[33]=k):k=e[33];let v;e[34]!==C||e[35]!==k?(v=t.jsxs(Ne,{align:"end",className:"w-auto min-w-[200px] p-1",children:[C,k]}),e[34]=C,e[35]=k,e[36]=v):v=e[36];let z;return e[37]!==p||e[38]!==h||e[39]!==v||e[40]!==b||e[41]!==N?(z=t.jsxs(p,{open:b,onOpenChange:N,children:[h,v]}),e[37]=p,e[38]=h,e[39]=v,e[40]=b,e[41]=N,e[42]=z):z=e[42],z}function xt({registries:s,onConnected:e}){const r=ye(),{org:{slug:l}}=re(),{data:m}=Ie.useSession(),n=me(),[o,c]=q.useState(!1),a=s[0],g=async()=>{if(!(!a||!m?.user?.id)){c(!0);try{const i=await r.create.mutateAsync(a);e?.(i.id)}finally{c(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:de},search:{action:"create"}})};return t.jsx(We,{image:t.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:t.jsxs(t.Fragment,{children:[t.jsxs(Y,{variant:"outline",onClick:g,disabled:o||!a,children:[a?.icon&&t.jsx("img",{src:a.icon,alt:"",className:"size-4"}),o?"Installing...":"Install Registry"]}),t.jsx(Y,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function gt(s){const e=Q.c(15),{error:r,onRetry:l,registryName:m}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=o):o=e[1];let c;e[2]!==m?(c=t.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",t.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=c):c=e[3];let a;e[4]!==r?(a=r?.message&&t.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let g;e[6]!==c||e[7]!==a?(g=t.jsxs("div",{className:"space-y-2",children:[o,c,a]}),e[6]=c,e[7]=a,e[8]=g):g=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ge,{className:"size-4"}),e[9]=I):I=e[9];let i;e[10]!==l?(i=t.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=i):i=e[11];let p;return e[12]!==g||e[13]!==i?(p=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,g,i]}),e[12]=g,e[13]=i,e[14]=p):p=e[14],p}function is(){const s=Q.c(49),{org:e,project:r}=re(),l=De(),m=ye(),n=Te(),o=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=He(l);let a;s[0]!==e.id?(a=Ke.SELF(e.id),s[0]=e.id,s[1]=a):a=s[1];const g=a,I=r.enabledPlugins,i=I==null||I.includes(ne),p=c.filter(f=>f.id!==g?!0:i);let d;s[2]!==g?(d=f=>f.id===g,s[2]=g,s[3]=d):d=s[3];const j=p.some(d);let S;s[4]!==e.id?(S={connectionId:_e,orgId:e.id},s[4]=e.id,s[5]=S):S=s[5];const R=je(S);let b;s[6]!==r.id||s[7]!==R?(b=async()=>{const f=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ne}});return f.structuredContent??f},s[6]=r.id,s[7]=R,s[8]=b):b=s[8];const{data:N}=he({queryKey:oe.projectPluginConfig(r.id??"",ne),queryFn:b,enabled:j&&!!r.id,staleTime:6e4}),P=N?.config?.settings;let $;s[9]!==P||s[10]!==g?($=f=>f.id===g&&P?{id:f.id,name:P.registryName||f.title,icon:P.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},s[9]=P,s[10]=g,s[11]=$):$=s[11];const h=p.map($);let C;s[12]!==e.slug?(C=Je.selectedRegistry(e.slug),s[12]=e.slug,s[13]=C):C=s[13];const[k,v]=Qe(C,ht);let z;s[14]!==k?(z=f=>f.id===k,s[14]=k,s[15]=z):z=s[15];const x=p.find(z)?.id||p[0]?.id||"",y=x===g&&P?.storePrivateOnly===!0;let u;s[16]!==e.id?(u=Ae(e.id),s[16]=e.id,s[17]=u):u=s[17];let T;s[18]!==u?(T=[u],s[18]=u,s[19]=T):T=s[19];const L=T;let F;s[20]===Symbol.for("react.memo_cache_sentinel")?(F=[Me()],s[20]=F):F=s[20];const K=F;let _;s[21]!==m.create||s[22]!==v?(_=async f=>{const Z=await m.create.mutateAsync(f);v(Z.id)},s[21]=m.create,s[22]=v,s[23]=_):_=s[23];const E=_,G=new Set(p.map(pt)),H=L.filter(f=>f.id&&!G.has(f.id)),V=K.filter(f=>f.id&&!G.has(f.id));if(o){let f;return s[24]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Re,{}),s[24]=f):f=s[24],f}let D;s[25]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(X.Header.Left,{children:t.jsx(Pe,{children:t.jsx($e,{children:t.jsx(ke,{children:t.jsx(ze,{children:"Store"})})})})}),s[25]=D):D=s[25];let B;s[26]!==E?(B=async f=>E(f),s[26]=E,s[27]=B):B=s[27];let A;s[28]!==H||s[29]!==x||s[30]!==h||s[31]!==v||s[32]!==B?(A=t.jsxs(X.Header,{children:[D,t.jsx(X.Header.Right,{children:t.jsx(ft,{wellKnownRegistries:H,registries:h,value:x,onValueChange:v,onAddWellKnown:B,placeholder:"Select store..."})})]}),s[28]=H,s[29]=x,s[30]=h,s[31]=v,s[32]=B,s[33]=A):A=s[33];let W;s[34]!==x||s[35]!==h?(W=f=>{const{error:Z,resetError:le}=f;return t.jsx(gt,{error:Z,onRetry:le,registryName:h.find(ee=>ee.id===x)?.name??"registry"})},s[34]=x,s[35]=h,s[36]=W):W=s[36];let O;s[37]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[t.jsx(se,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),s[37]=O):O=s[37];let M;s[38]!==V||s[39]!==x||s[40]!==v||s[41]!==y?(M=t.jsx(q.Suspense,{fallback:O,children:x?t.jsx(ut,{registryId:x,storePrivateOnly:y}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(xt,{registries:V,onConnected:f=>{v(f)}})})}),s[38]=V,s[39]=x,s[40]=v,s[41]=y,s[42]=M):M=s[42];let U;s[43]!==W||s[44]!==M?(U=t.jsx(X.Content,{children:t.jsx(Ye,{fallback:W,children:M})}),s[43]=W,s[44]=M,s[45]=U):U=s[45];let J;return s[46]!==A||s[47]!==U?(J=t.jsxs(X,{children:[A,U]}),s[46]=A,s[47]=U,s[48]=J):J=s[48],J}function pt(s){return s.id}function ht(s){return s??""}export{is as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,j as t,_ as o}from"./index-uOrjFt6t.js";function c(){const s=n.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(o,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as _,j as s,r as S,_ as y}from"./index-uOrjFt6t.js";import{i as R}from"./Check-Dnxirgog.js";import{t as k}from"./ChevronDown-DlCNAUXg.js";function E(x){const e=_.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const w=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:w,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=_.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,B as $,j as c,aF as G,ax as L,E as A,D as _,G as P,aG as E,J as j,aH as H,aI as w,aJ as z,aK as K,M as J,aL as B,aM as Q,aN as U,aO as V,aP as W,aQ as Z,c as R}from"./index-uOrjFt6t.js";import{c as q}from"./button-D10odSSz.js";var m="Popover",[b]=J(m,[w]),g=w(),[X,d]=b(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=g(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(G,{...p,children:c.jsx(X,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=g(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(E,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),s=g(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":k(n.open),...r,ref:a,onClick:P(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(E,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=b(O,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(H,{asChild:!0,container:n,children:r})})})};M.displayName=O;var v="PopoverContent",D=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});D.displayName=v;var te=B("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return z(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(I,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:P(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:P(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:P(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),I=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),C=g(o);return Q(),c.jsx(U,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(V,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(W,{"data-state":k(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:P(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=g(o);return c.jsx(Z,{...n,...r,ref:e})});ce.displayName=ae;function k(t){return t?"open":"closed"}var ie=N,pe=y,le=M,ue=D;function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{Pe as P,ge as a,ve as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,c as z,d as ut,j as s,u as oe,O as pe,t as fe,_ as Ls,o as Ft,s as De,b as Ye,m as Fe,l as Wt,k as Ut,K as xe,aE as Ze,c2 as zs,c0 as $s,b0 as Vt,P as Kt,S as it,e as Bs,aC as Ms}from"./index-uOrjFt6t.js";import{u as Gs,a as qt}from"./use-project-Cr1TKfdV.js";import{c as ue,B as te}from"./button-D10odSSz.js";import{c as Rs,d as Fs,b as Ws,a as Yt,D as Ht}from"./dialog-bLBl7se3.js";import{i as Qt}from"./X-DlPknjOM.js";import{u as mt,S as ae}from"./skeleton-B9aXeb5e.js";import{p as Xt,a as Nt,t as Us,i as ft,u as Vs}from"./use-settings-modal-DVxljFTz.js";import{A as Jt}from"./avatar-DjSt5kfT.js";import{t as Zt}from"./Settings01-CF0yl6Tz.js";import{a as Ks,b as qs,c as Ys,T as Hs}from"./tooltip-CooOHv4u.js";import{i as Qs}from"./Check-Dnxirgog.js";import{a as Xs}from"./Copy01--WUANgtG.js";import{S as Re}from"./switch-CkEMQ9Z5.js";import{S as es,a as ts,d as Me,c as ss,b as Js}from"./select-BZB4uvGm.js";import{i as Zs}from"./Code01-D62OImsE.js";import{i as en}from"./Shield01-BVTU_rBf.js";import{n as tn}from"./CheckDone01-BQB-AnYZ.js";import{u as He}from"./useMutation-BYvhr9Wj.js";import{a as ns,F as Te,b as ye,c as be,d as je,f as Le,e as at}from"./form-CSWi3me2.js";import{I as ve}from"./input-C8Cn3OQt.js";import{i as sn}from"./Upload01-yL5uy1IO.js";import{a as Be,u as he,K as nn}from"./constants-V7-3C38y.js";import{T as ln}from"./textarea-CLWsfk4l.js";import{c as rn,h as an,d as on,b as cn,A as dn,e as un,g as mn,a as fn,f as xn}from"./alert-dialog-DrmsJmsN.js";import{u as pn}from"./useQuery-Vrc6Li_H.js";import{L as Ce}from"./label-D84F6EwM.js";import{n as hn}from"./Container-NYiiZyd6.js";import{h as ls}from"./use-connection-DqGqpr6W.js";import{a as gn,c as vn}from"./use-binding-9lQePXv2.js";import{u as yn}from"./use-install-from-registry-iT6pKCDG.js";import{i as bn}from"./Loading01-D2eBBNoh.js";import{s as xt}from"./Plus-CoFNXdPs.js";import{u as jn,a as Nn,b as Cn,i as ce,r as Qe,D as rs,c as Xe,d as ge,s as Ct,e as St,Z as is,g as as,f as os,h as cs,j as Ge,k as pt,l as Je,m as ht,n as Sn,o as wn,p as ds,q as gt,t as vt,v as us,w as Pn,x as ms,y as wt,z as _n,A as kn,B as An,R as In,S as En,C as On,E as Dn,F as fs,G as Tn,H as Ln,I as zn,J as $n,K as Bn,L as Mn,M as Gn,N as Rn,O as Ue,P as Fn,Q as Pt,T as _t,U as kt,V as Wn,W as xs,X as Un,Y as Ee,_ as Vn,$ as Kn,a0 as qn,a1 as Yn,a2 as Hn,a3 as et,a4 as Qn,a5 as Ve,a6 as Xn,a7 as Jn,a8 as Z,a9 as ps,aa as Zn,ab as el,ac as tl,ad as sl,ae as nl,af as ll,ag as rl,ah as il,ai as al,aj as ol,ak as cl,al as dl,am as ul,an as ml,ao as fl,ap as xl,aq as pl,ar as hl}from"./chart-Bp3LQrS9.js";import{B as gl}from"./badge-Dj7JdmaJ.js";import{a as vl,T as tt,b as st,c as yl}from"./tabs-Cqye-vZ-.js";import{i as bl}from"./AlertCircle-Ci70K_EZ.js";import{s as jl}from"./RefreshCcw01-J5wqqeG_.js";import{b as de,a as hs}from"./use-mcp-tools-DuTyW4Xm.js";import{i as Nl}from"./deco-constants-BmtTfZbQ.js";import{u as Cl}from"./use-members-ByAHJbqb.js";import"./localstorage-keys-r_mW6Lq0.js";import"./index-kTXXfvC-.js";import"./ChevronDown-DlCNAUXg.js";import"./binder--zY5y66H.js";import"./extract-connection-data-DyTSTIQR.js";import"./constants-wwWYqq9s.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-CwZm8daW.js";import"./generate-id-Dyweu44Y.js";import"./index-CW4zTmBX.js";const gs=({size:t=24,color:e="currentColor",...n})=>j.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},j.createElement("path",{d:"M10 2v4.66c0 .218 0 .326-.033.413a.47.47 0 0 1-.138.198c-.07.06-.183.102-.409.185a7.5 7.5 0 1 0 5.16 0c-.226-.083-.339-.125-.409-.185a.469.469 0 0 1-.138-.198C14 6.986 14 6.878 14 6.66V2M8.5 2h7"}));gs.displayName="Beaker01";const vs=({size:t=24,color:e="currentColor",...n})=>j.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},j.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));vs.displayName="Bell01";const yt=({size:t=24,color:e="currentColor",...n})=>j.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},j.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));yt.displayName="Zap";const Sl=[{key:"general",label:"General",icon:s.jsx(Zt,{size:14})},{key:"plugins",label:"Plugins",icon:s.jsx(yt,{size:14})}];function wl(t){const e=z.c(14),{activeSection:n,onNavigate:l}=t,{org:i}=oe();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={suspense:!0},e[0]=r):r=e[0];const{data:o}=Gs(i.id,r);let a;e[1]!==n?(a=Xt(n),e[1]=n,e[2]=a):a=e[2];const d=a;let m;if(e[3]!==d?.slug||e[4]!==n||e[5]!==l||e[6]!==o){let f;e[8]!==d?.slug||e[9]!==n||e[10]!==l?(f=u=>{const x=d?.slug===u.slug;return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("button",{type:"button",onClick:()=>l(Nt(u.slug,"general")),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",x?"text-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("div",{className:"size-4 shrink-0 rounded-[3px] flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:u.ui?.themeColor??"#60a5fa"},children:u.ui?.icon?s.jsx("img",{src:u.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-[8px] font-semibold text-white leading-none",children:(u.name??u.slug).charAt(0).toUpperCase()})}),s.jsx("span",{className:"truncate",children:u.name??u.slug})]}),x&&s.jsx("div",{className:"ml-3 flex flex-col gap-0.5 border-l border-border pl-2.5",children:Sl.map(p=>{const h=Nt(u.slug,p.key);return s.jsxs("button",{type:"button",onClick:()=>l(h),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===h?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:p.icon}),s.jsx("span",{className:"truncate",children:p.label})]},p.key)})})]},u.slug)},e[8]=d?.slug,e[9]=n,e[10]=l,e[11]=f):f=e[11],m=(o??[]).filter(Pl).map(f),e[3]=d?.slug,e[4]=n,e[5]=l,e[6]=o,e[7]=m}else m=e[7];let c;return e[12]!==m?(c=s.jsx(s.Fragment,{children:m}),e[12]=m,e[13]=c):c=e[13],c}function Pl(t){return t.slug!==pe}function _l(t){const e=z.c(31),{activeSection:n,onNavigate:l}=t,{data:i}=ut.useSession(),[r]=mt(),o=i?.user,a=o?.image,d=o?.name??"Profile",m=o?.name??"U";let c;e[0]!==m||e[1]!==a?(c=s.jsx(Jt,{url:a,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),e[0]=m,e[1]=a,e[2]=c):c=e[2];let f;e[3]!==d||e[4]!==c?(f={key:"account.profile",label:d,icon:c},e[3]=d,e[4]=c,e[5]=f):f=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(Zt,{size:14})},e[6]=u):u=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x={key:"account.experimental",label:"Experimental",icon:s.jsx(gs,{size:14})},e[7]=x):x=e[7];let p;e[8]!==f?(p=[f,u,x],e[8]=f,e[9]=p):p=e[9];const h=p;let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.general",label:"General",icon:s.jsx(Us,{size:14})},e[10]=g):g=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S={key:"org.plugins",label:"Plugins",icon:s.jsx(yt,{size:14})},e[11]=S):S=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=[g,S,{key:"org.billing",label:"Billing",icon:s.jsx(ft,{size:14})}],e[12]=w):w=e[12];const _=w;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),e[13]=b):b=e[13];let v;e[14]!==h||e[15]!==n||e[16]!==l?(v=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,h.map(A=>s.jsxs("button",{type:"button",onClick:()=>l(A.key),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===A.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:A.icon}),s.jsx("span",{className:"truncate",children:A.label})]},A.key))]}),e[14]=h,e[15]=n,e[16]=l,e[17]=v):v=e[17];let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),e[18]=N):N=e[18];let P;e[19]!==n||e[20]!==l?(P=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(A=>s.jsxs("button",{type:"button",onClick:()=>l(A.key),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===A.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:A.icon}),s.jsx("span",{className:"truncate",children:A.label})]},A.key))]}),e[19]=n,e[20]=l,e[21]=P):P=e[21];let y;e[22]!==n||e[23]!==l||e[24]!==r.experimental_projects?(y=r.experimental_projects&&s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Projects"}),s.jsx(j.Suspense,{fallback:s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground/50",children:"Loading…"}),children:s.jsx(wl,{activeSection:n,onNavigate:l})})]}),e[22]=n,e[23]=l,e[24]=r.experimental_projects,e[25]=y):y=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.128.2"]})}),e[26]=C):C=e[26];let k;return e[27]!==v||e[28]!==P||e[29]!==y?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[v,P,y,C]}),e[27]=v,e[28]=P,e[29]=y,e[30]=k):k=e[30],k}function kl(){const t=z.c(32),{data:e}=ut.useSession(),[n,l]=j.useState(!1),i=e?.user,r=i?.image;let o;t[0]!==i?(o=()=>{i?.id&&navigator.clipboard.writeText(i.id).then(()=>{l(!0),setTimeout(()=>l(!1),2e3)})},t[0]=i,t[1]=o):o=t[1];const a=o;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),t[2]=d):d=t[2];const m=i?.name??"U";let c;t[3]!==m||t[4]!==r?(c=s.jsx(Jt,{url:r,fallback:m,shape:"circle",size:"xl",className:"size-16 shrink-0"}),t[3]=m,t[4]=r,t[5]=c):c=t[5];const f=i?.name??"User";let u;t[6]!==f?(u=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:f}),t[6]=f,t[7]=u):u=t[7];const x=i?.email;let p;t[8]!==x?(p=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:x}),t[8]=x,t[9]=p):p=t[9];let h;t[10]!==u||t[11]!==p?(h=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[u,p]}),t[10]=u,t[11]=p,t[12]=h):h=t[12];let g;t[13]!==c||t[14]!==h?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[c,h]}),t[13]=c,t[14]=h,t[15]=g):g=t[15];let S;t[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),t[16]=S):S=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),t[17]=w):w=t[17];const _=i?.id;let b;t[18]!==_?(b=s.jsx("span",{className:"font-mono text-sm",children:_}),t[18]=_,t[19]=b):b=t[19];let v;t[20]!==n?(v=n?s.jsx(Qs,{size:14,className:"text-green-600 shrink-0"}):s.jsx(Xs,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),t[20]=n,t[21]=v):v=t[21];let N;t[22]!==a||t[23]!==b||t[24]!==v?(N=s.jsx(Ks,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:a,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,v]})}),t[22]=a,t[23]=b,t[24]=v,t[25]=N):N=t[25];let P;t[26]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(qs,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),t[26]=P):P=t[26];let y;t[27]!==N?(y=s.jsxs("div",{className:"flex flex-col",children:[S,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[w,s.jsx(Ys,{children:s.jsxs(Hs,{children:[N,P]})})]})]}),t[27]=N,t[28]=y):y=t[28];let C;return t[29]!==y||t[30]!==g?(C=s.jsxs("div",{className:"flex flex-col gap-8",children:[d,g,y]}),t[29]=y,t[30]=g,t[31]=C):C=t[31],C}function nt(t){const e=z.c(27),{icon:n,label:l,description:i,control:r,onClick:o,disabled:a}=t,d=a?void 0:o,m=o?"button":void 0,c=o&&!a?0:void 0;let f;e[0]!==a||e[1]!==o?(f=o&&!a?v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),o())}:void 0,e[0]=a,e[1]=o,e[2]=f):f=e[2];const u=o&&!a?"pointer":void 0;let x;e[3]!==u?(x={cursor:u},e[3]=u,e[4]=x):x=e[4];let p;e[5]!==n?(p=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),e[5]=n,e[6]=p):p=e[6];let h;e[7]!==l?(h=s.jsx("p",{className:"text-sm font-medium text-foreground",children:l}),e[7]=l,e[8]=h):h=e[8];let g;e[9]!==i?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),e[9]=i,e[10]=g):g=e[10];let S;e[11]!==h||e[12]!==g?(S=s.jsxs("div",{className:"min-w-0",children:[h,g]}),e[11]=h,e[12]=g,e[13]=S):S=e[13];let w;e[14]!==S||e[15]!==p?(w=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[p,S]}),e[14]=S,e[15]=p,e[16]=w):w=e[16];let _;e[17]!==r?(_=s.jsx("div",{onClick:Al,className:"shrink-0",children:r}),e[17]=r,e[18]=_):_=e[18];let b;return e[19]!==d||e[20]!==w||e[21]!==_||e[22]!==m||e[23]!==c||e[24]!==f||e[25]!==x?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:d,role:m,tabIndex:c,onKeyDown:f,style:x,children:[w,_]}),e[19]=d,e[20]=w,e[21]=_,e[22]=m,e[23]=c,e[24]=f,e[25]=x,e[26]=b):b=e[26],b}function Al(t){return t.stopPropagation()}function At(){const t=z.c(35),[e,n]=mt();let l;t[0]!==n?(l=async P=>{if(P&&await Notification.requestPermission()!=="granted"){fe.error("Notifications denied. Please enable them in your browser settings."),n(El);return}n(y=>({...y,enableNotifications:P}))},t[0]=n,t[1]=l):l=t[1];const i=l;let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Zs,{size:16}),t[3]=o):o=t[3];let a;t[4]!==n?(a=()=>n(Il),t[4]=n,t[5]=a):a=t[5];let d;t[6]!==n?(d=P=>n(y=>({...y,devMode:P})),t[6]=n,t[7]=d):d=t[7];let m;t[8]!==e.devMode||t[9]!==d?(m=s.jsx(Re,{checked:e.devMode,onCheckedChange:d}),t[8]=e.devMode,t[9]=d,t[10]=m):m=t[10];let c;t[11]!==a||t[12]!==m?(c=s.jsx(nt,{icon:o,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:a,control:m}),t[11]=a,t[12]=m,t[13]=c):c=t[13];let f;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{size:16}),t[14]=f):f=t[14];let u;t[15]!==i||t[16]!==e.enableNotifications?(u=s.jsx(nt,{icon:f,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>i(!e.enableNotifications),control:s.jsx(Re,{disabled:typeof Notification>"u",checked:e.enableNotifications,onCheckedChange:i})}),t[15]=i,t[16]=e.enableNotifications,t[17]=u):u=t[17];let x;t[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(en,{size:16}),t[18]=x):x=t[18];let p;t[19]!==n?(p=P=>n(y=>({...y,toolApprovalLevel:P})),t[19]=n,t[20]=p):p=t[20];let h;t[21]===Symbol.for("react.memo_cache_sentinel")?(h={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},t[21]=h):h=t[21];const g=h[e.toolApprovalLevel];let S;t[22]!==g?(S=s.jsx(ts,{className:"w-36",children:s.jsx("span",{children:g})}),t[22]=g,t[23]=S):S=t[23];let w;t[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Me,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),t[24]=w):w=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Me,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),t[25]=_):_=t[25];let b;t[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(ss,{children:[w,_,s.jsx(Me,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),t[26]=b):b=t[26];let v;t[27]!==e.toolApprovalLevel||t[28]!==p||t[29]!==S?(v=s.jsx(nt,{icon:x,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(es,{value:e.toolApprovalLevel,onValueChange:p,children:[S,b]})}),t[27]=e.toolApprovalLevel,t[28]=p,t[29]=S,t[30]=v):v=t[30];let N;return t[31]!==v||t[32]!==c||t[33]!==u?(N=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[c,u,v]})]}),t[31]=v,t[32]=c,t[33]=u,t[34]=N):N=t[34],N}function Il(t){return{...t,devMode:!t.devMode}}function El(t){return{...t,enableNotifications:!1}}function It(t){const e=z.c(22),{icon:n,label:l,description:i,checked:r,onCheckedChange:o}=t;let a;e[0]!==r||e[1]!==o?(a=()=>o(!r),e[0]=r,e[1]=o,e[2]=a):a=e[2];let d;e[3]!==n?(d=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),e[3]=n,e[4]=d):d=e[4];let m;e[5]!==l?(m=s.jsx("p",{className:"text-sm font-medium text-foreground",children:l}),e[5]=l,e[6]=m):m=e[6];let c;e[7]!==i?(c=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:i}),e[7]=i,e[8]=c):c=e[8];let f;e[9]!==m||e[10]!==c?(f=s.jsxs("div",{className:"min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=f):f=e[11];let u;e[12]!==d||e[13]!==f?(u=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[d,f]}),e[12]=d,e[13]=f,e[14]=u):u=e[14];let x;e[15]!==r||e[16]!==o?(x=s.jsx("div",{onClick:Ol,className:"shrink-0",children:s.jsx(Re,{checked:r,onCheckedChange:o})}),e[15]=r,e[16]=o,e[17]=x):x=e[17];let p;return e[18]!==a||e[19]!==u||e[20]!==x?(p=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0 cursor-pointer",onClick:a,children:[u,x]}),e[18]=a,e[19]=u,e[20]=x,e[21]=p):p=e[21],p}function Ol(t){return t.stopPropagation()}function Dl(){const t=z.c(16),[e,n]=mt();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Experimental"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"These features are unstable and may change or stop working at any time."})]}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ls,{size:16}),t[1]=i):i=t[1];let r;t[2]!==n?(r=f=>n(u=>({...u,experimental_projects:f})),t[2]=n,t[3]=r):r=t[3];let o;t[4]!==e.experimental_projects||t[5]!==r?(o=s.jsx(It,{icon:i,label:"Projects",description:"Enable the projects feature in the sidebar.",checked:e.experimental_projects,onCheckedChange:r}),t[4]=e.experimental_projects,t[5]=r,t[6]=o):o=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(tn,{size:16}),t[7]=a):a=t[7];let d;t[8]!==n?(d=f=>n(u=>({...u,experimental_tasks:f})),t[8]=n,t[9]=d):d=t[9];let m;t[10]!==e.experimental_tasks||t[11]!==d?(m=s.jsx(It,{icon:a,label:"Tasks",description:"Enable the tasks feature in the sidebar.",checked:e.experimental_tasks,onCheckedChange:d}),t[10]=e.experimental_tasks,t[11]=d,t[12]=m):m=t[12];let c;return t[13]!==o||t[14]!==m?(c=s.jsxs("div",{className:"flex flex-col gap-6",children:[l,s.jsxs("div",{className:"flex flex-col rounded-lg border border-border bg-muted/25 px-4",children:[o,m]})]}),t[13]=o,t[14]=m,t[15]=c):c=t[15],c}const Tl=Ft({name:De().min(1,"Name is required").max(255,"Name is too long"),slug:De().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:De().optional()});function Ll(t){const e=z.c(24),{value:n,onChange:l,name:i}=t,r=j.useRef(null);let o;e[0]!==l?(o=b=>{const v=b.target.files?.[0];if(v){if(v.size>2097152){fe.error("Image must be smaller than 2MB");return}const N=new FileReader;N.onerror=()=>{const P=N.error;console.error("FileReader error:",P),fe.error(P?.message||"Failed to read image file. Please try again."),r.current&&(r.current.value="")},N.onloadend=()=>{if(N.readyState===FileReader.DONE&&N.result){const P=N.result;l(P)}},N.readAsDataURL(v)}},e[0]=l,e[1]=o):o=e[1];const a=o;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{r.current?.click()},e[2]=d):d=e[2];const m=d;let c;e[3]!==l?(c=b=>{b.stopPropagation(),l("")},e[3]=l,e[4]=c):c=e[4];const f=c;let u;e[5]!==a?(u=s.jsx("input",{type:"file",ref:r,className:"hidden",accept:"image/*",onChange:a}),e[5]=a,e[6]=u):u=e[6];let x;e[7]!==f||e[8]!==i||e[9]!==n?(x=n?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:n,alt:i||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:f,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(Qt,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:m,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(sn,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[7]=f,e[8]=i,e[9]=n,e[10]=x):x=e[10];const p=n?"Change Logo":"Upload Logo";let h;e[11]!==p?(h=s.jsx(te,{type:"button",variant:"outline",size:"sm",onClick:m,className:"mb-2",children:p}),e[11]=p,e[12]=h):h=e[12];let g;e[13]!==f||e[14]!==n?(g=n&&s.jsx(te,{type:"button",variant:"ghost",size:"sm",onClick:f,className:"ml-2",children:"Remove"}),e[13]=f,e[14]=n,e[15]=g):g=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[16]=S):S=e[16];let w;e[17]!==h||e[18]!==g?(w=s.jsxs("div",{className:"flex-1",children:[h,g,S]}),e[17]=h,e[18]=g,e[19]=w):w=e[19];let _;return e[20]!==w||e[21]!==u||e[22]!==x?(_=s.jsxs("div",{className:"flex items-start gap-4",children:[u,x,w]}),e[20]=w,e[21]=u,e[22]=x,e[23]=_):_=e[23],_}function zl(){const t=Ye(),{org:e,project:n}=oe(),l=Fe(),[i,r]=j.useState(!1),o=Wt({resolver:Ut(Tl),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),a=He({mutationFn:async c=>{const f={name:c.name,slug:c.slug};c.logo&&(f.logo=c.logo);const u=await ut.organization.update({organizationId:e.id,data:f});if(u?.error)throw new Error(u.error.message||"Failed to update organization");return u},onSuccess:c=>{l.invalidateQueries({queryKey:xe.organizations()}),l.invalidateQueries({queryKey:xe.activeOrganization(e.slug)}),fe.success("Organization settings updated successfully"),c?.data?.slug&&c.data.slug!==e.slug&&t({to:"/$org/$project/settings",params:{org:c.data.slug,project:n.slug}})},onError:c=>{fe.error(c instanceof Error?c.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),d=c=>{r(!0),a.mutate(c)},m=o.formState.isDirty;return s.jsx(ns,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(d),className:"space-y-6",children:[s.jsx(Te,{control:o.control,name:"name",render:({field:c})=>s.jsxs(ye,{children:[s.jsx(be,{children:"Organization Name"}),s.jsx(je,{children:s.jsx(ve,{placeholder:"My Organization",...c,disabled:i})}),s.jsx(Le,{})]})}),s.jsx(Te,{control:o.control,name:"slug",render:({field:c})=>s.jsxs(ye,{children:[s.jsx(be,{children:"Organization Slug"}),s.jsx(je,{children:s.jsx(ve,{placeholder:"my-organization",...c,disabled:i,onChange:f=>{const u=f.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");c.onChange(u)}})}),s.jsx(at,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(Le,{})]})}),s.jsx(Te,{control:o.control,name:"logo",render:({field:c})=>s.jsxs(ye,{children:[s.jsx(be,{children:"Logo"}),s.jsx(je,{children:s.jsx(Ll,{value:c.value,onChange:c.onChange,name:o.watch("name")})}),s.jsx(Le,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(te,{type:"submit",disabled:!m||i,className:"min-w-24",children:i?"Saving...":"Save Changes"}),m&&s.jsx(te,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:i,children:"Cancel"})]})]})})}function $l(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(zl,{})]}),t[0]=e):e=t[0],e}const Bl=Ft({name:De().min(1,"Name is required").max(200,"Name is too long"),description:De().max(1e3,"Description is too long").nullable(),themeColor:De().nullable()});function Ml(){const t=z.c(63),{org:e,project:n}=oe(),l=Fe(),i=n.slug===pe;let r;t[0]!==e.id?(r={connectionId:Be,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=he(r);let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=Ut(Bl),t[2]=a):a=t[2];const d=n.name??"",m=n.description??"",c=n.ui?.themeColor??"#60a5fa";let f;t[3]!==d||t[4]!==m||t[5]!==c?(f={resolver:a,values:{name:d,description:m,themeColor:c}},t[3]=d,t[4]=m,t[5]=c,t[6]=f):f=t[6];const u=Wt(f);let x;t[7]!==o||t[8]!==n.id||t[9]!==n.ui?.banner||t[10]!==n.ui?.bannerColor||t[11]!==n.ui?.icon?(x=async T=>{const O=await o.callTool({name:"PROJECT_UPDATE",arguments:{projectId:n.id,name:T.name,description:T.description||null,ui:{themeColor:T.themeColor||null,banner:n.ui?.banner??null,bannerColor:n.ui?.bannerColor??null,icon:n.ui?.icon??null}}});return O.structuredContent??O},t[7]=o,t[8]=n.id,t[9]=n.ui?.banner,t[10]=n.ui?.bannerColor,t[11]=n.ui?.icon,t[12]=x):x=t[12];let p;t[13]!==u||t[14]!==e.id||t[15]!==n.slug||t[16]!==l?(p=()=>{l.invalidateQueries({queryKey:xe.project(e.id,n.slug)}),l.invalidateQueries({queryKey:xe.projects(e.id)}),u.reset(u.getValues())},t[13]=u,t[14]=e.id,t[15]=n.slug,t[16]=l,t[17]=p):p=t[17];let h;t[18]!==x||t[19]!==p?(h={mutationFn:x,onSuccess:p,onError:Gl},t[18]=x,t[19]=p,t[20]=h):h=t[20];const g=He(h);let S;t[21]!==g?(S=async T=>{await g.mutateAsync(T)},t[21]=g,t[22]=S):S=t[22];const w=S;let _;t[23]!==u||t[24]!==w?(_=T=>{T(),u.handleSubmit(w)()},t[23]=u,t[24]=w,t[25]=_):_=t[25];const b=_;let v;t[26]!==u||t[27]!==w?(v=u.handleSubmit(w),t[26]=u,t[27]=w,t[28]=v):v=t[28];let N;t[29]!==i||t[30]!==g.isPending||t[31]!==b?(N=T=>{const{field:O}=T;return s.jsxs(ye,{children:[s.jsx(be,{children:"Project Name"}),s.jsx(je,{children:s.jsx(ve,{placeholder:"My Project",...O,onBlur:()=>b(O.onBlur),disabled:i||g.isPending})}),i&&s.jsx(at,{children:"The organization admin project name cannot be changed."}),s.jsx(Le,{})]})},t[29]=i,t[30]=g.isPending,t[31]=b,t[32]=N):N=t[32];let P;t[33]!==u.control||t[34]!==N?(P=s.jsx(Te,{control:u.control,name:"name",render:N}),t[33]=u.control,t[34]=N,t[35]=P):P=t[35];let y;t[36]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(be,{children:"Slug"}),t[36]=y):y=t[36];let C;t[37]!==n.slug?(C=s.jsx(je,{children:s.jsx(ve,{value:n.slug,disabled:!0,className:"bg-muted"})}),t[37]=n.slug,t[38]=C):C=t[38];let k;t[39]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(at,{children:"The project slug cannot be changed after creation."}),t[39]=k):k=t[39];let A;t[40]!==C?(A=s.jsxs(ye,{children:[y,C,k]}),t[40]=C,t[41]=A):A=t[41];let I;t[42]!==g.isPending||t[43]!==b?(I=T=>{const{field:O}=T;return s.jsxs(ye,{children:[s.jsx(be,{children:"Description"}),s.jsx(je,{children:s.jsx(ln,{placeholder:"Optional project description...",rows:3,...O,value:O.value??"",onBlur:()=>b(O.onBlur),disabled:g.isPending})}),s.jsx(Le,{})]})},t[42]=g.isPending,t[43]=b,t[44]=I):I=t[44];let E;t[45]!==u.control||t[46]!==I?(E=s.jsx(Te,{control:u.control,name:"description",render:I}),t[45]=u.control,t[46]=I,t[47]=E):E=t[47];let D;t[48]!==g.isPending||t[49]!==b?(D=T=>{const{field:O}=T;return s.jsxs(ye,{children:[s.jsx(be,{children:"Color"}),s.jsx(je,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"size-9 rounded-md border border-input overflow-hidden cursor-pointer shrink-0",style:{backgroundColor:O.value??"#60a5fa"},children:s.jsx("input",{type:"color",value:O.value??"#60a5fa",onChange:M=>O.onChange(M.target.value),onBlur:()=>b(O.onBlur),disabled:g.isPending,className:"opacity-0 w-full h-full cursor-pointer"})}),s.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:O.value??"#60a5fa"})]})}),s.jsx(Le,{})]})},t[48]=g.isPending,t[49]=b,t[50]=D):D=t[50];let L;t[51]!==u.control||t[52]!==D?(L=s.jsx(Te,{control:u.control,name:"themeColor",render:D}),t[51]=u.control,t[52]=D,t[53]=L):L=t[53];let $;t[54]!==v||t[55]!==P||t[56]!==A||t[57]!==E||t[58]!==L?($=s.jsxs("form",{onSubmit:v,className:"space-y-6",children:[P,A,E,L]}),t[54]=v,t[55]=P,t[56]=A,t[57]=E,t[58]=L,t[59]=$):$=t[59];let R;return t[60]!==u||t[61]!==$?(R=s.jsx("div",{className:"flex flex-col",children:s.jsx(ns,{...u,children:$})}),t[60]=u,t[61]=$,t[62]=R):R=t[62],R}function Gl(t){fe.error("Failed to update project: "+(t instanceof Error?t.message:"Unknown error"))}function ys(){const t=z.c(45),{org:e,project:n}=oe(),l=Ye(),i=Fe(),[r,o]=j.useState(""),[a,d]=j.useState(!1),m=n.slug===pe;let c;t[0]!==e.id?(c={connectionId:Be,orgId:e.id},t[0]=e.id,t[1]=c):c=t[1];const f=he(c);let u;t[2]!==f||t[3]!==n.id?(u=async()=>{const G=await f.callTool({name:"PROJECT_DELETE",arguments:{projectId:n.id}});return G.structuredContent??G},t[2]=f,t[3]=n.id,t[4]=u):u=t[4];let x;t[5]!==l||t[6]!==e.id||t[7]!==e.slug||t[8]!==i?(x=G=>{G.success?(i.invalidateQueries({queryKey:xe.projects(e.id)}),fe.success("Project deleted"),l({to:"/$org/$project",params:{org:e.slug,project:pe}})):fe.error(G.message??"Failed to delete project")},t[5]=l,t[6]=e.id,t[7]=e.slug,t[8]=i,t[9]=x):x=t[9];let p;t[10]!==u||t[11]!==x?(p={mutationFn:u,onSuccess:x,onError:Rl},t[10]=u,t[11]=x,t[12]=p):p=t[12];const h=He(p);if(m)return null;const g=r===n.name;let S;t[13]!==h?(S=()=>{h.mutate()},t[13]=h,t[14]=S):S=t[14];const w=S;let _;t[15]===Symbol.for("react.memo_cache_sentinel")?(_=G=>{d(G),G||o("")},t[15]=_):_=t[15];const b=_;let v;t[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),t[16]=v):v=t[16];let N;t[17]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),t[17]=N):N=t[17];let P;t[18]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(an,{asChild:!0,children:s.jsx(te,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),t[18]=P):P=t[18];let y;t[19]!==n.name?(y=s.jsxs(rn,{children:['Delete "',n.name,'"?']}),t[19]=n.name,t[20]=y):y=t[20];let C;t[21]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(on,{children:"This action cannot be undone. All project data will be permanently deleted."}),t[21]=C):C=t[21];let k;t[22]!==y?(k=s.jsxs(cn,{children:[y,C]}),t[22]=y,t[23]=k):k=t[23];let A;t[24]!==n.name?(A=s.jsxs("p",{className:"text-sm mb-2",children:["Type ",s.jsx("strong",{children:n.name})," to confirm:"]}),t[24]=n.name,t[25]=A):A=t[25];let I;t[26]===Symbol.for("react.memo_cache_sentinel")?(I=G=>o(G.target.value),t[26]=I):I=t[26];let E;t[27]!==r||t[28]!==n.name?(E=s.jsx(ve,{value:r,onChange:I,placeholder:n.name}),t[27]=r,t[28]=n.name,t[29]=E):E=t[29];let D;t[30]!==A||t[31]!==E?(D=s.jsxs("div",{className:"py-4",children:[A,E]}),t[30]=A,t[31]=E,t[32]=D):D=t[32];let L;t[33]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(dn,{children:"Cancel"}),t[33]=L):L=t[33];const $=!g||h.isPending,R=h.isPending?"Deleting...":"Delete Project";let T;t[34]!==w||t[35]!==$||t[36]!==R?(T=s.jsxs(un,{children:[L,s.jsx(mn,{onClick:w,disabled:$,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:R})]}),t[34]=w,t[35]=$,t[36]=R,t[37]=T):T=t[37];let O;t[38]!==k||t[39]!==D||t[40]!==T?(O=s.jsxs(fn,{children:[k,D,T]}),t[38]=k,t[39]=D,t[40]=T,t[41]=O):O=t[41];let M;return t[42]!==a||t[43]!==O?(M=s.jsxs("div",{className:"flex flex-col",children:[v,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[N,s.jsxs(xn,{open:a,onOpenChange:b,children:[P,O]})]})]}),t[42]=a,t[43]=O,t[44]=M):M=t[44],M}function Rl(t){fe.error("Failed to delete project: "+(t instanceof Error?t.message:"Unknown error"))}function Fl(){const t=z.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"General"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col",children:[e,s.jsxs("div",{className:"pt-6 flex flex-col gap-6",children:[s.jsx(Ml,{}),s.jsx(ys,{})]})]}),t[1]=n):n=t[1],n}function Et({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:l,bindingType:i,onAddNew:r,className:o,disabled:a=!1}){const[d,m]=j.useState(!1),{installByBinding:c,isInstalling:f}=yn(),u=d||f,x=ls(),p=gn({connections:x,binding:typeof l=="string"?l:void 0}),h=!l||!x?x??[]:typeof l=="string"?p:Array.isArray(l)&&l.length>0?x.filter(v=>vn(v,l)):x,g=(()=>{if(!i?.startsWith("@"))return null;const[v,N]=i.replace("@","").split("/");return v&&N?{scope:v,appName:N}:null})(),S=(()=>{let v=h;const N=Array.isArray(l)&&l.length>0;if(g&&!N&&(v=v.filter(P=>{const y=P.app_name,C=P.metadata?.scopeName;return y===g.appName&&C===g.scope})),t&&!v.some(P=>P.id===t)){const P=x?.find(y=>y.id===t);if(P)return[P,...v]}return v})(),w=i?.startsWith("@"),_=async()=>{if(w&&i){m(!0);try{const v=await c(i);v&&e(v.id)}finally{m(!1)}return}r?.()},b=S.find(v=>v.id===t);return s.jsxs(es,{value:t??"none",onValueChange:v=>e(v==="none"?null:v),disabled:a,children:[s.jsx(ts,{size:"sm",className:ue("w-[200px]",o),children:s.jsx(Js,{placeholder:n,children:b?s.jsxs("div",{className:"flex items-center gap-2",children:[b.icon?s.jsx("img",{src:b.icon,alt:b.title,className:"w-4 h-4 rounded shrink-0"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:b.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"truncate",children:b.title})]}):n})}),s.jsxs(ss,{children:[s.jsx(Me,{value:"none",children:"No connection"}),S.length===0?s.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):S.map(v=>s.jsx(Me,{value:v.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[v.icon?s.jsx("img",{src:v.icon,alt:v.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:v.title.slice(0,1).toUpperCase()}),s.jsx("span",{children:v.title})]})},v.id)),(r||w)&&s.jsx("div",{className:"border-t border-border",children:s.jsx(te,{onPointerDown:v=>v.stopPropagation(),onClick:v=>{v.preventDefault(),v.stopPropagation(),_()},disabled:u||a,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:u?s.jsxs(s.Fragment,{children:[s.jsx(bn,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Connecting..."})]}):s.jsxs(s.Fragment,{children:[s.jsx(xt,{size:16}),s.jsx("span",{children:"Add Connection"})]})})})]})]})}const Wl=t=>{if(!t||typeof t!="object")return!1;const e=t;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},ot=t=>{const e=t.structuredContent??t,n=e&&typeof e=="object"?e:null,l=n?.content?.[0]?.text&&typeof n.content[0].text=="string"?n.content[0].text:null;if(n?.isError)throw new Error(l??"Tool call failed");if(Wl(e))throw new Error(e.text);return e};function Ul(t){return t.requiresMcpBinding===!0?!0:t.binding!==void 0}function Vl(t){const e=z.c(62),{plugin:n,isEnabled:l,isSaving:i,pendingBinding:r,pendingVtexBinding:o,description:a,label:d,icon:m,projectId:c,client:f,onBindingChange:u,onVtexBindingChange:x,onToggle:p}=t;let h;e[0]!==n?(h=Ul(n),e[0]=n,e[1]=h):h=e[1];const g=h;let S;e[2]!==n.id||e[3]!==c?(S=xe.projectPluginConfig(c??"",n.id),e[2]=n.id,e[3]=c,e[4]=S):S=e[4];let w;e[5]!==f||e[6]!==n.id||e[7]!==c?(w=async()=>{if(!c)throw new Error("Project ID is required to load plugin config.");const V=await f.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:c,pluginId:n.id}});return ot(V)},e[5]=f,e[6]=n.id,e[7]=c,e[8]=w):w=e[8];const _=!!c&&g;let b;e[9]!==S||e[10]!==w||e[11]!==_?(b={queryKey:S,queryFn:w,enabled:_},e[9]=S,e[10]=w,e[11]=_,e[12]=b):b=e[12];const{data:v,isLoading:N}=pn(b),P=v?.config?.connectionId??null,y=r!==void 0?r:P,C=v?.config?.settings&&typeof v.config.settings=="object"?v.config.settings:null,k=typeof C?.vtexConnectionId=="string"?C.vtexConnectionId:null,A=o!==void 0?o.value:k,I=n.id==="collection-reorder-ranking";let E;e[13]!==l||e[14]!==i||e[15]!==p||e[16]!==n.id?(E=()=>!i&&p(n.id,!l),e[13]=l,e[14]=i,e[15]=p,e[16]=n.id,e[17]=E):E=e[17];const D=i?void 0:"pointer";let L;e[18]!==D?(L={cursor:D},e[18]=D,e[19]=L):L=e[19];let $;e[20]!==m?($=m&&s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:m}),e[20]=m,e[21]=$):$=e[21];let R;e[22]!==d?(R=s.jsx("p",{className:"text-sm font-medium text-foreground",children:d}),e[22]=d,e[23]=R):R=e[23];let T;e[24]!==a?(T=a&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),e[24]=a,e[25]=T):T=e[25];let O;e[26]!==R||e[27]!==T?(O=s.jsxs("div",{className:"min-w-0",children:[R,T]}),e[26]=R,e[27]=T,e[28]=O):O=e[28];let M;e[29]!==O||e[30]!==$?(M=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[$,O]}),e[29]=O,e[30]=$,e[31]=M):M=e[31];let G;e[32]!==p||e[33]!==n.id?(G=V=>p(n.id,V),e[32]=p,e[33]=n.id,e[34]=G):G=e[34];let U;e[35]!==l||e[36]!==i||e[37]!==G?(U=s.jsx("div",{onClick:ql,className:"shrink-0",children:s.jsx(Re,{checked:l,onCheckedChange:G,disabled:i})}),e[35]=l,e[36]=i,e[37]=G,e[38]=U):U=e[38];let F;e[39]!==M||e[40]!==U?(F=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[M,U]}),e[39]=M,e[40]=U,e[41]=F):F=e[41];let W;e[42]!==I||e[43]!==N||e[44]!==l||e[45]!==i||e[46]!==g||e[47]!==u||e[48]!==x||e[49]!==n.binding||e[50]!==n.id||e[51]!==y||e[52]!==P||e[53]!==C||e[54]!==k||e[55]!==A?(W=l&&g&&s.jsxs("div",{className:"pb-4 pl-7 space-y-2",onClick:Kl,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ce,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),s.jsx(Et,{value:y??null,onValueChange:V=>u(n.id,V,P),binding:n.binding,placeholder:"Select connection...",className:"w-56",disabled:i||N})]}),I&&s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ce,{className:"text-xs text-muted-foreground w-24",children:"VTEX"}),s.jsx(Et,{value:A??null,onValueChange:V=>x(n.id,V,k,C),binding:$s,placeholder:"Select VTEX connection...",className:"w-56",disabled:i||N})]})]}),e[42]=I,e[43]=N,e[44]=l,e[45]=i,e[46]=g,e[47]=u,e[48]=x,e[49]=n.binding,e[50]=n.id,e[51]=y,e[52]=P,e[53]=C,e[54]=k,e[55]=A,e[56]=W):W=e[56];let K;return e[57]!==F||e[58]!==W||e[59]!==E||e[60]!==L?(K=s.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:E,style:L,children:[F,W]}),e[57]=F,e[58]=W,e[59]=E,e[60]=L,e[61]=K):K=e[61],K}function Kl(t){return t.stopPropagation()}function ql(t){return t.stopPropagation()}function Yl(){const{org:t,project:e}=oe(),n=Fe(),l=he({connectionId:Be,orgId:t.id}),[i,r]=j.useState({}),[o,a]=j.useState({}),[d,m]=j.useState({}),[c,f]=j.useState(!1),u=e.enabledPlugins??[],x=y=>{const C=i[y];return C!==void 0?C:u.includes(y)},p=()=>{const y=new Set(u);for(const[C,k]of Object.entries(i))k?y.add(C):y.delete(C);return Array.from(y)},h=Object.keys(i).length>0||Object.keys(o).length>0||Object.keys(d).length>0,g=(y,C)=>{const k=u.includes(y);r(C===k?A=>{const{[y]:I,...E}=A;return E}:A=>({...A,[y]:C}))},S=(y,C,k)=>{if(C===k){a(A=>{const{[y]:I,...E}=A;return E});return}a(A=>({...A,[y]:C}))},w=(y,C,k,A)=>{if(C===k){m(I=>{const{[y]:E,...D}=I;return D});return}m(I=>({...I,[y]:{value:C,baseSettings:A}}))},_=He({mutationFn:async y=>{const C=[];if(y.updatePlugins){const k=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:y.enabledPlugins}});C.push(ot(k))}if(y.bindingUpdates.length>0){const k=await Promise.all(y.bindingUpdates.map(async({pluginId:A,connectionId:I,settings:E})=>{const D=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:A,connectionId:I,settings:E}});return ot(D)}));C.push(...k)}return C},onSuccess:(y,C)=>{C.updatePlugins&&(n.invalidateQueries({queryKey:xe.project(t.id,e.slug)}),n.invalidateQueries({queryKey:xe.projects(t.id)})),C.bindingUpdates.forEach(({pluginId:k})=>{n.invalidateQueries({queryKey:xe.projectPluginConfig(e.id??"",k)})}),r({}),a({}),m({}),fe.success("Plugins updated successfully")},onError:y=>{fe.error("Failed to update plugins: "+(y instanceof Error?y.message:"Unknown error"))},onSettled:()=>{f(!1)}}),b=()=>{f(!0);const y=new Set([...Object.keys(o),...Object.keys(d)]),C=Array.from(y).map(k=>{const A=o[k],I=d[k],E=I?{...I.baseSettings??{},vtexConnectionId:I.value}:void 0;return{pluginId:k,connectionId:A!==void 0?A:void 0,settings:E}});_.mutate({enabledPlugins:p(),updatePlugins:Object.keys(i).length>0,bindingUpdates:C})},v=()=>{r({}),a({}),m({})},N=y=>{const C=zs.find(k=>k.pluginId===y);return C?{label:C.label,icon:C.items[0]?.icon}:null},P=y=>Ze.find(k=>k.id===y)?.description??null;return Ze.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex flex-col",children:Ze.map(y=>{const C=N(y.id),k=P(y.id),A=x(y.id);return s.jsx(Vl,{plugin:y,isEnabled:A,isSaving:c,pendingBinding:o[y.id],pendingVtexBinding:d[y.id],description:k,label:C?.label??y.id,icon:C?.icon??s.jsx(hn,{size:14}),projectId:e.id,client:l,onBindingChange:S,onVtexBindingChange:w,onToggle:g},y.id)})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(te,{variant:"outline",onClick:v,disabled:!h||c,children:"Cancel"}),s.jsx(te,{onClick:b,disabled:!h||c,className:"min-w-24",children:c?"Saving...":"Save Changes"})]})]})}function Ot(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Plugins"})}),s.jsx(Yl,{})]}),t[0]=e):e=t[0],e}function Hl(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),s.jsx(ys,{})]}),t[0]=e):e=t[0],e}var Dt=function(e,n){for(var l=arguments.length,i=new Array(l>2?l-2:0),r=2;r<l;r++)i[r-2]=arguments[r];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},Ql=["x1","y1","x2","y2","key"],Xl=["offset"],Jl=["xAxisId","yAxisId"],Zl=["xAxisId","yAxisId"];function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,l)}return n}function ee(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(n),!0).forEach(function(l){er(t,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(Object(n)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(n,l))})}return t}function er(t,e,n){return(e=tr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tr(t){var e=sr(t,"string");return typeof e=="symbol"?e:e+""}function sr(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var l=n.call(t,e);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ne(){return Ne=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var l in n)({}).hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Ne.apply(null,arguments)}function Ke(t,e){if(t==null)return{};var n,l,i=nr(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l<r.length;l++)n=r[l],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function nr(t,e){if(t==null)return{};var n={};for(var l in t)if({}.hasOwnProperty.call(t,l)){if(e.indexOf(l)!==-1)continue;n[l]=t[l]}return n}var lr=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:n,x:l,y:i,width:r,height:o,ry:a}=t;return j.createElement("rect",{x:l,y:i,ry:a,width:r,height:o,stroke:"none",fill:e,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function bs(t){var{option:e,lineItemProps:n}=t,l;if(j.isValidElement(e))l=j.cloneElement(e,n);else if(typeof e=="function")l=e(n);else{var i,{x1:r,y1:o,x2:a,y2:d,key:m}=n,c=Ke(n,Ql),f=(i=pt(c))!==null&&i!==void 0?i:{},{offset:u}=f,x=Ke(f,Xl);l=j.createElement("line",Ne({},x,{x1:r,y1:o,x2:a,y2:d,fill:"none",key:m}))}return l}function rr(t){var{x:e,width:n,horizontal:l=!0,horizontalPoints:i}=t;if(!l||!i||!i.length)return null;var{xAxisId:r,yAxisId:o}=t,a=Ke(t,Jl),d=i.map((m,c)=>{var f=ee(ee({},a),{},{x1:e,y1:m,x2:e+n,y2:m,key:"line-".concat(c),index:c});return j.createElement(bs,{key:"line-".concat(c),option:l,lineItemProps:f})});return j.createElement("g",{className:"recharts-cartesian-grid-horizontal"},d)}function ir(t){var{y:e,height:n,vertical:l=!0,verticalPoints:i}=t;if(!l||!i||!i.length)return null;var{xAxisId:r,yAxisId:o}=t,a=Ke(t,Zl),d=i.map((m,c)=>{var f=ee(ee({},a),{},{x1:m,y1:e,x2:m,y2:e+n,key:"line-".concat(c),index:c});return j.createElement(bs,{option:l,lineItemProps:f,key:"line-".concat(c)})});return j.createElement("g",{className:"recharts-cartesian-grid-vertical"},d)}function ar(t){var{horizontalFill:e,fillOpacity:n,x:l,y:i,width:r,height:o,horizontalPoints:a,horizontal:d=!0}=t;if(!d||!e||!e.length||a==null)return null;var m=a.map(f=>Math.round(f+i-i)).sort((f,u)=>f-u);i!==m[0]&&m.unshift(0);var c=m.map((f,u)=>{var x=m[u+1],p=x==null,h=p?i+o-f:x-f;if(h<=0)return null;var g=u%e.length;return j.createElement("rect",{key:"react-".concat(u),y:f,x:l,height:h,width:r,stroke:"none",fill:e[g],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function or(t){var{vertical:e=!0,verticalFill:n,fillOpacity:l,x:i,y:r,width:o,height:a,verticalPoints:d}=t;if(!e||!n||!n.length)return null;var m=d.map(f=>Math.round(f+i-i)).sort((f,u)=>f-u);i!==m[0]&&m.unshift(0);var c=m.map((f,u)=>{var x=m[u+1],p=x==null,h=p?i+o-f:x-f;if(h<=0)return null;var g=u%n.length;return j.createElement("rect",{key:"react-".concat(u),x:f,y:r,width:h,height:a,stroke:"none",fill:n[g],fillOpacity:l,className:"recharts-cartesian-grid-bg"})});return j.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var cr=(t,e)=>{var{xAxis:n,width:l,height:i,offset:r}=t;return as(os(ee(ee(ee({},Ge),n),{},{ticks:cs(n),viewBox:{x:0,y:0,width:l,height:i}})),r.left,r.left+r.width,e)},dr=(t,e)=>{var{yAxis:n,width:l,height:i,offset:r}=t;return as(os(ee(ee(ee({},Ge),n),{},{ticks:cs(n),viewBox:{x:0,y:0,width:l,height:i}})),r.top,r.top+r.height,e)},ur={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:rs.grid};function js(t){var e=jn(),n=Nn(),l=Cn(),i=ee(ee({},Qe(t,ur)),{},{x:ce(t.x)?t.x:l.left,y:ce(t.y)?t.y:l.top,width:ce(t.width)?t.width:l.width,height:ce(t.height)?t.height:l.height}),{xAxisId:r,yAxisId:o,x:a,y:d,width:m,height:c,syncWithTicks:f,horizontalValues:u,verticalValues:x}=i,p=Xe(),h=ge(C=>Ct(C,"xAxis",r,p)),g=ge(C=>Ct(C,"yAxis",o,p));if(!St(m)||!St(c)||!ce(a)||!ce(d))return null;var S=i.verticalCoordinatesGenerator||cr,w=i.horizontalCoordinatesGenerator||dr,{horizontalPoints:_,verticalPoints:b}=i;if((!_||!_.length)&&typeof w=="function"){var v=u&&u.length,N=w({yAxis:g?ee(ee({},g),{},{ticks:v?u:g.ticks}):void 0,width:e??m,height:n??c,offset:l},v?!0:f);Dt(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(_=N)}if((!b||!b.length)&&typeof S=="function"){var P=x&&x.length,y=S({xAxis:h?ee(ee({},h),{},{ticks:P?x:h.ticks}):void 0,width:e??m,height:n??c,offset:l},P?!0:f);Dt(Array.isArray(y),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof y,"]")),Array.isArray(y)&&(b=y)}return j.createElement(is,{zIndex:i.zIndex},j.createElement("g",{className:"recharts-cartesian-grid"},j.createElement(lr,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),j.createElement(ar,Ne({},i,{horizontalPoints:_})),j.createElement(or,Ne({},i,{verticalPoints:b})),j.createElement(rr,Ne({},i,{offset:l,horizontalPoints:_,xAxis:h,yAxis:g})),j.createElement(ir,Ne({},i,{offset:l,verticalPoints:b,xAxis:h,yAxis:g}))))}js.displayName="CartesianGrid";var Ns=(t,e,n)=>ds(t,"xAxis",gt(t,e),n),Cs=(t,e,n)=>us(t,"xAxis",gt(t,e),n),Ss=(t,e,n)=>ds(t,"yAxis",vt(t,e),n),ws=(t,e,n)=>us(t,"yAxis",vt(t,e),n),mr=Je([ht,Ns,Ss,Cs,ws],(t,e,n,l,i)=>ms(t,"xAxis")?wt(e,l,!1):wt(n,i,!1)),fr=(t,e)=>e,Ps=Je([_n,fr],(t,e)=>t.filter(n=>n.type==="area").find(n=>n.id===e)),_s=t=>{var e=ht(t),n=ms(e,"xAxis");return n?"yAxis":"xAxis"},xr=(t,e)=>{var n=_s(t);return n==="yAxis"?vt(t,e):gt(t,e)},pr=(t,e,n)=>kn(t,_s(t),xr(t,e),n),hr=Je([Ps,pr],(t,e)=>{var n;if(!(t==null||e==null)){var{stackId:l}=t,i=Pn(t);if(!(l==null||i==null)){var r=(n=e[l])===null||n===void 0?void 0:n.stackedData,o=r?.find(a=>a.key===i);if(o!=null)return o.map(a=>[a[0],a[1]])}}}),gr=Je([ht,Ns,Ss,Cs,ws,hr,Sn,mr,Ps,wn],(t,e,n,l,i,r,o,a,d,m)=>{var{chartData:c,dataStartIndex:f,dataEndIndex:u}=o;if(!(d==null||t!=="horizontal"&&t!=="vertical"||e==null||n==null||l==null||i==null||l.length===0||i.length===0||a==null)){var{data:x}=d,p;if(x&&x.length>0?p=x:p=c?.slice(f,u+1),p!=null)return zr({layout:t,xAxis:e,yAxis:n,xAxisTicks:l,yAxisTicks:i,dataStartIndex:f,areaSettings:d,stackedData:r,displayedData:p,chartBaseValue:m,bandSize:a})}}),vr=["id"],yr=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var l in n)({}).hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Se.apply(null,arguments)}function ks(t,e){if(t==null)return{};var n,l,i=br(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l<r.length;l++)n=r[l],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function br(t,e){if(t==null)return{};var n={};for(var l in t)if({}.hasOwnProperty.call(t,l)){if(e.indexOf(l)!==-1)continue;n[l]=t[l]}return n}function Lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,l)}return n}function Oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lt(Object(n),!0).forEach(function(l){jr(t,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(n,l))})}return t}function jr(t,e,n){return(e=Nr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nr(t){var e=Cr(t,"string");return typeof e=="symbol"?e:e+""}function Cr(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var l=n.call(t,e);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qe(t,e){return t&&t!=="none"?t:e}var Sr=t=>{var{dataKey:e,name:n,stroke:l,fill:i,legendType:r,hide:o}=t;return[{inactive:o,dataKey:e,type:r,color:qe(l,i),value:fs(n,e),payload:t}]},wr=j.memo(t=>{var{dataKey:e,data:n,stroke:l,strokeWidth:i,fill:r,name:o,hide:a,unit:d,tooltipType:m,id:c}=t,f={dataDefinedOnItem:n,getPosition:Ln,settings:{stroke:l,strokeWidth:i,fill:r,dataKey:e,nameKey:void 0,name:fs(o,e),hide:a,type:m,color:qe(l,r),unit:d,graphicalItemId:c}};return j.createElement(Tn,{tooltipEntrySettings:f})});function Pr(t){var{clipPathId:e,points:n,props:l}=t,{needClip:i,dot:r,dataKey:o}=l,a=pt(l);return j.createElement(Qn,{points:n,dot:r,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:a,needClip:i,clipPathId:e})}function _r(t){var{showLabels:e,children:n,points:l}=t,i=l.map(r=>{var o,a,d={x:(o=r.x)!==null&&o!==void 0?o:0,y:(a=r.y)!==null&&a!==void 0?a:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Oe(Oe({},d),{},{value:r.value,payload:r.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return j.createElement(Yn,{value:e?i:void 0},n)}function zt(t){var{points:e,baseLine:n,needClip:l,clipPathId:i,props:r}=t,{layout:o,type:a,stroke:d,connectNulls:m,isRange:c}=r,{id:f}=r,u=ks(r,vr),x=pt(u),p=Hn(u);return j.createElement(j.Fragment,null,e?.length>1&&j.createElement(Ue,{clipPath:l?"url(#clipPath-".concat(i,")"):void 0},j.createElement(et,Se({},p,{id:f,points:e,connectNulls:m,type:a,baseLine:n,layout:o,stroke:"none",className:"recharts-area-area"})),d!=="none"&&j.createElement(et,Se({},x,{className:"recharts-area-curve",layout:o,type:a,connectNulls:m,fill:"none",points:e})),d!=="none"&&c&&j.createElement(et,Se({},x,{className:"recharts-area-curve",layout:o,type:a,connectNulls:m,fill:"none",points:n}))),j.createElement(Pr,{points:e,props:u,clipPathId:i}))}function kr(t){var e,n,{alpha:l,baseLine:i,points:r,strokeWidth:o}=t,a=(e=r[0])===null||e===void 0?void 0:e.y,d=(n=r[r.length-1])===null||n===void 0?void 0:n.y;if(!Ve(a)||!Ve(d))return null;var m=l*Math.abs(a-d),c=Math.max(...r.map(f=>f.x||0));return ce(i)?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(...i.map(f=>f.x||0),c)),ce(c)?j.createElement("rect",{x:0,y:a<d?a:a-m,width:c+(o?parseInt("".concat(o),10):1),height:Math.floor(m)}):null}function Ar(t){var e,n,{alpha:l,baseLine:i,points:r,strokeWidth:o}=t,a=(e=r[0])===null||e===void 0?void 0:e.x,d=(n=r[r.length-1])===null||n===void 0?void 0:n.x;if(!Ve(a)||!Ve(d))return null;var m=l*Math.abs(a-d),c=Math.max(...r.map(f=>f.y||0));return ce(i)?c=Math.max(i,c):i&&Array.isArray(i)&&i.length&&(c=Math.max(...i.map(f=>f.y||0),c)),ce(c)?j.createElement("rect",{x:a<d?a:a-m,y:0,width:m,height:Math.floor(c+(o?parseInt("".concat(o),10):1))}):null}function Ir(t){var{alpha:e,layout:n,points:l,baseLine:i,strokeWidth:r}=t;return n==="vertical"?j.createElement(kr,{alpha:e,points:l,baseLine:i,strokeWidth:r}):j.createElement(Ar,{alpha:e,points:l,baseLine:i,strokeWidth:r})}function Er(t){var{needClip:e,clipPathId:n,props:l,previousPointsRef:i,previousBaselineRef:r}=t,{points:o,baseLine:a,isAnimationActive:d,animationBegin:m,animationDuration:c,animationEasing:f,onAnimationStart:u,onAnimationEnd:x}=l,p=j.useMemo(()=>({points:o,baseLine:a}),[o,a]),h=Wn(p,"recharts-area-"),g=xs(),[S,w]=j.useState(!1),_=!S,b=j.useCallback(()=>{typeof x=="function"&&x(),w(!1)},[x]),v=j.useCallback(()=>{typeof u=="function"&&u(),w(!0)},[u]);if(g==null)return null;var N=i.current,P=r.current;return j.createElement(_r,{showLabels:_,points:o},l.children,j.createElement(Un,{animationId:h,begin:m,duration:c,isActive:d,easing:f,onAnimationEnd:b,onAnimationStart:v,key:h},y=>{if(N){var C=N.length/o.length,k=y===1?o:o.map((I,E)=>{var D=Math.floor(E*C);if(N[D]){var L=N[D];return Oe(Oe({},I),{},{x:Ee(L.x,I.x,y),y:Ee(L.y,I.y,y)})}return I}),A;return ce(a)?A=Ee(P,a,y):Vn(a)||Kn(a)?A=Ee(P,0,y):A=a.map((I,E)=>{var D=Math.floor(E*C);if(Array.isArray(P)&&P[D]){var L=P[D];return Oe(Oe({},I),{},{x:Ee(L.x,I.x,y),y:Ee(L.y,I.y,y)})}return I}),y>0&&(i.current=k,r.current=A),j.createElement(zt,{points:k,baseLine:A,needClip:e,clipPathId:n,props:l})}return y>0&&(i.current=o,r.current=a),j.createElement(Ue,null,d&&j.createElement("defs",null,j.createElement("clipPath",{id:"animationClipPath-".concat(n)},j.createElement(Ir,{alpha:y,points:o,baseLine:a,layout:g,strokeWidth:l.strokeWidth}))),j.createElement(Ue,{clipPath:"url(#animationClipPath-".concat(n,")")},j.createElement(zt,{points:o,baseLine:a,needClip:e,clipPathId:n,props:l})))}),j.createElement(qn,{label:l.label}))}function Or(t){var{needClip:e,clipPathId:n,props:l}=t,i=j.useRef(null),r=j.useRef();return j.createElement(Er,{needClip:e,clipPathId:n,props:l,previousPointsRef:i,previousBaselineRef:r})}class Dr extends j.PureComponent{render(){var{hide:e,dot:n,points:l,className:i,top:r,left:o,needClip:a,xAxisId:d,yAxisId:m,width:c,height:f,id:u,baseLine:x,zIndex:p}=this.props;if(e)return null;var h=Vt("recharts-area",i),g=u,{r:S,strokeWidth:w}=Gn(n),_=Rn(n),b=S*2+w,v=a?"url(#clipPath-".concat(_?"":"dots-").concat(g,")"):void 0;return j.createElement(is,{zIndex:p},j.createElement(Ue,{className:h},a&&j.createElement("defs",null,j.createElement(Fn,{clipPathId:g,xAxisId:d,yAxisId:m}),!_&&j.createElement("clipPath",{id:"clipPath-dots-".concat(g)},j.createElement("rect",{x:o-b/2,y:r-b/2,width:c+b,height:f+b}))),j.createElement(Or,{needClip:a,clipPathId:g,props:this.props})),j.createElement(Pt,{points:l,mainColor:qe(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:v}),this.props.isRange&&Array.isArray(x)&&j.createElement(Pt,{points:x,mainColor:qe(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:v}))}}var As={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:rs.area};function Tr(t){var e,n=Qe(t,As),{activeDot:l,animationBegin:i,animationDuration:r,animationEasing:o,connectNulls:a,dot:d,fill:m,fillOpacity:c,hide:f,isAnimationActive:u,legendType:x,stroke:p,xAxisId:h,yAxisId:g}=n,S=ks(n,yr),w=zn(),_=$n(),{needClip:b}=Bn(h,g),v=Xe(),{points:N,isRange:P,baseLine:y}=(e=ge(D=>gr(D,t.id,v)))!==null&&e!==void 0?e:{},C=Mn();if(w!=="horizontal"&&w!=="vertical"||C==null||_!=="AreaChart"&&_!=="ComposedChart")return null;var{height:k,width:A,x:I,y:E}=C;return!N||!N.length?null:j.createElement(Dr,Se({},S,{activeDot:l,animationBegin:i,animationDuration:r,animationEasing:o,baseLine:y,connectNulls:a,dot:d,fill:m,fillOpacity:c,height:k,hide:f,layout:w,isAnimationActive:u==="auto"?!Xn.isSsr:u,isRange:P,legendType:x,needClip:b,points:N,stroke:p,width:A,left:I,top:E,xAxisId:h,yAxisId:g}))}var Lr=(t,e,n,l,i)=>{var r=n??e;if(ce(r))return r;var o=t==="horizontal"?i:l,a=o.scale.domain();if(o.type==="number"){var d=Math.max(a[0],a[1]),m=Math.min(a[0],a[1]);return r==="dataMin"?m:r==="dataMax"||d<0?d:Math.max(Math.min(a[0],a[1]),0)}return r==="dataMin"?a[0]:r==="dataMax"?a[1]:a[0]};function zr(t){var{areaSettings:{connectNulls:e,baseValue:n,dataKey:l},stackedData:i,layout:r,chartBaseValue:o,xAxis:a,yAxis:d,displayedData:m,dataStartIndex:c,xAxisTicks:f,yAxisTicks:u,bandSize:x}=t,p=i&&i.length,h=Lr(r,o,n,a,d),g=r==="horizontal",S=!1,w=m.map((b,v)=>{var N,P,y,C;if(p)C=i[c+v];else{var k=_t(b,l);Array.isArray(k)?(C=k,S=!0):C=[h,k]}var A=(N=(P=C)===null||P===void 0?void 0:P[1])!==null&&N!==void 0?N:null,I=A==null||p&&!e&&_t(b,l)==null;if(g){var E;return{x:kt({axis:a,ticks:f,bandSize:x,entry:b,index:v}),y:I?null:(E=d.scale.map(A))!==null&&E!==void 0?E:null,value:C,payload:b}}return{x:I?null:(y=a.scale.map(A))!==null&&y!==void 0?y:null,y:kt({axis:d,ticks:u,bandSize:x,entry:b,index:v}),value:C,payload:b}}),_;return p||S?_=w.map(b=>{var v,N=Array.isArray(b.value)?b.value[0]:null;if(g){var P;return{x:b.x,y:N!=null&&b.y!=null&&(P=d.scale.map(N))!==null&&P!==void 0?P:null,payload:b.payload}}return{x:N!=null&&(v=a.scale.map(N))!==null&&v!==void 0?v:null,y:b.y,payload:b.payload}}):_=g?d.scale.map(h):a.scale.map(h),{points:w,baseLine:_??0,isRange:S}}function $r(t){var e=Qe(t,As),n=Xe();return j.createElement(In,{id:e.id,type:"area"},l=>j.createElement(j.Fragment,null,j.createElement(En,{legendPayload:Sr(e)}),j.createElement(wr,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:l}),j.createElement(On,{type:"area",id:l,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:Dn(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:n,connectNulls:e.connectNulls}),j.createElement(Tr,Se({},e,{id:l}))))}var Is=j.memo($r,An);Is.displayName="Area";var Br=["type"],Mr=["dangerouslySetInnerHTML","ticks","scale"],Gr=["id","scale"];function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var l in n)({}).hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},ct.apply(null,arguments)}function $t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,l)}return n}function Bt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$t(Object(n),!0).forEach(function(l){Rr(t,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(n,l))})}return t}function Rr(t,e,n){return(e=Fr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fr(t){var e=Wr(t,"string");return typeof e=="symbol"?e:e+""}function Wr(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var l=n.call(t,e);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dt(t,e){if(t==null)return{};var n,l,i=Ur(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l<r.length;l++)n=r[l],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ur(t,e){if(t==null)return{};var n={};for(var l in t)if({}.hasOwnProperty.call(t,l)){if(e.indexOf(l)!==-1)continue;n[l]=t[l]}return n}function Vr(t){var e=ps(),n=j.useRef(null),l=xs(),{type:i}=t,r=dt(t,Br),o=dl(l,"yAxis",i),a=j.useMemo(()=>{if(o!=null)return Bt(Bt({},r),{},{type:o})},[o,r]);return j.useLayoutEffect(()=>{a!=null&&(n.current===null?e(Zn(a)):n.current!==a&&e(el({prev:n.current,next:a})),n.current=a)},[a,e]),j.useLayoutEffect(()=>()=>{n.current&&(e(tl(n.current)),n.current=null)},[e]),null}function Kr(t){var{yAxisId:e,className:n,width:l,label:i}=t,r=j.useRef(null),o=j.useRef(null),a=ge(sl),d=Xe(),m=ps(),c="yAxis",f=ge(N=>nl(N,e)),u=ge(N=>ll(N,e)),x=ge(N=>rl(N,c,e,d)),p=ge(N=>il(N,e));if(j.useLayoutEffect(()=>{if(!(l!=="auto"||!f||al(i)||j.isValidElement(i)||p==null)){var N=r.current;if(N){var P=N.getCalculatedWidth();Math.round(f.width)!==Math.round(P)&&m(ol({id:e,width:P}))}}},[x,f,m,i,e,l,p]),f==null||u==null||p==null)return null;var{dangerouslySetInnerHTML:h,ticks:g,scale:S}=t,w=dt(t,Mr),{id:_,scale:b}=p,v=dt(p,Gr);return j.createElement(cl,ct({},w,v,{ref:r,labelRef:o,x:u.x,y:u.y,tickTextProps:l==="auto"?{width:void 0}:{width:l},width:f.width,height:f.height,className:Vt("recharts-".concat(c," ").concat(c),n),viewBox:a,ticks:x,axisType:c}))}var qr={allowDataOverflow:Z.allowDataOverflow,allowDecimals:Z.allowDecimals,allowDuplicatedCategory:Z.allowDuplicatedCategory,angle:Z.angle,axisLine:Ge.axisLine,hide:!1,includeHidden:Z.includeHidden,interval:Z.interval,label:!1,minTickGap:Z.minTickGap,mirror:Z.mirror,orientation:Z.orientation,padding:Z.padding,reversed:Z.reversed,scale:Z.scale,tick:Z.tick,tickCount:Z.tickCount,tickLine:Ge.tickLine,tickSize:Ge.tickSize,type:Z.type,width:Z.width,yAxisId:0},Yr=t=>{var e=Qe(t,qr);return j.createElement(j.Fragment,null,j.createElement(Vr,{interval:e.interval,id:e.yAxisId,scale:e.scale,type:e.type,domain:e.domain,allowDataOverflow:e.allowDataOverflow,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,padding:e.padding,includeHidden:e.includeHidden,reversed:e.reversed,ticks:e.ticks,width:e.width,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:e.angle,minTickGap:e.minTickGap,tick:e.tick,tickFormatter:e.tickFormatter}),j.createElement(Kr,e))},Es=j.memo(Yr,Jn);Es.displayName="YAxis";var Hr=["axis"],Qr=j.forwardRef((t,e)=>j.createElement(ul,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Hr,tooltipPayloadSearcher:ml,categoricalChartProps:t,ref:e}));const ze="$.providerMetadata.openrouter.usage.cost";function bt(t){const e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),l=new Date(n);l.setDate(l.getDate()+1);const i=new Date(n),r=t==="7d"?7:t==="30d"?30:90;return i.setDate(i.getDate()-r),{startDate:i.toISOString(),endDate:l.toISOString()}}function $e(t){return t.structuredContent}function Q(t){return`$${t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}const Os="gateway-chip-period";function Xr(){try{const t=localStorage.getItem(Os);if(t==="daily"||t==="weekly"||t==="monthly")return t}catch{}return"daily"}function Jr(t){try{localStorage.setItem(Os,t)}catch{}}const Zr={low:"Low confidence",medium:"Medium confidence",high:"High confidence"},ei={daily:"daily",weekly:"weekly",monthly:"monthly"},ti=[5,10,25,50,100],si=[{value:"daily",label:"Daily"},{value:"weekly",label:"Weekly"},{value:"monthly",label:"Monthly"},{value:"none",label:"No reset"}];function ni(t){const e=z.c(51),{open:n,onOpenChange:l,connectionId:i,currentLimitUsd:r,billingMode:o,currentLimitPeriod:a}=t,{org:d}=oe(),[m,c]=j.useState(null),[f,u]=j.useState(""),[x,p]=j.useState(null),[h,g]=j.useState(null),[S,w]=j.useState(a??"none");let _;e[0]!==i||e[1]!==d.id?(_={connectionId:i,orgId:d.id},e[0]=i,e[1]=d.id,e[2]=_):_=e[2];const b=he(_);let v;e[3]!==b?(v={client:b},e[3]=b,e[4]=v):v=e[4];const{mutate:N,isPending:P}=hs(v),y=Fe(),C=o==="postpaid";let k;e[5]!==f?(k=f?Number.parseFloat(f):null,e[5]=f,e[6]=k):k=e[6];const I=m??k,E=S==="none"?null:S,D=C&&I!=null&&I===r&&E===a;let L;e[7]!==b?(L=nn.mcpToolCall(b,"GATEWAY_USAGE",JSON.stringify({})),e[7]=b,e[8]=L):L=e[8];const $=L;let R;e[9]!==$||e[10]!==y?(R=async()=>{await y.invalidateQueries({queryKey:$,exact:!0}),await y.refetchQueries({queryKey:$,exact:!0,type:"active"})},e[9]=$,e[10]=y,e[11]=R):R=e[11];const T=R;let O,M;e[12]!==o||e[13]!==a||e[14]!==r||e[15]!==I||e[16]!==C||e[17]!==S||e[18]!==N||e[19]!==l||e[20]!==T?(M=()=>{if(!I||I<=0)return;const q=C?I:r+I;g(null);const le={limit_usd:q,billing_mode:o,return_url:window.location.href};C&&(le.limit_period=S),N({name:"GATEWAY_SET_LIMIT",arguments:le},{onSuccess:async re=>{const se=re.structuredContent;se?.checkout_url||await T(),se?.checkout_url?p(se.checkout_url):O()},onError:re=>{g(re.message??"Failed to update limit.")}})},O=()=>{c(null),u(""),p(null),g(null),w(a??"none"),l(!1)},e[12]=o,e[13]=a,e[14]=r,e[15]=I,e[16]=C,e[17]=S,e[18]=N,e[19]=l,e[20]=T,e[21]=O,e[22]=M):(O=e[21],M=e[22]);const G=C?"Configure Spending Limit":"Add Credit",U=C?"Set a spending limit for your AI Gateway. The limit resets automatically based on the selected period.":"Choose how much credit to add to your AI Gateway.",F=C?"New limit":"Select amount",W=C?"Set Limit":"Continue";let K;e[23]!==G?(K=s.jsx(Rs,{children:G}),e[23]=G,e[24]=K):K=e[24];let V;e[25]!==U?(V=s.jsx(Fs,{children:U}),e[25]=U,e[26]=V):V=e[26];let Y;e[27]!==K||e[28]!==V?(Y=s.jsxs(Ws,{children:[K,V]}),e[27]=K,e[28]=V,e[29]=Y):Y=e[29];let H;e[30]!==F||e[31]!==x||e[32]!==W||e[33]!==r||e[34]!==f||e[35]!==I||e[36]!==h||e[37]!==M||e[38]!==P||e[39]!==C||e[40]!==D||e[41]!==S||e[42]!==m?(H=x?s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Your payment link is ready. Click below to complete the purchase. You'll be redirected back here after payment."}),s.jsx(te,{asChild:!0,className:"gap-2",children:s.jsxs("a",{href:x,children:[s.jsx(ft,{size:15}),"Complete Payment"]})})]}):s.jsxs("div",{className:"flex flex-col gap-5 pt-2",children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(Ce,{className:"text-xs text-muted-foreground",children:F}),s.jsx("div",{className:"grid grid-cols-5 gap-2",children:ti.map(q=>s.jsxs("button",{type:"button",onClick:()=>{c(q),u("")},className:ue("rounded-md border px-3 py-2 text-sm font-medium transition-colors",m===q?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"),children:["$",q]},q))})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(Ce,{htmlFor:"custom-amount",className:"text-xs text-muted-foreground",children:C?"Or enter the exact new limit":"Or enter a custom amount"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),s.jsx(ve,{id:"custom-amount",type:"number",min:"0.01",step:"0.01",placeholder:"0.00",className:"pl-7",value:f,onChange:q=>{u(q.target.value),c(null)}})]})]}),C&&s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(Ce,{className:"text-xs text-muted-foreground",children:"Reset period"}),s.jsx("div",{className:"grid grid-cols-4 gap-2",children:si.map(q=>{const{value:le,label:re}=q;return s.jsx("button",{type:"button",onClick:()=>w(le),className:ue("rounded-md border px-2 py-2 text-xs font-medium transition-colors",S===le?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"),children:re},le)})})]}),h&&s.jsx("p",{className:"text-xs text-destructive",children:h}),s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:C?s.jsxs(s.Fragment,{children:["Current limit:"," ",s.jsx("span",{className:"font-medium text-foreground",children:r>0?Q(r):"none"})]}):s.jsxs(s.Fragment,{children:["Current limit:"," ",s.jsx("span",{className:"font-medium text-foreground",children:Q(r)})]})}),s.jsx(te,{onClick:M,disabled:P||!I||I<=0||D,className:"gap-2",children:P?"Updating...":W})]})]}),e[30]=F,e[31]=x,e[32]=W,e[33]=r,e[34]=f,e[35]=I,e[36]=h,e[37]=M,e[38]=P,e[39]=C,e[40]=D,e[41]=S,e[42]=m,e[43]=H):H=e[43];let X;e[44]!==Y||e[45]!==H?(X=s.jsxs(Yt,{className:"sm:max-w-md",children:[Y,H]}),e[44]=Y,e[45]=H,e[46]=X):X=e[46];let ne;return e[47]!==O||e[48]!==n||e[49]!==X?(ne=s.jsx(Ht,{open:n,onOpenChange:O,children:X}),e[47]=O,e[48]=n,e[49]=X,e[50]=ne):ne=e[50],ne}function li(t){const e=z.c(22),{estimation:n}=t;if(!n)return null;const{estimatedDaysRemaining:l,estimatedDepletionDate:i,avgDailySpend:r}=n;if(l==null)return null;let o;e[0]!==i?(o=i?new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):null,e[0]=i,e[1]=o):o=e[1];const a=o,d=l!==1?"s":"";let m;e[2]!==l||e[3]!==d?(m=s.jsxs("span",{className:"tabular-nums font-medium text-foreground",children:["~",l," day",d," ","remaining"]}),e[2]=l,e[3]=d,e[4]=m):m=e[4];let c;e[5]!==a?(c=a&&s.jsxs("span",{children:["(until ",a,")"]}),e[5]=a,e[6]=c):c=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("span",{className:"text-muted-foreground/60",children:"|"}),e[7]=f):f=e[7];let u;e[8]!==r?(u=Q(r),e[8]=r,e[9]=u):u=e[9];let x;e[10]!==u?(x=s.jsxs("span",{className:"tabular-nums",children:["avg ",u,"/day"]}),e[10]=u,e[11]=x):x=e[11];let p;e[12]!==n.resetsBeforeDepletion?(p=n.resetsBeforeDepletion&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/60",children:"|"}),s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Resets before depletion"})]}),e[12]=n.resetsBeforeDepletion,e[13]=p):p=e[13];const h=Zr[n.confidence];let g;e[14]!==h?(g=s.jsx(gl,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-4 font-normal",children:h}),e[14]=h,e[15]=g):g=e[15];let S;return e[16]!==g||e[17]!==m||e[18]!==c||e[19]!==x||e[20]!==p?(S=s.jsxs("div",{className:"mt-3 flex items-center gap-2 flex-wrap text-xs text-muted-foreground",children:[m,c,f,x,p,g]}),e[16]=g,e[17]=m,e[18]=c,e[19]=x,e[20]=p,e[21]=S):S=e[21],S}function ri(t){const e=z.c(37),{usage:n,limit:l,limitPeriod:i,onConfigureLimit:r,connectionId:o,alert:a}=t,d=l.total!=null&&l.total>0;let m;e[0]!==d||e[1]!==l.remaining||e[2]!==l.total?(m=d?Math.min(100,Math.round((l.total-(l.remaining??0))/l.total*100)):null,e[0]=d,e[1]=l.remaining,e[2]=l.total,e[3]=m):m=e[3];const c=m;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Spending"}),s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"· Deco AI Gateway"})]}),e[4]=f):f=e[4];let u;e[5]!==n.total?(u=Q(n.total),e[5]=n.total,e[6]=u):u=e[6];let x;e[7]!==u?(x=s.jsx("p",{className:"text-3xl font-bold tabular-nums text-foreground tracking-tight",children:u}),e[7]=u,e[8]=x):x=e[8];let p;e[9]!==d||e[10]!==l.total||e[11]!==i?(p=d&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["of ",Q(l.total)," limit",i&&s.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1",children:[s.jsx(jl,{size:10}),ei[i]]})]}),e[9]=d,e[10]=l.total,e[11]=i,e[12]=p):p=e[12];let h;e[13]!==d?(h=!d&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"No limit configured"}),e[13]=d,e[14]=h):h=e[14];let g;e[15]!==x||e[16]!==p||e[17]!==h?(g=s.jsxs("div",{className:"flex flex-col gap-1",children:[f,x,p,h]}),e[15]=x,e[16]=p,e[17]=h,e[18]=g):g=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(xt,{size:16}),e[19]=S):S=e[19];const w=d?"Configure Limit":"Set Limit";let _;e[20]!==r||e[21]!==w?(_=s.jsxs(te,{onClick:r,variant:"outline",className:"gap-2",children:[S,w]}),e[20]=r,e[21]=w,e[22]=_):_=e[22];let b;e[23]!==_||e[24]!==g?(b=s.jsxs("div",{className:"flex items-center justify-between",children:[g,_]}),e[23]=_,e[24]=g,e[25]=b):b=e[25];let v;e[26]!==d||e[27]!==l.reset||e[28]!==c?(v=d&&c!=null&&s.jsxs("div",{className:"mt-4",children:[s.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:ue("h-full rounded-full transition-all",c>=90?"bg-destructive":c>=70?"bg-amber-500":"bg-primary"),style:{width:`${c}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[c,"% used",l.reset&&s.jsxs("span",{className:"ml-2",children:["· resets ",l.reset]})]})]}),e[26]=d,e[27]=l.reset,e[28]=c,e[29]=v):v=e[29];let N;e[30]!==a||e[31]!==o?(N=s.jsx(Ds,{connectionId:o,alert:a,billingMode:"postpaid"}),e[30]=a,e[31]=o,e[32]=N):N=e[32];let P;return e[33]!==b||e[34]!==v||e[35]!==N?(P=s.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-border bg-gradient-to-br from-card via-card to-muted/30 p-6",children:[b,v,N]}),e[33]=b,e[34]=v,e[35]=N,e[36]=P):P=e[36],P}function ii(t){const e=z.c(30),{available:n,total:l,estimation:i,onAddCredit:r,connectionId:o,alert:a}=t,d=l>0?Math.max(0,Math.min(100,(l-n)/l*100)):0;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Available Credit"}),s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"· Deco AI Gateway"})]}),e[0]=m):m=e[0];let c;e[1]!==n?(c=Q(n),e[1]=n,e[2]=c):c=e[2];let f;e[3]!==c?(f=s.jsx("p",{className:"text-3xl font-bold tabular-nums text-foreground tracking-tight",children:c}),e[3]=c,e[4]=f):f=e[4];let u;e[5]!==l?(u=l>0&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["of ",Q(l)," total"]}),e[5]=l,e[6]=u):u=e[6];let x;e[7]!==f||e[8]!==u?(x=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,f,u]}),e[7]=f,e[8]=u,e[9]=x):x=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xt,{size:16}),e[10]=p):p=e[10];let h;e[11]!==r?(h=s.jsxs(te,{onClick:r,className:"gap-2 px-5",children:[p,"Add Credit"]}),e[11]=r,e[12]=h):h=e[12];let g;e[13]!==x||e[14]!==h?(g=s.jsxs("div",{className:"flex items-center justify-between",children:[x,h]}),e[13]=x,e[14]=h,e[15]=g):g=e[15];let S;e[16]!==n||e[17]!==l||e[18]!==d?(S=l>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${d}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[Q(Math.max(0,l-n))," used"]})]}),e[16]=n,e[17]=l,e[18]=d,e[19]=S):S=e[19];let w;e[20]!==i?(w=s.jsx(li,{estimation:i}),e[20]=i,e[21]=w):w=e[21];let _;e[22]!==a||e[23]!==o?(_=s.jsx(Ds,{connectionId:o,alert:a,billingMode:"prepaid"}),e[22]=a,e[23]=o,e[24]=_):_=e[24];let b;return e[25]!==w||e[26]!==_||e[27]!==g||e[28]!==S?(b=s.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-border bg-gradient-to-br from-card via-card to-muted/30 p-6",children:[g,S,w,_]}),e[25]=w,e[26]=_,e[27]=g,e[28]=S,e[29]=b):b=e[29],b}function Ds(t){const e=z.c(78),{connectionId:n,alert:l,billingMode:i}=t,{org:r}=oe(),[o,a]=j.useState(!1),[d,m]=j.useState(l.enabled),[c,f]=j.useState(String(l.threshold_usd)),[u,x]=j.useState(l.email??""),[p,h]=j.useState(!1),[g,S]=j.useState(null);let w;e[0]!==n||e[1]!==r.id?(w={connectionId:n,orgId:r.id},e[0]=n,e[1]=r.id,e[2]=w):w=e[2];const _=he(w);let b;e[3]!==_?(b={client:_},e[3]=_,e[4]=b):b=e[4];const{mutate:v,isPending:N}=hs(b),P=d!==l.enabled||c!==String(l.threshold_usd)||u!==(l.email??"");let y;e[5]!==u||e[6]!==d||e[7]!==v||e[8]!==c?(y=()=>{S(null),h(!1);const J=parseFloat(c);if(d&&(!u||!u.includes("@"))){S("A valid email is required to enable alerts.");return}if(Number.isNaN(J)||J<=0){S("Threshold must be a positive number.");return}v({name:"GATEWAY_SET_ALERT",arguments:{enabled:d,threshold_usd:J,...u?{email:u}:{}}},{onSuccess:()=>{h(!0),setTimeout(()=>h(!1),3e3)},onError:we=>{S(we.message??"Failed to save alert config.")}})},e[5]=u,e[6]=d,e[7]=v,e[8]=c,e[9]=y):y=e[9];const C=y,k=i==="postpaid"?"Usage Alert":"Low-Balance Alert",A=i==="postpaid"?"Get notified when spending reaches a threshold":"Get notified when credit drops below a threshold";if(!o){let J;e[10]===Symbol.for("react.memo_cache_sentinel")?(J=()=>a(!0),e[10]=J):J=e[10];let we;e[11]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx("div",{className:"flex items-center justify-center size-7 rounded-md bg-muted shrink-0",children:s.jsx(bl,{size:14,className:"text-muted-foreground"})}),e[11]=we):we=e[11];let Pe;e[12]!==k?(Pe=s.jsx("p",{className:"text-xs font-medium text-foreground",children:k}),e[12]=k,e[13]=Pe):Pe=e[13];let _e;e[14]!==l.enabled||e[15]!==l.threshold_usd||e[16]!==i?(_e=l.enabled?i==="postpaid"?`Enabled · Alert at ${Q(l.threshold_usd)}`:`Enabled · Alert below ${Q(l.threshold_usd)}`:i==="postpaid"?"Get notified before your spending limit runs out":"Get notified before your credit balance runs out",e[14]=l.enabled,e[15]=l.threshold_usd,e[16]=i,e[17]=_e):_e=e[17];let ke;e[18]!==_e?(ke=s.jsx("p",{className:"text-[11px] text-muted-foreground",children:_e}),e[18]=_e,e[19]=ke):ke=e[19];let Ae;e[20]!==Pe||e[21]!==ke?(Ae=s.jsxs("div",{className:"flex-1 min-w-0",children:[Pe,ke]}),e[20]=Pe,e[21]=ke,e[22]=Ae):Ae=e[22];let Ie;e[23]!==l.enabled?(Ie=l.enabled&&s.jsx("span",{className:"shrink-0 rounded-full bg-green-500/15 px-2 py-0.5 text-[10px] font-medium text-green-600 dark:text-green-400",children:"On"}),e[23]=l.enabled,e[24]=Ie):Ie=e[24];let We;return e[25]!==Ie||e[26]!==Ae?(We=s.jsxs("button",{type:"button",onClick:J,className:"mt-4 flex items-center gap-3 rounded-lg border border-dashed border-border/60 px-4 py-3 w-full text-left transition-colors hover:bg-muted/50 hover:border-border",children:[we,Ae,Ie]}),e[25]=Ie,e[26]=Ae,e[27]=We):We=e[27],We}let I;e[28]!==k?(I=s.jsx("p",{className:"text-xs font-medium text-foreground",children:k}),e[28]=k,e[29]=I):I=e[29];let E;e[30]!==A?(E=s.jsx("p",{className:"text-[11px] text-muted-foreground",children:A}),e[30]=A,e[31]=E):E=e[31];let D;e[32]!==I||e[33]!==E?(D=s.jsxs("div",{children:[I,E]}),e[32]=I,e[33]=E,e[34]=D):D=e[34];let L;e[35]!==d?(L=s.jsx(Re,{checked:d,onCheckedChange:m}),e[35]=d,e[36]=L):L=e[36];let $;e[37]!==D||e[38]!==L?($=s.jsxs("div",{className:"flex items-center justify-between",children:[D,L]}),e[37]=D,e[38]=L,e[39]=$):$=e[39];const R=!d&&"opacity-50 pointer-events-none";let T;e[40]!==R?(T=ue("flex flex-col gap-3 transition-opacity",R),e[40]=R,e[41]=T):T=e[41];const O=i==="postpaid"?"Notify at":"Notify below";let M;e[42]!==O?(M=s.jsx(Ce,{htmlFor:"alert-threshold",className:"text-[11px] text-muted-foreground",children:O}),e[42]=O,e[43]=M):M=e[43];let G;e[44]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),e[44]=G):G=e[44];let U;e[45]===Symbol.for("react.memo_cache_sentinel")?(U=J=>f(J.target.value),e[45]=U):U=e[45];let F;e[46]!==c?(F=s.jsxs("div",{className:"relative",children:[G,s.jsx(ve,{id:"alert-threshold",type:"number",min:"1",step:"1",className:"h-8 pl-7 text-xs",value:c,onChange:U})]}),e[46]=c,e[47]=F):F=e[47];let W;e[48]!==M||e[49]!==F?(W=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[M,F]}),e[48]=M,e[49]=F,e[50]=W):W=e[50];let K;e[51]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ce,{htmlFor:"alert-email",className:"text-[11px] text-muted-foreground",children:"Notification email"}),e[51]=K):K=e[51];let V;e[52]===Symbol.for("react.memo_cache_sentinel")?(V=J=>x(J.target.value),e[52]=V):V=e[52];let Y;e[53]!==u?(Y=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[K,s.jsx(ve,{id:"alert-email",type:"email",placeholder:"you@example.com",className:"h-8 text-xs",value:u,onChange:V})]}),e[53]=u,e[54]=Y):Y=e[54];let H;e[55]!==W||e[56]!==Y?(H=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[W,Y]}),e[55]=W,e[56]=Y,e[57]=H):H=e[57];let X;e[58]!==g?(X=g&&s.jsx("p",{className:"text-[11px] text-destructive",children:g}),e[58]=g,e[59]=X):X=e[59];let ne;e[60]!==T||e[61]!==H||e[62]!==X?(ne=s.jsxs("div",{className:T,children:[H,X]}),e[60]=T,e[61]=H,e[62]=X,e[63]=ne):ne=e[63];let q;e[64]!==p?(q=p&&s.jsx("span",{className:"text-[11px] text-green-600 dark:text-green-400",children:"Saved"}),e[64]=p,e[65]=q):q=e[65];let le;e[66]===Symbol.for("react.memo_cache_sentinel")?(le=s.jsx(te,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>a(!1),children:"Cancel"}),e[66]=le):le=e[66];const re=N||!P,se=N?"Saving...":"Save Alert";let ie;e[67]!==C||e[68]!==re||e[69]!==se?(ie=s.jsx(te,{size:"sm",className:"h-7 text-xs",onClick:C,disabled:re,children:se}),e[67]=C,e[68]=re,e[69]=se,e[70]=ie):ie=e[70];let me;e[71]!==q||e[72]!==ie?(me=s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[q,le,ie]}),e[71]=q,e[72]=ie,e[73]=me):me=e[73];let B;return e[74]!==ne||e[75]!==me||e[76]!==$?(B=s.jsxs("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-border bg-muted/20 p-4",children:[$,ne,me]}),e[74]=ne,e[75]=me,e[76]=$,e[77]=B):B=e[77],B}const ai={cost:{label:"Cost",color:"var(--chart-1)"}};function oi(){const t=z.c(54),{org:e}=oe(),[n,l]=j.useState("30d");let i;t[0]!==n?(i=bt(n),t[0]=n,t[1]=i):i=t[1];const r=i;let o;t[2]!==e.id?(o={connectionId:Be,orgId:e.id},t[2]=e.id,t[3]=o):o=t[3];const a=he(o);let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d={type:"timeseries",source:{path:ze,from:"output"},aggregation:{fn:"sum",interval:"1d"}},t[4]=d):d=t[4];let m;t[5]!==r?(m={widget:d,timeRange:r},t[5]=r,t[6]=m):m=t[6];let c;t[7]!==a||t[8]!==m?(c={client:a,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:m,staleTime:6e4,select:$e},t[7]=a,t[8]=m,t[9]=c):c=t[9];const{data:f}=de(c);let u;t[10]===Symbol.for("react.memo_cache_sentinel")?(u={type:"metric",source:{path:ze,from:"output"},aggregation:{fn:"count_all"}},t[10]=u):u=t[10];let x;t[11]!==r?(x={widget:u,timeRange:r},t[11]=r,t[12]=x):x=t[12];let p;t[13]!==a||t[14]!==x?(p={client:a,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:x,staleTime:6e4,select:$e},t[13]=a,t[14]=x,t[15]=p):p=t[15];const{data:h}=de(p);let g;t[16]===Symbol.for("react.memo_cache_sentinel")?(g={type:"metric",source:{path:ze,from:"output"},aggregation:{fn:"sum",groupByColumn:"connection_title"}},t[16]=g):g=t[16];let S;t[17]!==r?(S={widget:g,timeRange:r},t[17]=r,t[18]=S):S=t[18];let w;t[19]!==a||t[20]!==S?(w={client:a,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:S,staleTime:6e4,select:$e},t[19]=a,t[20]=S,t[21]=w):w=t[21];const{data:_}=de(w);let b;t[22]!==f?.timeseries?(b=f?.timeseries??[],t[22]=f?.timeseries,t[23]=b):b=t[23];let v;t[24]!==b?(v=b.map(xi),t[24]=b,t[25]=v):v=t[25];const N=v;let P;if(t[26]!==h?.value||t[27]!==N||t[28]!==_?.groups||t[29]!==f?.timeseries||t[30]!==n){const y=(f?.timeseries??[]).reduce(fi,0),C=h?.value??0,k=(_?.groups??[]).filter(mi).sort(ui).slice(0,5),A=n==="7d"?"last 7 days":n==="30d"?"last 30 days":"last 90 days";let I;t[32]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Usage"}),t[32]=I):I=t[32];const E=Q(y);let D;t[33]!==E?(D=s.jsx("p",{className:"text-2xl font-bold tabular-nums text-foreground tracking-tight",children:E}),t[33]=E,t[34]=D):D=t[34];let L;t[35]!==A?(L=s.jsx("p",{className:"text-xs text-muted-foreground",children:A}),t[35]=A,t[36]=L):L=t[36];let $;t[37]!==D||t[38]!==L?($=s.jsxs("div",{className:"flex items-baseline gap-2",children:[D,L]}),t[37]=D,t[38]=L,t[39]=$):$=t[39];let R;t[40]!==C?(R=C.toLocaleString(),t[40]=C,t[41]=R):R=t[41];let T;t[42]!==R?(T=s.jsxs("p",{className:"text-xs text-muted-foreground tabular-nums",children:[R," tool calls"]}),t[42]=R,t[43]=T):T=t[43];let O;t[44]!==$||t[45]!==T?(O=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[I,$,T]}),t[44]=$,t[45]=T,t[46]=O):O=t[46];let M;t[47]!==n?(M=s.jsx(jt,{period:n,onPeriodChange:l}),t[47]=n,t[48]=M):M=t[48];let G;t[49]!==O||t[50]!==M?(G=s.jsxs("div",{className:"flex items-center justify-between",children:[O,M]}),t[49]=O,t[50]=M,t[51]=G):G=t[51];let U;t[52]!==N?(U=N.length>0?s.jsx(fl,{config:ai,className:"h-[200px] w-full",children:s.jsxs(Qr,{data:N,margin:{top:4,right:4,bottom:0,left:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"fillCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"var(--color-cost)",stopOpacity:.3}),s.jsx("stop",{offset:"95%",stopColor:"var(--color-cost)",stopOpacity:0})]})}),s.jsx(js,{vertical:!1,strokeDasharray:"3 3"}),s.jsx(xl,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,fontSize:11,interval:"preserveStartEnd"}),s.jsx(Es,{tickLine:!1,axisLine:!1,tickMargin:4,fontSize:11,tickFormatter:di}),s.jsx(pl,{content:s.jsx(hl,{formatter:ci})}),s.jsx(Is,{type:"monotone",dataKey:"cost",stroke:"var(--color-cost)",fill:"url(#fillCost)",strokeWidth:2})]})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-xs text-muted-foreground",children:"No usage data available for this period"}),t[52]=N,t[53]=U):U=t[53],P=s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-5",children:[G,U,k.length>0&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-[11px] font-medium text-muted-foreground uppercase tracking-wide",children:"Cost by Connection"}),s.jsx("div",{className:"flex flex-col gap-1.5",children:k.map((F,W)=>{const K=y>0?Math.min(F.value/y*100,100):0;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-foreground truncate min-w-0 w-36 shrink-0",children:F.key}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1 rounded-sm",children:s.jsx("div",{className:"h-full transition-all duration-500 ease-out rounded-sm",style:{width:`${K}%`,backgroundColor:`var(--chart-${W%5+1})`}})}),s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-medium",children:Q(F.value)})]},F.key)})})]})]}),t[26]=h?.value,t[27]=N,t[28]=_?.groups,t[29]=f?.timeseries,t[30]=n,t[31]=P}else P=t[31];return P}function ci(t){return Q(t)}function di(t){return`$${t}`}function ui(t,e){return e.value-t.value}function mi(t){return t.value>0}function fi(t,e){return t+e.value}function xi(t){return{date:new Date(t.timestamp).toLocaleDateString("en-US",{month:"short",day:"numeric"}),cost:t.value}}function pi(){const t=z.c(6),[e,n]=j.useState(Xr);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=m=>{n(m),Jr(m)},t[0]=l):l=t[0];const i=l;let r,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Sidebar Display Period"}),o=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose which usage period is shown in the sidebar when no limit is set."}),t[1]=r,t[2]=o):(r=t[1],o=t[2]);let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=["daily","weekly","monthly"],t[3]=a):a=t[3];let d;return t[4]!==e?(d=s.jsxs("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-5",children:[r,o,s.jsx("div",{className:"flex gap-2 mt-1",children:a.map(m=>s.jsx("button",{type:"button",onClick:()=>i(m),className:ue("rounded-md border px-3 py-1.5 text-xs font-medium capitalize transition-colors",e===m?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted text-muted-foreground"),children:m},m))})]}),t[4]=e,t[5]=d):d=t[5],d}function lt(t){const e=z.c(20),{label:n,value:l,subValue:i,maxValue:r,color:o}=t,a=o===void 0?"bg-chart-1":o;let d;e[0]!==l?(d=parseFloat(l.replace(/[^0-9.]/g,""))||0,e[0]=l,e[1]=d):d=e[1];const m=d,c=r>0?Math.min(m/r*100,100):0;let f;e[2]!==n?(f=s.jsx("span",{className:"text-xs text-foreground truncate min-w-0 w-36 shrink-0",children:n}),e[2]=n,e[3]=f):f=e[3];let u;e[4]!==a?(u=ue("h-full transition-all duration-500 ease-out",a),e[4]=a,e[5]=u):u=e[5];const x=`${c}%`;let p;e[6]!==x?(p={width:x},e[6]=x,e[7]=p):p=e[7];let h;e[8]!==u||e[9]!==p?(h=s.jsx("div",{className:"relative h-2 bg-muted/50 overflow-hidden flex-1 rounded-sm",children:s.jsx("div",{className:u,style:p})}),e[8]=u,e[9]=p,e[10]=h):h=e[10];let g;e[11]!==l?(g=s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-medium",children:l}),e[11]=l,e[12]=g):g=e[12];let S;e[13]!==i?(S=i&&s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-muted-foreground",children:i}),e[13]=i,e[14]=S):S=e[14];let w;return e[15]!==f||e[16]!==h||e[17]!==g||e[18]!==S?(w=s.jsxs("div",{className:"flex items-center gap-2",children:[f,h,g,S]}),e[15]=f,e[16]=h,e[17]=g,e[18]=S,e[19]=w):w=e[19],w}function rt(t){const e=z.c(8),{title:n,children:l,empty:i}=t;let r;e[0]!==n?(r=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]!==l||e[3]!==i?(o=i?s.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"No data available for this period"}):l,e[2]=l,e[3]=i,e[4]=o):o=e[4];let a;return e[5]!==r||e[6]!==o?(a=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-5",children:[r,o]}),e[5]=r,e[6]=o,e[7]=a):a=e[7],a}const Mt={"7d":"7 days","30d":"30 days","90d":"90 days"};function jt(t){const e=z.c(4),{period:n,onPeriodChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=Object.keys(Mt),e[0]=i):i=e[0];let r;return e[1]!==l||e[2]!==n?(r=s.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5 self-start",children:i.map(o=>s.jsx("button",{type:"button",onClick:()=>l(o),className:ue("px-2.5 py-1 text-xs font-medium rounded-sm transition-colors",n===o?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:Mt[o]},o))}),e[1]=l,e[2]=n,e[3]=r):r=e[3],r}function Gt(t,e){const n=new Map(e.map(l=>[l.key,l.value]));return t.map(l=>({key:l.key,cost:l.value,calls:n.get(l.key)??0})).sort((l,i)=>i.cost-l.cost)}function hi(){const t=z.c(27),{org:e}=oe(),[n,l]=j.useState("30d"),i=bt(n),{data:r}=Cl(),o=r?.data?.members??[],a=new Map(o.map(Ni));let d;t[0]!==e.id?(d={connectionId:Be,orgId:e.id},t[0]=e.id,t[1]=d):d=t[1];const m=he(d),c=B=>({client:m,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:{widget:{type:"table",source:{path:ze,from:"output"},aggregation:{fn:B.fn,...B.groupByColumn&&{groupByColumn:B.groupByColumn}}},timeRange:i},staleTime:6e4,select:$e}),{data:f,isLoading:u}=de(c({fn:"sum",groupByColumn:"connection_title"})),{data:x,isLoading:p}=de(c({fn:"count",groupByColumn:"connection_title"})),{data:h,isLoading:g}=de(c({fn:"sum",groupByColumn:"user_id"})),{data:S,isLoading:w}=de(c({fn:"count",groupByColumn:"user_id"})),{data:_,isLoading:b}=de(c({fn:"sum",groupByColumn:"tool_name"}));let v;t[2]===Symbol.for("react.memo_cache_sentinel")?(v={fn:"count_all",groupByColumn:"tool_name"},t[2]=v):v=t[2];const{data:N,isLoading:P}=de(c(v));if(u||p||g||w||b||P){let B;t[3]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ae,{className:"h-8 w-48"}),t[3]=B):B=t[3];let J;return t[4]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsxs("div",{className:"flex flex-col gap-4",children:[B,s.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:Array.from({length:3}).map(ji)})]}),t[4]=J):J=t[4],J}const C=Gt(f?.groups??[],x?.groups??[]),k=Gt(h?.groups??[],S?.groups??[]).map(B=>({...B,key:a.get(B.key)??B.key})),A=N?.groups??[],I=new Map((_?.groups??[]).map(bi)),E=A.map(B=>({name:B.key,calls:B.value,cost:I.get(B.key)??0})).sort(yi).slice(0,20),D=C.reduce(vi,0),L=C.reduce(gi,0),$=C[0]?.cost??1,R=k[0]?.cost??1,T=E[0]?.calls??1;let O;t[5]!==n?(O=s.jsx(jt,{period:n,onPeriodChange:l}),t[5]=n,t[6]=O):O=t[6];const M="grid grid-cols-1 gap-4 sm:grid-cols-2",G=C.length===0,U=C.slice(0,8).map(B=>s.jsx(lt,{label:B.key,value:Q(B.cost),subValue:`${B.calls.toLocaleString()} calls`,maxValue:$,color:"bg-chart-1"},B.key));let F;t[7]!==U?(F=s.jsx("div",{className:"space-y-2.5",children:U}),t[7]=U,t[8]=F):F=t[8];let W;t[9]!==G||t[10]!==F?(W=s.jsx(rt,{title:"Cost by Connection",empty:G,children:F}),t[9]=G,t[10]=F,t[11]=W):W=t[11];const K=k.length===0,V=k.slice(0,8).map(B=>s.jsx(lt,{label:B.key,value:Q(B.cost),subValue:`${B.calls.toLocaleString()} calls`,maxValue:R,color:"bg-chart-4"},B.key));let Y;t[12]!==V?(Y=s.jsx("div",{className:"space-y-2.5",children:V}),t[12]=V,t[13]=Y):Y=t[13];let H;t[14]!==Y||t[15]!==K?(H=s.jsx(rt,{title:"Cost by User",empty:K,children:Y}),t[14]=Y,t[15]=K,t[16]=H):H=t[16];const X=rt,ne="Top Tools",q=E.length===0,le="space-y-2.5",re=E.slice(0,8).map(B=>s.jsx(lt,{label:B.name,value:B.calls.toLocaleString(),subValue:B.cost>0?Q(B.cost):void 0,maxValue:T,color:"bg-chart-3"},B.name));let se;t[17]!==re?(se=s.jsx("div",{className:le,children:re}),t[17]=re,t[18]=se):se=t[18];let ie;t[19]!==X||t[20]!==q||t[21]!==se?(ie=s.jsx(X,{title:ne,empty:q,children:se}),t[19]=X,t[20]=q,t[21]=se,t[22]=ie):ie=t[22];let me;return t[23]!==H||t[24]!==ie||t[25]!==W?(me=s.jsxs("div",{className:M,children:[W,H,ie]}),t[23]=H,t[24]=ie,t[25]=W,t[26]=me):me=t[26],s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex gap-4 text-sm",children:[s.jsxs("span",{className:"text-muted-foreground",children:["Total:"," ",s.jsx("span",{className:"font-semibold text-foreground",children:Q(D)})]}),s.jsxs("span",{className:"text-muted-foreground",children:["Calls:"," ",s.jsx("span",{className:"font-semibold text-foreground",children:L.toLocaleString()})]})]}),O]}),me]})}function gi(t,e){return t+e.calls}function vi(t,e){return t+e.cost}function yi(t,e){return e.calls-t.calls}function bi(t){return[t.key,t.value]}function ji(t,e){return s.jsx(ae,{className:"h-40 rounded-xl"},e)}function Ni(t){return[t.userId,t.user.name??t.user.email]}function Ci(t,e){const n=new Map;for(const l of t){const r=new Date(l.timestamp).toLocaleDateString("en-US",{month:"short",year:"2-digit"}),o=n.get(r)??{cost:0,calls:0};n.set(r,{cost:o.cost+l.value,calls:o.calls})}for(const l of e){const r=new Date(l.timestamp).toLocaleDateString("en-US",{month:"short",year:"2-digit"}),o=n.get(r)??{cost:0,calls:0};n.set(r,{cost:o.cost,calls:o.calls+l.value})}return Array.from(n.entries()).map(([l,i])=>({month:l,...i})).reverse()}function Si(){const t=z.c(37),{org:e}=oe(),[n,l]=j.useState("90d");let i;t[0]!==n?(i=bt(n),t[0]=n,t[1]=i):i=t[1];const r=i;let o;t[2]!==e.id?(o={connectionId:Be,orgId:e.id},t[2]=e.id,t[3]=o):o=t[3];const a=he(o);let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d={type:"timeseries",source:{path:ze,from:"output"},aggregation:{fn:"sum",interval:"1d"}},t[4]=d):d=t[4];let m;t[5]!==r?(m={widget:d,timeRange:r},t[5]=r,t[6]=m):m=t[6];let c;t[7]!==a||t[8]!==m?(c={client:a,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:m,staleTime:6e4,select:$e},t[7]=a,t[8]=m,t[9]=c):c=t[9];const{data:f,isLoading:u}=de(c);let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={type:"timeseries",source:{path:ze,from:"output"},aggregation:{fn:"count",interval:"1d"}},t[10]=x):x=t[10];let p;t[11]!==r?(p={widget:x,timeRange:r},t[11]=r,t[12]=p):p=t[12];let h;t[13]!==a||t[14]!==p?(h={client:a,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:p,staleTime:6e4,select:$e},t[13]=a,t[14]=p,t[15]=h):h=t[15];const{data:g,isLoading:S}=de(h);if(u||S){let C;return t[16]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(ae,{className:"h-8 w-48"}),s.jsx(ae,{className:"h-48 rounded-xl"})]}),t[16]=C):C=t[16],C}let w,_,b,v,N;if(t[17]!==g?.timeseries||t[18]!==f?.timeseries||t[19]!==n){const C=Ci(f?.timeseries??[],g?.timeseries??[]);_="flex flex-col gap-4";let k;t[25]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Usage history from monitoring logs"}),t[25]=k):k=t[25],t[26]!==n?(b=s.jsxs("div",{className:"flex items-center justify-between",children:[k,s.jsx(jt,{period:n,onPeriodChange:l})]}),t[26]=n,t[27]=b):b=t[27],v="flex flex-col gap-3 rounded-xl border border-border bg-card p-5",t[28]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Monthly Usage"}),t[28]=N):N=t[28],w=C.length===0?s.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"No usage data available for this period"}):s.jsxs("div",{className:"w-full",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-x-4 pb-1.5 border-b border-border text-[11px] font-medium text-muted-foreground uppercase tracking-wide",children:[s.jsx("span",{children:"Month"}),s.jsx("span",{className:"text-right",children:"Cost"}),s.jsx("span",{className:"text-right",children:"Calls"})]}),s.jsx("div",{className:"divide-y divide-border",children:C.map(wi)})]}),t[17]=g?.timeseries,t[18]=f?.timeseries,t[19]=n,t[20]=w,t[21]=_,t[22]=b,t[23]=v,t[24]=N}else w=t[20],_=t[21],b=t[22],v=t[23],N=t[24];let P;t[29]!==w||t[30]!==v||t[31]!==N?(P=s.jsxs("div",{className:v,children:[N,w]}),t[29]=w,t[30]=v,t[31]=N,t[32]=P):P=t[32];let y;return t[33]!==_||t[34]!==b||t[35]!==P?(y=s.jsxs("div",{className:_,children:[b,P]}),t[33]=_,t[34]=b,t[35]=P,t[36]=y):y=t[36],y}function wi(t){return s.jsxs("div",{className:"grid grid-cols-3 gap-x-4 py-2 text-xs",children:[s.jsx("span",{className:"text-foreground font-medium",children:t.month}),s.jsx("span",{className:"text-right tabular-nums text-foreground",children:Q(t.cost)}),s.jsx("span",{className:"text-right tabular-nums text-muted-foreground",children:t.calls.toLocaleString()})]},t.month)}function Pi(t){const e=z.c(31),{connectionId:n}=t,{org:l}=oe(),[i,r]=j.useState(!1);let o;e[0]!==n||e[1]!==l.id?(o={connectionId:n,orgId:l.id},e[0]=n,e[1]=l.id,e[2]=o):o=e[2];const a=he(o);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={},e[3]=d):d=e[3];let m;e[4]!==a?(m={client:a,toolName:"GATEWAY_USAGE",toolArguments:d,staleTime:3e4,select:_i},e[4]=a,e[5]=m):m=e[5];const{data:c,isLoading:f}=de(m);if(f){let k;return e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(ae,{className:"h-36 rounded-xl"}),e[6]=k):k=e[6],k}if(!c)return null;const u=c.limit.remaining??0,x=c.limit.total??0,p=c.usage,h=c.billing.mode,g=c.billing.limitPeriod??null,S=c.estimation??null;let w;e[7]!==c.alert?(w=c.alert??{enabled:!1,threshold_usd:10,email:null},e[7]=c.alert,e[8]=w):w=e[8];const _=w,b=c.limit,v=h==="postpaid"&&(x==null||x===0);let N;e[9]!==_||e[10]!==u||e[11]!==h||e[12]!==n||e[13]!==S||e[14]!==b||e[15]!==g||e[16]!==x||e[17]!==p?(N=h==="postpaid"?s.jsx(ri,{usage:p,limit:b,limitPeriod:g,onConfigureLimit:()=>r(!0),connectionId:n,alert:_}):s.jsx(ii,{available:u,total:x,estimation:S,onAddCredit:()=>r(!0),connectionId:n,alert:_}),e[9]=_,e[10]=u,e[11]=h,e[12]=n,e[13]=S,e[14]=b,e[15]=g,e[16]=x,e[17]=p,e[18]=N):N=e[18];let P;e[19]!==v?(P=v&&s.jsx(pi,{}),e[19]=v,e[20]=P):P=e[20];let y;e[21]!==h||e[22]!==n||e[23]!==i||e[24]!==g||e[25]!==x?(y=s.jsx(ni,{open:i,onOpenChange:r,connectionId:n,currentLimitUsd:x,billingMode:h,currentLimitPeriod:g}),e[21]=h,e[22]=n,e[23]=i,e[24]=g,e[25]=x,e[26]=y):y=e[26];let C;return e[27]!==N||e[28]!==P||e[29]!==y?(C=s.jsxs(s.Fragment,{children:[N,P,y]}),e[27]=N,e[28]=P,e[29]=y,e[30]=C):C=e[30],C}function _i(t){return t.structuredContent}function ki(t){const e=z.c(11),{gatewayConnectionId:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Billing"}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(vl,{variant:"underline",children:[s.jsx(tt,{value:"summary",variant:"underline",children:"Summary"}),s.jsx(tt,{value:"breakdown",variant:"underline",children:"Breakdown"}),s.jsx(tt,{value:"history",variant:"underline",children:"History"})]}),e[1]=i):i=e[1];let r;e[2]!==n?(r=n&&s.jsx(Pi,{connectionId:n}),e[2]=n,e[3]=r):r=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(oi,{}),e[4]=o):o=e[4];let a;e[5]!==r?(a=s.jsxs(st,{value:"summary",className:"flex flex-col gap-4 pt-2",children:[r,o]}),e[5]=r,e[6]=a):a=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(st,{value:"breakdown",className:"pt-2",children:s.jsx(hi,{})}),e[7]=d):d=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(st,{value:"history",className:"pt-2",children:s.jsx(Si,{})}),e[8]=m):m=e[8];let c;return e[9]!==a?(c=s.jsxs(s.Fragment,{children:[l,s.jsxs(yl,{defaultValue:"summary",variant:"underline",children:[i,a,d,m]})]}),e[9]=a,e[10]=c):c=e[10],c}function Ai(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs("div",{children:[s.jsx(ae,{className:"h-5 w-32"}),s.jsx(ae,{className:"h-4 w-64 mt-1.5"})]}),s.jsx(ae,{className:"h-28 rounded-xl"}),s.jsx(ae,{className:"h-[260px] rounded-lg"})]}),t[0]=e):e=t[0],e}function Ii(){const t=z.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Billing"}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center size-10 rounded-full bg-muted",children:s.jsx(ft,{size:20,className:"text-muted-foreground"})}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col gap-6",children:[e,s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 rounded-lg border border-dashed border-border",children:[n,s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-[300px]",children:"Unable to load billing data. Please try again later."})]})]})]}),t[2]=l):l=t[2],l}class Ei extends j.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?s.jsx(Ii,{}):this.props.children}}function Oi(){const t=z.c(4),e=ls();let n;t[0]!==e?(n=e.find(Di),t[0]=e,t[1]=n):n=t[1];const i=n?.id??null;let r;return t[2]!==i?(r=s.jsx(ki,{gatewayConnectionId:i}),t[2]=i,t[3]=r):r=t[3],r}function Di(t){return Nl(t.connection_url)}function Ti(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-6",children:s.jsx(Ei,{children:s.jsx(j.Suspense,{fallback:s.jsx(Ai,{}),children:s.jsx(Oi,{})})})}),t[0]=e):e=t[0],e}function Ts(){const t=z.c(3);let e,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ae,{className:"h-6 w-48"}),n=s.jsx(ae,{className:"h-4 w-80"}),t[0]=e,t[1]=n):(e=t[0],n=t[1]);let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[e,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(ae,{className:"h-12 w-full"}),s.jsx(ae,{className:"h-12 w-full"})]})]}),t[2]=l):l=t[2],l}function Rt(t){const e=z.c(14),{projectSlug:n,children:l}=t,{org:i}=oe(),{data:r,isLoading:o}=qt(i.id,n);if(o||!r){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ts,{}),e[0]=f):f=e[0],f}const a=n===pe;let d;e[1]!==r.description||e[2]!==r.enabledPlugins||e[3]!==r.id||e[4]!==r.name||e[5]!==r.organizationId||e[6]!==r.slug||e[7]!==r.ui||e[8]!==a?(d={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:a},e[1]=r.description,e[2]=r.enabledPlugins,e[3]=r.id,e[4]=r.name,e[5]=r.organizationId,e[6]=r.slug,e[7]=r.ui,e[8]=a,e[9]=d):d=e[9];const m=d;let c;return e[10]!==l||e[11]!==m||e[12]!==i?(c=s.jsx(Kt,{org:i,project:m,children:l}),e[10]=l,e[11]=m,e[12]=i,e[13]=c):c=e[13],c}function Li(t){const e=z.c(20),{section:n}=t;let l;e[0]!==n?(l=Xt(n),e[0]=n,e[1]=l):l=e[1];const i=l;if(i){let r;e[2]!==i.sub?(r=i.sub==="general"&&s.jsx(Fl,{}),e[2]=i.sub,e[3]=r):r=e[3];let o;e[4]!==i.sub?(o=i.sub==="plugins"&&s.jsx(Ot,{}),e[4]=i.sub,e[5]=o):o=e[5];let a;e[6]!==i.sub?(a=i.sub==="danger"&&s.jsx(Hl,{}),e[6]=i.sub,e[7]=a):a=e[7];let d;return e[8]!==i.slug||e[9]!==r||e[10]!==o||e[11]!==a?(d=s.jsxs(Rt,{projectSlug:i.slug,children:[r,o,a]}),e[8]=i.slug,e[9]=r,e[10]=o,e[11]=a,e[12]=d):d=e[12],d}switch(n){case"account.profile":{let r;return e[13]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(kl,{}),e[13]=r):r=e[13],r}case"account.preferences":{let r;return e[14]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(At,{}),e[14]=r):r=e[14],r}case"account.experimental":{let r;return e[15]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Dl,{}),e[15]=r):r=e[15],r}case"org.general":{let r;return e[16]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx($l,{}),e[16]=r):r=e[16],r}case"org.plugins":{let r;return e[17]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Rt,{projectSlug:pe,children:s.jsx(Ot,{})}),e[17]=r):r=e[17],r}case"org.billing":{let r;return e[18]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ti,{}),e[18]=r):r=e[18],r}default:{let r;return e[19]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(At,{}),e[19]=r):r=e[19],r}}}function zi(){const t=z.c(23),{isOpen:e,activeSection:n,open:l,close:i}=Vs();let r;t[0]!==i?(r=g=>!g&&i(),t[0]=i,t[1]=r):r=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),t[2]=o):o=t[2];let a;t[3]!==n||t[4]!==l?(a=s.jsx(j.Suspense,{fallback:o,children:s.jsx(_l,{activeSection:n,onNavigate:l})}),t[3]=n,t[4]=l,t[5]=a):a=t[5];let d,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Qt,{size:16}),m=s.jsx("span",{className:"sr-only",children:"Close"}),t[6]=d,t[7]=m):(d=t[6],m=t[7]);let c;t[8]!==i?(c=s.jsxs("button",{type:"button",onClick:i,className:"absolute top-4 right-4 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[d,m]}),t[8]=i,t[9]=c):c=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ts,{}),t[10]=f):f=t[10];let u;t[11]!==n?(u=s.jsx(j.Suspense,{fallback:f,children:s.jsx(Li,{section:n})}),t[11]=n,t[12]=u):u=t[12];let x;t[13]!==c||t[14]!==u?(x=s.jsxs("div",{className:"flex-1 overflow-y-auto p-8 min-w-0 relative",children:[c,u]}),t[13]=c,t[14]=u,t[15]=x):x=t[15];let p;t[16]!==a||t[17]!==x?(p=s.jsx(Yt,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[a,x]})}),t[16]=a,t[17]=x,t[18]=p):p=t[18];let h;return t[19]!==e||t[20]!==r||t[21]!==p?(h=s.jsx(Ht,{open:e,onOpenChange:r,children:p}),t[19]=e,t[20]=r,t[21]=p,t[22]=h):h=t[22],h}function $i(t){const e=z.c(12),{projectSlug:n,orgSlug:l,error:i}=t,r=Ye();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),e[0]=o):o=e[0];let a;e[1]!==n?(a=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),e[1]=n,e[2]=a):a=e[2];let d;e[3]!==i.message?(d=s.jsx("p",{className:"text-sm text-muted-foreground",children:i.message}),e[3]=i.message,e[4]=d):d=e[4];let m;e[5]!==r||e[6]!==l?(m=s.jsx(te,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:l,project:pe}}),children:"Go to organization home"}),e[5]=r,e[6]=l,e[7]=m):m=e[7];let c;return e[8]!==a||e[9]!==d||e[10]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[o,a,d,m]}),e[8]=a,e[9]=d,e[10]=m,e[11]=c):c=e[11],c}function Bi(t){const e=z.c(9),{projectSlug:n,orgSlug:l}=t,i=Ye();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),e[0]=r):r=e[0];let o;e[1]!==n?(o=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i||e[4]!==l?(a=s.jsx(te,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:l,project:pe}}),children:"Go to organization home"}),e[3]=i,e[4]=l,e[5]=a):a=e[5];let d;return e[6]!==o||e[7]!==a?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,o,a]}),e[6]=o,e[7]=a,e[8]=d):d=e[8],d}function Mi(){const t=z.c(23);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Bs(e),{org:l}=oe(),i=n.org,r=n.project,{data:o,isLoading:a,error:d}=qt(l.id,r);if(a){let h;return t[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(it,{}),t[1]=h):h=t[1],h}if(d){let h;return t[2]!==d||t[3]!==i||t[4]!==r?(h=s.jsx($i,{projectSlug:r,orgSlug:i,error:d}),t[2]=d,t[3]=i,t[4]=r,t[5]=h):h=t[5],h}if(!o){let h;return t[6]!==i||t[7]!==r?(h=s.jsx(Bi,{projectSlug:r,orgSlug:i}),t[6]=i,t[7]=r,t[8]=h):h=t[8],h}const m=o.slug===pe;let c;t[9]!==o.description||t[10]!==o.enabledPlugins||t[11]!==o.id||t[12]!==o.name||t[13]!==o.organizationId||t[14]!==o.slug||t[15]!==o.ui||t[16]!==m?(c={id:o.id,organizationId:o.organizationId,slug:o.slug,name:o.name,description:o.description,enabledPlugins:o.enabledPlugins,ui:o.ui,isOrgAdmin:m},t[9]=o.description,t[10]=o.enabledPlugins,t[11]=o.id,t[12]=o.name,t[13]=o.organizationId,t[14]=o.slug,t[15]=o.ui,t[16]=m,t[17]=c):c=t[17];const f=c;let u,x;t[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(j.Suspense,{fallback:s.jsx(it,{}),children:s.jsx(Ms,{})}),x=s.jsx(zi,{}),t[18]=u,t[19]=x):(u=t[18],x=t[19]);let p;return t[20]!==f||t[21]!==l?(p=s.jsxs(Kt,{org:l,project:f,children:[u,x]}),t[20]=f,t[21]=l,t[22]=p):p=t[22],p}function za(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j.Suspense,{fallback:s.jsx(it,{}),children:s.jsx(Mi,{})}),t[0]=e):e=t[0],e}export{za as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b3 as U,c as O,u as H,j as s,aD as G,r as I,b as M,O as V}from"./index-uOrjFt6t.js";import{u as q}from"./use-project-Cr1TKfdV.js";import{P as D}from"./index-CX1TvU3T.js";import{E as R,C as F}from"./collection-search-BAmI-gVt.js";import{A as J}from"./avatar-DjSt5kfT.js";import{c as K,B as T}from"./button-D10odSSz.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{C as W}from"./create-project-dialog-D87AirfP.js";import{B as X,a as Y,b as Z,c as ee}from"./breadcrumb-DmYstfbP.js";import"./useQuery-Vrc6Li_H.js";import"./constants-V7-3C38y.js";import"./use-mobile-DA9mzCuy.js";import"./X-DlPknjOM.js";import"./tooltip-CooOHv4u.js";import"./index-kTXXfvC-.js";import"./Loading01-D2eBBNoh.js";import"./SearchMd-WqvhRztL.js";import"./input-C8Cn3OQt.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./useMutation-BYvhr9Wj.js";import"./dialog-bLBl7se3.js";import"./form-CSWi3me2.js";import"./label-D84F6EwM.js";import"./textarea-CLWsfk4l.js";import"./Check-Dnxirgog.js";import"./ChevronRight-BjXZnVl8.js";const te=U("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);function se(t){const e=O.c(58),{project:l,onSettingsClick:c}=t,{org:r}=H(),d=l.ui?.themeColor??"#60a5fa",b=l.ui?.bannerColor??d,m=l.ui?.banner?`url(${l.ui.banner})`:void 0;let i;e[0]!==b||e[1]!==m?(i={backgroundColor:b,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=b,e[1]=m,e[2]=i):i=e[2];const _=i;let u;e[3]!==r.slug||e[4]!==l.slug?(u={org:r.slug,project:l.slug},e[3]=r.slug,e[4]=l.slug,e[5]=u):u=e[5];let f;e[6]!==c?(f=B=>{B.preventDefault(),B.stopPropagation(),c?.(B)},e[6]=c,e[7]=f):f=e[7];let x,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=K("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors","opacity-0 group-hover:opacity-100"),v=s.jsx(te,{className:"size-3.5 text-white"}),e[8]=x,e[9]=v):(x=e[8],v=e[9]);let g;e[10]!==f?(g=s.jsx("button",{type:"button",onClick:f,className:x,children:v}),e[10]=f,e[11]=g):g=e[11];let p;e[12]!==_||e[13]!==g?(p=s.jsx("div",{className:"h-20 relative",style:_,children:g}),e[12]=_,e[13]=g,e[14]=p):p=e[14];let n;e[15]!==l.name||e[16]!==l.ui||e[17]!==d?(n=l.ui?.icon?s.jsx("img",{src:l.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):s.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:d},children:s.jsx("span",{className:"text-sm font-medium text-white",children:l.name.charAt(0).toUpperCase()})}),e[15]=l.name,e[16]=l.ui,e[17]=d,e[18]=n):n=e[18];let a;e[19]!==l.name?(a=s.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:l.name}),e[19]=l.name,e[20]=a):a=e[20];let h;e[21]!==l.updatedAt?(h=Q(new Date(l.updatedAt),{addSuffix:!0}),e[21]=l.updatedAt,e[22]=h):h=e[22];let j;e[23]!==h?(j=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",h]}),e[23]=h,e[24]=j):j=e[24];let C;e[25]!==a||e[26]!==j?(C=s.jsxs("div",{className:"flex flex-col",children:[a,j]}),e[25]=a,e[26]=j,e[27]=C):C=e[27];let N;e[28]!==n||e[29]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-4",children:[n,C]}),e[28]=n,e[29]=C,e[30]=N):N=e[30];let k;e[31]!==l.boundConnections?(k=l.boundConnections.slice(0,4).map(le),e[31]=l.boundConnections,e[32]=k):k=e[32];let P;e[33]!==l.boundConnections.length?(P=l.boundConnections.length>4&&s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",l.boundConnections.length-4]})}),e[33]=l.boundConnections.length,e[34]=P):P=e[34];let y;e[35]!==k||e[36]!==P?(y=s.jsxs("div",{className:"flex pr-2",children:[k,P]}),e[35]=k,e[36]=P,e[37]=y):y=e[37];const z=r.logo??void 0;let w;e[38]!==r.name||e[39]!==z?(w=s.jsx(J,{url:z,fallback:r.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=r.name,e[39]=z,e[40]=w):w=e[40];let S;e[41]!==r.name?(S=s.jsx("span",{className:"truncate max-w-20",children:r.name}),e[41]=r.name,e[42]=S):S=e[42];let o;e[43]!==w||e[44]!==S?(o=s.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[w,S]}),e[43]=w,e[44]=S,e[45]=o):o=e[45];let L;e[46]!==y||e[47]!==o?(L=s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[y,o]}),e[46]=y,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==N||e[50]!==L?($=s.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[N,L]}),e[49]=N,e[50]=L,e[51]=$):$=e[51];let A;e[52]!==$||e[53]!==p?(A=s.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[p,$]}),e[52]=$,e[53]=p,e[54]=A):A=e[54];let E;return e[55]!==A||e[56]!==u?(E=s.jsx(G,{to:"/$org/$project",params:u,className:"block group",children:A}),e[55]=A,e[56]=u,e[57]=E):E=e[57],E}function le(t){return s.jsx("div",{className:"-mr-2 rounded-md border border-background",children:s.jsx(re,{connection:t})},t.id)}function re(t){const e=O.c(13),{connection:l}=t;if(l.icon){let m;e[0]!==l.icon||e[1]!==l.title?(m=s.jsx("img",{src:l.icon,alt:l.title,className:"size-4 object-cover"}),e[0]=l.icon,e[1]=l.title,e[2]=m):m=e[2];let i;return e[3]!==l.title||e[4]!==m?(i=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:l.title,children:m}),e[3]=l.title,e[4]=m,e[5]=i):i=e[5],i}const c=l.title;let r;e[6]!==l.title?(r=l.title.charAt(0).toUpperCase(),e[6]=l.title,e[7]=r):r=e[7];let d;e[8]!==r?(d=s.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:r}),e[8]=r,e[9]=d):d=e[9];let b;return e[10]!==l.title||e[11]!==d?(b=s.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:c,children:d}),e[10]=l.title,e[11]=d,e[12]=b):b=e[12],b}function De(){const t=O.c(40),{org:e}=H(),{data:l,isLoading:c}=q(e.id),[r,d]=I.useState(""),[b,m]=I.useState(!1),i=M();let _,u,f,x,v,g,p,n,a;if(t[0]!==c||t[1]!==i||t[2]!==e.slug||t[3]!==l||t[4]!==r){const N=l?.filter(ie)?.filter(o=>o.name.toLowerCase().includes(r.toLowerCase())||o.description?.toLowerCase().includes(r.toLowerCase()))??[];let k;t[14]!==i||t[15]!==e.slug?(k=o=>{i({to:"/$org/$project/settings",params:{org:e.slug,project:o}})},t[14]=i,t[15]=e.slug,t[16]=k):k=t[16];const P=k;let y;t[17]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{m(!0)},t[17]=y):y=t[17];const z=y;u=D;let w;t[18]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(D.Header.Left,{children:s.jsx(X,{children:s.jsx(Y,{children:s.jsx(Z,{children:s.jsx(ee,{children:"Projects"})})})})}),t[18]=w):w=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(D.Header,{children:[w,s.jsx(D.Header.Right,{children:s.jsx(T,{onClick:z,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Create new project"})})]}),t[19]=n):n=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=o=>{o.key==="Escape"&&(d(""),o.target.blur())},t[20]=S):S=t[20],t[21]!==r?(a=s.jsx(F,{value:r,onChange:d,placeholder:"Search for a project...",onKeyDown:S}),t[21]=r,t[22]=a):a=t[22],_=D.Content,f="@container",t[23]!==c?(x=c&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(oe)})}),t[23]=c,t[24]=x):x=t[24],v=!c&&N.length===0&&r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects found",description:`No projects match "${r}"`})}),g=!c&&N.length===0&&!r&&s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(R,{title:"No projects yet",description:"Create a project to get started.",actions:s.jsx(T,{onClick:z,children:"Create new project"})})}),p=!c&&N.length>0&&s.jsx("div",{className:"p-5",children:s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:N.map(o=>s.jsx(se,{project:o,onSettingsClick:()=>P(o.slug)},o.id))})}),t[0]=c,t[1]=i,t[2]=e.slug,t[3]=l,t[4]=r,t[5]=_,t[6]=u,t[7]=f,t[8]=x,t[9]=v,t[10]=g,t[11]=p,t[12]=n,t[13]=a}else _=t[5],u=t[6],f=t[7],x=t[8],v=t[9],g=t[10],p=t[11],n=t[12],a=t[13];let h;t[25]!==_||t[26]!==f||t[27]!==x||t[28]!==v||t[29]!==g||t[30]!==p?(h=s.jsxs(_,{className:f,children:[x,v,g,p]}),t[25]=_,t[26]=f,t[27]=x,t[28]=v,t[29]=g,t[30]=p,t[31]=h):h=t[31];let j;t[32]!==b?(j=s.jsx(W,{open:b,onOpenChange:m}),t[32]=b,t[33]=j):j=t[33];let C;return t[34]!==u||t[35]!==n||t[36]!==a||t[37]!==h||t[38]!==j?(C=s.jsxs(u,{children:[n,a,h,j]}),t[34]=u,t[35]=n,t[36]=a,t[37]=h,t[38]=j,t[39]=C):C=t[39],C}function oe(t,e){return s.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ie(t){return t.slug!==V}export{De as default};
|