decocms 4.372.3 → 4.373.1
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-CMjsP_Tk.js → AlertCircle-2L7lI8NL.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh_grNQZ.js → AreaChart-BSJ08P7a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CjYy5Nhj.js → ArrowLeft-8rouBEwC.js} +1 -1
- package/dist/client/assets/{ArrowRight-CLncCNat.js → ArrowRight-DCA5zjxW.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cii1LHW7.js → ArrowUp-BtksDHBQ.js} +1 -1
- package/dist/client/assets/{CartesianChart-CD-5y_pX.js → CartesianChart-BbOaLmfq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DHXQFnpK.js → CheckCircle-BmVuh1xp.js} +1 -1
- package/dist/client/assets/{ChevronUp-DiYhGG4T.js → ChevronUp-fg9sod-H.js} +1 -1
- package/dist/client/assets/{Copy01-nMxlBfeT.js → Copy01-BgwuTJFm.js} +1 -1
- package/dist/client/assets/{CreditCard01-CWXVH3ZM.js → CreditCard01-CIt471eG.js} +1 -1
- package/dist/client/assets/DotsVertical-CE2o6L6N.js +1 -0
- package/dist/client/assets/{Download01-BRrSA3Yx.js → Download01-DNhEQzg0.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-fXvhmekg.js → ErrorBarContext-DxNax47N.js} +1 -1
- package/dist/client/assets/{Eye-Dyg2WPG4.js → Eye-Dq6Vw6FI.js} +1 -1
- package/dist/client/assets/{Globe01-D6FaaFR2.js → Globe01-g_y8gAs1.js} +1 -1
- package/dist/client/assets/{Users03-Y0Jco4zL.js → Globe04-GFiRExL0.js} +1 -1
- package/dist/client/assets/{Image01-CxnjAzbb.js → Image01-QB6twEDu.js} +1 -1
- package/dist/client/assets/{Key01-CIXwHMRo.js → Key01-CO_i2QPb.js} +1 -1
- package/dist/client/assets/LayoutLeft-BfySK4h8.js +1 -0
- package/dist/client/assets/{Line-YO4Ozgbt.js → Line-Cr57fOtp.js} +1 -1
- package/dist/client/assets/{Link01-C0FvgZZB.js → Link01-BIFMl_M0.js} +1 -1
- package/dist/client/assets/{LinkExternal01-AWlhN5o7.js → LinkExternal01-DQD59o7F.js} +1 -1
- package/dist/client/assets/{Monitor01-Ccs1gh2Z.js → Monitor01-Ddm2yOG6.js} +1 -1
- package/dist/client/assets/{Package-nTbucmaQ.js → Package-CvzEol5_.js} +1 -1
- package/dist/client/assets/{Palette-DSdn1Xis.js → Palette-DT856bn6.js} +1 -1
- package/dist/client/assets/{Play-lMuWOObF.js → Play-wYDcJhBq.js} +1 -1
- package/dist/client/assets/{Plus-CVauOqLT.js → Plus-BSp00qOC.js} +1 -1
- package/dist/client/assets/{SearchLg-BrrPVuXr.js → SearchLg-DFD1t2UL.js} +1 -1
- package/dist/client/assets/{SearchMd-C45D2PMI.js → SearchMd-Bb5gjLcX.js} +1 -1
- package/dist/client/assets/{Sector-9mXbxJ9i.js → Sector-wViCnB96.js} +5 -5
- package/dist/client/assets/{Settings02-Cyf85ea0.js → Settings02-D9Qv7BDm.js} +1 -1
- package/dist/client/assets/{Share07-wC47qn2E.js → Share07-CZ7JzYs9.js} +1 -1
- package/dist/client/assets/{Stars01-oAh9h5b5.js → Stars01-D-wYuyik.js} +1 -1
- package/dist/client/assets/{Sun-0Ied-kyZ.js → Sun-DLRcOzSd.js} +1 -1
- package/dist/client/assets/Tool01-Dwy1nlT9.js +1 -0
- package/dist/client/assets/{Tool02-CATStXCy.js → Tool02-CvlAGFBM.js} +1 -1
- package/dist/client/assets/{Trash01-nl-t4IoV.js → Trash01-DtE0n00a.js} +1 -1
- package/dist/client/assets/{TrendUp01-BFAEMx9E.js → TrendUp01-BCriuXJd.js} +1 -1
- package/dist/client/assets/{Upload01-B4Fqdkae.js → Upload01-Ba-RLxE1.js} +1 -1
- package/dist/client/assets/{User01-ClMaVCaJ.js → User01-DHd46PZp.js} +1 -1
- package/dist/client/assets/{UserSquare-B2lKdt4w.js → UserSquare-CcF49LHs.js} +1 -1
- package/dist/client/assets/{Users01-BFhxJVhO.js → Users01-B8gdz27Y.js} +1 -1
- package/dist/client/assets/{X-CFCE4a-Q.js → X-BtMi8Qau.js} +1 -1
- package/dist/client/assets/{XCircle-CleKT0Id.js → XCircle-BLCHBIhx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DpXsFGyJ.js → XClose-CvcHLHe2.js} +1 -1
- package/dist/client/assets/{Zap-B6zkqKWB.js → Zap-DZAIluO6.js} +1 -1
- package/dist/client/assets/ZoomOut-DUFJq3-K.js +1 -0
- package/dist/client/assets/{access-gate-Ds4n25mC.js → access-gate-C9Dl5e5c.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DA05asFs.js +1 -0
- package/dist/client/assets/agent-analytics-CDo5Hugr.js +2 -0
- package/dist/client/assets/agent-app-lfl4wDqj.js +1 -0
- package/dist/client/assets/agent-assets-6UK-ev9d.js +1 -0
- package/dist/client/assets/agent-automation-BC-cMvrG.js +20 -0
- package/dist/client/assets/agent-automations-CnHTcvU7.js +1 -0
- package/dist/client/assets/agent-connect-sources-CJ8artss.js +1 -0
- package/dist/client/assets/agent-deck-BCZ0G4O2.js +1 -0
- package/dist/client/assets/agent-e2e-Cj1Q_JS0.js +1 -0
- package/dist/client/assets/agent-experiments-DJ13yAp9.js +1 -0
- package/dist/client/assets/agent-file-DbKP1r-4.js +1 -0
- package/dist/client/assets/{agent-git-D4IYczGa.js → agent-git-B8LMQ2zl.js} +2 -2
- package/dist/client/assets/agent-hosting-Bm-WxahY.js +1 -0
- package/dist/client/assets/agent-icon-CTsmTxHg.js +1 -0
- package/dist/client/assets/agent-library-file-DvybgEEZ.js +1 -0
- package/dist/client/assets/agent-monitor-DgVt0zbx.js +1 -0
- package/dist/client/assets/agent-overview-pOglhwpN.js +1 -0
- package/dist/client/assets/agent-settings-Bx-Ya3hQ.js +1 -0
- package/dist/client/assets/{agent-site-editor-DJSdtoNU.js → agent-site-editor-DVT-M9T0.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-DpPWdLwT.js +2 -0
- package/dist/client/assets/agent-site-editor-content-eM0WchN0.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-3VO_kTqr.js +518 -0
- package/dist/client/assets/{agent-view-guard-DHJpzCVR.js → agent-view-guard-BNYKK-x9.js} +1 -1
- package/dist/client/assets/agent-view-v-h5B6vN.js +1 -0
- package/dist/client/assets/agents-list-BXPjUzIN.js +1 -0
- package/dist/client/assets/{ai-providers-jxGd6MbV.js → ai-providers-BAmCFPvS.js} +2 -2
- package/dist/client/assets/{alert-U2IStW1f.js → alert-C8o4-kn8.js} +1 -1
- package/dist/client/assets/{alert-dialog-BI-B_8hq.js → alert-dialog-9n2p5SCQ.js} +2 -2
- package/dist/client/assets/api-keys-Cu1KdEtK.js +1 -0
- package/dist/client/assets/api-keys-DCurVLgh.js +1 -0
- package/dist/client/assets/app-editor-C3QSidsO.js +1 -0
- package/dist/client/assets/asset-utils-CK3Em4fb.js +1 -0
- package/dist/client/assets/{auth-DhzAq_9m.js → auth-BBW3DF0r.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dar7OygY.js → auth-catchall-Bva2z4Gj.js} +1 -1
- package/dist/client/assets/auth-entry-BuHqwUIr.js +1 -0
- package/dist/client/assets/{auth-split-layout-DLFqjvPt.js → auth-split-layout-DMgxvbll.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DkJ4g-X5.js → authenticate-and-persist-oauth-Pk9b2m8R.js} +1 -1
- package/dist/client/assets/automation-list-row-D-zBLXA-.js +1 -0
- package/dist/client/assets/automation-runs-C8Wbje-n.js +1 -0
- package/dist/client/assets/automations-D69ikqKh.js +1 -0
- package/dist/client/assets/{autosend-BberXmli.js → autosend-CVNOmzPu.js} +1 -1
- package/dist/client/assets/{avatar-C9HiP4eS.js → avatar-BzRNaDEk.js} +1 -1
- package/dist/client/assets/badge-C5M6nZd4.js +1 -0
- package/dist/client/assets/block-document-UPtnFOJG.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-Bwmvvd4S.js → blocks-preview-workspace-context-DAFMxzU6.js} +1 -1
- package/dist/client/assets/breadcrumb-0yy48vm9.js +1 -0
- package/dist/client/assets/{buckets-BndbOAGO.js → buckets-CktpbsrB.js} +1 -1
- package/dist/client/assets/build-improve-prompt-doc-C-SX02eL.js +2 -0
- package/dist/client/assets/bulk-category-panel-MrIv4eD2.js +1 -0
- package/dist/client/assets/calendar-QcX36iLy.js +1 -0
- package/dist/client/assets/capability-load-error-BVb3VEU2.js +1 -0
- package/dist/client/assets/category-editor-DZThBJlF.js +1 -0
- package/dist/client/assets/{chart-8nXuVw9P.js → chart-BVjaATZw.js} +5 -5
- package/dist/client/assets/{chat-context-tZCX_cqt.js → chat-context-ELO8A2Ar.js} +6 -6
- package/dist/client/assets/{chat-draft-BCeqPSxA.js → chat-draft-tDfZTlxU.js} +1 -1
- package/dist/client/assets/checkbox-iGlb02v9.js +1 -0
- package/dist/client/assets/choose-editor-CWLAiGtz.js +1 -0
- package/dist/client/assets/{cli-auth-success-D39z_FO3.js → cli-auth-success-DyNW_Pmq.js} +1 -1
- package/dist/client/assets/{client-icons-DpcP1bht.js → client-icons-BuRYGGKe.js} +1 -1
- package/dist/client/assets/collapsible-PyJ2NOzW.js +1 -0
- package/dist/client/assets/collection-detail-DXmBNKMr.js +1 -0
- package/dist/client/assets/collection-display-button-Cz5AkuIg.js +1 -0
- package/dist/client/assets/{collection-search-J9Bt25gS.js → collection-search-DM8MkJfo.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DBeauaNS.js → collection-table-wrapper-cBr_X4Jo.js} +1 -1
- package/dist/client/assets/collection-tabs-aKKPIP9M.js +1 -0
- package/dist/client/assets/combobox-CQBdlQef.js +1 -0
- package/dist/client/assets/command-CZcxzTcw.js +1 -0
- package/dist/client/assets/{companion-mcps-section-xmRpNJBK.js → companion-mcps-section-B7qgbnOZ.js} +1 -1
- package/dist/client/assets/connect-D6Wz7x6C.js +8 -0
- package/dist/client/assets/connect-layout-DzSDvFP2.js +1 -0
- package/dist/client/assets/{connection-DD0omVHZ.js → connection-DStV2sLP.js} +1 -1
- package/dist/client/assets/connection-card-CpIJKLp3.js +1 -0
- package/dist/client/assets/connection-detail-junbbrHX.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CHlcdgAK.js → connection-form-helpers-DM_wSOEJ.js} +1 -1
- package/dist/client/assets/connections-DvjnCZJT.js +1 -0
- package/dist/client/assets/{create-organization-dialog-1mI4Ad1B.js → create-organization-dialog-CvXOAbwA.js} +1 -1
- package/dist/client/assets/{decofile-api-BNWbEMR6.js → decofile-api-zRlIvvNL.js} +1 -1
- package/dist/client/assets/{decopilot-BvepxP_-.js → decopilot-BI8eOOPY.js} +2 -2
- package/dist/client/assets/dialog-AoC07APJ.js +1 -0
- package/dist/client/assets/discover-zo2iAYFW.js +1 -0
- package/dist/client/assets/domain-settings-C6kSznIr.js +1 -0
- package/dist/client/assets/download-app-dialog-CsiIuf7j.js +1 -0
- package/dist/client/assets/{drawer-BIjkXMV3.js → drawer-DGzquxJ8.js} +1 -1
- package/dist/client/assets/{editor-D4Ls62vg.js → editor-oL1B7LVJ.js} +1 -1
- package/dist/client/assets/{empty-state-BdiOfgle.js → empty-state-DxJQDjCw.js} +1 -1
- package/dist/client/assets/{empty-state-CyICQznD.js → empty-state-Y08kvU5o.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dbm_cKaX.js → extract-connection-data-C7Wh9xkI.js} +1 -1
- package/dist/client/assets/{feature-gate-Bp7Cydio.js → feature-gate-C1d068b1.js} +1 -1
- package/dist/client/assets/feature-paywall-BoABVlUQ.js +1 -0
- package/dist/client/assets/file-explorer-DG5Gvb-w.js +2 -0
- package/dist/client/assets/{file-preview-CARebwHJ.js → file-preview-iaqpqUYi.js} +1 -1
- package/dist/client/assets/file-share-button-D0lT5ixf.js +3 -0
- package/dist/client/assets/{file-type-icon-C9Qn36v4.js → file-type-icon-lZW2ows7.js} +1 -1
- package/dist/client/assets/{folder-icon-BLBZBD_a.js → folder-icon-DVG7PK8X.js} +1 -1
- package/dist/client/assets/{form-CSXgIHLz.js → form-CYsJTpNM.js} +1 -1
- package/dist/client/assets/{gateway-client-BuiOykcN.js → gateway-client-CnYYocwu.js} +1 -1
- package/dist/client/assets/general-BiYLEv2o.js +1 -0
- package/dist/client/assets/{github-icon-huXDOAgf.js → github-icon-swNUSpAU.js} +1 -1
- package/dist/client/assets/home-BbjS-573.js +1 -0
- package/dist/client/assets/{hooks-BoX5BC-f.js → hooks-BlE0QZwR.js} +2 -2
- package/dist/client/assets/{hooks-DZOMRp7D.js → hooks-D0dDgrIf.js} +1 -1
- package/dist/client/assets/icon-button-7c--Wy5B.js +1 -0
- package/dist/client/assets/{index-BWpNlf6e.js → index-0-s9o3tr.js} +1 -1
- package/dist/client/assets/index-BDYXeKzz.js +1 -0
- package/dist/client/assets/index-BOHOyAF8.css +1 -0
- package/dist/client/assets/{index-tj4CWdxr.js → index-BUfoj27y.js} +1 -1
- package/dist/client/assets/index-BchRuDAc.js +26 -0
- package/dist/client/assets/{index-BD213WLU.js → index-C97O3ClY.js} +1 -1
- package/dist/client/assets/index-CutV0Ygc.js +1 -0
- package/dist/client/assets/{index-DqT4mG5l.js → index-DGY2nhhI.js} +1 -1
- package/dist/client/assets/index-DItj2r3e.js +5 -0
- package/dist/client/assets/index-DKXWNSdB.js +1 -0
- package/dist/client/assets/{index-Bb-Re5q8.js → index-DllcfiZL.js} +1 -1
- package/dist/client/assets/{index-DiULBiX9.js → index-DyCAAYSx.js} +1 -1
- package/dist/client/assets/index-EcuFIS2a.js +235 -0
- package/dist/client/assets/{index-DWw5wi2G.js → index-Exw_Yjch.js} +1 -1
- package/dist/client/assets/{index-2gtoysbs.js → index-fN6RkMSD.js} +1 -1
- package/dist/client/assets/{index-redirect-BQTLrDGT.js → index-redirect-Bm4zqVUy.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjWlcBHD.js → infiniteQueryObserver-3RxH1tr-.js} +1 -1
- package/dist/client/assets/infra-billing-CmY2herT.js +1 -0
- package/dist/client/assets/input-BrPa4I3Z.js +8 -0
- package/dist/client/assets/input-Buz_7xoG.js +1 -0
- package/dist/client/assets/input-C5klQNJJ.js +1 -0
- package/dist/client/assets/{integration-icon-BeEdjsn9.js → integration-icon-D3FHJbYu.js} +1 -1
- package/dist/client/assets/{label-BMxIRiEr.js → label-BX1BwzZ4.js} +1 -1
- package/dist/client/assets/{last-preview-page-B_H0ubHa.js → last-preview-page-BSVfE6AT.js} +1 -1
- package/dist/client/assets/layout-030aDjqi.js +1 -0
- package/dist/client/assets/legacy-agents-deep-BblX_qPq.js +1 -0
- package/dist/client/assets/legacy-main-redirect-BDaODIKZ.js +1 -0
- package/dist/client/assets/library-CmkU9fCT.js +161 -0
- package/dist/client/assets/{login-C4Dx9xMO.js → login-BpUdj6Fq.js} +1 -1
- package/dist/client/assets/{markdown-DGWjAeXL.js → markdown-VKlC4_bJ.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-BTjC7Gse.js → mcp-app-renderer-wS7imsel.js} +2 -2
- package/dist/client/assets/{mcp-oauth-C4khbNJJ.js → mcp-oauth-B7YJNr4N.js} +1 -1
- package/dist/client/assets/members-2ZkimP3H.js +1 -0
- package/dist/client/assets/message-templates-DyGM313y.js +1 -0
- package/dist/client/assets/{mini-report-page-Ci4cxCz8.js → mini-report-page-CYdef8vQ.js} +1 -1
- package/dist/client/assets/mock-board-Dk2mRFCa.js +90 -0
- package/dist/client/assets/{monaco-editor-CMRYkmyb.js → monaco-editor-ChRh_qus.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-PncjnNwy.js → monitoring-stats-row-DirMMFq2.js} +1 -1
- package/dist/client/assets/multi-select-CYKeAXVo.js +1 -0
- package/dist/client/assets/{mustache-CPZS2ebG.js → mustache-BpzqsH6c.js} +1 -1
- package/dist/client/assets/{oauth-callback-CETK2WZB.js → oauth-callback-CLQttSb2.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DqbbngEF.js → oauth-callback-ai-provider-C5AqSldx.js} +1 -1
- package/dist/client/assets/{onboarding-B5zAGi2B.js → onboarding-BYeSkDcE.js} +1 -1
- package/dist/client/assets/optimistic-project-sidebar-views-hB0JGrCs.js +1 -0
- package/dist/client/assets/{org-file-open-context-BCUpiY_R.js → org-file-open-context-D26BTBiX.js} +1 -1
- package/dist/client/assets/{organization-choice-BNulT5zU.js → organization-choice-sm9k2ko4.js} +1 -1
- package/dist/client/assets/orgs-BT6gh3Sc.js +1 -0
- package/dist/client/assets/{page-seo-form-BrHgBXF1.js → page-seo-form-Bhk-2qvu.js} +1 -1
- package/dist/client/assets/{pair-B46EBBjF.js → pair-Bh73YYpe.js} +8 -8
- package/dist/client/assets/plan-ladder-B-hb17ya.js +1 -0
- package/dist/client/assets/{popover-yk_ePqAA.js → popover-Bff85VlI.js} +1 -1
- package/dist/client/assets/post-calendar-BUJnl75O.js +1 -0
- package/dist/client/assets/post-editor-B8ClYTJb.js +1 -0
- package/dist/client/assets/{preview-content-CfbsbElk.js → preview-content-C4FuOpTi.js} +1 -1
- package/dist/client/assets/{preview-dialog-CA2C3DS4.js → preview-dialog-DY1kQ4y_.js} +1 -1
- package/dist/client/assets/primitives-BCCkMTJb.js +1 -0
- package/dist/client/assets/profile-T7ySaz_t.js +1 -0
- package/dist/client/assets/project-app-view-D4HCSkue.js +1 -0
- package/dist/client/assets/project-feed-CRHprIgj.js +1 -0
- package/dist/client/assets/{project-icon-MWmzrrm8.js → project-icon-D_oHwik9.js} +1 -1
- package/dist/client/assets/project-reports-CzVFjEoR.js +1 -0
- package/dist/client/assets/project-tasks-c_cBe8VF.js +1 -0
- package/dist/client/assets/{prompts-4lILOzK9.js → prompts-BuPAnA4R.js} +1 -1
- package/dist/client/assets/record-editor-CHfqyrFA.js +1 -0
- package/dist/client/assets/redirect-editor-BrEMZWAU.js +1 -0
- package/dist/client/assets/registry-4kJYrulU.js +2 -0
- package/dist/client/assets/registry-layout-o90YrVKa.js +27 -0
- package/dist/client/assets/reports-COffkxyo.js +1 -0
- package/dist/client/assets/{reports-BpxYdv2_.js → reports-DEVutxJq.js} +2 -2
- package/dist/client/assets/reports-onboarding-Dt5mvf07.js +1 -0
- package/dist/client/assets/reports-tab-C6PZg0b6.js +2 -0
- package/dist/client/assets/repositories-DBFrDUwl.js +1 -0
- package/dist/client/assets/repository-import-picker-ftg0FRzY.js +1 -0
- package/dist/client/assets/repository-picker-BKj90hIS.js +1 -0
- package/dist/client/assets/{require-capability-CmtOZnXt.js → require-capability-gpVnF6U4.js} +1 -1
- package/dist/client/assets/{required-auth-layout-RoMNnMPO.js → required-auth-layout-BhdxJMdb.js} +1 -1
- package/dist/client/assets/{reset-password-BeUL8IgX.js → reset-password-DD2ixVIR.js} +1 -1
- package/dist/client/assets/resizable-wU1MiASn.js +1 -0
- package/dist/client/assets/review-settings-3uLiRV1J.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CHsxXHIo.js → rich-text-link-control-Bn-QsIS6.js} +2 -2
- package/dist/client/assets/roles-DX_ap2B0.js +1 -0
- package/dist/client/assets/route-Bdqr734y.js +1 -0
- package/dist/client/assets/route-Cg6AOuOY.js +1 -0
- package/dist/client/assets/route-DGhKwFXa.js +1 -0
- package/dist/client/assets/route-page-header-DKm5kHtX.js +1 -0
- package/dist/client/assets/runnable-block-editor-9i5DpxOA.js +16 -0
- package/dist/client/assets/{sandbox-lifecycle-context-C7VKOJoV.js → sandbox-lifecycle-context-BHn9YFEW.js} +2 -2
- package/dist/client/assets/{schema-1zAO-l7e.js → schema-FDf70VFI.js} +1 -1
- package/dist/client/assets/{scroll-area-C-wtbVS1.js → scroll-area-DMmJ7JtI.js} +1 -1
- package/dist/client/assets/search-input-BHVk6m6A.js +1 -0
- package/dist/client/assets/search-toggle-CCC7TvwN.js +1 -0
- package/dist/client/assets/secrets-BNtrMaDs.js +1 -0
- package/dist/client/assets/sections-editor-HtflyYMM.js +2 -0
- package/dist/client/assets/select-DBfOOW9i.js +1 -0
- package/dist/client/assets/select-model-2C5Fdpra.js +1 -0
- package/dist/client/assets/seo-editor-CFULobkJ.js +1 -0
- package/dist/client/assets/separator-8fswVHAH.js +1 -0
- package/dist/client/assets/settings-tab-s3d5MtS-.js +5 -0
- package/dist/client/assets/{sheet-i72Qx7sL.js → sheet-DWSThpSZ.js} +1 -1
- package/dist/client/assets/shell-layout-BQnbNNla.js +1 -0
- package/dist/client/assets/{shell-layout-CuFt8bor.css → shell-layout-CE2Eihra.css} +1 -1
- package/dist/client/assets/sidebar-CoC2_Nad.js +1 -0
- package/dist/client/assets/{skill-preview-gfYVdSdM.js → skill-preview-QgrtYNqp.js} +1 -1
- package/dist/client/assets/skills-BVINvlqv.js +1 -0
- package/dist/client/assets/sso-CSqM_F3b.js +1 -0
- package/dist/client/assets/store-DBNpNTVQ.js +1 -0
- package/dist/client/assets/store-registry-DLmFNBij.js +2 -0
- package/dist/client/assets/{switch-BQFtt3BH.js → switch-BIfmgDHS.js} +1 -1
- package/dist/client/assets/synced-repos-CG_pm_Ch.js +1 -0
- package/dist/client/assets/{table-6I6YKvFY.js → table-CEVOOGGz.js} +1 -1
- package/dist/client/assets/{tabs-CLziM0Ww.js → tabs-Dd0IWElc.js} +1 -1
- package/dist/client/assets/{task-board-DrUf5p-Z.js → task-board-Dip4Wu9j.js} +1 -1
- package/dist/client/assets/task-route-SKFoAFiU.js +1 -0
- package/dist/client/assets/task-status-k7EGfTLN.js +1 -0
- package/dist/client/assets/taskboard-analytics-C3lk9wb7.js +1 -0
- package/dist/client/assets/tasks-Sl_c9zFF.js +1 -0
- package/dist/client/assets/{tasks-Drgd6az8.js → tasks-ebQIYdwz.js} +4 -4
- package/dist/client/assets/textarea-D5v3ol7T.js +1 -0
- package/dist/client/assets/thread-button-C3YUAV-G.js +1 -0
- package/dist/client/assets/{thread-intent-F-sZEflj.js → thread-intent-CTSjhfEo.js} +1 -1
- package/dist/client/assets/thread-route-B57JfaL5.js +1 -0
- package/dist/client/assets/thread-route-CHwqHPf_.js +1 -0
- package/dist/client/assets/thread-sheet-body-Hqh1hVbj.js +1 -0
- package/dist/client/assets/toggle-group-CwAn2mKr.js +1 -0
- package/dist/client/assets/toolbar-icon-button-ChZE-2zp.js +1 -0
- package/dist/client/assets/{tooltip-DV2xHesQ.js → tooltip-nr5oS_bm.js} +1 -1
- package/dist/client/assets/{track-ZuOMvhd2.js → track-BDYWN4z3.js} +1 -1
- package/dist/client/assets/{types-27TVsPN_.js → types-7UQ7SDxU.js} +3 -3
- package/dist/client/assets/usage-stats-YafP0g9G.js +1 -0
- package/dist/client/assets/use-ai-providers-D-abiIwe.js +1 -0
- package/dist/client/assets/use-automations-D_y1YNke.js +1 -0
- package/dist/client/assets/{use-autosave-DOzyZumC.js → use-autosave-z8cIzzdm.js} +1 -1
- package/dist/client/assets/use-connect-companion-jQzCS0Na.js +1 -0
- package/dist/client/assets/use-connection-BKZRi94S.js +1 -0
- package/dist/client/assets/{use-copy-C_ctOeuP.js → use-copy-Cp_DyXH6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D1w9d4ex.js → use-create-virtual-mcp-nvoTomrD.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-onM9TTf8.js → use-date-fns-locale-CNoKSvxx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DqyNKPJM.js → use-debounced-autosave-B0HBbqeX.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B9nG3bW5.js → use-debounced-value-BgYHDTDk.js} +1 -1
- package/dist/client/assets/use-deco-credits-CqbkXgA9.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BpuQrfKN.js → use-decopilot-events-qaEKsixC.js} +1 -1
- package/dist/client/assets/use-delete-connection-CqvqqWgS.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BVfgEagI.js → use-deployment-admin-DzkF6L4b.js} +1 -1
- package/dist/client/assets/{use-entitlements-Dl7pAsQ5.js → use-entitlements-kPr6KRf9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-mcfOeAAq.js → use-fast-preview-draft-url-BBBDyhsD.js} +1 -1
- package/dist/client/assets/use-file-configs-6ygOocDG.js +1 -0
- package/dist/client/assets/use-in-settings-BCDqA2EC.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-PhBGPm8H.js → use-infinite-scroll-D0T36z_V.js} +1 -1
- package/dist/client/assets/use-join-requests-BBovhUnp.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-BghanH6r.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-h4sAecTI.js +1 -0
- package/dist/client/assets/{use-mcp-client-e_hCatGm.js → use-mcp-client-B_gcvvCy.js} +6 -6
- package/dist/client/assets/{use-mcp-prompts-DJRXjL4_.js → use-mcp-prompts-DfSKL4Gu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-g86k4oib.js → use-mcp-tools-DC47roTz.js} +1 -1
- package/dist/client/assets/use-members-C6brpkJ1.js +1 -0
- package/dist/client/assets/{use-mobile-hIijCK0k.js → use-mobile-BZ15DgEB.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-B8SXI0oO.js +1 -0
- package/dist/client/assets/use-open-billing-url-BAg3ZeFq.js +1 -0
- package/dist/client/assets/use-org-auth-client-8fDIgHEZ.js +1 -0
- package/dist/client/assets/use-org-fs-Bf6n51Xm.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-CnBqiATM.js +8 -0
- package/dist/client/assets/{use-org-sso-BvfIL0yq.js → use-org-sso-QeqdMaIa.js} +1 -1
- package/dist/client/assets/use-organization-roles-tuKknI1K.js +1 -0
- package/dist/client/assets/use-organization-settings-DvtBymY3.js +1 -0
- package/dist/client/assets/{use-panel-navigate-WrD0KEYx.js → use-panel-navigate-IItrbgmN.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-WwnxvZuP.js +1 -0
- package/dist/client/assets/use-project-scope-CCxyXvEU.js +1 -0
- package/dist/client/assets/use-registry-connections-Bd4wJHbx.js +1 -0
- package/dist/client/assets/use-releases-DZvNer89.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-BeTEI2FZ.js +1 -0
- package/dist/client/assets/{use-route-default-main-Djaj_cL9.js → use-route-default-main-BhbKsXCz.js} +1 -1
- package/dist/client/assets/use-secrets-Bq9yyXHE.js +1 -0
- package/dist/client/assets/{use-section-preview-base-BOFovHh4.js → use-section-preview-base--XbKHK2U.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BR1aW1y5.js → use-session-runtime-B5wMaHtP.js} +1 -1
- package/dist/client/assets/use-tags-Do2tDPSO.js +1 -0
- package/dist/client/assets/use-task-board-analytics-MK_Z2cUq.js +1 -0
- package/dist/client/assets/use-task-metadata-CQjLXps1.js +1 -0
- package/dist/client/assets/use-thread-outputs-DYukUH5N.js +1 -0
- package/dist/client/assets/{use-view-mode-B0LeaJg7.js → use-view-mode-BEPkb8x0.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-Ji9vcgUj.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CzQJkRT9.js +1 -0
- package/dist/client/assets/{useQueries-C-SV8tD7.js → useQueries-D0xhxw7a.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D9iG0Y5m.js +1 -0
- package/dist/client/assets/{users-BiOPZ43X.js → users-DzwkCv2F.js} +1 -1
- package/dist/client/assets/utils-y2q6u6PK.js +4 -0
- package/dist/client/assets/variant-calendar-D1R9xk7D.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BFQoXu82.js → variant-matcher-override-qHzE4baz.js} +1 -1
- package/dist/client/assets/view-mode-toggle-Ca0bFull.js +1 -0
- package/dist/client/assets/{virtual-mcp-ldxphi5G.js → virtual-mcp-Dji-1ojO.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/Check-B3RSsr_D.js +0 -1
- package/dist/client/assets/ChevronRight-USKkhEpL.js +0 -1
- package/dist/client/assets/ChevronSelectorVertical-DpRb2z1l.js +0 -1
- package/dist/client/assets/Database01-C0YJpjc3.js +0 -1
- package/dist/client/assets/DotsVertical-CsjwfYzf.js +0 -1
- package/dist/client/assets/File02-BvR-HYxK.js +0 -1
- package/dist/client/assets/GitBranch01-rWb2SJK9.js +0 -1
- package/dist/client/assets/HardDrive-DNTPLPT4.js +0 -1
- package/dist/client/assets/MessageCircle01-DBcg2aiD.js +0 -1
- package/dist/client/assets/Printer-CvyxF9Jo.js +0 -1
- package/dist/client/assets/Shield01-CqB4I7qm.js +0 -1
- package/dist/client/assets/Tool01-DouqPjim.js +0 -1
- package/dist/client/assets/XClose-BgzK-Dwz.js +0 -1
- package/dist/client/assets/ZoomOut-BPxprY2s.js +0 -1
- package/dist/client/assets/add-connection-dialog-DZjTm9W3.js +0 -1
- package/dist/client/assets/agent-analytics-DmvdLg8B.js +0 -2
- package/dist/client/assets/agent-app-BvmFdS4C.js +0 -1
- package/dist/client/assets/agent-assets-czUGY90q.js +0 -1
- package/dist/client/assets/agent-automation-C5Kr5Oj3.js +0 -20
- package/dist/client/assets/agent-automations-D-3-Opoc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CjhmYssY.js +0 -1
- package/dist/client/assets/agent-deck-BC5MWVm-.js +0 -1
- package/dist/client/assets/agent-e2e-DkL4Ltr6.js +0 -1
- package/dist/client/assets/agent-experiments--rXT-2aB.js +0 -1
- package/dist/client/assets/agent-file-C3XkHLMm.js +0 -1
- package/dist/client/assets/agent-hosting-DaIfm8Hu.js +0 -1
- package/dist/client/assets/agent-icon-CczrFEe7.js +0 -1
- package/dist/client/assets/agent-library-file-Dji653pU.js +0 -1
- package/dist/client/assets/agent-monitor-C-HIyaF_.js +0 -1
- package/dist/client/assets/agent-overview-cm15sxNU.js +0 -1
- package/dist/client/assets/agent-settings-XmhY1FOi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DOAcxz0t.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-mg5Q6hoW.js +0 -518
- package/dist/client/assets/agent-view-ClMILC98.js +0 -1
- package/dist/client/assets/agents-list-rKFF5b3o.js +0 -1
- package/dist/client/assets/anchors-yqDzZN4K.js +0 -1
- package/dist/client/assets/api-keys-AIfL76r6.js +0 -1
- package/dist/client/assets/api-keys-B6ry5Bc6.js +0 -1
- package/dist/client/assets/app-editor-BZKFeBmU.js +0 -1
- package/dist/client/assets/asset-utils-DhbLEVKo.js +0 -1
- package/dist/client/assets/auth-entry-CwWjlqGu.js +0 -1
- package/dist/client/assets/automation-list-row-Btr-Kty6.js +0 -1
- package/dist/client/assets/automation-runs-CnOOOwZJ.js +0 -1
- package/dist/client/assets/automations-CtLmB1Eo.js +0 -1
- package/dist/client/assets/badge-Bu51Hlti.js +0 -1
- package/dist/client/assets/block-document-BLCekKXO.js +0 -3
- package/dist/client/assets/breadcrumb-Dhdru7Jh.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-Cedp3vV1.js +0 -2
- package/dist/client/assets/bulk-category-panel-D3c_qJDk.js +0 -1
- package/dist/client/assets/calendar-DIQx67oO.js +0 -1
- package/dist/client/assets/capability-load-error-CJMvYDf4.js +0 -1
- package/dist/client/assets/cards-BVw8sRdW.js +0 -8
- package/dist/client/assets/category-editor-C7sRrVfl.js +0 -1
- package/dist/client/assets/checkbox-jLf7fBuW.js +0 -1
- package/dist/client/assets/choose-editor-Cbu3-nVC.js +0 -1
- package/dist/client/assets/collapsible-CTgXdVQa.js +0 -1
- package/dist/client/assets/collection-detail-BF7WM7Gn.js +0 -1
- package/dist/client/assets/collection-display-button-C-4xB6xx.js +0 -1
- package/dist/client/assets/collection-tabs-CrXIJeNf.js +0 -1
- package/dist/client/assets/combobox-BHrqHmge.js +0 -1
- package/dist/client/assets/command-B-XD29Nx.js +0 -1
- package/dist/client/assets/command-palette-store-DK-56E2K.js +0 -1
- package/dist/client/assets/connect-D4qCE3TM.js +0 -8
- package/dist/client/assets/connect-layout-DGO84ImO.js +0 -1
- package/dist/client/assets/connection-card-fcMCwbTh.js +0 -1
- package/dist/client/assets/connection-detail-DS015J4e.js +0 -1
- package/dist/client/assets/connections-C98FMYyY.js +0 -1
- package/dist/client/assets/dialog-llvhXw2o.js +0 -1
- package/dist/client/assets/discover-DNPHmIfF.js +0 -1
- package/dist/client/assets/domain-settings-CXxEmIjB.js +0 -1
- package/dist/client/assets/download-app-dialog-D_4eQbbs.js +0 -1
- package/dist/client/assets/dropdown-menu-C5iafa8S.js +0 -1
- package/dist/client/assets/feature-paywall-DEy2mpV2.js +0 -1
- package/dist/client/assets/file-explorer-Bs7B2-rr.js +0 -2
- package/dist/client/assets/file-share-button-Dk1ugrdV.js +0 -3
- package/dist/client/assets/general-BYFfG0fF.js +0 -1
- package/dist/client/assets/home-DTaaCW3K.js +0 -1
- package/dist/client/assets/index-2eKztu7k.js +0 -5
- package/dist/client/assets/index-BH7uCYoT.js +0 -1
- package/dist/client/assets/index-CSd_k8Np.js +0 -1
- package/dist/client/assets/index-CiMUXLco.js +0 -26
- package/dist/client/assets/index-CpNTsElB.css +0 -1
- package/dist/client/assets/index-D4RUT3q0.js +0 -1
- package/dist/client/assets/index-D_X-LIyA.js +0 -1
- package/dist/client/assets/index-Dc7hzqoi.js +0 -235
- package/dist/client/assets/infra-billing-D6jrbNxA.js +0 -1
- package/dist/client/assets/input-DXlaTX4w.js +0 -1
- package/dist/client/assets/input-D_FfvHr0.js +0 -8
- package/dist/client/assets/input-uIV5S_EX.js +0 -1
- package/dist/client/assets/layout-Dli4i2a0.js +0 -1
- package/dist/client/assets/legacy-agents-deep-CoiLV3QJ.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BZ4nzqkQ.js +0 -1
- package/dist/client/assets/library-Dste3SFA.js +0 -161
- package/dist/client/assets/members-CRtKrUle.js +0 -1
- package/dist/client/assets/message-templates-B8kOo0Kk.js +0 -1
- package/dist/client/assets/mock-board-DRa60E6i.js +0 -90
- package/dist/client/assets/multi-select-DzAZ8Rb8.js +0 -1
- package/dist/client/assets/optimistic-project-sidebar-views-CrZ9OeIk.js +0 -1
- package/dist/client/assets/orgs-B1TBklWZ.js +0 -1
- package/dist/client/assets/plan-ladder-B2pv9Y73.js +0 -1
- package/dist/client/assets/post-calendar-Bx8YiCbs.js +0 -1
- package/dist/client/assets/post-editor-B1fD7o8C.js +0 -1
- package/dist/client/assets/primitives-JiGRyPkw.js +0 -1
- package/dist/client/assets/profile-CDR0JVtv.js +0 -1
- package/dist/client/assets/project-app-view-8VWdrWMf.js +0 -1
- package/dist/client/assets/project-feed-ChJRKxhk.js +0 -1
- package/dist/client/assets/project-reports-D31utlHg.js +0 -1
- package/dist/client/assets/project-tasks-D2AAgqxo.js +0 -1
- package/dist/client/assets/record-editor-DPAL8Tq5.js +0 -1
- package/dist/client/assets/redirect-editor-EPs_GX-_.js +0 -1
- package/dist/client/assets/registry-Dw8UrRRZ.js +0 -2
- package/dist/client/assets/registry-layout-CC2lewiS.js +0 -27
- package/dist/client/assets/reports-Ch9UvBcS.js +0 -1
- package/dist/client/assets/reports-onboarding-Dhm8IBuD.js +0 -1
- package/dist/client/assets/reports-tab-BJWrZp37.js +0 -2
- package/dist/client/assets/repositories-CMIGVJwC.js +0 -1
- package/dist/client/assets/repository-import-picker-DhVniDI2.js +0 -1
- package/dist/client/assets/repository-picker-BkoSI-jm.js +0 -1
- package/dist/client/assets/resizable-Bt7dvMCc.js +0 -1
- package/dist/client/assets/review-settings-Cx_Yzx40.js +0 -1
- package/dist/client/assets/roles-BNleKwt9.js +0 -1
- package/dist/client/assets/route-CHqG9ihd.js +0 -1
- package/dist/client/assets/route-DqJoK5dW.js +0 -1
- package/dist/client/assets/route-x8jgkj5T.js +0 -1
- package/dist/client/assets/runnable-block-editor-xmOnaiFL.js +0 -16
- package/dist/client/assets/search-input-Pobww52G.js +0 -1
- package/dist/client/assets/secrets-BF5nuoR4.js +0 -1
- package/dist/client/assets/sections-editor-B1LpXw4X.js +0 -2
- package/dist/client/assets/select-BkKPcZFe.js +0 -1
- package/dist/client/assets/select-model-DPv-zVVj.js +0 -1
- package/dist/client/assets/seo-editor-9G7mQFJ5.js +0 -1
- package/dist/client/assets/settings-tab-D1V5Uszb.js +0 -5
- package/dist/client/assets/shell-layout-Ce0aCJuX.js +0 -1
- package/dist/client/assets/sidebar-C5KRz1Pj.js +0 -1
- package/dist/client/assets/skills-CgTiBPyO.js +0 -1
- package/dist/client/assets/sso-BK-aRT5P.js +0 -1
- package/dist/client/assets/store-Nm6KtwbD.js +0 -1
- package/dist/client/assets/store-registry-Cs6bPPkP.js +0 -2
- package/dist/client/assets/synced-repos-B1z4DDCt.js +0 -1
- package/dist/client/assets/task-route-BCTCy27Q.js +0 -1
- package/dist/client/assets/task-status-DhCT2ly_.js +0 -1
- package/dist/client/assets/taskboard-analytics-Cf1r1f7I.js +0 -1
- package/dist/client/assets/tasks-BNvHI7hJ.js +0 -1
- package/dist/client/assets/textarea-BU6xemAP.js +0 -1
- package/dist/client/assets/thread-route-BBf64Mwk.js +0 -1
- package/dist/client/assets/thread-route-BSYRqZDg.js +0 -1
- package/dist/client/assets/thread-sheet-body-B4OUWlMn.js +0 -1
- package/dist/client/assets/toggle-group-BiU_UDOq.js +0 -1
- package/dist/client/assets/toolbar-icon-button-PuQFE8Y9.js +0 -1
- package/dist/client/assets/usage-stats-vMRDbAUM.js +0 -1
- package/dist/client/assets/use-ai-providers-BnF5Rw_n.js +0 -1
- package/dist/client/assets/use-automations-Bo0S3g8m.js +0 -1
- package/dist/client/assets/use-connect-companion-CClQCUMS.js +0 -1
- package/dist/client/assets/use-connection-Ba04fHwa.js +0 -1
- package/dist/client/assets/use-deco-credits-BGBshlLi.js +0 -1
- package/dist/client/assets/use-delete-connection-Cns6x8UC.js +0 -1
- package/dist/client/assets/use-file-configs-DYGSdjth.js +0 -1
- package/dist/client/assets/use-join-requests-DjeVFQr9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-sSRGo66A.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-I377R0Kg.js +0 -1
- package/dist/client/assets/use-members-DPYHJDe2.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-C8pu0B4z.js +0 -1
- package/dist/client/assets/use-open-billing-url-Df7K1DCF.js +0 -1
- package/dist/client/assets/use-org-auth-client-DbPU3bA-.js +0 -1
- package/dist/client/assets/use-org-fs-Du-ErRPs.js +0 -1
- package/dist/client/assets/use-org-notice-CyiiFkRG.js +0 -1
- package/dist/client/assets/use-organization-roles-FAEtbpE5.js +0 -1
- package/dist/client/assets/use-organization-settings-CKbX2SdA.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-DWzPH-Sc.js +0 -1
- package/dist/client/assets/use-project-scope-DU0-JxYr.js +0 -1
- package/dist/client/assets/use-registry-connections-SLFMHpqj.js +0 -1
- package/dist/client/assets/use-releases-CFNTwgY3.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-8BvW2in8.js +0 -1
- package/dist/client/assets/use-secrets-DVry--sz.js +0 -1
- package/dist/client/assets/use-tags-CZXCbbwL.js +0 -1
- package/dist/client/assets/use-task-board-analytics-Ci1AhxvH.js +0 -1
- package/dist/client/assets/use-task-metadata-Dt9l5S_a.js +0 -1
- package/dist/client/assets/use-thread-outputs-Dq-RN0P_.js +0 -1
- package/dist/client/assets/use-virtual-mcp-DkK7ErtB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +0 -1
- package/dist/client/assets/utils-DsvmRe8M.js +0 -4
- package/dist/client/assets/variant-calendar-DImnsJnP.js +0 -1
- package/dist/client/assets/view-mode-toggle-DvGhnpsV.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{c as he,r as ce,d as ms,a0 as kt,b as Ke,j as t,B as ge,t as dt,a9 as ts,l as Ve,a6 as us,K as bt,m as Bt,T as Qs,eL as Fs,h as Xs,u as Ws,n as vt,q as ss,E as Ys,z as Zs,W as el}from"./index-EcuFIS2a.js";import{S as tl}from"./search-input-BHVk6m6A.js";import{E as es}from"./empty-state-Y08kvU5o.js";import{R as sl}from"./require-capability-gpVnF6U4.js";import{f as Ss}from"./pair-Bh73YYpe.js";import{u as is}from"./use-connection-BKZRi94S.js";import{g as Os}from"./connection-slug-CITJ0kGN.js";import{B as Et}from"./badge-C5M6nZd4.js";import{P as Jt,a as Gt,b as Qt}from"./popover-Bff85VlI.js";import{c as Ot,T as $t,a as zt,b as ll}from"./tooltip-nr5oS_bm.js";import{a as Wt}from"./Copy01-BgwuTJFm.js";import{n as Is}from"./Download01-DNhEQzg0.js";import{i as fs,n as At}from"./Tool02-CvlAGFBM.js";import{i as rl}from"./Key01-CO_i2QPb.js";import{i as ol}from"./Play-wYDcJhBq.js";import{bh as il,Q as nl,ac as al,x as cl}from"./agent-icon-CTsmTxHg.js";import{M as Ts}from"./monaco-editor-ChRh_qus.js";import{a as dl}from"./use-members-C6brpkJ1.js";import{u as ml}from"./use-mcp-client-B_gcvvCy.js";import{b as ul}from"./use-virtual-mcp-Ji9vcgUj.js";import{c as fl}from"./XClose-CvcHLHe2.js";import{s as xl}from"./Plus-BSp00qOC.js";import{s as pl}from"./Trash01-DtE0n00a.js";import{I as Ht}from"./input-Buz_7xoG.js";import{M as qt}from"./multi-select-CYKeAXVo.js";import{b as wt,a as yt,c as Ee,d as St,S as It}from"./select-DBfOOW9i.js";import{S as gl}from"./scroll-area-DMmJ7JtI.js";import{t as Zt,n as ns}from"./ChevronUp-fg9sod-H.js";import{C as hl}from"./calendar-QcX36iLy.js";import{T as vl}from"./textarea-D5v3ol7T.js";import{C as $s}from"./collection-tabs-aKKPIP9M.js";import{S as jl}from"./switch-BIfmgDHS.js";import{L as Nl}from"./label-BX1BwzZ4.js";import{I as Tt}from"./integration-icon-D3FHJbYu.js";import{A as xs}from"./avatar-BzRNaDEk.js";import{a as bl,b as wl,A as yl}from"./alert-C8o4-kn8.js";import{K as ht}from"./monitoring-stats-row-DirMMFq2.js";import{b as zs}from"./use-entitlements-kPr6KRf9.js";import{g as Sl,b as ks,f as Nt,c as ls,a as ps,d as Il,e as Cs,h as Tl,i as gs,T as kl,j as Cl,r as Ml,k as Dl}from"./thread-sheet-body-Hqh1hVbj.js";import{u as _l}from"./useSuspenseInfiniteQuery-D9iG0Y5m.js";import{c as Ll,S as Rl,b as Es,a as As}from"./sheet-DWSThpSZ.js";import{c as Ue,b as Ut,d as hs,e as vs,T as je,a as js}from"./table-CEVOOGGz.js";import{u as Us,A as Pl}from"./automation-runs-C8Wbje-n.js";import{u as Vs}from"./use-infinite-scroll-D0T36z_V.js";import{u as Fl}from"./useInfiniteQuery-CzQJkRT9.js";import{g as Ol}from"./task-status-k7EGfTLN.js";import{u as $l,d as zl}from"./use-automations-D_y1YNke.js";import"./SearchMd-Bb5gjLcX.js";import"./access-gate-C9Dl5e5c.js";import"./capability-load-error-BVb3VEU2.js";import"./Stars01-D-wYuyik.js";import"./ArrowRight-DCA5zjxW.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-PyJ2NOzW.js";import"./use-copy-Cp_DyXH6.js";import"./usage-stats-YafP0g9G.js";import"./markdown-VKlC4_bJ.js";import"./dialog-AoC07APJ.js";import"./X-BtMi8Qau.js";import"./ZoomOut-DUFJq3-K.js";import"./org-file-open-context-D26BTBiX.js";import"./use-mobile-BZ15DgEB.js";import"./use-panel-navigate-IItrbgmN.js";import"./thread-route-CHwqHPf_.js";import"./use-project-scope-CCxyXvEU.js";import"./github-repo-BknN0SVI.js";import"./chat-context-ELO8A2Ar.js";import"./autosend-CVNOmzPu.js";import"./thread-intent-CTSjhfEo.js";import"./slugify-CEUa2lfQ.js";import"./hooks-D0dDgrIf.js";import"./backoff-8mStPHYB.js";import"./task-board-Dip4Wu9j.js";import"./schema-FDf70VFI.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D-abiIwe.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-qaEKsixC.js";import"./use-organization-settings-DvtBymY3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-wS7imsel.js";import"./types-7UQ7SDxU.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-CnYYocwu.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-2L7lI8NL.js";import"./Eye-Dq6Vw6FI.js";import"./Tool01-Dwy1nlT9.js";import"./Share07-CZ7JzYs9.js";import"./shell-layout-BQnbNNla.js";import"./Globe04-GFiRExL0.js";import"./SearchLg-DFD1t2UL.js";import"./download-app-dialog-CsiIuf7j.js";import"./CheckCircle-BmVuh1xp.js";import"./Monitor01-Ddm2yOG6.js";import"./Zap-DZAIluO6.js";import"./Settings02-D9Qv7BDm.js";import"./command-CZcxzTcw.js";import"./index-C97O3ClY.js";import"./project-icon-D_oHwik9.js";import"./required-auth-layout-BhdxJMdb.js";import"./use-org-sso-QeqdMaIa.js";import"./Image01-QB6twEDu.js";import"./LinkExternal01-DQD59o7F.js";import"./Palette-DT856bn6.js";import"./use-navigate-to-agent-B8SXI0oO.js";import"./Link01-BIFMl_M0.js";import"./use-mcp-prompts-DfSKL4Gu.js";import"./index-DyCAAYSx.js";import"./form-CYsJTpNM.js";import"./Globe01-g_y8gAs1.js";import"./use-thread-outputs-DYukUH5N.js";import"./file-type-icon-lZW2ows7.js";import"./index-Exw_Yjch.js";import"./ArrowUp-BtksDHBQ.js";import"./ArrowLeft-8rouBEwC.js";import"./TrendUp01-BCriuXJd.js";import"./UserSquare-CcF49LHs.js";import"./CreditCard01-CIt471eG.js";import"./DotsVertical-CE2o6L6N.js";import"./LayoutLeft-BfySK4h8.js";import"./Sun-DLRcOzSd.js";import"./Package-CvzEol5_.js";import"./Upload01-Ba-RLxE1.js";import"./User01-DHd46PZp.js";import"./Users01-B8gdz27Y.js";import"./XCircle-BLCHBIhx.js";import"./editor-oL1B7LVJ.js";import"./use-org-auth-client-8fDIgHEZ.js";import"./auth-BBW3DF0r.js";import"./checkbox-iGlb02v9.js";import"./chart-BVjaATZw.js";import"./index-0-s9o3tr.js";import"./CartesianChart-BbOaLmfq.js";import"./AreaChart-BSJ08P7a.js";import"./ErrorBarContext-DxNax47N.js";import"./Sector-wViCnB96.js";import"./infiniteQueryObserver-3RxH1tr-.js";const as={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},El=["eq","contains","exists","in"];function Al(s){return El.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),o=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${o}`}).join(",")}function Ul(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,o,...c]=e.split(":"),i=l?decodeURIComponent(l):"";if(i.trim())return{key:i,operator:o&&Al(o)?o:"eq",value:decodeURIComponent(c.join(":")||"")}}).filter(e=>e!==void 0)}function Yt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
|
+
`)}function Ms(s){return s.trim()?s.split(`
|
|
3
|
+
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...o]=e.split("=");return{key:l||"",operator:"eq",value:o.join("=")}}if(e.includes("~")){const[l,...o]=e.split("~");return{key:l||"",operator:"contains",value:o.join("~")}}if(e.includes("@")){const[l,...o]=e.split("@");return{key:l||"",operator:"in",value:o.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Vl(s){const e={},l={},o=[],c={};for(const i of s)if(i.key.trim())switch(i.operator){case"eq":i.value&&(e[i.key]=i.value);break;case"contains":i.value&&(l[i.key]=`%${i.value}%`);break;case"exists":o.push(i.key);break;case"in":i.value&&(c[i.key]=i.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:o.length>0?o:void 0,propertyInValues:Object.keys(c).length>0?c:void 0}}function Ds(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const o=l.length;return o<=as.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:o}:{content:l.slice(0,as.maxJsonRenderSize)+`
|
|
4
|
+
|
|
5
|
+
... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:o}}function Kl(s){const e=he.c(167),{log:l}=s,[o,c]=ce.useState(!1),[i,x]=ce.useState(!1),u=ms(),{org:m}=kt(),r=Ke(),h=is(),v=Ds(l.input),f=Ds(l.output),n=Hl;let b;e[0]!==l.input||e[1]!==l.output||e[2]!==r?(b=async ve=>{const pe=n(ve==="input"?l.input:l.output);try{await navigator.clipboard.writeText(pe),ve==="input"?(c(!0),setTimeout(()=>c(!1),2e3)):(x(!0),setTimeout(()=>x(!1),2e3))}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[0]=l.input,e[1]=l.output,e[2]=r,e[3]=b):b=e[3];const a=b;let I;e[4]!==l.id||e[5]!==l.input||e[6]!==l.output||e[7]!==l.toolName?(I=ve=>{const pe=n(ve==="input"?l.input:l.output),we=new Blob([pe],{type:"application/json"}),_e=URL.createObjectURL(we),Me=document.createElement("a");Me.href=_e,Me.download=`${l.toolName}-${ve}-${l.id}.json`,Me.click(),URL.revokeObjectURL(_e)},e[4]=l.id,e[5]=l.input,e[6]=l.output,e[7]=l.toolName,e[8]=I):I=e[8];const g=I;let y;e[9]!==h||e[10]!==l.connectionId||e[11]!==l.input||e[12]!==l.toolName||e[13]!==u||e[14]!==m||e[15]!==r?(y=()=>{const ve=h.find(we=>we.id===l.connectionId);if(!ve){dt.error(r("monitoring.types.connectionNotFound"));return}const pe=crypto.randomUUID();sessionStorage.setItem(`replay-${pe}`,JSON.stringify(l.input)),u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:m.slug,appSlug:Os(ve),collectionName:"tools",itemId:encodeURIComponent(l.toolName)},search:{replayId:pe}})},e[9]=h,e[10]=l.connectionId,e[11]=l.input,e[12]=l.toolName,e[13]=u,e[14]=m,e[15]=r,e[16]=y):y=e[16];const D=y,[d,_]=ce.useState(!1);let S;e[17]!==l.requestId||e[18]!==r?(S=async()=>{try{await navigator.clipboard.writeText(l.requestId),_(!0),setTimeout(()=>_(!1),2e3)}catch{dt.error(r("monitoring.types.failedToCopy"))}},e[17]=l.requestId,e[18]=r,e[19]=S):S=e[19];const p=S;let j;e[20]!==l.timestamp?(j=new Date(l.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[20]=l.timestamp,e[21]=j):j=e[21];const w=j,N="text-sm px-5 md:px-6 py-5 space-y-5";let L;e[22]!==r?(L=r("monitoring.types.timestamp"),e[22]=r,e[23]=L):L=e[23];let T;e[24]!==L?(T=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[24]=L,e[25]=T):T=e[25];let M;e[26]!==w?(M=t.jsx("div",{className:"text-sm text-foreground",children:w}),e[26]=w,e[27]=M):M=e[27];let E;e[28]!==T||e[29]!==M?(E=t.jsxs("div",{children:[T,M]}),e[28]=T,e[29]=M,e[30]=E):E=e[30];let k;e[31]!==r?(k=r("monitoring.types.duration"),e[31]=r,e[32]=k):k=e[32];let K;e[33]!==k?(K=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:k}),e[33]=k,e[34]=K):K=e[34];let A;e[35]!==l.durationMs?(A=t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]}),e[35]=l.durationMs,e[36]=A):A=e[36];let z;e[37]!==K||e[38]!==A?(z=t.jsxs("div",{children:[K,A]}),e[37]=K,e[38]=A,e[39]=z):z=e[39];let C;e[40]!==r?(C=r("monitoring.types.user"),e[40]=r,e[41]=C):C=e[41];let R;e[42]!==C?(R=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:C}),e[42]=C,e[43]=R):R=e[43];let O;e[44]!==l.userName?(O=t.jsx("div",{className:"text-sm text-foreground",children:l.userName}),e[44]=l.userName,e[45]=O):O=e[45];let V;e[46]!==R||e[47]!==O?(V=t.jsxs("div",{children:[R,O]}),e[46]=R,e[47]=O,e[48]=V):V=e[48];let B;e[49]!==l.virtualMcpName||e[50]!==r?(B=l.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.agent")}),t.jsx("div",{className:"text-sm text-foreground",children:l.virtualMcpName})]}),e[49]=l.virtualMcpName,e[50]=r,e[51]=B):B=e[51];let X;e[52]!==r?(X=r("monitoring.types.requestId"),e[52]=r,e[53]=X):X=e[53];let U;e[54]!==X?(U=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:X}),e[54]=X,e[55]=U):U=e[55];let G;e[56]!==l.requestId?(G=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:l.requestId}),e[56]=l.requestId,e[57]=G):G=e[57];let H;e[58]!==r?(H=r("monitoring.types.copyRequestId"),e[58]=r,e[59]=H):H=e[59];let F;e[60]!==d?(F=d?t.jsx(ts,{size:12}):t.jsx(Wt,{size:12}),e[60]=d,e[61]=F):F=e[61];let $;e[62]!==p||e[63]!==H||e[64]!==F?($=t.jsx(ge,{size:"icon",variant:"ghost",onClick:p,"aria-label":H,className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:F}),e[62]=p,e[63]=H,e[64]=F,e[65]=$):$=e[65];let Z;e[66]!==G||e[67]!==$?(Z=t.jsxs("div",{className:"flex items-center gap-1",children:[G,$]}),e[66]=G,e[67]=$,e[68]=Z):Z=e[68];let q;e[69]!==U||e[70]!==Z?(q=t.jsxs("div",{children:[U,Z]}),e[69]=U,e[70]=Z,e[71]=q):q=e[71];let J;e[72]!==l.userAgent||e[73]!==r?(J=l.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.client")}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:l.userAgent})]}),e[72]=l.userAgent,e[73]=r,e[74]=J):J=e[74];let ee;e[75]!==l.properties||e[76]!==u||e[77]!==m||e[78]!==r?(ee=l.properties&&Object.keys(l.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:r("monitoring.types.properties")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(l.properties).map(ve=>{const[pe,we]=ve;return t.jsxs(Jt,{children:[t.jsx(Gt,{asChild:!0,children:t.jsxs(Et,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[pe,"=",we]})}),t.jsx(Qt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const _e={key:pe,operator:"eq",value:we};u({to:"/$org/settings/monitor",params:{org:m.slug},search:{propertyFilters:jt([_e])}})},children:[t.jsx(fs,{size:14,className:"mr-2"}),r("monitoring.types.filterByProperty")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${pe}=${we}`),dt.success(r("monitoring.types.copiedFilter"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Wt,{size:14,className:"mr-2"}),r("monitoring.types.copyFilter")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(pe),dt.success(r("monitoring.types.copiedKey"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(rl,{size:14,className:"mr-2"}),r("monitoring.types.copyKey")]}),t.jsxs(ge,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(we),dt.success(r("monitoring.types.copiedValue"))}catch{dt.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(il,{size:14,className:"mr-2"}),r("monitoring.types.copyValue")]})]})})]},pe)})})]}),e[75]=l.properties,e[76]=u,e[77]=m,e[78]=r,e[79]=ee):ee=e[79];let te;e[80]!==E||e[81]!==z||e[82]!==V||e[83]!==B||e[84]!==q||e[85]!==J||e[86]!==ee?(te=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[E,z,V,B,q,J,ee]}),e[80]=E,e[81]=z,e[82]=V,e[83]=B,e[84]=q,e[85]=J,e[86]=ee,e[87]=te):te=e[87];let Q;e[88]!==l.errorMessage||e[89]!==r?(Q=l.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:r("monitoring.types.error")}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:l.errorMessage})]}),e[88]=l.errorMessage,e[89]=r,e[90]=Q):Q=e[90];const ue="space-y-4";let se;e[91]!==r?(se=r("monitoring.types.input"),e[91]=r,e[92]=se):se=e[92];let de;e[93]!==se?(de=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:se}),e[93]=se,e[94]=de):de=e[94];const ne=v.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",Ss(v.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let ae;e[95]!==de||e[96]!==ne?(ae=t.jsxs("div",{className:"flex items-center gap-2",children:[de,ne]}),e[95]=de,e[96]=ne,e[97]=ae):ae=e[97];let re;e[98]!==D||e[99]!==l.input||e[100]!==r?(re=l.input&&t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:D,"aria-label":r("monitoring.types.replayToolCall"),className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:t.jsx(ol,{size:14})})}),t.jsx(zt,{children:r("monitoring.types.replayToolCall")})]}),e[98]=D,e[99]=l.input,e[100]=r,e[101]=re):re=e[101];let le;e[102]!==g||e[103]!==v||e[104]!==r?(le=v.isTruncated&&t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>g("input"),"aria-label":r("monitoring.types.downloadFullInput"),className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:t.jsx(Is,{size:14})})}),t.jsx(zt,{children:r("monitoring.types.downloadFullInput")})]}),e[102]=g,e[103]=v,e[104]=r,e[105]=le):le=e[105];let oe;e[106]!==a?(oe=()=>a("input"),e[106]=a,e[107]=oe):oe=e[107];let ie;e[108]!==r?(ie=r("monitoring.types.copyInput"),e[108]=r,e[109]=ie):ie=e[109];let W;e[110]!==o?(W=o?t.jsx(ts,{size:14}):t.jsx(Wt,{size:14}),e[110]=o,e[111]=W):W=e[111];let fe;e[112]!==oe||e[113]!==ie||e[114]!==W?(fe=t.jsx(ge,{size:"icon",variant:"ghost",onClick:oe,"aria-label":ie,className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:W}),e[112]=oe,e[113]=ie,e[114]=W,e[115]=fe):fe=e[115];let P;e[116]!==re||e[117]!==le||e[118]!==fe?(P=t.jsxs("div",{className:"flex items-center gap-1",children:[re,le,fe]}),e[116]=re,e[117]=le,e[118]=fe,e[119]=P):P=e[119];let Y;e[120]!==ae||e[121]!==P?(Y=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[ae,P]}),e[120]=ae,e[121]=P,e[122]=Y):Y=e[122];let me;e[123]!==v?(me=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ts,{code:v.content,language:"json",height:"100%",readOnly:!0})}),e[123]=v,e[124]=me):me=e[124];let xe;e[125]!==Y||e[126]!==me?(xe=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[Y,me]})}),e[125]=Y,e[126]=me,e[127]=xe):xe=e[127];const Ae="rounded-lg overflow-hidden border border-border",ye="flex items-center justify-between p-1 pl-4 border-b border-border",Le="flex items-center gap-2";let Se;e[128]!==r?(Se=r("monitoring.types.output"),e[128]=r,e[129]=Se):Se=e[129];let Re;e[130]!==Se?(Re=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:Se}),e[130]=Se,e[131]=Re):Re=e[131];const Pe=f.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",Ss(f.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let Ie;e[132]!==Re||e[133]!==Pe?(Ie=t.jsxs("div",{className:Le,children:[Re,Pe]}),e[132]=Re,e[133]=Pe,e[134]=Ie):Ie=e[134];let Fe;e[135]!==g||e[136]!==f.isTruncated||e[137]!==r?(Fe=f.isTruncated&&t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>g("output"),"aria-label":r("monitoring.types.downloadFullOutput"),className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:t.jsx(Is,{size:14})})}),t.jsx(zt,{children:r("monitoring.types.downloadFullOutput")})]}),e[135]=g,e[136]=f.isTruncated,e[137]=r,e[138]=Fe):Fe=e[138];let Oe;e[139]!==a?(Oe=()=>a("output"),e[139]=a,e[140]=Oe):Oe=e[140];let De;e[141]!==r?(De=r("monitoring.types.copyOutput"),e[141]=r,e[142]=De):De=e[142];let $e;e[143]!==i?($e=i?t.jsx(ts,{size:14}):t.jsx(Wt,{size:14}),e[143]=i,e[144]=$e):$e=e[144];let Ne;e[145]!==Oe||e[146]!==De||e[147]!==$e?(Ne=t.jsx(ge,{size:"icon",variant:"ghost",onClick:Oe,"aria-label":De,className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:$e}),e[145]=Oe,e[146]=De,e[147]=$e,e[148]=Ne):Ne=e[148];let be;e[149]!==Fe||e[150]!==Ne?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[Fe,Ne]}),e[149]=Fe,e[150]=Ne,e[151]=be):be=e[151];let Te;e[152]!==Ie||e[153]!==be?(Te=t.jsxs("div",{className:ye,children:[Ie,be]}),e[152]=Ie,e[153]=be,e[154]=Te):Te=e[154];let ke;e[155]!==f.content?(ke=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(Ts,{code:f.content,language:"json",height:"100%",readOnly:!0})}),e[155]=f.content,e[156]=ke):ke=e[156];let Ce;e[157]!==Te||e[158]!==ke?(Ce=t.jsx("div",{children:t.jsxs("div",{className:Ae,children:[Te,ke]})}),e[157]=Te,e[158]=ke,e[159]=Ce):Ce=e[159];let ze;e[160]!==xe||e[161]!==Ce?(ze=t.jsxs("div",{className:ue,children:[xe,Ce]}),e[160]=xe,e[161]=Ce,e[162]=ze):ze=e[162];let He;return e[163]!==te||e[164]!==Q||e[165]!==ze?(He=t.jsxs("div",{className:N,children:[te,Q,ze]}),e[163]=te,e[164]=Q,e[165]=ze,e[166]=He):He=e[166],He}function Hl(s){return JSON.stringify(s,null,2)}const Ks=/^now(?:-(\d+)([mhdwM]))?$/,ql={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Hs(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const l=e.match(Ks);if(!l)return null;const o=l[1]?Number.parseInt(l[1],10):0,c=l[2]||null;return{isNow:!0,offset:o,unit:c}}function ct(s){const e=s.trim(),l=new Date(e);if(!Number.isNaN(l.getTime())&&e.includes("-"))return{valid:!0,date:l};const o=Hs(e);if(!o)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const c=new Date,i=new Date(c);if(o.offset===0||!o.unit)return{valid:!0,date:i};switch(o.unit){case"m":i.setMinutes(i.getMinutes()-o.offset);break;case"h":i.setHours(i.getHours()-o.offset);break;case"d":i.setDate(i.getDate()-o.offset);break;case"w":i.setDate(i.getDate()-o.offset*7);break;case"M":i.setMonth(i.getMonth()-o.offset);break}return{valid:!0,date:i}}function Bl(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function qs(s){const e=s.trim();return Ks.test(e)}function _s(s){const e=s.trim();if(e==="now")return"Now";const l=Hs(e);if(!l||!l.unit){const i=ct(e);return i.valid&&i.date?Bl(i.date):e}const o=ql[l.unit],c=l.offset!==1?"s":"";return`${l.offset} ${o}${c} ago`}const Bs=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Jl(s,e){const l=Bs.find(o=>o.from===s&&o.to===e);return l?l.label:`${_s(s)} to ${_s(e)}`}function Kt(s){const e=s.getFullYear(),l=String(s.getMonth()+1).padStart(2,"0"),o=String(s.getDate()).padStart(2,"0"),c=String(s.getHours()).padStart(2,"0"),i=String(s.getMinutes()).padStart(2,"0"),x=String(s.getSeconds()).padStart(2,"0");return`${e}-${l}-${o} ${c}:${i}:${x}`}function Gl(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,l,o,c,i,x,u]=e,m=new Date(Number(l),Number(o)-1,Number(c),Number(i),Number(x),Number(u));return Number.isNaN(m.getTime())?null:m}function rs(s){if(qs(s))return s;const e=ct(s);return e.valid&&e.date?Kt(e.date):s}function Ls({value:s,onChange:e,placeholder:l="now or now-2d",className:o,disabled:c,error:i}){const[x,u]=ce.useState(!1),[m,r]=ce.useState(()=>rs(s)),[h,v]=ce.useState(),[f,n]=ce.useState(!1),b=ce.useRef(s);b.current!==s&&(b.current=s,f||r(rs(s)));const a=j=>{const w=j.target.value;r(w),v(void 0)},I=()=>{n(!0)},g=()=>{n(!1);const j=m.trim();if(qs(j)){v(void 0),e(j);return}const w=Gl(j);if(w){v(void 0),e(w.toISOString()),r(Kt(w));return}const N=ct(j);if(N.valid&&N.date){v(void 0),e(j),r(Kt(N.date));return}r(rs(s)),v(void 0)},y=j=>{if(j){const N=ct(s).date||new Date;j.setHours(N.getHours()),j.setMinutes(N.getMinutes()),j.setSeconds(0),j.setMilliseconds(0);const L=j.toISOString();r(Kt(j)),e(L),v(void 0)}u(!1)},D=j=>{const[w,N]=j.target.value.split(":").map(Number),T=ct(s).date||new Date;T.setHours(w||0),T.setMinutes(N||0),T.setSeconds(0),T.setMilliseconds(0);const M=T.toISOString();r(Kt(T)),e(M)},d=ct(s),_=d.valid?d.date:new Date,S=_?`${String(_.getHours()).padStart(2,"0")}:${String(_.getMinutes()).padStart(2,"0")}`:"",p=i||h;return t.jsxs("div",{className:Ve("flex gap-1",o),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ht,{value:m,onChange:a,onFocus:I,onBlur:g,placeholder:l,disabled:c,className:Ve("text-sm h-8",p&&"border-destructive focus-visible:ring-destructive")}),p&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:p})]}),t.jsxs(Jt,{open:x,onOpenChange:u,children:[t.jsx(Gt,{asChild:!0,children:t.jsx(ge,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:c,children:t.jsx(nl,{className:"h-4 w-4"})})}),t.jsxs(Qt,{className:"w-auto p-0",align:"end",children:[t.jsx(hl,{mode:"single",selected:_||void 0,onSelect:y,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ht,{type:"time",value:S,onChange:D,className:"text-sm h-8"})]})]})]})]})}function Ql({value:s,onChange:e,className:l,disabled:o,quickRanges:c=Bs,labels:i}){const x=i?.absoluteTimeRange??"Absolute time range",u=i?.from??"From",m=i?.to??"To",r=i?.applyTimeRange??"Apply time range",[h,v]=ce.useState(!1),[f,n]=ce.useState(s.from),[b,a]=ce.useState(s.to),[I,g]=ce.useState(null),y=ce.useRef({from:s.from,to:s.to});(y.current.from!==s.from||y.current.to!==s.to)&&(y.current={from:s.from,to:s.to},n(s.from),a(s.to));const D=p=>{y.current={from:p.from,to:p.to},n(p.from),a(p.to),v(!1),e({from:p.from,to:p.to})},d=()=>{const p=ct(f),j=ct(b);if(!p.valid||!p.date){g("Invalid 'From' date");return}if(!j.valid||!j.date){g("Invalid 'To' date");return}if(p.date>=j.date){g("'From' must be before 'To'");return}g(null),e({from:f,to:b}),v(!1)},_=p=>s.from===p.from&&s.to===p.to,S=Jl(s.from,s.to);return t.jsxs(Jt,{open:h,onOpenChange:v,children:[t.jsx(Gt,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:Ve("gap-1.5 min-w-[160px] justify-between",l),disabled:o,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(al,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:S})]}),t.jsx(Zt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(Qt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:p=>p.preventDefault(),style:h?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:x}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:u}),t.jsx(Ls,{value:f,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:m}),t.jsx(Ls,{value:b,onChange:a,placeholder:"now"})]}),I&&t.jsx("p",{className:"text-xs text-destructive",children:I}),t.jsx(ge,{onClick:d,className:"w-full",size:"sm",children:r})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(gl,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:c.map(p=>{const j=_(p);return t.jsx("button",{type:"button",onClick:()=>D(p),className:Ve("w-full text-left px-3 py-2 text-sm classic:rounded-md compact:rounded-lg transition-colors","hover:bg-accent hover:text-accent-foreground",j&&"bg-accent text-accent-foreground font-medium"),children:p.label},p.value)})})})})]})})]})}const Js="decopilot";async function Gs(s,e){return await s.call("MONITORING_STATS",e)}function Xl(s,e){const l=he.c(12),{org:o}=kt(),c=us();let i,x,u;l[0]!==o.id||l[1]!==s?(u={...s,excludeConnectionIds:[Js,...s.excludeConnectionIds??[]]},x=Bt,i=bt.monitoringStatsToolCalls(o.id,JSON.stringify(u)),l[0]=o.id,l[1]=s,l[2]=i,l[3]=x,l[4]=u):(i=l[2],x=l[3],u=l[4]);let m;l[5]!==c||l[6]!==u?(m=()=>Gs(c,u),l[5]=c,l[6]=u,l[7]=m):m=l[7];let r;return l[8]!==e||l[9]!==i||l[10]!==m?(r={queryKey:i,queryFn:m,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=i,l[10]=m,l[11]=r):r=l[11],x(r)}function Wl(s,e){const l=he.c(12),{org:o}=kt(),c=us();let i,x,u;l[0]!==o.id||l[1]!==s?(u={...s,connectionIds:[Js],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},x=Bt,i=bt.monitoringStatsLlm(o.id,JSON.stringify(u)),l[0]=o.id,l[1]=s,l[2]=i,l[3]=x,l[4]=u):(i=l[2],x=l[3],u=l[4]);let m;l[5]!==c||l[6]!==u?(m=()=>Gs(c,u),l[5]=c,l[6]=u,l[7]=m):m=l[7];let r;return l[8]!==e||l[9]!==i||l[10]!==m?(r={queryKey:i,queryFn:m,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=i,l[10]=m,l[11]=r):r=l[11],x(r)}function Yl(s,e){const l=he.c(13),{org:o}=kt(),c=us(),i=s.virtualMcpIds?.length?s.virtualMcpIds:void 0;let x,u,m;l[0]!==o.id||l[1]!==s||l[2]!==i?(m={...s,virtualMcpIds:i},u=Bt,x=bt.monitoringHeatmap(o.id,JSON.stringify(m)),l[0]=o.id,l[1]=s,l[2]=i,l[3]=x,l[4]=u,l[5]=m):(x=l[3],u=l[4],m=l[5]);let r;l[6]!==c||l[7]!==m?(r=async()=>await c.call("MONITORING_HEATMAP",m),l[6]=c,l[7]=m,l[8]=r):r=l[8];let h;return l[9]!==e||l[10]!==x||l[11]!==r?(h={queryKey:x,queryFn:r,staleTime:3e4,retry:!1,...e},l[9]=e,l[10]=x,l[11]=r,l[12]=h):h=l[12],u(h)}function mt(s){const e=he.c(20),{title:l,value:o,action:c,children:i,className:x}=s;let u;e[0]!==x?(u=Ve("pt-4 px-4 pb-6 gap-8",x),e[0]=x,e[1]=u):u=e[1];let m;e[2]!==l?(m=t.jsx("span",{className:"text-sm text-foreground/70",children:l}),e[2]=l,e[3]=m):m=e[3];let r;e[4]!==o?(r=t.jsx("span",{className:"text-4xl font-normal",children:o}),e[4]=o,e[5]=r):r=e[5];let h;e[6]!==m||e[7]!==r?(h=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[m,r]}),e[6]=m,e[7]=r,e[8]=h):h=e[8];let v;e[9]!==c?(v=c&&t.jsx("div",{className:"shrink-0",children:c}),e[9]=c,e[10]=v):v=e[10];let f;e[11]!==h||e[12]!==v?(f=t.jsxs("div",{className:"flex items-start justify-between",children:[h,v]}),e[11]=h,e[12]=v,e[13]=f):f=e[13];let n;e[14]!==i?(n=i&&t.jsx("div",{className:"flex flex-col gap-6",children:i}),e[14]=i,e[15]=n):n=e[15];let b;return e[16]!==u||e[17]!==f||e[18]!==n?(b=t.jsxs(Fs,{className:u,children:[f,n]}),e[16]=u,e[17]=f,e[18]=n,e[19]=b):b=e[19],b}function os(s){const e=he.c(14),{metrics:l,connections:o,mode:c,total:i}=s,{org:x}=kt(),u=ms();let m,r,h;if(e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==u||e[4]!==x||e[5]!==i){h=Symbol.for("react.early_return_sentinel");e:{const f=o??[],n=new Map(l.map(er));let b;e[9]!==c?(b=(I,g)=>{const y=Cs(I.metric,c);return Cs(g.metric,c)-y},e[9]=c,e[10]=b):b=e[10];const a=f.map(I=>({connection:I,metric:n.get(I.id)})).filter(Zl).sort(b).slice(0,4);if(a.length===0){h=null;break e}m="flex flex-col",r=a.map((I,g)=>{const{connection:y,metric:D}=I,d=i>0?(D.calls/i*100).toFixed(1):"0.0",_=c==="errors"?`${D.errorRate.toFixed(1)}%`:`${d}%`,S=g===a.length-1;return t.jsxs("div",{className:Ve("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!S&&"border-b border-border/50"),onClick:()=>u({to:"/$org/settings/connections/$appSlug",params:{org:x.slug,appSlug:Os(y)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Tt,{icon:y.icon,name:y.title,size:"xs",fallbackIcon:t.jsx(At,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:y.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:_}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:Il(D,c)})]})]},y.id)})}e[0]=o,e[1]=l,e[2]=c,e[3]=u,e[4]=x,e[5]=i,e[6]=m,e[7]=r,e[8]=h}else m=e[6],r=e[7],h=e[8];if(h!==Symbol.for("react.early_return_sentinel"))return h;let v;return e[11]!==m||e[12]!==r?(v=t.jsx("div",{className:m,children:r}),e[11]=m,e[12]=r,e[13]=v):v=e[13],v}function Zl(s){return s.metric}function er(s){return[s.connectionId,s]}const Rs=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Ps(s){let e=0;for(let l=0;l<s.length;l++)e=e*31+s.charCodeAt(l)>>>0;return Rs[e%Rs.length]}function Vt(s){const e=he.c(21),{models:l,mode:o}=s,c=o===void 0?"calls":o;if(!zs()||l.length===0)return null;let x;e[0]!==c?(x=a=>c==="tokens"?(a.inputTokens??0)+(a.outputTokens??0):c==="cost"?a.costUsd??0:a.calls,e[0]=c,e[1]=x):x=e[1];const u=x;let m;e[2]!==c?(m=a=>c==="cost"?ps(a):c==="tokens"?Nt(a):a.toLocaleString(),e[2]=c,e[3]=m):m=e[3];const r=m;let h;e[4]!==u?(h=(a,I)=>a+u(I),e[4]=u,e[5]=h):h=e[5];const v=l.reduce(h,0);let f,n;if(e[6]!==r||e[7]!==l||e[8]!==v||e[9]!==u){let a;e[12]!==u?(a=(y,D)=>u(D)-u(y),e[12]=u,e[13]=a):a=e[13];const I=[...l].sort(a).slice(0,4);f="flex flex-col";let g;e[14]!==r||e[15]!==v||e[16]!==u?(g=(y,D,d)=>{const _=u(y),S=v>0?(_/v*100).toFixed(1):"0.0",p=D===d.length-1;return t.jsxs("div",{className:Ve("flex items-center h-10 px-3",!p&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Ps(y.toolName)} 18%, transparent)`},children:t.jsx(At,{size:14,style:{color:Ps(y.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:y.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[S,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:r(_)})]})]},y.toolName)},e[14]=r,e[15]=v,e[16]=u,e[17]=g):g=e[17],n=I.map(g),e[6]=r,e[7]=l,e[8]=v,e[9]=u,e[10]=f,e[11]=n}else f=e[10],n=e[11];let b;return e[18]!==f||e[19]!==n?(b=t.jsx("div",{className:f,children:n}),e[18]=f,e[19]=n,e[20]=b):b=e[20],b}const tr=12,sr=8;function lr(s,e){if(s===0)return"bg-muted-foreground/10";const l=e>0?s/e:0;return l<=.15?"bg-success/25":l<=.4?"bg-success/45":l<=.7?"bg-success/70":"bg-success"}function rr(s){const e=he.c(35),{cells:l,virtualMcps:o,metric:c}=s,i=Ke();if(l.length===0){let g;e[0]!==i?(g=i("orgs.overview.noHeatmapData"),e[0]=i,e[1]=g):g=e[1];let y;return e[2]!==g?(y=t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:g}),e[2]=g,e[3]=y):y=e[3],y}let x,u,m,r,h,v,f,n;if(e[4]!==l||e[5]!==c||e[6]!==i||e[7]!==o){const{topTools:g,topAgentIds:y,cellMap:D,maxValue:d}=Tl(l,c,tr,sr);let _;e[16]!==i||e[17]!==o?(_=j=>j===""?i("orgs.overview.noAgent"):o.find(w=>w.id===j)?.title??j,e[16]=i,e[17]=o,e[18]=_):_=e[18];const S=_;x=ll,n=0,f="overflow-x-auto",u="grid gap-1 min-w-max";const p=`140px repeat(${g.length}, 28px)`;e[19]!==p?(m={gridTemplateColumns:p},e[19]=p,e[20]=m):m=e[20],e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{}),e[21]=r):r=e[21],h=g.map(or),v=y.map(j=>t.jsxs(ce.Fragment,{children:[t.jsx("div",{className:"text-xs text-muted-foreground truncate flex items-center pr-2",title:S(j),children:S(j)}),g.map(w=>{const N=D.get(`${j}::${w}`),L=N?.[c]??0;return t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx("div",{className:Ve("aspect-square rounded-[2px]",lr(L,d))})}),t.jsx(zt,{children:i("orgs.overview.heatmapCellTooltip",{agent:S(j),tool:w,calls:N?.calls??0,errors:N?.errors??0,outputSize:Nt(N?.outputSize??0)})})]},w)})]},j||"none")),e[4]=l,e[5]=c,e[6]=i,e[7]=o,e[8]=x,e[9]=u,e[10]=m,e[11]=r,e[12]=h,e[13]=v,e[14]=f,e[15]=n}else x=e[8],u=e[9],m=e[10],r=e[11],h=e[12],v=e[13],f=e[14],n=e[15];let b;e[22]!==u||e[23]!==m||e[24]!==r||e[25]!==h||e[26]!==v?(b=t.jsxs("div",{className:u,style:m,children:[r,h,v]}),e[22]=u,e[23]=m,e[24]=r,e[25]=h,e[26]=v,e[27]=b):b=e[27];let a;e[28]!==f||e[29]!==b?(a=t.jsx("div",{className:f,children:b}),e[28]=f,e[29]=b,e[30]=a):a=e[30];let I;return e[31]!==x||e[32]!==n||e[33]!==a?(I=t.jsx(x,{delayDuration:n,children:a}),e[31]=x,e[32]=n,e[33]=a,e[34]=I):I=e[34],I}function or(s){return t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx("div",{className:"h-[80px] flex items-end justify-center pb-1 text-[10px] text-muted-foreground overflow-hidden [writing-mode:vertical-rl]",children:s})}),t.jsx(zt,{children:s})]},s)}function ir(s){const e=he.c(143),{displayDateRange:l,connectionIds:o,excludeConnectionIds:c,toolName:i,status:x,connections:u,isStreaming:m,streamingRefetchInterval:r,llmUserIds:h,virtualMcpIds:v,virtualMcps:f}=s,n=Ke(),b=Sl(l),a=m?r:!1;let I;e[0]!==a?(I={refetchInterval:a},e[0]=a,e[1]=I):I=e[1];const{data:g,isError:y}=Xl({interval:b,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionIds:o.length>0?o:void 0,excludeConnectionIds:c,toolNames:i?[i]:void 0,status:x},I);let D;e[2]!==a?(D={refetchInterval:a},e[2]=a,e[3]=D):D=e[3];const{data:d,isError:_}=Wl({interval:b,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),userIds:h?.length?h:void 0},D);let S;e[4]!==l.startDate?(S=l.startDate.toISOString(),e[4]=l.startDate,e[5]=S):S=e[5];let p;e[6]!==l.endDate?(p=l.endDate.toISOString(),e[6]=l.endDate,e[7]=p):p=e[7];let j;e[8]!==c||e[9]!==S||e[10]!==p||e[11]!==v?(j={startDate:S,endDate:p,virtualMcpIds:v,excludeConnectionIds:c},e[8]=c,e[9]=S,e[10]=p,e[11]=v,e[12]=j):j=e[12];let w;e[13]!==a?(w={refetchInterval:a},e[13]=a,e[14]=w):w=e[14];const{data:N}=Yl(j,w),L=y||_,T=g?{totalCalls:g.totalCalls,totalErrors:g.totalErrors,avgDurationMs:g.avgDurationMs,p95DurationMs:g.p95DurationMs,data:ks(g.timeseries,l,b)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},M=d?{totalCalls:d.totalCalls,totalErrors:d.totalErrors,avgDurationMs:d.avgDurationMs,p95DurationMs:d.p95DurationMs,data:ks(d.timeseries,l,b)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let E;e[15]!==d?.topTools?(E=d?.topTools??[],e[15]=d?.topTools,e[16]=E):E=e[16];const k=E,K=d?.totalInputTokens??0,A=d?.totalOutputTokens??0,z=d?.totalTokens??0,C=d?.totalCostUsd??0,R=zs();let O;e[17]!==g?.connectionBreakdown?(O=g?.connectionBreakdown??[],e[17]=g?.connectionBreakdown,e[18]=O):O=e[18];const V=O,[B,X]=ce.useState("avg"),[U,G]=ce.useState("calls");let H;e[19]!==L||e[20]!==n?(H=L&&t.jsxs(bl,{variant:"destructive",children:[t.jsx(Qs,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(wl,{children:n("orgs.overview.failedToLoadTitle")}),t.jsx(yl,{children:n("orgs.overview.failedToLoadDescription")})]})]}),e[19]=L,e[20]=n,e[21]=H):H=e[21];let F;e[22]!==n?(F=n("orgs.overview.toolCalls"),e[22]=n,e[23]=F):F=e[23];const $=T.totalCalls.toLocaleString(),Z=T.data;let q;e[24]!==n?(q=n("orgs.overview.toolCallsAriaLabel"),e[24]=n,e[25]=q):q=e[25];let J;e[26]!==n?(J=n("orgs.overview.toolCallHeatmap"),e[26]=n,e[27]=J):J=e[27];let ee;e[28]!==U||e[29]!==N?.cells?(ee=U==="calls"?(N?.cells??[]).reduce(ar,0).toLocaleString():Nt((N?.cells??[]).reduce(nr,0)),e[28]=U,e[29]=N?.cells,e[30]=ee):ee=e[30];let te;e[31]===Symbol.for("react.memo_cache_sentinel")?(te=at=>G(at),e[31]=te):te=e[31];let Q;e[32]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(wt,{className:"w-[140px]",children:t.jsx(yt,{})}),e[32]=Q):Q=e[32];let ue;e[33]!==n?(ue=n("orgs.overview.heatmapMetricCalls"),e[33]=n,e[34]=ue):ue=e[34];let se;e[35]!==ue?(se=t.jsx(Ee,{value:"calls",children:ue}),e[35]=ue,e[36]=se):se=e[36];let de;e[37]!==n?(de=n("orgs.overview.heatmapMetricOutputSize"),e[37]=n,e[38]=de):de=e[38];let ne;e[39]!==de?(ne=t.jsx(Ee,{value:"outputSize",children:de}),e[39]=de,e[40]=ne):ne=e[40];let ae;e[41]!==se||e[42]!==ne?(ae=t.jsxs(St,{children:[se,ne]}),e[41]=se,e[42]=ne,e[43]=ae):ae=e[43];let re;e[44]!==U||e[45]!==ae?(re=t.jsxs(It,{value:U,onValueChange:te,children:[Q,ae]}),e[44]=U,e[45]=ae,e[46]=re):re=e[46];let le;e[47]!==N?.cells?(le=N?.cells??[],e[47]=N?.cells,e[48]=le):le=e[48];let oe;e[49]!==U||e[50]!==le||e[51]!==f?(oe=t.jsx(rr,{cells:le,virtualMcps:f,metric:U}),e[49]=U,e[50]=le,e[51]=f,e[52]=oe):oe=e[52];let ie;e[53]!==J||e[54]!==ee||e[55]!==re||e[56]!==oe?(ie=t.jsx(mt,{title:J,value:ee,action:re,children:oe}),e[53]=J,e[54]=ee,e[55]=re,e[56]=oe,e[57]=ie):ie=e[57];let W;e[58]!==n?(W=n("orgs.overview.latency"),e[58]=n,e[59]=W):W=e[59];const fe=ls(B==="avg"?T.avgDurationMs:T.p95DurationMs);let P;e[60]===Symbol.for("react.memo_cache_sentinel")?(P=at=>X(at),e[60]=P):P=e[60];let Y;e[61]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(wt,{className:"w-[120px]",children:t.jsx(yt,{})}),e[61]=Y):Y=e[61];let me;e[62]!==n?(me=n("orgs.overview.latencyAvg"),e[62]=n,e[63]=me):me=e[63];let xe;e[64]!==me?(xe=t.jsx(Ee,{value:"avg",children:me}),e[64]=me,e[65]=xe):xe=e[65];let Ae;e[66]!==n?(Ae=n("orgs.overview.latencyP95"),e[66]=n,e[67]=Ae):Ae=e[67];let ye;e[68]!==Ae?(ye=t.jsx(Ee,{value:"p95",children:Ae}),e[68]=Ae,e[69]=ye):ye=e[69];let Le;e[70]!==xe||e[71]!==ye?(Le=t.jsxs(St,{children:[xe,ye]}),e[70]=xe,e[71]=ye,e[72]=Le):Le=e[72];let Se;e[73]!==B||e[74]!==Le?(Se=t.jsxs(It,{value:B,onValueChange:P,children:[Y,Le]}),e[73]=B,e[74]=Le,e[75]=Se):Se=e[75];const Re=T.data;let Pe;e[76]!==B||e[77]!==n?(Pe=n("orgs.overview.latencyAriaLabel",{type:B==="avg"?n("orgs.overview.average"):"P95"}),e[76]=B,e[77]=n,e[78]=Pe):Pe=e[78];let Ie;e[79]!==n?(Ie=n("orgs.overview.errors"),e[79]=n,e[80]=Ie):Ie=e[80];const Fe=T.totalErrors.toLocaleString(),Oe=T.data;let De;e[81]!==n?(De=n("orgs.overview.errorsAriaLabel"),e[81]=n,e[82]=De):De=e[82];let $e;e[83]===Symbol.for("react.memo_cache_sentinel")?($e=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[83]=$e):$e=e[83];let Ne;e[84]!==n?(Ne=n("orgs.overview.aiUsage"),e[84]=n,e[85]=Ne):Ne=e[85];let be;e[86]!==Ne?(be=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:Ne}),e[86]=Ne,e[87]=be):be=e[87];let Te;e[88]===Symbol.for("react.memo_cache_sentinel")?(Te=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[88]=Te):Te=e[88];let ke;e[89]!==be?(ke=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[$e,be,Te]}),e[89]=be,e[90]=ke):ke=e[90];let Ce;e[91]!==n?(Ce=n("orgs.overview.aiCalls"),e[91]=n,e[92]=Ce):Ce=e[92];const ze=M.totalCalls.toLocaleString(),He=M.data;let ve;e[93]!==n?(ve=n("orgs.overview.aiCallsAriaLabel"),e[93]=n,e[94]=ve):ve=e[94];let pe;e[95]!==k?(pe=t.jsx(Vt,{models:k,mode:"calls"}),e[95]=k,e[96]=pe):pe=e[96];let we;e[97]!==n?(we=n("orgs.overview.tokens"),e[97]=n,e[98]=we):we=e[98];let _e;e[99]!==z?(_e=Nt(z),e[99]=z,e[100]=_e):_e=e[100];let Me;e[101]!==K?(Me=Nt(K),e[101]=K,e[102]=Me):Me=e[102];let qe;e[103]!==n?(qe=n("orgs.overview.tokensIn"),e[103]=n,e[104]=qe):qe=e[104];let Be;e[105]!==A?(Be=Nt(A),e[105]=A,e[106]=Be):Be=e[106];let Je;e[107]!==n?(Je=n("orgs.overview.tokensOut"),e[107]=n,e[108]=Je):Je=e[108];let Ye;e[109]!==Me||e[110]!==qe||e[111]!==Be||e[112]!==Je?(Ye=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[Me," ",qe," ·"," ",Be," ",Je]}),e[109]=Me,e[110]=qe,e[111]=Be,e[112]=Je,e[113]=Ye):Ye=e[113];const ut=M.data;let Ze;e[114]!==n?(Ze=n("orgs.overview.tokensAriaLabel"),e[114]=n,e[115]=Ze):Ze=e[115];let et;e[116]!==k?(et=t.jsx(Vt,{models:k,mode:"tokens"}),e[116]=k,e[117]=et):et=e[117];let tt;e[118]!==n?(tt=n("orgs.overview.aiLatency"),e[118]=n,e[119]=tt):tt=e[119];const ft=ls(M.avgDurationMs);let st;e[120]!==n?(st=n("orgs.overview.p95Prefix"),e[120]=n,e[121]=st):st=e[121];const xt=M.data;let lt;e[122]!==n?(lt=n("orgs.overview.aiLatencyAriaLabel"),e[122]=n,e[123]=lt):lt=e[123];let rt;e[124]!==k?(rt=t.jsx(Vt,{models:k,mode:"calls"}),e[124]=k,e[125]=rt):rt=e[125];const it=mt;let Ge;e[126]!==n?(Ge=n("orgs.overview.aiErrors"),e[126]=n,e[127]=Ge):Ge=e[127];const nt=M.totalErrors.toLocaleString(),pt=M.data;let Qe;e[128]!==n?(Qe=n("orgs.overview.aiErrorsAriaLabel"),e[128]=n,e[129]=Qe):Qe=e[129];let Xe;e[130]!==M.data||e[131]!==Qe?(Xe=t.jsx(ht,{data:pt,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Qe}),e[130]=M.data,e[131]=Qe,e[132]=Xe):Xe=e[132];let We;e[133]!==k||e[134]!==M.totalErrors||e[135]!==n?(We=M.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:n("orgs.overview.noAiErrors")}):t.jsx(Vt,{models:k,mode:"calls"}),e[133]=k,e[134]=M.totalErrors,e[135]=n,e[136]=We):We=e[136];let ot;return e[137]!==it||e[138]!==Ge||e[139]!==nt||e[140]!==Xe||e[141]!==We?(ot=t.jsxs(it,{title:Ge,value:nt,children:[Xe,We]}),e[137]=it,e[138]=Ge,e[139]=nt,e[140]=Xe,e[141]=We,e[142]=ot):ot=e[142],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[H,t.jsxs(mt,{title:F,value:$,children:[t.jsx(ht,{data:Z,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:q}),t.jsx(os,{metrics:V,connections:u,mode:"requests",total:T.totalCalls})]}),ie,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:W,value:fe,action:Se,children:[t.jsx(ht,{data:Re,dataKey:B,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Pe}),t.jsx(os,{metrics:V,connections:u,mode:"latency",total:T.totalCalls})]}),t.jsxs(mt,{title:Ie,value:Fe,children:[t.jsx(ht,{data:Oe,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:De}),T.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:n("orgs.overview.noErrors")}):t.jsx(os,{metrics:V,connections:u,mode:"errors",total:T.totalErrors})]})]}),ke,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(mt,{title:Ce,value:ze,children:[t.jsx(ht,{data:He,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:ve}),pe]}),t.jsxs(mt,{title:we,value:_e,action:Ye,children:[t.jsx(ht,{data:ut,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ze}),et]}),R?t.jsxs(mt,{title:n("orgs.overview.cost"),value:C>0?ps(C):"—",action:C===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:n("orgs.overview.noCostData")}):void 0,children:[t.jsx(ht,{data:M.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:n("orgs.overview.costAriaLabel")}),C>0?t.jsx(Vt,{models:k,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:n("orgs.overview.costProvidersNotice")})]}):null]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:tt,value:ft,action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:[st,ls(M.p95DurationMs)]}),children:[t.jsx(ht,{data:xt,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:lt}),rt]}),ot]})]})}function nr(s,e){return s+e.outputSize}function ar(s,e){return s+e.calls}function Ft(s){const e=he.c(8),{className:l}=s;let o;e[0]!==l?(o=Ve("pt-4 px-4 pb-6 gap-8",l),e[0]=l,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=c):c=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=i):i=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=Array.from({length:4}).map(cr),e[4]=x):x=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"flex flex-col gap-6",children:[i,t.jsxs("div",{className:"flex flex-col",children:[x,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=u):u=e[5];let m;return e[6]!==o?(m=t.jsxs(Fs,{className:o,children:[c,u]}),e[6]=o,e[7]=m):m=e[7],m}function cr(s,e){return t.jsxs("div",{className:Ve("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function dr(){const s=he.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ft,{}),s[0]=e):e=s[0];let l,o;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ft,{}),t.jsx(Ft,{})]}),o=t.jsx("div",{className:"border-t border-border"}),s[1]=l,s[2]=o):(l=s[1],o=s[2]);let c;return s[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,l,o,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ft,{}),t.jsx(Ft,{}),t.jsx(Ft,{})]})]}),s[3]=c):c=s[3],c}function mr(s){const e=he.c(49),{log:l,connection:o,virtualMcpName:c,virtualMcpIcon:i,onClick:x,lastLogRef:u}=s,m=Ke();let r,h;if(e[0]!==l.timestamp){const k=new Date(l.timestamp);r=k.toLocaleDateString("en-US",{month:"short",day:"numeric"}),h=k.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=r,e[2]=h}else r=e[1],h=e[2];const v=h,f=o?.icon||null,n=o?.title??l.connectionId;let b;e[3]!==f||e[4]!==n?(b=t.jsx(Ue,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(Tt,{icon:f,name:n,size:"xs",className:"shadow-sm"})})}),e[3]=f,e[4]=n,e[5]=b):b=e[5];let a;e[6]!==l.toolName?(a=t.jsx("div",{className:"font-medium text-foreground truncate block",children:l.toolName}),e[6]=l.toolName,e[7]=a):a=e[7];const I=o?.title??l.connectionId;let g;e[8]!==I?(g=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:I}),e[8]=I,e[9]=g):g=e[9];let y;e[10]!==a||e[11]!==g?(y=t.jsxs(Ue,{className:"min-w-0 pr-2 md:pr-4",children:[a,g]}),e[10]=a,e[11]=g,e[12]=y):y=e[12];let D;e[13]!==i||e[14]!==c?(D=t.jsx(Ue,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:c?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Tt,{icon:i,name:c,size:"xs",fallbackIcon:t.jsx(At,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:c})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=i,e[14]=c,e[15]=D):D=e[15];let d;e[16]!==l.userImage||e[17]!==l.userName?(d=t.jsx(xs,{url:l.userImage,fallback:l.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=l.userImage,e[17]=l.userName,e[18]=d):d=e[18];let _;e[19]!==l.userName?(_=t.jsx("span",{className:"truncate",children:l.userName}),e[19]=l.userName,e[20]=_):_=e[20];let S;e[21]!==d||e[22]!==_?(S=t.jsx(Ue,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,_]})}),e[21]=d,e[22]=_,e[23]=S):S=e[23];let p;e[24]!==r?(p=t.jsx("div",{children:r}),e[24]=r,e[25]=p):p=e[25];let j;e[26]!==v?(j=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:v}),e[26]=v,e[27]=j):j=e[27];let w;e[28]!==p||e[29]!==j?(w=t.jsxs(Ue,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[p,j]}),e[28]=p,e[29]=j,e[30]=w):w=e[30];let N;e[31]!==l.durationMs?(N=t.jsxs(Ue,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[l.durationMs,"ms"]}),e[31]=l.durationMs,e[32]=N):N=e[32];const L=l.isError?"destructive":"success";let T;e[33]!==l.isError||e[34]!==m?(T=l.isError?m("monitoring.logRow.statusError"):m("monitoring.logRow.statusOk"),e[33]=l.isError,e[34]=m,e[35]=T):T=e[35];let M;e[36]!==L||e[37]!==T?(M=t.jsx(Ue,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(Et,{variant:L,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:T})})}),e[36]=L,e[37]=T,e[38]=M):M=e[38];let E;return e[39]!==u||e[40]!==x||e[41]!==S||e[42]!==w||e[43]!==N||e[44]!==M||e[45]!==b||e[46]!==y||e[47]!==D?(E=t.jsxs(Ut,{ref:u,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:x,children:[b,y,D,S,w,N,M]}),e[39]=u,e[40]=x,e[41]=S,e[42]=w,e[43]=N,e[44]=M,e[45]=b,e[46]=y,e[47]=D,e[48]=E):E=e[48],E}function ur(s){const e=he.c(79),{connectionIds:l,virtualMcpIds:o,tool:c,status:i,search:x,logs:u,hasMore:m,onLoadMore:r,isLoadingMore:h,connections:v,virtualMcps:f,membersData:n,client:b}=s,a=Ke(),I=v??[],g=f??[],y=Vs(r,m,h),D=gs(n),d=new Map(D.map(pr)),_=new Map(g.map(xr));let p=u.map(P=>{const Y=d.get(P.userId??""),me=P.virtualMcpId?_.get(P.virtualMcpId):null;return{...P,userName:Y?.name??P.userId??"Unknown",userImage:Y?.image??void 0,virtualMcpName:me?.title??null,virtualMcpIcon:me?.icon??null}});if(l.length>1){let P;e[0]!==l?(P=Y=>l.includes(Y.connectionId),e[0]=l,e[1]=P):P=e[1],p=p.filter(P)}if(o.length>1){let P;e[2]!==o?(P=Y=>Y.virtualMcpId&&o.includes(Y.virtualMcpId),e[2]=o,e[3]=P):P=e[3],p=p.filter(P)}const j=new Map(I.map(fr));if(x){const P=x.toLowerCase();p=p.filter(Y=>Y.toolName.toLowerCase().includes(P)||(j.get(Y.connectionId)?.title??Y.connectionId).toLowerCase().includes(P)||Y.errorMessage?.toLowerCase().includes(P))}const w=Us(p),N=w.selected;let L;e[4]!==N?.id?(L=bt.monitoringLogDetail(N?.id??""),e[4]=N?.id,e[5]=L):L=e[5];let T;e[6]!==b||e[7]!==N?(T=async()=>{if(!b)throw new Error("MCP client is not available");const P=await b.callTool({name:"MONITORING_LOG_GET",arguments:{id:N.id}});return P.structuredContent??P},e[6]=b,e[7]=N,e[8]=T):T=e[8];const M=N!==null;let E;e[9]!==L||e[10]!==T||e[11]!==M?(E={queryKey:L,queryFn:T,enabled:M},e[9]=L,e[10]=T,e[11]=M,e[12]=E):E=e[12];const k=Bt(E),K=k.data?.log;let A;e[13]!==K||e[14]!==N?(A=N&&K?{...N,input:K.input,output:K.output}:N,e[13]=K,e[14]=N,e[15]=A):A=e[15];const z=A;if(p.length===0){let P;e[16]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[16]=P):P=e[16];let Y;e[17]!==a?(Y=a("orgs.audit.noLogsFound"),e[17]=a,e[18]=Y):Y=e[18];let me;e[19]!==l.length||e[20]!==x||e[21]!==i||e[22]!==a||e[23]!==c||e[24]!==o.length?(me=x||l.length>0||o.length>0||c||i!=="all"?a("orgs.audit.noLogsMatchFilters"):a("orgs.audit.noLogsInTimeRange"),e[19]=l.length,e[20]=x,e[21]=i,e[22]=a,e[23]=c,e[24]=o.length,e[25]=me):me=e[25];let xe;return e[26]!==Y||e[27]!==me?(xe=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(es,{image:P,title:Y,description:me})}),e[26]=Y,e[27]=me,e[28]=xe):xe=e[28],xe}const C="flex-1 flex flex-col min-w-0",R="flex-1 min-w-0 pt-1",O="min-w-[600px] md:min-w-0",V=vs,B="w-full border-collapse";let X;e[29]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(je,{className:"w-5"}),e[29]=X):X=e[29];let U;e[30]!==a?(U=a("orgs.audit.toolConnection"),e[30]=a,e[31]=U):U=e[31];let G;e[32]!==U?(G=t.jsx(je,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:U}),e[32]=U,e[33]=G):G=e[33];let H;e[34]!==a?(H=a("orgs.audit.agent"),e[34]=a,e[35]=H):H=e[35];let F;e[36]!==H?(F=t.jsx(je,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:H}),e[36]=H,e[37]=F):F=e[37];let $;e[38]!==a?($=a("orgs.audit.user"),e[38]=a,e[39]=$):$=e[39];let Z;e[40]!==$?(Z=t.jsx(je,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:$}),e[40]=$,e[41]=Z):Z=e[41];let q;e[42]!==a?(q=a("orgs.audit.date"),e[42]=a,e[43]=q):q=e[43];let J;e[44]!==q?(J=t.jsx(je,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:q}),e[44]=q,e[45]=J):J=e[45];let ee;e[46]!==a?(ee=a("orgs.audit.latency"),e[46]=a,e[47]=ee):ee=e[47];let te;e[48]!==ee?(te=t.jsx(je,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:ee}),e[48]=ee,e[49]=te):te=e[49];let Q;e[50]!==a?(Q=a("orgs.audit.status"),e[50]=a,e[51]=Q):Q=e[51];let ue;e[52]!==Q?(ue=t.jsx(je,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:Q}),e[52]=Q,e[53]=ue):ue=e[53];let se;e[54]!==G||e[55]!==F||e[56]!==Z||e[57]!==J||e[58]!==te||e[59]!==ue?(se=t.jsx(js,{className:"border-b-0 z-20",children:t.jsxs(Ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[X,G,F,Z,J,te,ue]})}),e[54]=G,e[55]=F,e[56]=Z,e[57]=J,e[58]=te,e[59]=ue,e[60]=se):se=e[60];const de=hs,ne=p.map((P,Y)=>t.jsx(mr,{log:P,connection:j.get(P.connectionId),virtualMcpName:P.virtualMcpName??"",virtualMcpIcon:P.virtualMcpIcon,onClick:()=>w.select(P.id),lastLogRef:Y===p.length-1?y:void 0},P.id));let ae;e[61]!==de||e[62]!==ne?(ae=t.jsx(de,{children:ne}),e[61]=de,e[62]=ne,e[63]=ae):ae=e[63];let re;e[64]!==V||e[65]!==se||e[66]!==ae?(re=t.jsx("div",{className:R,children:t.jsx("div",{className:O,children:t.jsxs(V,{className:B,children:[se,ae]})})}),e[64]=V,e[65]=se,e[66]=ae,e[67]=re):re=e[67];let le;e[68]!==w?(le=P=>{P||w.close()},e[68]=w,e[69]=le):le=e[69];const oe=N&&t.jsxs(t.Fragment,{children:[t.jsx(Ll,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(Tt,{icon:j.get(N.connectionId)?.icon||null,name:j.get(N.connectionId)?.title??N.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Rl,{className:"text-sm leading-snug truncate",children:N.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:j.get(N.connectionId)?.title??N.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(ge,{size:"icon",variant:"ghost",onClick:w.prev,disabled:w.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.previousEntry"),children:t.jsx(ns,{size:14})}),t.jsx(ge,{size:"icon",variant:"ghost",onClick:w.next,disabled:w.index===p.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.nextEntry"),children:t.jsx(Zt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:k.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx(Xs,{className:"size-5 text-muted-foreground"})}):k.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:a("orgs.audit.failedLoadLogDetails")}),t.jsx(ge,{variant:"outline",size:"sm",onClick:()=>k.refetch(),children:a("orgs.audit.retry")})]}):t.jsx(Kl,{log:z})})]});let ie;e[70]!==oe?(ie=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:oe}),e[70]=oe,e[71]=ie):ie=e[71];let W;e[72]!==w.isOpen||e[73]!==le||e[74]!==ie?(W=t.jsx(Es,{open:w.isOpen,onOpenChange:le,children:ie}),e[72]=w.isOpen,e[73]=le,e[74]=ie,e[75]=W):W=e[75];let fe;return e[76]!==re||e[77]!==W?(fe=t.jsxs("div",{className:C,children:[re,W]}),e[76]=re,e[77]=W,e[78]=fe):fe=e[78],fe}function fr(s){return[s.id,s]}function xr(s){return[s.id,s]}function pr(s){return[s.userId,s.user]}function gr(){const s=he.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(je,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(je,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=l):l=s[1];let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(je,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=o):o=s[2];let c;s[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(je,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=c):c=s[3];let i;s[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(je,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=i):i=s[4];let x;s[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(je,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=x):x=s[5];let u;s[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(js,{className:"border-b-0 z-20",children:t.jsxs(Ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,l,o,c,i,x,t.jsx(je,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=u):u=s[6];let m;return s[7]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(vs,{className:"w-full border-collapse",children:[u,t.jsx(hs,{children:Array.from({length:8}).map(hr)})]})})}),s[7]=m):m=s[7],m}function hr(s,e){return t.jsxs(Ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const cs=Object.assign(ur,{Skeleton:gr});function vr(s){const e=he.c(34),{client:l,locator:o,baseParams:c,pageSize:i,isStreaming:x,streamingRefetchInterval:u,connectionIds:m,virtualMcpIds:r,tool:h,status:v,searchQuery:f,allConnections:n,allVirtualMcps:b,membersData:a}=s;let I;e[0]!==c||e[1]!==o?(I=bt.monitoringLogsInfinite(o,JSON.stringify(c)),e[0]=c,e[1]=o,e[2]=I):I=e[2];let g;e[3]!==c||e[4]!==l||e[5]!==i?(g=async k=>{const{pageParam:K}=k,A=K===void 0?0:K;if(!l)throw new Error("MCP client is not available");const z=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...c,limit:i,offset:A}});return z.structuredContent??z},e[3]=c,e[4]=l,e[5]=i,e[6]=g):g=e[6];let y;e[7]!==i?(y=(k,K)=>{if(!((k?.logs?.length??0)<i))return K.length*i},e[7]=i,e[8]=y):y=e[8];const D=x?u:!1;let d;e[9]!==I||e[10]!==g||e[11]!==y||e[12]!==D?(d={queryKey:I,queryFn:g,initialPageParam:0,getNextPageParam:y,staleTime:0,refetchInterval:D},e[9]=I,e[10]=g,e[11]=y,e[12]=D,e[13]=d):d=e[13];const{data:_,fetchNextPage:S,hasNextPage:p,isFetchingNextPage:j}=_l(d);let w;e[14]!==_.pages?(w=_.pages.flatMap(jr),e[14]=_.pages,e[15]=w):w=e[15];const N=w;let L;e[16]!==S||e[17]!==p||e[18]!==j?(L=()=>{p&&!j&&S()},e[16]=S,e[17]=p,e[18]=j,e[19]=L):L=e[19];const T=L,M=p??!1;let E;return e[20]!==n||e[21]!==b||e[22]!==l||e[23]!==m||e[24]!==T||e[25]!==j||e[26]!==a||e[27]!==N||e[28]!==f||e[29]!==v||e[30]!==M||e[31]!==h||e[32]!==r?(E=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(cs,{connectionIds:m,virtualMcpIds:r,tool:h,status:v,search:f,logs:N,hasMore:M,onLoadMore:T,isLoadingMore:j,connections:n,virtualMcps:b,membersData:a,client:l})})})}),e[20]=n,e[21]=b,e[22]=l,e[23]=m,e[24]=T,e[25]=j,e[26]=a,e[27]=N,e[28]=f,e[29]=v,e[30]=M,e[31]=h,e[32]=r,e[33]=E):E=e[33],E}function jr(s){return s.logs??[]}function Nr(s){const e=he.c(96),{thread:l,usage:o,members:c,connections:i,virtualMcps:x,onClick:u,lastRowRef:m}=s,r=Ke();let h,v;if(e[0]!==i||e[1]!==l||e[2]!==x){const $=Cl(l);h=Ml($,x,i,"—"),v=Dl($,x,i),e[0]=i,e[1]=l,e[2]=x,e[3]=h,e[4]=v}else h=e[3],v=e[4];const f=v;let n;if(e[5]!==c||e[6]!==l.created_by){const $=gs(c);let Z;e[8]!==l.created_by?(Z=q=>q.userId===l.created_by,e[8]=l.created_by,e[9]=Z):Z=e[9],n=$.find(Z),e[5]=c,e[6]=l.created_by,e[7]=n}else n=e[7];const b=n;let a;e[10]!==b?.user.email||e[11]!==b?.user.name||e[12]!==l.created_by?(a=b?.user.name??b?.user.email??l.created_by?.substring(0,8)??"—",e[10]=b?.user.email,e[11]=b?.user.name,e[12]=l.created_by,e[13]=a):a=e[13];const I=a,g=b?.user.image??void 0;let y,D;if(e[14]!==l.created_at){const $=new Date(l.created_at);y=$.toLocaleDateString("en-US",{month:"short",day:"numeric"}),D=$.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[14]=l.created_at,e[15]=y,e[16]=D}else y=e[15],D=e[16];const d=D;let _,S,p,j,w,N,L,T,M,E,k,K,A;if(e[17]!==f||e[18]!==h||e[19]!==m||e[20]!==u||e[21]!==r||e[22]!==l.status||e[23]!==l.title||e[24]!==g||e[25]!==I){const $=Ol(l.status),Z=$.icon;S=Ut,p=m,j="h-14 md:h-16 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",w=u,e[39]!==l.title?(N=t.jsx(Ue,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:t.jsx("div",{className:"font-medium text-foreground truncate",children:l.title})}),e[39]=l.title,e[40]=N):N=e[40];let q;e[41]===Symbol.for("react.memo_cache_sentinel")?(q=t.jsx(At,{}),e[41]=q):q=e[41];let J;e[42]!==f||e[43]!==h?(J=t.jsx(Tt,{icon:f,name:h,size:"xs",fallbackIcon:q,className:"shrink-0 size-5! min-w-5! rounded-md"}),e[42]=f,e[43]=h,e[44]=J):J=e[44];let ee;e[45]!==h?(ee=t.jsx("span",{className:"truncate",children:h}),e[45]=h,e[46]=ee):ee=e[46],e[47]!==J||e[48]!==ee?(L=t.jsx(Ue,{className:"w-36 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[J,ee]})}),e[47]=J,e[48]=ee,e[49]=L):L=e[49];let te;e[50]!==g||e[51]!==I?(te=t.jsx(xs,{url:g,fallback:I,shape:"circle",size:"2xs",className:"shrink-0"}),e[50]=g,e[51]=I,e[52]=te):te=e[52];let Q;e[53]!==I?(Q=t.jsx("span",{className:"truncate",children:I}),e[53]=I,e[54]=Q):Q=e[54],e[55]!==te||e[56]!==Q?(T=t.jsx(Ue,{className:"w-28 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[te,Q]})}),e[55]=te,e[56]=Q,e[57]=T):T=e[57],_=Ue,A="w-24 px-3",k="flex items-center gap-1.5",K=t.jsx(Z,{size:14,className:$.iconClassName}),M=Ve("text-sm",$.labelColor),E=r($.labelKey),e[17]=f,e[18]=h,e[19]=m,e[20]=u,e[21]=r,e[22]=l.status,e[23]=l.title,e[24]=g,e[25]=I,e[26]=_,e[27]=S,e[28]=p,e[29]=j,e[30]=w,e[31]=N,e[32]=L,e[33]=T,e[34]=M,e[35]=E,e[36]=k,e[37]=K,e[38]=A}else _=e[26],S=e[27],p=e[28],j=e[29],w=e[30],N=e[31],L=e[32],T=e[33],M=e[34],E=e[35],k=e[36],K=e[37],A=e[38];let z;e[58]!==M||e[59]!==E?(z=t.jsx("span",{className:M,children:E}),e[58]=M,e[59]=E,e[60]=z):z=e[60];let C;e[61]!==z||e[62]!==k||e[63]!==K?(C=t.jsxs("div",{className:k,children:[K,z]}),e[61]=z,e[62]=k,e[63]=K,e[64]=C):C=e[64];let R;e[65]!==_||e[66]!==C||e[67]!==A?(R=t.jsx(_,{className:A,children:C}),e[65]=_,e[66]=C,e[67]=A,e[68]=R):R=e[68];let O;e[69]!==o?(O=o?Nt(o.totalTokens):"—",e[69]=o,e[70]=O):O=e[70];let V;e[71]!==O?(V=t.jsx(Ue,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:O}),e[71]=O,e[72]=V):V=e[72];let B;e[73]!==o?(B=o&&o.costUsd>0?ps(o.costUsd):"—",e[73]=o,e[74]=B):B=e[74];let X;e[75]!==B?(X=t.jsx(Ue,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:B}),e[75]=B,e[76]=X):X=e[76];let U;e[77]!==y?(U=t.jsx("div",{children:y}),e[77]=y,e[78]=U):U=e[78];let G;e[79]!==d?(G=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:d}),e[79]=d,e[80]=G):G=e[80];let H;e[81]!==U||e[82]!==G?(H=t.jsxs(Ue,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[U,G]}),e[81]=U,e[82]=G,e[83]=H):H=e[83];let F;return e[84]!==S||e[85]!==p||e[86]!==j||e[87]!==w||e[88]!==N||e[89]!==L||e[90]!==T||e[91]!==R||e[92]!==V||e[93]!==X||e[94]!==H?(F=t.jsxs(S,{ref:p,className:j,onClick:w,children:[N,L,T,R,V,X,H]}),e[84]=S,e[85]=p,e[86]=j,e[87]=w,e[88]=N,e[89]=L,e[90]=T,e[91]=R,e[92]=V,e[93]=X,e[94]=H,e[95]=F):F=e[95],F}function br(){const s=he.c(4),e=Ke();let l;s[0]!==e?(l=e("orgs.threads.loading"),s[0]=e,s[1]=l):l=s[1];let o;return s[2]!==l?(o=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx("span",{className:"text-sm text-muted-foreground",children:l})}),s[2]=l,s[3]=o):o=s[3],o}function wr(s){const e=he.c(9),{hasActiveFilters:l,t:o}=s,c=l?"orgs.threads.noMatchingChats":"orgs.threads.noChatsInTimeRange";let i;e[0]!==o||e[1]!==c?(i=o(c),e[0]=o,e[1]=c,e[2]=i):i=e[2];const x=l?"orgs.threads.tryAdjustingFilters":"orgs.threads.tryExpandingTimeRange";let u;e[3]!==o||e[4]!==x?(u=o(x),e[3]=o,e[4]=x,e[5]=u):u=e[5];let m;return e[6]!==i||e[7]!==u?(m=t.jsx("div",{className:"flex flex-1 items-center justify-center py-20",children:t.jsx(es,{title:i,description:u})}),e[6]=i,e[7]=u,e[8]=m):m=e[8],m}function yr(){const s=he.c(4),e=Ke();let l;s[0]!==e?(l=e("orgs.threads.loadingMore"),s[0]=e,s[1]=l):l=s[1];let o;return s[2]!==l?(o=t.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:l}),s[2]=l,s[3]=o):o=s[3],o}const ds=50;function Sr(s){const e=he.c(25),{client:l,locator:o,membersData:c,allConnections:i,allVirtualMcps:x,dateRange:u,searchQuery:m,filterAgentIds:r,filterUserIds:h,filterStatus:v,filterSource:f}=s,n=Ke(),b=u.startDate.toISOString(),a=u.endDate.toISOString(),I=JSON.stringify({startDate:b,endDate:a,search:m,agentIds:r,userIds:h,status:v,source:f}),{data:g,fetchNextPage:y,hasNextPage:D,isFetchingNextPage:d,isLoading:_}=Fl({queryKey:bt.threadsInfinite(o,I),queryFn:async F=>{const{pageParam:$}=F,Z=$===void 0?0:$;if(!l)throw new Error("MCP client is not available");const q=await l.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:ds,offset:Z,startDate:b,endDate:a,...m?{search:m}:{},...r&&r.length>0?{agentId:r[0]}:{},...h&&h.length>0?{userId:h[0]}:{},...v&&v!=="all"?{status:v}:{},...f&&f!=="all"?{source:f}:{}}});return q.structuredContent??q},initialPageParam:0,getNextPageParam:Mr,staleTime:3e4}),S=(g?.pages??[]).flatMap(Cr),p=S.map(kr),{data:j}=Bt({queryKey:bt.monitoringThreadUsage(o,JSON.stringify({ids:p,startDate:b,endDate:a})),queryFn:async()=>{if(!l)throw new Error("MCP client is not available");const F=await l.callTool({name:"MONITORING_THREAD_USAGE",arguments:{threadIds:p,startDate:b,endDate:a}});return F.structuredContent??F},enabled:!!l&&p.length>0,staleTime:3e4}),w=new Map((j?.items??[]).map(Tr)),[N,L]=ce.useState(null),[T,M]=ce.useState("desc");let E;e[0]!==N?(E=F=>{N===F?M(Ir):(L(F),M("desc"))},e[0]=N,e[1]=E):E=e[1];const k=E,K=F=>{const $=w.get(F);return $?N==="cost"?$.costUsd:$.totalTokens:0},A=N?[...S].sort((F,$)=>{const Z=K(F.id),q=K($.id);return T==="desc"?q-Z:Z-q}):S,z=Us(A),C=z.selected;let R;e[2]!==y||e[3]!==D||e[4]!==d?(R=()=>{D&&!d&&y()},e[2]=y,e[3]=D,e[4]=d,e[5]=R):R=e[5];const V=Vs(R,D??!1,d),B=!!m||(r?.length??0)>0||(h?.length??0)>0||!!(v&&v!=="all")||!!(f&&f!=="all");let X;e[6]!==z?(X=F=>{F||z.close()},e[6]=z,e[7]=X):X=e[7];let U;e[8]!==i||e[9]!==x||e[10]!==l||e[11]!==A||e[12]!==o||e[13]!==c||e[14]!==C||e[15]!==z.index||e[16]!==z.next||e[17]!==z.prev?(U=C&&t.jsx(kl,{thread:C,client:l,locator:o,connections:i,virtualMcps:x,members:c,nav:{index:z.index,total:A.length,onPrev:z.prev,onNext:z.next}}),e[8]=i,e[9]=x,e[10]=l,e[11]=A,e[12]=o,e[13]=c,e[14]=C,e[15]=z.index,e[16]=z.next,e[17]=z.prev,e[18]=U):U=e[18];let G;e[19]!==U?(G=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:U}),e[19]=U,e[20]=G):G=e[20];let H;return e[21]!==z.isOpen||e[22]!==X||e[23]!==G?(H=t.jsx(Es,{open:z.isOpen,onOpenChange:X,children:G}),e[21]=z.isOpen,e[22]=X,e[23]=G,e[24]=H):H=e[24],t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:[t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx("div",{className:"flex-1 min-w-0 pt-1",children:t.jsx("div",{className:"min-w-0",children:_?t.jsx(br,{}):S.length===0?t.jsx(wr,{hasActiveFilters:B,t:n}):t.jsxs(t.Fragment,{children:[t.jsxs(vs,{className:"w-full border-collapse",children:[t.jsx(js,{className:"border-b-0 z-20",children:t.jsxs(Ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(je,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:n("orgs.threads.title")}),t.jsx(je,{className:"w-36 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:n("orgs.threads.agent")}),t.jsx(je,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:n("orgs.threads.user")}),t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:n("orgs.threads.status")}),t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>k("tokens"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:[n("orgs.threads.tokens"),N==="tokens"&&(T==="desc"?t.jsx(Zt,{size:12}):t.jsx(ns,{size:12}))]})}),t.jsx(je,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:t.jsxs("button",{type:"button",onClick:()=>k("cost"),className:"inline-flex items-center gap-1 ml-auto hover:text-foreground transition-colors uppercase",children:[n("orgs.threads.cost"),N==="cost"&&(T==="desc"?t.jsx(Zt,{size:12}):t.jsx(ns,{size:12}))]})}),t.jsx(je,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:n("orgs.threads.date")})]})}),t.jsx(hs,{children:A.map((F,$)=>t.jsx(Nr,{thread:F,usage:w.get(F.id),members:c,connections:i,virtualMcps:x,onClick:()=>z.select(F.id),lastRowRef:$===A.length-1?V:void 0},F.id))})]}),d&&t.jsx(yr,{})]})})})})}),H]})}function Ir(s){return s==="desc"?"asc":"desc"}function Tr(s){return[s.threadId,{calls:s.calls,inputTokens:s.inputTokens,outputTokens:s.outputTokens,totalTokens:s.totalTokens,costUsd:s.costUsd}]}function kr(s){return s.id}function Cr(s){return s.items??[]}function Mr(s,e){const l=s,o=e;if(!((l?.items?.length??0)<ds))return o.length*ds}function Dr(s){const e=he.c(123),{filterAgentIds:l,filterUserIds:o,filterStatus:c,filterSource:i,virtualMcpOptions:x,memberOptions:u,activeFiltersCount:m,onUpdateFilters:r}=s,[h,v]=ce.useState(!1),f=Ke();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(fs,{size:16}),e[0]=n):n=e[0];let b;e[1]!==f?(b=f("orgs.threadsFiltersPopover.filters"),e[1]=f,e[2]=b):b=e[2];let a;e[3]!==b?(a=t.jsx("span",{className:"hidden sm:inline",children:b}),e[3]=b,e[4]=a):a=e[4];let I;e[5]!==m?(I=m>0&&t.jsxs(t.Fragment,{children:[t.jsx(Et,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:m}),t.jsx(Et,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:m})]}),e[5]=m,e[6]=I):I=e[6];let g;e[7]!==a||e[8]!==I?(g=t.jsx(Gt,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:"relative",children:[n,a,I]})}),e[7]=a,e[8]=I,e[9]=g):g=e[9];let y;e[10]!==f?(y=f("orgs.threadsFiltersPopover.filterChats"),e[10]=f,e[11]=y):y=e[11];let D;e[12]!==y?(D=t.jsx("h4",{className:"font-medium text-sm",children:y}),e[12]=y,e[13]=D):D=e[13];let d;e[14]!==f?(d=f("orgs.threadsFiltersPopover.agent"),e[14]=f,e[15]=d):d=e[15];let _;e[16]!==d?(_=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:d}),e[16]=d,e[17]=_):_=e[17];let S;e[18]!==r?(S=fe=>r({filterAgentIds:fe.slice(0,1)}),e[18]=r,e[19]=S):S=e[19];let p;e[20]!==f?(p=f("orgs.threadsFiltersPopover.allAgents"),e[20]=f,e[21]=p):p=e[21];let j;e[22]!==l||e[23]!==S||e[24]!==p||e[25]!==x?(j=t.jsx(qt,{options:x,defaultValue:l,onValueChange:S,placeholder:p,variant:"secondary",className:"w-full",maxCount:1}),e[22]=l,e[23]=S,e[24]=p,e[25]=x,e[26]=j):j=e[26];let w;e[27]!==j||e[28]!==_?(w=t.jsxs("div",{children:[_,j]}),e[27]=j,e[28]=_,e[29]=w):w=e[29];let N;e[30]!==f?(N=f("orgs.threadsFiltersPopover.user"),e[30]=f,e[31]=N):N=e[31];let L;e[32]!==N?(L=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:N}),e[32]=N,e[33]=L):L=e[33];let T;e[34]!==r?(T=fe=>r({filterUserIds:fe.slice(0,1)}),e[34]=r,e[35]=T):T=e[35];let M;e[36]!==f?(M=f("orgs.threadsFiltersPopover.allUsers"),e[36]=f,e[37]=M):M=e[37];let E;e[38]!==o||e[39]!==u||e[40]!==T||e[41]!==M?(E=t.jsx(qt,{options:u,defaultValue:o,onValueChange:T,placeholder:M,variant:"secondary",className:"w-full",maxCount:1}),e[38]=o,e[39]=u,e[40]=T,e[41]=M,e[42]=E):E=e[42];let k;e[43]!==L||e[44]!==E?(k=t.jsxs("div",{children:[L,E]}),e[43]=L,e[44]=E,e[45]=k):k=e[45];let K;e[46]!==f?(K=f("orgs.threadsFiltersPopover.status"),e[46]=f,e[47]=K):K=e[47];let A;e[48]!==K?(A=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:K}),e[48]=K,e[49]=A):A=e[49];let z;e[50]!==r?(z=fe=>r({filterStatus:fe}),e[50]=r,e[51]=z):z=e[51];let C;e[52]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(wt,{className:"w-full",children:t.jsx(yt,{})}),e[52]=C):C=e[52];let R;e[53]!==f?(R=f("orgs.threadsFiltersPopover.allStatuses"),e[53]=f,e[54]=R):R=e[54];let O;e[55]!==R?(O=t.jsx(Ee,{value:"all",children:R}),e[55]=R,e[56]=O):O=e[56];let V;e[57]!==f?(V=f("orgs.threadsFiltersPopover.completed"),e[57]=f,e[58]=V):V=e[58];let B;e[59]!==V?(B=t.jsx(Ee,{value:"completed",children:V}),e[59]=V,e[60]=B):B=e[60];let X;e[61]!==f?(X=f("orgs.threadsFiltersPopover.active"),e[61]=f,e[62]=X):X=e[62];let U;e[63]!==X?(U=t.jsx(Ee,{value:"active",children:X}),e[63]=X,e[64]=U):U=e[64];let G;e[65]!==f?(G=f("orgs.threadsFiltersPopover.failed"),e[65]=f,e[66]=G):G=e[66];let H;e[67]!==G?(H=t.jsx(Ee,{value:"failed",children:G}),e[67]=G,e[68]=H):H=e[68];let F;e[69]!==O||e[70]!==B||e[71]!==U||e[72]!==H?(F=t.jsxs(St,{children:[O,B,U,H]}),e[69]=O,e[70]=B,e[71]=U,e[72]=H,e[73]=F):F=e[73];let $;e[74]!==c||e[75]!==z||e[76]!==F?($=t.jsxs(It,{value:c,onValueChange:z,children:[C,F]}),e[74]=c,e[75]=z,e[76]=F,e[77]=$):$=e[77];let Z;e[78]!==A||e[79]!==$?(Z=t.jsxs("div",{children:[A,$]}),e[78]=A,e[79]=$,e[80]=Z):Z=e[80];let q;e[81]!==f?(q=f("orgs.threadsFiltersPopover.source"),e[81]=f,e[82]=q):q=e[82];let J;e[83]!==q?(J=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:q}),e[83]=q,e[84]=J):J=e[84];let ee;e[85]!==r?(ee=fe=>r({filterSource:fe}),e[85]=r,e[86]=ee):ee=e[86];let te;e[87]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(wt,{className:"w-full",children:t.jsx(yt,{})}),e[87]=te):te=e[87];let Q;e[88]!==f?(Q=f("orgs.threadsFiltersPopover.allSources"),e[88]=f,e[89]=Q):Q=e[89];let ue;e[90]!==Q?(ue=t.jsx(Ee,{value:"all",children:Q}),e[90]=Q,e[91]=ue):ue=e[91];let se;e[92]!==f?(se=f("orgs.threadsFiltersPopover.sourceJira"),e[92]=f,e[93]=se):se=e[93];let de;e[94]!==se?(de=t.jsx(Ee,{value:"jira",children:se}),e[94]=se,e[95]=de):de=e[95];let ne;e[96]!==ue||e[97]!==de?(ne=t.jsxs(St,{children:[ue,de]}),e[96]=ue,e[97]=de,e[98]=ne):ne=e[98];let ae;e[99]!==i||e[100]!==ee||e[101]!==ne?(ae=t.jsxs(It,{value:i,onValueChange:ee,children:[te,ne]}),e[99]=i,e[100]=ee,e[101]=ne,e[102]=ae):ae=e[102];let re;e[103]!==J||e[104]!==ae?(re=t.jsxs("div",{children:[J,ae]}),e[103]=J,e[104]=ae,e[105]=re):re=e[105];let le;e[106]!==w||e[107]!==k||e[108]!==Z||e[109]!==re?(le=t.jsxs("div",{className:"space-y-3",children:[w,k,Z,re]}),e[106]=w,e[107]=k,e[108]=Z,e[109]=re,e[110]=le):le=e[110];let oe;e[111]!==m||e[112]!==r||e[113]!==f?(oe=m>0&&t.jsx(ge,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{r({filterAgentIds:[],filterUserIds:[],filterStatus:"all",filterSource:"all"}),v(!1)},children:f("orgs.threadsFiltersPopover.clearAllFilters")}),e[111]=m,e[112]=r,e[113]=f,e[114]=oe):oe=e[114];let ie;e[115]!==le||e[116]!==oe||e[117]!==D?(ie=t.jsx(Qt,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[D,le,oe]})}),e[115]=le,e[116]=oe,e[117]=D,e[118]=ie):ie=e[118];let W;return e[119]!==h||e[120]!==ie||e[121]!==g?(W=t.jsxs(Jt,{open:h,onOpenChange:v,children:[g,ie]}),e[119]=h,e[120]=ie,e[121]=g,e[122]=W):W=e[122],W}function _r(s){const e=he.c(16),{dateRange:l}=s,o=Ke(),{data:c,isLoading:i}=$l(void 0);let x;e[0]!==c?(x=c===void 0?[]:c,e[0]=c,e[1]=x):x=e[1];const u=x,[m,r]=ce.useState(null),h=m??u[0]?.id??null,{data:v}=zl(h??"");let f;e[2]!==l.startDate?(f=l.startDate.toISOString(),e[2]=l.startDate,e[3]=f):f=e[3];let n;e[4]!==l.endDate?(n=l.endDate.toISOString(),e[4]=l.endDate,e[5]=n):n=e[5];let b;e[6]!==f||e[7]!==n?(b={startDate:f,endDate:n},e[6]=f,e[7]=n,e[8]=b):b=e[8];const a=b;let I;return e[9]!==v||e[10]!==u||e[11]!==h||e[12]!==i||e[13]!==a||e[14]!==o?(I=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:i?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("orgs.automations.loading")}):u.length===0?t.jsx("div",{className:"py-16",children:t.jsx(es,{title:o("orgs.automations.emptyTitle"),description:o("orgs.automations.emptyDescription")})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(It,{value:h??"",onValueChange:g=>r(g),children:[t.jsx(wt,{className:"w-72",children:t.jsx(yt,{placeholder:o("orgs.automations.selectPlaceholder")})}),t.jsx(St,{children:u.map(Rr)})]})}),v?t.jsx(Pl,{automationId:v.id,triggerIds:v.triggers.map(Lr),range:a}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("orgs.automations.loading")})]})})}),e[9]=v,e[10]=u,e[11]=h,e[12]=i,e[13]=a,e[14]=o,e[15]=I):I=e[15],I}function Lr(s){return s.id}function Rr(s){return t.jsx(Ee,{value:s.id,children:s.name},s.id)}const Pr=[{value:"eq",labelKey:"orgs.monitoring.operatorEquals"},{value:"contains",labelKey:"orgs.monitoring.operatorContains"},{value:"in",labelKey:"orgs.monitoring.operatorIn"},{value:"exists",labelKey:"orgs.monitoring.operatorExists"}];function Fr({connectionIds:s,virtualMcpIds:e,tool:l,status:o,hideSystem:c,propertyFilters:i,connectionOptions:x,virtualMcpOptions:u,activeFiltersCount:m,onUpdateFilters:r,onConnectionSearchChange:h,memberOptions:v,llmUserIds:f=[],onLlmUserIdsChange:n,showMemberFilter:b}){const a=Ke(),[I,g]=ce.useState(!1),[y,D]=ce.useState("form"),[d,_]=ce.useState(l),[S,p]=ce.useState(i),[j,w]=ce.useState(Yt(i)),N=ce.useRef(l),L=ce.useRef(jt(i));N.current!==l&&(N.current=l,d!==l&&_(l));const T=jt(i);L.current!==T&&(L.current=T,p(i),w(Yt(i)));const M=(C,R)=>{const O=[...S],V=O[C];V&&(O[C]={key:R.key??V.key,operator:R.operator??V.operator,value:R.value??V.value},p(O))},E=()=>{p([...S,{key:"",operator:"eq",value:""}])},k=C=>{const R=S.filter((O,V)=>V!==C);p(R),w(Yt(R)),r({propertyFilters:jt(R)})},K=()=>{r({propertyFilters:jt(S)})},A=()=>{const C=Ms(j);p(C),r({propertyFilters:jt(C)})},z=()=>{if(y==="raw"){const C=Ms(j);p(C),D("form")}else w(Yt(S)),D("raw")};return t.jsxs(Jt,{open:I,onOpenChange:g,children:[t.jsx(Gt,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:"relative",children:[t.jsx(fs,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:a("orgs.monitoring.filters")}),m>0&&t.jsxs(t.Fragment,{children:[t.jsx(Et,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:m}),t.jsx(Et,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:m})]})]})}),t.jsx(Qt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:a("orgs.monitoring.filterLogs")})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(Nl,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:a("orgs.monitoring.hideSystemCalls")}),t.jsx(jl,{id:"hide-system-calls",checked:c,onCheckedChange:C=>r({hideSystem:!!C})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.connections")}),t.jsx(qt,{options:x,defaultValue:s,onValueChange:C=>r({connectionId:C}),onSearchChange:h,placeholder:a("orgs.monitoring.allServers"),variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.agents")}),t.jsx(qt,{options:u,defaultValue:e,onValueChange:C=>r({virtualMcpId:C}),placeholder:a("orgs.monitoring.allAgents"),variant:"secondary",className:"w-full",maxCount:2})]}),b&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.members")}),t.jsx(qt,{options:v??[],defaultValue:f,onValueChange:C=>n?.(C),placeholder:a("orgs.monitoring.allMembers"),variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:a("orgs.monitoring.filtersAiUsageOnly")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.toolName")}),t.jsx(Ht,{id:"filter-tool",placeholder:a("orgs.monitoring.filterByToolPlaceholder"),value:d,onChange:C=>_(C.target.value),onBlur:()=>{d!==l&&r({tool:d})},onKeyDown:C=>{C.key==="Enter"&&d!==l&&r({tool:d})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.status")}),t.jsxs(It,{value:o,onValueChange:C=>r({status:C}),children:[t.jsx(wt,{className:"w-full",children:t.jsx(yt,{})}),t.jsxs(St,{children:[t.jsx(Ee,{value:"all",children:a("orgs.monitoring.allStatus")}),t.jsx(Ee,{value:"success",children:a("orgs.monitoring.successOnly")}),t.jsx(Ee,{value:"errors",children:a("orgs.monitoring.errorsOnly")})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:a("orgs.monitoring.propertyFilters")}),t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:z,children:y==="raw"?t.jsx(fl,{size:14}):t.jsx(cl,{size:14})})}),t.jsx(zt,{children:a(y==="raw"?"orgs.monitoring.switchToFormView":"orgs.monitoring.switchToRawText")})]})]}),y==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(vl,{placeholder:a("orgs.monitoring.pastePropertyFiltersPlaceholder"),value:j,onChange:C=>w(C.target.value),onBlur:A,onKeyDown:C=>{C.key==="Enter"&&C.metaKey&&A()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("orgs.monitoring.onePerLine")," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[S.map((C,R)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:a("orgs.monitoring.filter",{number:(R+1).toString()})}),t.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>k(R),children:t.jsx(pl,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ht,{placeholder:a("orgs.monitoring.keyPlaceholder"),value:C.key,onChange:O=>M(R,{key:O.target.value}),onBlur:K,onKeyDown:O=>{O.key==="Enter"&&K()},className:"flex-1 font-mono text-sm"}),t.jsxs(It,{value:C.operator,onValueChange:O=>{const V=[...S],B=V[R];B&&(V[R]={...B,operator:O,value:O==="exists"?"":B.value},p(V),r({propertyFilters:jt(V)}))},children:[t.jsx(wt,{className:"w-28",children:t.jsx(yt,{})}),t.jsx(St,{children:Pr.map(O=>t.jsx(Ee,{value:O.value,children:a(O.labelKey)},O.value))})]})]}),C.operator!=="exists"&&t.jsx(Ht,{placeholder:a("orgs.monitoring.valuePlaceholder"),value:C.value,onChange:O=>M(R,{value:O.target.value}),onBlur:K,onKeyDown:O=>{O.key==="Enter"&&K()},className:"w-full font-mono text-sm"})]},R)),t.jsxs(ge,{variant:"outline",size:"sm",className:"w-full",onClick:E,children:[t.jsx(xl,{size:14,className:"mr-1.5"}),a("orgs.monitoring.addFilter")]})]})]})]}),m>0&&t.jsx(ge,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{_(""),p([]),w(""),r({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),g(!1)},children:a("orgs.monitoring.clearAllFilters")})]})})]})}function Or(s){const e=he.c(210),{tab:l,dateRange:o,displayDateRange:c,connectionIds:i,virtualMcpIds:x,tool:u,status:m,search:r,streaming:h,hideSystem:v,activeFiltersCount:f,from:n,to:b,propertyFilters:a,onUpdateFilters:I,onTimeRangeChange:g,onStreamingToggle:y,onTabChange:D}=s,d=Ke(),_=is(),S=ul(),{data:p}=dl(),[j,w]=ce.useState(""),N=j||void 0;let L;e[0]!==N?(L={searchTerm:N},e[0]=N,e[1]=L):L=e[1];const T=is(L);let M;e[2]!==T?(M=T??[],e[2]=T,e[3]=M):M=e[3];let E;e[4]!==M?(E=M.map(Er),e[4]=M,e[5]=E):E=e[5];const k=E;let K;e[6]!==S?(K=S.map(zr),e[6]=S,e[7]=K):K=e[7];const A=K,{pageSize:z,streamingRefetchInterval:C}=as,{org:R,locator:O}=kt();let V;e[8]!==R.id||e[9]!==R.slug?(V={connectionId:Zs,orgId:R.id,orgSlug:R.slug},e[8]=R.id,e[9]=R.slug,e[10]=V):V=e[10];const B=ml(V);let X;e[11]!==a?(X=Vl(a),e[11]=a,e[12]=X):X=e[12];const U=X;let G;e[13]!==v||e[14]!==R.id?(G=v?[el.SELF(R.id)]:void 0,e[13]=v,e[14]=R.id,e[15]=G):G=e[15];const H=G;let F;e[16]===Symbol.for("react.memo_cache_sentinel")?(F=[],e[16]=F):F=e[16];const[$,Z]=ce.useState(F);let q;e[17]===Symbol.for("react.memo_cache_sentinel")?(q=[],e[17]=q):q=e[17];const[J,ee]=ce.useState(q);let te;e[18]===Symbol.for("react.memo_cache_sentinel")?(te=[],e[18]=te):te=e[18];const[Q,ue]=ce.useState(te),[se,de]=ce.useState("all"),[ne,ae]=ce.useState("all"),re=(J.length>0?1:0)+(Q.length>0?1:0)+(se!=="all"?1:0)+(ne!=="all"?1:0);let le;e[19]!==p?(le=gs(p).map($r),e[19]=p,e[20]=le):le=e[20];const oe=le;let ie;e[21]!==o.startDate?(ie=o.startDate.toISOString(),e[21]=o.startDate,e[22]=ie):ie=e[22];let W;e[23]!==o.endDate?(W=o.endDate.toISOString(),e[23]=o.endDate,e[24]=W):W=e[24];const fe=i.length===1?i[0]:void 0,P=x.length===1?x[0]:void 0,Y=u||void 0,me=m==="errors"?!0:m==="success"?!1:void 0;let xe;e[25]!==H||e[26]!==U||e[27]!==ie||e[28]!==W||e[29]!==fe||e[30]!==P||e[31]!==Y||e[32]!==me?(xe={startDate:ie,endDate:W,connectionId:fe,excludeConnectionIds:H,virtualMcpId:P,toolName:Y,isError:me,...U},e[25]=H,e[26]=U,e[27]=ie,e[28]=W,e[29]=fe,e[30]=P,e[31]=Y,e[32]=me,e[33]=xe):xe=e[33];const Ae=xe;let ye;e[34]!==d?(ye=d("orgs.monitoring.overview"),e[34]=d,e[35]=ye):ye=e[35];let Le;e[36]!==ye?(Le={id:"overview",label:ye},e[36]=ye,e[37]=Le):Le=e[37];let Se;e[38]!==d?(Se=d("orgs.monitoring.audit"),e[38]=d,e[39]=Se):Se=e[39];let Re;e[40]!==Se?(Re={id:"audit",label:Se},e[40]=Se,e[41]=Re):Re=e[41];let Pe;e[42]!==d?(Pe=d("orgs.monitoring.chats"),e[42]=d,e[43]=Pe):Pe=e[43];let Ie;e[44]!==Pe?(Ie={id:"threads",label:Pe},e[44]=Pe,e[45]=Ie):Ie=e[45];let Fe;e[46]!==d?(Fe=d("orgs.monitoring.automations"),e[46]=d,e[47]=Fe):Fe=e[47];let Oe;e[48]!==Fe?(Oe={id:"automations",label:Fe},e[48]=Fe,e[49]=Oe):Oe=e[49];let De;e[50]!==Le||e[51]!==Re||e[52]!==Ie||e[53]!==Oe?(De=[Le,Re,Ie,Oe],e[50]=Le,e[51]=Re,e[52]=Ie,e[53]=Oe,e[54]=De):De=e[54];const $e=De;let Ne;e[55]!==d?(Ne=d("orgs.monitoring.title"),e[55]=d,e[56]=Ne):Ne=e[56];let be;e[57]!==Ne?(be=t.jsx(vt.Title,{children:Ne}),e[57]=Ne,e[58]=be):be=e[58];let Te;e[59]!==D?(Te=gt=>D(gt),e[59]=D,e[60]=Te):Te=e[60];let ke;e[61]!==Te||e[62]!==l||e[63]!==$e?(ke=t.jsx($s,{placement:"page",tabs:$e,activeTab:l,onTabChange:Te}),e[61]=Te,e[62]=l,e[63]=$e,e[64]=ke):ke=e[64];let Ce;e[65]!==f||e[66]!==i||e[67]!==k||e[68]!==j||e[69]!==v||e[70]!==h||e[71]!==$||e[72]!==oe||e[73]!==y||e[74]!==I||e[75]!==a||e[76]!==m||e[77]!==d||e[78]!==l||e[79]!==u||e[80]!==x||e[81]!==A?(Ce=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(ge,{variant:h?"secondary":"outline",className:"gap-1.5",onClick:y,children:[h&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:d("orgs.monitoring.live")}),h&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(Fr,{connectionIds:i,virtualMcpIds:x,tool:u,status:m,hideSystem:v,propertyFilters:a,connectionOptions:k,virtualMcpOptions:A,activeFiltersCount:f,onUpdateFilters:I,connectionSearchTerm:j,onConnectionSearchChange:w,memberOptions:oe,llmUserIds:$,onLlmUserIdsChange:Z,showMemberFilter:l==="overview"})]}),e[65]=f,e[66]=i,e[67]=k,e[68]=j,e[69]=v,e[70]=h,e[71]=$,e[72]=oe,e[73]=y,e[74]=I,e[75]=a,e[76]=m,e[77]=d,e[78]=l,e[79]=u,e[80]=x,e[81]=A,e[82]=Ce):Ce=e[82];let ze;e[83]!==oe||e[84]!==l||e[85]!==re||e[86]!==J||e[87]!==ne||e[88]!==se||e[89]!==Q||e[90]!==A?(ze=l==="threads"&&t.jsx(Dr,{filterAgentIds:J,filterUserIds:Q,filterStatus:se,filterSource:ne,virtualMcpOptions:A,memberOptions:oe,activeFiltersCount:re,onUpdateFilters:gt=>{const{filterAgentIds:Ns,filterUserIds:bs,filterStatus:ws,filterSource:ys}=gt;Ns!==void 0&&ee(Ns),bs!==void 0&&ue(bs),ws!==void 0&&de(ws),ys!==void 0&&ae(ys)}}),e[83]=oe,e[84]=l,e[85]=re,e[86]=J,e[87]=ne,e[88]=se,e[89]=Q,e[90]=A,e[91]=ze):ze=e[91];let He;e[92]!==n||e[93]!==b?(He={from:n,to:b},e[92]=n,e[93]=b,e[94]=He):He=e[94];let ve;e[95]!==d?(ve=d("monitoring.timeRangePicker.absoluteTimeRange"),e[95]=d,e[96]=ve):ve=e[96];let pe;e[97]!==d?(pe=d("monitoring.timeRangePicker.from"),e[97]=d,e[98]=pe):pe=e[98];let we;e[99]!==d?(we=d("monitoring.timeRangePicker.to"),e[99]=d,e[100]=we):we=e[100];let _e;e[101]!==d?(_e=d("monitoring.timeRangePicker.applyTimeRange"),e[101]=d,e[102]=_e):_e=e[102];let Me;e[103]!==ve||e[104]!==pe||e[105]!==we||e[106]!==_e?(Me={absoluteTimeRange:ve,from:pe,to:we,applyTimeRange:_e},e[103]=ve,e[104]=pe,e[105]=we,e[106]=_e,e[107]=Me):Me=e[107];let qe;e[108]!==d?(qe=d("monitoring.timeRangePicker.last5Minutes"),e[108]=d,e[109]=qe):qe=e[109];let Be;e[110]!==qe?(Be={label:qe,from:"now-5m",to:"now",value:"5m"},e[110]=qe,e[111]=Be):Be=e[111];let Je;e[112]!==d?(Je=d("monitoring.timeRangePicker.last15Minutes"),e[112]=d,e[113]=Je):Je=e[113];let Ye;e[114]!==Je?(Ye={label:Je,from:"now-15m",to:"now",value:"15m"},e[114]=Je,e[115]=Ye):Ye=e[115];let ut;e[116]!==d?(ut=d("monitoring.timeRangePicker.last30Minutes"),e[116]=d,e[117]=ut):ut=e[117];let Ze;e[118]!==ut?(Ze={label:ut,from:"now-30m",to:"now",value:"30m"},e[118]=ut,e[119]=Ze):Ze=e[119];let et;e[120]!==d?(et=d("monitoring.timeRangePicker.last1Hour"),e[120]=d,e[121]=et):et=e[121];let tt;e[122]!==et?(tt={label:et,from:"now-1h",to:"now",value:"1h"},e[122]=et,e[123]=tt):tt=e[123];let ft;e[124]!==d?(ft=d("monitoring.timeRangePicker.last3Hours"),e[124]=d,e[125]=ft):ft=e[125];let st;e[126]!==ft?(st={label:ft,from:"now-3h",to:"now",value:"3h"},e[126]=ft,e[127]=st):st=e[127];let xt;e[128]!==d?(xt=d("monitoring.timeRangePicker.last6Hours"),e[128]=d,e[129]=xt):xt=e[129];let lt;e[130]!==xt?(lt={label:xt,from:"now-6h",to:"now",value:"6h"},e[130]=xt,e[131]=lt):lt=e[131];let rt;e[132]!==d?(rt=d("monitoring.timeRangePicker.last12Hours"),e[132]=d,e[133]=rt):rt=e[133];let it;e[134]!==rt?(it={label:rt,from:"now-12h",to:"now",value:"12h"},e[134]=rt,e[135]=it):it=e[135];let Ge;e[136]!==d?(Ge=d("monitoring.timeRangePicker.last24Hours"),e[136]=d,e[137]=Ge):Ge=e[137];let nt;e[138]!==Ge?(nt={label:Ge,from:"now-24h",to:"now",value:"24h"},e[138]=Ge,e[139]=nt):nt=e[139];let pt;e[140]!==d?(pt=d("monitoring.timeRangePicker.last2Days"),e[140]=d,e[141]=pt):pt=e[141];let Qe;e[142]!==pt?(Qe={label:pt,from:"now-2d",to:"now",value:"2d"},e[142]=pt,e[143]=Qe):Qe=e[143];let Xe;e[144]!==d?(Xe=d("monitoring.timeRangePicker.last7Days"),e[144]=d,e[145]=Xe):Xe=e[145];let We;e[146]!==Xe?(We={label:Xe,from:"now-7d",to:"now",value:"7d"},e[146]=Xe,e[147]=We):We=e[147];let ot;e[148]!==d?(ot=d("monitoring.timeRangePicker.last30Days"),e[148]=d,e[149]=ot):ot=e[149];let at;e[150]!==ot?(at={label:ot,from:"now-30d",to:"now",value:"30d"},e[150]=ot,e[151]=at):at=e[151];let Ct;e[152]!==Be||e[153]!==Ye||e[154]!==Ze||e[155]!==tt||e[156]!==st||e[157]!==lt||e[158]!==it||e[159]!==nt||e[160]!==Qe||e[161]!==We||e[162]!==at?(Ct=[Be,Ye,Ze,tt,st,lt,it,nt,Qe,We,at],e[152]=Be,e[153]=Ye,e[154]=Ze,e[155]=tt,e[156]=st,e[157]=lt,e[158]=it,e[159]=nt,e[160]=Qe,e[161]=We,e[162]=at,e[163]=Ct):Ct=e[163];let Mt;e[164]!==g||e[165]!==He||e[166]!==Me||e[167]!==Ct?(Mt=t.jsx(Ql,{value:He,onChange:g,labels:Me,quickRanges:Ct}),e[164]=g,e[165]=He,e[166]=Me,e[167]=Ct,e[168]=Mt):Mt=e[168];let Dt;e[169]!==Ce||e[170]!==ze||e[171]!==Mt?(Dt=t.jsxs("div",{className:"flex items-center gap-2",children:[Ce,ze,Mt]}),e[169]=Ce,e[170]=ze,e[171]=Mt,e[172]=Dt):Dt=e[172];let _t;e[173]!==ke||e[174]!==Dt?(_t=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ke,Dt]}),e[173]=ke,e[174]=Dt,e[175]=_t):_t=e[175];let Lt;e[176]!==I||e[177]!==r||e[178]!==d||e[179]!==l?(Lt=(l==="audit"||l==="threads")&&t.jsx(tl,{value:r,onChange:gt=>I({search:gt}),placeholder:d(l==="threads"?"orgs.monitoring.searchByTitlePlaceholder":"orgs.monitoring.searchByToolPlaceholder"),onKeyDown:gt=>{gt.key==="Escape"&&(I({search:""}),gt.target.blur())},className:"w-full md:w-[375px]"}),e[176]=I,e[177]=r,e[178]=d,e[179]=l,e[180]=Lt):Lt=e[180];let Rt;e[181]!==be||e[182]!==_t||e[183]!==Lt?(Rt=t.jsx(vt.Container,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[be,_t,Lt]})}),e[181]=be,e[182]=_t,e[183]=Lt,e[184]=Rt):Rt=e[184];let Pt;e[185]!==_||e[186]!==S||e[187]!==Ae||e[188]!==B||e[189]!==i||e[190]!==o||e[191]!==c||e[192]!==H||e[193]!==h||e[194]!==$||e[195]!==O||e[196]!==p||e[197]!==r||e[198]!==m||e[199]!==l||e[200]!==J||e[201]!==ne||e[202]!==se||e[203]!==Q||e[204]!==u||e[205]!==x?(Pt=l==="automations"?t.jsx(_r,{dateRange:o}):l==="threads"?t.jsx(Sr,{client:B,locator:O,membersData:p,allConnections:_,allVirtualMcps:S,dateRange:o,searchQuery:r,filterAgentIds:J,filterUserIds:Q,filterStatus:se,filterSource:ne}):l==="audit"?t.jsx(vr,{client:B,locator:O,baseParams:Ae,pageSize:z,isStreaming:h,streamingRefetchInterval:C,connectionIds:i,virtualMcpIds:x,tool:u,status:m,searchQuery:r,allConnections:_,allVirtualMcps:S,membersData:p}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(ir,{displayDateRange:c,connectionIds:i,excludeConnectionIds:H,toolName:u||void 0,status:m==="errors"?"error":m==="success"?"success":void 0,connections:_,isStreaming:h,streamingRefetchInterval:C,llmUserIds:$,virtualMcpIds:x,virtualMcps:S})}),e[185]=_,e[186]=S,e[187]=Ae,e[188]=B,e[189]=i,e[190]=o,e[191]=c,e[192]=H,e[193]=h,e[194]=$,e[195]=O,e[196]=p,e[197]=r,e[198]=m,e[199]=l,e[200]=J,e[201]=ne,e[202]=se,e[203]=Q,e[204]=u,e[205]=x,e[206]=Pt):Pt=e[206];let Xt;return e[207]!==Rt||e[208]!==Pt?(Xt=t.jsxs(t.Fragment,{children:[Rt,Pt]}),e[207]=Rt,e[208]=Pt,e[209]=Xt):Xt=e[209],Xt}function $r(s){const e=s.user.name??s.user.email??s.userId,l=s.user.image??void 0;return{value:s.userId,label:e,icon:o=>{const{className:c}=o;return t.jsx(xs,{url:l,fallback:e,shape:"circle",size:"2xs",className:Ve("shrink-0",c)})}}}function zr(s){const e=s.icon,l=s.title??"Super Agent";return{value:s.id??"",label:l,icon:o=>{const{className:c}=o;return t.jsx(Tt,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(At,{}),className:Ve("size-4! min-w-4! rounded-sm shrink-0",c)})}}}function Er(s){const e=s.icon,l=s.title||s.id;return{value:s.id,label:l,icon:o=>{const{className:c}=o;return t.jsx(Tt,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(At,{}),className:Ve("size-4! min-w-4! rounded-sm shrink-0",c)})}}}function bn(){const s=he.c(125),e=Ke(),{org:l}=kt(),o=ms();let c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/shell/$org/settings/monitor"},s[0]=c):c=s[0];const i=Ws(c),{tab:x,from:u,to:m,connectionId:r,virtualMcpId:h,tool:v,search:f,status:n,streaming:b,propertyFilters:a,hideSystem:I}=i,g=x===void 0?"overview":x;let y;s[1]!==r?(y=r===void 0?[]:r,s[1]=r,s[2]=y):y=s[2];const D=y;let d;s[3]!==h?(d=h===void 0?[]:h,s[3]=h,s[4]=d):d=s[4];const _=d,S=b===void 0?!0:b,p=a===void 0?"":a,j=I===void 0?!1:I;let w,N,L,T,M,E,k;if(s[5]!==D.length||s[6]!==u||s[7]!==j||s[8]!==o||s[9]!==l.slug||s[10]!==p||s[11]!==i||s[12]!==n||s[13]!==S||s[14]!==m||s[15]!==v||s[16]!==_.length){M=Ul(p);let W;s[24]!==o||s[25]!==l.slug||s[26]!==i?(W=xe=>{o({to:"/$org/settings/monitor",params:{org:l.slug},search:{...i,...xe}})},s[24]=o,s[25]=l.slug,s[26]=i,s[27]=W):W=s[27],k=W;let fe;s[28]!==k?(fe=xe=>{k({from:xe.from,to:xe.to})},s[28]=k,s[29]=fe):fe=s[29],T=fe;let P,Y;if(s[30]!==u||s[31]!==S||s[32]!==m){const xe=ct(u),Ae=ct(m);Y=xe.date||new Date(Date.now()-18e5);const ye=Ae.date||new Date;L={startDate:Y,endDate:ye},P=ye,S&&m==="now"&&(P=new Date(ye),P.setHours(P.getHours()+1)),s[30]=u,s[31]=S,s[32]=m,s[33]=L,s[34]=P,s[35]=Y}else L=s[33],P=s[34],Y=s[35];let me;s[36]!==P||s[37]!==Y?(me={startDate:Y,endDate:P},s[36]=P,s[37]=Y,s[38]=me):me=s[38],N=me,w=0,D.length>0&&w++,_.length>0&&w++,v&&w++,n!=="all"&&w++,j&&w++,E=M.filter(Ar),s[5]=D.length,s[6]=u,s[7]=j,s[8]=o,s[9]=l.slug,s[10]=p,s[11]=i,s[12]=n,s[13]=S,s[14]=m,s[15]=v,s[16]=_.length,s[17]=w,s[18]=N,s[19]=L,s[20]=T,s[21]=M,s[22]=E,s[23]=k}else w=s[17],N=s[18],L=s[19],T=s[20],M=s[21],E=s[22],k=s[23];const K=E;K.length>0&&(w=w+K.length);let A;s[39]!==e?(A=e("orgs.monitoring.title"),s[39]=e,s[40]=A):A=s[40];let z;s[41]!==A?(z=t.jsx(vt.Container,{className:"!pb-3",children:t.jsx(vt.Title,{children:A})}),s[41]=A,s[42]=z):z=s[42];let C;s[43]!==e?(C=e("orgs.monitoring.failedLoadTitle"),s[43]=e,s[44]=C):C=s[44];let R;s[45]!==e?(R=e("orgs.monitoring.failedLoadDescription"),s[45]=e,s[46]=R):R=s[46];let O;s[47]!==C||s[48]!==R?(O=t.jsx(vt.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(es,{title:C,description:R})})}),s[47]=C,s[48]=R,s[49]=O):O=s[49];let V;s[50]!==z||s[51]!==O?(V=t.jsxs(t.Fragment,{children:[z,O]}),s[50]=z,s[51]=O,s[52]=V):V=s[52];let B;s[53]!==e?(B=e("orgs.monitoring.title"),s[53]=e,s[54]=B):B=s[54];let X;s[55]!==B?(X=t.jsx(vt.Title,{children:B}),s[55]=B,s[56]=X):X=s[56];let U;s[57]!==e?(U=e("orgs.monitoring.overview"),s[57]=e,s[58]=U):U=s[58];let G;s[59]!==U?(G={id:"overview",label:U},s[59]=U,s[60]=G):G=s[60];let H;s[61]!==e?(H=e("orgs.monitoring.audit"),s[61]=e,s[62]=H):H=s[62];let F;s[63]!==H?(F={id:"audit",label:H},s[63]=H,s[64]=F):F=s[64];let $;s[65]!==e?($=e("orgs.monitoring.chats"),s[65]=e,s[66]=$):$=s[66];let Z;s[67]!==$?(Z={id:"threads",label:$},s[67]=$,s[68]=Z):Z=s[68];let q;s[69]!==e?(q=e("orgs.monitoring.automations"),s[69]=e,s[70]=q):q=s[70];let J;s[71]!==q?(J={id:"automations",label:q},s[71]=q,s[72]=J):J=s[72];let ee;s[73]!==G||s[74]!==F||s[75]!==Z||s[76]!==J?(ee=[G,F,Z,J],s[73]=G,s[74]=F,s[75]=Z,s[76]=J,s[77]=ee):ee=s[77];let te;s[78]!==k?(te=W=>k({tab:W}),s[78]=k,s[79]=te):te=s[79];let Q;s[80]!==ee||s[81]!==te||s[82]!==g?(Q=t.jsx($s,{placement:"page",tabs:ee,activeTab:g,onTabChange:te}),s[80]=ee,s[81]=te,s[82]=g,s[83]=Q):Q=s[83];let ue;s[84]!==X||s[85]!==Q?(ue=t.jsx(vt.Container,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[X,Q]})}),s[84]=X,s[85]=Q,s[86]=ue):ue=s[86];let se;s[87]!==g?(se=g==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(cs.Skeleton,{})}):g==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(cs.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(dr,{})}),s[87]=g,s[88]=se):se=s[88];let de;s[89]!==ue||s[90]!==se?(de=t.jsxs(t.Fragment,{children:[ue,se]}),s[89]=ue,s[90]=se,s[91]=de):de=s[91];let ne;s[92]!==T?(ne=W=>{ss("monitoring_time_range_changed",{from:W.from,to:W.to}),T(W)},s[92]=T,s[93]=ne):ne=s[93];let ae;s[94]!==S||s[95]!==k?(ae=()=>{ss("monitoring_live_toggled",{enabled:!S}),k({streaming:!S})},s[94]=S,s[95]=k,s[96]=ae):ae=s[96];let re;s[97]!==g||s[98]!==k?(re=W=>{W!==g&&ss("monitoring_tab_changed",{from_tab:g,to_tab:W}),k({tab:W})},s[97]=g,s[98]=k,s[99]=re):re=s[99];let le;s[100]!==w||s[101]!==D||s[102]!==N||s[103]!==L||s[104]!==u||s[105]!==j||s[106]!==M||s[107]!==f||s[108]!==n||s[109]!==S||s[110]!==ne||s[111]!==ae||s[112]!==re||s[113]!==g||s[114]!==m||s[115]!==v||s[116]!==k||s[117]!==_?(le=t.jsx(Or,{tab:g,dateRange:N,displayDateRange:L,connectionIds:D,virtualMcpIds:_,tool:v,status:n,search:f,streaming:S,hideSystem:j,activeFiltersCount:w,from:u,to:m,propertyFilters:M,onUpdateFilters:k,onTimeRangeChange:ne,onStreamingToggle:ae,onTabChange:re}),s[100]=w,s[101]=D,s[102]=N,s[103]=L,s[104]=u,s[105]=j,s[106]=M,s[107]=f,s[108]=n,s[109]=S,s[110]=ne,s[111]=ae,s[112]=re,s[113]=g,s[114]=m,s[115]=v,s[116]=k,s[117]=_,s[118]=le):le=s[118];let oe;s[119]!==de||s[120]!==le?(oe=t.jsx(ce.Suspense,{fallback:de,children:le}),s[119]=de,s[120]=le,s[121]=oe):oe=s[121];let ie;return s[122]!==V||s[123]!==oe?(ie=t.jsx(sl,{capability:"monitoring:view",area:"monitoring",children:t.jsx(vt,{children:t.jsx(Ys,{fallback:V,children:oe})})}),s[122]=V,s[123]=oe,s[124]=ie):ie=s[124],ie}function Ar(s){return s.key.trim()}export{bn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,b as I,l as D,j as n,q as F,_ as H,$ as q,Z as E,d as W,r as w,P as g,at as G,E as U,aK as V,B as Y}from"./index-EcuFIS2a.js";import{u as Z}from"./use-mobile-BZ15DgEB.js";import{c as J,r as Q,b as X,m as ee}from"./thread-button-C3YUAV-G.js";import{a as K,R as te,b as ne}from"./resizable-wU1MiASn.js";import{R as oe}from"./route-page-header-DKm5kHtX.js";import{y as ae,ar as se}from"./agent-icon-CTsmTxHg.js";import{T as le,a as ie,c as re}from"./tooltip-nr5oS_bm.js";import{p as ce,T as de}from"./toolbar-icon-button-ChZE-2zp.js";function A(u){const e=C.c(25),{side:o,open:a,disabled:s,onToggle:t}=u,r=I();let c;e[0]!==a||e[1]!==o||e[2]!==r?(c=r(a?o==="left"?"agentShellLayout.toggleButtons.hideChat":"agentShellLayout.toggleButtons.hidePanel":o==="left"?"agentShellLayout.toggleButtons.showChat":"agentShellLayout.toggleButtons.showPanel"),e[0]=a,e[1]=o,e[2]=r,e[3]=c):c=e[3];const l=c;let d;e[4]!==t||e[5]!==a||e[6]!==o?(d=()=>{F("agent_toolbar_toggled",{button:o==="left"?"chat":"main",next_state:a?"closed":"open"}),t()},e[4]=t,e[5]=a,e[6]=o,e[7]=d):d=e[7];const i=d;if(o==="left"){let x,j;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=D("flex h-10 md:h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-sm disabled:opacity-40",ce()),j=n.jsx(ae,{size:16}),e[8]=x,e[9]=j):(x=e[8],j=e[9]);let y;return e[10]!==s||e[11]!==l||e[12]!==i||e[13]!==x?(y=n.jsxs("button",{type:"button",disabled:s,onClick:i,className:x,children:[j,l]}),e[10]=s,e[11]=l,e[12]=i,e[13]=x,e[14]=y):y=e[14],y}let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(se,{size:16}),e[15]=h):h=e[15];let f;e[16]!==s||e[17]!==l||e[18]!==i?(f=n.jsx(le,{asChild:!0,children:n.jsx(de,{"aria-label":l,disabled:s,onClick:i,className:"size-7 rounded-md disabled:opacity-40",children:h})}),e[16]=s,e[17]=l,e[18]=i,e[19]=f):f=e[19];let m;e[20]!==l?(m=n.jsx(ie,{side:"bottom",children:l}),e[20]=l,e[21]=m):m=e[21];let p;return e[22]!==f||e[23]!==m?(p=n.jsxs(re,{children:[f,m]}),e[22]=f,e[23]=m,e[24]=p):p=e[24],p}function $(u,e){const o=typeof u=="number"?u:Number(u);return!Number.isFinite(o)||o<=0||o>=100?e:o}function ue(u,e){const o=C.c(8);let a;o[0]!==e?(a=l=>$(l,e),o[0]=e,o[1]=a):a=o[1];const[s,t]=H(u,a);let r;o[2]!==e||o[3]!==s?(r=$(s,e),o[2]=e,o[3]=s,o[4]=r):r=o[4];let c;return o[5]!==t||o[6]!==r?(c=[r,t],o[5]=t,o[6]=r,o[7]=c):c=o[7],c}const he=33;function fe(){const u=C.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),u[0]=e):e=u[0],ue(e,he)}const P="chat-layout-thread",O="chat-layout-content",k=w.createContext(null);function me(){return M()}function M(){const u=w.use(k);if(!u)throw new Error("ChatLayout regions require a ChatLayout");return u}function pe(u){const e=C.c(24),{children:o,...a}=u,s=E(),t=Z(),r=W(),c=w.useRef(null),[l,d]=fe(),{threadOpen:i,contentOpen:h}=a,f=J(a),m=i&&h?l:f.side,p=100-m,x=b=>{const T=b.getLayout(),z=T[P],L=T[O];typeof z!="number"||typeof L!="number"||Math.abs(z-m)<.001&&Math.abs(L-p)<.001||b.setLayout({[P]:m,[O]:p})},j=Q({visibility:a,threadVisibilityExplicit:a.threadVisibilityExplicit});let y;e[0]!==t||e[1]!==a||e[2]!==j?(y={...a,isMobile:t,mobileSurface:j},e[0]=t,e[1]=a,e[2]=j,e[3]=y):y=e[3];const S=y;let N;e[4]!==s||e[5]!==t||e[6]!==a||e[7]!==r||e[8]!==i||e[9]!==S?(N=s&&n.jsx(X,{open:t?S.mobileSurface==="chat":i,onToggle:()=>{t?r({to:".",search:b=>({...b,...ee(S.mobileSurface==="chat"?"main":"chat")}),replace:!0}):a.toggleThread()}}),e[4]=s,e[5]=t,e[6]=a,e[7]=r,e[8]=i,e[9]=S,e[10]=N):N=e[10];let v;e[11]!==o||e[12]!==h||e[13]!==p||e[14]!==t||e[15]!==d||e[16]!==x||e[17]!==i||e[18]!==m?(v=t?n.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:o}):n.jsx(te,{ref:b=>{if(c.current=b,!b)return;let T=!0;return queueMicrotask(()=>{T&&x(b)}),()=>{T=!1,c.current===b&&(c.current=null)}},defaultLayout:{[P]:m,[O]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(b,T)=>{const{isUserInteraction:z}=T;if(!z){const R=c.current;R&&x(R);return}const L=b[P];i&&h&&typeof L=="number"&&L>0&&L<100&&d(L)},children:o}),e[11]=o,e[12]=h,e[13]=p,e[14]=t,e[15]=d,e[16]=x,e[17]=i,e[18]=m,e[19]=v):v=e[19];let _;return e[20]!==N||e[21]!==v||e[22]!==S?(_=n.jsxs(k,{value:S,children:[N,v]}),e[20]=N,e[21]=v,e[22]=S,e[23]=_):_=e[23],_}function ge(u){const e=C.c(17),{children:o,topbar:a}=u,s=M(),t=E();if(s.isMobile){let f;return e[0]!==o||e[1]!==t||e[2]!==s.mobileSurface||e[3]!==a?(f=s.mobileSurface==="chat"?n.jsxs(g,{variant:"plain","data-slot":"chat-layout-thread",children:[t&&a,n.jsx(g.Content,{"data-testid":"chat-panel",children:o})]}):null,e[0]=o,e[1]=t,e[2]=s.mobileSurface,e[3]=a,e[4]=f):f=e[4],f}const r=s.threadOpen?"":void 0;let c;e[5]!==o||e[6]!==s.threadOpen||e[7]!==a?(c=s.threadOpen&&n.jsxs(n.Fragment,{children:[a,n.jsx(g.Content,{"data-testid":"chat-panel",children:o})]}),e[5]=o,e[6]=s.threadOpen,e[7]=a,e[8]=c):c=e[8];let l;e[9]!==c?(l=n.jsx("div",{className:"h-full min-h-0 p-0.5",children:n.jsx(g,{"data-testid":"side-panel",children:c})}),e[9]=c,e[10]=l):l=e[10];let d;e[11]!==r||e[12]!==l?(d=n.jsx(K,{id:P,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":r,className:"min-w-0 overflow-hidden bg-sidebar",children:l}),e[11]=r,e[12]=l,e[13]=d):d=e[13];let i;e[14]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ne,{className:"bg-sidebar"}),e[14]=i):i=e[14];let h;return e[15]!==d?(h=n.jsxs(n.Fragment,{children:[d,i]}),e[15]=d,e[16]=h):h=e[16],h}function xe({children:u,routeId:e}){return u}function B(u){const e=C.c(27),{children:o,actions:a,drawer:s}=u,t=M(),r=E();if(t.isMobile&&t.mobileSurface!=="main")return null;const c=t.isMobile?"plain":"card";let l;e[0]!==a||e[1]!==r||e[2]!==t.contentActions||e[3]!==t.contentNavigation||e[4]!==t.contentOpen||e[5]!==t.isMobile||e[6]!==t.threadOpen||e[7]!==t.toggleContent||e[8]!==t.toggleThread?(l=r?n.jsx(oe,{navigation:t.contentNavigation,actions:n.jsxs(n.Fragment,{children:[t.contentActions,a]})}):n.jsx(n.Fragment,{children:!t.isMobile&&t.contentOpen&&n.jsxs(g.Topbar,{children:[n.jsxs(g.Topbar.Left,{className:"gap-0.5",children:[n.jsx(A,{side:"left",open:t.threadOpen,onToggle:t.toggleThread}),t.contentNavigation,n.jsx(g.Topbar.Left.Target,{})]}),n.jsx(g.Topbar.Center,{children:n.jsx("div",{className:"flex min-w-0 items-center @max-sm/panel-header:hidden",children:n.jsx(g.Topbar.Center.Target,{})})}),n.jsxs(g.Topbar.Right,{children:[n.jsx(g.Topbar.Right.Target,{}),t.contentActions,a,n.jsx(A,{side:"right",open:t.contentOpen,onToggle:t.toggleContent})]})]})}),e[0]=a,e[1]=r,e[2]=t.contentActions,e[3]=t.contentNavigation,e[4]=t.contentOpen,e[5]=t.isMobile,e[6]=t.threadOpen,e[7]=t.toggleContent,e[8]=t.toggleThread,e[9]=l):l=e[9];let d;e[10]!==o||e[11]!==t.contentKey?(d=n.jsx(G,{children:n.jsx(xe,{routeId:t.contentKey,children:o})}),e[10]=o,e[11]=t.contentKey,e[12]=d):d=e[12];let i;e[13]!==t.contentKey||e[14]!==d?(i=n.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:n.jsx(U,{children:d},t.contentKey)}),e[13]=t.contentKey,e[14]=d,e[15]=i):i=e[15];let h;e[16]!==s||e[17]!==i?(h=n.jsxs(g.Content,{children:[i,s]}),e[16]=s,e[17]=i,e[18]=h):h=e[18];let f;e[19]!==c||e[20]!==l||e[21]!==h?(f=n.jsxs(g,{"data-testid":"main-panel",variant:c,children:[l,h]}),e[19]=c,e[20]=l,e[21]=h,e[22]=f):f=e[22];const m=f;let p;return e[23]!==t.contentOpen||e[24]!==t.isMobile||e[25]!==m?(p=t.isMobile?m:n.jsx(K,{id:O,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":t.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:n.jsx("div",{className:"h-full min-h-0 p-0.5",children:m})}),e[23]=t.contentOpen,e[24]=t.isMobile,e[25]=m,e[26]=p):p=e[26],p}function be(){const u=C.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(B,{children:n.jsx(V,{})}),u[0]=e):e=u[0],e}function ye(u){const e=C.c(18),{error:o,reset:a}=u,s=I();let t;e[0]!==s?(t=s("common.errorBoundary.somethingWentWrong"),e[0]=s,e[1]=t):t=e[1];let r;e[2]!==t?(r=n.jsx("h2",{className:"text-lg font-medium",children:t}),e[2]=t,e[3]=r):r=e[3];let c;e[4]!==o.message||e[5]!==s?(c=o.message||s("common.errorBoundary.unexpectedError"),e[4]=o.message,e[5]=s,e[6]=c):c=e[6];let l;e[7]!==c?(l=n.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:c}),e[7]=c,e[8]=l):l=e[8];let d;e[9]!==s?(d=s("common.errorBoundary.tryAgain"),e[9]=s,e[10]=d):d=e[10];let i;e[11]!==a||e[12]!==d?(i=n.jsx(Y,{variant:"outline",onClick:a,children:d}),e[11]=a,e[12]=d,e[13]=i):i=e[13];let h;return e[14]!==r||e[15]!==l||e[16]!==i?(h=n.jsx(B,{children:n.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[r,l,i]})}),e[14]=r,e[15]=l,e[16]=i,e[17]=h):h=e[17],h}const je=Object.assign(pe,{Thread:ge,Content:B}),ze=Object.freeze(Object.defineProperty({__proto__:null,ChatLayout:je,ChatLayoutError:ye,ChatLayoutPending:be,useChatLayout:me},Symbol.toStringTag,{value:"Module"}));export{je as C,A as P,ze as i,me as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as r}from"./index-
|
|
1
|
+
import{c as s,j as r}from"./index-EcuFIS2a.js";import{D as n,b as c}from"./decopilot-BI8eOOPY.js";function d(l){const e=s.c(2),{onClose:o}=l;let t;return e[0]!==o?(t=r.jsx(c,{onClose:o}),e[0]=o,e[1]=t):t=e[1],t}function p(l){const e=s.c(4);let o;e[0]!==l?({...o}=l,e[0]=l,e[1]=o):o=e[1];let t;return e[2]!==o?(t=r.jsx(n,{...o}),e[2]=o,e[3]=t):t=e[3],t}export{p as M,d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as fo,r as F,b as cc,ac as Hf,j as R,h as Vf,B as cl,ab as ul,aa as jf,ad as Wf,dY as uc,dZ as Kf,aw as Uf,d_ as Kt,d$ as _f,l as dc}from"./index-Dc7hzqoi.js";import{d as qf,g as Jf}from"./gateway-client-BuiOykcN.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-llvhXw2o.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-CSXgIHLz.js";import{I as oh}from"./input-DXlaTX4w.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-BCUpiY_R.js";import{T as ah,a as ch,c as uh}from"./tooltip-DV2xHesQ.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
1
|
+
import{c as fo,r as F,b as cc,aq as Hf,j as R,h as Vf,B as cl,ap as ul,ao as jf,ar as Wf,e5 as uc,e6 as Kf,aO as Uf,e7 as Kt,e8 as _f,l as dc}from"./index-EcuFIS2a.js";import{d as qf,g as Jf}from"./gateway-client-CnYYocwu.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-AoC07APJ.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-CYsJTpNM.js";import{I as oh}from"./input-Buz_7xoG.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-D26BTBiX.js";import{T as ah,a as ch,c as uh}from"./tooltip-nr5oS_bm.js";function dh(t,e){const n={};for(const r of t?.arguments??[])n[r.name]=r.required?ul().min(1,e):ul();return jf(n)}function fh(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function yx(t){const e=fo.c(74),{prompt:n,setPrompt:r,onSubmit:i,defaultValues:s}=t,o=F.useId(),l=cc();let a,c;if(e[0]!==n||e[1]!==l){const ie=dh(n,l("chat.dialogPromptArguments.required"));c=Wf,a=Hf(ie),e[0]=n,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==s||e[5]!==n?(u=n?fh(n,s):{},e[4]=s,e[5]=n,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==n?.arguments?(h=n?.arguments??[],e[10]=n?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==i||e[14]!==r?(g=async ie=>{await i(ie),r(null),f.reset()},e[12]=f,e[13]=i,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=ie=>{ie||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!n)return null;let S;e[19]!==n._meta||e[20]!==n.name||e[21]!==n.title?(S=n.title||qf(n.name,Jf(n._meta)),e[19]=n._meta,e[20]=n.name,e[21]=n.title,e[22]=S):S=e[22];let C;e[23]!==S?(C=R.jsx(Gf,{children:R.jsx("span",{className:"capitalize",children:S})}),e[23]=S,e[24]=C):C=e[24];let T;e[25]!==n.description?(T=n.description&&R.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[25]=n.description,e[26]=T):T=e[26];let N;e[27]!==T||e[28]!==C?(N=R.jsxs(Yf,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=N):N=e[29];let v;e[30]!==f||e[31]!==m?(v=ie=>{ie.stopPropagation(),f.handleSubmit(m)(ie)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let O;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let ie;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(ie=Le=>R.jsx(th,{control:f.control,name:Le.name,render:En=>{const{field:We}=En;return R.jsxs(nh,{children:[R.jsxs(rh,{className:"text-xs",children:[Le.name,Le.required?null:R.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),R.jsx(ih,{children:R.jsx(oh,{...We,value:We.value??"",required:Le.required,placeholder:Le.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),R.jsx(sh,{})]})}},Le.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=ie):ie=e[41],O=p.map(ie),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=O}else O=e[37];let P;e[42]!==b?(P=()=>b(!1),e[42]=b,e[43]=P):P=e[43];const _=f.formState.isSubmitting;let ne;e[44]!==l?(ne=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=ne):ne=e[45];let ce;e[46]!==f.formState.isSubmitting||e[47]!==P||e[48]!==ne?(ce=R.jsx(cl,{type:"button",variant:"ghost",onClick:P,disabled:_,children:ne}),e[46]=f.formState.isSubmitting,e[47]=P,e[48]=ne,e[49]=ce):ce=e[49];let H;e[50]!==f.formState.isSubmitting||e[51]!==l?(H=f.formState.isSubmitting?R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx(Vf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=H):H=e[52];let J;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==H?(J=R.jsx(cl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:H}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=H,e[56]=J):J=e[56];let V;e[57]!==ce||e[58]!==J?(V=R.jsxs(Xf,{children:[ce,J]}),e[57]=ce,e[58]=J,e[59]=V):V=e[59];let re;e[60]!==o||e[61]!==v||e[62]!==O||e[63]!==V?(re=R.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[O,V]}),e[60]=o,e[61]=v,e[62]=O,e[63]=V,e[64]=re):re=e[64];let Se;e[65]!==f||e[66]!==re?(Se=R.jsx(eh,{...f,children:re}),e[65]=f,e[66]=re,e[67]=Se):Se=e[67];let Pe;e[68]!==N||e[69]!==Se?(Pe=R.jsxs(Qf,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[N,Se]}),e[68]=N,e[69]=Se,e[70]=Pe):Pe=e[70];let ot;return e[71]!==b||e[72]!==Pe?(ot=R.jsx(Zf,{open:!0,onOpenChange:b,children:Pe}),e[71]=b,e[72]=Pe,e[73]=ot):ot=e[73],ot}var fl=Object.defineProperty,hh=(t,e)=>{let n={};for(var r in t)fl(n,r,{get:t[r],enumerable:!0});return fl(n,Symbol.toStringTag,{value:"Module"}),n};function se(t){this.content=t}se.prototype={constructor:se,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new se(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new se(n)},addToStart:function(t,e){return new se([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new se(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new se(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=se.from(t),t.size?new se(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=se.from(t),t.size?new se(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=se.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};se.from=function(t){if(t instanceof se)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new se(e)};function fc(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let o=i.text,l=s.text,a=0;for(;o[a]==l[a];a++)n++;return a&&a<o.length&&a<l.length&&mc(o.charCodeAt(a-1))&&pc(o.charCodeAt(a))&&n--,n}if(i.content.size||s.content.size){let o=fc(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function hc(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){n-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:n,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,r--;return d&&f&&d<c.length&&mc(c.charCodeAt(d-1))&&pc(c.charCodeAt(d))&&(n++,r++),{a:n,b:r}}if(o.content.size||l.content.size){let c=hc(o.content,l.content,n-1,r-1);if(c)return c}n-=a,r-=a}}function pc(t){return t>=56320&&t<57344}function mc(t){return t>=55296&&t<56320}class k{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,l=0;l<n;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,n-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>n)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,n-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,n-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,n){return e==n?k.empty:e==0&&n==this.content.length?this:new k(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return fc(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hc(this,e,n,r)}findIndex(e){if(e==0)return xr(0,e);if(e==this.size)return xr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?xr(n+1,s):xr(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return k.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return k.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new k(n||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const Ji={index:0,offset:0};function xr(t,e){return Ji.index=t,Ji.offset=e,Ji}function Hr(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hr(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hr(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $=class Es{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Es.none;if(e instanceof Es)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$.none=[];class Qn extends Error{}class M{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=yc(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,n){return new M(gc(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return M.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(k.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new M(e,r,i)}}M.empty=new M(k.empty,0,0);function gc(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:l}=t.findIndex(n);if(i==e||s.isText){if(l!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(gc(s.content,e-i-1,n-i-1)))}function yc(t,e,n,r,i,s){let{index:o,offset:l}=t.findIndex(e),a=t.maybeChild(o);if(l==e||a.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=yc(a.content,e-l-1,n,o==0?r-1:0,o==t.childCount-1?i-1:0,a);return c&&t.replaceChild(o,a.copy(c))}function ph(t,e,n){if(n.openStart>t.depth)throw new Qn("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Qn("Inconsistent open depths");return bc(t,e,n,0)}function bc(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=bc(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,l=o.content;return zt(o,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=mh(n,t);return zt(s,Sc(t,o,l,e,r))}else return zt(s,Vr(t,e,r))}function kc(t,e){if(!e.type.compatibleContent(t.type))throw new Qn("Cannot join "+e.type.name+" onto "+t.type.name)}function Ts(t,e,n){let r=t.node(n);return kc(r,e.node(n)),r}function $t(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function zn(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&($t(t.nodeAfter,r),s++));for(let l=s;l<o;l++)$t(i.child(l),r);e&&e.depth==n&&e.textOffset&&$t(e.nodeBefore,r)}function zt(t,e){if(!t.type.validContent(e))throw new Qn("Invalid content for node "+t.type.name);return t.copy(e)}function Sc(t,e,n,r,i){let s=t.depth>i&&Ts(t,e,i+1),o=r.depth>i&&Ts(n,r,i+1),l=[];return zn(null,t,i,l),s&&o&&e.index(i)==n.index(i)?(kc(s,o),$t(zt(s,Sc(t,e,n,r,i+1)),l)):(s&&$t(zt(s,Vr(t,e,i+1)),l),zn(e,n,i,l),o&&$t(zt(o,Vr(n,r,i+1)),l)),zn(r,null,i,l),new k(l)}function Vr(t,e,n){let r=[];if(zn(null,t,n,r),t.depth>n){let i=Ts(t,e,n+1);$t(zt(i,Vr(t,e,n+1)),r)}return zn(e,null,n,r),new k(r)}function mh(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Zn{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Zn(n,r,s)}static resolveCached(e,n){let r=hl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else hl.set(e,r=new gh);let i=r.elts[r.i]=Zn.resolve(e,n);return r.i=(r.i+1)%yh,i}}class gh{constructor(){this.elts=[],this.i=0}}const yh=12,hl=new WeakMap;class jr{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const bh=Object.create(null);let Bt=class ws{constructor(e,n,r,i=$.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||k.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hr(this.attrs,n||e.defaultAttrs||bh)&&$.sameSet(this.marks,r||$.none)}copy(e=null){return e==this.content?this:new ws(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ws(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new M(c,i.depth-o,s.depth-o)}replace(e,n,r){return ph(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Zn.resolveCached(this,e)}resolveNoCache(e){return Zn.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xc(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!$.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=k.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};Bt.prototype.text=void 0;class Wr extends Bt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Wr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Wr(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function xc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new kh(e,n);if(r.next==null)return Ut.empty;let i=Cc(r);r.next&&r.err("Unexpected trailing text");let s=wh(Th(i));return vh(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!n||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
|
|
2
2
|
`)}}Ut.empty=new Ut(!0);class kh{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Cc(t){let e=[];do e.push(Sh(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sh(t){let e=[];do e.push(xh(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xh(t){let e=Eh(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ch(t,e);else break;return e}function pl(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ch(t,e){let n=pl(t),r=n;return t.eat(",")&&(t.next!="}"?r=pl(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Mh(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Eh(t){if(t.eat("(")){let e=Cc(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Mh(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Th(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=n())}else if(o.type=="star"){let a=n();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=n();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,a),u),a=u}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=n();r(a,u),i(s(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Mc(t,e){return e-t}function ml(t,e){let n=[];return r(e),n.sort(Mc);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&n.indexOf(a)==-1&&r(a)}}}function wh(t){let e=Object.create(null);return n(ml(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);ml(t,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new Ut(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(Mc);s.next.push({type:i[o][0],next:e[l.join(",")]||n(l)})}return s}}function vh(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ec(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Tc(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function wc(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function vc(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Nh(t,r,e[r]);return n}let gl=class Ac{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=vc(e,r.attrs),this.defaultAttrs=Ec(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ut.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Tc(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Bt(this,this.computeAttrs(e),k.from(n),$.setFrom(r))}createChecked(e=null,n,r){return n=k.from(n),this.checkContent(n),new Bt(this,this.computeAttrs(e),n,$.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=k.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(k.empty,!0);return s?new Bt(this,e,n.append(s),$.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){wc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:$.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new Ac(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ah(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Nh{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ah(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Ri{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=vc(e,i.attrs),this.excluded=null;let s=Ec(this.attrs);this.instance=s?new $(this,s):null}create(e=null){return!e&&this.instance?this.instance:new $(this,Tc(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ri(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){wc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Nc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=se.from(e.nodes),n.marks=se.from(e.marks||{}),this.nodes=gl.compile(this.spec.nodes,this),this.marks=Ri.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?yl(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yl(this,o.split(" "))}this.nodeFromJSON=i=>Bt.fromJSON(this,i),this.markFromJSON=i=>$.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Wr(r,r.defaultAttrs,e,$.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function yl(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let l in t.marks){let a=t.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Oh(t){return t.tag!=null}function Dh(t){return t.style!=null}class He{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(Oh(i))this.tags.push(i);else if(Dh(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new kl(this,n,!1);return r.addAll(e,$.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new kl(this,n,!0);return r.addAll(e,$.none,n.from,n.to),M.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Ph(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(o.getAttrs){let a=o.getAttrs(n);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let l=n[o];if((l.priority==null?50:l.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Sl(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const Oc={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Rh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dc={ol:!0,ul:!0},er=1,vs=2,Bn=4;function bl(t,e,n){return e!=null?(e?er:0)|(e==="full"?vs:0):t&&t.whitespace=="pre"?er|vs:n&~Bn}class Cr{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=$.none,this.match=s||(o&Bn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(k.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&er)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=k.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Oc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class kl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=bl(null,n.preserveWhitespace,0)|(r?Bn:0);i?s=new Cr(i.type,i.attrs,$.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new Cr(null,null,$.none,!0,null,o):s=new Cr(e.schema.topNodeType,null,$.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&vs?"full":this.localPreserveWS||(i.options&er)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(o.text(l[a]),n,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Dc.hasOwnProperty(o)&&this.parser.normalizeLists&&Ih(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Rh.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(Oc.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=a&&a.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(c=>!a.clearMark(c)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,n.attrs||null,r,n.preserveWhitespace);a&&(s=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,s=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=$.none;for(let l of i.concat(e.marks))(s.type?s.type.allowsMarkType(l.type):xl(l.type,e.type))&&(o=l.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=bl(e,s,o.options);o.options&Bn&&o.content.length==0&&(l|=Bn);let a=$.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):xl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Cr(e,n,a,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=er)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Ih(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dc.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Ph(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Sl(t){let e={};for(let n in t)e[n]=t[n];return e}function xl(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class nt{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Mr(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){if(e.isText)return Mr(n).createTextNode(e.text);let{dom:r,contentDOM:i}=Lr(Mr(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Lr(Mr(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:Lr(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new nt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Cl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Cl(e.marks)}}function Cl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Mr(t){return t.document||window.document}const Ml=new WeakMap;function Lh(t){let e=Ml.get(t);return e===void 0&&Ml.set(t,e=$h(t)),e}function $h(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Lr(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Lh(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let l,a=n?t.createElementNS(n,i):t.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(t.createTextNode(f));else{let{dom:h,contentDOM:p}=Lr(t,f,n,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Rc=65535,Ic=Math.pow(2,16);function zh(t,e){return t+e*Ic}function El(t){return t&Rc}function Bh(t){return(t-(t&Rc))/Ic}const Pc=1,Lc=2,$r=4,$c=8;class As{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&$c)>0}get deletedBefore(){return(this.delInfo&(Pc|$r))>0}get deletedAfter(){return(this.delInfo&(Lc|$r))>0}get deletedAcross(){return(this.delInfo&$r)>0}}class xe{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&xe.empty)return xe.empty}recover(e){let n=0,r=El(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Bh(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:n:n,h=a+i+(f<0?0:u);if(r)return h;let p=e==(n<0?a:d)?null:zh(l/3,e-a),g=e==a?Lc:e==d?Pc:$r;return(n<0?e!=a:e!=d)&&(g|=$c),new As(h,g,p)}i+=u-c}return r?e+i:new As(e+i,0,null)}touches(e,n){let r=0,i=El(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?xe.empty:new xe(e<0?[0,-e,0]:[0,0,e])}}xe.empty=new xe([]);class tr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new tr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new tr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new As(e,i,null)}}const Gi=Object.create(null);class fe{getMap(){return xe.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Gi[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Gi)throw new RangeError("Duplicate use of step JSON ID "+e);return Gi[e]=n,n.prototype.jsonID=e,n}}class G{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new G(e,null)}static fail(e){return new G(null,e)}static fromReplace(e,n,r,i){try{return G.ok(e.replace(n,r,i))}catch(s){if(s instanceof Qn)return G.fail(s.message);throw s}}}function ho(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(ho(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return k.fromArray(r)}class mt extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new M(ho(n.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,s)}invert(){return new De(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mt(n.pos,r.pos,this.mark)}merge(e){return e instanceof mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("addMark",mt);class De extends fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new M(ho(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return G.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new De(n.pos,r.pos,this.mark)}merge(e){return e instanceof De&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new De(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new De(n.from,n.to,e.markFromJSON(n.mark))}}fe.jsonID("removeMark",De);class gt extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new gt(this.pos,n.marks[i]);return new gt(this.pos,this.mark)}}return new _t(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("addNodeMark",gt);class _t extends fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return G.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return G.fromReplace(e,this.pos,this.pos+1,new M(k.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new _t(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new _t(n.pos,e.markFromJSON(n.mark))}}fe.jsonID("removeNodeMark",_t);class q extends fe{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Ns(e,this.from,this.to)?G.fail("Structure replace would overwrite content"):G.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&q.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new q(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(n.from,n.to,M.fromJSON(e,n.slice),!!n.structure)}}q.MAP_BIAS=1;fe.jsonID("replace",q);class ee extends fe{constructor(e,n,r,i,s,o,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Ns(e,this.from,this.gapFrom)||Ns(e,this.gapTo,this.to)))return G.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return G.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?G.fromReplace(e,this.from,this.to,r):G.fail("Content does not fit in gap")}getMap(){return new xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new ee(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new ee(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ee(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(e,n.slice),n.insert,!!n.structure)}}fe.jsonID("replaceAround",ee);function Ns(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Fh(t,e,n,r){let i=[],s=[],o,l;t.doc.nodesBetween(e,n,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,n),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new De(f,h,d[g])));l&&l.to==f?l.to=h:s.push(l=new mt(f,h,r))}}),i.forEach(a=>t.step(a)),s.forEach(a=>t.step(a))}function Hh(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof Ri){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,n);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(o=>t.step(new De(o.from,o.to,o.style)))}function po(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let c=s.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new q(l,u,M.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new De(l,u,c.marks[f]));if(i&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new M(k.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new q(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(k.empty,!0);t.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)t.step(o[a])}function Vh(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Mn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),l=t.$from.index(r)+i,a=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(l,a,n))return r;if(r==0||o.type.spec.isolating||!Vh(o,l,a))break;l&&(i=1),a<o.childCount&&(s=1)}return null}function jh(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,c=l,u=k.empty,d=0;for(let p=s,g=!1;p>n;p--)g||r.index(p)>0?(g=!0,u=k.from(r.node(p).copy(u)),d++):a--;let f=k.empty,h=0;for(let p=s,g=!1;p>n;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=k.from(i.node(p).copy(f)),h++):c++;t.step(new ee(a,c,o,l,new M(u.append(f),d,h),u.size-d,!0))}function mo(t,e,n=null,r=t){let i=Wh(t,e),s=i&&Kh(r,e);return s?i.map(Tl).concat({type:e,attrs:n}).concat(s.map(Tl)):null}function Tl(t){return{type:t,attrs:null}}function Wh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function Kh(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(n.child(c).type);return!a||!a.validEnd?null:o}function Uh(t,e,n){let r=k.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let l=n[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=k.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new ee(i,s,i,s,new M(r,0,0),n.length,!0))}function _h(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,l)=>{let a=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,a)&&qh(t.doc,t.mapping.slice(s).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Bc(t,o,l,s),po(t,t.mapping.slice(s).map(l,1),r,void 0,c===null);let u=t.mapping.slice(s),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return t.step(new ee(d,f,d+1,f-1,new M(k.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&zc(t,o,l,s),!1}})}function zc(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let a=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Bc(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
|