decocms 4.588.0 → 4.589.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C1wYCQKa.js → AlertCircle-k-5O6cw_.js} +1 -1
- package/dist/client/assets/{AreaChart-C3h8TZP_.js → AreaChart-BbBmBhmZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DEUSL-Af.js → ArrowLeft-ClkcoIX4.js} +1 -1
- package/dist/client/assets/{ArrowRight-BUikeU5m.js → ArrowRight-D62IR3mi.js} +1 -1
- package/dist/client/assets/{ArrowUp-Jo2NpxcZ.js → ArrowUp-DwmUsoz4.js} +1 -1
- package/dist/client/assets/{BookOpen01-jt4iWUAm.js → BookOpen01-BtddYmqo.js} +1 -1
- package/dist/client/assets/{CartesianChart-SSdc9b7u.js → CartesianChart-6ds2d44w.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DILdewcR.js → CategoricalChart-B61TvcyO.js} +1 -1
- package/dist/client/assets/{CheckCircle-DTkHxClo.js → CheckCircle-Cp5xjlw-.js} +1 -1
- package/dist/client/assets/{ChevronDown-C3dAg-jK.js → ChevronDown-CM9Urfsd.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CB9nodBH.js → ChevronSelectorVertical-r9NWov70.js} +1 -1
- package/dist/client/assets/{ChevronUp-IRWvN0bs.js → ChevronUp--3SHAUXV.js} +1 -1
- package/dist/client/assets/{CreditCard01-D2z7eRwD.js → CreditCard01-DVqX0918.js} +1 -1
- package/dist/client/assets/{Eye-BaoSWdOQ.js → Eye-BoqAJmT6.js} +1 -1
- package/dist/client/assets/{File02-DshxjDyQ.js → File02-Dh6SOo4d.js} +1 -1
- package/dist/client/assets/{Fingerprint04-BGa9q7Wg.js → Fingerprint04-YAruy68-.js} +1 -1
- package/dist/client/assets/{Globe04-CmPStKLT.js → Globe04-DYHS72xm.js} +1 -1
- package/dist/client/assets/{Image01-BZ44Kx4X.js → Image01-RSPET2Po.js} +1 -1
- package/dist/client/assets/{Key01-CF-3Aw3z.js → Key01-L7povfCu.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CMVOW-pP.js → LayoutLeft-CUvx-Pvw.js} +1 -1
- package/dist/client/assets/{LinkBroken01-D8a_i2U7.js → LinkBroken01-JVhKBnEM.js} +1 -1
- package/dist/client/assets/{MessageCircle01-DW4_PNZG.js → MessageCircle01-gn4vp2uo.js} +1 -1
- package/dist/client/assets/{Minus-CMO3YoJU.js → Minus-DN5eCgUQ.js} +1 -1
- package/dist/client/assets/{Monitor01-Dung5Edg.js → Monitor01-D0Bxj-fe.js} +1 -1
- package/dist/client/assets/{Play-fuDOU8F1.js → Play-7916CrEc.js} +1 -1
- package/dist/client/assets/{Plus-C3lymMZB.js → Plus-DA5fCRCT.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CRzzoVuF.js → ReferenceLine-BiUIpSso.js} +1 -1
- package/dist/client/assets/{SearchMd-DPVHlHgz.js → SearchMd-BPdzWKZu.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Dfd5AB1h.js → ShoppingBag01-BhOTMWsh.js} +1 -1
- package/dist/client/assets/{Sun-vCtd1mVC.js → Sun-CcLmZkDa.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BMEV6poX.js → SwitchHorizontal01-KL7mZ6la.js} +1 -1
- package/dist/client/assets/{Tool01-BaohEBY5.js → Tool01-x-P519mQ.js} +1 -1
- package/dist/client/assets/{Tooltip-pQTo2VHk.js → Tooltip-Djlyj-LN.js} +1 -1
- package/dist/client/assets/{Trash01-MjAw8x8_.js → Trash01-q67Vms6R.js} +1 -1
- package/dist/client/assets/{TrendUp01-D0RC9MvR.js → TrendUp01-CXnsnsUU.js} +1 -1
- package/dist/client/assets/{Upload01-CutujZKW.js → Upload01-BUC8UUt4.js} +1 -1
- package/dist/client/assets/{UserCheck01-DONIYjNn.js → UserCheck01-BxAZblZb.js} +1 -1
- package/dist/client/assets/{UserSquare-C5Py9azN.js → UserSquare-2uLtK5zL.js} +1 -1
- package/dist/client/assets/{Users01-CVAHFiWF.js → Users01-GuAUZTSm.js} +1 -1
- package/dist/client/assets/{XClose-CBLfa9LU.js → XClose-BKbw2IM5.js} +1 -1
- package/dist/client/assets/{Zap-Bbh4tQj9.js → Zap-iZQqC26K.js} +1 -1
- package/dist/client/assets/{access-gate-F2_vRjBo.js → access-gate-DNdYk1Lk.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CEf8POA5.js → add-connection-dialog-BgsYTqB2.js} +1 -1
- package/dist/client/assets/agent-app-Rg0Tr0ya.js +1 -0
- package/dist/client/assets/{agent-assets-C4p3mh9v.js → agent-assets-BlAA6Ea3.js} +1 -1
- package/dist/client/assets/{agent-automation-B-alPZig.js → agent-automation-WLxLTpF2.js} +1 -1
- package/dist/client/assets/{agent-automations-Chqq-WzT.js → agent-automations-Q5qlgn-x.js} +1 -1
- package/dist/client/assets/{agent-blog-B5G4UDbb.js → agent-blog-DlTYvL9l.js} +2 -2
- package/dist/client/assets/{agent-blog-post-BMavHtcz.js → agent-blog-post-CYSXcL8b.js} +2 -2
- package/dist/client/assets/{agent-calendar-DUZ2YgMA.js → agent-calendar-CmW3YOqH.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DpyBBkqG.js → agent-capabilities-B_vVx4Z2.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CEulgWSr.js → agent-connect-sources-CMaIt_p4.js} +1 -1
- package/dist/client/assets/agent-deck-DaxKom9K.js +1 -0
- package/dist/client/assets/{agent-e2e-C0hB2gkn.js → agent-e2e-D9ABwflY.js} +1 -1
- package/dist/client/assets/agent-experiments-gALcE-F4.js +1 -0
- package/dist/client/assets/agent-file-DY1lwsgY.js +1 -0
- package/dist/client/assets/agent-hosting-D1Xn3qWe.js +1 -0
- package/dist/client/assets/{agent-icon-5JzmaVYR.js → agent-icon-1xBXRQD0.js} +1 -1
- package/dist/client/assets/agent-library-CPa8urhx.js +1 -0
- package/dist/client/assets/agent-library-file-CnGwYE2k.js +1 -0
- package/dist/client/assets/agent-overview-el3kyIBv.js +1 -0
- package/dist/client/assets/{agent-releases-DWG6mKzV.js → agent-releases-CvessDoS.js} +1 -1
- package/dist/client/assets/agent-settings-CQn5vagF.js +1 -0
- package/dist/client/assets/{agent-site-editor-D81iOOrK.js → agent-site-editor-DaA9FbZT.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DT9ycvyN.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BDuFxBcC.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-IKIhLz0T.js +1 -0
- package/dist/client/assets/agent-view-BhxK3cU9.js +1 -0
- package/dist/client/assets/{agent-view-guard-DAdKCfAN.js → agent-view-guard-DtzAtZkl.js} +1 -1
- package/dist/client/assets/{ai-providers-KhmTNYUz.js → ai-providers-D_nS8tyt.js} +1 -1
- package/dist/client/assets/{alert-QrjSAWqk.js → alert-BKTlpEuH.js} +1 -1
- package/dist/client/assets/{analytics-sections-DurS5EH1.js → analytics-sections-CHwF2OJ5.js} +1 -1
- package/dist/client/assets/api-keys-Cv0oZpoT.js +1 -0
- package/dist/client/assets/{api-keys-B1DZmqMX.js → api-keys-nye037OF.js} +1 -1
- package/dist/client/assets/{app-editor-uVK7ylku.js → app-editor-DIR7u1uj.js} +1 -1
- package/dist/client/assets/{asset-utils-825nLVjJ.js → asset-utils-EHKoLUwI.js} +1 -1
- package/dist/client/assets/{auth-catchall-BrkA-LCc.js → auth-catchall-B1hTDp3D.js} +1 -1
- package/dist/client/assets/{auth-entry-BidOhb4X.js → auth-entry-C9-pIDNg.js} +1 -1
- package/dist/client/assets/{auth-BRTdapwq.js → auth-n3l0CNa5.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C2t-6xgT.js → auth-split-layout-BDghObzj.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-vpbKGKXJ.js → authenticate-and-persist-oauth-wfBLEPa1.js} +1 -1
- package/dist/client/assets/{automation-list-row-ChRDJi0R.js → automation-list-row-BaFEU26i.js} +1 -1
- package/dist/client/assets/{automation-runs-Bc-nt7MS.js → automation-runs-R-XY-5Gf.js} +1 -1
- package/dist/client/assets/{automations-jahqUSIW.js → automations-DA4CRapY.js} +1 -1
- package/dist/client/assets/{badge-BwAJrSlX.js → badge-qzONP_je.js} +1 -1
- package/dist/client/assets/{block-document-BmzbjSg6.js → block-document-3MwcWTqG.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-nQk3E9EB.js → blocks-preview-workspace-context-Cx1-vnp6.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BXskNszC.js → blocks-tab-states-BzmLdpJn.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DFuIgia2.js → blog-preview-url--XUf7gOW.js} +1 -1
- package/dist/client/assets/{blog-schema-BAh2Vnnk.js → blog-schema-nE0twzgM.js} +1 -1
- package/dist/client/assets/{blog-source-gate-D0HidE-Q.js → blog-source-gate-DqoOOI_M.js} +1 -1
- package/dist/client/assets/{blog-view-gate-BaSrJ8QS.js → blog-view-gate-BJcOSjYL.js} +1 -1
- package/dist/client/assets/{buckets-0WEqj_m-.js → buckets-uZt9g5Bq.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BjFSDm_b.js → build-improve-prompt-doc-CgWoBsJ9.js} +1 -1
- package/dist/client/assets/{calendar-BNov9885.js → calendar-Dpmy4fF4.js} +1 -1
- package/dist/client/assets/{capability-load-error-GmWFwhZ1.js → capability-load-error-Cdh5jEwj.js} +1 -1
- package/dist/client/assets/{category-editor-Cckb8Mrk.js → category-editor-Dwd3B69y.js} +1 -1
- package/dist/client/assets/{category-tree-DEkrvAfa.js → category-tree-BhvPvvoc.js} +1 -1
- package/dist/client/assets/{chart-CbO0Nof5.js → chart-DrWDD8lq.js} +1 -1
- package/dist/client/assets/{chat-context-vliaa5pP.js → chat-context-SiB3iaPb.js} +1 -1
- package/dist/client/assets/{chat-draft-mvxcgHO3.js → chat-draft-DZb5RXeg.js} +1 -1
- package/dist/client/assets/{checkbox-RrvLpN6t.js → checkbox-2zvTb6ww.js} +1 -1
- package/dist/client/assets/{choose-editor-DgyXHwhL.js → choose-editor-CNWQv99A.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D-7dwqtb.js → cli-auth-success-BLj0fm2s.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-BZw_hCEp.js → cms-settings-editor-C5EiL7JE.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-feX6WMqS.js → cms-store-drafts-OgnJq3xE.js} +1 -1
- package/dist/client/assets/{collapsible-DOhPo0qw.js → collapsible-CGEFlpDq.js} +1 -1
- package/dist/client/assets/{collection-detail-U2lvzfax.js → collection-detail-PIXIFFSE.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bg2ZHQuH.js → collection-display-button-B1Sy-opz.js} +1 -1
- package/dist/client/assets/{collection-search-BHIo_ddJ.js → collection-search-OTIoM0sQ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dh-qaQL7.js → collection-table-wrapper-AbpEjmrL.js} +1 -1
- package/dist/client/assets/{collection-tabs-DvlmC9nK.js → collection-tabs-CeLcBMHA.js} +1 -1
- package/dist/client/assets/{combobox-o_zHZ5Hd.js → combobox-Cb2ClVLj.js} +1 -1
- package/dist/client/assets/{command-CHrpJLNU.js → command-n87yBV6H.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BdzKPAYx.js → companion-mcps-section-DNJp1Z4x.js} +1 -1
- package/dist/client/assets/{config-BwHTrULW.js → config-3CnG3YfD.js} +1 -1
- package/dist/client/assets/{connect-DQEH2Vf5.js → connect-B3H39Rc5.js} +1 -1
- package/dist/client/assets/{connect-key-A9QqGqZa.js → connect-key-CK5GMVlb.js} +1 -1
- package/dist/client/assets/{connect-layout-ClGjgY5-.js → connect-layout-BlNkHf40.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-yUtziEP8.js → connect-source-dialog-B5QdFSKj.js} +1 -1
- package/dist/client/assets/{connection-BL1DZL8y.js → connection-D7qO0DS_.js} +1 -1
- package/dist/client/assets/{connection-card-VJNv_08i.js → connection-card-DLq506jh.js} +1 -1
- package/dist/client/assets/{connection-detail-CMOLspZS.js → connection-detail-Cb8cn8w5.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-xFANUQG-.js → connection-form-helpers-DgyNgCMk.js} +1 -1
- package/dist/client/assets/{connection-slug-DOcsu9cs.js → connection-slug-Cz4zCQv8.js} +1 -1
- package/dist/client/assets/{connections-DmH0uTXa.js → connections-D91ZFGMn.js} +1 -1
- package/dist/client/assets/{content-tab-BILh41Zh.js → content-tab-BxFhj1WZ.js} +3 -3
- package/dist/client/assets/{context-B0d3qhRS.js → context-CajYEf8N.js} +1 -1
- package/dist/client/assets/{context-menu-ClTHN8tv.js → context-menu-h7MPYNV3.js} +1 -1
- package/dist/client/assets/{context-shell-C26mXJ9s.js → context-shell-DflkpwUC.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-BnLyW5eI.js → create-organization-dialog-Dhpldq4f.js} +1 -1
- package/dist/client/assets/{daily-pulse-CyPDL3Xo.js → daily-pulse-nXUPyJMF.js} +1 -1
- package/dist/client/assets/{delete-copy-INY8zmf2.js → delete-copy-We0skK0X.js} +1 -1
- package/dist/client/assets/{device-hint-DVfZ_0ay.js → device-hint-DOcsqBNG.js} +1 -1
- package/dist/client/assets/{discover-vL02cgFS.js → discover-sj6esNit.js} +1 -1
- package/dist/client/assets/{domain-settings-DCZLjNML.js → domain-settings-DxSVKJuS.js} +1 -1
- package/dist/client/assets/{drawer-D7zKYyPf.js → drawer-CHLTZ7IE.js} +1 -1
- package/dist/client/assets/{editor-DvSx5Pu1.js → editor-BSfFsGxN.js} +1 -1
- package/dist/client/assets/{editor-classes-Dgo6OXKT.js → editor-classes-BFc0AEgj.js} +1 -1
- package/dist/client/assets/{empty-message-DG0eX7g2.js → empty-message-BCpAqPWS.js} +1 -1
- package/dist/client/assets/{empty-state-D6eiyQO3.js → empty-state-B8oDHUMl.js} +1 -1
- package/dist/client/assets/{empty-state-OU8KvAyP.js → empty-state-XftlsSWz.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-Cu58qs-W.js → experiments-tab-choice-Dm_h0xkr.js} +1 -1
- package/dist/client/assets/{extract-connection-data-LbbeCt5n.js → extract-connection-data-DlPXjE5Z.js} +1 -1
- package/dist/client/assets/{feature-gate-Cihbzh6p.js → feature-gate-Dz2idXk1.js} +1 -1
- package/dist/client/assets/{feature-paywall-DkZBN3Gg.js → feature-paywall-QNpgcQyq.js} +1 -1
- package/dist/client/assets/{file-explorer-DIMg-Uuu.js → file-explorer-SBkm6OaE.js} +1 -1
- package/dist/client/assets/{file-preview-D9H8g_kY.js → file-preview-e5Po0Lnn.js} +1 -1
- package/dist/client/assets/{file-share-button-IjxnV1xT.js → file-share-button-DLIUfXlB.js} +1 -1
- package/dist/client/assets/{file-type-icon-CMHqTGj6.js → file-type-icon-DHed-Vbt.js} +1 -1
- package/dist/client/assets/{folder-icon-JUDhfdHu.js → folder-icon-BmyxaPeT.js} +1 -1
- package/dist/client/assets/{form-D8xpAXPl.js → form-tdA5bJ97.js} +1 -1
- package/dist/client/assets/{frame-navigation-BuZ_tyOH.js → frame-navigation-DJad9YsZ.js} +1 -1
- package/dist/client/assets/{gateway-client-Db0L5juP.js → gateway-client-MCgSJtiT.js} +1 -1
- package/dist/client/assets/{general-Cnhq5GeD.js → general-Dq2SfvLf.js} +1 -1
- package/dist/client/assets/{github-icon-CPMf3VVH.js → github-icon-BSdAKSFL.js} +1 -1
- package/dist/client/assets/{held-block-view-XrVX8KlN.js → held-block-view-DMqKyknK.js} +1 -1
- package/dist/client/assets/{home-Cq8ntqGs.js → home-Dj3ETwz3.js} +1 -1
- package/dist/client/assets/{home-overview-C2PoiE-5.js → home-overview-DxRzuH3P.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DUpne5PJ.js → hosted-reconcile-BP447g5V.js} +1 -1
- package/dist/client/assets/{icon-button-CrEhqBtX.js → icon-button-B1n86T_T.js} +1 -1
- package/dist/client/assets/{index-CQnlHMgr.js → index-8J9eeoYX.js} +1 -1
- package/dist/client/assets/{index-Ci-Dro5W.js → index-B9Qj8_a8.js} +1 -1
- package/dist/client/assets/{index-LejBmCwV.js → index-BpQKQj0d.js} +1 -1
- package/dist/client/assets/index-C7mH2s-5.css +1 -0
- package/dist/client/assets/{index-CfR8ZKTK.js → index-CDbo40Qi.js} +1 -1
- package/dist/client/assets/{index-Ckt4ty8F.js → index-CO8P4I1E.js} +1 -1
- package/dist/client/assets/{index-DUngohuH.js → index-CZRVgAXr.js} +1 -1
- package/dist/client/assets/{index-C5cCiApV.js → index-Cv404MWT.js} +1 -1
- package/dist/client/assets/{index-d-1NIOrr.js → index-D4QMDMQB.js} +1 -1
- package/dist/client/assets/{index-C8WQbHaK.js → index-DBEc0hp1.js} +1 -1
- package/dist/client/assets/{index-CVMunsMY.js → index-DYBVGhf3.js} +1 -1
- package/dist/client/assets/{index-bIDLYWvU.js → index-DdcMEgo_.js} +1 -1
- package/dist/client/assets/{index-AkLJHs7z.js → index-DeDZf8GV.js} +1 -1
- package/dist/client/assets/{index-DGzB6c1q.js → index-DxMUaH8f.js} +1 -1
- package/dist/client/assets/{index-CcDr-Y8X.js → index-Gg8ZNrTJ.js} +1 -1
- package/dist/client/assets/{index-DT1tUC0k.js → index-I4vIjLyL.js} +1 -1
- package/dist/client/assets/{index-D2i_pYwo.js → index-_v_cX_Uz.js} +5 -5
- package/dist/client/assets/{index-redirect-8Emt1n6E.js → index-redirect-CbBr1BrP.js} +1 -1
- package/dist/client/assets/{index-CQd-rPe6.js → index-zfbeX5vo.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-QvmxM8yp.js → infiniteQueryObserver-BjuIdZaK.js} +1 -1
- package/dist/client/assets/{infra-billing-BLl7l-l7.js → infra-billing-BggUjndl.js} +1 -1
- package/dist/client/assets/{input-9ttBVl4l.js → input-DVGC51NU.js} +3 -3
- package/dist/client/assets/{input-BGyzWk1_.js → input-rwnUX4xK.js} +1 -1
- package/dist/client/assets/{integration-icon-B4igOrSf.js → integration-icon-DMudGnaH.js} +1 -1
- package/dist/client/assets/{item-actions-Aez4-bmr.js → item-actions-CXcqqG2O.js} +1 -1
- package/dist/client/assets/{jira-icon-CJY-Jk0X.js → jira-icon-Cs0wA4Aj.js} +1 -1
- package/dist/client/assets/{label-j3g0RaM0.js → label-BPobXy5D.js} +1 -1
- package/dist/client/assets/{layout-Bteopugj.js → layout-Haof-3fN.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-BjDc0ZvZ.js → legacy-admin-welcome-dialog-DR6IgoHi.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CcPTDmo1.js → legacy-agents-deep-BhViZxi4.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Bn3YHqi3.js → legacy-main-redirect-BRcPtkE0.js} +1 -1
- package/dist/client/assets/library-CB2VVs8O.js +1 -0
- package/dist/client/assets/{library-tab-D4FhyiPJ.js → library-tab-BXZW9Gf-.js} +1 -1
- package/dist/client/assets/{login-BR1es8iK.js → login-DEJdToWz.js} +1 -1
- package/dist/client/assets/{markdown-B2A6HPlV.js → markdown-6Y7kRU0S.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BhS5jb3I.js → mcp-app-renderer-DRWpmXqd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DQcSxcPM.js → mcp-oauth-CuTkV8Yh.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D57QGwp7.js → mcp-oauth-dNTY3RLT.js} +1 -1
- package/dist/client/assets/{members-BP_PJyGQ.js → members-r4o9r9rq.js} +1 -1
- package/dist/client/assets/{memory-KT_xdhqd.js → memory-DJveej8e.js} +1 -1
- package/dist/client/assets/{mock-board-CHe3YZI3.js → mock-board-BfAvxuuB.js} +3 -3
- package/dist/client/assets/{monaco-editor-CrquiBr7.js → monaco-editor-DVnCrHXl.js} +1 -1
- package/dist/client/assets/{monitoring-hLDyFJ8K.js → monitoring-N4CPm7XC.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-33Fzla51.js → monitoring-stats-row--t2gmwDv.js} +1 -1
- package/dist/client/assets/{multi-select-DXg_pHVL.js → multi-select-C4pEiex-.js} +1 -1
- package/dist/client/assets/{mustache-CC6Wqc9K.js → mustache-BJxqarwP.js} +1 -1
- package/dist/client/assets/{named-rule-step-D7p6T0__.js → named-rule-step-CeWd1q2n.js} +1 -1
- package/dist/client/assets/{named-rule-view-BreA3OZ7.js → named-rule-view-B-FR02zc.js} +1 -1
- package/dist/client/assets/{new-project-dialog-nFFir7Y8.js → new-project-dialog-BF76iYqU.js} +1 -1
- package/dist/client/assets/{new-project-store-BxAwHXqh.js → new-project-store-DWxCJQOo.js} +1 -1
- package/dist/client/assets/{oauth-callback-BVAtO5LW.js → oauth-callback-DTZ86bL8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-QSarw700.js → oauth-callback-ai-provider-DuXQBSEx.js} +1 -1
- package/dist/client/assets/{oauth-consent-hMmPXM2-.js → oauth-consent-_PYevD-4.js} +1 -1
- package/dist/client/assets/{onboarding-DS38_8rn.js → onboarding-Dv4c0ulx.js} +1 -1
- package/dist/client/assets/{openai-conversation-BvnCXWjG.js → openai-conversation-Ccmhy4PF.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DTSdOM19.js → optimistic-project-sidebar-views-ChxB21rZ.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DcdbMdq0.js → order-monitor-day-Dz2wZyUQ.js} +1 -1
- package/dist/client/assets/{organization-choice-DCKVHxum.js → organization-choice-Doar8yJk.js} +1 -1
- package/dist/client/assets/{orgs-BJ4SWBn6.js → orgs-Du522J0-.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Dm8ExRJP.js → own-accounts-section-Dub3kcxT.js} +1 -1
- package/dist/client/assets/{pair-iesoBa6Z.js → pair-dE3C8WhI.js} +1 -1
- package/dist/client/assets/{parse-sections-CF6CS7KK.js → parse-sections-BNVVULt_.js} +2 -2
- package/dist/client/assets/{plan-DwRLo1eg.js → plan-eTOH4djb.js} +1 -1
- package/dist/client/assets/{plan-ladder-CQx4XohT.js → plan-ladder-CbTEVjlC.js} +1 -1
- package/dist/client/assets/{plan-usage-card-CU1hqhEd.js → plan-usage-card-_Ff0mpr8.js} +1 -1
- package/dist/client/assets/{popover-DuZ7mT05.js → popover-SbxIMG75.js} +1 -1
- package/dist/client/assets/{post-calendar-RMDsvitm.js → post-calendar-B1CybeCu.js} +1 -1
- package/dist/client/assets/{post-editor-C-jlqiqJ.js → post-editor-CNorej-X.js} +1 -1
- package/dist/client/assets/{preview-content-PFfFbaGx.js → preview-content-LyXURvUK.js} +1 -1
- package/dist/client/assets/{preview-dialog-8wU07_1E.js → preview-dialog-bMg2yisv.js} +1 -1
- package/dist/client/assets/{preview-panel-Cf_1fMfg.js → preview-panel-DVadceTQ.js} +1 -1
- package/dist/client/assets/{preview-tab-WVFcvq8E.js → preview-tab-CX_rhPDl.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-BL7cRMZT.js → product-picker-dialog-J_wgt3fp.js} +1 -1
- package/dist/client/assets/{profile-dhTMTrZ6.js → profile-Kt0coOMj.js} +1 -1
- package/dist/client/assets/{project-app-view-BkAw1jQM.js → project-app-view-BJ3tVux4.js} +1 -1
- package/dist/client/assets/{project-apps-Dcsb3Y5u.js → project-apps-Cni0OecT.js} +1 -1
- package/dist/client/assets/{project-icon-BpR6jOBz.js → project-icon-m6Ad1m7q.js} +1 -1
- package/dist/client/assets/{project-index-CYkX_ZtW.js → project-index-C0zTM-WA.js} +1 -1
- package/dist/client/assets/project-reports-DiUu1Qc1.js +1 -0
- package/dist/client/assets/project-tasks-CAdmZlMS.js +1 -0
- package/dist/client/assets/{projects-empty-state-DPbMzC9K.js → projects-empty-state-B91deBQU.js} +1 -1
- package/dist/client/assets/{projects-BgDkjTC0.js → projects-oaHlFO8V.js} +1 -1
- package/dist/client/assets/{prompts-BF9jhmc3.js → prompts-DSIkPLeQ.js} +1 -1
- package/dist/client/assets/record-editor-p_d7oWmO.js +1 -0
- package/dist/client/assets/{redirect-editor-C_o1Hzkh.js → redirect-editor-yx7ByECD.js} +1 -1
- package/dist/client/assets/reports-BEgGXtxt.js +1 -0
- package/dist/client/assets/{reports-B-EM5nUi.js → reports-D7g3Ml1J.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CflNAQAt.js → reports-onboarding-BhNZvfy4.js} +1 -1
- package/dist/client/assets/{reports-tab-C1SqZ4Rt.js → reports-tab-Gh5DaJuQ.js} +2 -2
- package/dist/client/assets/repositories-BRHtIrVz.js +1 -0
- package/dist/client/assets/{repositories-D9sDUGsx.js → repositories-C0KYN8ne.js} +1 -1
- package/dist/client/assets/{repository-binding-BL79LH9r.js → repository-binding-CaMbcDLV.js} +1 -1
- package/dist/client/assets/{repository-picker-DwWCnHQR.js → repository-picker-CtTW0G31.js} +1 -1
- package/dist/client/assets/{require-capability-CxZZXTvb.js → require-capability-CdsgNeD6.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dq35BF2j.js → required-auth-layout-AmJ1uTFt.js} +1 -1
- package/dist/client/assets/{reset-password-B3Qb6JSM.js → reset-password-CtqV555d.js} +1 -1
- package/dist/client/assets/{resizable-BTfXulP-.js → resizable-BVcChq5e.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CXK-D0YH.js → resolve-tab-icon-DERG1JDa.js} +1 -1
- package/dist/client/assets/{review-settings-CaeicWmL.js → review-settings--Kf9eCfs.js} +1 -1
- package/dist/client/assets/{role-color-FAQ1W6m3.js → role-color-OzS56aIA.js} +1 -1
- package/dist/client/assets/{roles-CsIBFwe0.js → roles-5yWWx_DJ.js} +1 -1
- package/dist/client/assets/{route-CgKVW_J3.js → route-9oi0rgOU.js} +1 -1
- package/dist/client/assets/route-CmbvxWwg.js +1 -0
- package/dist/client/assets/{route-BGJSiBve.js → route-CvAef_ho.js} +1 -1
- package/dist/client/assets/{route-page-header-CQ-W3wvh.js → route-page-header-Dwl09nk0.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-OvhDI9kP.js → sandbox-git-api-CUzd7R0k.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Bw4f72DR.js → sandbox-lifecycle-context-Bb3AkWOb.js} +1 -1
- package/dist/client/assets/{save-status-CoI6LGHD.js → save-status-DwZEDw1l.js} +1 -1
- package/dist/client/assets/{schema-e-gzop_8.js → schema-CkOMMSLb.js} +1 -1
- package/dist/client/assets/{schema-CuF9xhNS.js → schema-XQ38kn3Z.js} +1 -1
- package/dist/client/assets/{scroll-area-B87qIVfj.js → scroll-area-CYAgrqag.js} +1 -1
- package/dist/client/assets/{search-input-CAKcgZpp.js → search-input-C650lN1b.js} +1 -1
- package/dist/client/assets/{search-toggle-DF77iWWe.js → search-toggle-C3h6VPGQ.js} +1 -1
- package/dist/client/assets/{secret-picker-BHSnOkWB.js → secret-picker-Dgn1St8u.js} +1 -1
- package/dist/client/assets/{secrets--E376qwC.js → secrets-CHUSJNqz.js} +1 -1
- package/dist/client/assets/{section-array-field-CUW_8y4c.js → section-array-field-DjpdZjjA.js} +1 -1
- package/dist/client/assets/{sections-feeUuJPm.js → sections-RWn2QTBe.js} +1 -1
- package/dist/client/assets/{sections-editor-DDJaWz_Q.js → sections-editor-DtmSAXwn.js} +1 -1
- package/dist/client/assets/{select-BGtnFfIR.js → select-BAD2nCs0.js} +1 -1
- package/dist/client/assets/{select-model-By0Hx8yC.js → select-model-DuWZC39Y.js} +1 -1
- package/dist/client/assets/{seo-editor-DAf5w2Jb.js → seo-editor-DQ-gjrg1.js} +1 -1
- package/dist/client/assets/{separator-ltSGXEwz.js → separator-DxL8DcTB.js} +1 -1
- package/dist/client/assets/{session-runtime-DIqtTbVV.js → session-runtime-CoMtO0vP.js} +1 -1
- package/dist/client/assets/settings-tab-XKL-PXfE.js +1 -0
- package/dist/client/assets/{sheet-Dl5xK2Nn.js → sheet-BSNpAEVQ.js} +1 -1
- package/dist/client/assets/{shell-layout-DcGcftXj.js → shell-layout-C2FEOZHE.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DxRhHgDQ.js → site-draft-actions-DQhEp0pW.js} +1 -1
- package/dist/client/assets/{site-draft-view-CzVerqfB.js → site-draft-view-JFh5CXlv.js} +1 -1
- package/dist/client/assets/site-editor-BCUDTULP.js +1 -0
- package/dist/client/assets/{site-editor-toast-FNFHPia1.js → site-editor-toast-DbjIe6vh.js} +1 -1
- package/dist/client/assets/{skills-xGBAOWNw.js → skills-mk29STuQ.js} +1 -1
- package/dist/client/assets/{slider-BKiITx4Z.js → slider-DMCHPWiy.js} +1 -1
- package/dist/client/assets/{sortable.esm-dy2EHflk.js → sortable.esm-CsjiJtN2.js} +1 -1
- package/dist/client/assets/{sso-5IN_FX7_.js → sso-SIfrP_88.js} +1 -1
- package/dist/client/assets/{suggestion-B5kbVF5_.js → suggestion-CX1YVdIt.js} +1 -1
- package/dist/client/assets/{super-agent-icon-C1_bZlYS.js → super-agent-icon-DCxdIVB-.js} +1 -1
- package/dist/client/assets/{switch-D_6ySlUF.js → switch-BHmpCIVF.js} +1 -1
- package/dist/client/assets/{synced-repos-DDoH-_1E.js → synced-repos-BFxzW6vz.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CGmnKelI.js → tab-icon-glyph-FZMoReXN.js} +1 -1
- package/dist/client/assets/{table-Bfr-vt1m.js → table-DUtLs9KY.js} +1 -1
- package/dist/client/assets/{tabs-BA-4oEsC.js → tabs-ByjyyO35.js} +1 -1
- package/dist/client/assets/{task-board-DHpGQG6h.js → task-board-DFizZUve.js} +1 -1
- package/dist/client/assets/{task-key-Dcb9W2hX.js → task-key-jbMkJ-gq.js} +1 -1
- package/dist/client/assets/{task-route-MJmKHPgU.js → task-route-jGx8dPBi.js} +1 -1
- package/dist/client/assets/{task-status-BQcu0cbl.js → task-status-D6uDrhP9.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CIFEwriO.js → taskboard-analytics-C9Q3oP78.js} +1 -1
- package/dist/client/assets/{tasks-_qxYN3Pl.js → tasks-CQ1Xzkf7.js} +1 -1
- package/dist/client/assets/tasks-CcgLlawT.js +1 -0
- package/dist/client/assets/{textarea-Dr6I78Fc.js → textarea-BG3_jDPK.js} +1 -1
- package/dist/client/assets/{thread-analytics-C6phbawc.js → thread-analytics-PTzxnnwH.js} +1 -1
- package/dist/client/assets/{thread-button-hq5fMUfA.js → thread-button-CSrnO4J2.js} +1 -1
- package/dist/client/assets/{thread-intent-BHTVxi5n.js → thread-intent-AFleKGnm.js} +1 -1
- package/dist/client/assets/{thread-route-Clm7FOVJ.js → thread-route-DgTdTFs-.js} +1 -1
- package/dist/client/assets/{thread-route-o6nGmPof.js → thread-route-XlUtBNme.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CaJzvL1M.js → thread-sheet-body-D9NA2h2p.js} +1 -1
- package/dist/client/assets/{time-range-picker-EbUonLui.js → time-range-picker-COT-3s6C.js} +1 -1
- package/dist/client/assets/{toggle-group-DtkvHfko.js → toggle-group-B5NhEkmw.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BXMUP78p.js → tool-set-selector--vjZ40l5.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-C2P_K8-S.js → toolbar-icon-button-slFtkrIv.js} +1 -1
- package/dist/client/assets/{tooltip-6kGM_eQF.js → tooltip-2yYSYsa-.js} +1 -1
- package/dist/client/assets/{tooltipContext-t19BbNo9.js → tooltipContext-BjkTtu04.js} +1 -1
- package/dist/client/assets/{track-Cg7tJ4yx.js → track-FOISCTZ9.js} +1 -1
- package/dist/client/assets/{types-lFZQt78s.js → types-C-gTijki.js} +1 -1
- package/dist/client/assets/{url-slug-j_pbLoit.js → url-slug-lJqSTlr5.js} +1 -1
- package/dist/client/assets/{usage-stats-DiNUvJki.js → usage-stats-BeZTZSlb.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Si6lZfwd.js → use-ai-providers-DBMFXH54.js} +1 -1
- package/dist/client/assets/{use-api-keys-Ddie7BSj.js → use-api-keys-n29QPUT5.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-B4Z9U8kV.js → use-apply-named-rule-Bodgcm5R.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DMYy6FC9.js +1 -0
- package/dist/client/assets/{use-automations-Bz4iP-ZG.js → use-automations-CxZwTkEF.js} +1 -1
- package/dist/client/assets/{use-autosave-DyMe7ETf.js → use-autosave-BAhs-b8G.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-CSboyg4V.js +1 -0
- package/dist/client/assets/use-blog-view-7SxY0DSD.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CaYnCJg0.js → use-chat-layout-state-BjrxY9zk.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CZJapik6.js → use-cms-publish-actions-BAGkHuFe.js} +1 -1
- package/dist/client/assets/{use-connect-companion-RJrPjuPN.js → use-connect-companion-DdHCkif9.js} +1 -1
- package/dist/client/assets/{use-connection-fTbSHOHv.js → use-connection-DXrrdGow.js} +1 -1
- package/dist/client/assets/{use-content-sync-CeQBqmO0.js → use-content-sync-DZOdB8PF.js} +1 -1
- package/dist/client/assets/{use-copy-DHcPu_e6.js → use-copy-C9KqfKbD.js} +1 -1
- package/dist/client/assets/{use-current-view-DWCNmZ47.js → use-current-view-CTU_KTOZ.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Dkfc7ElU.js → use-date-fns-locale-DL2Sv8WK.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DUVf8Tpe.js → use-debounced-autosave-LqgXHP5M.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Do0xF2Om.js → use-debounced-value-D0-3lKxq.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BMocp54x.js → use-deco-credits-BlcIIio7.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CK4eZo3O.js → use-decopilot-events-ia2U1D-_.js} +1 -1
- package/dist/client/assets/{use-delete-block-DH7xwbF6.js → use-delete-block-4OWBeqRv.js} +1 -1
- package/dist/client/assets/{use-delete-connection-vx3t15Ts.js → use-delete-connection-BhL2muMH.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Bi_4KgF-.js → use-deployment-admin-DMzm770d.js} +1 -1
- package/dist/client/assets/{use-entitlements-Cecn_eMO.js → use-entitlements-C0Jnglmb.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CihDCQDU.js → use-fast-preview-draft-url-BbJh-wFY.js} +1 -1
- package/dist/client/assets/{use-file-configs-D6mTKjkn.js → use-file-configs-Bj7muxL3.js} +1 -1
- package/dist/client/assets/{use-id-selection-CR20LUvb.js → use-id-selection-aBsPLNQg.js} +1 -1
- package/dist/client/assets/{use-in-settings-HuoXuf74.js → use-in-settings-DTiMI92T.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DJQlqP2F.js → use-inbox-feed-ykY7SYoP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-bABoIqF1.js → use-infinite-scroll-C-Jtx_R8.js} +1 -1
- package/dist/client/assets/{use-join-requests-DGYgQnb9.js → use-join-requests-DA8sBvoB.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CufAik2P.js → use-main-panel-tabs-DQP_KfHN.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CZ1ok4EH.js → use-mcp-auth-status-CgYIT7O6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-lA4u3y89.js → use-mcp-client--6E0VdQ1.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BNqxYTfw.js → use-mcp-prompts-DZL7WNWx.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CK9iP7GI.js → use-mcp-tools-DGaS62Fn.js} +1 -1
- package/dist/client/assets/{use-mobile-BG1vBhH-.js → use-mobile-C2Wa6qqh.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CXdSpoYz.js → use-move-blocks-Bg0QqQnT.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BHhJ2VaM.js → use-navigate-to-agent-Blb_gT0Z.js} +1 -1
- package/dist/client/assets/{use-never-published-BrF2X2sL.js → use-never-published-wykmkClz.js} +1 -1
- package/dist/client/assets/{use-org-fs-lYP9x3KC.js → use-org-fs-elhmqDGC.js} +1 -1
- package/dist/client/assets/{use-org-notice-rObp4Zxr.js → use-org-notice-BmGI5AoV.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DI357roP.js → use-org-repo-syncs-Bqe0mTI4.js} +1 -1
- package/dist/client/assets/{use-org-sso-BG-E2bjp.js → use-org-sso-D0oSmb0Y.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CLr8-y2J.js → use-organization-settings-D19qndSA.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-6rjdBG7q.js → use-panel-navigate-BUxvnLXh.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CpzVrHnY.js → use-project-native-view-presence-D6vX4rCD.js} +1 -1
- package/dist/client/assets/{use-project-scope-esRFkQO3.js → use-project-scope-BW5vvzIR.js} +1 -1
- package/dist/client/assets/{use-recent-apps-D-8z9Gvt.js → use-recent-apps-qt6-6ySx.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CUm9A6zF.js → use-reports-diagnostic-yo9M4TG9.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DHMWW7Ku.js → use-sandbox-events-xbG28nOp.js} +1 -1
- package/dist/client/assets/{use-secrets-DVt0aH4I.js → use-secrets-D1HWpuW_.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-D-e02r7C.js → use-section-preview-base-DXkAoW7H.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CzvwMLEA.js → use-sidebar-collapsed-L0ea2Q3b.js} +1 -1
- package/dist/client/assets/{use-tags-HZCihpNX.js → use-tags-B46ACyo8.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BD5xUav-.js → use-task-board-analytics-Q8JP9hY1.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Btgs_9xn.js → use-task-board-item-prs-DD-h7mMH.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CzS8qL54.js → use-task-board-items-DJs5p39s.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-mJVl9kUl.js → use-task-board-prompts-DhN9b-Ei.js} +1 -1
- package/dist/client/assets/{use-task-metadata-gC9Senyq.js → use-task-metadata-wSSRfe9l.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-3bGjHXvS.js → use-thread-outputs-BXUBmrcQ.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-DAOleCsb.js → use-view-draft-kind-Dog_0xGP.js} +1 -1
- package/dist/client/assets/{use-voice-input-CcsxQA_e.js → use-voice-input-Cml6WhPe.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D0bLDkrM.js +1 -0
- package/dist/client/assets/{useQueries-BBu6I0JI.js → useQueries-BuIHgxFS.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DUNAnJxH.js +1 -0
- package/dist/client/assets/{users-XTWGlVoa.js → users-BBlUm9BI.js} +1 -1
- package/dist/client/assets/{utils-BglHo0I_.js → utils-ZT3Tr9FQ.js} +1 -1
- package/dist/client/assets/{variant-calendar-BAvUJsZd.js → variant-calendar-BJi5SDmS.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-3kKJHYgn.js → variant-matcher-override-DPAlBy59.js} +1 -1
- package/dist/client/assets/{view-header-BfK0AGWA.js → view-header-D_AYsQS1.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BIgZunK3.js → virtual-mcp-C1YM4Fvh.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-xQMj7Q2K.js → watch-sse-pool-C3KG4d2d.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Cs5Ci1wj.js +0 -1
- package/dist/client/assets/agent-deck-BUAWj83N.js +0 -1
- package/dist/client/assets/agent-experiments-BSfxOwrU.js +0 -1
- package/dist/client/assets/agent-file-CNGT6bMD.js +0 -1
- package/dist/client/assets/agent-hosting-BdWaBx2l.js +0 -1
- package/dist/client/assets/agent-library-D3DZF-ue.js +0 -1
- package/dist/client/assets/agent-library-file-CsnfDLau.js +0 -1
- package/dist/client/assets/agent-overview-D4QMyu1i.js +0 -1
- package/dist/client/assets/agent-settings-CjrEznsY.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D1mSd-Cs.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DZO1B689.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-5BA66F6-.js +0 -1
- package/dist/client/assets/agent-view-Dr7QHtfR.js +0 -1
- package/dist/client/assets/api-keys-DNOm7cmQ.js +0 -1
- package/dist/client/assets/index-_-faNWQZ.css +0 -1
- package/dist/client/assets/library-HxNbnHpT.js +0 -1
- package/dist/client/assets/project-reports-D_hcpFbz.js +0 -1
- package/dist/client/assets/project-tasks-CcY4Q3c7.js +0 -1
- package/dist/client/assets/record-editor-DEFLrIEG.js +0 -1
- package/dist/client/assets/reports-CienpUIv.js +0 -1
- package/dist/client/assets/repositories-B1RdVj12.js +0 -1
- package/dist/client/assets/route-CN-Y73to.js +0 -1
- package/dist/client/assets/settings-tab-DI3b3B76.js +0 -1
- package/dist/client/assets/site-editor-CFrxwnKg.js +0 -1
- package/dist/client/assets/tasks-D6zHY8EL.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CkOEfFhD.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BsHc-UJ7.js +0 -1
- package/dist/client/assets/use-blog-view-CUXzG53e.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Bhzp56vf.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DNLHz-yH.js +0 -1
package/dist/client/assets/{add-connection-dialog-CEf8POA5.js → add-connection-dialog-BgsYTqB2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Re,a6 as Xe,a as Ze,a5 as dn,aG as un,aF as pn,j as e,I as Y,B as Q,D as en,v as nn,w as tn,x as on,aU as mn,y as gn,t as X,c as hn,r as ue,at as xn,av as fn,T as jn,K as an,m as vn,h as we,E as A,aY as Ge,q as Cn,d as Dn,go as yn}from"./index-D2i_pYwo.js";import{C as _n}from"./collection-search-BHIo_ddJ.js";import{g as Nn,a as bn,e as wn}from"./extract-connection-data-LbbeCt5n.js";import{u as sn,g as Sn,C as Oe}from"./connection-card-VJNv_08i.js";import{D as kn,a as In,e as Tn,b as An,c as Pn,f as Mn,g as Fn}from"./drawer-D7zKYyPf.js";import{u as Ln}from"./use-mobile-BG1vBhH-.js";import{F as B,b as O,c as E,d as z,f as $,a as Ye}from"./form-D8xpAXPl.js";import{S as Vn,b as Bn,a as On,d as En,c as ge}from"./select-BGtnFfIR.js";import{T as zn}from"./textarea-Dr6I78Fc.js";import{a as cn}from"./use-connection-fTbSHOHv.js";import{n as Se}from"./LinkBroken01-D8a_i2U7.js";import{a5 as Ee,aK as ze}from"./agent-icon-5JzmaVYR.js";import{c as $n}from"./UserSquare-C5Py9azN.js";import{s as Hn}from"./XClose-CBLfa9LU.js";import{c as Un}from"./schema-e-gzop_8.js";import{i as Ne,a as Qe,E as Kn,p as Rn,b as Xn,c as qn}from"./connection-form-helpers-xFANUQG-.js";import{a as $e}from"./authenticate-and-persist-oauth-vpbKGKXJ.js";import{g as Wn}from"./connection-slug-DOcsu9cs.js";import{C as Gn}from"./collection-tabs-DvlmC9nK.js";import{u as Je}from"./use-infinite-scroll-bABoIqF1.js";import{g as ke,a as Yn}from"./metadata-D72DunRR.js";import{B as be}from"./badge-BwAJrSlX.js";import{c as He,T as Ue,a as Ke}from"./tooltip-6kGM_eQF.js";import{u as Qn}from"./useSuspenseInfiniteQuery-DNLHz-yH.js";import{u as Jn}from"./use-mcp-client-lA4u3y89.js";import{s as Zn}from"./Plus-C3lymMZB.js";function et({open:l,onOpenChange:n,onCreated:J}){const i=Re(),{org:f}=Xe(),{data:h}=Ze.useSession(),{stdioEnabled:H}=dn(),U=Ln(),P=cn(),b=sn("").items,a=un({resolver:pn(Un),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=a.watch("ui_type"),w=a.watch("connection_url"),K=a.watch("npx_package"),r=Ne({uiType:p,connectionUrl:w??"",npxPackage:K??""})??Qe({uiType:p,connectionUrl:w??"",registryItems:b}),j=t=>{const d=t.trim();if(!d)return;const g=!!a.formState.dirtyFields.title,N=!!a.formState.dirtyFields.description,L=!!a.formState.dirtyFields.env_vars,k=c=>{if(c&&(!g&&!a.getValues("title").trim()&&c.title&&a.setValue("title",c.title,{shouldDirty:!1}),!N&&!(a.getValues("description")??"").trim()&&c.description&&a.setValue("description",c.description,{shouldDirty:!1}),!L&&c.envVarKeys?.length)){const y=a.getValues("env_vars")??[],ee=new Set(y.map(m=>m.key)),_=c.envVarKeys.filter(m=>!ee.has(m));_.length>0&&a.setValue("env_vars",[...y,..._.map(m=>({key:m,value:""}))],{shouldDirty:!0})}},s=Rn(d);if(s&&H){a.setValue("ui_type","NPX",{shouldDirty:!0}),a.setValue("npx_package",s.packageName,{shouldDirty:!0}),a.setValue("connection_url","",{shouldDirty:!0}),a.setValue("connection_token",null,{shouldDirty:!0}),k(Ne({uiType:"NPX",npxPackage:s.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const c=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";a.setValue("ui_type",c,{shouldDirty:!0}),a.setValue("connection_url",d,{shouldDirty:!0}),k(Ne({uiType:c,connectionUrl:d})??Qe({uiType:c,connectionUrl:d,registryItems:b}));return}p==="NPX"&&k(Ne({uiType:"NPX",npxPackage:d}))},S=t=>{t||a.reset(),n(t)},Z=async t=>{let d,g=null,N=null,L=null;t.ui_type==="NPX"?(d="STDIO",g="",L=Xn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",g="",L=qn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,g=t.connection_url||"",N=t.connection_token||null);const k=Nn("conn");try{await P.create.mutateAsync({id:k,title:t.title,description:t.description||null,connection_type:d,connection_url:g,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:f.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:L,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),a.reset(),n(!1),J?.(k)}catch{X.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},x=i("connections.createConnectionDialog.title"),M=i("connections.createConnectionDialog.description"),D=a.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),v=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(B,{control:a.control,name:"ui_type",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.typeLabel")}),e.jsxs(Vn,{value:t.value,onValueChange:t.onChange,children:[e.jsx(z,{children:e.jsx(Bn,{children:e.jsx(On,{})})}),e.jsxs(En,{children:[e.jsx(ge,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),e.jsx(ge,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),e.jsx(ge,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),H&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),e.jsx(ge,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),e.jsx($,{})]})}),p==="NPX"&&e.jsx(B,{control:a.control,name:"npx_package",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.npmPackageLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...t,value:t.value??"",onPaste:d=>{const g=d.clipboardData.getData("text");g&&(d.preventDefault(),a.setValue("npx_package",g.trim(),{shouldDirty:!0}),j(g))},onBlur:d=>{j(d.target.value),t.onBlur()}})}),e.jsx($,{})]})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(B,{control:a.control,name:"stdio_command",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.commandLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...t,value:t.value??""})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"stdio_args",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.argumentsLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...t,value:t.value??""})}),e.jsx($,{})]})})]}),e.jsx(B,{control:a.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),e.jsx($,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(B,{control:a.control,name:"env_vars",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),e.jsx(z,{children:e.jsx(Kn,{value:t.value??[],onChange:t.onChange})}),e.jsx($,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(B,{control:a.control,name:"connection_url",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.urlLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...t,value:t.value??"",onPaste:d=>{const g=d.clipboardData.getData("text");g&&(d.preventDefault(),a.setValue("connection_url",g.trim(),{shouldDirty:!0}),j(g))},onBlur:d=>{j(d.target.value),t.onBlur()}})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"connection_token",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:r?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),e.jsx(z,{children:e.jsx(Y,{type:"password",placeholder:r?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...t,value:t.value??""})}),r?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.token.helperText,r.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:i("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),e.jsx($,{})]})})]}),e.jsx(B,{control:a.control,name:"title",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.nameLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...t})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"description",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.descriptionLabel")}),e.jsx(z,{children:e.jsx(zn,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...t,value:t.value??""})}),e.jsx($,{})]})})]});return U?e.jsx(kn,{open:l,onOpenChange:S,children:e.jsxs(In,{className:"max-h-[90vh]",children:[e.jsx(Tn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(An,{children:x}),e.jsx(Pn,{className:"mt-1",children:M})]}),e.jsx(Mn,{asChild:!0,children:e.jsx(Q,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":i("connections.createConnectionDialog.closeButton"),children:e.jsx(Hn,{size:16})})})]})}),e.jsx(Ye,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(Z),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:v}),e.jsx(Fn,{children:e.jsx(Q,{type:"submit",disabled:a.formState.isSubmitting,className:"w-full",children:D})})]})})]})}):e.jsx(en,{open:l,onOpenChange:S,children:e.jsxs(nn,{className:"sm:max-w-[525px]",children:[e.jsxs(tn,{children:[e.jsx(on,{children:x}),e.jsx(mn,{children:M})]}),e.jsx(Ye,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(Z),children:[e.jsx("div",{className:"py-4",children:v}),e.jsxs(gn,{children:[e.jsx(Q,{type:"button",variant:"outline",onClick:()=>S(!1),children:i("connections.createConnectionDialog.cancelButton")}),e.jsx(Q,{type:"submit",disabled:a.formState.isSubmitting,className:"min-w-40",children:D})]})]})})]})})}function nt(l){const n=hn.c(71),{mode:J,agentId:i,addedConnectionIds:f,onAdd:h,onCloneAndAdd:H,onConnectAndAdd:U,connectingItemId:P,search:C,onCreateConnection:b,onBrowseNavigate:a,defaultTab:p}=l,w=J===void 0?"add":J,K=p===void 0?"connected":p,r=Re(),{org:j}=Xe(),S=ue.useDeferredValue(C),Z=C!==S;let x;n[0]!==S?(x=S.trim().toLowerCase(),n[0]=S,n[1]=x):x=n[1];const M=x;let D;n[2]!==K?(D=o=>o??K,n[2]=K,n[3]=D):D=n[3];const[v,t]=xn(fn.connectionsTab(j.slug)+(K==="all"?":home-modal":":agent-modal"),D);let d;n[4]!==v||n[5]!==t?(d=o=>{o!==v&&A("connections_dialog_tab_changed",{to_tab:o}),t(o)},n[4]=v,n[5]=t,n[6]=d):d=n[6];const g=d;let N;n[7]!==j.id||n[8]!==j.slug?(N={connectionId:jn,orgId:j.id,orgSlug:j.slug},n[7]=j.id,n[8]=j.slug,n[9]=N):N=n[9];const L=Jn(N),k=S?.trim().split(/\s+/).filter(Boolean)??[],s=k.length>0?{operator:"or",conditions:k.flatMap(lt)}:void 0,c={...s&&{where:s},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},y=JSON.stringify(c),{data:ee,fetchNextPage:_,hasNextPage:m,isFetchingNextPage:I}=Qn({queryKey:an.collectionListInfinite(L,j.id,"","CONNECTIONS",y),queryFn:async o=>{const{pageParam:u}=o,R=u===void 0?0:u;return(await L.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...s&&{where:s},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:R}})).structuredContent},initialPageParam:0,getNextPageParam:ct,staleTime:3e4}),he=ee?.pages.flatMap(st)??[],xe=Sn(he),rn=new Set(he.filter(it).map(at)),q=sn(S),Ie=Je(q.loadMore,q.hasMore,q.isLoadingMore),Te=Je(_,m??!1,I),F=v==="all"||!!M,qe=F?q.items.filter(o=>{const u=bn(o);if(u&&rn.has(u))return!1;if(!M)return!0;const R=ke(o._meta),W=[o.title,o.description,o.name,o.server?.title,o.server?.description,o.server?.name,R?.friendly_name,R?.friendlyName].filter(Boolean).join(" ").toLowerCase();return k.some(V=>W.includes(V.toLowerCase()))}):[],pe=qe.filter(ot),me=qe.filter(tt);let fe;n[10]!==f?(fe=o=>o.some(u=>f.has(u.id)),n[10]=f,n[11]=fe):fe=n[11];const Ae=fe;let je;n[12]!==f||n[13]!==i||n[14]!==P||n[15]!==Ae||n[16]!==w||n[17]!==h||n[18]!==a||n[19]!==H||n[20]!==r?(je=(o,u,R,W,V)=>{const _e=Ae(V),de=V.find(G=>!f.has(G.id)),T=V[0];if(w==="browse"){const G=Wn(T);return e.jsx(Oe,{connection:{title:u,icon:R,description:V.length>1?`${V.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(be,{variant:"secondary",className:"gap-1 font-normal",children:[e.jsx(Ge,{size:11})," ",r("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{A("connection_browse_clicked",{app_name:T.app_name??null,connection_id:T.id,instances_count:V.length}),a?.(G)}},o)}return e.jsx(Oe,{connection:{title:u,icon:R,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[_e&&e.jsxs(be,{variant:"secondary",className:"gap-1 font-normal",children:[e.jsx(Ge,{size:11})," ",r("virtualMcp.connectionDialogContent.added")]}),e.jsx(Q,{variant:"outline",size:"sm",disabled:P!==null,onClick:G=>{G.stopPropagation(),de?(A("connection_add_clicked",{action:"use_existing",app_name:T.app_name??null,connection_id:de.id}),i&&A("agent_connection_attached",{agent_id:i,connection_id:de.id,app_name:T.app_name??null,mode:"existing"}),h(de.id)):(A("connection_add_clicked",{action:"clone",app_name:T.app_name??null,base_connection_id:T.id}),H(T))},children:r("virtualMcp.connectionDialogContent.add")})]})},o)},n[12]=f,n[13]=i,n[14]=P,n[15]=Ae,n[16]=w,n[17]=h,n[18]=a,n[19]=H,n[20]=r,n[21]=je):je=n[21];const ve=je;let Ce;n[22]!==P||n[23]!==w||n[24]!==U||n[25]!==r?(Ce=o=>{const u=ke(o._meta),R=u?.friendlyName||u?.friendly_name||o.server?.title||o.title||o.server?.name||o.name||o.id||"",W=o.server?.description||o.description||null,V=o.server?.icons?.[0]?.src||Yn(o.server?.repository)||null,_e=u?.official===!0,de=u?.verified===!0,T=u?.owner==="deco";return e.jsx(Oe,{connection:{title:R,description:W,icon:V},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[T&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:r("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.builtByDeco")})]}),!T&&_e&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(ze,{})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!T&&!_e&&de&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(ze,{})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),e.jsx(Q,{variant:"outline",size:"sm",disabled:P!==null,onClick:G=>{G.stopPropagation(),A("connection_add_clicked",{action:"connect_new",registry_item_id:o.id,app_name:u?.friendlyName||o.server?.name||o.name||null}),U(o)},children:P===o.id?e.jsx(we,{className:"size-3.5"}):r(w==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${o.id}`)},n[22]=P,n[23]=w,n[24]=U,n[25]=r,n[26]=Ce):Ce=n[26];const We=Ce;let ne;n[27]!==v||n[28]!==g||n[29]!==b||n[30]!==M||n[31]!==r?(ne=!M&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Gn,{tabs:[{id:"all",label:r("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:r("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:v,onTabChange:o=>g(o)}),e.jsxs(Q,{variant:"outline",size:"sm",onClick:()=>{A("connections_dialog_custom_clicked"),b()},children:[e.jsx(Zn,{size:12}),r("virtualMcp.connectionDialogContent.customConnection")]})]}),n[27]=v,n[28]=g,n[29]=b,n[30]=M,n[31]=r,n[32]=ne):ne=n[32];const Pe=Z&&"opacity-50 pointer-events-none";let te;n[33]!==Pe?(te=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[33]=Pe,n[34]=te):te=n[34];const ln="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let De;n[35]!==ve?(De=o=>{if(o.type==="group")return ve(o.key,o.title,o.icon,null,o.connections);const u=o.connection;return ve(u.id,u.title,u.icon,u.description??null,[u])},n[35]=ve,n[36]=De):De=n[36];const Me=xe.map(De);let oe;n[37]!==Te?(oe=e.jsx("div",{ref:Te,className:"col-span-full h-1"}),n[37]=Te,n[38]=oe):oe=n[38];let ae;n[39]!==I?(ae=I&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),n[39]=I,n[40]=ae):ae=n[40];const Fe=F&&pe.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(ze,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r("virtualMcp.connectionDialogContent.sectionVerified")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Le=F&&pe.map(We),Ve=F&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r("virtualMcp.connectionDialogContent.sectionAllConnections")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Be=F&&me.map(We);let ie;n[41]!==Ie||n[42]!==F?(ie=F&&e.jsx("div",{ref:Ie,className:"col-span-full h-1"}),n[41]=Ie,n[42]=F,n[43]=ie):ie=n[43];let se;n[44]!==q.isLoadingMore||n[45]!==F?(se=F&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),n[44]=q.isLoadingMore,n[45]=F,n[46]=se):se=n[46];let ce;n[47]!==Me||n[48]!==oe||n[49]!==ae||n[50]!==Fe||n[51]!==Le||n[52]!==Ve||n[53]!==Be||n[54]!==ie||n[55]!==se?(ce=e.jsxs("div",{className:ln,children:[Me,oe,ae,Fe,Le,Ve,Be,ie,se]}),n[47]=Me,n[48]=oe,n[49]=ae,n[50]=Fe,n[51]=Le,n[52]=Ve,n[53]=Be,n[54]=ie,n[55]=se,n[56]=ce):ce=n[56];let re;n[57]!==v||n[58]!==xe.length||n[59]!==me||n[60]!==C||n[61]!==r||n[62]!==pe?(re=xe.length===0&&pe.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:C?r("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:C}):r(v==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),n[57]=v,n[58]=xe.length,n[59]=me,n[60]=C,n[61]=r,n[62]=pe,n[63]=re):re=n[63];let le;n[64]!==te||n[65]!==ce||n[66]!==re?(le=e.jsxs("div",{className:te,children:[ce,re]}),n[64]=te,n[65]=ce,n[66]=re,n[67]=le):le=n[67];let ye;return n[68]!==ne||n[69]!==le?(ye=e.jsxs(e.Fragment,{children:[ne,le]}),n[68]=ne,n[69]=le,n[70]=ye):ye=n[70],ye}function tt(l){return!l.verified&&!ke(l._meta)?.verified&&!l.meta?.verified}function ot(l){return l.verified||ke(l._meta)?.verified||l.meta?.verified}function at(l){return l.app_name}function it(l){return l.app_name}function st(l){return l?.items??[]}function ct(l,n){if(l?.hasMore)return n.reduce(rt,0)}function rt(l,n){return l+(n?.items?.length??0)}function lt(l){return[{field:["title"],operator:"contains",value:l},{field:["description"],operator:"contains",value:l}]}function Vt({open:l,onOpenChange:n,defaultTab:J,initialSearch:i="",...f}){const h=Re(),H=f.mode??"add",U="agentId"in f?f.agentId:void 0,P="addedConnectionIds"in f?f.addedConnectionIds??new Set:new Set,C="onAdd"in f&&f.onAdd?f.onAdd:s=>{},b=(s,c,y)=>{U&&A("agent_connection_attached",{agent_id:U,connection_id:s,app_name:c,mode:y})},[a,p]=ue.useState(null),[w,K]=ue.useState(i),[r,j]=ue.useState(!1),[S,Z]=ue.useState(l);l!==S&&(Z(l),l&&K(i));const{org:x}=Xe(),{data:M}=Ze.useSession(),D=cn(),v=Cn(),t=Dn(),d=s=>{n(!1),t({to:"/$org/settings/connections/$appSlug",params:{org:x.slug,appSlug:s}})},g=()=>{yn(v,x.id)},N=async(s,c)=>{A("connection_oauth_succeeded",{connection_id:s,flow:c});const y=new URL(`/api/${x.slug}/mcp/${s}`,window.location.origin);await v.invalidateQueries({queryKey:an.isMCPAuthenticated(y.href,null)}),g()},L=async s=>{p(s.app_name??s.id);try{const y=`${s.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,_=(await D.create.mutateAsync({title:y,description:s.description??null,connection_type:s.connection_type,connection_url:s.connection_url??null,connection_token:null,icon:s.icon??null,app_name:s.app_name??null,app_id:s.app_id??null,connection_headers:s.connection_headers??null})).id,m=await $e({connectionId:_,orgId:x.id,orgSlug:x.slug,persistFallback:I=>D.update.mutateAsync({id:_,data:{connection_token:I}}).then(()=>{})});if(m.ran&&!m.ok){A("connection_oauth_failed",{connection_id:_,flow:"clone",error:m.error??"no_token"}),X.error(h("virtualMcp.addConnectionDialog.authenticationFailedError",{error:m.error??"no token received"})),await D.delete.mutateAsync(_);return}m.ran&&await N(_,"clone"),b(_,s.app_name??null,"clone"),C(_)}catch(c){console.error("Failed to add connection:",c),X.error(h("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{p(null)}},k=async s=>{if(!(!x||!M?.user?.id)){p(s.id);try{const c=wn(s,x.id,M.user.id,{remoteIndex:0}),y=c.connection_type==="STDIO",ee=!!c.connection_url,_=y&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!ee&&!_){X.error(h("virtualMcp.addConnectionDialog.mcpServerConnectionError")),p(null);return}const{id:m}=await D.create.mutateAsync(c),I=await $e({connectionId:m,orgId:x.id,orgSlug:x.slug,persistFallback:he=>D.update.mutateAsync({id:m,data:{connection_token:he}}).then(()=>{})});if(I.ran&&!I.ok){A("connection_oauth_failed",{connection_id:m,flow:"connect_new",error:I.error??"no_token"}),X.warning(h("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:h("virtualMcp.addConnectionDialog.signInFailedDescription",{error:I.error??"no token received"})}),b(m,c.app_name??null,"new"),C(m);return}I.ran?(await N(m,"connect_new"),X.success(h("virtualMcp.addConnectionDialog.connectedAuthenticated"))):X.success(h("virtualMcp.addConnectionDialog.connected")),b(m,c.app_name??null,"new"),C(m)}catch(c){console.error("Failed to connect:",c),X.error(h("virtualMcp.addConnectionDialog.failedToConnect"))}finally{p(null)}}};return e.jsxs(en,{open:l,onOpenChange:n,children:[e.jsxs(nn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(tn,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(on,{className:"text-base font-semibold",children:h(H==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:w,onChange:K,placeholder:h("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),e.jsx(ue.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),children:e.jsx(nt,{mode:H,agentId:U,addedConnectionIds:P,onAdd:C,onCloneAndAdd:L,onConnectAndAdd:k,connectingItemId:a,search:w,onCreateConnection:()=>j(!0),onBrowseNavigate:d,defaultTab:J})})]}),e.jsx(et,{open:r,onOpenChange:j,onCreated:async s=>{j(!1);const c=await $e({connectionId:s,orgId:x.id,orgSlug:x.slug,persistFallback:y=>D.update.mutateAsync({id:s,data:{connection_token:y}}).then(()=>{})});if(c.ran&&!c.ok){A("connection_oauth_failed",{connection_id:s,flow:"custom_create",error:c.error??"no_token"}),X.warning(h("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:h("virtualMcp.addConnectionDialog.signInFailedDescription",{error:c.error??"no token received"})}),b(s,null,"custom"),C(s),n(!1);return}c.ran&&await N(s,"custom_create"),b(s,null,"custom"),C(s),n(!1)}})]})}export{Vt as A};
|
|
1
|
+
import{b as Re,a6 as Xe,a as Ze,a5 as dn,aG as un,aF as pn,j as e,I as Y,B as Q,D as en,v as nn,w as tn,x as on,aU as mn,y as gn,t as X,c as hn,r as ue,at as xn,av as fn,T as jn,K as an,m as vn,h as we,E as A,aY as Ge,q as Cn,d as Dn,go as yn}from"./index-_v_cX_Uz.js";import{C as _n}from"./collection-search-OTIoM0sQ.js";import{g as Nn,a as bn,e as wn}from"./extract-connection-data-DlPXjE5Z.js";import{u as sn,g as Sn,C as Oe}from"./connection-card-DLq506jh.js";import{D as kn,a as In,e as Tn,b as An,c as Pn,f as Mn,g as Fn}from"./drawer-CHLTZ7IE.js";import{u as Ln}from"./use-mobile-C2Wa6qqh.js";import{F as B,b as O,c as E,d as z,f as $,a as Ye}from"./form-tdA5bJ97.js";import{S as Vn,b as Bn,a as On,d as En,c as ge}from"./select-BAD2nCs0.js";import{T as zn}from"./textarea-BG3_jDPK.js";import{a as cn}from"./use-connection-DXrrdGow.js";import{n as Se}from"./LinkBroken01-JVhKBnEM.js";import{a5 as Ee,aK as ze}from"./agent-icon-1xBXRQD0.js";import{c as $n}from"./UserSquare-2uLtK5zL.js";import{s as Hn}from"./XClose-BKbw2IM5.js";import{c as Un}from"./schema-CkOMMSLb.js";import{i as Ne,a as Qe,E as Kn,p as Rn,b as Xn,c as qn}from"./connection-form-helpers-DgyNgCMk.js";import{a as $e}from"./authenticate-and-persist-oauth-wfBLEPa1.js";import{g as Wn}from"./connection-slug-Cz4zCQv8.js";import{C as Gn}from"./collection-tabs-CeLcBMHA.js";import{u as Je}from"./use-infinite-scroll-C-Jtx_R8.js";import{g as ke,a as Yn}from"./metadata-D72DunRR.js";import{B as be}from"./badge-qzONP_je.js";import{c as He,T as Ue,a as Ke}from"./tooltip-2yYSYsa-.js";import{u as Qn}from"./useSuspenseInfiniteQuery-DUNAnJxH.js";import{u as Jn}from"./use-mcp-client--6E0VdQ1.js";import{s as Zn}from"./Plus-DA5fCRCT.js";function et({open:l,onOpenChange:n,onCreated:J}){const i=Re(),{org:f}=Xe(),{data:h}=Ze.useSession(),{stdioEnabled:H}=dn(),U=Ln(),P=cn(),b=sn("").items,a=un({resolver:pn(Un),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=a.watch("ui_type"),w=a.watch("connection_url"),K=a.watch("npx_package"),r=Ne({uiType:p,connectionUrl:w??"",npxPackage:K??""})??Qe({uiType:p,connectionUrl:w??"",registryItems:b}),j=t=>{const d=t.trim();if(!d)return;const g=!!a.formState.dirtyFields.title,N=!!a.formState.dirtyFields.description,L=!!a.formState.dirtyFields.env_vars,k=c=>{if(c&&(!g&&!a.getValues("title").trim()&&c.title&&a.setValue("title",c.title,{shouldDirty:!1}),!N&&!(a.getValues("description")??"").trim()&&c.description&&a.setValue("description",c.description,{shouldDirty:!1}),!L&&c.envVarKeys?.length)){const y=a.getValues("env_vars")??[],ee=new Set(y.map(m=>m.key)),_=c.envVarKeys.filter(m=>!ee.has(m));_.length>0&&a.setValue("env_vars",[...y,..._.map(m=>({key:m,value:""}))],{shouldDirty:!0})}},s=Rn(d);if(s&&H){a.setValue("ui_type","NPX",{shouldDirty:!0}),a.setValue("npx_package",s.packageName,{shouldDirty:!0}),a.setValue("connection_url","",{shouldDirty:!0}),a.setValue("connection_token",null,{shouldDirty:!0}),k(Ne({uiType:"NPX",npxPackage:s.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const c=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";a.setValue("ui_type",c,{shouldDirty:!0}),a.setValue("connection_url",d,{shouldDirty:!0}),k(Ne({uiType:c,connectionUrl:d})??Qe({uiType:c,connectionUrl:d,registryItems:b}));return}p==="NPX"&&k(Ne({uiType:"NPX",npxPackage:d}))},S=t=>{t||a.reset(),n(t)},Z=async t=>{let d,g=null,N=null,L=null;t.ui_type==="NPX"?(d="STDIO",g="",L=Xn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",g="",L=qn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,g=t.connection_url||"",N=t.connection_token||null);const k=Nn("conn");try{await P.create.mutateAsync({id:k,title:t.title,description:t.description||null,connection_type:d,connection_url:g,connection_token:N,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:h?.user?.id||"system",organization_id:f.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:L,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),a.reset(),n(!1),J?.(k)}catch{X.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},x=i("connections.createConnectionDialog.title"),M=i("connections.createConnectionDialog.description"),D=a.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),v=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(B,{control:a.control,name:"ui_type",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.typeLabel")}),e.jsxs(Vn,{value:t.value,onValueChange:t.onChange,children:[e.jsx(z,{children:e.jsx(Bn,{children:e.jsx(On,{})})}),e.jsxs(En,{children:[e.jsx(ge,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),e.jsx(ge,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),e.jsx(ge,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),H&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),e.jsx(ge,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),e.jsx($,{})]})}),p==="NPX"&&e.jsx(B,{control:a.control,name:"npx_package",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.npmPackageLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...t,value:t.value??"",onPaste:d=>{const g=d.clipboardData.getData("text");g&&(d.preventDefault(),a.setValue("npx_package",g.trim(),{shouldDirty:!0}),j(g))},onBlur:d=>{j(d.target.value),t.onBlur()}})}),e.jsx($,{})]})}),p==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(B,{control:a.control,name:"stdio_command",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.commandLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...t,value:t.value??""})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"stdio_args",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.argumentsLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...t,value:t.value??""})}),e.jsx($,{})]})})]}),e.jsx(B,{control:a.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),e.jsx($,{})]})})]}),(p==="NPX"||p==="STDIO")&&e.jsx(B,{control:a.control,name:"env_vars",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),e.jsx(z,{children:e.jsx(Kn,{value:t.value??[],onChange:t.onChange})}),e.jsx($,{})]})}),p!=="NPX"&&p!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(B,{control:a.control,name:"connection_url",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.urlLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...t,value:t.value??"",onPaste:d=>{const g=d.clipboardData.getData("text");g&&(d.preventDefault(),a.setValue("connection_url",g.trim(),{shouldDirty:!0}),j(g))},onBlur:d=>{j(d.target.value),t.onBlur()}})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"connection_token",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:r?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),e.jsx(z,{children:e.jsx(Y,{type:"password",placeholder:r?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...t,value:t.value??""})}),r?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.token.helperText,r.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:i("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),e.jsx($,{})]})})]}),e.jsx(B,{control:a.control,name:"title",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.nameLabel")}),e.jsx(z,{children:e.jsx(Y,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...t})}),e.jsx($,{})]})}),e.jsx(B,{control:a.control,name:"description",render:({field:t})=>e.jsxs(O,{children:[e.jsx(E,{children:i("connections.createConnectionDialog.descriptionLabel")}),e.jsx(z,{children:e.jsx(zn,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...t,value:t.value??""})}),e.jsx($,{})]})})]});return U?e.jsx(kn,{open:l,onOpenChange:S,children:e.jsxs(In,{className:"max-h-[90vh]",children:[e.jsx(Tn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(An,{children:x}),e.jsx(Pn,{className:"mt-1",children:M})]}),e.jsx(Mn,{asChild:!0,children:e.jsx(Q,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":i("connections.createConnectionDialog.closeButton"),children:e.jsx(Hn,{size:16})})})]})}),e.jsx(Ye,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(Z),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:v}),e.jsx(Fn,{children:e.jsx(Q,{type:"submit",disabled:a.formState.isSubmitting,className:"w-full",children:D})})]})})]})}):e.jsx(en,{open:l,onOpenChange:S,children:e.jsxs(nn,{className:"sm:max-w-[525px]",children:[e.jsxs(tn,{children:[e.jsx(on,{children:x}),e.jsx(mn,{children:M})]}),e.jsx(Ye,{...a,children:e.jsxs("form",{onSubmit:a.handleSubmit(Z),children:[e.jsx("div",{className:"py-4",children:v}),e.jsxs(gn,{children:[e.jsx(Q,{type:"button",variant:"outline",onClick:()=>S(!1),children:i("connections.createConnectionDialog.cancelButton")}),e.jsx(Q,{type:"submit",disabled:a.formState.isSubmitting,className:"min-w-40",children:D})]})]})})]})})}function nt(l){const n=hn.c(71),{mode:J,agentId:i,addedConnectionIds:f,onAdd:h,onCloneAndAdd:H,onConnectAndAdd:U,connectingItemId:P,search:C,onCreateConnection:b,onBrowseNavigate:a,defaultTab:p}=l,w=J===void 0?"add":J,K=p===void 0?"connected":p,r=Re(),{org:j}=Xe(),S=ue.useDeferredValue(C),Z=C!==S;let x;n[0]!==S?(x=S.trim().toLowerCase(),n[0]=S,n[1]=x):x=n[1];const M=x;let D;n[2]!==K?(D=o=>o??K,n[2]=K,n[3]=D):D=n[3];const[v,t]=xn(fn.connectionsTab(j.slug)+(K==="all"?":home-modal":":agent-modal"),D);let d;n[4]!==v||n[5]!==t?(d=o=>{o!==v&&A("connections_dialog_tab_changed",{to_tab:o}),t(o)},n[4]=v,n[5]=t,n[6]=d):d=n[6];const g=d;let N;n[7]!==j.id||n[8]!==j.slug?(N={connectionId:jn,orgId:j.id,orgSlug:j.slug},n[7]=j.id,n[8]=j.slug,n[9]=N):N=n[9];const L=Jn(N),k=S?.trim().split(/\s+/).filter(Boolean)??[],s=k.length>0?{operator:"or",conditions:k.flatMap(lt)}:void 0,c={...s&&{where:s},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},y=JSON.stringify(c),{data:ee,fetchNextPage:_,hasNextPage:m,isFetchingNextPage:I}=Qn({queryKey:an.collectionListInfinite(L,j.id,"","CONNECTIONS",y),queryFn:async o=>{const{pageParam:u}=o,R=u===void 0?0:u;return(await L.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...s&&{where:s},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:R}})).structuredContent},initialPageParam:0,getNextPageParam:ct,staleTime:3e4}),he=ee?.pages.flatMap(st)??[],xe=Sn(he),rn=new Set(he.filter(it).map(at)),q=sn(S),Ie=Je(q.loadMore,q.hasMore,q.isLoadingMore),Te=Je(_,m??!1,I),F=v==="all"||!!M,qe=F?q.items.filter(o=>{const u=bn(o);if(u&&rn.has(u))return!1;if(!M)return!0;const R=ke(o._meta),W=[o.title,o.description,o.name,o.server?.title,o.server?.description,o.server?.name,R?.friendly_name,R?.friendlyName].filter(Boolean).join(" ").toLowerCase();return k.some(V=>W.includes(V.toLowerCase()))}):[],pe=qe.filter(ot),me=qe.filter(tt);let fe;n[10]!==f?(fe=o=>o.some(u=>f.has(u.id)),n[10]=f,n[11]=fe):fe=n[11];const Ae=fe;let je;n[12]!==f||n[13]!==i||n[14]!==P||n[15]!==Ae||n[16]!==w||n[17]!==h||n[18]!==a||n[19]!==H||n[20]!==r?(je=(o,u,R,W,V)=>{const _e=Ae(V),de=V.find(G=>!f.has(G.id)),T=V[0];if(w==="browse"){const G=Wn(T);return e.jsx(Oe,{connection:{title:u,icon:R,description:V.length>1?`${V.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(be,{variant:"secondary",className:"gap-1 font-normal",children:[e.jsx(Ge,{size:11})," ",r("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{A("connection_browse_clicked",{app_name:T.app_name??null,connection_id:T.id,instances_count:V.length}),a?.(G)}},o)}return e.jsx(Oe,{connection:{title:u,icon:R,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[_e&&e.jsxs(be,{variant:"secondary",className:"gap-1 font-normal",children:[e.jsx(Ge,{size:11})," ",r("virtualMcp.connectionDialogContent.added")]}),e.jsx(Q,{variant:"outline",size:"sm",disabled:P!==null,onClick:G=>{G.stopPropagation(),de?(A("connection_add_clicked",{action:"use_existing",app_name:T.app_name??null,connection_id:de.id}),i&&A("agent_connection_attached",{agent_id:i,connection_id:de.id,app_name:T.app_name??null,mode:"existing"}),h(de.id)):(A("connection_add_clicked",{action:"clone",app_name:T.app_name??null,base_connection_id:T.id}),H(T))},children:r("virtualMcp.connectionDialogContent.add")})]})},o)},n[12]=f,n[13]=i,n[14]=P,n[15]=Ae,n[16]=w,n[17]=h,n[18]=a,n[19]=H,n[20]=r,n[21]=je):je=n[21];const ve=je;let Ce;n[22]!==P||n[23]!==w||n[24]!==U||n[25]!==r?(Ce=o=>{const u=ke(o._meta),R=u?.friendlyName||u?.friendly_name||o.server?.title||o.title||o.server?.name||o.name||o.id||"",W=o.server?.description||o.description||null,V=o.server?.icons?.[0]?.src||Yn(o.server?.repository)||null,_e=u?.official===!0,de=u?.verified===!0,T=u?.owner==="deco";return e.jsx(Oe,{connection:{title:R,description:W,icon:V},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[T&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:r("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.builtByDeco")})]}),!T&&_e&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(ze,{})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!T&&!_e&&de&&e.jsxs(He,{children:[e.jsx(Ue,{asChild:!0,children:e.jsx(be,{variant:"outline",size:"icon",children:e.jsx(ze,{})})}),e.jsx(Ke,{children:r("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),e.jsx(Q,{variant:"outline",size:"sm",disabled:P!==null,onClick:G=>{G.stopPropagation(),A("connection_add_clicked",{action:"connect_new",registry_item_id:o.id,app_name:u?.friendlyName||o.server?.name||o.name||null}),U(o)},children:P===o.id?e.jsx(we,{className:"size-3.5"}):r(w==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${o.id}`)},n[22]=P,n[23]=w,n[24]=U,n[25]=r,n[26]=Ce):Ce=n[26];const We=Ce;let ne;n[27]!==v||n[28]!==g||n[29]!==b||n[30]!==M||n[31]!==r?(ne=!M&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Gn,{tabs:[{id:"all",label:r("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:r("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:v,onTabChange:o=>g(o)}),e.jsxs(Q,{variant:"outline",size:"sm",onClick:()=>{A("connections_dialog_custom_clicked"),b()},children:[e.jsx(Zn,{size:12}),r("virtualMcp.connectionDialogContent.customConnection")]})]}),n[27]=v,n[28]=g,n[29]=b,n[30]=M,n[31]=r,n[32]=ne):ne=n[32];const Pe=Z&&"opacity-50 pointer-events-none";let te;n[33]!==Pe?(te=vn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[33]=Pe,n[34]=te):te=n[34];const ln="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let De;n[35]!==ve?(De=o=>{if(o.type==="group")return ve(o.key,o.title,o.icon,null,o.connections);const u=o.connection;return ve(u.id,u.title,u.icon,u.description??null,[u])},n[35]=ve,n[36]=De):De=n[36];const Me=xe.map(De);let oe;n[37]!==Te?(oe=e.jsx("div",{ref:Te,className:"col-span-full h-1"}),n[37]=Te,n[38]=oe):oe=n[38];let ae;n[39]!==I?(ae=I&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),n[39]=I,n[40]=ae):ae=n[40];const Fe=F&&pe.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(ze,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r("virtualMcp.connectionDialogContent.sectionVerified")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Le=F&&pe.map(We),Ve=F&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:r("virtualMcp.connectionDialogContent.sectionAllConnections")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Be=F&&me.map(We);let ie;n[41]!==Ie||n[42]!==F?(ie=F&&e.jsx("div",{ref:Ie,className:"col-span-full h-1"}),n[41]=Ie,n[42]=F,n[43]=ie):ie=n[43];let se;n[44]!==q.isLoadingMore||n[45]!==F?(se=F&&q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),n[44]=q.isLoadingMore,n[45]=F,n[46]=se):se=n[46];let ce;n[47]!==Me||n[48]!==oe||n[49]!==ae||n[50]!==Fe||n[51]!==Le||n[52]!==Ve||n[53]!==Be||n[54]!==ie||n[55]!==se?(ce=e.jsxs("div",{className:ln,children:[Me,oe,ae,Fe,Le,Ve,Be,ie,se]}),n[47]=Me,n[48]=oe,n[49]=ae,n[50]=Fe,n[51]=Le,n[52]=Ve,n[53]=Be,n[54]=ie,n[55]=se,n[56]=ce):ce=n[56];let re;n[57]!==v||n[58]!==xe.length||n[59]!==me||n[60]!==C||n[61]!==r||n[62]!==pe?(re=xe.length===0&&pe.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:C?r("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:C}):r(v==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),n[57]=v,n[58]=xe.length,n[59]=me,n[60]=C,n[61]=r,n[62]=pe,n[63]=re):re=n[63];let le;n[64]!==te||n[65]!==ce||n[66]!==re?(le=e.jsxs("div",{className:te,children:[ce,re]}),n[64]=te,n[65]=ce,n[66]=re,n[67]=le):le=n[67];let ye;return n[68]!==ne||n[69]!==le?(ye=e.jsxs(e.Fragment,{children:[ne,le]}),n[68]=ne,n[69]=le,n[70]=ye):ye=n[70],ye}function tt(l){return!l.verified&&!ke(l._meta)?.verified&&!l.meta?.verified}function ot(l){return l.verified||ke(l._meta)?.verified||l.meta?.verified}function at(l){return l.app_name}function it(l){return l.app_name}function st(l){return l?.items??[]}function ct(l,n){if(l?.hasMore)return n.reduce(rt,0)}function rt(l,n){return l+(n?.items?.length??0)}function lt(l){return[{field:["title"],operator:"contains",value:l},{field:["description"],operator:"contains",value:l}]}function Vt({open:l,onOpenChange:n,defaultTab:J,initialSearch:i="",...f}){const h=Re(),H=f.mode??"add",U="agentId"in f?f.agentId:void 0,P="addedConnectionIds"in f?f.addedConnectionIds??new Set:new Set,C="onAdd"in f&&f.onAdd?f.onAdd:s=>{},b=(s,c,y)=>{U&&A("agent_connection_attached",{agent_id:U,connection_id:s,app_name:c,mode:y})},[a,p]=ue.useState(null),[w,K]=ue.useState(i),[r,j]=ue.useState(!1),[S,Z]=ue.useState(l);l!==S&&(Z(l),l&&K(i));const{org:x}=Xe(),{data:M}=Ze.useSession(),D=cn(),v=Cn(),t=Dn(),d=s=>{n(!1),t({to:"/$org/settings/connections/$appSlug",params:{org:x.slug,appSlug:s}})},g=()=>{yn(v,x.id)},N=async(s,c)=>{A("connection_oauth_succeeded",{connection_id:s,flow:c});const y=new URL(`/api/${x.slug}/mcp/${s}`,window.location.origin);await v.invalidateQueries({queryKey:an.isMCPAuthenticated(y.href,null)}),g()},L=async s=>{p(s.app_name??s.id);try{const y=`${s.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,_=(await D.create.mutateAsync({title:y,description:s.description??null,connection_type:s.connection_type,connection_url:s.connection_url??null,connection_token:null,icon:s.icon??null,app_name:s.app_name??null,app_id:s.app_id??null,connection_headers:s.connection_headers??null})).id,m=await $e({connectionId:_,orgId:x.id,orgSlug:x.slug,persistFallback:I=>D.update.mutateAsync({id:_,data:{connection_token:I}}).then(()=>{})});if(m.ran&&!m.ok){A("connection_oauth_failed",{connection_id:_,flow:"clone",error:m.error??"no_token"}),X.error(h("virtualMcp.addConnectionDialog.authenticationFailedError",{error:m.error??"no token received"})),await D.delete.mutateAsync(_);return}m.ran&&await N(_,"clone"),b(_,s.app_name??null,"clone"),C(_)}catch(c){console.error("Failed to add connection:",c),X.error(h("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{p(null)}},k=async s=>{if(!(!x||!M?.user?.id)){p(s.id);try{const c=wn(s,x.id,M.user.id,{remoteIndex:0}),y=c.connection_type==="STDIO",ee=!!c.connection_url,_=y&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!ee&&!_){X.error(h("virtualMcp.addConnectionDialog.mcpServerConnectionError")),p(null);return}const{id:m}=await D.create.mutateAsync(c),I=await $e({connectionId:m,orgId:x.id,orgSlug:x.slug,persistFallback:he=>D.update.mutateAsync({id:m,data:{connection_token:he}}).then(()=>{})});if(I.ran&&!I.ok){A("connection_oauth_failed",{connection_id:m,flow:"connect_new",error:I.error??"no_token"}),X.warning(h("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:h("virtualMcp.addConnectionDialog.signInFailedDescription",{error:I.error??"no token received"})}),b(m,c.app_name??null,"new"),C(m);return}I.ran?(await N(m,"connect_new"),X.success(h("virtualMcp.addConnectionDialog.connectedAuthenticated"))):X.success(h("virtualMcp.addConnectionDialog.connected")),b(m,c.app_name??null,"new"),C(m)}catch(c){console.error("Failed to connect:",c),X.error(h("virtualMcp.addConnectionDialog.failedToConnect"))}finally{p(null)}}};return e.jsxs(en,{open:l,onOpenChange:n,children:[e.jsxs(nn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(tn,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(on,{className:"text-base font-semibold",children:h(H==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:w,onChange:K,placeholder:h("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),e.jsx(ue.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{className:"size-6 text-muted-foreground"})}),children:e.jsx(nt,{mode:H,agentId:U,addedConnectionIds:P,onAdd:C,onCloneAndAdd:L,onConnectAndAdd:k,connectingItemId:a,search:w,onCreateConnection:()=>j(!0),onBrowseNavigate:d,defaultTab:J})})]}),e.jsx(et,{open:r,onOpenChange:j,onCreated:async s=>{j(!1);const c=await $e({connectionId:s,orgId:x.id,orgSlug:x.slug,persistFallback:y=>D.update.mutateAsync({id:s,data:{connection_token:y}}).then(()=>{})});if(c.ran&&!c.ok){A("connection_oauth_failed",{connection_id:s,flow:"custom_create",error:c.error??"no_token"}),X.warning(h("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:h("virtualMcp.addConnectionDialog.signInFailedDescription",{error:c.error??"no token received"})}),b(s,null,"custom"),C(s),n(!1);return}c.ran&&await N(s,"custom_create"),b(s,null,"custom"),C(s),n(!1)}})]})}export{Vt as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as d,j as a,a2 as g}from"./index-_v_cX_Uz.js";import{ChatLayout as x}from"./index-CZRVgAXr.js";import{a as h}from"./thread-route-DgTdTFs-.js";import{u as $}from"./use-task-metadata-wSSRfe9l.js";import{AppViewContent as A}from"./project-app-view-BJ3tVux4.js";import"./use-mobile-C2Wa6qqh.js";import"./tooltip-2yYSYsa-.js";import"./index-DBEc0hp1.js";import"./MessageCircle01-gn4vp2uo.js";import"./XClose-BKbw2IM5.js";import"./thread-button-CSrnO4J2.js";import"./use-sidebar-collapsed-L0ea2Q3b.js";import"./sheet-BSNpAEVQ.js";import"./use-chat-layout-state-BjrxY9zk.js";import"./use-panel-navigate-BUxvnLXh.js";import"./use-project-scope-BW5vvzIR.js";import"./repository-binding-CaMbcDLV.js";import"./use-mcp-client--6E0VdQ1.js";import"./auth-n3l0CNa5.js";import"./toolbar-icon-button-slFtkrIv.js";import"./use-in-settings-DTiMI92T.js";import"./resizable-BVcChq5e.js";import"./route-page-header-Dwl09nk0.js";import"./LayoutLeft-CUvx-Pvw.js";import"./use-current-view-CTU_KTOZ.js";import"./thread-intent-AFleKGnm.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C3KG4d2d.js";import"./task-board-DFizZUve.js";import"./schema-XQ38kn3Z.js";import"./session-runtime-CoMtO0vP.js";import"./gateway-client-MCgSJtiT.js";import"./use-mcp-tools-DGaS62Fn.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DRWpmXqd.js";import"./types-C-gTijki.js";import"./chat-context-SiB3iaPb.js";import"./use-view-draft-kind-Dog_0xGP.js";import"./use-blog-view-7SxY0DSD.js";import"./use-organization-settings-D19qndSA.js";import"./use-entitlements-C0Jnglmb.js";import"./use-ai-providers-DBMFXH54.js";import"./use-decopilot-events-ia2U1D-_.js";import"./shell-layout-C2FEOZHE.js";import"./Globe04-DYHS72xm.js";import"./UserSquare-2uLtK5zL.js";import"./use-deployment-admin-DMzm770d.js";import"./admin-fetch-BhTJlAsX.js";import"./agent-icon-1xBXRQD0.js";import"./AlertCircle-k-5O6cw_.js";import"./UserCheck01-BxAZblZb.js";import"./Tool01-x-P519mQ.js";import"./ArrowUp-DwmUsoz4.js";import"./ArrowLeft-ClkcoIX4.js";import"./ArrowRight-D62IR3mi.js";import"./BookOpen01-BtddYmqo.js";import"./CheckCircle-Cp5xjlw-.js";import"./TrendUp01-CXnsnsUU.js";import"./ChevronDown-CM9Urfsd.js";import"./ChevronSelectorVertical-r9NWov70.js";import"./ChevronUp--3SHAUXV.js";import"./LinkBroken01-JVhKBnEM.js";import"./CreditCard01-DVqX0918.js";import"./File02-Dh6SOo4d.js";import"./SwitchHorizontal01-KL7mZ6la.js";import"./Eye-BoqAJmT6.js";import"./Fingerprint04-YAruy68-.js";import"./Image01-RSPET2Po.js";import"./Key01-L7povfCu.js";import"./Minus-DN5eCgUQ.js";import"./Monitor01-D0Bxj-fe.js";import"./Sun-CcLmZkDa.js";import"./Play-7916CrEc.js";import"./Plus-DA5fCRCT.js";import"./SearchMd-BPdzWKZu.js";import"./ShoppingBag01-BhOTMWsh.js";import"./Trash01-q67Vms6R.js";import"./Upload01-BUC8UUt4.js";import"./Users01-GuAUZTSm.js";import"./Zap-iZQqC26K.js";import"./use-org-notice-BmGI5AoV.js";import"./command-n87yBV6H.js";import"./index-8J9eeoYX.js";import"./integration-icon-DMudGnaH.js";import"./project-icon-m6Ad1m7q.js";import"./use-navigate-to-agent-Blb_gT0Z.js";import"./use-debounced-value-D0-3lKxq.js";import"./new-project-dialog-BF76iYqU.js";import"./label-BPobXy5D.js";import"./repository-picker-CtTW0G31.js";import"./github-icon-BSdAKSFL.js";import"./useInfiniteQuery-D0bLDkrM.js";import"./infiniteQueryObserver-BjuIdZaK.js";import"./collection-search-OTIoM0sQ.js";import"./new-project-store-DWxCJQOo.js";import"./legacy-admin-welcome-dialog-DR6IgoHi.js";import"./drawer-CHLTZ7IE.js";import"./required-auth-layout-AmJ1uTFt.js";import"./use-org-sso-D0oSmb0Y.js";import"./task-route-jGx8dPBi.js";import"./task-key-jbMkJ-gq.js";import"./project-index-C0zTM-WA.js";import"./connect-source-dialog-B5QdFSKj.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-DdHCkif9.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./form-tdA5bJ97.js";import"./icon-button-B1n86T_T.js";import"./useQueries-BuIHgxFS.js";import"./authenticate-and-persist-oauth-wfBLEPa1.js";import"./mcp-oauth-dNTY3RLT.js";import"./mcp-oauth-CuTkV8Yh.js";import"./track-FOISCTZ9.js";import"./extract-connection-data-DlPXjE5Z.js";import"./connection-D7qO0DS_.js";import"./url-slug-lJqSTlr5.js";const l=g("/shell/$org/org-shell/agent-shell/projects/$agentId/apps/$connectionId/$toolName");function j(){const t=d.c(10),{connectionId:o,toolName:r}=l.useParams(),{args:i}=l.useSearch(),u=h(),e=$(u);let p;t[0]!==o||t[1]!==e?.expanded_tools||t[2]!==r?(p=e?.expanded_tools?.find(c=>c.appId===o&&c.toolName===r),t[0]=o,t[1]=e?.expanded_tools,t[2]=r,t[3]=p):p=t[3];const f=p,s=`${o}:${r}`,n=f?.args;let m;return t[4]!==i||t[5]!==o||t[6]!==s||t[7]!==n||t[8]!==r?(m=a.jsx(A,{connectionId:o,toolName:r,args:n,searchArgs:i},s),t[4]=i,t[5]=o,t[6]=s,t[7]=n,t[8]=r,t[9]=m):m=t[9],m}function Lo(){const t=d.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(x.Content,{children:a.jsx(j,{})}),t[0]=o):o=t[0],o}export{Lo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as de,b as Ge,r as se,be as dt,j as t,B as be,h as Ke,m as lt,J as At,hF as Tt,a7 as ot,t as Ee,I as It,aY as mt,a9 as pt,au as Mt,aJ as ut,aK as xt,aL as gt,aM as ht,b9 as jt,aN as bt,aO as yt,aP as kt,bu as Rt,X as Lt,Y as tt,Z as Ot,_ as Et}from"./index-D2i_pYwo.js";import{ChatLayout as Bt}from"./index-DUngohuH.js";import{A as Ht}from"./agent-view-guard-DAdKCfAN.js";import{e as vt,D as Wt}from"./agent-icon-5JzmaVYR.js";import{a as Gt}from"./SwitchHorizontal01-BMEV6poX.js";import{i as rt}from"./File02-DshxjDyQ.js";import{a as Pt}from"./Image01-BZ44Kx4X.js";import{s as Nt}from"./Trash01-MjAw8x8_.js";import{i as Ze}from"./Upload01-CutujZKW.js";import{S as wt}from"./search-input-CAKcgZpp.js";import{b as Kt}from"./repository-binding-BL79LH9r.js";import{u as Dt}from"./use-debounced-value-Do0xF2Om.js";import{a as Vt}from"./use-file-configs-D6mTKjkn.js";import{a as _t,u as nt,c as Ye,d as Je,f as qe,e as et,s as Yt,g as qt,p as it,h as St,B as Jt,i as Qt,b as Ct}from"./asset-utils-825nLVjJ.js";import{m as Xt}from"./match-site-slug-config-B47_xZCi.js";import{b as Zt}from"./use-blocks-v8-project-BsHc-UJ7.js";import{i as es}from"./Play-fuDOU8F1.js";import{s as ts}from"./Plus-C3lymMZB.js";import{s as ss}from"./Tool01-BaohEBY5.js";import{s as is}from"./XClose-CBLfa9LU.js";import{b as ls,a as rs,S as ns,d as os,c as as,e as cs}from"./sheet-Dl5xK2Nn.js";import{a as Qe,T as fs}from"./toggle-group-DtkvHfko.js";import{c as ds}from"./thread-route-Clm7FOVJ.js";import"./use-mobile-BG1vBhH-.js";import"./tooltip-6kGM_eQF.js";import"./index-C8WQbHaK.js";import"./MessageCircle01-DW4_PNZG.js";import"./thread-button-hq5fMUfA.js";import"./use-sidebar-collapsed-CzvwMLEA.js";import"./use-chat-layout-state-CaYnCJg0.js";import"./use-panel-navigate-6rjdBG7q.js";import"./use-project-scope-esRFkQO3.js";import"./toolbar-icon-button-C2P_K8-S.js";import"./use-in-settings-HuoXuf74.js";import"./resizable-BTfXulP-.js";import"./route-page-header-CQ-W3wvh.js";import"./LayoutLeft-CMVOW-pP.js";import"./use-current-view-DWCNmZ47.js";import"./use-mcp-client-lA4u3y89.js";import"./auth-BRTdapwq.js";import"./use-main-panel-tabs-CufAik2P.js";import"./Monitor01-Dung5Edg.js";import"./use-connection-fTbSHOHv.js";import"./use-mcp-tools-CK9iP7GI.js";import"./types-lFZQt78s.js";import"./utils-CVEq3hMx.js";import"./agent-capabilities-DpyBBkqG.js";import"./index-bIDLYWvU.js";import"./ArrowUp-Jo2NpxcZ.js";import"./chat-context-vliaa5pP.js";import"./use-view-draft-kind-DAOleCsb.js";import"./use-blog-view-CUXzG53e.js";import"./use-organization-settings-CLr8-y2J.js";import"./schema-CuF9xhNS.js";import"./task-board-DHpGQG6h.js";import"./thread-intent-BHTVxi5n.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-xQMj7Q2K.js";import"./session-runtime-DIqtTbVV.js";import"./use-entitlements-Cecn_eMO.js";import"./use-ai-providers-Si6lZfwd.js";import"./use-decopilot-events-CK4eZo3O.js";import"./input-9ttBVl4l.js";import"./usage-stats-DiNUvJki.js";import"./markdown-B2A6HPlV.js";import"./use-copy-DHcPu_e6.js";import"./gateway-client-Db0L5juP.js";import"./form-D8xpAXPl.js";import"./label-j3g0RaM0.js";import"./icon-button-CrEhqBtX.js";import"./file-type-icon-CMHqTGj6.js";import"./chat-draft-mvxcgHO3.js";import"./use-voice-input-CcsxQA_e.js";import"./popover-DuZ7mT05.js";import"./drawer-D7zKYyPf.js";import"./ChevronDown-C3dAg-jK.js";import"./UserCheck01-DONIYjNn.js";import"./index-CQd-rPe6.js";import"./checkbox-RrvLpN6t.js";import"./Minus-CMO3YoJU.js";import"./select-BGtnFfIR.js";import"./index-BdQq_4o_.js";import"./ChevronUp-IRWvN0bs.js";import"./ArrowLeft-DEUSL-Af.js";import"./ChevronSelectorVertical-CB9nodBH.js";import"./Key01-CF-3Aw3z.js";import"./SearchMd-DPVHlHgz.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-C1wYCQKa.js";import"./Eye-BaoSWdOQ.js";import"./ArrowRight-BUikeU5m.js";import"./BookOpen01-jt4iWUAm.js";import"./UserSquare-C5Py9azN.js";import"./tabs-BA-4oEsC.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-BMocp54x.js";import"./input-BGyzWk1_.js";import"./suggestion-B5kbVF5_.js";import"./use-mcp-prompts-BNqxYTfw.js";import"./use-org-fs-lYP9x3KC.js";import"./useInfiniteQuery-Bhzp56vf.js";import"./infiniteQueryObserver-QvmxM8yp.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DkZBN3Gg.js";import"./plan-ladder-CQx4XohT.js";import"./add-connection-dialog-CEf8POA5.js";import"./collection-search-BHIo_ddJ.js";import"./extract-connection-data-LbbeCt5n.js";import"./metadata-D72DunRR.js";import"./connection-BL1DZL8y.js";import"./url-slug-j_pbLoit.js";import"./connection-card-VJNv_08i.js";import"./connection-slug-DOcsu9cs.js";import"./integration-icon-B4igOrSf.js";import"./LinkBroken01-D8a_i2U7.js";import"./textarea-Dr6I78Fc.js";import"./schema-e-gzop_8.js";import"./connection-form-helpers-xFANUQG-.js";import"./authenticate-and-persist-oauth-vpbKGKXJ.js";import"./mcp-oauth-D57QGwp7.js";import"./mcp-oauth-DQcSxcPM.js";import"./collection-tabs-DvlmC9nK.js";import"./badge-BwAJrSlX.js";import"./use-infinite-scroll-bABoIqF1.js";import"./useSuspenseInfiniteQuery-DNLHz-yH.js";import"./use-task-board-items-CzS8qL54.js";import"./pair-iesoBa6Z.js";import"./collapsible-DOhPo0qw.js";import"./task-key-Dcb9W2hX.js";import"./config-BwHTrULW.js";import"./CheckCircle-DTkHxClo.js";import"./task-route-MJmKHPgU.js";import"./project-index-CYkX_ZtW.js";import"./TrendUp01-D0RC9MvR.js";import"./shell-layout-DcGcftXj.js";import"./Globe04-CmPStKLT.js";import"./use-deployment-admin-Bi_4KgF-.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-rObp4Zxr.js";import"./Zap-Bbh4tQj9.js";import"./command-CHrpJLNU.js";import"./index-CQnlHMgr.js";import"./project-icon-BpR6jOBz.js";import"./use-navigate-to-agent-BHhJ2VaM.js";import"./new-project-dialog-nFFir7Y8.js";import"./repository-picker-DwWCnHQR.js";import"./github-icon-CPMf3VVH.js";import"./ShoppingBag01-Dfd5AB1h.js";import"./new-project-store-BxAwHXqh.js";import"./legacy-admin-welcome-dialog-BjDc0ZvZ.js";import"./required-auth-layout-Dq35BF2j.js";import"./use-org-sso-BG-E2bjp.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BhS5jb3I.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-3bGjHXvS.js";import"./use-sandbox-events-DHMWW7Ku.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-CXK-D0YH.js";import"./use-task-metadata-gC9Senyq.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-CpzVrHnY.js";import"./virtual-mcp-BIgZunK3.js";import"./CreditCard01-D2z7eRwD.js";import"./Fingerprint04-BGa9q7Wg.js";import"./Sun-vCtd1mVC.js";import"./Users01-CVAHFiWF.js";function zt(c){return c<0||c<640?2:c<768?3:c<1024?4:5}function Ft(c,e){const i=Array.from({length:e},()=>[]);return c.forEach((s,a)=>i[a%e].push(s)),i}function ms(c){const e=de.c(156),{config:i}=c,s=Ge(),[a,f]=se.useState(""),l=Dt(a,300);let r;e[0]!==i.id||e[1]!==l?(r={configId:i.id,search:l},e[0]=i.id,e[1]=l,e[2]=r):r=e[2];const n=_t(r),o=nt(),[p,m]=se.useState("all"),[u,d]=se.useState(null),[h,g]=se.useState(!1),[j,b]=se.useState(null),[x,w]=se.useState(null),[C,P]=se.useState(null),y=se.useRef(null);let v;e[3]!==i.id||e[4]!==n||e[5]!==s||e[6]!==o?(v=async function(X){if(!X)return;const he=Array.from(X);if(he.length===0)return;const je=[];for(const Fe of he)try{await o.mutateAsync({configId:i.id,file:Fe})}catch(Ue){const ue=Ue;je.push(`${Fe.name} (${ue instanceof Error?ue.message:"upload failed"})`)}await n.refetch(),je.length>0&&Ee.error(je.length===he.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:je.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:je.join("; ")}))},e[3]=i.id,e[4]=n,e[5]=s,e[6]=o,e[7]=v):v=e[7];const N=v;let k;e[8]===Symbol.for("react.memo_cache_sentinel")?(k=function(X){X.preventDefault(),g(!0)},e[8]=k):k=e[8];const _=k;let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=function(X){X.currentTarget.contains(X.relatedTarget)||g(!1)},e[9]=D):D=e[9];const M=D;let K;e[10]!==N?(K=function(X){X.preventDefault(),X.stopPropagation(),g(!1),N(X.dataTransfer.files)},e[10]=N,e[11]=K):K=e[11];const J=K,[W,G]=dt();let z,R,L,ie,U,S,$,A,T,I,F;if(e[12]!==i.name||e[13]!==l||e[14]!==G||e[15]!==W||e[16]!==p||e[17]!==n.data?.pages||e[18]!==n.isFetching||e[19]!==n.isFetchingNextPage||e[20]!==J||e[21]!==a||e[22]!==u||e[23]!==s){const X=(n.data?.pages??[]).flatMap(ps),he=p==="all"?X:X.filter(Re=>Ye(Re.key)===p),je=Ft(he,zt(W));z=he.find(Re=>Re.key===u)??null;const Fe=l.trim(),Ue=a!==l||n.isFetching&&!n.isFetchingNextPage;S=P,$="relative flex h-full min-h-0 overflow-hidden",ie="flex min-w-0 flex-1 flex-col";let ue;e[35]!==s?(ue=s("assets.browser.title"),e[35]=s,e[36]=ue):ue=e[36];let ke;e[37]!==ue?(ke=t.jsx("h2",{className:"text-sm font-semibold",children:ue}),e[37]=ue,e[38]=ke):ke=e[38];let ve;e[39]!==i.name||e[40]!==s?(ve=s("assets.browser.bucketLabel",{name:i.name}),e[39]=i.name,e[40]=s,e[41]=ve):ve=e[41];let Pe;e[42]!==ve?(Pe=t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:ve}),e[42]=ve,e[43]=Pe):Pe=e[43];let Ne;e[44]!==ke||e[45]!==Pe?(Ne=t.jsxs("div",{className:"min-w-0 flex-1",children:[ke,Pe]}),e[44]=ke,e[45]=Pe,e[46]=Ne):Ne=e[46];let we;e[47]!==s?(we=s("assets.browser.filterLabel"),e[47]=s,e[48]=we):we=e[48];let We;e[49]===Symbol.for("react.memo_cache_sentinel")?(We=Re=>{(Re==="all"||Re==="image"||Re==="video"||Re==="document")&&m(Re)},e[49]=We):We=e[49];let Le;e[50]!==s?(Le=s("assets.browser.filterAll"),e[50]=s,e[51]=Le):Le=e[51];let De;e[52]!==Le?(De=t.jsx(Qe,{value:"all",children:Le}),e[52]=Le,e[53]=De):De=e[53];let _e;e[54]!==s?(_e=s("assets.browser.filterImages"),e[54]=s,e[55]=_e):_e=e[55];let Se;e[56]!==_e?(Se=t.jsx(Qe,{value:"image",children:_e}),e[56]=_e,e[57]=Se):Se=e[57];let Ie;e[58]!==s?(Ie=s("assets.browser.filterVideos"),e[58]=s,e[59]=Ie):Ie=e[59];let Me;e[60]!==Ie?(Me=t.jsx(Qe,{value:"video",children:Ie}),e[60]=Ie,e[61]=Me):Me=e[61];let Ce;e[62]!==s?(Ce=s("assets.browser.filterDocuments"),e[62]=s,e[63]=Ce):Ce=e[63];let ze;e[64]!==Ce?(ze=t.jsx(Qe,{value:"document",children:Ce}),e[64]=Ce,e[65]=ze):ze=e[65];let pe;e[66]!==p||e[67]!==we||e[68]!==De||e[69]!==Se||e[70]!==Me||e[71]!==ze?(pe=t.jsxs(fs,{type:"single",variant:"segmented",size:"sm",value:p,"aria-label":we,onValueChange:We,children:[De,Se,Me,ze]}),e[66]=p,e[67]=we,e[68]=De,e[69]=Se,e[70]=Me,e[71]=ze,e[72]=pe):pe=e[72];let $e;e[73]!==s?($e=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[73]=s,e[74]=$e):$e=e[74];let Oe;e[75]!==Ue||e[76]!==a||e[77]!==$e?(Oe=t.jsx(wt,{value:a,onChange:f,isSearching:Ue,placeholder:$e,className:"w-56 shrink-0"}),e[75]=Ue,e[76]=a,e[77]=$e,e[78]=Oe):Oe=e[78],e[79]!==Ne||e[80]!==pe||e[81]!==Oe?(U=t.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-3 px-4 pb-3 pt-4",children:[Ne,pe,Oe]}),e[79]=Ne,e[80]=pe,e[81]=Oe,e[82]=U):U=e[82],I="relative min-h-0 flex-1",F=_,R=M,L=J,A="absolute inset-0 overflow-y-auto px-4 pb-24",T=X.length===0?Fe?t.jsx(st,{title:s("filePicker.filePickerDialog.noMatches",{query:Fe}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):t.jsx(st,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):he.length===0?t.jsx(st,{title:s("assets.browser.emptyFilterTitle"),description:s("assets.browser.emptyFilterDescription")}):t.jsx("div",{ref:G,className:"flex items-start gap-2.5",children:je.map((Re,$t)=>t.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-2.5",children:Re.map(Ve=>t.jsx(xs,{item:Ve,selected:Ve.key===u,onSelect:()=>d(Ve.key===u?null:Ve.key)},Ve.key))},$t))}),e[12]=i.name,e[13]=l,e[14]=G,e[15]=W,e[16]=p,e[17]=n.data?.pages,e[18]=n.isFetching,e[19]=n.isFetchingNextPage,e[20]=J,e[21]=a,e[22]=u,e[23]=s,e[24]=z,e[25]=R,e[26]=L,e[27]=ie,e[28]=U,e[29]=S,e[30]=$,e[31]=A,e[32]=T,e[33]=I,e[34]=F}else z=e[24],R=e[25],L=e[26],ie=e[27],U=e[28],S=e[29],$=e[30],A=e[31],T=e[32],I=e[33],F=e[34];let V;e[83]!==n||e[84]!==s?(V=n.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isFetchingNextPage,onClick:()=>n.fetchNextPage(),children:n.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[83]=n,e[84]=s,e[85]=V):V=e[85];let O;e[86]!==V||e[87]!==A||e[88]!==T?(O=t.jsxs("div",{className:A,children:[T,V]}),e[86]=V,e[87]=A,e[88]=T,e[89]=O):O=e[89];let E;e[90]!==h||e[91]!==s?(E=h&&t.jsx("div",{className:"pointer-events-none absolute inset-2 flex items-center justify-center rounded-xl border-2 border-dashed border-primary bg-primary/5 text-sm font-medium text-primary",children:s("assets.browser.dropToUpload")}),e[90]=h,e[91]=s,e[92]=E):E=e[92];const me=o.isPending;let te;e[93]===Symbol.for("react.memo_cache_sentinel")?(te=()=>y.current?.click(),e[93]=te):te=e[93];let le;e[94]===Symbol.for("react.memo_cache_sentinel")?(le=t.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-white/70 text-foreground dark:bg-black/25",children:t.jsx(ts,{size:16})}),e[94]=le):le=e[94];let B;e[95]!==s?(B=s("assets.browser.uploadBarHint"),e[95]=s,e[96]=B):B=e[96];let Y;e[97]!==s?(Y=s("filePicker.filePickerDialog.uploadSizeLimit"),e[97]=s,e[98]=Y):Y=e[98];let Q;e[99]!==Y?(Q=t.jsxs("span",{className:"text-foreground/50 dark:text-foreground/70",children:[" · ",Y]}),e[99]=Y,e[100]=Q):Q=e[100];let H;e[101]!==B||e[102]!==Q?(H=t.jsxs("span",{className:"truncate",children:[B,Q]}),e[101]=B,e[102]=Q,e[103]=H):H=e[103];let q;e[104]!==H||e[105]!==o.isPending?(q=t.jsxs("button",{type:"button",disabled:me,onClick:te,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-full text-left text-sm text-foreground/75 disabled:opacity-60 dark:text-foreground dark:[text-shadow:0_1px_3px_rgb(0_0_0/0.5)]",children:[le,H]}),e[104]=H,e[105]=o.isPending,e[106]=q):q=e[106];let re;e[107]===Symbol.for("react.memo_cache_sentinel")?(re=()=>y.current?.click(),e[107]=re):re=e[107];let ne;e[108]!==o.isPending?(ne=o.isPending?t.jsx(Ke,{className:"size-3.5"}):t.jsx(Ze,{size:14}),e[108]=o.isPending,e[109]=ne):ne=e[109];let Z;e[110]!==s||e[111]!==o.isPending?(Z=o.isPending?s("filePicker.filePickerDialog.uploading"):s("assets.browser.upload"),e[110]=s,e[111]=o.isPending,e[112]=Z):Z=e[112];let ce;e[113]!==ne||e[114]!==Z||e[115]!==o.isPending?(ce=t.jsxs(be,{type:"button",size:"sm",disabled:o.isPending,onClick:re,children:[ne,Z]}),e[113]=ne,e[114]=Z,e[115]=o.isPending,e[116]=ce):ce=e[116];let oe;e[117]!==q||e[118]!==ce?(oe=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center px-4",children:t.jsxs("div",{className:"pointer-events-auto flex w-full max-w-xl items-center gap-2 rounded-full bg-white/45 p-1.5 shadow-[inset_0_1px_0_rgb(255_255_255/0.6),inset_0_0_0_1px_rgb(255_255_255/0.3),0_12px_40px_rgb(0_0_0/0.18)] backdrop-blur-2xl backdrop-saturate-180 dark:bg-white/12 dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.25),inset_0_0_0_1px_rgb(255_255_255/0.12),0_12px_40px_rgb(0_0_0/0.4)]",children:[q,ce]})}),e[117]=q,e[118]=ce,e[119]=oe):oe=e[119];let ae;e[120]!==R||e[121]!==L||e[122]!==O||e[123]!==E||e[124]!==oe||e[125]!==I||e[126]!==F?(ae=t.jsxs("div",{className:I,onDragOver:F,onDragLeave:R,onDrop:L,children:[O,E,oe]}),e[120]=R,e[121]=L,e[122]=O,e[123]=E,e[124]=oe,e[125]=I,e[126]=F,e[127]=ae):ae=e[127];let fe;e[128]!==N?(fe=t.jsx("input",{ref:y,type:"file",multiple:!0,className:"hidden",onChange:ye=>{const X=Array.from(ye.target.files??[]);ye.target.value="",N(X)}}),e[128]=N,e[129]=fe):fe=e[129];let ee;e[130]!==ie||e[131]!==U||e[132]!==ae||e[133]!==fe?(ee=t.jsxs("div",{className:ie,children:[U,ae,fe]}),e[130]=ie,e[131]=U,e[132]=ae,e[133]=fe,e[134]=ee):ee=e[134];let xe;e[135]!==z?(xe=z&&t.jsx(gs,{item:z,onClose:()=>d(null),onReplace:()=>{w(z),d(null)},onDelete:()=>b(z)},z.key),e[135]=z,e[136]=xe):xe=e[136];let ge;e[137]!==i.id||e[138]!==n||e[139]!==C||e[140]!==x?(ge=x&&t.jsx(ks,{configId:i.id,item:x,container:C,onClose:()=>{d(x.key),w(null)},onReplaced:()=>n.refetch()},x.key),e[137]=i.id,e[138]=n,e[139]=C,e[140]=x,e[141]=ge):ge=e[141];let Be;e[142]===Symbol.for("react.memo_cache_sentinel")?(Be=()=>b(null),e[142]=Be):Be=e[142];let Ae;e[143]!==u?(Ae=ye=>{ye===u&&d(null)},e[143]=u,e[144]=Ae):Ae=e[144];let Te;e[145]!==i.id||e[146]!==j||e[147]!==Ae?(Te=t.jsx(vs,{configId:i.id,item:j,onClose:Be,onDeleted:Ae}),e[145]=i.id,e[146]=j,e[147]=Ae,e[148]=Te):Te=e[148];let He;return e[149]!==S||e[150]!==$||e[151]!==ee||e[152]!==xe||e[153]!==ge||e[154]!==Te?(He=t.jsxs("div",{ref:S,className:$,children:[ee,xe,ge,Te]}),e[149]=S,e[150]=$,e[151]=ee,e[152]=xe,e[153]=ge,e[154]=Te,e[155]=He):He=e[155],He}function ps(c){return c.items}function st(c){const e=de.c(8),{title:i,description:s}=c;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(Pt,{size:18,className:"text-muted-foreground"})}),e[0]=a):a=e[0];let f;e[1]!==i?(f=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=f):f=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==f||e[6]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[a,f,l]}),e[5]=f,e[6]=l,e[7]=r):r=e[7],r}function Ut(c){const e=de.c(21),{item:i,controls:s,onDimensions:a}=c,f=Ye(i.key);if(f==="image"){let r;e[0]!==i.lastModified||e[1]!==i.publicUrl?(r=it(i.publicUrl,i.lastModified),e[0]=i.lastModified,e[1]=i.publicUrl,e[2]=r):r=e[2];let n;e[3]!==i.key?(n=Je(i.key),e[3]=i.key,e[4]=n):n=e[4];let o;e[5]!==a?(o=m=>a?.(m.currentTarget.naturalWidth,m.currentTarget.naturalHeight),e[5]=a,e[6]=o):o=e[6];let p;return e[7]!==r||e[8]!==n||e[9]!==o?(p=t.jsx("img",{src:r,alt:n,loading:"lazy",className:"block h-auto w-full",onLoad:o,onError:us}),e[7]=r,e[8]=n,e[9]=o,e[10]=p):p=e[10],p}if(f==="video"){let r;e[11]!==i.lastModified||e[12]!==i.publicUrl?(r=it(i.publicUrl,i.lastModified),e[11]=i.lastModified,e[12]=i.publicUrl,e[13]=r):r=e[13];const n=`${r}#t=0.1`;let o;e[14]!==a?(o=m=>a?.(m.currentTarget.videoWidth,m.currentTarget.videoHeight),e[14]=a,e[15]=o):o=e[15];let p;return e[16]!==s||e[17]!==n||e[18]!==o?(p=t.jsx("video",{src:n,preload:"metadata",muted:!0,playsInline:!0,controls:s,className:"block h-auto w-full",onLoadedMetadata:o}),e[16]=s,e[17]=n,e[18]=o,e[19]=p):p=e[19],p}let l;return e[20]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex aspect-[4/3] items-center justify-center",children:t.jsx(rt,{size:32,className:"text-muted-foreground"})}),e[20]=l):l=e[20],l}function us(c){c.currentTarget.style.display="none"}function xs(c){const e=de.c(34),{item:i,selected:s,onSelect:a}=c,f=Ge();let l,r,n,o,p;e[0]!==i.key||e[1]!==a||e[2]!==s||e[3]!==f?(l=Je(i.key),r="button",n=a,o=s,p=f("assets.browser.selectAsset",{name:l}),e[0]=i.key,e[1]=a,e[2]=s,e[3]=f,e[4]=l,e[5]=r,e[6]=n,e[7]=o,e[8]=p):(l=e[4],r=e[5],n=e[6],o=e[7],p=e[8]);const m=s?"ring-2 ring-foreground":"shadow-edge hover:ring-2 hover:ring-border";let u;e[9]!==m?(u=lt("group relative block w-full overflow-hidden rounded-xl bg-muted text-left outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring",m),e[9]=m,e[10]=u):u=e[10];let d;e[11]!==i?(d=t.jsx(Ut,{item:i}),e[11]=i,e[12]=d):d=e[12];let h;e[13]!==i.key?(h=Ye(i.key)==="video"&&t.jsx("span",{className:"absolute left-2 top-2 flex size-7 items-center justify-center rounded-full bg-black/45 text-white",children:t.jsx(es,{size:12})}),e[13]=i.key,e[14]=h):h=e[14];let g;e[15]!==l?(g=t.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:l}),e[15]=l,e[16]=g):g=e[16];let j;e[17]!==i.size?(j=qe(i.size),e[17]=i.size,e[18]=j):j=e[18];let b;e[19]!==j?(b=t.jsx("span",{className:"shrink-0 opacity-80",children:j}),e[19]=j,e[20]=b):b=e[20];let x;e[21]!==b||e[22]!==g?(x=t.jsxs("span",{className:"absolute inset-x-0 bottom-0 flex items-end gap-2 bg-gradient-to-t from-black/60 to-transparent px-2.5 pb-2 pt-8 text-xs text-white",children:[g,b]}),e[21]=b,e[22]=g,e[23]=x):x=e[23];let w;return e[24]!==l||e[25]!==r||e[26]!==x||e[27]!==n||e[28]!==o||e[29]!==p||e[30]!==u||e[31]!==d||e[32]!==h?(w=t.jsxs("button",{type:r,onClick:n,"aria-pressed":o,"aria-label":p,title:l,className:u,children:[d,h,x]}),e[24]=l,e[25]=r,e[26]=x,e[27]=n,e[28]=o,e[29]=p,e[30]=u,e[31]=d,e[32]=h,e[33]=w):w=e[33],w}function gs(c){const e=de.c(99),{item:i,onClose:s,onReplace:a,onDelete:f}=c,l=Ge(),[r]=At(),[n,o]=se.useState(null),[p,m]=se.useState(!1);let u;e[0]!==i.key?(u=Je(i.key),e[0]=i.key,e[1]=u):u=e[1];const d=u;let h;e[2]!==i.lastModified||e[3]!==r?(h=i.lastModified?new Intl.DateTimeFormat(Tt[r.language],{dateStyle:"medium"}).format(new Date(i.lastModified)):null,e[2]=i.lastModified,e[3]=r,e[4]=h):h=e[4];const g=h;let j;e[5]!==i.publicUrl||e[6]!==l?(j=async function(){try{await navigator.clipboard.writeText(i.publicUrl),m(!0),window.setTimeout(()=>m(!1),1500)}catch{Ee.error(l("filePicker.filePickerDialog.failedToCopyUrl"))}},e[5]=i.publicUrl,e[6]=l,e[7]=j):j=e[7];const b=j;let x;e[8]!==d?(x=t.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-semibold",title:d,children:d}),e[8]=d,e[9]=x):x=e[9];let w;e[10]!==l?(w=l("assets.details.close"),e[10]=l,e[11]=w):w=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(is,{size:16}),e[12]=C):C=e[12];let P;e[13]!==s||e[14]!==w?(P=t.jsx(be,{type:"button",variant:"ghost",size:"icon-sm","aria-label":w,onClick:s,children:C}),e[13]=s,e[14]=w,e[15]=P):P=e[15];let y;e[16]!==x||e[17]!==P?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[x,P]}),e[16]=x,e[17]=P,e[18]=y):y=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=(ne,Z)=>o(`${ne} × ${Z}`),e[19]=v):v=e[19];let N;e[20]!==i?(N=t.jsx("div",{className:"overflow-hidden rounded-xl bg-muted shadow-edge",children:t.jsx(Ut,{item:i,controls:!0,onDimensions:v})}),e[20]=i,e[21]=N):N=e[21];let k;e[22]!==l?(k=l("assets.details.type"),e[22]=l,e[23]=k):k=e[23];let _;e[24]!==i.key?(_=et(i.key).toUpperCase(),e[24]=i.key,e[25]=_):_=e[25];let D;e[26]!==k||e[27]!==_?(D=t.jsx(Xe,{label:k,children:_}),e[26]=k,e[27]=_,e[28]=D):D=e[28];let M;e[29]!==l?(M=l("assets.details.size"),e[29]=l,e[30]=M):M=e[30];let K;e[31]!==i.size?(K=qe(i.size),e[31]=i.size,e[32]=K):K=e[32];let J;e[33]!==M||e[34]!==K?(J=t.jsx(Xe,{label:M,children:K}),e[33]=M,e[34]=K,e[35]=J):J=e[35];let W;e[36]!==n||e[37]!==l?(W=n&&t.jsx(Xe,{label:l("assets.details.dimensions"),children:n}),e[36]=n,e[37]=l,e[38]=W):W=e[38];let G;e[39]!==l||e[40]!==g?(G=g&&t.jsx(Xe,{label:l("assets.details.uploaded"),children:g}),e[39]=l,e[40]=g,e[41]=G):G=e[41];let z;e[42]!==D||e[43]!==J||e[44]!==W||e[45]!==G?(z=t.jsxs("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-3 text-sm",children:[D,J,W,G]}),e[42]=D,e[43]=J,e[44]=W,e[45]=G,e[46]=z):z=e[46];let R;e[47]!==l?(R=l("assets.details.url"),e[47]=l,e[48]=R):R=e[48];let L;e[49]!==R?(L=t.jsx("p",{className:"text-xs text-muted-foreground",children:R}),e[49]=R,e[50]=L):L=e[50];const ie=i.publicUrl;let U;e[51]!==l?(U=l("assets.details.url"),e[51]=l,e[52]=U):U=e[52];let S;e[53]!==i.publicUrl||e[54]!==U?(S=t.jsx(It,{readOnly:!0,value:ie,"aria-label":U,className:"min-w-0 flex-1 font-mono text-xs",onFocus:hs}),e[53]=i.publicUrl,e[54]=U,e[55]=S):S=e[55];let $;e[56]!==p?($=p?t.jsx(mt,{size:14}):t.jsx(vt,{size:14}),e[56]=p,e[57]=$):$=e[57];let A;e[58]!==p||e[59]!==l?(A=l(p?"assets.details.copied":"assets.details.copy"),e[58]=p,e[59]=l,e[60]=A):A=e[60];let T;e[61]!==b||e[62]!==$||e[63]!==A?(T=t.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:b,children:[$,A]}),e[61]=b,e[62]=$,e[63]=A,e[64]=T):T=e[64];let I;e[65]!==S||e[66]!==T?(I=t.jsxs("div",{className:"flex items-center gap-2",children:[S,T]}),e[65]=S,e[66]=T,e[67]=I):I=e[67];let F;e[68]!==L||e[69]!==I?(F=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[L,I]}),e[68]=L,e[69]=I,e[70]=F):F=e[70];let V;e[71]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(ss,{size:14}),e[71]=V):V=e[71];let O;e[72]!==l?(O=l("assets.details.replace"),e[72]=l,e[73]=O):O=e[73];let E;e[74]!==a||e[75]!==O?(E=t.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:a,children:[V,O]}),e[74]=a,e[75]=O,e[76]=E):E=e[76];const me=i.publicUrl;let te;e[77]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(pt,{size:14}),e[77]=te):te=e[77];let le;e[78]!==l?(le=l("assets.details.open"),e[78]=l,e[79]=le):le=e[79];let B;e[80]!==i.publicUrl||e[81]!==le?(B=t.jsx(be,{type:"button",variant:"outline",size:"sm",asChild:!0,children:t.jsxs("a",{href:me,target:"_blank",rel:"noreferrer",children:[te,le]})}),e[80]=i.publicUrl,e[81]=le,e[82]=B):B=e[82];let Y;e[83]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(Nt,{size:14}),e[83]=Y):Y=e[83];let Q;e[84]!==l?(Q=l("assets.browser.deleteAction"),e[84]=l,e[85]=Q):Q=e[85];let H;e[86]!==f||e[87]!==Q?(H=t.jsxs(be,{type:"button",variant:"ghost",size:"sm",className:"ml-auto text-destructive hover:text-destructive",onClick:f,children:[Y,Q]}),e[86]=f,e[87]=Q,e[88]=H):H=e[88];let q;e[89]!==E||e[90]!==B||e[91]!==H?(q=t.jsxs("div",{className:"mt-auto flex items-center gap-2 pt-2",children:[E,B,H]}),e[89]=E,e[90]=B,e[91]=H,e[92]=q):q=e[92];let re;return e[93]!==N||e[94]!==z||e[95]!==F||e[96]!==q||e[97]!==y?(re=t.jsxs("aside",{className:"flex w-80 shrink-0 flex-col gap-4 overflow-y-auto border-l border-border/60 p-4",children:[y,N,z,F,q]}),e[93]=N,e[94]=z,e[95]=F,e[96]=q,e[97]=y,e[98]=re):re=e[98],re}function hs(c){return c.currentTarget.select()}function Xe(c){const e=de.c(7),{label:i,children:s}=c;let a;e[0]!==i?(a=t.jsx("dt",{className:"text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=a):a=e[1];let f;e[2]!==s?(f=t.jsx("dd",{className:"truncate",children:s}),e[2]=s,e[3]=f):f=e[3];let l;return e[4]!==a||e[5]!==f?(l=t.jsxs("div",{className:"min-w-0",children:[a,f]}),e[4]=a,e[5]=f,e[6]=l):l=e[6],l}function js(c){const e=et(c);if(e!=="file")return e==="jpg"||e==="jpeg"?".jpg,.jpeg":`.${e}`}function at(c){return c?`${c.width} × ${c.height}`:null}const bs="min(45vh, 28rem)";function ys(c){const e=c.width/c.height;return`min(100%, calc(${bs} * ${e}), ${c.width}px)`}function ct(c){const e=de.c(12),{src:i,kind:s,alt:a,onDimensions:f}=c;if(s==="image"){let r;e[0]!==f?(r=o=>f({width:o.currentTarget.naturalWidth,height:o.currentTarget.naturalHeight}),e[0]=f,e[1]=r):r=e[1];let n;return e[2]!==a||e[3]!==i||e[4]!==r?(n=t.jsx("img",{src:i,alt:a,className:"max-h-full max-w-full rounded-xl shadow-edge",onLoad:r}),e[2]=a,e[3]=i,e[4]=r,e[5]=n):n=e[5],n}if(s==="video"){const r=`${i}#t=0.1`;let n;e[6]!==f?(n=p=>f({width:p.currentTarget.videoWidth,height:p.currentTarget.videoHeight}),e[6]=f,e[7]=n):n=e[7];let o;return e[8]!==r||e[9]!==n?(o=t.jsx("video",{src:r,preload:"metadata",muted:!0,playsInline:!0,controls:!0,className:"max-h-full max-w-full rounded-xl shadow-edge",onLoadedMetadata:n}),e[8]=r,e[9]=n,e[10]=o):o=e[10],o}let l;return e[11]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex aspect-[4/3] max-h-full w-full max-w-xs items-center justify-center rounded-xl bg-muted shadow-edge",children:t.jsx(rt,{size:32,className:"text-muted-foreground"})}),e[11]=l):l=e[11],l}function ks(c){const e=de.c(186),{configId:i,item:s,container:a,onClose:f,onReplaced:l}=c,r=Ge(),n=nt(),[o,p]=se.useState(null),[m,u]=se.useState(null),[d,h]=se.useState(null),[g,j]=se.useState(null),[b,x]=se.useState(!1),w=se.useRef(null);let C,P,y,v,N,k,_,D,M,K,J,W,G,z,R,L,ie,U,S,$,A,T,I;if(e[0]!==g||e[1]!==d||e[2]!==i||e[3]!==a||e[4]!==o||e[5]!==m||e[6]!==b||e[7]!==s.key||e[8]!==s.lastModified||e[9]!==s.publicUrl||e[10]!==s.size||e[11]!==f||e[12]!==l||e[13]!==r||e[14]!==n){const ee=Je(s.key),xe=et(s.key).toUpperCase();let ge;e[38]!==o||e[39]!==s.key?(ge=!o||Yt(s.key,o.name),e[38]=o,e[39]=s.key,e[40]=ge):ge=e[40],k=ge;let Be;e[41]!==g||e[42]!==d||e[43]!==k?(Be=k&&!!d&&!!g&&qt(g,d),e[41]=g,e[42]=d,e[43]=k,e[44]=Be):Be=e[44],_=Be;let Ae;e[45]!==m?(Ae=function($e){$e&&(m&&URL.revokeObjectURL(m),p($e),u(encodeURI(URL.createObjectURL($e))),j(null))},e[45]=m,e[46]=Ae):Ae=e[46],y=Ae;let Te;e[47]!==m||e[48]!==f||e[49]!==n.isPending?(Te=function(){n.isPending||(m&&URL.revokeObjectURL(m),f())},e[47]=m,e[48]=f,e[49]=n.isPending,e[50]=Te):Te=e[50],v=Te;let He;e[51]!==v||e[52]!==i||e[53]!==o||e[54]!==k||e[55]!==s.key||e[56]!==l||e[57]!==r||e[58]!==n?(He=async function(){if(!(!o||!k))try{await n.mutateAsync({configId:i,file:o,replaceKey:s.key}),Ee.success(r("assets.replace.done")),l(),v()}catch($e){const Oe=$e;Ee.error(r("assets.replace.failed",{error:Oe instanceof Error?Oe.message:String(Oe)}))}},e[51]=v,e[52]=i,e[53]=o,e[54]=k,e[55]=s.key,e[56]=l,e[57]=r,e[58]=n,e[59]=He):He=e[59],N=He,P=ls,z=!0,e[60]!==v?(R=pe=>!pe&&v(),e[60]=v,e[61]=R):R=e[61],C=rs,M="bottom",K=a,J="gap-0 rounded-t-2xl border-0",e[62]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx("div",{className:"mx-auto mt-2 h-1 w-10 rounded-full bg-border"}),e[62]=W):W=e[62];const ye=r("assets.replace.title",{name:ee});let X;e[63]!==ye?(X=t.jsx(ns,{children:ye}),e[63]=ye,e[64]=X):X=e[64];let he;e[65]!==r?(he=r("assets.replace.description"),e[65]=r,e[66]=he):he=e[66];let je;e[67]!==he?(je=t.jsx(os,{children:he}),e[67]=he,e[68]=je):je=e[68],e[69]!==X||e[70]!==je?(G=t.jsxs(as,{className:"px-6 pb-2 pt-3",children:[X,je]}),e[69]=X,e[70]=je,e[71]=G):G=e[71],A="grid grid-cols-[1fr_auto_1fr] items-start gap-4 px-6 py-4";let Fe;e[72]!==r?(Fe=r("assets.replace.before"),e[72]=r,e[73]=Fe):Fe=e[73];let Ue;e[74]!==Fe?(Ue=t.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:Fe}),e[74]=Fe,e[75]=Ue):Ue=e[75];let ue;e[76]!==s.lastModified||e[77]!==s.publicUrl?(ue=it(s.publicUrl,s.lastModified),e[76]=s.lastModified,e[77]=s.publicUrl,e[78]=ue):ue=e[78];let ke;e[79]!==s.key?(ke=Ye(s.key),e[79]=s.key,e[80]=ke):ke=e[80];let ve;e[81]!==ee||e[82]!==ue||e[83]!==ke?(ve=t.jsx("div",{className:"flex h-[min(45vh,28rem)] items-center justify-center",children:t.jsx(ct,{src:ue,kind:ke,alt:ee,onDimensions:h})}),e[81]=ee,e[82]=ue,e[83]=ke,e[84]=ve):ve=e[84];let Pe;e[85]!==ee?(Pe=t.jsx("p",{className:"truncate font-medium",children:ee}),e[85]=ee,e[86]=Pe):Pe=e[86];let Ne;e[87]!==s.size?(Ne=qe(s.size),e[87]=s.size,e[88]=Ne):Ne=e[88];let we;e[89]!==d?(we=at(d),e[89]=d,e[90]=we):we=e[90];let We;e[91]!==Ne||e[92]!==we?(We=[Ne,we].filter(Boolean),e[91]=Ne,e[92]=we,e[93]=We):We=e[93];const Le=We.join(" · ");let De;e[94]!==Le?(De=t.jsx("p",{className:"text-muted-foreground",children:Le}),e[94]=Le,e[95]=De):De=e[95];let _e;e[96]!==Pe||e[97]!==De?(_e=t.jsxs("div",{className:"min-w-0 text-xs",children:[Pe,De]}),e[96]=Pe,e[97]=De,e[98]=_e):_e=e[98],e[99]!==Ue||e[100]!==ve||e[101]!==_e?(T=t.jsxs("div",{className:"flex min-w-0 flex-col gap-2",children:[Ue,ve,_e]}),e[99]=Ue,e[100]=ve,e[101]=_e,e[102]=T):T=e[102],e[103]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Mt,{size:18,className:"self-center text-muted-foreground","aria-hidden":!0}),e[103]=I):I=e[103],U="flex min-w-0 flex-col gap-2";let Se;e[104]!==r?(Se=r("assets.replace.after"),e[104]=r,e[105]=Se):Se=e[105],e[106]!==Se?(S=t.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:Se}),e[106]=Se,e[107]=S):S=e[107];let Ie,Me;e[108]===Symbol.for("react.memo_cache_sentinel")?(Ie=pe=>{pe.preventDefault(),x(!0)},Me=()=>x(!1),e[108]=Ie,e[109]=Me):(Ie=e[108],Me=e[109]);let Ce;e[110]!==y?(Ce=pe=>{pe.preventDefault(),pe.stopPropagation(),x(!1),y(pe.dataTransfer.files[0])},e[110]=y,e[111]=Ce):Ce=e[111];let ze;e[112]!==d||e[113]!==o||e[114]!==m||e[115]!==b||e[116]!==r?(ze=o&&m?t.jsx(ct,{src:m,kind:Ye(o.name),alt:o.name,onDimensions:j}):t.jsxs("div",{className:lt("flex max-h-full flex-col items-center justify-center gap-3 rounded-xl bg-muted p-4 text-center text-sm text-muted-foreground",b&&"bg-primary/5 ring-2 ring-primary"),style:{width:d?ys(d):"100%",aspectRatio:d?`${d.width} / ${d.height}`:"16 / 9"},children:[t.jsx(Ze,{size:20}),r("assets.replace.dropHint"),t.jsx(be,{type:"button",variant:"outline",size:"sm",onClick:()=>w.current?.click(),children:r("assets.replace.choose")})]}),e[112]=d,e[113]=o,e[114]=m,e[115]=b,e[116]=r,e[117]=ze):ze=e[117],e[118]!==Ce||e[119]!==ze?($=t.jsx("div",{className:"flex h-[min(45vh,28rem)] items-center justify-center",onDragOver:Ie,onDragLeave:Me,onDrop:Ce,children:ze}),e[118]=Ce,e[119]=ze,e[120]=$):$=e[120],D="min-w-0 text-xs",L=o?t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate font-medium",children:o.name}),t.jsx("p",{className:"text-muted-foreground",children:[qe(o.size),at(g)].filter(Boolean).join(" · ")})]}),t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isPending,onClick:()=>w.current?.click(),children:r("assets.replace.chooseAnother")})]}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"font-medium text-muted-foreground",children:r("assets.replace.noFile")}),t.jsx("p",{className:"text-muted-foreground",children:r("assets.replace.sameFormatHint",{format:xe})})]}),ie=!k&&t.jsxs("p",{className:"mt-1 flex items-center gap-1 text-destructive",children:[t.jsx(ot,{size:12,className:"shrink-0"}),r("assets.replace.wrongFormat",{format:xe})]}),e[0]=g,e[1]=d,e[2]=i,e[3]=a,e[4]=o,e[5]=m,e[6]=b,e[7]=s.key,e[8]=s.lastModified,e[9]=s.publicUrl,e[10]=s.size,e[11]=f,e[12]=l,e[13]=r,e[14]=n,e[15]=C,e[16]=P,e[17]=y,e[18]=v,e[19]=N,e[20]=k,e[21]=_,e[22]=D,e[23]=M,e[24]=K,e[25]=J,e[26]=W,e[27]=G,e[28]=z,e[29]=R,e[30]=L,e[31]=ie,e[32]=U,e[33]=S,e[34]=$,e[35]=A,e[36]=T,e[37]=I}else C=e[15],P=e[16],y=e[17],v=e[18],N=e[19],k=e[20],_=e[21],D=e[22],M=e[23],K=e[24],J=e[25],W=e[26],G=e[27],z=e[28],R=e[29],L=e[30],ie=e[31],U=e[32],S=e[33],$=e[34],A=e[35],T=e[36],I=e[37];let F;e[121]!==_||e[122]!==r?(F=_&&t.jsxs("p",{className:"mt-1 flex items-center gap-1 text-warning",children:[t.jsx(ot,{size:12,className:"shrink-0"}),r("assets.replace.ratioWarning")]}),e[121]=_,e[122]=r,e[123]=F):F=e[123];let V;e[124]!==D||e[125]!==F||e[126]!==L||e[127]!==ie?(V=t.jsxs("div",{className:D,children:[L,ie,F]}),e[124]=D,e[125]=F,e[126]=L,e[127]=ie,e[128]=V):V=e[128];let O;e[129]!==V||e[130]!==U||e[131]!==S||e[132]!==$?(O=t.jsxs("div",{className:U,children:[S,$,V]}),e[129]=V,e[130]=U,e[131]=S,e[132]=$,e[133]=O):O=e[133];let E;e[134]!==O||e[135]!==A||e[136]!==T||e[137]!==I?(E=t.jsxs("div",{className:A,children:[T,I,O]}),e[134]=O,e[135]=A,e[136]=T,e[137]=I,e[138]=E):E=e[138];let me;e[139]!==o||e[140]!==r?(me=r(o?"assets.replace.cacheNote":"assets.replace.compareHint"),e[139]=o,e[140]=r,e[141]=me):me=e[141];let te;e[142]!==me?(te=t.jsx("p",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:me}),e[142]=me,e[143]=te):te=e[143];const le=n.isPending;let B;e[144]!==r?(B=r("assets.replace.cancel"),e[144]=r,e[145]=B):B=e[145];let Y;e[146]!==v||e[147]!==B||e[148]!==n.isPending?(Y=t.jsx(be,{type:"button",variant:"ghost",size:"sm",disabled:le,onClick:v,children:B}),e[146]=v,e[147]=B,e[148]=n.isPending,e[149]=Y):Y=e[149];const Q=!o||!k||n.isPending;let H;e[150]!==n.isPending?(H=n.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[150]=n.isPending,e[151]=H):H=e[151];let q;e[152]!==r||e[153]!==n.isPending?(q=n.isPending?r("assets.replace.replacing"):r("assets.replace.confirm"),e[152]=r,e[153]=n.isPending,e[154]=q):q=e[154];let re;e[155]!==N||e[156]!==Q||e[157]!==H||e[158]!==q?(re=t.jsxs(be,{type:"button",size:"sm",disabled:Q,onClick:N,children:[H,q]}),e[155]=N,e[156]=Q,e[157]=H,e[158]=q,e[159]=re):re=e[159];let ne;e[160]!==te||e[161]!==Y||e[162]!==re?(ne=t.jsxs(cs,{className:"flex-row items-center gap-2 px-6 pb-5 pt-1",children:[te,Y,re]}),e[160]=te,e[161]=Y,e[162]=re,e[163]=ne):ne=e[163];let Z;e[164]!==s.key?(Z=js(s.key),e[164]=s.key,e[165]=Z):Z=e[165];let ce;e[166]!==y?(ce=ee=>{const xe=ee.target.files?.[0];ee.target.value="",y(xe)},e[166]=y,e[167]=ce):ce=e[167];let oe;e[168]!==Z||e[169]!==ce?(oe=t.jsx("input",{ref:w,type:"file",className:"hidden",accept:Z,onChange:ce}),e[168]=Z,e[169]=ce,e[170]=oe):oe=e[170];let ae;e[171]!==C||e[172]!==M||e[173]!==K||e[174]!==J||e[175]!==W||e[176]!==G||e[177]!==E||e[178]!==ne||e[179]!==oe?(ae=t.jsxs(C,{side:M,container:K,className:J,children:[W,G,E,ne,oe]}),e[171]=C,e[172]=M,e[173]=K,e[174]=J,e[175]=W,e[176]=G,e[177]=E,e[178]=ne,e[179]=oe,e[180]=ae):ae=e[180];let fe;return e[181]!==P||e[182]!==z||e[183]!==R||e[184]!==ae?(fe=t.jsx(P,{open:z,onOpenChange:R,children:ae}),e[181]=P,e[182]=z,e[183]=R,e[184]=ae,e[185]=fe):fe=e[185],fe}function vs(c){const e=de.c(47),{configId:i,item:s,onClose:a,onDeleted:f}=c,l=Ge(),r=St();let n;e[0]!==i||e[1]!==r||e[2]!==s||e[3]!==a||e[4]!==f||e[5]!==l?(n=async function(){if(s)try{await r.mutateAsync({configId:i,key:s.key}),Ee.success(l("assets.browser.deleted")),f(s.key),a()}catch{Ee.error(l("assets.browser.deleteFailed"))}},e[0]=i,e[1]=r,e[2]=s,e[3]=a,e[4]=f,e[5]=l,e[6]=n):n=e[6];const o=n,p=!!s;let m;e[7]!==a?(m=M=>!M&&a(),e[7]=a,e[8]=m):m=e[8];let u;e[9]!==l?(u=l("assets.browser.deleteConfirmTitle"),e[9]=l,e[10]=u):u=e[10];let d;e[11]!==u?(d=t.jsx(ut,{children:u}),e[11]=u,e[12]=d):d=e[12];let h;e[13]!==s||e[14]!==l?(h=l("assets.browser.deleteConfirmDescription",{name:s?Je(s.key):""}),e[13]=s,e[14]=l,e[15]=h):h=e[15];let g;e[16]!==h?(g=t.jsx(xt,{children:h}),e[16]=h,e[17]=g):g=e[17];let j;e[18]!==d||e[19]!==g?(j=t.jsxs(gt,{children:[d,g]}),e[18]=d,e[19]=g,e[20]=j):j=e[20];const b=r.isPending;let x;e[21]!==l?(x=l("assets.browser.deleteCancel"),e[21]=l,e[22]=x):x=e[22];let w;e[23]!==r.isPending||e[24]!==x?(w=t.jsx(ht,{disabled:b,children:x}),e[23]=r.isPending,e[24]=x,e[25]=w):w=e[25];const C=r.isPending;let P;e[26]!==o?(P=M=>{M.preventDefault(),o()},e[26]=o,e[27]=P):P=e[27];let y;e[28]!==r.isPending?(y=r.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[28]=r.isPending,e[29]=y):y=e[29];let v;e[30]!==l?(v=l("assets.browser.deleteConfirm"),e[30]=l,e[31]=v):v=e[31];let N;e[32]!==r.isPending||e[33]!==P||e[34]!==y||e[35]!==v?(N=t.jsxs(jt,{variant:"destructive",disabled:C,onClick:P,children:[y,v]}),e[32]=r.isPending,e[33]=P,e[34]=y,e[35]=v,e[36]=N):N=e[36];let k;e[37]!==w||e[38]!==N?(k=t.jsxs(bt,{children:[w,N]}),e[37]=w,e[38]=N,e[39]=k):k=e[39];let _;e[40]!==k||e[41]!==j?(_=t.jsxs(yt,{children:[j,k]}),e[40]=k,e[41]=j,e[42]=_):_=e[42];let D;return e[43]!==_||e[44]!==p||e[45]!==m?(D=t.jsx(kt,{open:p,onOpenChange:m,children:_}),e[43]=_,e[44]=p,e[45]=m,e[46]=D):D=e[46],D}function Ps(c){const e=de.c(8),{virtualMcpId:i}=c,s=Kt(i),a=Vt();let f;e[0]!==a||e[1]!==s?(f=Xt(a,Rt(s),s?.metadata?.assetStorageConfigId),e[0]=a,e[1]=s,e[2]=f):f=e[2];const l=f;if(!l){let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ns,{}),e[3]=n):n=e[3],n}if(Zt(s)){let n;return e[4]!==l?(n=t.jsx(ms,{config:l}),e[4]=l,e[5]=n):n=e[5],n}let r;return e[6]!==l?(r=t.jsx(ws,{config:l}),e[6]=l,e[7]=r):r=e[7],r}function Ns(){const c=de.c(12),e=Ge();let i;c[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:t.jsx(Wt,{size:20,className:"text-muted-foreground"})}),c[0]=i):i=c[0];let s;c[1]!==e?(s=e("assets.browser.noBucketTitle"),c[1]=e,c[2]=s):s=c[2];let a;c[3]!==s?(a=t.jsx("p",{className:"text-sm font-medium",children:s}),c[3]=s,c[4]=a):a=c[4];let f;c[5]!==e?(f=e("assets.browser.noBucketDescription"),c[5]=e,c[6]=f):f=c[6];let l;c[7]!==f?(l=t.jsx("p",{className:"mt-1 max-w-sm text-xs text-muted-foreground",children:f}),c[7]=f,c[8]=l):l=c[8];let r;return c[9]!==a||c[10]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-0 flex-col items-center justify-center gap-3 p-10 text-center",children:[i,t.jsxs("div",{children:[a,l]})]}),c[9]=a,c[10]=l,c[11]=r):r=c[11],r}function ws(c){const e=de.c(99),{config:i}=c,s=Ge(),[a,f]=se.useState(""),l=Dt(a,300);let r;e[0]!==i.id||e[1]!==l?(r={configId:i.id,search:l},e[0]=i.id,e[1]=l,e[2]=r):r=e[2];const n=_t(r),o=nt(),[p,m]=se.useState(!1),[u,d]=se.useState(null),h=se.useRef(null);let g;e[3]!==i.id||e[4]!==n||e[5]!==s||e[6]!==o?(g=async function(S){if(!S)return;const $=Array.from(S);if($.length===0)return;const A=[];for(const T of $)try{await o.mutateAsync({configId:i.id,file:T})}catch(I){const F=I;A.push(`${T.name} (${F instanceof Error?F.message:"upload failed"})`)}await n.refetch(),A.length>0&&Ee.error(A.length===$.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:A.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:A.join("; ")}))},e[3]=i.id,e[4]=n,e[5]=s,e[6]=o,e[7]=g):g=e[7];const j=g;let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=function(S){S.preventDefault(),m(!0)},e[8]=b):b=e[8];const x=b;let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=function(){m(!1)},e[9]=w):w=e[9];const C=w;let P;e[10]!==j?(P=function(S){S.preventDefault(),S.stopPropagation(),m(!1),j(S.dataTransfer.files)},e[10]=j,e[11]=P):P=e[11];const y=P,[v,N]=dt();let k,_,D,M,K,J,W;if(e[12]!==i.name||e[13]!==l||e[14]!==N||e[15]!==v||e[16]!==j||e[17]!==p||e[18]!==n||e[19]!==y||e[20]!==a||e[21]!==s||e[22]!==o.isPending){const U=n.data?.pages??[],S=U.some(_s),$=U.flatMap(Ds),A=Ft($,zt(v)),T=l.trim(),I=a!==l||n.isFetching&&!n.isFetchingNextPage;W="flex h-full min-h-0 flex-col gap-3 p-4";let F;e[30]!==s?(F=s("assets.browser.title"),e[30]=s,e[31]=F):F=e[31];let V;e[32]!==F?(V=t.jsx("h2",{className:"text-sm font-semibold",children:F}),e[32]=F,e[33]=V):V=e[33];let O;e[34]!==i.name||e[35]!==s?(O=s("assets.browser.bucketLabel",{name:i.name}),e[34]=i.name,e[35]=s,e[36]=O):O=e[36];let E;e[37]!==O?(E=t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:O}),e[37]=O,e[38]=E):E=e[38];let me;e[39]!==V||e[40]!==E?(me=t.jsxs("div",{className:"min-w-0",children:[V,E]}),e[39]=V,e[40]=E,e[41]=me):me=e[41];let te;e[42]===Symbol.for("react.memo_cache_sentinel")?(te=()=>h.current?.click(),e[42]=te):te=e[42];let le;e[43]!==o.isPending?(le=o.isPending?t.jsx(Ke,{className:"size-3.5"}):t.jsx(Ze,{size:14}),e[43]=o.isPending,e[44]=le):le=e[44];let B;e[45]!==s||e[46]!==o.isPending?(B=o.isPending?s("filePicker.filePickerDialog.uploading"):s("filePicker.filePickerDialog.dropFilesOrClick"),e[45]=s,e[46]=o.isPending,e[47]=B):B=e[47];let Y;e[48]!==le||e[49]!==B||e[50]!==o.isPending?(Y=t.jsxs(be,{type:"button",size:"sm",disabled:o.isPending,onClick:te,children:[le,B]}),e[48]=le,e[49]=B,e[50]=o.isPending,e[51]=Y):Y=e[51];let Q;e[52]!==j?(Q=t.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:ee=>{const xe=Array.from(ee.target.files??[]);ee.target.value="",j(xe)}}),e[52]=j,e[53]=Q):Q=e[53],e[54]!==me||e[55]!==Y||e[56]!==Q?(k=t.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3",children:[me,Y,Q]}),e[54]=me,e[55]=Y,e[56]=Q,e[57]=k):k=e[57];let H;e[58]!==s?(H=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[58]=s,e[59]=H):H=e[59],e[60]!==I||e[61]!==a||e[62]!==H?(_=t.jsx(wt,{value:a,onChange:f,isSearching:I,placeholder:H,className:"shrink-0"}),e[60]=I,e[61]=a,e[62]=H,e[63]=_):_=e[63];let q;e[64]===Symbol.for("react.memo_cache_sentinel")?(q=()=>h.current?.click(),e[64]=q):q=e[64];const re=p&&"border-primary bg-primary/5",ne=o.isPending&&"pointer-events-none opacity-60";let Z;e[65]!==re||e[66]!==ne?(Z=lt("flex shrink-0 flex-col items-center justify-center gap-1 rounded-xl border border-dashed border-border/60 p-4 text-center transition-colors",re,ne),e[65]=re,e[66]=ne,e[67]=Z):Z=e[67];let ce;e[68]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx(Ze,{size:16,className:"text-muted-foreground"}),e[68]=ce):ce=e[68];let oe;e[69]!==s?(oe=s("filePicker.filePickerDialog.dropFilesOrClick"),e[69]=s,e[70]=oe):oe=e[70];let ae;e[71]!==s?(ae=s("filePicker.filePickerDialog.uploadSizeLimit"),e[71]=s,e[72]=ae):ae=e[72];let fe;e[73]!==oe||e[74]!==ae?(fe=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[oe," ",ae]}),e[73]=oe,e[74]=ae,e[75]=fe):fe=e[75],e[76]!==y||e[77]!==Z||e[78]!==fe?(D=t.jsxs("button",{type:"button",onClick:q,onDragOver:x,onDragLeave:C,onDrop:y,className:Z,children:[ce,fe]}),e[76]=y,e[77]=Z,e[78]=fe,e[79]=D):D=e[79],M="min-h-0 flex-1 overflow-y-auto pr-1",K=S||n.isError?t.jsx(Jt,{denied:S,retrying:n.isFetching,onRetry:()=>{n.refetch()}}):null,J=$.length===0?n.isPending||n.isError||S?null:T?t.jsx(ft,{title:s("filePicker.filePickerDialog.noMatches",{query:T}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):t.jsx(ft,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):t.jsx("div",{ref:N,className:"flex items-start gap-3",children:A.map((ee,xe)=>t.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:ee.map(ge=>t.jsx(Ss,{item:ge,onDelete:()=>d(ge)},ge.key))},xe))}),e[12]=i.name,e[13]=l,e[14]=N,e[15]=v,e[16]=j,e[17]=p,e[18]=n,e[19]=y,e[20]=a,e[21]=s,e[22]=o.isPending,e[23]=k,e[24]=_,e[25]=D,e[26]=M,e[27]=K,e[28]=J,e[29]=W}else k=e[23],_=e[24],D=e[25],M=e[26],K=e[27],J=e[28],W=e[29];let G;e[80]!==n||e[81]!==s?(G=n.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isFetchingNextPage,onClick:()=>n.fetchNextPage(),children:n.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[80]=n,e[81]=s,e[82]=G):G=e[82];let z;e[83]!==G||e[84]!==M||e[85]!==K||e[86]!==J?(z=t.jsxs("div",{className:M,children:[K,J,G]}),e[83]=G,e[84]=M,e[85]=K,e[86]=J,e[87]=z):z=e[87];let R;e[88]===Symbol.for("react.memo_cache_sentinel")?(R=()=>d(null),e[88]=R):R=e[88];let L;e[89]!==i.id||e[90]!==u?(L=t.jsx(Fs,{configId:i.id,item:u,onClose:R}),e[89]=i.id,e[90]=u,e[91]=L):L=e[91];let ie;return e[92]!==k||e[93]!==_||e[94]!==D||e[95]!==z||e[96]!==L||e[97]!==W?(ie=t.jsxs("div",{className:W,children:[k,_,D,z,L]}),e[92]=k,e[93]=_,e[94]=D,e[95]=z,e[96]=L,e[97]=W,e[98]=ie):ie=e[98],ie}function Ds(c){return c.items}function _s(c){return c.listingError==="access_denied"}function ft(c){const e=de.c(8),{title:i,description:s}=c;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(Pt,{size:18,className:"text-muted-foreground"})}),e[0]=a):a=e[0];let f;e[1]!==i?(f=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=f):f=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==f||e[6]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[a,f,l]}),e[5]=f,e[6]=l,e[7]=r):r=e[7],r}function Ss(c){const e=de.c(34),{item:i,onDelete:s}=c;let a;e[0]!==i.key?(a=et(i.key),e[0]=i.key,e[1]=a):a=e[1];const f=a;let l;e[2]!==i.key?(l=Qt(i.key),e[2]=i.key,e[3]=l):l=e[3];const r=l;let n;e[4]!==r||e[5]!==i.key||e[6]!==i.publicUrl?(n=r?t.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"block h-auto w-full",onError:Cs}):t.jsx("div",{className:"flex aspect-square items-center justify-center",children:t.jsx(rt,{size:28,className:"text-muted-foreground"})}),e[4]=r,e[5]=i.key,e[6]=i.publicUrl,e[7]=n):n=e[7];let o;e[8]!==i.key||e[9]!==i.publicUrl||e[10]!==n?(o=t.jsx("a",{href:i.publicUrl,target:"_blank",rel:"noreferrer",title:i.key,className:"block transition hover:ring-2 hover:ring-inset hover:ring-primary",children:n}),e[8]=i.key,e[9]=i.publicUrl,e[10]=n,e[11]=o):o=e[11];const p=i.key;let m;e[12]!==i.key?(m=Ct(i.key),e[12]=i.key,e[13]=m):m=e[13];let u;e[14]!==i.key||e[15]!==m?(u=t.jsx("p",{className:"truncate text-xs font-medium",title:p,children:m}),e[14]=i.key,e[15]=m,e[16]=u):u=e[16];let d;e[17]!==i.size?(d=qe(i.size),e[17]=i.size,e[18]=d):d=e[18];let h;e[19]!==f||e[20]!==d?(h=t.jsxs("p",{className:"text-2xs uppercase text-muted-foreground",children:[f," · ",d]}),e[19]=f,e[20]=d,e[21]=h):h=e[21];let g;e[22]!==u||e[23]!==h?(g=t.jsxs("div",{className:"min-w-0 flex-1",children:[u,h]}),e[22]=u,e[23]=h,e[24]=g):g=e[24];let j;e[25]!==i||e[26]!==s?(j=t.jsx(zs,{item:i,onDelete:s}),e[25]=i,e[26]=s,e[27]=j):j=e[27];let b;e[28]!==g||e[29]!==j?(b=t.jsxs("div",{className:"flex items-center gap-1 border-t border-border/60 bg-background px-2 py-1.5",children:[g,j]}),e[28]=g,e[29]=j,e[30]=b):b=e[30];let x;return e[31]!==b||e[32]!==o?(x=t.jsxs("div",{className:"group relative flex flex-col overflow-hidden rounded-lg border border-border/60 bg-muted",children:[o,b]}),e[31]=b,e[32]=o,e[33]=x):x=e[33],x}function Cs(c){c.target.style.display="none"}function zs(c){const e=de.c(36),{item:i,onDelete:s}=c,a=Ge(),[f,l]=se.useState(!1);let r;e[0]!==i.publicUrl||e[1]!==a?(r=async function(){try{await navigator.clipboard.writeText(i.publicUrl),l(!0),window.setTimeout(()=>l(!1),1500)}catch{Ee.error(a("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=a,e[2]=r):r=e[2];const n=r;let o;e[3]!==a?(o=a("filePicker.filePickerDialog.assetActions"),e[3]=a,e[4]=o):o=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Gt,{size:14}),e[5]=p):p=e[5];let m;e[6]!==o?(m=t.jsx(Lt,{asChild:!0,children:t.jsx(be,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":o,children:p})}),e[6]=o,e[7]=m):m=e[7];let u;e[8]!==f?(u=f?t.jsx(mt,{size:14}):t.jsx(vt,{size:14}),e[8]=f,e[9]=u):u=e[9];let d;e[10]!==f||e[11]!==a?(d=a(f?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[10]=f,e[11]=a,e[12]=d):d=e[12];let h;e[13]!==n||e[14]!==u||e[15]!==d?(h=t.jsxs(tt,{onClick:n,children:[u,d]}),e[13]=n,e[14]=u,e[15]=d,e[16]=h):h=e[16];const g=i.publicUrl;let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(pt,{size:14}),e[17]=j):j=e[17];let b;e[18]!==a?(b=a("filePicker.filePickerDialog.openInNewTab"),e[18]=a,e[19]=b):b=e[19];let x;e[20]!==i.publicUrl||e[21]!==b?(x=t.jsx(tt,{asChild:!0,children:t.jsxs("a",{href:g,target:"_blank",rel:"noreferrer",children:[j,b]})}),e[20]=i.publicUrl,e[21]=b,e[22]=x):x=e[22];let w;e[23]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Nt,{size:14}),e[23]=w):w=e[23];let C;e[24]!==a?(C=a("assets.browser.deleteAction"),e[24]=a,e[25]=C):C=e[25];let P;e[26]!==s||e[27]!==C?(P=t.jsxs(tt,{variant:"destructive",onClick:s,children:[w,C]}),e[26]=s,e[27]=C,e[28]=P):P=e[28];let y;e[29]!==x||e[30]!==P||e[31]!==h?(y=t.jsxs(Ot,{align:"end",children:[h,x,P]}),e[29]=x,e[30]=P,e[31]=h,e[32]=y):y=e[32];let v;return e[33]!==y||e[34]!==m?(v=t.jsxs(Et,{children:[m,y]}),e[33]=y,e[34]=m,e[35]=v):v=e[35],v}function Fs(c){const e=de.c(46),{configId:i,item:s,onClose:a}=c,f=Ge(),l=St();let r;e[0]!==i||e[1]!==l||e[2]!==s||e[3]!==a||e[4]!==f?(r=async function(){if(s)try{await l.mutateAsync({configId:i,key:s.key}),Ee.success(f("assets.browser.deleted")),a()}catch{Ee.error(f("assets.browser.deleteFailed"))}},e[0]=i,e[1]=l,e[2]=s,e[3]=a,e[4]=f,e[5]=r):r=e[5];const n=r,o=!!s;let p;e[6]!==a?(p=D=>!D&&a(),e[6]=a,e[7]=p):p=e[7];let m;e[8]!==f?(m=f("assets.browser.deleteConfirmTitle"),e[8]=f,e[9]=m):m=e[9];let u;e[10]!==m?(u=t.jsx(ut,{children:m}),e[10]=m,e[11]=u):u=e[11];let d;e[12]!==s||e[13]!==f?(d=f("assets.browser.deleteConfirmDescription",{name:s?Ct(s.key):""}),e[12]=s,e[13]=f,e[14]=d):d=e[14];let h;e[15]!==d?(h=t.jsx(xt,{children:d}),e[15]=d,e[16]=h):h=e[16];let g;e[17]!==u||e[18]!==h?(g=t.jsxs(gt,{children:[u,h]}),e[17]=u,e[18]=h,e[19]=g):g=e[19];const j=l.isPending;let b;e[20]!==f?(b=f("assets.browser.deleteCancel"),e[20]=f,e[21]=b):b=e[21];let x;e[22]!==l.isPending||e[23]!==b?(x=t.jsx(ht,{disabled:j,children:b}),e[22]=l.isPending,e[23]=b,e[24]=x):x=e[24];const w=l.isPending;let C;e[25]!==n?(C=D=>{D.preventDefault(),n()},e[25]=n,e[26]=C):C=e[26];let P;e[27]!==l.isPending?(P=l.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[27]=l.isPending,e[28]=P):P=e[28];let y;e[29]!==f?(y=f("assets.browser.deleteConfirm"),e[29]=f,e[30]=y):y=e[30];let v;e[31]!==l.isPending||e[32]!==C||e[33]!==P||e[34]!==y?(v=t.jsxs(jt,{variant:"destructive",disabled:w,onClick:C,children:[P,y]}),e[31]=l.isPending,e[32]=C,e[33]=P,e[34]=y,e[35]=v):v=e[35];let N;e[36]!==x||e[37]!==v?(N=t.jsxs(bt,{children:[x,v]}),e[36]=x,e[37]=v,e[38]=N):N=e[38];let k;e[39]!==N||e[40]!==g?(k=t.jsxs(yt,{children:[g,N]}),e[39]=N,e[40]=g,e[41]=k):k=e[41];let _;return e[42]!==k||e[43]!==o||e[44]!==p?(_=t.jsx(kt,{open:o,onOpenChange:p,children:k}),e[42]=k,e[43]=o,e[44]=p,e[45]=_):_=e[45],_}function Us(){const c=de.c(2),e=ds();let i;return c[0]!==e?(i=t.jsx(Ht,{tabId:"assets",children:t.jsx(Ps,{virtualMcpId:e})}),c[0]=e,c[1]=i):i=c[1],i}function Or(){const c=de.c(1);let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Bt.Content,{children:t.jsx(Us,{})}),c[0]=e):e=c[0],e}export{Or as default};
|
|
1
|
+
import{c as de,b as Ge,r as se,be as dt,j as t,B as be,h as Ke,m as lt,J as At,hF as Tt,a7 as ot,t as Ee,I as It,aY as mt,a9 as pt,au as Mt,aJ as ut,aK as xt,aL as gt,aM as ht,b9 as jt,aN as bt,aO as yt,aP as kt,bu as Rt,X as Lt,Y as tt,Z as Ot,_ as Et}from"./index-_v_cX_Uz.js";import{ChatLayout as Bt}from"./index-CZRVgAXr.js";import{A as Ht}from"./agent-view-guard-DtzAtZkl.js";import{e as vt,D as Wt}from"./agent-icon-1xBXRQD0.js";import{a as Gt}from"./SwitchHorizontal01-KL7mZ6la.js";import{i as rt}from"./File02-Dh6SOo4d.js";import{a as Pt}from"./Image01-RSPET2Po.js";import{s as Nt}from"./Trash01-q67Vms6R.js";import{i as Ze}from"./Upload01-BUC8UUt4.js";import{S as wt}from"./search-input-C650lN1b.js";import{b as Kt}from"./repository-binding-CaMbcDLV.js";import{u as Dt}from"./use-debounced-value-D0-3lKxq.js";import{a as Vt}from"./use-file-configs-Bj7muxL3.js";import{a as _t,u as nt,c as Ye,d as Je,f as qe,e as et,s as Yt,g as qt,p as it,h as St,B as Jt,i as Qt,b as Ct}from"./asset-utils-EHKoLUwI.js";import{m as Xt}from"./match-site-slug-config-B47_xZCi.js";import{b as Zt}from"./use-blocks-v8-project-CSboyg4V.js";import{i as es}from"./Play-7916CrEc.js";import{s as ts}from"./Plus-DA5fCRCT.js";import{s as ss}from"./Tool01-x-P519mQ.js";import{s as is}from"./XClose-BKbw2IM5.js";import{b as ls,a as rs,S as ns,d as os,c as as,e as cs}from"./sheet-BSNpAEVQ.js";import{a as Qe,T as fs}from"./toggle-group-B5NhEkmw.js";import{c as ds}from"./thread-route-DgTdTFs-.js";import"./use-mobile-C2Wa6qqh.js";import"./tooltip-2yYSYsa-.js";import"./index-DBEc0hp1.js";import"./MessageCircle01-gn4vp2uo.js";import"./thread-button-CSrnO4J2.js";import"./use-sidebar-collapsed-L0ea2Q3b.js";import"./use-chat-layout-state-BjrxY9zk.js";import"./use-panel-navigate-BUxvnLXh.js";import"./use-project-scope-BW5vvzIR.js";import"./toolbar-icon-button-slFtkrIv.js";import"./use-in-settings-DTiMI92T.js";import"./resizable-BVcChq5e.js";import"./route-page-header-Dwl09nk0.js";import"./LayoutLeft-CUvx-Pvw.js";import"./use-current-view-CTU_KTOZ.js";import"./use-mcp-client--6E0VdQ1.js";import"./auth-n3l0CNa5.js";import"./use-main-panel-tabs-DQP_KfHN.js";import"./Monitor01-D0Bxj-fe.js";import"./use-connection-DXrrdGow.js";import"./use-mcp-tools-DGaS62Fn.js";import"./types-C-gTijki.js";import"./utils-CVEq3hMx.js";import"./agent-capabilities-B_vVx4Z2.js";import"./index-DdcMEgo_.js";import"./ArrowUp-DwmUsoz4.js";import"./chat-context-SiB3iaPb.js";import"./use-view-draft-kind-Dog_0xGP.js";import"./use-blog-view-7SxY0DSD.js";import"./use-organization-settings-D19qndSA.js";import"./schema-XQ38kn3Z.js";import"./task-board-DFizZUve.js";import"./thread-intent-AFleKGnm.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C3KG4d2d.js";import"./session-runtime-CoMtO0vP.js";import"./use-entitlements-C0Jnglmb.js";import"./use-ai-providers-DBMFXH54.js";import"./use-decopilot-events-ia2U1D-_.js";import"./input-DVGC51NU.js";import"./usage-stats-BeZTZSlb.js";import"./markdown-6Y7kRU0S.js";import"./use-copy-C9KqfKbD.js";import"./gateway-client-MCgSJtiT.js";import"./form-tdA5bJ97.js";import"./label-BPobXy5D.js";import"./icon-button-B1n86T_T.js";import"./file-type-icon-DHed-Vbt.js";import"./chat-draft-DZb5RXeg.js";import"./use-voice-input-Cml6WhPe.js";import"./popover-SbxIMG75.js";import"./drawer-CHLTZ7IE.js";import"./ChevronDown-CM9Urfsd.js";import"./UserCheck01-BxAZblZb.js";import"./index-zfbeX5vo.js";import"./checkbox-2zvTb6ww.js";import"./Minus-DN5eCgUQ.js";import"./select-BAD2nCs0.js";import"./index-BdQq_4o_.js";import"./ChevronUp--3SHAUXV.js";import"./ArrowLeft-ClkcoIX4.js";import"./ChevronSelectorVertical-r9NWov70.js";import"./Key01-L7povfCu.js";import"./SearchMd-BPdzWKZu.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./AlertCircle-k-5O6cw_.js";import"./Eye-BoqAJmT6.js";import"./ArrowRight-D62IR3mi.js";import"./BookOpen01-BtddYmqo.js";import"./UserSquare-2uLtK5zL.js";import"./tabs-ByjyyO35.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-BlcIIio7.js";import"./input-rwnUX4xK.js";import"./suggestion-CX1YVdIt.js";import"./use-mcp-prompts-DZL7WNWx.js";import"./use-org-fs-elhmqDGC.js";import"./useInfiniteQuery-D0bLDkrM.js";import"./infiniteQueryObserver-BjuIdZaK.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-QNpgcQyq.js";import"./plan-ladder-CbTEVjlC.js";import"./add-connection-dialog-BgsYTqB2.js";import"./collection-search-OTIoM0sQ.js";import"./extract-connection-data-DlPXjE5Z.js";import"./metadata-D72DunRR.js";import"./connection-D7qO0DS_.js";import"./url-slug-lJqSTlr5.js";import"./connection-card-DLq506jh.js";import"./connection-slug-Cz4zCQv8.js";import"./integration-icon-DMudGnaH.js";import"./LinkBroken01-JVhKBnEM.js";import"./textarea-BG3_jDPK.js";import"./schema-CkOMMSLb.js";import"./connection-form-helpers-DgyNgCMk.js";import"./authenticate-and-persist-oauth-wfBLEPa1.js";import"./mcp-oauth-dNTY3RLT.js";import"./mcp-oauth-CuTkV8Yh.js";import"./collection-tabs-CeLcBMHA.js";import"./badge-qzONP_je.js";import"./use-infinite-scroll-C-Jtx_R8.js";import"./useSuspenseInfiniteQuery-DUNAnJxH.js";import"./use-task-board-items-DJs5p39s.js";import"./pair-dE3C8WhI.js";import"./collapsible-CGEFlpDq.js";import"./task-key-jbMkJ-gq.js";import"./config-3CnG3YfD.js";import"./CheckCircle-Cp5xjlw-.js";import"./task-route-jGx8dPBi.js";import"./project-index-C0zTM-WA.js";import"./TrendUp01-CXnsnsUU.js";import"./shell-layout-C2FEOZHE.js";import"./Globe04-DYHS72xm.js";import"./use-deployment-admin-DMzm770d.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BmGI5AoV.js";import"./Zap-iZQqC26K.js";import"./command-n87yBV6H.js";import"./index-8J9eeoYX.js";import"./project-icon-m6Ad1m7q.js";import"./use-navigate-to-agent-Blb_gT0Z.js";import"./new-project-dialog-BF76iYqU.js";import"./repository-picker-CtTW0G31.js";import"./github-icon-BSdAKSFL.js";import"./ShoppingBag01-BhOTMWsh.js";import"./new-project-store-DWxCJQOo.js";import"./legacy-admin-welcome-dialog-DR6IgoHi.js";import"./required-auth-layout-AmJ1uTFt.js";import"./use-org-sso-D0oSmb0Y.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DRWpmXqd.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-BXUBmrcQ.js";import"./use-sandbox-events-xbG28nOp.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-DERG1JDa.js";import"./use-task-metadata-wSSRfe9l.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-D6vX4rCD.js";import"./virtual-mcp-C1YM4Fvh.js";import"./CreditCard01-DVqX0918.js";import"./Fingerprint04-YAruy68-.js";import"./Sun-CcLmZkDa.js";import"./Users01-GuAUZTSm.js";function zt(c){return c<0||c<640?2:c<768?3:c<1024?4:5}function Ft(c,e){const i=Array.from({length:e},()=>[]);return c.forEach((s,a)=>i[a%e].push(s)),i}function ms(c){const e=de.c(156),{config:i}=c,s=Ge(),[a,f]=se.useState(""),l=Dt(a,300);let r;e[0]!==i.id||e[1]!==l?(r={configId:i.id,search:l},e[0]=i.id,e[1]=l,e[2]=r):r=e[2];const n=_t(r),o=nt(),[p,m]=se.useState("all"),[u,d]=se.useState(null),[h,g]=se.useState(!1),[j,b]=se.useState(null),[x,w]=se.useState(null),[C,P]=se.useState(null),y=se.useRef(null);let v;e[3]!==i.id||e[4]!==n||e[5]!==s||e[6]!==o?(v=async function(X){if(!X)return;const he=Array.from(X);if(he.length===0)return;const je=[];for(const Fe of he)try{await o.mutateAsync({configId:i.id,file:Fe})}catch(Ue){const ue=Ue;je.push(`${Fe.name} (${ue instanceof Error?ue.message:"upload failed"})`)}await n.refetch(),je.length>0&&Ee.error(je.length===he.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:je.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:je.join("; ")}))},e[3]=i.id,e[4]=n,e[5]=s,e[6]=o,e[7]=v):v=e[7];const N=v;let k;e[8]===Symbol.for("react.memo_cache_sentinel")?(k=function(X){X.preventDefault(),g(!0)},e[8]=k):k=e[8];const _=k;let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=function(X){X.currentTarget.contains(X.relatedTarget)||g(!1)},e[9]=D):D=e[9];const M=D;let K;e[10]!==N?(K=function(X){X.preventDefault(),X.stopPropagation(),g(!1),N(X.dataTransfer.files)},e[10]=N,e[11]=K):K=e[11];const J=K,[W,G]=dt();let z,R,L,ie,U,S,$,A,T,I,F;if(e[12]!==i.name||e[13]!==l||e[14]!==G||e[15]!==W||e[16]!==p||e[17]!==n.data?.pages||e[18]!==n.isFetching||e[19]!==n.isFetchingNextPage||e[20]!==J||e[21]!==a||e[22]!==u||e[23]!==s){const X=(n.data?.pages??[]).flatMap(ps),he=p==="all"?X:X.filter(Re=>Ye(Re.key)===p),je=Ft(he,zt(W));z=he.find(Re=>Re.key===u)??null;const Fe=l.trim(),Ue=a!==l||n.isFetching&&!n.isFetchingNextPage;S=P,$="relative flex h-full min-h-0 overflow-hidden",ie="flex min-w-0 flex-1 flex-col";let ue;e[35]!==s?(ue=s("assets.browser.title"),e[35]=s,e[36]=ue):ue=e[36];let ke;e[37]!==ue?(ke=t.jsx("h2",{className:"text-sm font-semibold",children:ue}),e[37]=ue,e[38]=ke):ke=e[38];let ve;e[39]!==i.name||e[40]!==s?(ve=s("assets.browser.bucketLabel",{name:i.name}),e[39]=i.name,e[40]=s,e[41]=ve):ve=e[41];let Pe;e[42]!==ve?(Pe=t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:ve}),e[42]=ve,e[43]=Pe):Pe=e[43];let Ne;e[44]!==ke||e[45]!==Pe?(Ne=t.jsxs("div",{className:"min-w-0 flex-1",children:[ke,Pe]}),e[44]=ke,e[45]=Pe,e[46]=Ne):Ne=e[46];let we;e[47]!==s?(we=s("assets.browser.filterLabel"),e[47]=s,e[48]=we):we=e[48];let We;e[49]===Symbol.for("react.memo_cache_sentinel")?(We=Re=>{(Re==="all"||Re==="image"||Re==="video"||Re==="document")&&m(Re)},e[49]=We):We=e[49];let Le;e[50]!==s?(Le=s("assets.browser.filterAll"),e[50]=s,e[51]=Le):Le=e[51];let De;e[52]!==Le?(De=t.jsx(Qe,{value:"all",children:Le}),e[52]=Le,e[53]=De):De=e[53];let _e;e[54]!==s?(_e=s("assets.browser.filterImages"),e[54]=s,e[55]=_e):_e=e[55];let Se;e[56]!==_e?(Se=t.jsx(Qe,{value:"image",children:_e}),e[56]=_e,e[57]=Se):Se=e[57];let Ie;e[58]!==s?(Ie=s("assets.browser.filterVideos"),e[58]=s,e[59]=Ie):Ie=e[59];let Me;e[60]!==Ie?(Me=t.jsx(Qe,{value:"video",children:Ie}),e[60]=Ie,e[61]=Me):Me=e[61];let Ce;e[62]!==s?(Ce=s("assets.browser.filterDocuments"),e[62]=s,e[63]=Ce):Ce=e[63];let ze;e[64]!==Ce?(ze=t.jsx(Qe,{value:"document",children:Ce}),e[64]=Ce,e[65]=ze):ze=e[65];let pe;e[66]!==p||e[67]!==we||e[68]!==De||e[69]!==Se||e[70]!==Me||e[71]!==ze?(pe=t.jsxs(fs,{type:"single",variant:"segmented",size:"sm",value:p,"aria-label":we,onValueChange:We,children:[De,Se,Me,ze]}),e[66]=p,e[67]=we,e[68]=De,e[69]=Se,e[70]=Me,e[71]=ze,e[72]=pe):pe=e[72];let $e;e[73]!==s?($e=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[73]=s,e[74]=$e):$e=e[74];let Oe;e[75]!==Ue||e[76]!==a||e[77]!==$e?(Oe=t.jsx(wt,{value:a,onChange:f,isSearching:Ue,placeholder:$e,className:"w-56 shrink-0"}),e[75]=Ue,e[76]=a,e[77]=$e,e[78]=Oe):Oe=e[78],e[79]!==Ne||e[80]!==pe||e[81]!==Oe?(U=t.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-3 px-4 pb-3 pt-4",children:[Ne,pe,Oe]}),e[79]=Ne,e[80]=pe,e[81]=Oe,e[82]=U):U=e[82],I="relative min-h-0 flex-1",F=_,R=M,L=J,A="absolute inset-0 overflow-y-auto px-4 pb-24",T=X.length===0?Fe?t.jsx(st,{title:s("filePicker.filePickerDialog.noMatches",{query:Fe}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):t.jsx(st,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):he.length===0?t.jsx(st,{title:s("assets.browser.emptyFilterTitle"),description:s("assets.browser.emptyFilterDescription")}):t.jsx("div",{ref:G,className:"flex items-start gap-2.5",children:je.map((Re,$t)=>t.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-2.5",children:Re.map(Ve=>t.jsx(xs,{item:Ve,selected:Ve.key===u,onSelect:()=>d(Ve.key===u?null:Ve.key)},Ve.key))},$t))}),e[12]=i.name,e[13]=l,e[14]=G,e[15]=W,e[16]=p,e[17]=n.data?.pages,e[18]=n.isFetching,e[19]=n.isFetchingNextPage,e[20]=J,e[21]=a,e[22]=u,e[23]=s,e[24]=z,e[25]=R,e[26]=L,e[27]=ie,e[28]=U,e[29]=S,e[30]=$,e[31]=A,e[32]=T,e[33]=I,e[34]=F}else z=e[24],R=e[25],L=e[26],ie=e[27],U=e[28],S=e[29],$=e[30],A=e[31],T=e[32],I=e[33],F=e[34];let V;e[83]!==n||e[84]!==s?(V=n.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isFetchingNextPage,onClick:()=>n.fetchNextPage(),children:n.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[83]=n,e[84]=s,e[85]=V):V=e[85];let O;e[86]!==V||e[87]!==A||e[88]!==T?(O=t.jsxs("div",{className:A,children:[T,V]}),e[86]=V,e[87]=A,e[88]=T,e[89]=O):O=e[89];let E;e[90]!==h||e[91]!==s?(E=h&&t.jsx("div",{className:"pointer-events-none absolute inset-2 flex items-center justify-center rounded-xl border-2 border-dashed border-primary bg-primary/5 text-sm font-medium text-primary",children:s("assets.browser.dropToUpload")}),e[90]=h,e[91]=s,e[92]=E):E=e[92];const me=o.isPending;let te;e[93]===Symbol.for("react.memo_cache_sentinel")?(te=()=>y.current?.click(),e[93]=te):te=e[93];let le;e[94]===Symbol.for("react.memo_cache_sentinel")?(le=t.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-white/70 text-foreground dark:bg-black/25",children:t.jsx(ts,{size:16})}),e[94]=le):le=e[94];let B;e[95]!==s?(B=s("assets.browser.uploadBarHint"),e[95]=s,e[96]=B):B=e[96];let Y;e[97]!==s?(Y=s("filePicker.filePickerDialog.uploadSizeLimit"),e[97]=s,e[98]=Y):Y=e[98];let Q;e[99]!==Y?(Q=t.jsxs("span",{className:"text-foreground/50 dark:text-foreground/70",children:[" · ",Y]}),e[99]=Y,e[100]=Q):Q=e[100];let H;e[101]!==B||e[102]!==Q?(H=t.jsxs("span",{className:"truncate",children:[B,Q]}),e[101]=B,e[102]=Q,e[103]=H):H=e[103];let q;e[104]!==H||e[105]!==o.isPending?(q=t.jsxs("button",{type:"button",disabled:me,onClick:te,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-full text-left text-sm text-foreground/75 disabled:opacity-60 dark:text-foreground dark:[text-shadow:0_1px_3px_rgb(0_0_0/0.5)]",children:[le,H]}),e[104]=H,e[105]=o.isPending,e[106]=q):q=e[106];let re;e[107]===Symbol.for("react.memo_cache_sentinel")?(re=()=>y.current?.click(),e[107]=re):re=e[107];let ne;e[108]!==o.isPending?(ne=o.isPending?t.jsx(Ke,{className:"size-3.5"}):t.jsx(Ze,{size:14}),e[108]=o.isPending,e[109]=ne):ne=e[109];let Z;e[110]!==s||e[111]!==o.isPending?(Z=o.isPending?s("filePicker.filePickerDialog.uploading"):s("assets.browser.upload"),e[110]=s,e[111]=o.isPending,e[112]=Z):Z=e[112];let ce;e[113]!==ne||e[114]!==Z||e[115]!==o.isPending?(ce=t.jsxs(be,{type:"button",size:"sm",disabled:o.isPending,onClick:re,children:[ne,Z]}),e[113]=ne,e[114]=Z,e[115]=o.isPending,e[116]=ce):ce=e[116];let oe;e[117]!==q||e[118]!==ce?(oe=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center px-4",children:t.jsxs("div",{className:"pointer-events-auto flex w-full max-w-xl items-center gap-2 rounded-full bg-white/45 p-1.5 shadow-[inset_0_1px_0_rgb(255_255_255/0.6),inset_0_0_0_1px_rgb(255_255_255/0.3),0_12px_40px_rgb(0_0_0/0.18)] backdrop-blur-2xl backdrop-saturate-180 dark:bg-white/12 dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.25),inset_0_0_0_1px_rgb(255_255_255/0.12),0_12px_40px_rgb(0_0_0/0.4)]",children:[q,ce]})}),e[117]=q,e[118]=ce,e[119]=oe):oe=e[119];let ae;e[120]!==R||e[121]!==L||e[122]!==O||e[123]!==E||e[124]!==oe||e[125]!==I||e[126]!==F?(ae=t.jsxs("div",{className:I,onDragOver:F,onDragLeave:R,onDrop:L,children:[O,E,oe]}),e[120]=R,e[121]=L,e[122]=O,e[123]=E,e[124]=oe,e[125]=I,e[126]=F,e[127]=ae):ae=e[127];let fe;e[128]!==N?(fe=t.jsx("input",{ref:y,type:"file",multiple:!0,className:"hidden",onChange:ye=>{const X=Array.from(ye.target.files??[]);ye.target.value="",N(X)}}),e[128]=N,e[129]=fe):fe=e[129];let ee;e[130]!==ie||e[131]!==U||e[132]!==ae||e[133]!==fe?(ee=t.jsxs("div",{className:ie,children:[U,ae,fe]}),e[130]=ie,e[131]=U,e[132]=ae,e[133]=fe,e[134]=ee):ee=e[134];let xe;e[135]!==z?(xe=z&&t.jsx(gs,{item:z,onClose:()=>d(null),onReplace:()=>{w(z),d(null)},onDelete:()=>b(z)},z.key),e[135]=z,e[136]=xe):xe=e[136];let ge;e[137]!==i.id||e[138]!==n||e[139]!==C||e[140]!==x?(ge=x&&t.jsx(ks,{configId:i.id,item:x,container:C,onClose:()=>{d(x.key),w(null)},onReplaced:()=>n.refetch()},x.key),e[137]=i.id,e[138]=n,e[139]=C,e[140]=x,e[141]=ge):ge=e[141];let Be;e[142]===Symbol.for("react.memo_cache_sentinel")?(Be=()=>b(null),e[142]=Be):Be=e[142];let Ae;e[143]!==u?(Ae=ye=>{ye===u&&d(null)},e[143]=u,e[144]=Ae):Ae=e[144];let Te;e[145]!==i.id||e[146]!==j||e[147]!==Ae?(Te=t.jsx(vs,{configId:i.id,item:j,onClose:Be,onDeleted:Ae}),e[145]=i.id,e[146]=j,e[147]=Ae,e[148]=Te):Te=e[148];let He;return e[149]!==S||e[150]!==$||e[151]!==ee||e[152]!==xe||e[153]!==ge||e[154]!==Te?(He=t.jsxs("div",{ref:S,className:$,children:[ee,xe,ge,Te]}),e[149]=S,e[150]=$,e[151]=ee,e[152]=xe,e[153]=ge,e[154]=Te,e[155]=He):He=e[155],He}function ps(c){return c.items}function st(c){const e=de.c(8),{title:i,description:s}=c;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(Pt,{size:18,className:"text-muted-foreground"})}),e[0]=a):a=e[0];let f;e[1]!==i?(f=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=f):f=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==f||e[6]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[a,f,l]}),e[5]=f,e[6]=l,e[7]=r):r=e[7],r}function Ut(c){const e=de.c(21),{item:i,controls:s,onDimensions:a}=c,f=Ye(i.key);if(f==="image"){let r;e[0]!==i.lastModified||e[1]!==i.publicUrl?(r=it(i.publicUrl,i.lastModified),e[0]=i.lastModified,e[1]=i.publicUrl,e[2]=r):r=e[2];let n;e[3]!==i.key?(n=Je(i.key),e[3]=i.key,e[4]=n):n=e[4];let o;e[5]!==a?(o=m=>a?.(m.currentTarget.naturalWidth,m.currentTarget.naturalHeight),e[5]=a,e[6]=o):o=e[6];let p;return e[7]!==r||e[8]!==n||e[9]!==o?(p=t.jsx("img",{src:r,alt:n,loading:"lazy",className:"block h-auto w-full",onLoad:o,onError:us}),e[7]=r,e[8]=n,e[9]=o,e[10]=p):p=e[10],p}if(f==="video"){let r;e[11]!==i.lastModified||e[12]!==i.publicUrl?(r=it(i.publicUrl,i.lastModified),e[11]=i.lastModified,e[12]=i.publicUrl,e[13]=r):r=e[13];const n=`${r}#t=0.1`;let o;e[14]!==a?(o=m=>a?.(m.currentTarget.videoWidth,m.currentTarget.videoHeight),e[14]=a,e[15]=o):o=e[15];let p;return e[16]!==s||e[17]!==n||e[18]!==o?(p=t.jsx("video",{src:n,preload:"metadata",muted:!0,playsInline:!0,controls:s,className:"block h-auto w-full",onLoadedMetadata:o}),e[16]=s,e[17]=n,e[18]=o,e[19]=p):p=e[19],p}let l;return e[20]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex aspect-[4/3] items-center justify-center",children:t.jsx(rt,{size:32,className:"text-muted-foreground"})}),e[20]=l):l=e[20],l}function us(c){c.currentTarget.style.display="none"}function xs(c){const e=de.c(34),{item:i,selected:s,onSelect:a}=c,f=Ge();let l,r,n,o,p;e[0]!==i.key||e[1]!==a||e[2]!==s||e[3]!==f?(l=Je(i.key),r="button",n=a,o=s,p=f("assets.browser.selectAsset",{name:l}),e[0]=i.key,e[1]=a,e[2]=s,e[3]=f,e[4]=l,e[5]=r,e[6]=n,e[7]=o,e[8]=p):(l=e[4],r=e[5],n=e[6],o=e[7],p=e[8]);const m=s?"ring-2 ring-foreground":"shadow-edge hover:ring-2 hover:ring-border";let u;e[9]!==m?(u=lt("group relative block w-full overflow-hidden rounded-xl bg-muted text-left outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring",m),e[9]=m,e[10]=u):u=e[10];let d;e[11]!==i?(d=t.jsx(Ut,{item:i}),e[11]=i,e[12]=d):d=e[12];let h;e[13]!==i.key?(h=Ye(i.key)==="video"&&t.jsx("span",{className:"absolute left-2 top-2 flex size-7 items-center justify-center rounded-full bg-black/45 text-white",children:t.jsx(es,{size:12})}),e[13]=i.key,e[14]=h):h=e[14];let g;e[15]!==l?(g=t.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:l}),e[15]=l,e[16]=g):g=e[16];let j;e[17]!==i.size?(j=qe(i.size),e[17]=i.size,e[18]=j):j=e[18];let b;e[19]!==j?(b=t.jsx("span",{className:"shrink-0 opacity-80",children:j}),e[19]=j,e[20]=b):b=e[20];let x;e[21]!==b||e[22]!==g?(x=t.jsxs("span",{className:"absolute inset-x-0 bottom-0 flex items-end gap-2 bg-gradient-to-t from-black/60 to-transparent px-2.5 pb-2 pt-8 text-xs text-white",children:[g,b]}),e[21]=b,e[22]=g,e[23]=x):x=e[23];let w;return e[24]!==l||e[25]!==r||e[26]!==x||e[27]!==n||e[28]!==o||e[29]!==p||e[30]!==u||e[31]!==d||e[32]!==h?(w=t.jsxs("button",{type:r,onClick:n,"aria-pressed":o,"aria-label":p,title:l,className:u,children:[d,h,x]}),e[24]=l,e[25]=r,e[26]=x,e[27]=n,e[28]=o,e[29]=p,e[30]=u,e[31]=d,e[32]=h,e[33]=w):w=e[33],w}function gs(c){const e=de.c(99),{item:i,onClose:s,onReplace:a,onDelete:f}=c,l=Ge(),[r]=At(),[n,o]=se.useState(null),[p,m]=se.useState(!1);let u;e[0]!==i.key?(u=Je(i.key),e[0]=i.key,e[1]=u):u=e[1];const d=u;let h;e[2]!==i.lastModified||e[3]!==r?(h=i.lastModified?new Intl.DateTimeFormat(Tt[r.language],{dateStyle:"medium"}).format(new Date(i.lastModified)):null,e[2]=i.lastModified,e[3]=r,e[4]=h):h=e[4];const g=h;let j;e[5]!==i.publicUrl||e[6]!==l?(j=async function(){try{await navigator.clipboard.writeText(i.publicUrl),m(!0),window.setTimeout(()=>m(!1),1500)}catch{Ee.error(l("filePicker.filePickerDialog.failedToCopyUrl"))}},e[5]=i.publicUrl,e[6]=l,e[7]=j):j=e[7];const b=j;let x;e[8]!==d?(x=t.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-semibold",title:d,children:d}),e[8]=d,e[9]=x):x=e[9];let w;e[10]!==l?(w=l("assets.details.close"),e[10]=l,e[11]=w):w=e[11];let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(is,{size:16}),e[12]=C):C=e[12];let P;e[13]!==s||e[14]!==w?(P=t.jsx(be,{type:"button",variant:"ghost",size:"icon-sm","aria-label":w,onClick:s,children:C}),e[13]=s,e[14]=w,e[15]=P):P=e[15];let y;e[16]!==x||e[17]!==P?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[x,P]}),e[16]=x,e[17]=P,e[18]=y):y=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=(ne,Z)=>o(`${ne} × ${Z}`),e[19]=v):v=e[19];let N;e[20]!==i?(N=t.jsx("div",{className:"overflow-hidden rounded-xl bg-muted shadow-edge",children:t.jsx(Ut,{item:i,controls:!0,onDimensions:v})}),e[20]=i,e[21]=N):N=e[21];let k;e[22]!==l?(k=l("assets.details.type"),e[22]=l,e[23]=k):k=e[23];let _;e[24]!==i.key?(_=et(i.key).toUpperCase(),e[24]=i.key,e[25]=_):_=e[25];let D;e[26]!==k||e[27]!==_?(D=t.jsx(Xe,{label:k,children:_}),e[26]=k,e[27]=_,e[28]=D):D=e[28];let M;e[29]!==l?(M=l("assets.details.size"),e[29]=l,e[30]=M):M=e[30];let K;e[31]!==i.size?(K=qe(i.size),e[31]=i.size,e[32]=K):K=e[32];let J;e[33]!==M||e[34]!==K?(J=t.jsx(Xe,{label:M,children:K}),e[33]=M,e[34]=K,e[35]=J):J=e[35];let W;e[36]!==n||e[37]!==l?(W=n&&t.jsx(Xe,{label:l("assets.details.dimensions"),children:n}),e[36]=n,e[37]=l,e[38]=W):W=e[38];let G;e[39]!==l||e[40]!==g?(G=g&&t.jsx(Xe,{label:l("assets.details.uploaded"),children:g}),e[39]=l,e[40]=g,e[41]=G):G=e[41];let z;e[42]!==D||e[43]!==J||e[44]!==W||e[45]!==G?(z=t.jsxs("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-3 text-sm",children:[D,J,W,G]}),e[42]=D,e[43]=J,e[44]=W,e[45]=G,e[46]=z):z=e[46];let R;e[47]!==l?(R=l("assets.details.url"),e[47]=l,e[48]=R):R=e[48];let L;e[49]!==R?(L=t.jsx("p",{className:"text-xs text-muted-foreground",children:R}),e[49]=R,e[50]=L):L=e[50];const ie=i.publicUrl;let U;e[51]!==l?(U=l("assets.details.url"),e[51]=l,e[52]=U):U=e[52];let S;e[53]!==i.publicUrl||e[54]!==U?(S=t.jsx(It,{readOnly:!0,value:ie,"aria-label":U,className:"min-w-0 flex-1 font-mono text-xs",onFocus:hs}),e[53]=i.publicUrl,e[54]=U,e[55]=S):S=e[55];let $;e[56]!==p?($=p?t.jsx(mt,{size:14}):t.jsx(vt,{size:14}),e[56]=p,e[57]=$):$=e[57];let A;e[58]!==p||e[59]!==l?(A=l(p?"assets.details.copied":"assets.details.copy"),e[58]=p,e[59]=l,e[60]=A):A=e[60];let T;e[61]!==b||e[62]!==$||e[63]!==A?(T=t.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:b,children:[$,A]}),e[61]=b,e[62]=$,e[63]=A,e[64]=T):T=e[64];let I;e[65]!==S||e[66]!==T?(I=t.jsxs("div",{className:"flex items-center gap-2",children:[S,T]}),e[65]=S,e[66]=T,e[67]=I):I=e[67];let F;e[68]!==L||e[69]!==I?(F=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[L,I]}),e[68]=L,e[69]=I,e[70]=F):F=e[70];let V;e[71]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(ss,{size:14}),e[71]=V):V=e[71];let O;e[72]!==l?(O=l("assets.details.replace"),e[72]=l,e[73]=O):O=e[73];let E;e[74]!==a||e[75]!==O?(E=t.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:a,children:[V,O]}),e[74]=a,e[75]=O,e[76]=E):E=e[76];const me=i.publicUrl;let te;e[77]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(pt,{size:14}),e[77]=te):te=e[77];let le;e[78]!==l?(le=l("assets.details.open"),e[78]=l,e[79]=le):le=e[79];let B;e[80]!==i.publicUrl||e[81]!==le?(B=t.jsx(be,{type:"button",variant:"outline",size:"sm",asChild:!0,children:t.jsxs("a",{href:me,target:"_blank",rel:"noreferrer",children:[te,le]})}),e[80]=i.publicUrl,e[81]=le,e[82]=B):B=e[82];let Y;e[83]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(Nt,{size:14}),e[83]=Y):Y=e[83];let Q;e[84]!==l?(Q=l("assets.browser.deleteAction"),e[84]=l,e[85]=Q):Q=e[85];let H;e[86]!==f||e[87]!==Q?(H=t.jsxs(be,{type:"button",variant:"ghost",size:"sm",className:"ml-auto text-destructive hover:text-destructive",onClick:f,children:[Y,Q]}),e[86]=f,e[87]=Q,e[88]=H):H=e[88];let q;e[89]!==E||e[90]!==B||e[91]!==H?(q=t.jsxs("div",{className:"mt-auto flex items-center gap-2 pt-2",children:[E,B,H]}),e[89]=E,e[90]=B,e[91]=H,e[92]=q):q=e[92];let re;return e[93]!==N||e[94]!==z||e[95]!==F||e[96]!==q||e[97]!==y?(re=t.jsxs("aside",{className:"flex w-80 shrink-0 flex-col gap-4 overflow-y-auto border-l border-border/60 p-4",children:[y,N,z,F,q]}),e[93]=N,e[94]=z,e[95]=F,e[96]=q,e[97]=y,e[98]=re):re=e[98],re}function hs(c){return c.currentTarget.select()}function Xe(c){const e=de.c(7),{label:i,children:s}=c;let a;e[0]!==i?(a=t.jsx("dt",{className:"text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=a):a=e[1];let f;e[2]!==s?(f=t.jsx("dd",{className:"truncate",children:s}),e[2]=s,e[3]=f):f=e[3];let l;return e[4]!==a||e[5]!==f?(l=t.jsxs("div",{className:"min-w-0",children:[a,f]}),e[4]=a,e[5]=f,e[6]=l):l=e[6],l}function js(c){const e=et(c);if(e!=="file")return e==="jpg"||e==="jpeg"?".jpg,.jpeg":`.${e}`}function at(c){return c?`${c.width} × ${c.height}`:null}const bs="min(45vh, 28rem)";function ys(c){const e=c.width/c.height;return`min(100%, calc(${bs} * ${e}), ${c.width}px)`}function ct(c){const e=de.c(12),{src:i,kind:s,alt:a,onDimensions:f}=c;if(s==="image"){let r;e[0]!==f?(r=o=>f({width:o.currentTarget.naturalWidth,height:o.currentTarget.naturalHeight}),e[0]=f,e[1]=r):r=e[1];let n;return e[2]!==a||e[3]!==i||e[4]!==r?(n=t.jsx("img",{src:i,alt:a,className:"max-h-full max-w-full rounded-xl shadow-edge",onLoad:r}),e[2]=a,e[3]=i,e[4]=r,e[5]=n):n=e[5],n}if(s==="video"){const r=`${i}#t=0.1`;let n;e[6]!==f?(n=p=>f({width:p.currentTarget.videoWidth,height:p.currentTarget.videoHeight}),e[6]=f,e[7]=n):n=e[7];let o;return e[8]!==r||e[9]!==n?(o=t.jsx("video",{src:r,preload:"metadata",muted:!0,playsInline:!0,controls:!0,className:"max-h-full max-w-full rounded-xl shadow-edge",onLoadedMetadata:n}),e[8]=r,e[9]=n,e[10]=o):o=e[10],o}let l;return e[11]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex aspect-[4/3] max-h-full w-full max-w-xs items-center justify-center rounded-xl bg-muted shadow-edge",children:t.jsx(rt,{size:32,className:"text-muted-foreground"})}),e[11]=l):l=e[11],l}function ks(c){const e=de.c(186),{configId:i,item:s,container:a,onClose:f,onReplaced:l}=c,r=Ge(),n=nt(),[o,p]=se.useState(null),[m,u]=se.useState(null),[d,h]=se.useState(null),[g,j]=se.useState(null),[b,x]=se.useState(!1),w=se.useRef(null);let C,P,y,v,N,k,_,D,M,K,J,W,G,z,R,L,ie,U,S,$,A,T,I;if(e[0]!==g||e[1]!==d||e[2]!==i||e[3]!==a||e[4]!==o||e[5]!==m||e[6]!==b||e[7]!==s.key||e[8]!==s.lastModified||e[9]!==s.publicUrl||e[10]!==s.size||e[11]!==f||e[12]!==l||e[13]!==r||e[14]!==n){const ee=Je(s.key),xe=et(s.key).toUpperCase();let ge;e[38]!==o||e[39]!==s.key?(ge=!o||Yt(s.key,o.name),e[38]=o,e[39]=s.key,e[40]=ge):ge=e[40],k=ge;let Be;e[41]!==g||e[42]!==d||e[43]!==k?(Be=k&&!!d&&!!g&&qt(g,d),e[41]=g,e[42]=d,e[43]=k,e[44]=Be):Be=e[44],_=Be;let Ae;e[45]!==m?(Ae=function($e){$e&&(m&&URL.revokeObjectURL(m),p($e),u(encodeURI(URL.createObjectURL($e))),j(null))},e[45]=m,e[46]=Ae):Ae=e[46],y=Ae;let Te;e[47]!==m||e[48]!==f||e[49]!==n.isPending?(Te=function(){n.isPending||(m&&URL.revokeObjectURL(m),f())},e[47]=m,e[48]=f,e[49]=n.isPending,e[50]=Te):Te=e[50],v=Te;let He;e[51]!==v||e[52]!==i||e[53]!==o||e[54]!==k||e[55]!==s.key||e[56]!==l||e[57]!==r||e[58]!==n?(He=async function(){if(!(!o||!k))try{await n.mutateAsync({configId:i,file:o,replaceKey:s.key}),Ee.success(r("assets.replace.done")),l(),v()}catch($e){const Oe=$e;Ee.error(r("assets.replace.failed",{error:Oe instanceof Error?Oe.message:String(Oe)}))}},e[51]=v,e[52]=i,e[53]=o,e[54]=k,e[55]=s.key,e[56]=l,e[57]=r,e[58]=n,e[59]=He):He=e[59],N=He,P=ls,z=!0,e[60]!==v?(R=pe=>!pe&&v(),e[60]=v,e[61]=R):R=e[61],C=rs,M="bottom",K=a,J="gap-0 rounded-t-2xl border-0",e[62]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx("div",{className:"mx-auto mt-2 h-1 w-10 rounded-full bg-border"}),e[62]=W):W=e[62];const ye=r("assets.replace.title",{name:ee});let X;e[63]!==ye?(X=t.jsx(ns,{children:ye}),e[63]=ye,e[64]=X):X=e[64];let he;e[65]!==r?(he=r("assets.replace.description"),e[65]=r,e[66]=he):he=e[66];let je;e[67]!==he?(je=t.jsx(os,{children:he}),e[67]=he,e[68]=je):je=e[68],e[69]!==X||e[70]!==je?(G=t.jsxs(as,{className:"px-6 pb-2 pt-3",children:[X,je]}),e[69]=X,e[70]=je,e[71]=G):G=e[71],A="grid grid-cols-[1fr_auto_1fr] items-start gap-4 px-6 py-4";let Fe;e[72]!==r?(Fe=r("assets.replace.before"),e[72]=r,e[73]=Fe):Fe=e[73];let Ue;e[74]!==Fe?(Ue=t.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:Fe}),e[74]=Fe,e[75]=Ue):Ue=e[75];let ue;e[76]!==s.lastModified||e[77]!==s.publicUrl?(ue=it(s.publicUrl,s.lastModified),e[76]=s.lastModified,e[77]=s.publicUrl,e[78]=ue):ue=e[78];let ke;e[79]!==s.key?(ke=Ye(s.key),e[79]=s.key,e[80]=ke):ke=e[80];let ve;e[81]!==ee||e[82]!==ue||e[83]!==ke?(ve=t.jsx("div",{className:"flex h-[min(45vh,28rem)] items-center justify-center",children:t.jsx(ct,{src:ue,kind:ke,alt:ee,onDimensions:h})}),e[81]=ee,e[82]=ue,e[83]=ke,e[84]=ve):ve=e[84];let Pe;e[85]!==ee?(Pe=t.jsx("p",{className:"truncate font-medium",children:ee}),e[85]=ee,e[86]=Pe):Pe=e[86];let Ne;e[87]!==s.size?(Ne=qe(s.size),e[87]=s.size,e[88]=Ne):Ne=e[88];let we;e[89]!==d?(we=at(d),e[89]=d,e[90]=we):we=e[90];let We;e[91]!==Ne||e[92]!==we?(We=[Ne,we].filter(Boolean),e[91]=Ne,e[92]=we,e[93]=We):We=e[93];const Le=We.join(" · ");let De;e[94]!==Le?(De=t.jsx("p",{className:"text-muted-foreground",children:Le}),e[94]=Le,e[95]=De):De=e[95];let _e;e[96]!==Pe||e[97]!==De?(_e=t.jsxs("div",{className:"min-w-0 text-xs",children:[Pe,De]}),e[96]=Pe,e[97]=De,e[98]=_e):_e=e[98],e[99]!==Ue||e[100]!==ve||e[101]!==_e?(T=t.jsxs("div",{className:"flex min-w-0 flex-col gap-2",children:[Ue,ve,_e]}),e[99]=Ue,e[100]=ve,e[101]=_e,e[102]=T):T=e[102],e[103]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Mt,{size:18,className:"self-center text-muted-foreground","aria-hidden":!0}),e[103]=I):I=e[103],U="flex min-w-0 flex-col gap-2";let Se;e[104]!==r?(Se=r("assets.replace.after"),e[104]=r,e[105]=Se):Se=e[105],e[106]!==Se?(S=t.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:Se}),e[106]=Se,e[107]=S):S=e[107];let Ie,Me;e[108]===Symbol.for("react.memo_cache_sentinel")?(Ie=pe=>{pe.preventDefault(),x(!0)},Me=()=>x(!1),e[108]=Ie,e[109]=Me):(Ie=e[108],Me=e[109]);let Ce;e[110]!==y?(Ce=pe=>{pe.preventDefault(),pe.stopPropagation(),x(!1),y(pe.dataTransfer.files[0])},e[110]=y,e[111]=Ce):Ce=e[111];let ze;e[112]!==d||e[113]!==o||e[114]!==m||e[115]!==b||e[116]!==r?(ze=o&&m?t.jsx(ct,{src:m,kind:Ye(o.name),alt:o.name,onDimensions:j}):t.jsxs("div",{className:lt("flex max-h-full flex-col items-center justify-center gap-3 rounded-xl bg-muted p-4 text-center text-sm text-muted-foreground",b&&"bg-primary/5 ring-2 ring-primary"),style:{width:d?ys(d):"100%",aspectRatio:d?`${d.width} / ${d.height}`:"16 / 9"},children:[t.jsx(Ze,{size:20}),r("assets.replace.dropHint"),t.jsx(be,{type:"button",variant:"outline",size:"sm",onClick:()=>w.current?.click(),children:r("assets.replace.choose")})]}),e[112]=d,e[113]=o,e[114]=m,e[115]=b,e[116]=r,e[117]=ze):ze=e[117],e[118]!==Ce||e[119]!==ze?($=t.jsx("div",{className:"flex h-[min(45vh,28rem)] items-center justify-center",onDragOver:Ie,onDragLeave:Me,onDrop:Ce,children:ze}),e[118]=Ce,e[119]=ze,e[120]=$):$=e[120],D="min-w-0 text-xs",L=o?t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate font-medium",children:o.name}),t.jsx("p",{className:"text-muted-foreground",children:[qe(o.size),at(g)].filter(Boolean).join(" · ")})]}),t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isPending,onClick:()=>w.current?.click(),children:r("assets.replace.chooseAnother")})]}):t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"font-medium text-muted-foreground",children:r("assets.replace.noFile")}),t.jsx("p",{className:"text-muted-foreground",children:r("assets.replace.sameFormatHint",{format:xe})})]}),ie=!k&&t.jsxs("p",{className:"mt-1 flex items-center gap-1 text-destructive",children:[t.jsx(ot,{size:12,className:"shrink-0"}),r("assets.replace.wrongFormat",{format:xe})]}),e[0]=g,e[1]=d,e[2]=i,e[3]=a,e[4]=o,e[5]=m,e[6]=b,e[7]=s.key,e[8]=s.lastModified,e[9]=s.publicUrl,e[10]=s.size,e[11]=f,e[12]=l,e[13]=r,e[14]=n,e[15]=C,e[16]=P,e[17]=y,e[18]=v,e[19]=N,e[20]=k,e[21]=_,e[22]=D,e[23]=M,e[24]=K,e[25]=J,e[26]=W,e[27]=G,e[28]=z,e[29]=R,e[30]=L,e[31]=ie,e[32]=U,e[33]=S,e[34]=$,e[35]=A,e[36]=T,e[37]=I}else C=e[15],P=e[16],y=e[17],v=e[18],N=e[19],k=e[20],_=e[21],D=e[22],M=e[23],K=e[24],J=e[25],W=e[26],G=e[27],z=e[28],R=e[29],L=e[30],ie=e[31],U=e[32],S=e[33],$=e[34],A=e[35],T=e[36],I=e[37];let F;e[121]!==_||e[122]!==r?(F=_&&t.jsxs("p",{className:"mt-1 flex items-center gap-1 text-warning",children:[t.jsx(ot,{size:12,className:"shrink-0"}),r("assets.replace.ratioWarning")]}),e[121]=_,e[122]=r,e[123]=F):F=e[123];let V;e[124]!==D||e[125]!==F||e[126]!==L||e[127]!==ie?(V=t.jsxs("div",{className:D,children:[L,ie,F]}),e[124]=D,e[125]=F,e[126]=L,e[127]=ie,e[128]=V):V=e[128];let O;e[129]!==V||e[130]!==U||e[131]!==S||e[132]!==$?(O=t.jsxs("div",{className:U,children:[S,$,V]}),e[129]=V,e[130]=U,e[131]=S,e[132]=$,e[133]=O):O=e[133];let E;e[134]!==O||e[135]!==A||e[136]!==T||e[137]!==I?(E=t.jsxs("div",{className:A,children:[T,I,O]}),e[134]=O,e[135]=A,e[136]=T,e[137]=I,e[138]=E):E=e[138];let me;e[139]!==o||e[140]!==r?(me=r(o?"assets.replace.cacheNote":"assets.replace.compareHint"),e[139]=o,e[140]=r,e[141]=me):me=e[141];let te;e[142]!==me?(te=t.jsx("p",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:me}),e[142]=me,e[143]=te):te=e[143];const le=n.isPending;let B;e[144]!==r?(B=r("assets.replace.cancel"),e[144]=r,e[145]=B):B=e[145];let Y;e[146]!==v||e[147]!==B||e[148]!==n.isPending?(Y=t.jsx(be,{type:"button",variant:"ghost",size:"sm",disabled:le,onClick:v,children:B}),e[146]=v,e[147]=B,e[148]=n.isPending,e[149]=Y):Y=e[149];const Q=!o||!k||n.isPending;let H;e[150]!==n.isPending?(H=n.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[150]=n.isPending,e[151]=H):H=e[151];let q;e[152]!==r||e[153]!==n.isPending?(q=n.isPending?r("assets.replace.replacing"):r("assets.replace.confirm"),e[152]=r,e[153]=n.isPending,e[154]=q):q=e[154];let re;e[155]!==N||e[156]!==Q||e[157]!==H||e[158]!==q?(re=t.jsxs(be,{type:"button",size:"sm",disabled:Q,onClick:N,children:[H,q]}),e[155]=N,e[156]=Q,e[157]=H,e[158]=q,e[159]=re):re=e[159];let ne;e[160]!==te||e[161]!==Y||e[162]!==re?(ne=t.jsxs(cs,{className:"flex-row items-center gap-2 px-6 pb-5 pt-1",children:[te,Y,re]}),e[160]=te,e[161]=Y,e[162]=re,e[163]=ne):ne=e[163];let Z;e[164]!==s.key?(Z=js(s.key),e[164]=s.key,e[165]=Z):Z=e[165];let ce;e[166]!==y?(ce=ee=>{const xe=ee.target.files?.[0];ee.target.value="",y(xe)},e[166]=y,e[167]=ce):ce=e[167];let oe;e[168]!==Z||e[169]!==ce?(oe=t.jsx("input",{ref:w,type:"file",className:"hidden",accept:Z,onChange:ce}),e[168]=Z,e[169]=ce,e[170]=oe):oe=e[170];let ae;e[171]!==C||e[172]!==M||e[173]!==K||e[174]!==J||e[175]!==W||e[176]!==G||e[177]!==E||e[178]!==ne||e[179]!==oe?(ae=t.jsxs(C,{side:M,container:K,className:J,children:[W,G,E,ne,oe]}),e[171]=C,e[172]=M,e[173]=K,e[174]=J,e[175]=W,e[176]=G,e[177]=E,e[178]=ne,e[179]=oe,e[180]=ae):ae=e[180];let fe;return e[181]!==P||e[182]!==z||e[183]!==R||e[184]!==ae?(fe=t.jsx(P,{open:z,onOpenChange:R,children:ae}),e[181]=P,e[182]=z,e[183]=R,e[184]=ae,e[185]=fe):fe=e[185],fe}function vs(c){const e=de.c(47),{configId:i,item:s,onClose:a,onDeleted:f}=c,l=Ge(),r=St();let n;e[0]!==i||e[1]!==r||e[2]!==s||e[3]!==a||e[4]!==f||e[5]!==l?(n=async function(){if(s)try{await r.mutateAsync({configId:i,key:s.key}),Ee.success(l("assets.browser.deleted")),f(s.key),a()}catch{Ee.error(l("assets.browser.deleteFailed"))}},e[0]=i,e[1]=r,e[2]=s,e[3]=a,e[4]=f,e[5]=l,e[6]=n):n=e[6];const o=n,p=!!s;let m;e[7]!==a?(m=M=>!M&&a(),e[7]=a,e[8]=m):m=e[8];let u;e[9]!==l?(u=l("assets.browser.deleteConfirmTitle"),e[9]=l,e[10]=u):u=e[10];let d;e[11]!==u?(d=t.jsx(ut,{children:u}),e[11]=u,e[12]=d):d=e[12];let h;e[13]!==s||e[14]!==l?(h=l("assets.browser.deleteConfirmDescription",{name:s?Je(s.key):""}),e[13]=s,e[14]=l,e[15]=h):h=e[15];let g;e[16]!==h?(g=t.jsx(xt,{children:h}),e[16]=h,e[17]=g):g=e[17];let j;e[18]!==d||e[19]!==g?(j=t.jsxs(gt,{children:[d,g]}),e[18]=d,e[19]=g,e[20]=j):j=e[20];const b=r.isPending;let x;e[21]!==l?(x=l("assets.browser.deleteCancel"),e[21]=l,e[22]=x):x=e[22];let w;e[23]!==r.isPending||e[24]!==x?(w=t.jsx(ht,{disabled:b,children:x}),e[23]=r.isPending,e[24]=x,e[25]=w):w=e[25];const C=r.isPending;let P;e[26]!==o?(P=M=>{M.preventDefault(),o()},e[26]=o,e[27]=P):P=e[27];let y;e[28]!==r.isPending?(y=r.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[28]=r.isPending,e[29]=y):y=e[29];let v;e[30]!==l?(v=l("assets.browser.deleteConfirm"),e[30]=l,e[31]=v):v=e[31];let N;e[32]!==r.isPending||e[33]!==P||e[34]!==y||e[35]!==v?(N=t.jsxs(jt,{variant:"destructive",disabled:C,onClick:P,children:[y,v]}),e[32]=r.isPending,e[33]=P,e[34]=y,e[35]=v,e[36]=N):N=e[36];let k;e[37]!==w||e[38]!==N?(k=t.jsxs(bt,{children:[w,N]}),e[37]=w,e[38]=N,e[39]=k):k=e[39];let _;e[40]!==k||e[41]!==j?(_=t.jsxs(yt,{children:[j,k]}),e[40]=k,e[41]=j,e[42]=_):_=e[42];let D;return e[43]!==_||e[44]!==p||e[45]!==m?(D=t.jsx(kt,{open:p,onOpenChange:m,children:_}),e[43]=_,e[44]=p,e[45]=m,e[46]=D):D=e[46],D}function Ps(c){const e=de.c(8),{virtualMcpId:i}=c,s=Kt(i),a=Vt();let f;e[0]!==a||e[1]!==s?(f=Xt(a,Rt(s),s?.metadata?.assetStorageConfigId),e[0]=a,e[1]=s,e[2]=f):f=e[2];const l=f;if(!l){let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ns,{}),e[3]=n):n=e[3],n}if(Zt(s)){let n;return e[4]!==l?(n=t.jsx(ms,{config:l}),e[4]=l,e[5]=n):n=e[5],n}let r;return e[6]!==l?(r=t.jsx(ws,{config:l}),e[6]=l,e[7]=r):r=e[7],r}function Ns(){const c=de.c(12),e=Ge();let i;c[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:t.jsx(Wt,{size:20,className:"text-muted-foreground"})}),c[0]=i):i=c[0];let s;c[1]!==e?(s=e("assets.browser.noBucketTitle"),c[1]=e,c[2]=s):s=c[2];let a;c[3]!==s?(a=t.jsx("p",{className:"text-sm font-medium",children:s}),c[3]=s,c[4]=a):a=c[4];let f;c[5]!==e?(f=e("assets.browser.noBucketDescription"),c[5]=e,c[6]=f):f=c[6];let l;c[7]!==f?(l=t.jsx("p",{className:"mt-1 max-w-sm text-xs text-muted-foreground",children:f}),c[7]=f,c[8]=l):l=c[8];let r;return c[9]!==a||c[10]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-0 flex-col items-center justify-center gap-3 p-10 text-center",children:[i,t.jsxs("div",{children:[a,l]})]}),c[9]=a,c[10]=l,c[11]=r):r=c[11],r}function ws(c){const e=de.c(99),{config:i}=c,s=Ge(),[a,f]=se.useState(""),l=Dt(a,300);let r;e[0]!==i.id||e[1]!==l?(r={configId:i.id,search:l},e[0]=i.id,e[1]=l,e[2]=r):r=e[2];const n=_t(r),o=nt(),[p,m]=se.useState(!1),[u,d]=se.useState(null),h=se.useRef(null);let g;e[3]!==i.id||e[4]!==n||e[5]!==s||e[6]!==o?(g=async function(S){if(!S)return;const $=Array.from(S);if($.length===0)return;const A=[];for(const T of $)try{await o.mutateAsync({configId:i.id,file:T})}catch(I){const F=I;A.push(`${T.name} (${F instanceof Error?F.message:"upload failed"})`)}await n.refetch(),A.length>0&&Ee.error(A.length===$.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:A.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:A.join("; ")}))},e[3]=i.id,e[4]=n,e[5]=s,e[6]=o,e[7]=g):g=e[7];const j=g;let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=function(S){S.preventDefault(),m(!0)},e[8]=b):b=e[8];const x=b;let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=function(){m(!1)},e[9]=w):w=e[9];const C=w;let P;e[10]!==j?(P=function(S){S.preventDefault(),S.stopPropagation(),m(!1),j(S.dataTransfer.files)},e[10]=j,e[11]=P):P=e[11];const y=P,[v,N]=dt();let k,_,D,M,K,J,W;if(e[12]!==i.name||e[13]!==l||e[14]!==N||e[15]!==v||e[16]!==j||e[17]!==p||e[18]!==n||e[19]!==y||e[20]!==a||e[21]!==s||e[22]!==o.isPending){const U=n.data?.pages??[],S=U.some(_s),$=U.flatMap(Ds),A=Ft($,zt(v)),T=l.trim(),I=a!==l||n.isFetching&&!n.isFetchingNextPage;W="flex h-full min-h-0 flex-col gap-3 p-4";let F;e[30]!==s?(F=s("assets.browser.title"),e[30]=s,e[31]=F):F=e[31];let V;e[32]!==F?(V=t.jsx("h2",{className:"text-sm font-semibold",children:F}),e[32]=F,e[33]=V):V=e[33];let O;e[34]!==i.name||e[35]!==s?(O=s("assets.browser.bucketLabel",{name:i.name}),e[34]=i.name,e[35]=s,e[36]=O):O=e[36];let E;e[37]!==O?(E=t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:O}),e[37]=O,e[38]=E):E=e[38];let me;e[39]!==V||e[40]!==E?(me=t.jsxs("div",{className:"min-w-0",children:[V,E]}),e[39]=V,e[40]=E,e[41]=me):me=e[41];let te;e[42]===Symbol.for("react.memo_cache_sentinel")?(te=()=>h.current?.click(),e[42]=te):te=e[42];let le;e[43]!==o.isPending?(le=o.isPending?t.jsx(Ke,{className:"size-3.5"}):t.jsx(Ze,{size:14}),e[43]=o.isPending,e[44]=le):le=e[44];let B;e[45]!==s||e[46]!==o.isPending?(B=o.isPending?s("filePicker.filePickerDialog.uploading"):s("filePicker.filePickerDialog.dropFilesOrClick"),e[45]=s,e[46]=o.isPending,e[47]=B):B=e[47];let Y;e[48]!==le||e[49]!==B||e[50]!==o.isPending?(Y=t.jsxs(be,{type:"button",size:"sm",disabled:o.isPending,onClick:te,children:[le,B]}),e[48]=le,e[49]=B,e[50]=o.isPending,e[51]=Y):Y=e[51];let Q;e[52]!==j?(Q=t.jsx("input",{ref:h,type:"file",multiple:!0,className:"hidden",onChange:ee=>{const xe=Array.from(ee.target.files??[]);ee.target.value="",j(xe)}}),e[52]=j,e[53]=Q):Q=e[53],e[54]!==me||e[55]!==Y||e[56]!==Q?(k=t.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3",children:[me,Y,Q]}),e[54]=me,e[55]=Y,e[56]=Q,e[57]=k):k=e[57];let H;e[58]!==s?(H=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[58]=s,e[59]=H):H=e[59],e[60]!==I||e[61]!==a||e[62]!==H?(_=t.jsx(wt,{value:a,onChange:f,isSearching:I,placeholder:H,className:"shrink-0"}),e[60]=I,e[61]=a,e[62]=H,e[63]=_):_=e[63];let q;e[64]===Symbol.for("react.memo_cache_sentinel")?(q=()=>h.current?.click(),e[64]=q):q=e[64];const re=p&&"border-primary bg-primary/5",ne=o.isPending&&"pointer-events-none opacity-60";let Z;e[65]!==re||e[66]!==ne?(Z=lt("flex shrink-0 flex-col items-center justify-center gap-1 rounded-xl border border-dashed border-border/60 p-4 text-center transition-colors",re,ne),e[65]=re,e[66]=ne,e[67]=Z):Z=e[67];let ce;e[68]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx(Ze,{size:16,className:"text-muted-foreground"}),e[68]=ce):ce=e[68];let oe;e[69]!==s?(oe=s("filePicker.filePickerDialog.dropFilesOrClick"),e[69]=s,e[70]=oe):oe=e[70];let ae;e[71]!==s?(ae=s("filePicker.filePickerDialog.uploadSizeLimit"),e[71]=s,e[72]=ae):ae=e[72];let fe;e[73]!==oe||e[74]!==ae?(fe=t.jsxs("p",{className:"text-xs text-muted-foreground",children:[oe," ",ae]}),e[73]=oe,e[74]=ae,e[75]=fe):fe=e[75],e[76]!==y||e[77]!==Z||e[78]!==fe?(D=t.jsxs("button",{type:"button",onClick:q,onDragOver:x,onDragLeave:C,onDrop:y,className:Z,children:[ce,fe]}),e[76]=y,e[77]=Z,e[78]=fe,e[79]=D):D=e[79],M="min-h-0 flex-1 overflow-y-auto pr-1",K=S||n.isError?t.jsx(Jt,{denied:S,retrying:n.isFetching,onRetry:()=>{n.refetch()}}):null,J=$.length===0?n.isPending||n.isError||S?null:T?t.jsx(ft,{title:s("filePicker.filePickerDialog.noMatches",{query:T}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):t.jsx(ft,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):t.jsx("div",{ref:N,className:"flex items-start gap-3",children:A.map((ee,xe)=>t.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:ee.map(ge=>t.jsx(Ss,{item:ge,onDelete:()=>d(ge)},ge.key))},xe))}),e[12]=i.name,e[13]=l,e[14]=N,e[15]=v,e[16]=j,e[17]=p,e[18]=n,e[19]=y,e[20]=a,e[21]=s,e[22]=o.isPending,e[23]=k,e[24]=_,e[25]=D,e[26]=M,e[27]=K,e[28]=J,e[29]=W}else k=e[23],_=e[24],D=e[25],M=e[26],K=e[27],J=e[28],W=e[29];let G;e[80]!==n||e[81]!==s?(G=n.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(be,{type:"button",variant:"outline",size:"sm",disabled:n.isFetchingNextPage,onClick:()=>n.fetchNextPage(),children:n.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[80]=n,e[81]=s,e[82]=G):G=e[82];let z;e[83]!==G||e[84]!==M||e[85]!==K||e[86]!==J?(z=t.jsxs("div",{className:M,children:[K,J,G]}),e[83]=G,e[84]=M,e[85]=K,e[86]=J,e[87]=z):z=e[87];let R;e[88]===Symbol.for("react.memo_cache_sentinel")?(R=()=>d(null),e[88]=R):R=e[88];let L;e[89]!==i.id||e[90]!==u?(L=t.jsx(Fs,{configId:i.id,item:u,onClose:R}),e[89]=i.id,e[90]=u,e[91]=L):L=e[91];let ie;return e[92]!==k||e[93]!==_||e[94]!==D||e[95]!==z||e[96]!==L||e[97]!==W?(ie=t.jsxs("div",{className:W,children:[k,_,D,z,L]}),e[92]=k,e[93]=_,e[94]=D,e[95]=z,e[96]=L,e[97]=W,e[98]=ie):ie=e[98],ie}function Ds(c){return c.items}function _s(c){return c.listingError==="access_denied"}function ft(c){const e=de.c(8),{title:i,description:s}=c;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(Pt,{size:18,className:"text-muted-foreground"})}),e[0]=a):a=e[0];let f;e[1]!==i?(f=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=f):f=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==f||e[6]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[a,f,l]}),e[5]=f,e[6]=l,e[7]=r):r=e[7],r}function Ss(c){const e=de.c(34),{item:i,onDelete:s}=c;let a;e[0]!==i.key?(a=et(i.key),e[0]=i.key,e[1]=a):a=e[1];const f=a;let l;e[2]!==i.key?(l=Qt(i.key),e[2]=i.key,e[3]=l):l=e[3];const r=l;let n;e[4]!==r||e[5]!==i.key||e[6]!==i.publicUrl?(n=r?t.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"block h-auto w-full",onError:Cs}):t.jsx("div",{className:"flex aspect-square items-center justify-center",children:t.jsx(rt,{size:28,className:"text-muted-foreground"})}),e[4]=r,e[5]=i.key,e[6]=i.publicUrl,e[7]=n):n=e[7];let o;e[8]!==i.key||e[9]!==i.publicUrl||e[10]!==n?(o=t.jsx("a",{href:i.publicUrl,target:"_blank",rel:"noreferrer",title:i.key,className:"block transition hover:ring-2 hover:ring-inset hover:ring-primary",children:n}),e[8]=i.key,e[9]=i.publicUrl,e[10]=n,e[11]=o):o=e[11];const p=i.key;let m;e[12]!==i.key?(m=Ct(i.key),e[12]=i.key,e[13]=m):m=e[13];let u;e[14]!==i.key||e[15]!==m?(u=t.jsx("p",{className:"truncate text-xs font-medium",title:p,children:m}),e[14]=i.key,e[15]=m,e[16]=u):u=e[16];let d;e[17]!==i.size?(d=qe(i.size),e[17]=i.size,e[18]=d):d=e[18];let h;e[19]!==f||e[20]!==d?(h=t.jsxs("p",{className:"text-2xs uppercase text-muted-foreground",children:[f," · ",d]}),e[19]=f,e[20]=d,e[21]=h):h=e[21];let g;e[22]!==u||e[23]!==h?(g=t.jsxs("div",{className:"min-w-0 flex-1",children:[u,h]}),e[22]=u,e[23]=h,e[24]=g):g=e[24];let j;e[25]!==i||e[26]!==s?(j=t.jsx(zs,{item:i,onDelete:s}),e[25]=i,e[26]=s,e[27]=j):j=e[27];let b;e[28]!==g||e[29]!==j?(b=t.jsxs("div",{className:"flex items-center gap-1 border-t border-border/60 bg-background px-2 py-1.5",children:[g,j]}),e[28]=g,e[29]=j,e[30]=b):b=e[30];let x;return e[31]!==b||e[32]!==o?(x=t.jsxs("div",{className:"group relative flex flex-col overflow-hidden rounded-lg border border-border/60 bg-muted",children:[o,b]}),e[31]=b,e[32]=o,e[33]=x):x=e[33],x}function Cs(c){c.target.style.display="none"}function zs(c){const e=de.c(36),{item:i,onDelete:s}=c,a=Ge(),[f,l]=se.useState(!1);let r;e[0]!==i.publicUrl||e[1]!==a?(r=async function(){try{await navigator.clipboard.writeText(i.publicUrl),l(!0),window.setTimeout(()=>l(!1),1500)}catch{Ee.error(a("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=a,e[2]=r):r=e[2];const n=r;let o;e[3]!==a?(o=a("filePicker.filePickerDialog.assetActions"),e[3]=a,e[4]=o):o=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Gt,{size:14}),e[5]=p):p=e[5];let m;e[6]!==o?(m=t.jsx(Lt,{asChild:!0,children:t.jsx(be,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":o,children:p})}),e[6]=o,e[7]=m):m=e[7];let u;e[8]!==f?(u=f?t.jsx(mt,{size:14}):t.jsx(vt,{size:14}),e[8]=f,e[9]=u):u=e[9];let d;e[10]!==f||e[11]!==a?(d=a(f?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[10]=f,e[11]=a,e[12]=d):d=e[12];let h;e[13]!==n||e[14]!==u||e[15]!==d?(h=t.jsxs(tt,{onClick:n,children:[u,d]}),e[13]=n,e[14]=u,e[15]=d,e[16]=h):h=e[16];const g=i.publicUrl;let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(pt,{size:14}),e[17]=j):j=e[17];let b;e[18]!==a?(b=a("filePicker.filePickerDialog.openInNewTab"),e[18]=a,e[19]=b):b=e[19];let x;e[20]!==i.publicUrl||e[21]!==b?(x=t.jsx(tt,{asChild:!0,children:t.jsxs("a",{href:g,target:"_blank",rel:"noreferrer",children:[j,b]})}),e[20]=i.publicUrl,e[21]=b,e[22]=x):x=e[22];let w;e[23]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Nt,{size:14}),e[23]=w):w=e[23];let C;e[24]!==a?(C=a("assets.browser.deleteAction"),e[24]=a,e[25]=C):C=e[25];let P;e[26]!==s||e[27]!==C?(P=t.jsxs(tt,{variant:"destructive",onClick:s,children:[w,C]}),e[26]=s,e[27]=C,e[28]=P):P=e[28];let y;e[29]!==x||e[30]!==P||e[31]!==h?(y=t.jsxs(Ot,{align:"end",children:[h,x,P]}),e[29]=x,e[30]=P,e[31]=h,e[32]=y):y=e[32];let v;return e[33]!==y||e[34]!==m?(v=t.jsxs(Et,{children:[m,y]}),e[33]=y,e[34]=m,e[35]=v):v=e[35],v}function Fs(c){const e=de.c(46),{configId:i,item:s,onClose:a}=c,f=Ge(),l=St();let r;e[0]!==i||e[1]!==l||e[2]!==s||e[3]!==a||e[4]!==f?(r=async function(){if(s)try{await l.mutateAsync({configId:i,key:s.key}),Ee.success(f("assets.browser.deleted")),a()}catch{Ee.error(f("assets.browser.deleteFailed"))}},e[0]=i,e[1]=l,e[2]=s,e[3]=a,e[4]=f,e[5]=r):r=e[5];const n=r,o=!!s;let p;e[6]!==a?(p=D=>!D&&a(),e[6]=a,e[7]=p):p=e[7];let m;e[8]!==f?(m=f("assets.browser.deleteConfirmTitle"),e[8]=f,e[9]=m):m=e[9];let u;e[10]!==m?(u=t.jsx(ut,{children:m}),e[10]=m,e[11]=u):u=e[11];let d;e[12]!==s||e[13]!==f?(d=f("assets.browser.deleteConfirmDescription",{name:s?Ct(s.key):""}),e[12]=s,e[13]=f,e[14]=d):d=e[14];let h;e[15]!==d?(h=t.jsx(xt,{children:d}),e[15]=d,e[16]=h):h=e[16];let g;e[17]!==u||e[18]!==h?(g=t.jsxs(gt,{children:[u,h]}),e[17]=u,e[18]=h,e[19]=g):g=e[19];const j=l.isPending;let b;e[20]!==f?(b=f("assets.browser.deleteCancel"),e[20]=f,e[21]=b):b=e[21];let x;e[22]!==l.isPending||e[23]!==b?(x=t.jsx(ht,{disabled:j,children:b}),e[22]=l.isPending,e[23]=b,e[24]=x):x=e[24];const w=l.isPending;let C;e[25]!==n?(C=D=>{D.preventDefault(),n()},e[25]=n,e[26]=C):C=e[26];let P;e[27]!==l.isPending?(P=l.isPending?t.jsx(Ke,{className:"size-3.5"}):null,e[27]=l.isPending,e[28]=P):P=e[28];let y;e[29]!==f?(y=f("assets.browser.deleteConfirm"),e[29]=f,e[30]=y):y=e[30];let v;e[31]!==l.isPending||e[32]!==C||e[33]!==P||e[34]!==y?(v=t.jsxs(jt,{variant:"destructive",disabled:w,onClick:C,children:[P,y]}),e[31]=l.isPending,e[32]=C,e[33]=P,e[34]=y,e[35]=v):v=e[35];let N;e[36]!==x||e[37]!==v?(N=t.jsxs(bt,{children:[x,v]}),e[36]=x,e[37]=v,e[38]=N):N=e[38];let k;e[39]!==N||e[40]!==g?(k=t.jsxs(yt,{children:[g,N]}),e[39]=N,e[40]=g,e[41]=k):k=e[41];let _;return e[42]!==k||e[43]!==o||e[44]!==p?(_=t.jsx(kt,{open:o,onOpenChange:p,children:k}),e[42]=k,e[43]=o,e[44]=p,e[45]=_):_=e[45],_}function Us(){const c=de.c(2),e=ds();let i;return c[0]!==e?(i=t.jsx(Ht,{tabId:"assets",children:t.jsx(Ps,{virtualMcpId:e})}),c[0]=e,c[1]=i):i=c[1],i}function Or(){const c=de.c(1);let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Bt.Content,{children:t.jsx(Us,{})}),c[0]=e):e=c[0],e}export{Or as default};
|