decocms 4.380.0 → 4.380.2
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-DiFFwnXn.js → AlertCircle-CGFLJpTs.js} +1 -1
- package/dist/client/assets/{AreaChart-BDoo3URx.js → AreaChart-a82Hhsmi.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DBsIg0tM.js → ArrowLeft-DC5XoBuA.js} +1 -1
- package/dist/client/assets/{ArrowRight-DAyoDk3L.js → ArrowRight-BOJ1d9xj.js} +1 -1
- package/dist/client/assets/{ArrowUp-BlMnl5Fe.js → ArrowUp-C1pJvrX2.js} +1 -1
- package/dist/client/assets/{CartesianChart-DBj_6lI8.js → CartesianChart-yTuaWbdE.js} +1 -1
- package/dist/client/assets/{CheckCircle-CeKBIghf.js → CheckCircle-Bw2G2vwj.js} +1 -1
- package/dist/client/assets/{ChevronUp-CgAKIOEA.js → ChevronUp-DSgAhhLJ.js} +1 -1
- package/dist/client/assets/{Copy01-DH-b-DEp.js → Copy01-BaJ5hTZ2.js} +1 -1
- package/dist/client/assets/{CreditCard01-DOq4VYVm.js → CreditCard01-DLxXT7_f.js} +1 -1
- package/dist/client/assets/{DotsVertical-lJDK2pti.js → DotsVertical-Cz_1rDcG.js} +1 -1
- package/dist/client/assets/{Download01-Do3BZNKR.js → Download01-CGyaU6cf.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-kaDG2aTw.js → ErrorBarContext-H3WwZUjL.js} +1 -1
- package/dist/client/assets/{Eye-A3tl5Wzy.js → Eye-DXecVoiS.js} +1 -1
- package/dist/client/assets/{Globe01-DtK2maUY.js → Globe01-BWcV-98b.js} +1 -1
- package/dist/client/assets/{Globe04-BmvhB0Gt.js → Globe04-Cx7GY3vn.js} +1 -1
- package/dist/client/assets/{Image01-mLa5V9Ru.js → Image01-B5ab_A88.js} +1 -1
- package/dist/client/assets/{Key01-xkO9bwBT.js → Key01-D0TscG0E.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C8RwYoPV.js → LayoutLeft-d27AQAwl.js} +1 -1
- package/dist/client/assets/{Line-CxPM7nuh.js → Line-iessdnWy.js} +1 -1
- package/dist/client/assets/{Link01-DJpHg526.js → Link01-Dx7hRSe5.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D92xZRHr.js → LinkExternal01-BfutJB7X.js} +1 -1
- package/dist/client/assets/{Monitor01-h5IvVPhq.js → Monitor01-Dentn30o.js} +1 -1
- package/dist/client/assets/{Package-tkZ6dx50.js → Package-CPNFyhMT.js} +1 -1
- package/dist/client/assets/{Palette-CTqPeiU2.js → Palette-DbXyfbJI.js} +1 -1
- package/dist/client/assets/{Play-DHVeBlQM.js → Play-CU4Q1GTp.js} +1 -1
- package/dist/client/assets/{Plus-CVN0z8nz.js → Plus-D3XzoCF3.js} +1 -1
- package/dist/client/assets/{SearchLg-DGWpAE2t.js → SearchLg-BYoLM1MK.js} +1 -1
- package/dist/client/assets/{SearchMd-yDG5dnrV.js → SearchMd-DWKZ-mHQ.js} +1 -1
- package/dist/client/assets/{Sector-BRiWGOyA.js → Sector-DH8uTs0D.js} +1 -1
- package/dist/client/assets/{Settings02-DZlGO72q.js → Settings02-BqG3HPm0.js} +1 -1
- package/dist/client/assets/{Share07-AYmj_4-u.js → Share07-o5jM3q0c.js} +1 -1
- package/dist/client/assets/{Stars01-42gximKe.js → Stars01-BZHqW_f9.js} +1 -1
- package/dist/client/assets/{Sun-ESwNzqLw.js → Sun-DGhoQy96.js} +1 -1
- package/dist/client/assets/{Tool01-BPkGCn0Q.js → Tool01-CE_c59RR.js} +1 -1
- package/dist/client/assets/{Tool02-BLTB0Mu5.js → Tool02-Bo-RIY8d.js} +1 -1
- package/dist/client/assets/{Trash01-ByQC7g6l.js → Trash01-CRCUnlT2.js} +1 -1
- package/dist/client/assets/{TrendUp01-C79-zHMj.js → TrendUp01-B5hqDidz.js} +1 -1
- package/dist/client/assets/{Upload01-Bor4hbpq.js → Upload01-Bl2MpUhj.js} +1 -1
- package/dist/client/assets/{User01-D7HcCt9Q.js → User01-3GLc_M8a.js} +1 -1
- package/dist/client/assets/{UserSquare-KXseyaU2.js → UserSquare-CEWYtKNG.js} +1 -1
- package/dist/client/assets/{Users01-DtJ1EO6i.js → Users01-DZ2aEDSy.js} +1 -1
- package/dist/client/assets/{X-FTMZhNl_.js → X-BGniQsFS.js} +1 -1
- package/dist/client/assets/{XCircle-BrT4uSvp.js → XCircle-CLEbTtoV.js} +1 -1
- package/dist/client/assets/{XClose-B-rnNFcm.js → XClose-wzn6XIaq.js} +1 -1
- package/dist/client/assets/{Zap-DigiqRTQ.js → Zap-BHpOc94D.js} +1 -1
- package/dist/client/assets/{ZoomOut-BRgBObyK.js → ZoomOut-CDTxnLh4.js} +1 -1
- package/dist/client/assets/{access-gate-wTSTsqMc.js → access-gate-C6A3nRFO.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BdllWDSk.js → add-connection-dialog-Bb9g1-aL.js} +1 -1
- package/dist/client/assets/{agent-analytics-DGsCfvbl.js → agent-analytics-Bsz-bSr0.js} +1 -1
- package/dist/client/assets/agent-app-DesHz54X.js +1 -0
- package/dist/client/assets/{agent-assets-8owHfP5F.js → agent-assets-Biq0mlJm.js} +1 -1
- package/dist/client/assets/{agent-automation-Bz0S-16F.js → agent-automation-xDic7y2P.js} +1 -1
- package/dist/client/assets/{agent-automations-wd9h-Tht.js → agent-automations-DcuDx55z.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-Dy8ZjfQr.js → agent-connect-sources-Cydd6pKs.js} +1 -1
- package/dist/client/assets/agent-deck-BfHJuX43.js +1 -0
- package/dist/client/assets/{agent-e2e-CuvK9cXo.js → agent-e2e-BpJp1n9i.js} +1 -1
- package/dist/client/assets/{agent-experiments-ClpSebT8.js → agent-experiments-DijfK_gJ.js} +1 -1
- package/dist/client/assets/agent-file-CMCRpotH.js +1 -0
- package/dist/client/assets/{agent-git-AqNtUeWd.js → agent-git-CZf70UrF.js} +1 -1
- package/dist/client/assets/{agent-hosting-Dt2l50QO.js → agent-hosting-wzysZLdu.js} +1 -1
- package/dist/client/assets/{agent-icon-D7_DgLeg.js → agent-icon-D496OkeL.js} +1 -1
- package/dist/client/assets/agent-library-file-D-nUmAuh.js +1 -0
- package/dist/client/assets/{agent-monitor-BBFSF-ja.js → agent-monitor-6AAWwBbq.js} +1 -1
- package/dist/client/assets/{agent-overview-Bv0_xqlK.js → agent-overview-QbpPeBnc.js} +1 -1
- package/dist/client/assets/agent-settings-xOqY0ZbM.js +1 -0
- package/dist/client/assets/{agent-site-editor-nd_s2WPG.js → agent-site-editor-DXxcNAAU.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-CQaQYkYG.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DUUKv9bZ.js → agent-site-editor-content-BlnYGJNq.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-DzXJz0uy.js → agent-site-editor-preview-CWjsD5rW.js} +3 -3
- package/dist/client/assets/agent-view-CYAR8G1z.js +1 -0
- package/dist/client/assets/{agent-view-guard-BRybrHV3.js → agent-view-guard-B6fFe17X.js} +1 -1
- package/dist/client/assets/{agents-list-D8J1wfGM.js → agents-list-CqIyRDj0.js} +1 -1
- package/dist/client/assets/ai-providers-2e7ta5Tg.js +6 -0
- package/dist/client/assets/{alert-DH9D3aPG.js → alert-CIymKwzl.js} +1 -1
- package/dist/client/assets/{alert-dialog-6ugQOVnp.js → alert-dialog-Bq7N6ZWF.js} +1 -1
- package/dist/client/assets/api-keys-BVhi6eib.js +1 -0
- package/dist/client/assets/{api-keys-rUO23RwI.js → api-keys-equ4Tv0D.js} +1 -1
- package/dist/client/assets/app-editor-S-OQQx45.js +1 -0
- package/dist/client/assets/{asset-utils-BoKJ5PK8.js → asset-utils-ClvN_bIt.js} +1 -1
- package/dist/client/assets/{auth-DmDOm64q.js → auth-3KEna5Qg.js} +1 -1
- package/dist/client/assets/{auth-catchall-C5ga_-pN.js → auth-catchall-1KfVcSXT.js} +1 -1
- package/dist/client/assets/{auth-entry-C2_omLzg.js → auth-entry-BKOXx840.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BUUa6qGa.js → auth-split-layout-D5Awhhre.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-6-SdIk-G.js → authenticate-and-persist-oauth-5OH4tqLf.js} +1 -1
- package/dist/client/assets/{automation-list-row-xkRsARJ4.js → automation-list-row-CNmGZG7h.js} +1 -1
- package/dist/client/assets/{automation-runs-BPNUctbe.js → automation-runs-DoA8WvHT.js} +1 -1
- package/dist/client/assets/{automations-C86GtJ-1.js → automations-DtZ-CBg6.js} +1 -1
- package/dist/client/assets/{autosend-BF2ntRTS.js → autosend-CgAy_8nv.js} +1 -1
- package/dist/client/assets/{avatar-DIbfdIaJ.js → avatar-PPm_nVJO.js} +1 -1
- package/dist/client/assets/{badge-BuhJVk0d.js → badge-CzCkyB-y.js} +1 -1
- package/dist/client/assets/{block-document-CNdBZYlH.js → block-document-D8uEaf-S.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Do59qFA-.js → blocks-preview-workspace-context-JV86bUee.js} +1 -1
- package/dist/client/assets/{breadcrumb-Bn6Qxv6I.js → breadcrumb-1SsyuAmn.js} +1 -1
- package/dist/client/assets/{buckets-MyVzU5Wd.js → buckets-BKOCj--b.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-3AB_pLqo.js → build-improve-prompt-doc-Y74P3hyZ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BmJPTlrj.js → bulk-category-panel-DDeRHIvS.js} +1 -1
- package/dist/client/assets/{calendar-Bz-pgKJK.js → calendar-Bs8TzhBE.js} +1 -1
- package/dist/client/assets/{capability-load-error-BkDt31rX.js → capability-load-error-qgxNzLRH.js} +1 -1
- package/dist/client/assets/category-editor-AbJlO6XH.js +1 -0
- package/dist/client/assets/{chart-BPdzcfAa.js → chart-CSB0FjAw.js} +1 -1
- package/dist/client/assets/{chat-context-CDAlulfA.js → chat-context-C7f3MLVZ.js} +1 -1
- package/dist/client/assets/{chat-draft-ox07yWju.js → chat-draft-BW5UOw44.js} +1 -1
- package/dist/client/assets/{checkbox-CCyUpxZx.js → checkbox-Djw8YkXF.js} +1 -1
- package/dist/client/assets/{choose-editor-CNRYJEr8.js → choose-editor-CCbrtvab.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cg7F0V5P.js → cli-auth-success-2avwTjVf.js} +1 -1
- package/dist/client/assets/{client-icons-DkY0axzR.js → client-icons-CgVdwszb.js} +1 -1
- package/dist/client/assets/{collapsible-CS4VRXD_.js → collapsible-CL_tV3Eh.js} +1 -1
- package/dist/client/assets/{collection-detail-eW0NUZdX.js → collection-detail-BeOsyZBJ.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bc-ifoPd.js → collection-display-button-BPeer94Q.js} +1 -1
- package/dist/client/assets/{collection-search-Cf3xxp2D.js → collection-search-CW48jNAm.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DmsWQn0S.js → collection-table-wrapper-DedUSq_q.js} +1 -1
- package/dist/client/assets/{collection-tabs-CKge2GXF.js → collection-tabs-BxNdQr3v.js} +1 -1
- package/dist/client/assets/{combobox-BWRBQog_.js → combobox-Dwfed5hM.js} +1 -1
- package/dist/client/assets/{command-D92Vc8wZ.js → command-Dp_xVMno.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BiC5HEIS.js → companion-mcps-section-DwDjUgsF.js} +1 -1
- package/dist/client/assets/{connect-BHkghewJ.js → connect-CTaD0CTL.js} +1 -1
- package/dist/client/assets/{connect-layout-B6zbLjpp.js → connect-layout-DBtCSLVk.js} +1 -1
- package/dist/client/assets/{connection-DINB-U7F.js → connection-B8n_iRDm.js} +1 -1
- package/dist/client/assets/{connection-card-B1l82vpD.js → connection-card-d6di2niE.js} +1 -1
- package/dist/client/assets/{connection-detail-W9a_OVyK.js → connection-detail-Bd0H2Cr3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-iyzO-C-U.js → connection-form-helpers-D99GQOo-.js} +1 -1
- package/dist/client/assets/{connections-DqSoTmKR.js → connections-BbEnv8dv.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BEfUGIPB.js → create-organization-dialog-C7J_r78k.js} +1 -1
- package/dist/client/assets/{decofile-api-CjA5VsH3.js → decofile-api-BirlTWkL.js} +1 -1
- package/dist/client/assets/{decopilot-CcmhDMq8.js → decopilot-DOWkbqe-.js} +1 -1
- package/dist/client/assets/{dialog-BGeIGaOQ.js → dialog-DTxKdk6B.js} +1 -1
- package/dist/client/assets/{discover-Qpp5-Lwt.js → discover-DBWZ7ohk.js} +1 -1
- package/dist/client/assets/{domain-settings-BYjmJ-_9.js → domain-settings-Bdyi19GR.js} +1 -1
- package/dist/client/assets/{download-app-dialog-tB-sFfox.js → download-app-dialog-B_OO5bFO.js} +1 -1
- package/dist/client/assets/{drawer-CW_I7YDU.js → drawer-CwqENKPq.js} +1 -1
- package/dist/client/assets/{editor-DG3GAwjz.js → editor-DpRJQ9mq.js} +1 -1
- package/dist/client/assets/{empty-state-BxuGfxi2.js → empty-state-Cva040iu.js} +1 -1
- package/dist/client/assets/{empty-state-CC1gKASp.js → empty-state-DekE7Ie6.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BrGvh19v.js → extract-connection-data-B_g-VP9A.js} +1 -1
- package/dist/client/assets/{feature-gate-C98Y_ieW.js → feature-gate-CUslF5vY.js} +1 -1
- package/dist/client/assets/{feature-paywall-CMPQ2H8B.js → feature-paywall-BD-lgh2_.js} +1 -1
- package/dist/client/assets/{file-explorer-BkeCo0w5.js → file-explorer-CWc8jnpt.js} +1 -1
- package/dist/client/assets/{file-preview-E6rw-EuT.js → file-preview-DAmEXgR_.js} +1 -1
- package/dist/client/assets/{file-share-button-B1vZE_M4.js → file-share-button-xSfhcPPB.js} +1 -1
- package/dist/client/assets/{file-type-icon-B1y9alSP.js → file-type-icon-CdJziZKk.js} +1 -1
- package/dist/client/assets/{folder-icon-BtshgjPb.js → folder-icon-B-DOdGRA.js} +1 -1
- package/dist/client/assets/{form-BRcoMCQk.js → form-Bw33z1SA.js} +1 -1
- package/dist/client/assets/{gateway-client-D1O6ejnK.js → gateway-client-CrkEu4dZ.js} +1 -1
- package/dist/client/assets/{general-BOoOjY19.js → general-CQVoP6Bh.js} +1 -1
- package/dist/client/assets/{github-icon-C3pcNerU.js → github-icon-CfXQNl0v.js} +1 -1
- package/dist/client/assets/{home-bhScUN9z.js → home-BLWvCsHm.js} +1 -1
- package/dist/client/assets/hooks-BEXBCk9z.js +2 -0
- package/dist/client/assets/{hooks-CGvBDr23.js → hooks-DgdsVzEA.js} +1 -1
- package/dist/client/assets/{icon-button-B293RRtv.js → icon-button-DYZouDqo.js} +1 -1
- package/dist/client/assets/{index-26qOHGKB.js → index-9o3jDog2.js} +1 -1
- package/dist/client/assets/{index-CzNCoaYS.js → index-BQHnqw3U.js} +1 -1
- package/dist/client/assets/{index-Bnz61WBS.js → index-CNDyHqLd.js} +1 -1
- package/dist/client/assets/{index-CqivxnmP.js → index-COA9taIA.js} +1 -1
- package/dist/client/assets/{index-DZmLHQw7.js → index-CUrCXCxK.js} +1 -1
- package/dist/client/assets/{index-DM-wOMU-.js → index-CeBCCoZB.js} +1 -1
- package/dist/client/assets/{index-DUYXZx_q.js → index-DB2dtavd.js} +1 -1
- package/dist/client/assets/{index-CWaAUsIH.js → index-DKa2AY2P.js} +1 -1
- package/dist/client/assets/{index-KNPlu-mw.js → index-J-HhaIRe.js} +2 -2
- package/dist/client/assets/index-L3ADEseX.js +5 -0
- package/dist/client/assets/{index-Bpy9PU2z.js → index-RQ433UOD.js} +1 -1
- package/dist/client/assets/{index-BlwlTJtx.js → index-b-HPQtaV.js} +1 -1
- package/dist/client/assets/{index-4eUstHLE.js → index-mhmcAxUW.js} +1 -1
- package/dist/client/assets/{index-oypwdcf2.js → index-oMcUL3Yj.js} +1 -1
- package/dist/client/assets/{index-redirect-CkLeqvOA.js → index-redirect-BcnCuUFG.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BZK90Cxs.js → infiniteQueryObserver-Bp62E0f5.js} +1 -1
- package/dist/client/assets/{infra-billing-CEhwSjdZ.js → infra-billing-BCRjskqP.js} +1 -1
- package/dist/client/assets/{input-DjkopZxD.js → input-BwB4jnj_.js} +1 -1
- package/dist/client/assets/{input-G3Dl_oju.js → input-D5ksR5GW.js} +1 -1
- package/dist/client/assets/{input-DOrXBQ2N.js → input-Dr3S5ak1.js} +1 -1
- package/dist/client/assets/{integration-icon-BJ-L2RLP.js → integration-icon-9SSN9Dl9.js} +1 -1
- package/dist/client/assets/{label-BNPzApUK.js → label-CjHJo36P.js} +1 -1
- package/dist/client/assets/last-preview-page-kpd1zNQa.js +1 -0
- package/dist/client/assets/{layout-DkVA_1ZE.js → layout-BeJYnmuf.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BC6rxEUp.js → legacy-agents-deep-DrKJ1wEq.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BNDQG9mN.js → legacy-main-redirect-WAZbVTnq.js} +1 -1
- package/dist/client/assets/{library-BLff67UU.js → library-4bJ2rmQt.js} +1 -1
- package/dist/client/assets/{login-CSMeXlfe.js → login-BWMwZVUY.js} +1 -1
- package/dist/client/assets/{markdown-C8T5ITiF.js → markdown-DN_WHoBa.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CMzraocc.js → mcp-app-renderer-BDiTxwS7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dwgx5guo.js → mcp-oauth-Cfvqr8fE.js} +1 -1
- package/dist/client/assets/{members-DzWhX5uD.js → members-BOQXIgtZ.js} +1 -1
- package/dist/client/assets/{message-templates-BVo4ZI-W.js → message-templates-F1a4WGkX.js} +1 -1
- package/dist/client/assets/{mini-report-page-Erf27AS0.js → mini-report-page-ol1xCTtf.js} +1 -1
- package/dist/client/assets/{mock-board-CExGmBZQ.js → mock-board-CcJYFRSI.js} +3 -3
- package/dist/client/assets/{monaco-editor-Ccpjx5-K.js → monaco-editor-BSp0HKdn.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-ol2vQzvk.js → monitoring-stats-row-B07R3XRH.js} +1 -1
- package/dist/client/assets/{multi-select-ck6tvIBS.js → multi-select-TwgloS8r.js} +1 -1
- package/dist/client/assets/{mustache-BuJC9i7P.js → mustache-CVWbGRah.js} +1 -1
- package/dist/client/assets/{oauth-callback-Br33YNZk.js → oauth-callback-CvPKF6HM.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bc7GNP8T.js → oauth-callback-ai-provider-COFdHrZu.js} +1 -1
- package/dist/client/assets/{onboarding-Dn4ZbQh-.js → onboarding-DrAKPbzp.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-B5nMpWQk.js → optimistic-project-sidebar-views-0t3BJG6O.js} +1 -1
- package/dist/client/assets/{org-file-open-context-utbnY1tD.js → org-file-open-context-DLYT0cgI.js} +1 -1
- package/dist/client/assets/{organization-choice-B00-ogHL.js → organization-choice-DRI0Xf93.js} +1 -1
- package/dist/client/assets/{orgs-BmIFwz6f.js → orgs-DajJVdOr.js} +1 -1
- package/dist/client/assets/{page-seo-form-CTsl5oez.js → page-seo-form-D9MSqhdC.js} +1 -1
- package/dist/client/assets/pair-CU2rNVlM.js +47 -0
- package/dist/client/assets/{plan-ladder-SJELPXMo.js → plan-ladder-CLfe96p7.js} +1 -1
- package/dist/client/assets/{popover-dCy-7dpE.js → popover-CqiAzy6q.js} +1 -1
- package/dist/client/assets/{post-calendar-7Z8CrNzs.js → post-calendar-BbL2q81W.js} +1 -1
- package/dist/client/assets/{post-editor-SR_NBmM2.js → post-editor-BjAlLIBX.js} +1 -1
- package/dist/client/assets/{preview-content-N6itSIXn.js → preview-content-BEgqvROI.js} +1 -1
- package/dist/client/assets/{preview-dialog-B5LMzCtj.js → preview-dialog-C1_XqXvf.js} +1 -1
- package/dist/client/assets/{primitives-BTIInGe8.js → primitives-CenJalqY.js} +1 -1
- package/dist/client/assets/{profile-HfhNtjYj.js → profile-Dbwp1FZf.js} +1 -1
- package/dist/client/assets/{project-app-view-Bzzo3THn.js → project-app-view-BVaAiMcz.js} +1 -1
- package/dist/client/assets/{project-feed-DqYxfGlw.js → project-feed-Dvl8n7rc.js} +1 -1
- package/dist/client/assets/{project-icon-ble1qRVZ.js → project-icon-CrCdaVr_.js} +1 -1
- package/dist/client/assets/project-reports-Drc1KzOQ.js +1 -0
- package/dist/client/assets/project-tasks-DwGCPJ6m.js +1 -0
- package/dist/client/assets/{prompts-1PHuUnvr.js → prompts-EXj1sy5I.js} +1 -1
- package/dist/client/assets/record-editor-BOZo1ZUq.js +1 -0
- package/dist/client/assets/{redirect-editor-5DSn8iED.js → redirect-editor-pNWBdqg6.js} +1 -1
- package/dist/client/assets/registry-DsNzo3hF.js +2 -0
- package/dist/client/assets/{registry-layout-CfHzR3q0.js → registry-layout-B4sWausW.js} +1 -1
- package/dist/client/assets/reports-CzR_Cwbv.js +1 -0
- package/dist/client/assets/{reports-gonIp6j-.js → reports-D-pqorfM.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DJytBMSN.js → reports-onboarding-Gfw31-tC.js} +1 -1
- package/dist/client/assets/{reports-tab-RQ6xFPYf.js → reports-tab-CWRt3rcI.js} +2 -2
- package/dist/client/assets/{repositories-Doc5GKmt.js → repositories-Cq6sMn55.js} +1 -1
- package/dist/client/assets/{repository-import-picker-oikqMepd.js → repository-import-picker-C-n4lBHF.js} +1 -1
- package/dist/client/assets/{repository-picker-BbQ9GWzI.js → repository-picker-CaYH5503.js} +1 -1
- package/dist/client/assets/{require-capability-CWlzsbP1.js → require-capability-D2eRS8Ds.js} +1 -1
- package/dist/client/assets/{required-auth-layout-tnG7yvfo.js → required-auth-layout-BKb9-6vC.js} +1 -1
- package/dist/client/assets/{reset-password-Dv9Sm-TM.js → reset-password-BvVXhylp.js} +1 -1
- package/dist/client/assets/{resizable-CLWvSa8l.js → resizable-Bt98DGlm.js} +1 -1
- package/dist/client/assets/{review-settings-CqPPZdUH.js → review-settings-CuVB3EmJ.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-DktDEZvw.js → rich-text-link-control-N5yQ4FMB.js} +1 -1
- package/dist/client/assets/{roles-BX-6nyqV.js → roles-BO1lFKQs.js} +1 -1
- package/dist/client/assets/{route-Cc6xSIHm.js → route-BP1JkGvW.js} +1 -1
- package/dist/client/assets/{route-CrW6LD3i.js → route-CR7kiBqv.js} +1 -1
- package/dist/client/assets/{route-page-header-q5ywKM-B.js → route-page-header-fPq-qE7U.js} +1 -1
- package/dist/client/assets/{route-B17vf220.js → route-woaISgz4.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Bx0_mYjr.js → runnable-block-editor-xiAEogpy.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CTwoR9w6.js → sandbox-lifecycle-context-CmeEs8uW.js} +2 -2
- package/dist/client/assets/{schema-BYcOOzAH.js → schema-BmTPXP0h.js} +1 -1
- package/dist/client/assets/{scroll-area-CdvrDMMb.js → scroll-area-D72_bYX-.js} +1 -1
- package/dist/client/assets/{search-input-C9yfeCwz.js → search-input-DVbLXCEj.js} +1 -1
- package/dist/client/assets/{search-toggle-Bk4rVG35.js → search-toggle-B8-QCzR2.js} +1 -1
- package/dist/client/assets/{secrets-DPNbUb00.js → secrets-D9w8WJUH.js} +1 -1
- package/dist/client/assets/{sections-editor-sY9S19M_.js → sections-editor-bQYiNQsv.js} +1 -1
- package/dist/client/assets/{select-model-CWkmZhPO.js → select-model-BUKfjbeY.js} +1 -1
- package/dist/client/assets/{select-DyXGk9B4.js → select-zKx4kd1b.js} +1 -1
- package/dist/client/assets/{seo-editor-vD4a5QRa.js → seo-editor-C1rg2ivT.js} +1 -1
- package/dist/client/assets/{separator-DULnL_Lr.js → separator-DIK9oMBk.js} +1 -1
- package/dist/client/assets/{settings-tab-D8ZRyTJD.js → settings-tab-DnH50j1e.js} +1 -1
- package/dist/client/assets/{sheet-CY7dL-f7.js → sheet-CCy35_-v.js} +1 -1
- package/dist/client/assets/shell-layout-Dj-jZ6jC.js +1 -0
- package/dist/client/assets/{sidebar-oesDPvHN.js → sidebar-Y-jcWrzw.js} +1 -1
- package/dist/client/assets/{skill-preview-Cqk_qZk7.js → skill-preview-DAUvP3iZ.js} +1 -1
- package/dist/client/assets/{skills-D4iqqvg0.js → skills-DQx9g0Gz.js} +1 -1
- package/dist/client/assets/{sso--sqekILC.js → sso-DkSKjhD5.js} +1 -1
- package/dist/client/assets/{store-B4n1tIh8.js → store-D-H_X08C.js} +1 -1
- package/dist/client/assets/store-registry-osFeoz0Q.js +2 -0
- package/dist/client/assets/{switch-Cj3JbezF.js → switch-BTJnoG_j.js} +1 -1
- package/dist/client/assets/{synced-repos-BppMvTdd.js → synced-repos-05MD6I3R.js} +1 -1
- package/dist/client/assets/{table-DuYwpMSZ.js → table-J6_odvOq.js} +1 -1
- package/dist/client/assets/{tabs-AYKphigN.js → tabs-DNRDoJPn.js} +1 -1
- package/dist/client/assets/{task-board-BJKHiKMb.js → task-board-BRDQJ0Y_.js} +1 -1
- package/dist/client/assets/{task-route-BUhSFrl8.js → task-route-D9j1p6oU.js} +1 -1
- package/dist/client/assets/{task-status-CDRALfAE.js → task-status-3HWFI1qu.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DL1GEMDG.js +1 -0
- package/dist/client/assets/{tasks-DlTKKD4m.js → tasks-Bi0sW-D0.js} +1 -1
- package/dist/client/assets/tasks-dBux8yBe.js +1 -0
- package/dist/client/assets/{textarea-BSGNz7Jp.js → textarea-IiEjpID3.js} +1 -1
- package/dist/client/assets/{thread-button-Cd01lRtU.js → thread-button-uDLbMetB.js} +1 -1
- package/dist/client/assets/{thread-intent-C0i7ITMJ.js → thread-intent-DeoW4DlO.js} +1 -1
- package/dist/client/assets/{thread-route-DVEbK22y.js → thread-route-BJtUmhwW.js} +1 -1
- package/dist/client/assets/{thread-route-6CnywxO1.js → thread-route-Cb0bjsjK.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-q2p0tLoV.js → thread-sheet-body-BZaEC0cb.js} +1 -1
- package/dist/client/assets/{toggle-group-D03c7W4C.js → toggle-group-2-AJ4PX8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BB-RYDbU.js → toolbar-icon-button-BNr0uvrm.js} +1 -1
- package/dist/client/assets/{tooltip-6YWTYe8Z.js → tooltip-CvsJoQ2r.js} +1 -1
- package/dist/client/assets/{track-B5_ADi8n.js → track-B9OWK61W.js} +1 -1
- package/dist/client/assets/{types-OwCEy2wn.js → types-DBvOp03a.js} +1 -1
- package/dist/client/assets/{usage-stats-BQjc_u1o.js → usage-stats-zzlmS7nl.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CkZuKbv6.js → use-ai-providers-C5aBXU5x.js} +1 -1
- package/dist/client/assets/{use-automations-Q_CO2GvT.js → use-automations-CHCA-LyE.js} +1 -1
- package/dist/client/assets/{use-autosave-DnT7v4ff.js → use-autosave-BjqzqGH1.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DFWku9NL.js → use-connect-companion-D7rIWDjo.js} +1 -1
- package/dist/client/assets/{use-connection-Z5_xgR0n.js → use-connection-BVWLSIgG.js} +1 -1
- package/dist/client/assets/{use-copy-Du2OqzJD.js → use-copy-B-yVF-T4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DFwp9L_l.js → use-create-virtual-mcp-B8c170Z7.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Ce9kSBH6.js → use-date-fns-locale-tVWkgiye.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CAzJuChS.js → use-debounced-autosave-BedmTE3a.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Jwy4Op50.js → use-debounced-value-RCOUyhbk.js} +1 -1
- package/dist/client/assets/{use-deco-credits-bCsf8wb-.js → use-deco-credits-CNT8sgKc.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B2WyR_4j.js → use-decopilot-events-Yer_uM_S.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dbm-NAPN.js → use-delete-connection-DeItobW_.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-tYT6ayL8.js → use-deployment-admin-CHH8IV6l.js} +1 -1
- package/dist/client/assets/{use-entitlements-16736vo7.js → use-entitlements-z0zlslXa.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Cf2HoPdQ.js → use-fast-preview-draft-url-DGs-WRxv.js} +1 -1
- package/dist/client/assets/{use-file-configs-jr-AKsZr.js → use-file-configs-DpTBLkPU.js} +1 -1
- package/dist/client/assets/{use-in-settings-BXgFOjEv.js → use-in-settings-CDLV44q3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BBN20wyF.js → use-infinite-scroll-Ch9lEd3E.js} +1 -1
- package/dist/client/assets/{use-join-requests-CADNjxk_.js → use-join-requests-BDFPEBoJ.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-D3DK53Jg.js → use-main-panel-tabs-OW5hqyvj.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CkFg4uDS.js → use-mcp-auth-status-BSJCGmmd.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D8sgAyd7.js → use-mcp-client-mvmVY_Sq.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-qJI6NP5I.js → use-mcp-prompts-D4-Z04dj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-LnuBfZxX.js → use-mcp-tools-C7FpW5Rr.js} +1 -1
- package/dist/client/assets/{use-members-DMybc-jf.js → use-members-CZXSXw_1.js} +1 -1
- package/dist/client/assets/use-mobile-BtQeDX-z.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-Btd4glDa.js → use-navigate-to-agent-BiSNiCre.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-oyN5rwDH.js → use-open-billing-url-BLr1QHHh.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BgCrq60T.js → use-org-auth-client-BznOfNJb.js} +1 -1
- package/dist/client/assets/{use-org-fs-DNivrKYm.js → use-org-fs-Cl4AAfEE.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BqG-Ct4U.js → use-org-repo-syncs-CPZxqDW-.js} +1 -1
- package/dist/client/assets/{use-org-sso-aX2n03MK.js → use-org-sso-Cb8Yn6yP.js} +1 -1
- package/dist/client/assets/{use-organization-roles-SL4NCyLF.js → use-organization-roles-jofIoo_T.js} +1 -1
- package/dist/client/assets/{use-organization-settings-d11qialw.js → use-organization-settings-C1FltOgT.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BhNw8w3-.js → use-panel-navigate-CXz4fRn5.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BIllRCZd.js → use-project-native-view-presence-3yl9GAt2.js} +1 -1
- package/dist/client/assets/{use-project-scope-Bqrah9gL.js → use-project-scope-Dd3XRNTj.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DJjqdm_N.js → use-registry-connections-DtQgEcVS.js} +1 -1
- package/dist/client/assets/{use-releases-cI15edZo.js → use-releases-CvqcA-kL.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Dls9CIPR.js → use-reports-diagnostic-CWgd-3_g.js} +1 -1
- package/dist/client/assets/{use-route-default-main-61CcsYHa.js → use-route-default-main-CPQ4AmO4.js} +1 -1
- package/dist/client/assets/{use-secrets-_aQ4eduQ.js → use-secrets-q0A46oGN.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-TCHkeVlX.js → use-section-preview-base-B_9x3Nht.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CF7nbb0R.js → use-session-runtime-DQ_xnOm6.js} +1 -1
- package/dist/client/assets/{use-tags-Da6Vtqtg.js → use-tags-CYAPfYQP.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DIW8PS7P.js → use-task-board-analytics-DLlgZnFs.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DgSd05Xp.js → use-task-metadata-D7elYoD_.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Bud7gKP9.js → use-thread-outputs-CVc4ZTLK.js} +1 -1
- package/dist/client/assets/{use-view-mode-34R7b13C.js → use-view-mode-oN14Hv6M.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DbDHdgfs.js → use-virtual-mcp-TYMfCW-P.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DUvEi5Ym.js +1 -0
- package/dist/client/assets/{useQueries-CqKcrUhq.js → useQueries-CX0az6_Q.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CC7Cv3nZ.js +1 -0
- package/dist/client/assets/{users-BllbljO6.js → users--BORUDmN.js} +1 -1
- package/dist/client/assets/{utils-Bs6K3de2.js → utils-eMZKRHuP.js} +1 -1
- package/dist/client/assets/{variant-calendar-DazMtkTu.js → variant-calendar-7T7b5EH_.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BhkorglB.js → variant-matcher-override-Dko4GZ86.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BTaPLgCL.js → view-mode-toggle-D3ebQ5N9.js} +1 -1
- package/dist/client/assets/{virtual-mcp-xuV5EK37.js → virtual-mcp-oulMbZvO.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +34 -34
- package/dist/server/server.js +35 -35
- package/package.json +1 -1
- package/dist/client/assets/agent-app-SrybpRP1.js +0 -1
- package/dist/client/assets/agent-deck-DC1HfpFF.js +0 -1
- package/dist/client/assets/agent-file-CZxInd8z.js +0 -1
- package/dist/client/assets/agent-library-file-BRFNvj1-.js +0 -1
- package/dist/client/assets/agent-settings-DJ9iDT7J.js +0 -1
- package/dist/client/assets/agent-site-editor-code-6rjr4RZ0.js +0 -2
- package/dist/client/assets/agent-view-B2auQi0S.js +0 -1
- package/dist/client/assets/ai-providers-pKZ30Kec.js +0 -6
- package/dist/client/assets/api-keys-BYpAQK8B.js +0 -1
- package/dist/client/assets/app-editor-DRHO2WYZ.js +0 -1
- package/dist/client/assets/category-editor-DWsxrZD0.js +0 -1
- package/dist/client/assets/hooks-4Ot6kWFv.js +0 -2
- package/dist/client/assets/index-Dx7v6J2e.js +0 -5
- package/dist/client/assets/last-preview-page-C_BiYWEQ.js +0 -1
- package/dist/client/assets/pair-BtIrWjTl.js +0 -47
- package/dist/client/assets/project-reports-BnF1p0_p.js +0 -1
- package/dist/client/assets/project-tasks-CtH35uDO.js +0 -1
- package/dist/client/assets/record-editor-C1uQSW5J.js +0 -1
- package/dist/client/assets/registry-Byv2lHYM.js +0 -2
- package/dist/client/assets/reports-CaEHck5d.js +0 -1
- package/dist/client/assets/shell-layout-b9tZGlO9.js +0 -1
- package/dist/client/assets/store-registry-DVhCfkop.js +0 -2
- package/dist/client/assets/taskboard-analytics-OI4dYuZ5.js +0 -1
- package/dist/client/assets/tasks-DzgNEDWV.js +0 -1
- package/dist/client/assets/use-mobile-CJNxNPMt.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CvudKG90.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-gwkPIfeQ.js +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{c as he,r as de,d as ms,a0 as kt,b as Ve,j as t,B as ge,t as dt,a9 as ts,l as Ue,a6 as us,K as bt,m as Bt,T as Qs,eM as Fs,h as Xs,u as Ws,n as vt,E as Ys,q as ss,z as Zs,W as el}from"./index-J-HhaIRe.js";import{S as tl}from"./search-input-DVbLXCEj.js";import{E as es}from"./empty-state-DekE7Ie6.js";import{R as sl}from"./require-capability-D2eRS8Ds.js";import{f as Ss}from"./pair-CU2rNVlM.js";import{u as is}from"./use-connection-BVWLSIgG.js";import{g as Os}from"./connection-slug-CITJ0kGN.js";import{B as Et}from"./badge-CzCkyB-y.js";import{P as Jt,a as Gt,b as Qt}from"./popover-CqiAzy6q.js";import{c as Ot,T as $t,a as zt,b as ll}from"./tooltip-CvsJoQ2r.js";import{a as Wt}from"./Copy01-BaJ5hTZ2.js";import{n as Is}from"./Download01-CGyaU6cf.js";import{i as fs,n as At}from"./Tool02-Bo-RIY8d.js";import{i as rl}from"./Key01-D0TscG0E.js";import{i as ol}from"./Play-CU4Q1GTp.js";import{bh as il,Q as nl,ac as al,x as cl}from"./agent-icon-D496OkeL.js";import{M as Ts}from"./monaco-editor-BSp0HKdn.js";import{a as dl}from"./use-members-CZXSXw_1.js";import{u as ml}from"./use-mcp-client-mvmVY_Sq.js";import{b as ul}from"./use-virtual-mcp-TYMfCW-P.js";import{c as fl}from"./XClose-wzn6XIaq.js";import{s as xl}from"./Plus-D3XzoCF3.js";import{s as pl}from"./Trash01-CRCUnlT2.js";import{I as Ht}from"./input-D5ksR5GW.js";import{M as qt}from"./multi-select-TwgloS8r.js";import{b as wt,a as yt,c as Ee,d as St,S as It}from"./select-zKx4kd1b.js";import{S as gl}from"./scroll-area-D72_bYX-.js";import{t as Zt,n as ns}from"./ChevronUp-DSgAhhLJ.js";import{C as hl}from"./calendar-Bs8TzhBE.js";import{T as vl}from"./textarea-IiEjpID3.js";import{C as $s}from"./collection-tabs-BxNdQr3v.js";import{S as jl}from"./switch-BTJnoG_j.js";import{L as Nl}from"./label-CjHJo36P.js";import{I as Tt}from"./integration-icon-9SSN9Dl9.js";import{A as xs}from"./avatar-PPm_nVJO.js";import{a as bl,b as wl,A as yl}from"./alert-CIymKwzl.js";import{K as ht}from"./monitoring-stats-row-B07R3XRH.js";import{b as zs}from"./use-entitlements-z0zlslXa.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-BZaEC0cb.js";import{u as _l}from"./useSuspenseInfiniteQuery-CC7Cv3nZ.js";import{c as Ll,S as Rl,b as Es,a as As}from"./sheet-CCy35_-v.js";import{c as Ae,b as Ut,d as hs,e as vs,T as je,a as js}from"./table-J6_odvOq.js";import{u as Us,A as Pl}from"./automation-runs-DoA8WvHT.js";import{u as Vs}from"./use-infinite-scroll-Ch9lEd3E.js";import{u as Fl}from"./useInfiniteQuery-DUvEi5Ym.js";import{g as Ol}from"./task-status-3HWFI1qu.js";import{u as $l,d as zl}from"./use-automations-CHCA-LyE.js";import"./SearchMd-DWKZ-mHQ.js";import"./access-gate-C6A3nRFO.js";import"./capability-load-error-qgxNzLRH.js";import"./Stars01-BZHqW_f9.js";import"./ArrowRight-BOJ1d9xj.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CL_tV3Eh.js";import"./use-copy-B-yVF-T4.js";import"./usage-stats-zzlmS7nl.js";import"./markdown-DN_WHoBa.js";import"./dialog-DTxKdk6B.js";import"./X-BGniQsFS.js";import"./ZoomOut-CDTxnLh4.js";import"./org-file-open-context-DLYT0cgI.js";import"./use-mobile-BtQeDX-z.js";import"./use-panel-navigate-CXz4fRn5.js";import"./thread-route-BJtUmhwW.js";import"./use-project-scope-Dd3XRNTj.js";import"./github-repo-BknN0SVI.js";import"./chat-context-C7f3MLVZ.js";import"./autosend-CgAy_8nv.js";import"./thread-intent-DeoW4DlO.js";import"./slugify-CEUa2lfQ.js";import"./hooks-DgdsVzEA.js";import"./backoff-8mStPHYB.js";import"./task-board-BRDQJ0Y_.js";import"./schema-BmTPXP0h.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-C5aBXU5x.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Yer_uM_S.js";import"./use-organization-settings-C1FltOgT.js";import"./shell-layout-Dj-jZ6jC.js";import"./Globe04-Cx7GY3vn.js";import"./SearchLg-BYoLM1MK.js";import"./download-app-dialog-B_OO5bFO.js";import"./CheckCircle-Bw2G2vwj.js";import"./Monitor01-Dentn30o.js";import"./Zap-BHpOc94D.js";import"./Share07-o5jM3q0c.js";import"./Settings02-BqG3HPm0.js";import"./command-Dp_xVMno.js";import"./index-9o3jDog2.js";import"./project-icon-CrCdaVr_.js";import"./required-auth-layout-BKb9-6vC.js";import"./use-org-sso-Cb8Yn6yP.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BDiTxwS7.js";import"./types-DBvOp03a.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-CrkEu4dZ.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./AlertCircle-CGFLJpTs.js";import"./Eye-DXecVoiS.js";import"./Tool01-CE_c59RR.js";import"./Image01-B5ab_A88.js";import"./LinkExternal01-BfutJB7X.js";import"./Palette-DbXyfbJI.js";import"./use-navigate-to-agent-BiSNiCre.js";import"./Link01-Dx7hRSe5.js";import"./use-mcp-prompts-D4-Z04dj.js";import"./index-oMcUL3Yj.js";import"./form-Bw33z1SA.js";import"./Globe01-BWcV-98b.js";import"./use-thread-outputs-CVc4ZTLK.js";import"./file-type-icon-CdJziZKk.js";import"./index-DB2dtavd.js";import"./ArrowUp-C1pJvrX2.js";import"./ArrowLeft-DC5XoBuA.js";import"./TrendUp01-B5hqDidz.js";import"./UserSquare-CEWYtKNG.js";import"./CreditCard01-DLxXT7_f.js";import"./DotsVertical-Cz_1rDcG.js";import"./LayoutLeft-d27AQAwl.js";import"./Sun-DGhoQy96.js";import"./Package-CPNFyhMT.js";import"./Upload01-Bl2MpUhj.js";import"./User01-3GLc_M8a.js";import"./Users01-DZ2aEDSy.js";import"./XCircle-CLEbTtoV.js";import"./editor-DpRJQ9mq.js";import"./use-org-auth-client-BznOfNJb.js";import"./auth-3KEna5Qg.js";import"./checkbox-Djw8YkXF.js";import"./chart-CSB0FjAw.js";import"./index-mhmcAxUW.js";import"./CartesianChart-yTuaWbdE.js";import"./AreaChart-a82Hhsmi.js";import"./ErrorBarContext-H3WwZUjL.js";import"./Sector-DH8uTs0D.js";import"./infiniteQueryObserver-Bp62E0f5.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]=de.useState(!1),[i,x]=de.useState(!1),u=ms(),{org:m}=kt(),r=Ve(),g=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 y;e[4]!==l.id||e[5]!==l.input||e[6]!==l.output||e[7]!==l.toolName?(y=ve=>{const pe=n(ve==="input"?l.input:l.output),we=new Blob([pe],{type:"application/json"}),De=URL.createObjectURL(we),Ce=document.createElement("a");Ce.href=De,Ce.download=`${l.toolName}-${ve}-${l.id}.json`,Ce.click(),URL.revokeObjectURL(De)},e[4]=l.id,e[5]=l.input,e[6]=l.output,e[7]=l.toolName,e[8]=y):y=e[8];const h=y;let w;e[9]!==g||e[10]!==l.connectionId||e[11]!==l.input||e[12]!==l.toolName||e[13]!==u||e[14]!==m||e[15]!==r?(w=()=>{const ve=g.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]=g,e[10]=l.connectionId,e[11]=l.input,e[12]=l.toolName,e[13]=u,e[14]=m,e[15]=r,e[16]=w):w=e[16];const D=w,[d,_]=de.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 I=j,N="text-sm px-5 md:px-6 py-5 space-y-5";let k;e[22]!==r?(k=r("monitoring.types.timestamp"),e[22]=r,e[23]=k):k=e[23];let T;e[24]!==k?(T=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:k}),e[24]=k,e[25]=T):T=e[25];let C;e[26]!==I?(C=t.jsx("div",{className:"text-sm text-foreground",children:I}),e[26]=I,e[27]=C):C=e[27];let A;e[28]!==T||e[29]!==C?(A=t.jsxs("div",{children:[T,C]}),e[28]=T,e[29]=C,e[30]=A):A=e[30];let O;e[31]!==r?(O=r("monitoring.types.duration"),e[31]=r,e[32]=O):O=e[32];let H;e[33]!==O?(H=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:O}),e[33]=O,e[34]=H):H=e[34];let U;e[35]!==l.durationMs?(U=t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]}),e[35]=l.durationMs,e[36]=U):U=e[36];let z;e[37]!==H||e[38]!==U?(z=t.jsxs("div",{children:[H,U]}),e[37]=H,e[38]=U,e[39]=z):z=e[39];let M;e[40]!==r?(M=r("monitoring.types.user"),e[40]=r,e[41]=M):M=e[41];let L;e[42]!==M?(L=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:M}),e[42]=M,e[43]=L):L=e[43];let F;e[44]!==l.userName?(F=t.jsx("div",{className:"text-sm text-foreground",children:l.userName}),e[44]=l.userName,e[45]=F):F=e[45];let B;e[46]!==L||e[47]!==F?(B=t.jsxs("div",{children:[L,F]}),e[46]=L,e[47]=F,e[48]=B):B=e[48];let V;e[49]!==l.virtualMcpName||e[50]!==r?(V=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]=V):V=e[51];let W;e[52]!==r?(W=r("monitoring.types.requestId"),e[52]=r,e[53]=W):W=e[53];let E;e[54]!==W?(E=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:W}),e[54]=W,e[55]=E):E=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 K;e[58]!==r?(K=r("monitoring.types.copyRequestId"),e[58]=r,e[59]=K):K=e[59];let R;e[60]!==d?(R=d?t.jsx(ts,{size:12}):t.jsx(Wt,{size:12}),e[60]=d,e[61]=R):R=e[61];let P;e[62]!==p||e[63]!==K||e[64]!==R?(P=t.jsx(ge,{size:"icon",variant:"ghost",onClick:p,"aria-label":K,className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:R}),e[62]=p,e[63]=K,e[64]=R,e[65]=P):P=e[65];let te;e[66]!==G||e[67]!==P?(te=t.jsxs("div",{className:"flex items-center gap-1",children:[G,P]}),e[66]=G,e[67]=P,e[68]=te):te=e[68];let q;e[69]!==E||e[70]!==te?(q=t.jsxs("div",{children:[E,te]}),e[69]=E,e[70]=te,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 X;e[75]!==l.properties||e[76]!==u||e[77]!==m||e[78]!==r?(X=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 De={key:pe,operator:"eq",value:we};u({to:"/$org/settings/monitor",params:{org:m.slug},search:{propertyFilters:jt([De])}})},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]=X):X=e[79];let Y;e[80]!==A||e[81]!==z||e[82]!==B||e[83]!==V||e[84]!==q||e[85]!==J||e[86]!==X?(Y=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[A,z,B,V,q,J,X]}),e[80]=A,e[81]=z,e[82]=B,e[83]=V,e[84]=q,e[85]=J,e[86]=X,e[87]=Y):Y=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 fe="space-y-4";let Z;e[91]!==r?(Z=r("monitoring.types.input"),e[91]=r,e[92]=Z):Z=e[92];let me;e[93]!==Z?(me=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:Z}),e[93]=Z,e[94]=me):me=e[94];const ae=v.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",Ss(v.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let ce;e[95]!==me||e[96]!==ae?(ce=t.jsxs("div",{className:"flex items-center gap-2",children:[me,ae]}),e[95]=me,e[96]=ae,e[97]=ce):ce=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 se;e[102]!==h||e[103]!==v||e[104]!==r?(se=v.isTruncated&&t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx(ge,{size:"icon",variant:"ghost",onClick:()=>h("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]=h,e[103]=v,e[104]=r,e[105]=se):se=e[105];let oe;e[106]!==a?(oe=()=>a("input"),e[106]=a,e[107]=oe):oe=e[107];let le;e[108]!==r?(le=r("monitoring.types.copyInput"),e[108]=r,e[109]=le):le=e[109];let ne;e[110]!==o?(ne=o?t.jsx(ts,{size:14}):t.jsx(Wt,{size:14}),e[110]=o,e[111]=ne):ne=e[111];let xe;e[112]!==oe||e[113]!==le||e[114]!==ne?(xe=t.jsx(ge,{size:"icon",variant:"ghost",onClick:oe,"aria-label":le,className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:ne}),e[112]=oe,e[113]=le,e[114]=ne,e[115]=xe):xe=e[115];let $;e[116]!==re||e[117]!==se||e[118]!==xe?($=t.jsxs("div",{className:"flex items-center gap-1",children:[re,se,xe]}),e[116]=re,e[117]=se,e[118]=xe,e[119]=$):$=e[119];let ee;e[120]!==ce||e[121]!==$?(ee=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[ce,$]}),e[120]=ce,e[121]=$,e[122]=ee):ee=e[122];let ue;e[123]!==v?(ue=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]=ue):ue=e[124];let ie;e[125]!==ee||e[126]!==ue?(ie=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[ee,ue]})}),e[125]=ee,e[126]=ue,e[127]=ie):ie=e[127];const We="rounded-lg overflow-hidden border border-border",_e="flex items-center justify-between p-1 pl-4 border-b border-border",Le="flex items-center gap-2";let ye;e[128]!==r?(ye=r("monitoring.types.output"),e[128]=r,e[129]=ye):ye=e[129];let Re;e[130]!==ye?(Re=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:ye}),e[130]=ye,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 Se;e[132]!==Re||e[133]!==Pe?(Se=t.jsxs("div",{className:Le,children:[Re,Pe]}),e[132]=Re,e[133]=Pe,e[134]=Se):Se=e[134];let Fe;e[135]!==h||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:()=>h("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]=h,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 Me;e[141]!==r?(Me=r("monitoring.types.copyOutput"),e[141]=r,e[142]=Me):Me=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]!==Me||e[147]!==$e?(Ne=t.jsx(ge,{size:"icon",variant:"ghost",onClick:Oe,"aria-label":Me,className:"text-muted-foreground hover:text-foreground classic:rounded-lg h-8 w-8",children:$e}),e[145]=Oe,e[146]=Me,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 Ie;e[152]!==Se||e[153]!==be?(Ie=t.jsxs("div",{className:_e,children:[Se,be]}),e[152]=Se,e[153]=be,e[154]=Ie):Ie=e[154];let Te;e[155]!==f.content?(Te=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]=Te):Te=e[156];let ke;e[157]!==Ie||e[158]!==Te?(ke=t.jsx("div",{children:t.jsxs("div",{className:We,children:[Ie,Te]})}),e[157]=Ie,e[158]=Te,e[159]=ke):ke=e[159];let ze;e[160]!==ie||e[161]!==ke?(ze=t.jsxs("div",{className:fe,children:[ie,ke]}),e[160]=ie,e[161]=ke,e[162]=ze):ze=e[162];let Ke;return e[163]!==Y||e[164]!==Q||e[165]!==ze?(Ke=t.jsxs("div",{className:N,children:[Y,Q,ze]}),e[163]=Y,e[164]=Q,e[165]=ze,e[166]=Ke):Ke=e[166],Ke}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]=de.useState(!1),[m,r]=de.useState(()=>rs(s)),[g,v]=de.useState(),[f,n]=de.useState(!1),b=de.useRef(s);b.current!==s&&(b.current=s,f||r(rs(s)));const a=j=>{const I=j.target.value;r(I),v(void 0)},y=()=>{n(!0)},h=()=>{n(!1);const j=m.trim();if(qs(j)){v(void 0),e(j);return}const I=Gl(j);if(I){v(void 0),e(I.toISOString()),r(Kt(I));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)},w=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 k=j.toISOString();r(Kt(j)),e(k),v(void 0)}u(!1)},D=j=>{const[I,N]=j.target.value.split(":").map(Number),T=ct(s).date||new Date;T.setHours(I||0),T.setMinutes(N||0),T.setSeconds(0),T.setMilliseconds(0);const C=T.toISOString();r(Kt(T)),e(C)},d=ct(s),_=d.valid?d.date:new Date,S=_?`${String(_.getHours()).padStart(2,"0")}:${String(_.getMinutes()).padStart(2,"0")}`:"",p=i||g;return t.jsxs("div",{className:Ue("flex gap-1",o),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ht,{value:m,onChange:a,onFocus:y,onBlur:h,placeholder:l,disabled:c,className:Ue("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:w,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",[g,v]=de.useState(!1),[f,n]=de.useState(s.from),[b,a]=de.useState(s.to),[y,h]=de.useState(null),w=de.useRef({from:s.from,to:s.to});(w.current.from!==s.from||w.current.to!==s.to)&&(w.current={from:s.from,to:s.to},n(s.from),a(s.to));const D=p=>{w.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){h("Invalid 'From' date");return}if(!j.valid||!j.date){h("Invalid 'To' date");return}if(p.date>=j.date){h("'From' must be before 'To'");return}h(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:g,onOpenChange:v,children:[t.jsx(Gt,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:Ue("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:g?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"})]}),y&&t.jsx("p",{className:"text-xs text-destructive",children:y}),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:Ue("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 g;return l[9]!==e||l[10]!==x||l[11]!==r?(g={queryKey:x,queryFn:r,staleTime:3e4,retry:!1,...e},l[9]=e,l[10]=x,l[11]=r,l[12]=g):g=l[12],u(g)}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=Ue("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 g;e[6]!==m||e[7]!==r?(g=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]=g):g=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]!==g||e[12]!==v?(f=t.jsxs("div",{className:"flex items-start justify-between",children:[g,v]}),e[11]=g,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,g;if(e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==u||e[4]!==x||e[5]!==i){g=Symbol.for("react.early_return_sentinel");e:{const f=o??[],n=new Map(l.map(er));let b;e[9]!==c?(b=(y,h)=>{const w=Cs(y.metric,c);return Cs(h.metric,c)-w},e[9]=c,e[10]=b):b=e[10];const a=f.map(y=>({connection:y,metric:n.get(y.id)})).filter(Zl).sort(b).slice(0,4);if(a.length===0){g=null;break e}m="flex flex-col",r=a.map((y,h)=>{const{connection:w,metric:D}=y,d=i>0?(D.calls/i*100).toFixed(1):"0.0",_=c==="errors"?`${D.errorRate.toFixed(1)}%`:`${d}%`,S=h===a.length-1;return t.jsxs("div",{className:Ue("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(w)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Tt,{icon:w.icon,name:w.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:w.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)})]})]},w.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]=g}else m=e[6],r=e[7],g=e[8];if(g!==Symbol.for("react.early_return_sentinel"))return g;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 g;e[4]!==u?(g=(a,y)=>a+u(y),e[4]=u,e[5]=g):g=e[5];const v=l.reduce(g,0);let f,n;if(e[6]!==r||e[7]!==l||e[8]!==v||e[9]!==u){let a;e[12]!==u?(a=(w,D)=>u(D)-u(w),e[12]=u,e[13]=a):a=e[13];const y=[...l].sort(a).slice(0,4);f="flex flex-col";let h;e[14]!==r||e[15]!==v||e[16]!==u?(h=(w,D,d)=>{const _=u(w),S=v>0?(_/v*100).toFixed(1):"0.0",p=D===d.length-1;return t.jsxs("div",{className:Ue("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(w.toolName)} 18%, transparent)`},children:t.jsx(At,{size:14,style:{color:Ps(w.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:w.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(_)})]})]},w.toolName)},e[14]=r,e[15]=v,e[16]=u,e[17]=h):h=e[17],n=y.map(h),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=Ve();if(l.length===0){let h;e[0]!==i?(h=i("orgs.overview.noHeatmapData"),e[0]=i,e[1]=h):h=e[1];let w;return e[2]!==h?(w=t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:h}),e[2]=h,e[3]=w):w=e[3],w}let x,u,m,r,g,v,f,n;if(e[4]!==l||e[5]!==c||e[6]!==i||e[7]!==o){const{topTools:h,topAgentIds:w,cellMap:D,maxValue:d}=Tl(l,c,tr,sr);let _;e[16]!==i||e[17]!==o?(_=j=>j===""?i("orgs.overview.noAgent"):o.find(I=>I.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(${h.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],g=h.map(or),v=w.map(j=>t.jsxs(de.Fragment,{children:[t.jsx("div",{className:"text-xs text-muted-foreground truncate flex items-center pr-2",title:S(j),children:S(j)}),h.map(I=>{const N=D.get(`${j}::${I}`),k=N?.[c]??0;return t.jsxs(Ot,{children:[t.jsx($t,{asChild:!0,children:t.jsx("div",{className:Ue("aspect-square rounded-[2px]",lr(k,d))})}),t.jsx(zt,{children:i("orgs.overview.heatmapCellTooltip",{agent:S(j),tool:I,calls:N?.calls??0,errors:N?.errors??0,outputSize:Nt(N?.outputSize??0)})})]},I)})]},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]=g,e[13]=v,e[14]=f,e[15]=n}else x=e[8],u=e[9],m=e[10],r=e[11],g=e[12],v=e[13],f=e[14],n=e[15];let b;e[22]!==u||e[23]!==m||e[24]!==r||e[25]!==g||e[26]!==v?(b=t.jsxs("div",{className:u,style:m,children:[r,g,v]}),e[22]=u,e[23]=m,e[24]=r,e[25]=g,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 y;return e[31]!==x||e[32]!==n||e[33]!==a?(y=t.jsx(x,{delayDuration:n,children:a}),e[31]=x,e[32]=n,e[33]=a,e[34]=y):y=e[34],y}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:g,virtualMcpIds:v,virtualMcps:f}=s,n=Ve(),b=Sl(l),a=m?r:!1;let y;e[0]!==a?(y={refetchInterval:a},e[0]=a,e[1]=y):y=e[1];const{data:h,isError:w}=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},y);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:g?.length?g: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 I;e[13]!==a?(I={refetchInterval:a},e[13]=a,e[14]=I):I=e[14];const{data:N}=Yl(j,I),k=w||_,T=h?{totalCalls:h.totalCalls,totalErrors:h.totalErrors,avgDurationMs:h.avgDurationMs,p95DurationMs:h.p95DurationMs,data:ks(h.timeseries,l,b)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},C=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 A;e[15]!==d?.topTools?(A=d?.topTools??[],e[15]=d?.topTools,e[16]=A):A=e[16];const O=A,H=d?.totalInputTokens??0,U=d?.totalOutputTokens??0,z=d?.totalTokens??0,M=d?.totalCostUsd??0,L=zs();let F;e[17]!==h?.connectionBreakdown?(F=h?.connectionBreakdown??[],e[17]=h?.connectionBreakdown,e[18]=F):F=e[18];const B=F,[V,W]=de.useState("avg"),[E,G]=de.useState("calls");let K;e[19]!==k||e[20]!==n?(K=k&&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]=k,e[20]=n,e[21]=K):K=e[21];let R;e[22]!==n?(R=n("orgs.overview.toolCalls"),e[22]=n,e[23]=R):R=e[23];const P=T.totalCalls.toLocaleString(),te=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 X;e[28]!==E||e[29]!==N?.cells?(X=E==="calls"?(N?.cells??[]).reduce(ar,0).toLocaleString():Nt((N?.cells??[]).reduce(nr,0)),e[28]=E,e[29]=N?.cells,e[30]=X):X=e[30];let Y;e[31]===Symbol.for("react.memo_cache_sentinel")?(Y=at=>G(at),e[31]=Y):Y=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 fe;e[33]!==n?(fe=n("orgs.overview.heatmapMetricCalls"),e[33]=n,e[34]=fe):fe=e[34];let Z;e[35]!==fe?(Z=t.jsx(Ee,{value:"calls",children:fe}),e[35]=fe,e[36]=Z):Z=e[36];let me;e[37]!==n?(me=n("orgs.overview.heatmapMetricOutputSize"),e[37]=n,e[38]=me):me=e[38];let ae;e[39]!==me?(ae=t.jsx(Ee,{value:"outputSize",children:me}),e[39]=me,e[40]=ae):ae=e[40];let ce;e[41]!==Z||e[42]!==ae?(ce=t.jsxs(St,{children:[Z,ae]}),e[41]=Z,e[42]=ae,e[43]=ce):ce=e[43];let re;e[44]!==E||e[45]!==ce?(re=t.jsxs(It,{value:E,onValueChange:Y,children:[Q,ce]}),e[44]=E,e[45]=ce,e[46]=re):re=e[46];let se;e[47]!==N?.cells?(se=N?.cells??[],e[47]=N?.cells,e[48]=se):se=e[48];let oe;e[49]!==E||e[50]!==se||e[51]!==f?(oe=t.jsx(rr,{cells:se,virtualMcps:f,metric:E}),e[49]=E,e[50]=se,e[51]=f,e[52]=oe):oe=e[52];let le;e[53]!==J||e[54]!==X||e[55]!==re||e[56]!==oe?(le=t.jsx(mt,{title:J,value:X,action:re,children:oe}),e[53]=J,e[54]=X,e[55]=re,e[56]=oe,e[57]=le):le=e[57];let ne;e[58]!==n?(ne=n("orgs.overview.latency"),e[58]=n,e[59]=ne):ne=e[59];const xe=ls(V==="avg"?T.avgDurationMs:T.p95DurationMs);let $;e[60]===Symbol.for("react.memo_cache_sentinel")?($=at=>W(at),e[60]=$):$=e[60];let ee;e[61]===Symbol.for("react.memo_cache_sentinel")?(ee=t.jsx(wt,{className:"w-[120px]",children:t.jsx(yt,{})}),e[61]=ee):ee=e[61];let ue;e[62]!==n?(ue=n("orgs.overview.latencyAvg"),e[62]=n,e[63]=ue):ue=e[63];let ie;e[64]!==ue?(ie=t.jsx(Ee,{value:"avg",children:ue}),e[64]=ue,e[65]=ie):ie=e[65];let We;e[66]!==n?(We=n("orgs.overview.latencyP95"),e[66]=n,e[67]=We):We=e[67];let _e;e[68]!==We?(_e=t.jsx(Ee,{value:"p95",children:We}),e[68]=We,e[69]=_e):_e=e[69];let Le;e[70]!==ie||e[71]!==_e?(Le=t.jsxs(St,{children:[ie,_e]}),e[70]=ie,e[71]=_e,e[72]=Le):Le=e[72];let ye;e[73]!==V||e[74]!==Le?(ye=t.jsxs(It,{value:V,onValueChange:$,children:[ee,Le]}),e[73]=V,e[74]=Le,e[75]=ye):ye=e[75];const Re=T.data;let Pe;e[76]!==V||e[77]!==n?(Pe=n("orgs.overview.latencyAriaLabel",{type:V==="avg"?n("orgs.overview.average"):"P95"}),e[76]=V,e[77]=n,e[78]=Pe):Pe=e[78];let Se;e[79]!==n?(Se=n("orgs.overview.errors"),e[79]=n,e[80]=Se):Se=e[80];const Fe=T.totalErrors.toLocaleString(),Oe=T.data;let Me;e[81]!==n?(Me=n("orgs.overview.errorsAriaLabel"),e[81]=n,e[82]=Me):Me=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 Ie;e[88]===Symbol.for("react.memo_cache_sentinel")?(Ie=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[88]=Ie):Ie=e[88];let Te;e[89]!==be?(Te=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[$e,be,Ie]}),e[89]=be,e[90]=Te):Te=e[90];let ke;e[91]!==n?(ke=n("orgs.overview.aiCalls"),e[91]=n,e[92]=ke):ke=e[92];const ze=C.totalCalls.toLocaleString(),Ke=C.data;let ve;e[93]!==n?(ve=n("orgs.overview.aiCallsAriaLabel"),e[93]=n,e[94]=ve):ve=e[94];let pe;e[95]!==O?(pe=t.jsx(Vt,{models:O,mode:"calls"}),e[95]=O,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 De;e[99]!==z?(De=Nt(z),e[99]=z,e[100]=De):De=e[100];let Ce;e[101]!==H?(Ce=Nt(H),e[101]=H,e[102]=Ce):Ce=e[102];let He;e[103]!==n?(He=n("orgs.overview.tokensIn"),e[103]=n,e[104]=He):He=e[104];let qe;e[105]!==U?(qe=Nt(U),e[105]=U,e[106]=qe):qe=e[106];let Be;e[107]!==n?(Be=n("orgs.overview.tokensOut"),e[107]=n,e[108]=Be):Be=e[108];let Ye;e[109]!==Ce||e[110]!==He||e[111]!==qe||e[112]!==Be?(Ye=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[Ce," ",He," ·"," ",qe," ",Be]}),e[109]=Ce,e[110]=He,e[111]=qe,e[112]=Be,e[113]=Ye):Ye=e[113];const ut=C.data;let Ze;e[114]!==n?(Ze=n("orgs.overview.tokensAriaLabel"),e[114]=n,e[115]=Ze):Ze=e[115];let et;e[116]!==O?(et=t.jsx(Vt,{models:O,mode:"tokens"}),e[116]=O,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(C.avgDurationMs);let st;e[120]!==n?(st=n("orgs.overview.p95Prefix"),e[120]=n,e[121]=st):st=e[121];const xt=C.data;let lt;e[122]!==n?(lt=n("orgs.overview.aiLatencyAriaLabel"),e[122]=n,e[123]=lt):lt=e[123];let rt;e[124]!==O?(rt=t.jsx(Vt,{models:O,mode:"calls"}),e[124]=O,e[125]=rt):rt=e[125];const it=mt;let Je;e[126]!==n?(Je=n("orgs.overview.aiErrors"),e[126]=n,e[127]=Je):Je=e[127];const nt=C.totalErrors.toLocaleString(),pt=C.data;let Ge;e[128]!==n?(Ge=n("orgs.overview.aiErrorsAriaLabel"),e[128]=n,e[129]=Ge):Ge=e[129];let Qe;e[130]!==C.data||e[131]!==Ge?(Qe=t.jsx(ht,{data:pt,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ge}),e[130]=C.data,e[131]=Ge,e[132]=Qe):Qe=e[132];let Xe;e[133]!==O||e[134]!==C.totalErrors||e[135]!==n?(Xe=C.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:O,mode:"calls"}),e[133]=O,e[134]=C.totalErrors,e[135]=n,e[136]=Xe):Xe=e[136];let ot;return e[137]!==it||e[138]!==Je||e[139]!==nt||e[140]!==Qe||e[141]!==Xe?(ot=t.jsxs(it,{title:Je,value:nt,children:[Qe,Xe]}),e[137]=it,e[138]=Je,e[139]=nt,e[140]=Qe,e[141]=Xe,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:[K,t.jsxs(mt,{title:R,value:P,children:[t.jsx(ht,{data:te,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:q}),t.jsx(os,{metrics:B,connections:u,mode:"requests",total:T.totalCalls})]}),le,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(mt,{title:ne,value:xe,action:ye,children:[t.jsx(ht,{data:Re,dataKey:V,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Pe}),t.jsx(os,{metrics:B,connections:u,mode:"latency",total:T.totalCalls})]}),t.jsxs(mt,{title:Se,value:Fe,children:[t.jsx(ht,{data:Oe,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Me}),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:B,connections:u,mode:"errors",total:T.totalErrors})]})]}),Te,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(mt,{title:ke,value:ze,children:[t.jsx(ht,{data:Ke,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:ve}),pe]}),t.jsxs(mt,{title:we,value:De,action:Ye,children:[t.jsx(ht,{data:ut,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ze}),et]}),L?t.jsxs(mt,{title:n("orgs.overview.cost"),value:M>0?ps(M):"—",action:M===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:n("orgs.overview.noCostData")}):void 0,children:[t.jsx(ht,{data:C.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:n("orgs.overview.costAriaLabel")}),M>0?t.jsx(Vt,{models:O,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(C.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=Ue("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:Ue("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=Ve();let r,g;if(e[0]!==l.timestamp){const O=new Date(l.timestamp);r=O.toLocaleDateString("en-US",{month:"short",day:"numeric"}),g=O.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=r,e[2]=g}else r=e[1],g=e[2];const v=g,f=o?.icon||null,n=o?.title??l.connectionId;let b;e[3]!==f||e[4]!==n?(b=t.jsx(Ae,{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 y=o?.title??l.connectionId;let h;e[8]!==y?(h=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:y}),e[8]=y,e[9]=h):h=e[9];let w;e[10]!==a||e[11]!==h?(w=t.jsxs(Ae,{className:"min-w-0 pr-2 md:pr-4",children:[a,h]}),e[10]=a,e[11]=h,e[12]=w):w=e[12];let D;e[13]!==i||e[14]!==c?(D=t.jsx(Ae,{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(Ae,{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 I;e[28]!==p||e[29]!==j?(I=t.jsxs(Ae,{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]=I):I=e[30];let N;e[31]!==l.durationMs?(N=t.jsxs(Ae,{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 k=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 C;e[36]!==k||e[37]!==T?(C=t.jsx(Ae,{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:k,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:T})})}),e[36]=k,e[37]=T,e[38]=C):C=e[38];let A;return e[39]!==u||e[40]!==x||e[41]!==S||e[42]!==I||e[43]!==N||e[44]!==C||e[45]!==b||e[46]!==w||e[47]!==D?(A=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,w,D,S,I,N,C]}),e[39]=u,e[40]=x,e[41]=S,e[42]=I,e[43]=N,e[44]=C,e[45]=b,e[46]=w,e[47]=D,e[48]=A):A=e[48],A}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:g,connections:v,virtualMcps:f,membersData:n,client:b}=s,a=Ve(),y=v??[],h=f??[],w=Vs(r,m,g),D=gs(n),d=new Map(D.map(pr)),_=new Map(h.map(xr));let p=u.map($=>{const ee=d.get($.userId??""),ue=$.virtualMcpId?_.get($.virtualMcpId):null;return{...$,userName:ee?.name??$.userId??"Unknown",userImage:ee?.image??void 0,virtualMcpName:ue?.title??null,virtualMcpIcon:ue?.icon??null}});if(l.length>1){let $;e[0]!==l?($=ee=>l.includes(ee.connectionId),e[0]=l,e[1]=$):$=e[1],p=p.filter($)}if(o.length>1){let $;e[2]!==o?($=ee=>ee.virtualMcpId&&o.includes(ee.virtualMcpId),e[2]=o,e[3]=$):$=e[3],p=p.filter($)}const j=new Map(y.map(fr));if(x){const $=x.toLowerCase();p=p.filter(ee=>ee.toolName.toLowerCase().includes($)||(j.get(ee.connectionId)?.title??ee.connectionId).toLowerCase().includes($)||ee.errorMessage?.toLowerCase().includes($))}const I=Us(p),N=I.selected;let k;e[4]!==N?.id?(k=bt.monitoringLogDetail(N?.id??""),e[4]=N?.id,e[5]=k):k=e[5];let T;e[6]!==b||e[7]!==N?(T=async()=>{if(!b)throw new Error("MCP client is not available");const $=await b.callTool({name:"MONITORING_LOG_GET",arguments:{id:N.id}});return $.structuredContent??$},e[6]=b,e[7]=N,e[8]=T):T=e[8];const C=N!==null;let A;e[9]!==k||e[10]!==T||e[11]!==C?(A={queryKey:k,queryFn:T,enabled:C},e[9]=k,e[10]=T,e[11]=C,e[12]=A):A=e[12];const O=Bt(A),H=O.data?.log;let U;e[13]!==H||e[14]!==N?(U=N&&H?{...N,input:H.input,output:H.output}:N,e[13]=H,e[14]=N,e[15]=U):U=e[15];const z=U;if(p.length===0){let $;e[16]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[16]=$):$=e[16];let ee;e[17]!==a?(ee=a("orgs.audit.noLogsFound"),e[17]=a,e[18]=ee):ee=e[18];let ue;e[19]!==l.length||e[20]!==x||e[21]!==i||e[22]!==a||e[23]!==c||e[24]!==o.length?(ue=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]=ue):ue=e[25];let ie;return e[26]!==ee||e[27]!==ue?(ie=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(es,{image:$,title:ee,description:ue})}),e[26]=ee,e[27]=ue,e[28]=ie):ie=e[28],ie}const M="flex-1 flex flex-col min-w-0",L="flex-1 min-w-0 pt-1",F="min-w-[600px] md:min-w-0",B=vs,V="w-full border-collapse";let W;e[29]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(je,{className:"w-5"}),e[29]=W):W=e[29];let E;e[30]!==a?(E=a("orgs.audit.toolConnection"),e[30]=a,e[31]=E):E=e[31];let G;e[32]!==E?(G=t.jsx(je,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:E}),e[32]=E,e[33]=G):G=e[33];let K;e[34]!==a?(K=a("orgs.audit.agent"),e[34]=a,e[35]=K):K=e[35];let R;e[36]!==K?(R=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:K}),e[36]=K,e[37]=R):R=e[37];let P;e[38]!==a?(P=a("orgs.audit.user"),e[38]=a,e[39]=P):P=e[39];let te;e[40]!==P?(te=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:P}),e[40]=P,e[41]=te):te=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 X;e[46]!==a?(X=a("orgs.audit.latency"),e[46]=a,e[47]=X):X=e[47];let Y;e[48]!==X?(Y=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:X}),e[48]=X,e[49]=Y):Y=e[49];let Q;e[50]!==a?(Q=a("orgs.audit.status"),e[50]=a,e[51]=Q):Q=e[51];let fe;e[52]!==Q?(fe=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]=fe):fe=e[53];let Z;e[54]!==G||e[55]!==R||e[56]!==te||e[57]!==J||e[58]!==Y||e[59]!==fe?(Z=t.jsx(js,{className:"border-b-0 z-20",children:t.jsxs(Ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[W,G,R,te,J,Y,fe]})}),e[54]=G,e[55]=R,e[56]=te,e[57]=J,e[58]=Y,e[59]=fe,e[60]=Z):Z=e[60];const me=hs,ae=p.map(($,ee)=>t.jsx(mr,{log:$,connection:j.get($.connectionId),virtualMcpName:$.virtualMcpName??"",virtualMcpIcon:$.virtualMcpIcon,onClick:()=>I.select($.id),lastLogRef:ee===p.length-1?w:void 0},$.id));let ce;e[61]!==me||e[62]!==ae?(ce=t.jsx(me,{children:ae}),e[61]=me,e[62]=ae,e[63]=ce):ce=e[63];let re;e[64]!==B||e[65]!==Z||e[66]!==ce?(re=t.jsx("div",{className:L,children:t.jsx("div",{className:F,children:t.jsxs(B,{className:V,children:[Z,ce]})})}),e[64]=B,e[65]=Z,e[66]=ce,e[67]=re):re=e[67];let se;e[68]!==I?(se=$=>{$||I.close()},e[68]=I,e[69]=se):se=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:I.prev,disabled:I.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:I.next,disabled:I.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:O.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx(Xs,{className:"size-5 text-muted-foreground"})}):O.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:()=>O.refetch(),children:a("orgs.audit.retry")})]}):t.jsx(Kl,{log:z})})]});let le;e[70]!==oe?(le=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:oe}),e[70]=oe,e[71]=le):le=e[71];let ne;e[72]!==I.isOpen||e[73]!==se||e[74]!==le?(ne=t.jsx(Es,{open:I.isOpen,onOpenChange:se,children:le}),e[72]=I.isOpen,e[73]=se,e[74]=le,e[75]=ne):ne=e[75];let xe;return e[76]!==re||e[77]!==ne?(xe=t.jsxs("div",{className:M,children:[re,ne]}),e[76]=re,e[77]=ne,e[78]=xe):xe=e[78],xe}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:g,status:v,searchQuery:f,allConnections:n,allVirtualMcps:b,membersData:a}=s;let y;e[0]!==c||e[1]!==o?(y=bt.monitoringLogsInfinite(o,JSON.stringify(c)),e[0]=c,e[1]=o,e[2]=y):y=e[2];let h;e[3]!==c||e[4]!==l||e[5]!==i?(h=async O=>{const{pageParam:H}=O,U=H===void 0?0:H;if(!l)throw new Error("MCP client is not available");const z=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...c,limit:i,offset:U}});return z.structuredContent??z},e[3]=c,e[4]=l,e[5]=i,e[6]=h):h=e[6];let w;e[7]!==i?(w=(O,H)=>{if(!((O?.logs?.length??0)<i))return H.length*i},e[7]=i,e[8]=w):w=e[8];const D=x?u:!1;let d;e[9]!==y||e[10]!==h||e[11]!==w||e[12]!==D?(d={queryKey:y,queryFn:h,initialPageParam:0,getNextPageParam:w,staleTime:0,refetchInterval:D},e[9]=y,e[10]=h,e[11]=w,e[12]=D,e[13]=d):d=e[13];const{data:_,fetchNextPage:S,hasNextPage:p,isFetchingNextPage:j}=_l(d);let I;e[14]!==_.pages?(I=_.pages.flatMap(jr),e[14]=_.pages,e[15]=I):I=e[15];const N=I;let k;e[16]!==S||e[17]!==p||e[18]!==j?(k=()=>{p&&!j&&S()},e[16]=S,e[17]=p,e[18]=j,e[19]=k):k=e[19];const T=k,C=p??!1;let A;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]!==C||e[31]!==g||e[32]!==r?(A=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:g,status:v,search:f,logs:N,hasMore:C,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]=C,e[31]=g,e[32]=r,e[33]=A):A=e[33],A}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=Ve();let g,v;if(e[0]!==i||e[1]!==l||e[2]!==x){const P=Cl(l);g=Ml(P,x,i,"—"),v=Dl(P,x,i),e[0]=i,e[1]=l,e[2]=x,e[3]=g,e[4]=v}else g=e[3],v=e[4];const f=v;let n;if(e[5]!==c||e[6]!==l.created_by){const P=gs(c);let te;e[8]!==l.created_by?(te=q=>q.userId===l.created_by,e[8]=l.created_by,e[9]=te):te=e[9],n=P.find(te),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 y=a,h=b?.user.image??void 0;let w,D;if(e[14]!==l.created_at){const P=new Date(l.created_at);w=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),D=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),e[14]=l.created_at,e[15]=w,e[16]=D}else w=e[15],D=e[16];const d=D;let _,S,p,j,I,N,k,T,C,A,O,H,U;if(e[17]!==f||e[18]!==g||e[19]!==m||e[20]!==u||e[21]!==r||e[22]!==l.status||e[23]!==l.title||e[24]!==h||e[25]!==y){const P=Ol(l.status),te=P.icon;S=Ut,p=m,j="h-14 md:h-16 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",I=u,e[39]!==l.title?(N=t.jsx(Ae,{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]!==g?(J=t.jsx(Tt,{icon:f,name:g,size:"xs",fallbackIcon:q,className:"shrink-0 size-5! min-w-5! rounded-md"}),e[42]=f,e[43]=g,e[44]=J):J=e[44];let X;e[45]!==g?(X=t.jsx("span",{className:"truncate",children:g}),e[45]=g,e[46]=X):X=e[46],e[47]!==J||e[48]!==X?(k=t.jsx(Ae,{className:"w-36 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[J,X]})}),e[47]=J,e[48]=X,e[49]=k):k=e[49];let Y;e[50]!==h||e[51]!==y?(Y=t.jsx(xs,{url:h,fallback:y,shape:"circle",size:"2xs",className:"shrink-0"}),e[50]=h,e[51]=y,e[52]=Y):Y=e[52];let Q;e[53]!==y?(Q=t.jsx("span",{className:"truncate",children:y}),e[53]=y,e[54]=Q):Q=e[54],e[55]!==Y||e[56]!==Q?(T=t.jsx(Ae,{className:"w-28 px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[Y,Q]})}),e[55]=Y,e[56]=Q,e[57]=T):T=e[57],_=Ae,U="w-24 px-3",O="flex items-center gap-1.5",H=t.jsx(te,{size:14,className:P.iconClassName}),C=Ue("text-sm",P.labelColor),A=r(P.labelKey),e[17]=f,e[18]=g,e[19]=m,e[20]=u,e[21]=r,e[22]=l.status,e[23]=l.title,e[24]=h,e[25]=y,e[26]=_,e[27]=S,e[28]=p,e[29]=j,e[30]=I,e[31]=N,e[32]=k,e[33]=T,e[34]=C,e[35]=A,e[36]=O,e[37]=H,e[38]=U}else _=e[26],S=e[27],p=e[28],j=e[29],I=e[30],N=e[31],k=e[32],T=e[33],C=e[34],A=e[35],O=e[36],H=e[37],U=e[38];let z;e[58]!==C||e[59]!==A?(z=t.jsx("span",{className:C,children:A}),e[58]=C,e[59]=A,e[60]=z):z=e[60];let M;e[61]!==z||e[62]!==O||e[63]!==H?(M=t.jsxs("div",{className:O,children:[H,z]}),e[61]=z,e[62]=O,e[63]=H,e[64]=M):M=e[64];let L;e[65]!==_||e[66]!==M||e[67]!==U?(L=t.jsx(_,{className:U,children:M}),e[65]=_,e[66]=M,e[67]=U,e[68]=L):L=e[68];let F;e[69]!==o?(F=o?Nt(o.totalTokens):"—",e[69]=o,e[70]=F):F=e[70];let B;e[71]!==F?(B=t.jsx(Ae,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:F}),e[71]=F,e[72]=B):B=e[72];let V;e[73]!==o?(V=o&&o.costUsd>0?ps(o.costUsd):"—",e[73]=o,e[74]=V):V=e[74];let W;e[75]!==V?(W=t.jsx(Ae,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:V}),e[75]=V,e[76]=W):W=e[76];let E;e[77]!==w?(E=t.jsx("div",{children:w}),e[77]=w,e[78]=E):E=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 K;e[81]!==E||e[82]!==G?(K=t.jsxs(Ae,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[E,G]}),e[81]=E,e[82]=G,e[83]=K):K=e[83];let R;return e[84]!==S||e[85]!==p||e[86]!==j||e[87]!==I||e[88]!==N||e[89]!==k||e[90]!==T||e[91]!==L||e[92]!==B||e[93]!==W||e[94]!==K?(R=t.jsxs(S,{ref:p,className:j,onClick:I,children:[N,k,T,L,B,W,K]}),e[84]=S,e[85]=p,e[86]=j,e[87]=I,e[88]=N,e[89]=k,e[90]=T,e[91]=L,e[92]=B,e[93]=W,e[94]=K,e[95]=R):R=e[95],R}function br(){const s=he.c(4),e=Ve();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=Ve();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:g,filterStatus:v,filterSource:f}=s,n=Ve(),b=u.startDate.toISOString(),a=u.endDate.toISOString(),y=JSON.stringify({startDate:b,endDate:a,search:m,agentIds:r,userIds:g,status:v,source:f}),{data:h,fetchNextPage:w,hasNextPage:D,isFetchingNextPage:d,isLoading:_}=Fl({queryKey:bt.threadsInfinite(o,y),queryFn:async R=>{const{pageParam:P}=R,te=P===void 0?0:P;if(!l)throw new Error("MCP client is not available");const q=await l.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:ds,offset:te,startDate:b,endDate:a,...m?{search:m}:{},...r&&r.length>0?{agentId:r[0]}:{},...g&&g.length>0?{userId:g[0]}:{},...v&&v!=="all"?{status:v}:{},...f&&f!=="all"?{source:f}:{}}});return q.structuredContent??q},initialPageParam:0,getNextPageParam:Mr,staleTime:3e4}),S=(h?.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 R=await l.callTool({name:"MONITORING_THREAD_USAGE",arguments:{threadIds:p,startDate:b,endDate:a}});return R.structuredContent??R},enabled:!!l&&p.length>0,staleTime:3e4}),I=new Map((j?.items??[]).map(Tr)),[N,k]=de.useState(null),[T,C]=de.useState("desc");let A;e[0]!==N?(A=R=>{N===R?C(Ir):(k(R),C("desc"))},e[0]=N,e[1]=A):A=e[1];const O=A,H=R=>{const P=I.get(R);return P?N==="cost"?P.costUsd:P.totalTokens:0},U=N?[...S].sort((R,P)=>{const te=H(R.id),q=H(P.id);return T==="desc"?q-te:te-q}):S,z=Us(U),M=z.selected;let L;e[2]!==w||e[3]!==D||e[4]!==d?(L=()=>{D&&!d&&w()},e[2]=w,e[3]=D,e[4]=d,e[5]=L):L=e[5];const B=Vs(L,D??!1,d),V=!!m||(r?.length??0)>0||(g?.length??0)>0||!!(v&&v!=="all")||!!(f&&f!=="all");let W;e[6]!==z?(W=R=>{R||z.close()},e[6]=z,e[7]=W):W=e[7];let E;e[8]!==i||e[9]!==x||e[10]!==l||e[11]!==U||e[12]!==o||e[13]!==c||e[14]!==M||e[15]!==z.index||e[16]!==z.next||e[17]!==z.prev?(E=M&&t.jsx(kl,{thread:M,client:l,locator:o,connections:i,virtualMcps:x,members:c,nav:{index:z.index,total:U.length,onPrev:z.prev,onNext:z.next}}),e[8]=i,e[9]=x,e[10]=l,e[11]=U,e[12]=o,e[13]=c,e[14]=M,e[15]=z.index,e[16]=z.next,e[17]=z.prev,e[18]=E):E=e[18];let G;e[19]!==E?(G=t.jsx(As,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:E}),e[19]=E,e[20]=G):G=e[20];let K;return e[21]!==z.isOpen||e[22]!==W||e[23]!==G?(K=t.jsx(Es,{open:z.isOpen,onOpenChange:W,children:G}),e[21]=z.isOpen,e[22]=W,e[23]=G,e[24]=K):K=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:V,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:()=>O("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:()=>O("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:U.map((R,P)=>t.jsx(Nr,{thread:R,usage:I.get(R.id),members:c,connections:i,virtualMcps:x,onClick:()=>z.select(R.id),lastRowRef:P===U.length-1?B:void 0},R.id))})]}),d&&t.jsx(yr,{})]})})})})}),K]})}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,[g,v]=de.useState(!1),f=Ve();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 y;e[5]!==m?(y=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]=y):y=e[6];let h;e[7]!==a||e[8]!==y?(h=t.jsx(Gt,{asChild:!0,children:t.jsxs(ge,{variant:"outline",className:"relative",children:[n,a,y]})}),e[7]=a,e[8]=y,e[9]=h):h=e[9];let w;e[10]!==f?(w=f("orgs.threadsFiltersPopover.filterChats"),e[10]=f,e[11]=w):w=e[11];let D;e[12]!==w?(D=t.jsx("h4",{className:"font-medium text-sm",children:w}),e[12]=w,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=xe=>r({filterAgentIds:xe.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 I;e[27]!==j||e[28]!==_?(I=t.jsxs("div",{children:[_,j]}),e[27]=j,e[28]=_,e[29]=I):I=e[29];let N;e[30]!==f?(N=f("orgs.threadsFiltersPopover.user"),e[30]=f,e[31]=N):N=e[31];let k;e[32]!==N?(k=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:N}),e[32]=N,e[33]=k):k=e[33];let T;e[34]!==r?(T=xe=>r({filterUserIds:xe.slice(0,1)}),e[34]=r,e[35]=T):T=e[35];let C;e[36]!==f?(C=f("orgs.threadsFiltersPopover.allUsers"),e[36]=f,e[37]=C):C=e[37];let A;e[38]!==o||e[39]!==u||e[40]!==T||e[41]!==C?(A=t.jsx(qt,{options:u,defaultValue:o,onValueChange:T,placeholder:C,variant:"secondary",className:"w-full",maxCount:1}),e[38]=o,e[39]=u,e[40]=T,e[41]=C,e[42]=A):A=e[42];let O;e[43]!==k||e[44]!==A?(O=t.jsxs("div",{children:[k,A]}),e[43]=k,e[44]=A,e[45]=O):O=e[45];let H;e[46]!==f?(H=f("orgs.threadsFiltersPopover.status"),e[46]=f,e[47]=H):H=e[47];let U;e[48]!==H?(U=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:H}),e[48]=H,e[49]=U):U=e[49];let z;e[50]!==r?(z=xe=>r({filterStatus:xe}),e[50]=r,e[51]=z):z=e[51];let M;e[52]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx(wt,{className:"w-full",children:t.jsx(yt,{})}),e[52]=M):M=e[52];let L;e[53]!==f?(L=f("orgs.threadsFiltersPopover.allStatuses"),e[53]=f,e[54]=L):L=e[54];let F;e[55]!==L?(F=t.jsx(Ee,{value:"all",children:L}),e[55]=L,e[56]=F):F=e[56];let B;e[57]!==f?(B=f("orgs.threadsFiltersPopover.completed"),e[57]=f,e[58]=B):B=e[58];let V;e[59]!==B?(V=t.jsx(Ee,{value:"completed",children:B}),e[59]=B,e[60]=V):V=e[60];let W;e[61]!==f?(W=f("orgs.threadsFiltersPopover.active"),e[61]=f,e[62]=W):W=e[62];let E;e[63]!==W?(E=t.jsx(Ee,{value:"active",children:W}),e[63]=W,e[64]=E):E=e[64];let G;e[65]!==f?(G=f("orgs.threadsFiltersPopover.failed"),e[65]=f,e[66]=G):G=e[66];let K;e[67]!==G?(K=t.jsx(Ee,{value:"failed",children:G}),e[67]=G,e[68]=K):K=e[68];let R;e[69]!==F||e[70]!==V||e[71]!==E||e[72]!==K?(R=t.jsxs(St,{children:[F,V,E,K]}),e[69]=F,e[70]=V,e[71]=E,e[72]=K,e[73]=R):R=e[73];let P;e[74]!==c||e[75]!==z||e[76]!==R?(P=t.jsxs(It,{value:c,onValueChange:z,children:[M,R]}),e[74]=c,e[75]=z,e[76]=R,e[77]=P):P=e[77];let te;e[78]!==U||e[79]!==P?(te=t.jsxs("div",{children:[U,P]}),e[78]=U,e[79]=P,e[80]=te):te=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 X;e[85]!==r?(X=xe=>r({filterSource:xe}),e[85]=r,e[86]=X):X=e[86];let Y;e[87]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(wt,{className:"w-full",children:t.jsx(yt,{})}),e[87]=Y):Y=e[87];let Q;e[88]!==f?(Q=f("orgs.threadsFiltersPopover.allSources"),e[88]=f,e[89]=Q):Q=e[89];let fe;e[90]!==Q?(fe=t.jsx(Ee,{value:"all",children:Q}),e[90]=Q,e[91]=fe):fe=e[91];let Z;e[92]!==f?(Z=f("orgs.threadsFiltersPopover.sourceJira"),e[92]=f,e[93]=Z):Z=e[93];let me;e[94]!==Z?(me=t.jsx(Ee,{value:"jira",children:Z}),e[94]=Z,e[95]=me):me=e[95];let ae;e[96]!==fe||e[97]!==me?(ae=t.jsxs(St,{children:[fe,me]}),e[96]=fe,e[97]=me,e[98]=ae):ae=e[98];let ce;e[99]!==i||e[100]!==X||e[101]!==ae?(ce=t.jsxs(It,{value:i,onValueChange:X,children:[Y,ae]}),e[99]=i,e[100]=X,e[101]=ae,e[102]=ce):ce=e[102];let re;e[103]!==J||e[104]!==ce?(re=t.jsxs("div",{children:[J,ce]}),e[103]=J,e[104]=ce,e[105]=re):re=e[105];let se;e[106]!==I||e[107]!==O||e[108]!==te||e[109]!==re?(se=t.jsxs("div",{className:"space-y-3",children:[I,O,te,re]}),e[106]=I,e[107]=O,e[108]=te,e[109]=re,e[110]=se):se=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 le;e[115]!==se||e[116]!==oe||e[117]!==D?(le=t.jsx(Qt,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[D,se,oe]})}),e[115]=se,e[116]=oe,e[117]=D,e[118]=le):le=e[118];let ne;return e[119]!==g||e[120]!==le||e[121]!==h?(ne=t.jsxs(Jt,{open:g,onOpenChange:v,children:[h,le]}),e[119]=g,e[120]=le,e[121]=h,e[122]=ne):ne=e[122],ne}function _r(s){const e=he.c(16),{dateRange:l}=s,o=Ve(),{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]=de.useState(null),g=m??u[0]?.id??null,{data:v}=zl(g??"");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 y;return e[9]!==v||e[10]!==u||e[11]!==g||e[12]!==i||e[13]!==a||e[14]!==o?(y=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:g??"",onValueChange:h=>r(h),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]=g,e[12]=i,e[13]=a,e[14]=o,e[15]=y):y=e[15],y}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:g,memberOptions:v,llmUserIds:f=[],onLlmUserIdsChange:n,showMemberFilter:b}){const a=Ve(),[y,h]=de.useState(!1),[w,D]=de.useState("form"),[d,_]=de.useState(l),[S,p]=de.useState(i),[j,I]=de.useState(Yt(i)),N=de.useRef(l),k=de.useRef(jt(i));N.current!==l&&(N.current=l,d!==l&&_(l));const T=jt(i);k.current!==T&&(k.current=T,p(i),I(Yt(i)));const C=(M,L)=>{const F=[...S],B=F[M];B&&(F[M]={key:L.key??B.key,operator:L.operator??B.operator,value:L.value??B.value},p(F))},A=()=>{p([...S,{key:"",operator:"eq",value:""}])},O=M=>{const L=S.filter((F,B)=>B!==M);p(L),I(Yt(L)),r({propertyFilters:jt(L)})},H=()=>{r({propertyFilters:jt(S)})},U=()=>{const M=Ms(j);p(M),r({propertyFilters:jt(M)})},z=()=>{if(w==="raw"){const M=Ms(j);p(M),D("form")}else I(Yt(S)),D("raw")};return t.jsxs(Jt,{open:y,onOpenChange:h,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:M=>r({hideSystem:!!M})})]}),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:M=>r({connectionId:M}),onSearchChange:g,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:M=>r({virtualMcpId:M}),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:M=>n?.(M),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:M=>_(M.target.value),onBlur:()=>{d!==l&&r({tool:d})},onKeyDown:M=>{M.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:M=>r({status:M}),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:w==="raw"?t.jsx(fl,{size:14}):t.jsx(cl,{size:14})})}),t.jsx(zt,{children:a(w==="raw"?"orgs.monitoring.switchToFormView":"orgs.monitoring.switchToRawText")})]})]}),w==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(vl,{placeholder:a("orgs.monitoring.pastePropertyFiltersPlaceholder"),value:j,onChange:M=>I(M.target.value),onBlur:U,onKeyDown:M=>{M.key==="Enter"&&M.metaKey&&U()},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((M,L)=>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:(L+1).toString()})}),t.jsx(ge,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>O(L),children:t.jsx(pl,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ht,{placeholder:a("orgs.monitoring.keyPlaceholder"),value:M.key,onChange:F=>C(L,{key:F.target.value}),onBlur:H,onKeyDown:F=>{F.key==="Enter"&&H()},className:"flex-1 font-mono text-sm"}),t.jsxs(It,{value:M.operator,onValueChange:F=>{const B=[...S],V=B[L];V&&(B[L]={...V,operator:F,value:F==="exists"?"":V.value},p(B),r({propertyFilters:jt(B)}))},children:[t.jsx(wt,{className:"w-28",children:t.jsx(yt,{})}),t.jsx(St,{children:Pr.map(F=>t.jsx(Ee,{value:F.value,children:a(F.labelKey)},F.value))})]})]}),M.operator!=="exists"&&t.jsx(Ht,{placeholder:a("orgs.monitoring.valuePlaceholder"),value:M.value,onChange:F=>C(L,{value:F.target.value}),onBlur:H,onKeyDown:F=>{F.key==="Enter"&&H()},className:"w-full font-mono text-sm"})]},L)),t.jsxs(ge,{variant:"outline",size:"sm",className:"w-full",onClick:A,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([]),I(""),r({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!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:g,hideSystem:v,activeFiltersCount:f,from:n,to:b,propertyFilters:a,onUpdateFilters:y,onTimeRangeChange:h,onStreamingToggle:w,onTabChange:D}=s,d=Ve(),_=is(),S=ul(),{data:p}=dl(),[j,I]=de.useState(""),N=j||void 0;let k;e[0]!==N?(k={searchTerm:N},e[0]=N,e[1]=k):k=e[1];const T=is(k);let C;e[2]!==T?(C=T??[],e[2]=T,e[3]=C):C=e[3];let A;e[4]!==C?(A=C.map(Er),e[4]=C,e[5]=A):A=e[5];const O=A;let H;e[6]!==S?(H=S.map(zr),e[6]=S,e[7]=H):H=e[7];const U=H,{pageSize:z,streamingRefetchInterval:M}=as,{org:L,locator:F}=kt();let B;e[8]!==L.id||e[9]!==L.slug?(B={connectionId:Zs,orgId:L.id,orgSlug:L.slug},e[8]=L.id,e[9]=L.slug,e[10]=B):B=e[10];const V=ml(B);let W;e[11]!==a?(W=Vl(a),e[11]=a,e[12]=W):W=e[12];const E=W;let G;e[13]!==v||e[14]!==L.id?(G=v?[el.SELF(L.id)]:void 0,e[13]=v,e[14]=L.id,e[15]=G):G=e[15];const K=G;let R;e[16]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[16]=R):R=e[16];const[P,te]=de.useState(R);let q;e[17]===Symbol.for("react.memo_cache_sentinel")?(q=[],e[17]=q):q=e[17];const[J,X]=de.useState(q);let Y;e[18]===Symbol.for("react.memo_cache_sentinel")?(Y=[],e[18]=Y):Y=e[18];const[Q,fe]=de.useState(Y),[Z,me]=de.useState("all"),[ae,ce]=de.useState("all"),re=(J.length>0?1:0)+(Q.length>0?1:0)+(Z!=="all"?1:0)+(ae!=="all"?1:0);let se;e[19]!==p?(se=gs(p).map($r),e[19]=p,e[20]=se):se=e[20];const oe=se;let le;e[21]!==o.startDate?(le=o.startDate.toISOString(),e[21]=o.startDate,e[22]=le):le=e[22];let ne;e[23]!==o.endDate?(ne=o.endDate.toISOString(),e[23]=o.endDate,e[24]=ne):ne=e[24];const xe=i.length===1?i[0]:void 0,$=x.length===1?x[0]:void 0,ee=u||void 0,ue=m==="errors"?!0:m==="success"?!1:void 0;let ie;e[25]!==K||e[26]!==E||e[27]!==le||e[28]!==ne||e[29]!==xe||e[30]!==$||e[31]!==ee||e[32]!==ue?(ie={startDate:le,endDate:ne,connectionId:xe,excludeConnectionIds:K,virtualMcpId:$,toolName:ee,isError:ue,...E},e[25]=K,e[26]=E,e[27]=le,e[28]=ne,e[29]=xe,e[30]=$,e[31]=ee,e[32]=ue,e[33]=ie):ie=e[33];const We=ie;let _e;e[34]!==d?(_e=d("orgs.monitoring.overview"),e[34]=d,e[35]=_e):_e=e[35];let Le;e[36]!==_e?(Le={id:"overview",label:_e},e[36]=_e,e[37]=Le):Le=e[37];let ye;e[38]!==d?(ye=d("orgs.monitoring.audit"),e[38]=d,e[39]=ye):ye=e[39];let Re;e[40]!==ye?(Re={id:"audit",label:ye},e[40]=ye,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 Se;e[44]!==Pe?(Se={id:"threads",label:Pe},e[44]=Pe,e[45]=Se):Se=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 Me;e[50]!==Le||e[51]!==Re||e[52]!==Se||e[53]!==Oe?(Me=[Le,Re,Se,Oe],e[50]=Le,e[51]=Re,e[52]=Se,e[53]=Oe,e[54]=Me):Me=e[54];const $e=Me;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 Ie;e[59]!==D?(Ie=gt=>D(gt),e[59]=D,e[60]=Ie):Ie=e[60];let Te;e[61]!==Ie||e[62]!==l||e[63]!==$e?(Te=t.jsx($s,{placement:"page",tabs:$e,activeTab:l,onTabChange:Ie}),e[61]=Ie,e[62]=l,e[63]=$e,e[64]=Te):Te=e[64];let ke;e[65]!==f||e[66]!==i||e[67]!==O||e[68]!==j||e[69]!==v||e[70]!==g||e[71]!==P||e[72]!==oe||e[73]!==w||e[74]!==y||e[75]!==a||e[76]!==m||e[77]!==d||e[78]!==l||e[79]!==u||e[80]!==x||e[81]!==U?(ke=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(ge,{variant:g?"secondary":"outline",className:"gap-1.5",onClick:w,children:[g&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:d("orgs.monitoring.live")}),g&&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:O,virtualMcpOptions:U,activeFiltersCount:f,onUpdateFilters:y,connectionSearchTerm:j,onConnectionSearchChange:I,memberOptions:oe,llmUserIds:P,onLlmUserIdsChange:te,showMemberFilter:l==="overview"})]}),e[65]=f,e[66]=i,e[67]=O,e[68]=j,e[69]=v,e[70]=g,e[71]=P,e[72]=oe,e[73]=w,e[74]=y,e[75]=a,e[76]=m,e[77]=d,e[78]=l,e[79]=u,e[80]=x,e[81]=U,e[82]=ke):ke=e[82];let ze;e[83]!==oe||e[84]!==l||e[85]!==re||e[86]!==J||e[87]!==ae||e[88]!==Z||e[89]!==Q||e[90]!==U?(ze=l==="threads"&&t.jsx(Dr,{filterAgentIds:J,filterUserIds:Q,filterStatus:Z,filterSource:ae,virtualMcpOptions:U,memberOptions:oe,activeFiltersCount:re,onUpdateFilters:gt=>{const{filterAgentIds:Ns,filterUserIds:bs,filterStatus:ws,filterSource:ys}=gt;Ns!==void 0&&X(Ns),bs!==void 0&&fe(bs),ws!==void 0&&me(ws),ys!==void 0&&ce(ys)}}),e[83]=oe,e[84]=l,e[85]=re,e[86]=J,e[87]=ae,e[88]=Z,e[89]=Q,e[90]=U,e[91]=ze):ze=e[91];let Ke;e[92]!==n||e[93]!==b?(Ke={from:n,to:b},e[92]=n,e[93]=b,e[94]=Ke):Ke=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 De;e[101]!==d?(De=d("monitoring.timeRangePicker.applyTimeRange"),e[101]=d,e[102]=De):De=e[102];let Ce;e[103]!==ve||e[104]!==pe||e[105]!==we||e[106]!==De?(Ce={absoluteTimeRange:ve,from:pe,to:we,applyTimeRange:De},e[103]=ve,e[104]=pe,e[105]=we,e[106]=De,e[107]=Ce):Ce=e[107];let He;e[108]!==d?(He=d("monitoring.timeRangePicker.last5Minutes"),e[108]=d,e[109]=He):He=e[109];let qe;e[110]!==He?(qe={label:He,from:"now-5m",to:"now",value:"5m"},e[110]=He,e[111]=qe):qe=e[111];let Be;e[112]!==d?(Be=d("monitoring.timeRangePicker.last15Minutes"),e[112]=d,e[113]=Be):Be=e[113];let Ye;e[114]!==Be?(Ye={label:Be,from:"now-15m",to:"now",value:"15m"},e[114]=Be,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 Je;e[136]!==d?(Je=d("monitoring.timeRangePicker.last24Hours"),e[136]=d,e[137]=Je):Je=e[137];let nt;e[138]!==Je?(nt={label:Je,from:"now-24h",to:"now",value:"24h"},e[138]=Je,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 Ge;e[142]!==pt?(Ge={label:pt,from:"now-2d",to:"now",value:"2d"},e[142]=pt,e[143]=Ge):Ge=e[143];let Qe;e[144]!==d?(Qe=d("monitoring.timeRangePicker.last7Days"),e[144]=d,e[145]=Qe):Qe=e[145];let Xe;e[146]!==Qe?(Xe={label:Qe,from:"now-7d",to:"now",value:"7d"},e[146]=Qe,e[147]=Xe):Xe=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]!==qe||e[153]!==Ye||e[154]!==Ze||e[155]!==tt||e[156]!==st||e[157]!==lt||e[158]!==it||e[159]!==nt||e[160]!==Ge||e[161]!==Xe||e[162]!==at?(Ct=[qe,Ye,Ze,tt,st,lt,it,nt,Ge,Xe,at],e[152]=qe,e[153]=Ye,e[154]=Ze,e[155]=tt,e[156]=st,e[157]=lt,e[158]=it,e[159]=nt,e[160]=Ge,e[161]=Xe,e[162]=at,e[163]=Ct):Ct=e[163];let Mt;e[164]!==h||e[165]!==Ke||e[166]!==Ce||e[167]!==Ct?(Mt=t.jsx(Ql,{value:Ke,onChange:h,labels:Ce,quickRanges:Ct}),e[164]=h,e[165]=Ke,e[166]=Ce,e[167]=Ct,e[168]=Mt):Mt=e[168];let Dt;e[169]!==ke||e[170]!==ze||e[171]!==Mt?(Dt=t.jsxs("div",{className:"flex items-center gap-2",children:[ke,ze,Mt]}),e[169]=ke,e[170]=ze,e[171]=Mt,e[172]=Dt):Dt=e[172];let _t;e[173]!==Te||e[174]!==Dt?(_t=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[Te,Dt]}),e[173]=Te,e[174]=Dt,e[175]=_t):_t=e[175];let Lt;e[176]!==y||e[177]!==r||e[178]!==d||e[179]!==l?(Lt=(l==="audit"||l==="threads")&&t.jsx(tl,{value:r,onChange:gt=>y({search:gt}),placeholder:d(l==="threads"?"orgs.monitoring.searchByTitlePlaceholder":"orgs.monitoring.searchByToolPlaceholder"),onKeyDown:gt=>{gt.key==="Escape"&&(y({search:""}),gt.target.blur())},className:"w-full md:w-[375px]"}),e[176]=y,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]!==We||e[188]!==V||e[189]!==i||e[190]!==o||e[191]!==c||e[192]!==K||e[193]!==g||e[194]!==P||e[195]!==F||e[196]!==p||e[197]!==r||e[198]!==m||e[199]!==l||e[200]!==J||e[201]!==ae||e[202]!==Z||e[203]!==Q||e[204]!==u||e[205]!==x?(Pt=l==="automations"?t.jsx(_r,{dateRange:o}):l==="threads"?t.jsx(Sr,{client:V,locator:F,membersData:p,allConnections:_,allVirtualMcps:S,dateRange:o,searchQuery:r,filterAgentIds:J,filterUserIds:Q,filterStatus:Z,filterSource:ae}):l==="audit"?t.jsx(vr,{client:V,locator:F,baseParams:We,pageSize:z,isStreaming:g,streamingRefetchInterval:M,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:K,toolName:u||void 0,status:m==="errors"?"error":m==="success"?"success":void 0,connections:_,isStreaming:g,streamingRefetchInterval:M,llmUserIds:P,virtualMcpIds:x,virtualMcps:S})}),e[185]=_,e[186]=S,e[187]=We,e[188]=V,e[189]=i,e[190]=o,e[191]=c,e[192]=K,e[193]=g,e[194]=P,e[195]=F,e[196]=p,e[197]=r,e[198]=m,e[199]=l,e[200]=J,e[201]=ae,e[202]=Z,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:Ue("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:Ue("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:Ue("size-4! min-w-4! rounded-sm shrink-0",c)})}}}function wn(){const s=he.c(75),e=Ve(),{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:g,tool:v,search:f,status:n,streaming:b,propertyFilters:a,hideSystem:y}=i,h=x===void 0?"overview":x;let w;s[1]!==r?(w=r===void 0?[]:r,s[1]=r,s[2]=w):w=s[2];const D=w;let d;s[3]!==g?(d=g===void 0?[]:g,s[3]=g,s[4]=d):d=s[4];const _=d,S=b===void 0?!0:b,p=a===void 0?"":a,j=y===void 0?!1:y,I=Ul(p);let N;s[5]!==o||s[6]!==l.slug||s[7]!==i?(N=ie=>{o({to:"/$org/settings/monitor",params:{org:l.slug},search:{...i,...ie}})},s[5]=o,s[6]=l.slug,s[7]=i,s[8]=N):N=s[8];const k=N;let T;s[9]!==k?(T=ie=>{k({from:ie.from,to:ie.to})},s[9]=k,s[10]=T):T=s[10];const C=T,A=ct(u),O=ct(m),[H]=de.useState(Ur),U=A.date||new Date(H-18e5),z=O.date||new Date,M={startDate:U,endDate:z};let L=z;S&&m==="now"&&(L=new Date(z),L.setHours(L.getHours()+1));let F;s[11]!==L||s[12]!==U?(F={startDate:U,endDate:L},s[11]=L,s[12]=U,s[13]=F):F=s[13];const B=F;let V=0;D.length>0&&V++,_.length>0&&V++,v&&V++,n!=="all"&&V++,j&&V++;const W=I.filter(Ar);W.length>0&&(V=V+W.length);let E;s[14]!==e?(E=e("orgs.monitoring.title"),s[14]=e,s[15]=E):E=s[15];let G;s[16]!==E?(G=t.jsx(vt.Container,{className:"!pb-3",children:t.jsx(vt.Title,{children:E})}),s[16]=E,s[17]=G):G=s[17];let K;s[18]!==e?(K=e("orgs.monitoring.failedLoadTitle"),s[18]=e,s[19]=K):K=s[19];let R;s[20]!==e?(R=e("orgs.monitoring.failedLoadDescription"),s[20]=e,s[21]=R):R=s[21];let P;s[22]!==K||s[23]!==R?(P=t.jsx(vt.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(es,{title:K,description:R})})}),s[22]=K,s[23]=R,s[24]=P):P=s[24];let te;s[25]!==G||s[26]!==P?(te=t.jsxs(t.Fragment,{children:[G,P]}),s[25]=G,s[26]=P,s[27]=te):te=s[27];let q;s[28]!==e?(q=e("orgs.monitoring.title"),s[28]=e,s[29]=q):q=s[29];let J;s[30]!==q?(J=t.jsx(vt.Title,{children:q}),s[30]=q,s[31]=J):J=s[31];let X;s[32]!==e?(X=e("orgs.monitoring.overview"),s[32]=e,s[33]=X):X=s[33];let Y;s[34]!==X?(Y={id:"overview",label:X},s[34]=X,s[35]=Y):Y=s[35];let Q;s[36]!==e?(Q=e("orgs.monitoring.audit"),s[36]=e,s[37]=Q):Q=s[37];let fe;s[38]!==Q?(fe={id:"audit",label:Q},s[38]=Q,s[39]=fe):fe=s[39];let Z;s[40]!==e?(Z=e("orgs.monitoring.chats"),s[40]=e,s[41]=Z):Z=s[41];let me;s[42]!==Z?(me={id:"threads",label:Z},s[42]=Z,s[43]=me):me=s[43];let ae;s[44]!==e?(ae=e("orgs.monitoring.automations"),s[44]=e,s[45]=ae):ae=s[45];let ce;s[46]!==ae?(ce={id:"automations",label:ae},s[46]=ae,s[47]=ce):ce=s[47];let re;s[48]!==Y||s[49]!==fe||s[50]!==me||s[51]!==ce?(re=[Y,fe,me,ce],s[48]=Y,s[49]=fe,s[50]=me,s[51]=ce,s[52]=re):re=s[52];let se;s[53]!==k?(se=ie=>k({tab:ie}),s[53]=k,s[54]=se):se=s[54];let oe;s[55]!==re||s[56]!==se||s[57]!==h?(oe=t.jsx($s,{placement:"page",tabs:re,activeTab:h,onTabChange:se}),s[55]=re,s[56]=se,s[57]=h,s[58]=oe):oe=s[58];let le;s[59]!==J||s[60]!==oe?(le=t.jsx(vt.Container,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[J,oe]})}),s[59]=J,s[60]=oe,s[61]=le):le=s[61];let ne;s[62]!==h?(ne=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(cs.Skeleton,{})}):h==="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[62]=h,s[63]=ne):ne=s[63];let xe;s[64]!==le||s[65]!==ne?(xe=t.jsxs(t.Fragment,{children:[le,ne]}),s[64]=le,s[65]=ne,s[66]=xe):xe=s[66];let $;s[67]!==C?($=ie=>{ss("monitoring_time_range_changed",{from:ie.from,to:ie.to}),C(ie)},s[67]=C,s[68]=$):$=s[68];let ee;s[69]!==S||s[70]!==k?(ee=()=>{ss("monitoring_live_toggled",{enabled:!S}),k({streaming:!S})},s[69]=S,s[70]=k,s[71]=ee):ee=s[71];let ue;return s[72]!==h||s[73]!==k?(ue=ie=>{ie!==h&&ss("monitoring_tab_changed",{from_tab:h,to_tab:ie}),k({tab:ie})},s[72]=h,s[73]=k,s[74]=ue):ue=s[74],t.jsx(sl,{capability:"monitoring:view",area:"monitoring",children:t.jsx(vt,{children:t.jsx(Ys,{fallback:te,children:t.jsx(de.Suspense,{fallback:xe,children:t.jsx(Or,{tab:h,dateRange:B,displayDateRange:M,connectionIds:D,virtualMcpIds:_,tool:v,status:n,search:f,streaming:S,hideSystem:j,activeFiltersCount:V,from:u,to:m,propertyFilters:I,onUpdateFilters:k,onTimeRangeChange:$,onStreamingToggle:ee,onTabChange:ue})})})})})}function Ar(s){return s.key.trim()}function Ur(){return Date.now()}export{wn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,bv as F,bw as q,j as d,et as B,bq as x,bo as E,er as K,br as C,es as w,dk as T,bH as _,bG as U,bL as V}from"./index-
|
|
1
|
+
import{r as s,bv as F,bw as q,j as d,et as B,bq as x,bo as E,er as K,br as C,es as w,dk as T,bH as _,bG as U,bL as V}from"./index-J-HhaIRe.js";var I="Radio",[H,k]=_(I),[z,W]=H(I),P=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(z,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});P.displayName=I;var G="RadioIndicator",g=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(G,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});g.displayName=G;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=_(y,[w,k]),j=w(),N=k(),[Q,Z]=J(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=F(R),[b,h]=q({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(B,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",L=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{Y.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(P,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});L.displayName=M;var $="RadioGroupIndicator",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(g,{...e,...n,ref:c})});O.displayName=$;var oe=D,re=L,te=O;export{re as I,oe as R,te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as r}from"./index-
|
|
1
|
+
import{c as s,j as r}from"./index-J-HhaIRe.js";import{D as n,b as c}from"./decopilot-DOWkbqe-.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 +1 @@
|
|
|
1
|
-
import{cq as _}from"./index-
|
|
1
|
+
import{cq as _}from"./index-J-HhaIRe.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
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,e6 as uc,e7 as Kf,aO as Uf,e8 as Kt,e9 as _f,l as dc}from"./index-KNPlu-mw.js";import{d as qf,g as Jf}from"./gateway-client-D1O6ejnK.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-BGeIGaOQ.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-BRcoMCQk.js";import{I as oh}from"./input-G3Dl_oju.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-utbnY1tD.js";import{T as ah,a as ch,c as uh}from"./tooltip-6YWTYe8Z.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,e6 as uc,e7 as Kf,aO as Uf,e8 as Kt,e9 as _f,l as dc}from"./index-J-HhaIRe.js";import{d as qf,g as Jf}from"./gateway-client-CrkEu4dZ.js";import{d as Gf,c as Yf,e as Xf,b as Qf,D as Zf}from"./dialog-DTxKdk6B.js";import{a as eh,F as th,b as nh,c as rh,d as ih,f as sh}from"./form-Bw33z1SA.js";import{I as oh}from"./input-D5ksR5GW.js";import{t as dl}from"./utils-CVEq3hMx.js";import{a as lh}from"./org-file-open-context-DLYT0cgI.js";import{T as ah,a as ch,c as uh}from"./tooltip-CvsJoQ2r.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(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,f as p,ah as u,j as s,aK as x,N as a}from"./index-
|
|
1
|
+
import{c,f as p,ah as u,j as s,aK as x,N as a}from"./index-J-HhaIRe.js";import{C as j}from"./capability-load-error-qgxNzLRH.js";function d(){const t=c.c(21);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:f}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(f){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("registry:manage")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/store",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("monitoring:view")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}if(i("members:manage")){let e;return t[17]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[17]=r,t[18]=e):e=t[18],e}let n;return t[19]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[19]=r,t[20]=n):n=t[20],n}export{d as default};
|
package/dist/client/assets/{infiniteQueryObserver-BZK90Cxs.js → infiniteQueryObserver-Bp62E0f5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dq as g,dH as d,dI as v}from"./index-
|
|
1
|
+
import{dq as g,dH as d,dI as v}from"./index-J-HhaIRe.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
|