decocms 4.524.1 → 4.524.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-Bp4fmUBo.js → ActiveShapeUtils-CZUL4aQf.js} +1 -1
- package/dist/client/assets/{AlertCircle-Bq5T03B8.js → AlertCircle-CHPvy_VM.js} +1 -1
- package/dist/client/assets/{AreaChart-CCyND0Jp.js → AreaChart-DXZAxruT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Bwi_Jr7f.js → ArrowLeft-D_5CBumM.js} +1 -1
- package/dist/client/assets/{ArrowUp-CzX0fTk7.js → ArrowUp-DhHGL7HY.js} +1 -1
- package/dist/client/assets/{BarChart-wLDzzyOQ.js → BarChart-D1RHjiDU.js} +1 -1
- package/dist/client/assets/{Building02-A_MT9tNO.js → Building02-Cs-fRF4C.js} +1 -1
- package/dist/client/assets/{CartesianChart-B0qX_dpC.js → CartesianChart-B6XqwP69.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BDZ_2Tmn.js → CategoricalChart-CiyWbCkx.js} +1 -1
- package/dist/client/assets/{CheckCircle-BE1i_X4b.js → CheckCircle-DFdmK-T2.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DNrt0MHW.js → ChevronSelectorVertical-B7yaofOD.js} +1 -1
- package/dist/client/assets/{ChevronUp-RlBkcpdd.js → ChevronUp-PedQ2gd6.js} +1 -1
- package/dist/client/assets/{Copy01-B9x501ud.js → Copy01-B6cJ_ygs.js} +1 -1
- package/dist/client/assets/{CreditCard01-Bu_qRR36.js → CreditCard01-bH_MgXhH.js} +1 -1
- package/dist/client/assets/{DotsVertical-D9231JAc.js → DotsVertical-B50qkKfK.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-PGp8cmoe.js → ErrorBarContext-D3MOF1QH.js} +1 -1
- package/dist/client/assets/{Globe04-DQlP6Nhr.js → Globe04-BvSQLcQH.js} +1 -1
- package/dist/client/assets/{Image01-ClayPF_a.js → Image01-D6z5fxVv.js} +1 -1
- package/dist/client/assets/{Key01-CxKYO-oQ.js → Key01-DIVY2Gpo.js} +1 -1
- package/dist/client/assets/{Link01-B7BHRxIW.js → Link01-D806UI0V.js} +1 -1
- package/dist/client/assets/{LinkBroken01-XqJUgSE7.js → LinkBroken01-Be879sLY.js} +1 -1
- package/dist/client/assets/{Minus-Bh6ogRng.js → Minus-DVOE0qZc.js} +1 -1
- package/dist/client/assets/{Monitor01-BpzvJnXA.js → Monitor01-CP0zz7rW.js} +1 -1
- package/dist/client/assets/{Play-w4omVTRa.js → Play-DG-gbp_U.js} +1 -1
- package/dist/client/assets/{Plus-CcJNnBya.js → Plus-feGO5xhL.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CI6ZmeJ0.js → ReferenceLine-oNnV1mWS.js} +1 -1
- package/dist/client/assets/{SearchMd-5lGv5a5H.js → SearchMd-OqihyBBE.js} +1 -1
- package/dist/client/assets/{Sector-gkUUnvA4.js → Sector-BH34m5G1.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-C82UeRR9.js → ShoppingBag01-ZgB-qLs9.js} +1 -1
- package/dist/client/assets/{Sun-IvvKZ51n.js → Sun-DQ0xzUJx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B1MoYKPo.js → SwitchHorizontal01-Dsf5zpNu.js} +1 -1
- package/dist/client/assets/{Tool01-BvlRH5Ln.js → Tool01-PlDxztWD.js} +1 -1
- package/dist/client/assets/{Trash01-C9E8l_mI.js → Trash01-BqnutNRJ.js} +1 -1
- package/dist/client/assets/{Upload01-mlw10ZK-.js → Upload01-CyyevXMg.js} +1 -1
- package/dist/client/assets/{UserSquare-DwNuAluZ.js → UserSquare-Csbu2VpZ.js} +1 -1
- package/dist/client/assets/{Users01-DcHPIKgH.js → Users01-BSztUOd5.js} +1 -1
- package/dist/client/assets/{XClose-BBReaSBA.js → XClose-CGLyFs-P.js} +1 -1
- package/dist/client/assets/{ZoomOut-CnbxUNSo.js → ZoomOut-DTBYck8o.js} +1 -1
- package/dist/client/assets/{access-gate-BNOWXoYR.js → access-gate-CQo9WEtv.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CEj8kbGq.js → add-connection-dialog-BXhPQM8W.js} +1 -1
- package/dist/client/assets/agent-analytics-C4isBTY7.js +1 -0
- package/dist/client/assets/agent-app-BakS5Mpg.js +1 -0
- package/dist/client/assets/{agent-assets-CppO2yKd.js → agent-assets-DPXKGmqE.js} +1 -1
- package/dist/client/assets/{agent-automation-BtSTyUKu.js → agent-automation-68EhX00q.js} +1 -1
- package/dist/client/assets/{agent-automations-Bf-0_57T.js → agent-automations-XvbfNN1P.js} +1 -1
- package/dist/client/assets/agent-calendar-rlwx6fiZ.js +1 -0
- package/dist/client/assets/{agent-connect-sources-C_0x6Udu.js → agent-connect-sources-D3zK6Sae.js} +1 -1
- package/dist/client/assets/agent-deck-uq6T-H5n.js +1 -0
- package/dist/client/assets/{agent-e2e-DokyQFgS.js → agent-e2e-DQcmFy3H.js} +1 -1
- package/dist/client/assets/agent-experiments-D3cQ-WP1.js +1 -0
- package/dist/client/assets/{agent-file-B5Z-mSXW.js → agent-file-JtT0MyWr.js} +1 -1
- package/dist/client/assets/{agent-hosting-v3_GHpmO.js → agent-hosting-BxPrxIfg.js} +1 -1
- package/dist/client/assets/{agent-icon-KvVT3fA8.js → agent-icon-CTGtlw1z.js} +1 -1
- package/dist/client/assets/agent-library-C3l8PEn-.js +1 -0
- package/dist/client/assets/agent-library-file-CjRMeR9i.js +1 -0
- package/dist/client/assets/agent-monitor-BfPm0PfR.js +1 -0
- package/dist/client/assets/{agent-overview-9FhsI0nk.js → agent-overview-B9lC95oC.js} +1 -1
- package/dist/client/assets/{agent-releases-CRh6y5DW.js → agent-releases-OHw-HILT.js} +1 -1
- package/dist/client/assets/agent-settings-C3PrzQdK.js +1 -0
- package/dist/client/assets/{agent-site-editor-BALtgla6.js → agent-site-editor-DL4MgFcw.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CrwcPx-x.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DOS83K5A.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Cuy-72sw.js +1 -0
- package/dist/client/assets/agent-view-DIoRN3S4.js +1 -0
- package/dist/client/assets/{agent-view-guard-bPXLqLsK.js → agent-view-guard-BrroWBJx.js} +1 -1
- package/dist/client/assets/{agents-list-DrT_0gVh.js → agents-list-DIpYtUlJ.js} +1 -1
- package/dist/client/assets/{ai-providers-DorJXBZe.js → ai-providers-DJSUQnD1.js} +1 -1
- package/dist/client/assets/{alert-DEw5BVAh.js → alert-GbAkes7m.js} +1 -1
- package/dist/client/assets/{analytics-sections-g9foqwY5.js → analytics-sections-Bb2X2x1n.js} +1 -1
- package/dist/client/assets/{analytics-tab-D5KshkAH.js → analytics-tab-BmRbRV7j.js} +1 -1
- package/dist/client/assets/{api-keys-CIPiPSYY.js → api-keys-CUAWVknr.js} +1 -1
- package/dist/client/assets/api-keys-CYNApwkv.js +1 -0
- package/dist/client/assets/{app-editor-ChUXEXt-.js → app-editor-CyjHGv_R.js} +1 -1
- package/dist/client/assets/{asset-utils-DRJP317P.js → asset-utils-cXz86Lc9.js} +1 -1
- package/dist/client/assets/{auth-Dqt9menC.js → auth-Dfomi5JO.js} +1 -1
- package/dist/client/assets/{auth-catchall-B5Em8iaq.js → auth-catchall-CQPN8xxO.js} +1 -1
- package/dist/client/assets/{auth-entry-CNtzQsix.js → auth-entry-CopJeOJe.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BoWG-no5.js → auth-split-layout-DlqDAzsj.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BziZaG_M.js → authenticate-and-persist-oauth-CIjqyOtu.js} +1 -1
- package/dist/client/assets/{automation-list-row-BRtPLrxX.js → automation-list-row-DjtEQ2qE.js} +1 -1
- package/dist/client/assets/{automation-runs-C0-BhIZn.js → automation-runs-Fh82uxKP.js} +1 -1
- package/dist/client/assets/{automations-CXOQ5gKM.js → automations-v0vsa1w4.js} +1 -1
- package/dist/client/assets/{autosend-BRUzWk70.js → autosend-1kVbs2RQ.js} +1 -1
- package/dist/client/assets/{badge-Ckz5LqgP.js → badge-Cd6N93gT.js} +1 -1
- package/dist/client/assets/{block-document-BPaZQC5L.js → block-document-Eqc7jC1E.js} +1 -1
- package/dist/client/assets/blocks-preview-workspace-context-DmNovEJ2.js +1 -0
- package/dist/client/assets/{blocks-tab-states-BcxrQPOR.js → blocks-tab-states-EZ53-FeU.js} +1 -1
- package/dist/client/assets/{blog-schema-Du7ILh7Q.js → blog-schema-BIlyKinw.js} +1 -1
- package/dist/client/assets/{buckets-CKZYh6Ij.js → buckets-DeThgb1z.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DJhZN8lj.js → build-improve-prompt-doc-BhOi567C.js} +1 -1
- package/dist/client/assets/{calendar-DkZz5VlH.js → calendar-CZnHQIdE.js} +1 -1
- package/dist/client/assets/{campaigns-view-Dc88Zs16.js → campaigns-view-keHuDNLa.js} +1 -1
- package/dist/client/assets/{capability-load-error-CRB9otZt.js → capability-load-error-BoUVRT1s.js} +1 -1
- package/dist/client/assets/{category-editor-CSPe0t_-.js → category-editor-CRQwImqd.js} +1 -1
- package/dist/client/assets/{cdn-tab-KPAxnC3T.js → cdn-tab-DGJOOmwS.js} +1 -1
- package/dist/client/assets/{chart-Bp6om7lj.js → chart-DIxDpRCA.js} +1 -1
- package/dist/client/assets/chat-context-2letHrEJ.js +39 -0
- package/dist/client/assets/{chat-draft-OR83_S8w.js → chat-draft-BamZUeXG.js} +1 -1
- package/dist/client/assets/{checkbox-BQ7Ebuar.js → checkbox-vkygLbK1.js} +1 -1
- package/dist/client/assets/{choose-editor-CspgtGFS.js → choose-editor-CvBlgOf7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CGyir_iF.js → cli-auth-success-DbYRVqF9.js} +1 -1
- package/dist/client/assets/{client-icons-BOMFh2QS.js → client-icons-Byj2LmW_.js} +1 -1
- package/dist/client/assets/cms-settings-editor-2-st_NGk.js +1 -0
- package/dist/client/assets/{collapsible-BB8_usPT.js → collapsible-DsyQMORE.js} +1 -1
- package/dist/client/assets/{collection-detail-H-UqYky8.js → collection-detail-DWStyXoZ.js} +1 -1
- package/dist/client/assets/{collection-display-button-CulG1s8m.js → collection-display-button-DxqDuoDs.js} +1 -1
- package/dist/client/assets/{collection-search-Cf4li4kg.js → collection-search-BT_p6pKF.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DnZHa5Lt.js → collection-table-wrapper-Bu9UKC3v.js} +1 -1
- package/dist/client/assets/{collection-tabs-x8ccQUAC.js → collection-tabs-D6nWmqmK.js} +1 -1
- package/dist/client/assets/{column-rules-C_DWUbCh.js → column-rules-1_e0Bdla.js} +1 -1
- package/dist/client/assets/{combobox-BZoZToki.js → combobox-C05HI-BC.js} +1 -1
- package/dist/client/assets/{command-MmMDew8i.js → command-CPzIRDl7.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-By8_AO07.js → companion-mcps-section-8bJuflHh.js} +1 -1
- package/dist/client/assets/{config-DBn3iCC3.js → config-g4_iXJef.js} +1 -1
- package/dist/client/assets/{connect-layout-9tsE00M7.js → connect-layout-B0kvJrgY.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DqWilbbC.js → connect-source-dialog-Drua8oaC.js} +1 -1
- package/dist/client/assets/{connect-DbK_vN0J.js → connect-uOeiI1CS.js} +1 -1
- package/dist/client/assets/{connection-QGwhnKZn.js → connection-BHsOzStk.js} +1 -1
- package/dist/client/assets/{connection-card-DEMVrMsW.js → connection-card-CYaVyCqL.js} +1 -1
- package/dist/client/assets/{connection-detail-4PyaBO0_.js → connection-detail-C6xJbNuX.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DCRY9s0M.js → connection-form-helpers-D-t8mb0f.js} +1 -1
- package/dist/client/assets/{connections-CpcdB3jc.js → connections-D-CMEpMd.js} +1 -1
- package/dist/client/assets/{content-tab-YME7HMCb.js → content-tab-BplT8Wwk.js} +3 -3
- package/dist/client/assets/{context-oSwYvz9P.js → context-TIPHj43k.js} +1 -1
- package/dist/client/assets/{context-menu-Cpvztbef.js → context-menu-7c-Y-PHB.js} +1 -1
- package/dist/client/assets/{context-shell-BVBpRdKB.js → context-shell-n8IEtxwr.js} +3 -3
- package/dist/client/assets/{core.esm-B2cbbV3O.js → core.esm-Bp5Q1Stg.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-NLldLLor.js → create-organization-dialog-mPrO9oSa.js} +1 -1
- package/dist/client/assets/{daily-pulse-ClSeB_Ta.js → daily-pulse-C7I4Uxdj.js} +1 -1
- package/dist/client/assets/{discover-DmBynuR0.js → discover-7t1pJX8W.js} +1 -1
- package/dist/client/assets/{domain-settings-Cu3Pj63v.js → domain-settings-CXb5s0he.js} +1 -1
- package/dist/client/assets/{drawer-GssD8cb3.js → drawer-CtTfZzW7.js} +1 -1
- package/dist/client/assets/{editor-BTovmEAS.js → editor-BDmCsl05.js} +1 -1
- package/dist/client/assets/{editor-classes-CcPgajKG.js → editor-classes-BJAtiMt8.js} +1 -1
- package/dist/client/assets/{empty-state-DLNzdrwg.js → empty-state-BFtVVtPz.js} +1 -1
- package/dist/client/assets/{empty-state-D86P1Giw.js → empty-state-BpneGtoe.js} +1 -1
- package/dist/client/assets/{experiments-tab-CjpJzYQ9.js → experiments-tab-CLMcteix.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-pVOiMOWe.js → experiments-tab-choice-vFGVi3bn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DwkOg2rJ.js → extract-connection-data-CF7y2wEt.js} +1 -1
- package/dist/client/assets/{feature-gate-BIwsQPiQ.js → feature-gate-CM-Nk9xN.js} +1 -1
- package/dist/client/assets/{feature-paywall-DpVlsq5a.js → feature-paywall-CjqBZ6L8.js} +1 -1
- package/dist/client/assets/{file-explorer-B9Wz0lPl.js → file-explorer-BboVEb8_.js} +1 -1
- package/dist/client/assets/{file-preview-CX5xfaHR.js → file-preview-Bvo7zdtc.js} +1 -1
- package/dist/client/assets/{file-share-button-Cx66riM5.js → file-share-button-CXYkYNE_.js} +1 -1
- package/dist/client/assets/{file-type-icon-tAeiI9_2.js → file-type-icon-CjiJpbk5.js} +1 -1
- package/dist/client/assets/{folder-icon-C25vLo5g.js → folder-icon-BZUD34gC.js} +1 -1
- package/dist/client/assets/{form-CKF06Eu0.js → form-DrzlJwQH.js} +1 -1
- package/dist/client/assets/{general-CA7uhFzP.js → general-Cd6mSkL_.js} +1 -1
- package/dist/client/assets/{held-block-view-CU5t1B8c.js → held-block-view-R3GhxO1l.js} +3 -3
- package/dist/client/assets/{home-BuPVKVzx.js → home-CrEXzaHC.js} +1 -1
- package/dist/client/assets/{icon-button-5JlhYc9R.js → icon-button-j3Ikexya.js} +1 -1
- package/dist/client/assets/{index-D8kI0oe2.js → index-6M_m-_Us.js} +1 -1
- package/dist/client/assets/{index-B8bCJ3Gm.js → index-B7a1uePd.js} +1 -1
- package/dist/client/assets/{index-C4tYnNih.js → index-BJ9m9LNK.js} +7 -7
- package/dist/client/assets/{index-BLRFIWph.js → index-BZXHvOuQ.js} +1 -1
- package/dist/client/assets/{index-DQ4MCRAi.js → index-BhEe0I5z.js} +1 -1
- package/dist/client/assets/{index-CJ8-jtJ3.js → index-BjON6Ore.js} +1 -1
- package/dist/client/assets/{index-DG_Aoo8H.js → index-CPP16Pqo.js} +1 -1
- package/dist/client/assets/{index-CDfG-oXn.js → index-Cs2qsEhb.js} +1 -1
- package/dist/client/assets/{index-BerfNxBu.js → index-DEhrG7UG.js} +1 -1
- package/dist/client/assets/{index-DMcUJv3F.js → index-DO1wPTie.js} +1 -1
- package/dist/client/assets/{index-CieIETkx.js → index-DT3sLrgG.js} +1 -1
- package/dist/client/assets/{index-AY0yzUAx.js → index-Da5shA_7.js} +1 -1
- package/dist/client/assets/{index-CMXP-HlZ.js → index-Dj2ac1Ct.js} +1 -1
- package/dist/client/assets/index-DyS4s94t.js +1 -0
- package/dist/client/assets/{index-B0Hb2bUK.js → index-Zaz397OF.js} +1 -1
- package/dist/client/assets/{index-redirect-DSkhUiz1.js → index-redirect-Ch_11yeO.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CyNcT3qz.js → infiniteQueryObserver-CM3ITLPo.js} +1 -1
- package/dist/client/assets/{infra-billing-OmwhvZsy.js → infra-billing-D_W3RIFV.js} +1 -1
- package/dist/client/assets/input-DTDcy6hY.js +17 -0
- package/dist/client/assets/{input-Drj3v1Rm.js → input-DipMvobq.js} +1 -1
- package/dist/client/assets/{integration-icon-wG7mou98.js → integration-icon-gBiw8y2C.js} +1 -1
- package/dist/client/assets/{jira-icon-Ct9neMH3.js → jira-icon-Cus3NRDL.js} +1 -1
- package/dist/client/assets/{label-Kngegn1Y.js → label-BWO7BDzN.js} +1 -1
- package/dist/client/assets/{layout-D1PXm8wr.js → layout-C4eU6U_z.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CqqR00U7.js → legacy-agents-deep-CDxdVAmP.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-j5rWQTR7.js → legacy-main-redirect-BTqRcXg6.js} +1 -1
- package/dist/client/assets/library-CRTbwohf.js +1 -0
- package/dist/client/assets/{login-dCZC1OIS.js → login-UOHS7fQN.js} +1 -1
- package/dist/client/assets/{markdown-C-J5-sTt.js → markdown-BG06zpZJ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-vHEVQIZL.js → mcp-app-renderer-CxONPSoj.js} +1 -1
- package/dist/client/assets/{mcp-oauth-5QMuPFQa.js → mcp-oauth-C_vXn_zS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CnB7EPe0.js → mcp-oauth-hbfUsWSk.js} +1 -1
- package/dist/client/assets/{members-D62Ns7xb.js → members-DiPd0w69.js} +1 -1
- package/dist/client/assets/{memory-BRnI6IWM.js → memory-D7_gYCf3.js} +1 -1
- package/dist/client/assets/{mini-report-page-RV5HcY13.js → mini-report-page-DudoCNBc.js} +1 -1
- package/dist/client/assets/{mock-board-C5ljPU5m.js → mock-board-COFBA38P.js} +3 -3
- package/dist/client/assets/{monaco-editor-CG1RPml4.js → monaco-editor-Bp87HTy0.js} +1 -1
- package/dist/client/assets/{monitoring-kGWQYp7Z.js → monitoring-KjkBz5Hy.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BpfaRq5_.js → monitoring-stats-row-DZiWF0MT.js} +1 -1
- package/dist/client/assets/{multi-select-D79TIC6v.js → multi-select-ClUvymCl.js} +1 -1
- package/dist/client/assets/{mustache-BdHuXtQC.js → mustache-SEzsgR-s.js} +1 -1
- package/dist/client/assets/{named-rule-uses-DDsPTKwP.js → named-rule-uses-DBpP8kZW.js} +1 -1
- package/dist/client/assets/{named-rule-view-CelDjugE.js → named-rule-view-CIxMNPIR.js} +1 -1
- package/dist/client/assets/{new-project-dialog-DQPlctqf.js → new-project-dialog-BIxGYry7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ah6cR8xQ.js → oauth-callback-CgnzMW_h.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-C5jhPG9E.js → oauth-callback-ai-provider-CrNuoNuA.js} +1 -1
- package/dist/client/assets/{onboarding-BPgxXbEy.js → onboarding-CPcIJ7Kl.js} +1 -1
- package/dist/client/assets/{openai-conversation-COLqoqqY.js → openai-conversation-BVVfXB0S.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BXm7Dv06.js → optimistic-project-sidebar-views-CGrVGbzf.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DzTTlxAw.js → order-monitor-day-_COSpI9X.js} +1 -1
- package/dist/client/assets/{organization-choice-CMYQUq77.js → organization-choice-DM-i-ste.js} +1 -1
- package/dist/client/assets/{orgs-Cb-j6SHO.js → orgs-DBGdo2ep.js} +1 -1
- package/dist/client/assets/{page-seo-form-CCa1Xirx.js → page-seo-form-B-bTZXwI.js} +1 -1
- package/dist/client/assets/{pair-CRFLUGB-.js → pair-CeWIXyL1.js} +1 -1
- package/dist/client/assets/{parse-sections-CBOr5TcU.js → parse-sections-CzJo2WgK.js} +1 -1
- package/dist/client/assets/{plan-CZiCKWsL.js → plan-6sf6fzbJ.js} +1 -1
- package/dist/client/assets/{plan-ladder-Clu_D1dM.js → plan-ladder-Co29049V.js} +1 -1
- package/dist/client/assets/{popover-7hw0_Cgu.js → popover-C5Dt3qOY.js} +1 -1
- package/dist/client/assets/{post-calendar-oSfCtk_Z.js → post-calendar-DOKKScLr.js} +1 -1
- package/dist/client/assets/{post-editor-DqdLoENq.js → post-editor-L6XkKTbk.js} +1 -1
- package/dist/client/assets/{preview-content-tpqwn9DV.js → preview-content-CY8QtGeB.js} +1 -1
- package/dist/client/assets/{preview-dialog-DDUA3zbn.js → preview-dialog-SFPfuPhe.js} +1 -1
- package/dist/client/assets/{preview-panel-B7KDfk34.js → preview-panel-DG1XweCF.js} +1 -1
- package/dist/client/assets/{preview-tab-CwHbL-uL.js → preview-tab-CppK1K1V.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-q_j-OMur.js → product-picker-dialog-B-qJRXdq.js} +1 -1
- package/dist/client/assets/{profile--UpTdMEW.js → profile-CogKW0ml.js} +1 -1
- package/dist/client/assets/{project-app-view-BDtUwetx.js → project-app-view-Bg0IXTwt.js} +1 -1
- package/dist/client/assets/{project-apps-M24hPHW2.js → project-apps-BWyBTcjU.js} +1 -1
- package/dist/client/assets/{project-feed-Dm5w30sM.js → project-feed-BbnYaqgF.js} +1 -1
- package/dist/client/assets/{project-icon-BlULUcrw.js → project-icon-OmAeiXOI.js} +1 -1
- package/dist/client/assets/project-reports-C4fNYK5h.js +1 -0
- package/dist/client/assets/project-tasks-CiUIlBvj.js +1 -0
- package/dist/client/assets/{projects-C9fr3jni.js → projects-ScLrP0Sq.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DRas-7X9.js → projects-empty-state-DySkSTbO.js} +1 -1
- package/dist/client/assets/{prompts-CiGgpCOz.js → prompts-fqxplS8t.js} +1 -1
- package/dist/client/assets/record-editor-Cd5kCJv3.js +1 -0
- package/dist/client/assets/{redirect-editor-DbPiIIKk.js → redirect-editor-CiqrxPXo.js} +1 -1
- package/dist/client/assets/{releases-api-DA_Oz9WG.js → releases-api-CughGviB.js} +1 -1
- package/dist/client/assets/reports-D4nL6cfo.js +1 -0
- package/dist/client/assets/{reports-Czva0tSD.js → reports-DoXSUp0p.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BsOWdPaY.js → reports-onboarding-CvtUysYm.js} +1 -1
- package/dist/client/assets/{reports-tab-C2STfD1k.js → reports-tab-DGGd_cJc.js} +2 -2
- package/dist/client/assets/repositories-CX881Zmd.js +1 -0
- package/dist/client/assets/{repositories-Dp2o7kK8.js → repositories-DiF_6MDk.js} +1 -1
- package/dist/client/assets/{repository-binding-C7GXruB1.js → repository-binding-5kMOX4dj.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BIFRKH2H.js → repository-import-picker-Cf-mDDmo.js} +1 -1
- package/dist/client/assets/{repository-picker-D6fEwnOk.js → repository-picker-BN84wENn.js} +1 -1
- package/dist/client/assets/{require-capability-DSeRbn1u.js → require-capability-d9R-dYdO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D4yn4VOg.js → required-auth-layout-DojZ1KGX.js} +1 -1
- package/dist/client/assets/{reset-password-CLlk4Qyg.js → reset-password-DSQJZEJs.js} +1 -1
- package/dist/client/assets/{resizable-B3zVq59U.js → resizable-DaKs1eh5.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-NGCKQk4u.js → resolve-tab-icon-E0pJTGSy.js} +1 -1
- package/dist/client/assets/{review-settings-ChOJMpqj.js → review-settings-B7m9uNKt.js} +1 -1
- package/dist/client/assets/{roles-034YEIy0.js → roles-sT7X7xzB.js} +1 -1
- package/dist/client/assets/{route-DixoE7S2.js → route-BiPjYs2Q.js} +1 -1
- package/dist/client/assets/{route-D3_kGiYP.js → route-CO4TvlsY.js} +1 -1
- package/dist/client/assets/route-qbvcUo1A.js +1 -0
- package/dist/client/assets/sandbox-lifecycle-context-BdO8UXfQ.js +1 -0
- package/dist/client/assets/{schema-DXQBt-Da.js → schema-Bp5lazAd.js} +1 -1
- package/dist/client/assets/{schema-DIZqRcY2.js → schema-HyTKqr-p.js} +1 -1
- package/dist/client/assets/{scroll-area-BYOXOcFm.js → scroll-area-ButOmQch.js} +1 -1
- package/dist/client/assets/{search-input-CM9T7koR.js → search-input-N6CaOC_1.js} +1 -1
- package/dist/client/assets/{search-toggle-BA_oiAdj.js → search-toggle-hVjf6-kQ.js} +1 -1
- package/dist/client/assets/{secret-picker-D2Cr-oRZ.js → secret-picker-DbQaPqx6.js} +1 -1
- package/dist/client/assets/{secrets-BRbaixQo.js → secrets-CkR4uy6Z.js} +1 -1
- package/dist/client/assets/{section-array-field-TQFJqwVV.js → section-array-field-Lr-feKpQ.js} +1 -1
- package/dist/client/assets/{sections-05hBo9NL.js → sections-BM3hOdfC.js} +1 -1
- package/dist/client/assets/{sections-editor-BR_A8Bqr.js → sections-editor-DLgM9lBb.js} +1 -1
- package/dist/client/assets/{select-BZ2tKCpr.js → select-BwZ3fxwy.js} +1 -1
- package/dist/client/assets/{select-model-DskJe0jJ.js → select-model-B5VqF5aQ.js} +1 -1
- package/dist/client/assets/{seo-editor-DWsRiK1b.js → seo-editor-Bpy9Dzdq.js} +1 -1
- package/dist/client/assets/{separator-DdBbm1xl.js → separator-BJ59N-4S.js} +1 -1
- package/dist/client/assets/settings-tab-CA-W7UU2.js +1 -0
- package/dist/client/assets/{sheet-DYw2VD7L.js → sheet-CFaQrFou.js} +1 -1
- package/dist/client/assets/{shell-layout-DQPoLlFW.js → shell-layout-BmOtysoG.js} +1 -1
- package/dist/client/assets/{site-draft-actions-dD4jyBUz.js → site-draft-actions-DQSFILpp.js} +1 -1
- package/dist/client/assets/site-draft-view-FIwQQWqm.js +2 -0
- package/dist/client/assets/site-editor-pGVB_SVm.js +1 -0
- package/dist/client/assets/{site-editor-toast-gO0geSY6.js → site-editor-toast-Drt9__vU.js} +1 -1
- package/dist/client/assets/{skills-BG0VOLIN.js → skills-CuAtdce2.js} +1 -1
- package/dist/client/assets/{slider-ApiojjsY.js → slider-9xLURN_x.js} +1 -1
- package/dist/client/assets/{sortable.esm-DPfgkRcd.js → sortable.esm-DKvN4I2-.js} +1 -1
- package/dist/client/assets/{sso-CfSDpa9Z.js → sso-Bt0VIDB0.js} +1 -1
- package/dist/client/assets/{suggestion-DTo0Z5su.js → suggestion-B65JiyPM.js} +1 -1
- package/dist/client/assets/{switch-B3v6apDN.js → switch-DAskixZA.js} +1 -1
- package/dist/client/assets/{symbol-pDh9bf5z.js → symbol-DHBzZbeR.js} +1 -1
- package/dist/client/assets/{synced-repos-oiGV5Ihu.js → synced-repos-CE8wN2_N.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BzFDI553.js → tab-icon-glyph-CpaZMvdV.js} +1 -1
- package/dist/client/assets/{table-CANIhtsr.js → table-gy7RNGr-.js} +1 -1
- package/dist/client/assets/{tabs-B5O9VNwn.js → tabs-BIh8PZDT.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-BOAf_3H_.js → task-assignee-avatar-T0yhZapD.js} +1 -1
- package/dist/client/assets/{task-board-CBBaN9ua.js → task-board-DDJJrv54.js} +1 -1
- package/dist/client/assets/{task-route-1lojPQeZ.js → task-route-BuxqCGZd.js} +1 -1
- package/dist/client/assets/{task-status-DM1NBqlc.js → task-status-B-hiqAeK.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DK79qp1-.js → taskboard-analytics-CACHd6vk.js} +1 -1
- package/dist/client/assets/{tasks-Czi5B_ZB.js → tasks-CPyoTCOO.js} +1 -1
- package/dist/client/assets/tasks-CyRF0ujk.js +1 -0
- package/dist/client/assets/{textarea-CAZh8Kr5.js → textarea-B-cDk_e9.js} +1 -1
- package/dist/client/assets/{thread-analytics-K9PkKnHr.js → thread-analytics-DKFvK1DN.js} +1 -1
- package/dist/client/assets/{thread-intent-B9ceQWmI.js → thread-intent-DXpv35UG.js} +1 -1
- package/dist/client/assets/{thread-route-gmMlW4oz.js → thread-route-BZKbOQYe.js} +1 -1
- package/dist/client/assets/{thread-route-_-Jo9yAq.js → thread-route-Dp-aglxM.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-ClyiLZhS.js → thread-sheet-body-CRJRoIwG.js} +1 -1
- package/dist/client/assets/{time-range-picker-m7OMfbU0.js → time-range-picker-B1ueoxPR.js} +1 -1
- package/dist/client/assets/{toggle-group-8XrNtMoS.js → toggle-group-B4WOnAP4.js} +1 -1
- package/dist/client/assets/{tool-namespace-cn6zTT0m.js → tool-namespace-BDVFYO2h.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-fBm5AosV.js → toolbar-icon-button-CsFCKDkl.js} +1 -1
- package/dist/client/assets/{tooltip-B1eS9Khq.js → tooltip-BP50pkvP.js} +1 -1
- package/dist/client/assets/{tooltipContext-DMiC5t9-.js → tooltipContext-C8XbU8o0.js} +1 -1
- package/dist/client/assets/{track-BcscPlt3.js → track-CDPTw9ZB.js} +1 -1
- package/dist/client/assets/{types-C_LaIhQe.js → types-G5N7kkmB.js} +1 -1
- package/dist/client/assets/{url-slug-BEmF9qH1.js → url-slug-D6AdbSqw.js} +1 -1
- package/dist/client/assets/{usage-stats-DtO_zGwF.js → usage-stats-n069Pf6u.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C315xBlf.js → use-ai-providers-BCXdfWt4.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-9ihG8ELj.js → use-apply-named-rule-2pgSelD5.js} +1 -1
- package/dist/client/assets/{use-automations-BpSvam4M.js → use-automations-Ch5lNT3Y.js} +1 -1
- package/dist/client/assets/{use-autosave-CRCl3eTr.js → use-autosave-DnUFhq5-.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-ByIICjWr.js → use-chat-layout-state-Boq7M7MG.js} +1 -1
- package/dist/client/assets/{use-clock-tick-QAJndZ00.js → use-clock-tick-C7RLnGnY.js} +1 -1
- package/dist/client/assets/{use-connect-companion-rEYy0Kcd.js → use-connect-companion-w3O3zQJZ.js} +1 -1
- package/dist/client/assets/{use-connection-CBlLT-Gl.js → use-connection-SBf1IMNR.js} +1 -1
- package/dist/client/assets/{use-content-sync-TKItZ8SP.js → use-content-sync-BL9rGIyO.js} +1 -1
- package/dist/client/assets/{use-copy-C9NYM8DB.js → use-copy-Dgppamoo.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DFsMYI92.js → use-create-virtual-mcp-DE2rukKQ.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-bL-I5mOj.js → use-date-fns-locale-MUGqYczL.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DfJudaYl.js → use-debounced-autosave-C_xNyGJY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DOPKXMfX.js → use-debounced-value-Cf0I7A9v.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DL_DG4I5.js → use-deco-credits-Dna90E4X.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-4yDcDH2I.js → use-decopilot-events-8w_hmlMJ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-3ef0jZgj.js → use-delete-connection-ClNsS7Ho.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C2GaZpz9.js → use-deployment-admin-4YEWaFep.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CN-8cYCq.js → use-fast-preview-draft-url-Bc3gs7gV.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dfr8whNN.js → use-file-configs-B-wH52y_.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-UXhkZ9eS.js → use-inbox-feed-Ci3vPrJA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-WEv8wBk9.js → use-infinite-scroll-BIzBYJCu.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bf1nx4BW.js → use-join-requests-DP8Apzuq.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CnvhH3AB.js → use-main-panel-tabs-CYcYIai-.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Dxn8Kcei.js → use-mcp-auth-status-CNLX3LBK.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BkBWhGyj.js → use-mcp-client-Do4_ndrI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DWjSk3XQ.js → use-mcp-prompts-BtZywK26.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cq-ES3mk.js → use-mcp-tools-D588moK7.js} +1 -1
- package/dist/client/assets/{use-mobile-BADuLdb7.js → use-mobile-CMu6UtqS.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Ds_0OJ4H.js → use-move-blocks-0Xns2gtz.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B3bMlZK-.js → use-navigate-to-agent-BhR34hZR.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Dfpg8Tio.js → use-open-billing-url-C2ZKl_OJ.js} +1 -1
- package/dist/client/assets/{use-org-fs-Dt6mQNyr.js → use-org-fs-Bmjx4Cik.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-D2j2_BKY.js → use-org-repo-syncs-BSAcLSvr.js} +1 -1
- package/dist/client/assets/{use-org-sso-CWvWEDQk.js → use-org-sso-C2CyZRUp.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DsjUZx1i.js → use-organization-roles-DSCc1iIP.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DBQ6GIch.js → use-organization-settings-DMgbBKf8.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DZO4-0o6.js → use-panel-navigate-o6edpcRi.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-Y3Sopx8q.js → use-project-native-view-presence-CiNgXr_r.js} +1 -1
- package/dist/client/assets/{use-project-scope-CKNjz3VB.js → use-project-scope-2Tdoer5a.js} +1 -1
- package/dist/client/assets/{use-recent-apps-TrfPEwKE.js → use-recent-apps-D4vko3CW.js} +1 -1
- package/dist/client/assets/{use-releases-DSFeRsP3.js → use-releases-CZIw49MO.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-YBAEN0Wc.js → use-reports-diagnostic-D1hUsQ-k.js} +1 -1
- package/dist/client/assets/use-sandbox-events-BGso5ik2.js +2 -0
- package/dist/client/assets/{use-secrets-xwuuJgHg.js → use-secrets-B4A-mk96.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BdMX2uY9.js → use-section-preview-base-7CyzrhDh.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CtTWKH1c.js → use-session-runtime-CbMaO8p7.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DXyrU3VA.js → use-sidebar-collapsed-CI6KBWLr.js} +1 -1
- package/dist/client/assets/{use-tags-CwZHa3pE.js → use-tags-lzJX123E.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BzPvlYE9.js → use-task-board-analytics-BzMGYkMt.js} +1 -1
- package/dist/client/assets/{use-task-board-events-qI_skUMm.js → use-task-board-events-DoQeMblf.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CiXpN6jW.js → use-task-board-item-prs-C1DrMHVS.js} +1 -1
- package/dist/client/assets/{use-task-metadata-E8aNM85o.js → use-task-metadata-DKj0uikU.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DKupwFaR.js → use-thread-analytics-C147IXlL.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Di1RSISN.js → use-thread-outputs-sdt1CHHh.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cq3QQD7o.js +1 -0
- package/dist/client/assets/{useQueries-BOzKsoXi.js → useQueries-B2KTxxDE.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-jjzI6K-a.js +1 -0
- package/dist/client/assets/{users-Cup6bGNw.js → users-B-OmSt3n.js} +1 -1
- package/dist/client/assets/{utils-wTX1Gyo-.js → utils-muk7Isuo.js} +1 -1
- package/dist/client/assets/{variant-calendar-Doi5lHFb.js → variant-calendar-DE-GxRhT.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-LGFgaSJn.js → variant-matcher-override-CDXRGILn.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DO56RLOP.js → virtual-mcp-C5K9GZ-3.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BBTCM7MS.js → watch-sse-pool-BzTIkVFy.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1102 -1102
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-DcqQcnI_.js +0 -1
- package/dist/client/assets/agent-app-BWM9EEcJ.js +0 -1
- package/dist/client/assets/agent-calendar-Bp6Y1tPy.js +0 -1
- package/dist/client/assets/agent-deck-BOaej8yV.js +0 -1
- package/dist/client/assets/agent-experiments-7O17P9sC.js +0 -1
- package/dist/client/assets/agent-library-B3W6CGJl.js +0 -1
- package/dist/client/assets/agent-library-file-CHgoG2j3.js +0 -1
- package/dist/client/assets/agent-monitor-C9pMT5KA.js +0 -1
- package/dist/client/assets/agent-settings-CfNarIdW.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D6BBbIl8.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DAMOp9X5.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-B0IbykqU.js +0 -1
- package/dist/client/assets/agent-view-B5q0EqmS.js +0 -1
- package/dist/client/assets/api-keys-B-qwgNok.js +0 -1
- package/dist/client/assets/blocks-preview-workspace-context-C-uj3YG0.js +0 -1
- package/dist/client/assets/chat-context-CIOqAIIy.js +0 -39
- package/dist/client/assets/cms-settings-editor-DbU_3ksB.js +0 -1
- package/dist/client/assets/index-Bz0XRw1e.js +0 -1
- package/dist/client/assets/input-C0IBlV9i.js +0 -17
- package/dist/client/assets/library-BB_eexuL.js +0 -1
- package/dist/client/assets/project-reports-BXESPzCU.js +0 -1
- package/dist/client/assets/project-tasks-CRajXa6Z.js +0 -1
- package/dist/client/assets/record-editor-Dw_A1nYV.js +0 -1
- package/dist/client/assets/reports-I3thcjRj.js +0 -1
- package/dist/client/assets/repositories-B5BeE82u.js +0 -1
- package/dist/client/assets/route-B9sbaFmI.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-DS1zxfZb.js +0 -1
- package/dist/client/assets/settings-tab-5QV5D7iT.js +0 -1
- package/dist/client/assets/site-draft-view-Ds5aQAqU.js +0 -2
- package/dist/client/assets/site-editor-D8vmphjE.js +0 -1
- package/dist/client/assets/tasks--LaoDxg8.js +0 -1
- package/dist/client/assets/use-sandbox-events-C6ionJ0p.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CtWUiDbh.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Diw12fEI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g1 as O,aX as U,c as P,j as r,r as G,M as ee,b as F,B as K,a4 as te,K as Q,q as se,l as ne,o as re}from"./index-C4tYnNih.js";import{u as ae}from"./useSuspenseInfiniteQuery-Diw12fEI.js";import{S as ie,c as le}from"./sheet-DYw2VD7L.js";import{n as oe,t as ce}from"./ChevronUp-RlBkcpdd.js";import{n as W}from"./LinkBroken01-XqJUgSE7.js";import{u as de,M as ue}from"./pair-CRFLUGB-.js";import{D as me}from"./chat-context-CIOqAIIy.js";import{I as X}from"./integration-icon-wG7mou98.js";import{b as fe}from"./use-decopilot-events-4yDcDH2I.js";import{u as ge}from"./use-infinite-scroll-WEv8wBk9.js";import{g as xe}from"./task-status-DM1NBqlc.js";const A=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],he=40;function Ke(t){const s=(t.endDate.getTime()-t.startDate.getTime())/he;return A.find(i=>i.ms>=s)?.label??A[A.length-1].label}function B(t){const e=A.find(l=>l.label===t);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(t);if(!s)return 6e4;const n=parseInt(s[1],10),i=s[2];return i==="h"?n*36e5:i==="d"?n*864e5:n*6e4}function pe(t,e){const s=new Date(t);return B(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function H(t,e){const s=B(e);return new Date(Math.floor(t.getTime()/s)*s)}function be(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function He(t){return Number.isFinite(t)?t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toLocaleString():"0"}function Oe(t){return Number.isFinite(t)?`$${t.toFixed(t<1?4:2)}`:"$0.00"}function Ue(t,e,s){const n=B(s),i=H(e.startDate,s).getTime(),l=e.endDate.getTime(),a=new Map(t.map(c=>[H(new Date(c.timestamp),s).getTime(),c])),d=[];for(let c=i;c<=l;c+=n){const m=a.get(c),h=new Date(c).toISOString();d.push({t:h,ts:c,label:pe(h,s),calls:m?.calls??0,errors:m?.errors??0,errorRate:m?.errorRate??0,avg:m?.avg??0,p50:m?.p50??0,p95:m?.p95??0,inputTokens:m?.inputTokens??0,outputTokens:m?.outputTokens??0,totalTokens:m?.totalTokens??0,costUsd:m?.costUsd??0})}return d}function Ge(t,e,s,n){const i=new Map;for(const o of t)i.set(o.toolName,(i.get(o.toolName)??0)+o[e]);const l=[...i.entries()].sort((o,u)=>u[1]-o[1]).slice(0,s).map(([o])=>o),a=new Set(l),d=new Map,c=new Map;for(const o of t){if(!a.has(o.toolName))continue;const u=o.virtualMcpId??"";d.set(u,(d.get(u)??0)+o[e]),c.set(`${u}::${o.toolName}`,{calls:o.calls,errors:o.errors,outputSize:o.outputSize})}const m=[...d.entries()].sort((o,u)=>u[1]-o[1]).slice(0,n).map(([o])=>o);let h=0;for(const o of m)for(const u of l){const g=c.get(`${o}::${u}`);g&&g[e]>h&&(h=g[e])}return{topTools:l,topAgentIds:m,cellMap:c,maxValue:h}}function Qe(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function We(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:be(t.avgDurationMs)}function Y(t){return(t.run_config??{}).agent?.id??(t.virtual_mcp_id||null)}function Z(t,e,s,n){if(!t)return n;const i=e.find(a=>a.id===t)??s?.find(a=>a.id===t);if(i?.title)return i.title;const l=O(t);return l?U(l).title??n:t}function J(t,e,s){if(!t)return null;const n=e.find(l=>l.id===t)??s?.find(l=>l.id===t);if(n?.icon)return n.icon;const i=O(t);return i?U(i).icon??null:null}function je(t){return t?.data?.members??[]}function V(t){const e=P.c(32),{thread:s,connections:n,virtualMcps:i,nav:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const N=Y(s);d=Z(N,i,n,""),c=J(N,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;e[5]!==d||e[6]!==a||e[7]!==s.title?(h=d||s.title||a("orgs.threads.untitledChat"),e[5]=d,e[6]=a,e[7]=s.title,e[8]=h):h=e[8];let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(W,{}),e[9]=o):o=e[9];let u;e[10]!==m||e[11]!==h?(u=r.jsx(X,{icon:m,name:h,size:"sm",fallbackIcon:o,className:"shadow-edge shrink-0 rounded-md"}),e[10]=m,e[11]=h,e[12]=u):u=e[12];let g;e[13]!==a||e[14]!==s.title?(g=s.title||a("orgs.threads.untitledChat"),e[13]=a,e[14]=s.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=r.jsx(ie,{className:"text-sm leading-snug truncate",children:g}),e[16]=g,e[17]=b):b=e[17];let v;e[18]!==d?(v=d&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:d}),e[18]=d,e[19]=v):v=e[19];let p;e[20]!==b||e[21]!==v?(p=r.jsxs("div",{className:"min-w-0",children:[b,v]}),e[20]=b,e[21]=v,e[22]=p):p=e[22];let f;e[23]!==u||e[24]!==p?(f=r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u,p]}),e[23]=u,e[24]=p,e[25]=f):f=e[25];let x;e[26]!==l||e[27]!==a?(x=l&&r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onPrev,disabled:l.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.previousChat"),children:r.jsx(oe,{size:14})}),r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onNext,disabled:l.index===l.total-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.nextChat"),children:r.jsx(ce,{size:14})})]}),e[26]=l,e[27]=a,e[28]=x):x=e[28];let j;return e[29]!==x||e[30]!==f?(j=r.jsx(le,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:r.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[f,x]})}),e[29]=x,e[30]=f,e[31]=j):j=e[31],j}function ve(t){const e=P.c(62),{thread:s,connections:n,virtualMcps:i,members:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const I=Y(s);d=Z(I,i,n,""),c=J(I,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;if(e[5]!==l||e[6]!==s.created_by){const I=je(l);let R;e[8]!==s.created_by?(R=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=R):R=e[9],h=I.find(R),e[5]=l,e[6]=s.created_by,e[7]=h}else h=e[7];const o=h;let u;e[10]!==o?.user.email||e[11]!==o?.user.name||e[12]!==s.created_by?(u=o?.user.name??o?.user.email??s.created_by?.substring(0,8)??"—",e[10]=o?.user.email,e[11]=o?.user.name,e[12]=s.created_by,e[13]=u):u=e[13];const g=u,b=o?.user.image??void 0;let v;e[14]!==s.created_at?(v=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=v):v=e[15];const p=v;let f,x,j,N,C,w;if(e[16]!==a||e[17]!==s.status){const I=xe(s.status),R=I.icon;f="px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm";let L;e[24]!==a?(L=a("orgs.threads.status"),e[24]=a,e[25]=L):L=e[25],e[26]!==L?(w=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[26]=L,e[27]=w):w=e[27],N="flex items-center gap-1.5",C=r.jsx(R,{size:13,className:I.iconClassName}),x=ne("text-sm",I.labelColor),j=a(I.labelKey),e[16]=a,e[17]=s.status,e[18]=f,e[19]=x,e[20]=j,e[21]=N,e[22]=C,e[23]=w}else f=e[18],x=e[19],j=e[20],N=e[21],C=e[22],w=e[23];let T;e[28]!==x||e[29]!==j?(T=r.jsx("span",{className:x,children:j}),e[28]=x,e[29]=j,e[30]=T):T=e[30];let S;e[31]!==T||e[32]!==N||e[33]!==C?(S=r.jsxs("div",{className:N,children:[C,T]}),e[31]=T,e[32]=N,e[33]=C,e[34]=S):S=e[34];let y;e[35]!==S||e[36]!==w?(y=r.jsxs("div",{children:[w,S]}),e[35]=S,e[36]=w,e[37]=y):y=e[37];let E;e[38]!==a?(E=a("orgs.threads.date"),e[38]=a,e[39]=E):E=e[39];let _;e[40]!==E?(_=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:E}),e[40]=E,e[41]=_):_=e[41];let M;e[42]!==p?(M=r.jsx("div",{className:"text-sm text-foreground",children:p}),e[42]=p,e[43]=M):M=e[43];let D;e[44]!==_||e[45]!==M?(D=r.jsxs("div",{children:[_,M]}),e[44]=_,e[45]=M,e[46]=D):D=e[46];let $;e[47]!==a||e[48]!==s.created_by||e[49]!==b||e[50]!==g?($=s.created_by&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.user")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(re,{url:b,fallback:g,shape:"circle",size:"2xs",className:"shrink-0"}),r.jsx("span",{className:"text-sm text-foreground",children:g})]})]}),e[47]=a,e[48]=s.created_by,e[49]=b,e[50]=g,e[51]=$):$=e[51];let k;e[52]!==m||e[53]!==d||e[54]!==a?(k=d&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.agent")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(X,{icon:m,name:d,size:"xs",fallbackIcon:r.jsx(W,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),r.jsx("span",{className:"text-sm text-foreground",children:d})]})]}),e[52]=m,e[53]=d,e[54]=a,e[55]=k):k=e[55];let z;return e[56]!==f||e[57]!==y||e[58]!==D||e[59]!==$||e[60]!==k?(z=r.jsxs("div",{className:f,children:[y,D,$,k]}),e[56]=f,e[57]=y,e[58]=D,e[59]=$,e[60]=k,e[61]=z):z=e[61],z}const q=100;function Ne(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.noMessagesInChat"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Me(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingMore"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}const Te=400,Se=5e3;function ye(t,e,s){const n=P.c(8),i=se(),l=G.useRef(null);let a;n[0]!==e||n[1]!==i||n[2]!==s?(a=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.invalidateQueries({queryKey:Q.threadMessages(e,s)})},Te)},n[0]=e,n[1]=i,n[2]=s,n[3]=a):a=n[3];const d=a;let c;n[4]!==t||n[5]!==d||n[6]!==s?(c={orgSlug:t,taskId:s,onStep:d,onFinish:d,onReconnect:d},n[4]=t,n[5]=d,n[6]=s,n[7]=c):c=n[7],fe(c)}function _e(t){const e=P.c(36),{client:s,locator:n,thread:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,{org:h}=te();let o;e[0]!==n||e[1]!==i.id?(o=Q.threadMessages(n,i.id),e[0]=n,e[1]=i.id,e[2]=o):o=e[2];let u;e[3]!==s||e[4]!==i.id?(u=async _=>{const{pageParam:M}=_,D=M===void 0?0:M;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:i.id,limit:q,offset:D}});return $.structuredContent??$},e[3]=s,e[4]=i.id,e[5]=u):u=e[5];let g;e[6]!==o||e[7]!==u?(g={queryKey:o,queryFn:u,initialPageParam:0,getNextPageParam:Ee,staleTime:0,refetchInterval:Se},e[6]=o,e[7]=u,e[8]=g):g=e[8];const{data:b,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:f}=ae(g);ye(h.slug,n,i.id);let x;e[9]!==b.pages?(x=b.pages.flatMap(Ce).filter(we),e[9]=b.pages,e[10]=x):x=e[10];const j=x,N=de(j);let C;e[11]!==v||e[12]!==p||e[13]!==f?(C=()=>{p&&!f&&v()},e[11]=v,e[12]=p,e[13]=f,e[14]=C):C=e[14];const w=ge(C,p??!1,f);let T;e[15]!==l||e[16]!==c||e[17]!==i||e[18]!==a?(T=r.jsx(V,{thread:i,connections:l,virtualMcps:a,nav:c}),e[15]=l,e[16]=c,e[17]=i,e[18]=a,e[19]=T):T=e[19];let S;e[20]!==l||e[21]!==d||e[22]!==m||e[23]!==i||e[24]!==a?(S=m&&r.jsx(ve,{thread:i,connections:l,virtualMcps:a,members:d}),e[20]=l,e[21]=d,e[22]=m,e[23]=i,e[24]=a,e[25]=S):S=e[25];let y;e[26]!==f||e[27]!==w||e[28]!==N||e[29]!==j.length||e[30]!==i.status?(y=j.length===0?r.jsx(Ne,{}):r.jsx("div",{"data-chat-scroller":!0,className:"flex-1 overflow-y-auto min-h-0",children:r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[N.map((_,M)=>r.jsx("div",{ref:M===N.length-1?w:void 0,children:r.jsx(ue,{pair:_,isLastPair:M===N.length-1,status:M===N.length-1&&i.status==="in_progress"?"streaming":"ready"})},`pair-${_.user?.id??_.assistant?.id}`)),f&&r.jsx(Me,{})]})}),e[26]=f,e[27]=w,e[28]=N,e[29]=j.length,e[30]=i.status,e[31]=y):y=e[31];let E;return e[32]!==T||e[33]!==S||e[34]!==y?(E=r.jsxs(r.Fragment,{children:[T,S,y]}),e[32]=T,e[33]=S,e[34]=y,e[35]=E):E=e[35],E}function we(t){return t.role==="user"||t.role==="assistant"}function Ce(t){return t.items??[]}function Ee(t,e){const s=t,n=e;if(!((s?.items?.length??0)<q))return n.length*q}function Ie(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.failedToLoadMessages"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingConversation"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Xe(t){const e=P.c(31),{thread:s,client:n,locator:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,h=m===void 0?!0:m;let o;e[0]!==l||e[1]!==c||e[2]!==s||e[3]!==a?(o=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[0]=l,e[1]=c,e[2]=s,e[3]=a,e[4]=o):o=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(Ie,{}),e[5]=u):u=e[5];let g;e[6]!==o?(g=r.jsxs(r.Fragment,{children:[o,u]}),e[6]=o,e[7]=g):g=e[7];let b;e[8]!==l||e[9]!==c||e[10]!==s||e[11]!==a?(b=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[8]=l,e[9]=c,e[10]=s,e[11]=a,e[12]=b):b=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx($e,{}),e[13]=v):v=e[13];let p;e[14]!==b?(p=r.jsxs(r.Fragment,{children:[b,v]}),e[14]=b,e[15]=p):p=e[15];let f;e[16]!==n||e[17]!==l||e[18]!==i||e[19]!==d||e[20]!==h||e[21]!==c||e[22]!==s||e[23]!==a?(f=r.jsx(_e,{client:n,locator:i,thread:s,connections:l,virtualMcps:a,members:d,nav:c,meta:h}),e[16]=n,e[17]=l,e[18]=i,e[19]=d,e[20]=h,e[21]=c,e[22]=s,e[23]=a,e[24]=f):f=e[24];let x;e[25]!==p||e[26]!==f?(x=r.jsx(G.Suspense,{fallback:p,children:f}),e[25]=p,e[26]=f,e[27]=x):x=e[27];let j;return e[28]!==g||e[29]!==x?(j=r.jsx(me,{children:r.jsx(ee,{fallback:g,children:x})}),e[28]=g,e[29]=x,e[30]=j):j=e[30],j}export{Xe as T,Oe as a,Ue as b,be as c,We as d,Qe as e,He as f,Ke as g,Ge as h,je as i,Y as j,J as k,Z as r};
|
|
1
|
+
import{g1 as O,aX as U,c as P,j as r,r as G,M as ee,b as F,B as K,a4 as te,K as Q,q as se,l as ne,o as re}from"./index-BJ9m9LNK.js";import{u as ae}from"./useSuspenseInfiniteQuery-jjzI6K-a.js";import{S as ie,c as le}from"./sheet-CFaQrFou.js";import{n as oe,t as ce}from"./ChevronUp-PedQ2gd6.js";import{n as W}from"./LinkBroken01-Be879sLY.js";import{u as de,M as ue}from"./pair-CeWIXyL1.js";import{D as me}from"./chat-context-2letHrEJ.js";import{I as X}from"./integration-icon-gBiw8y2C.js";import{b as fe}from"./use-decopilot-events-8w_hmlMJ.js";import{u as ge}from"./use-infinite-scroll-BIzBYJCu.js";import{g as xe}from"./task-status-B-hiqAeK.js";const A=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],he=40;function Ke(t){const s=(t.endDate.getTime()-t.startDate.getTime())/he;return A.find(i=>i.ms>=s)?.label??A[A.length-1].label}function B(t){const e=A.find(l=>l.label===t);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(t);if(!s)return 6e4;const n=parseInt(s[1],10),i=s[2];return i==="h"?n*36e5:i==="d"?n*864e5:n*6e4}function pe(t,e){const s=new Date(t);return B(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function H(t,e){const s=B(e);return new Date(Math.floor(t.getTime()/s)*s)}function be(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function He(t){return Number.isFinite(t)?t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toLocaleString():"0"}function Oe(t){return Number.isFinite(t)?`$${t.toFixed(t<1?4:2)}`:"$0.00"}function Ue(t,e,s){const n=B(s),i=H(e.startDate,s).getTime(),l=e.endDate.getTime(),a=new Map(t.map(c=>[H(new Date(c.timestamp),s).getTime(),c])),d=[];for(let c=i;c<=l;c+=n){const m=a.get(c),h=new Date(c).toISOString();d.push({t:h,ts:c,label:pe(h,s),calls:m?.calls??0,errors:m?.errors??0,errorRate:m?.errorRate??0,avg:m?.avg??0,p50:m?.p50??0,p95:m?.p95??0,inputTokens:m?.inputTokens??0,outputTokens:m?.outputTokens??0,totalTokens:m?.totalTokens??0,costUsd:m?.costUsd??0})}return d}function Ge(t,e,s,n){const i=new Map;for(const o of t)i.set(o.toolName,(i.get(o.toolName)??0)+o[e]);const l=[...i.entries()].sort((o,u)=>u[1]-o[1]).slice(0,s).map(([o])=>o),a=new Set(l),d=new Map,c=new Map;for(const o of t){if(!a.has(o.toolName))continue;const u=o.virtualMcpId??"";d.set(u,(d.get(u)??0)+o[e]),c.set(`${u}::${o.toolName}`,{calls:o.calls,errors:o.errors,outputSize:o.outputSize})}const m=[...d.entries()].sort((o,u)=>u[1]-o[1]).slice(0,n).map(([o])=>o);let h=0;for(const o of m)for(const u of l){const g=c.get(`${o}::${u}`);g&&g[e]>h&&(h=g[e])}return{topTools:l,topAgentIds:m,cellMap:c,maxValue:h}}function Qe(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function We(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:be(t.avgDurationMs)}function Y(t){return(t.run_config??{}).agent?.id??(t.virtual_mcp_id||null)}function Z(t,e,s,n){if(!t)return n;const i=e.find(a=>a.id===t)??s?.find(a=>a.id===t);if(i?.title)return i.title;const l=O(t);return l?U(l).title??n:t}function J(t,e,s){if(!t)return null;const n=e.find(l=>l.id===t)??s?.find(l=>l.id===t);if(n?.icon)return n.icon;const i=O(t);return i?U(i).icon??null:null}function je(t){return t?.data?.members??[]}function V(t){const e=P.c(32),{thread:s,connections:n,virtualMcps:i,nav:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const N=Y(s);d=Z(N,i,n,""),c=J(N,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;e[5]!==d||e[6]!==a||e[7]!==s.title?(h=d||s.title||a("orgs.threads.untitledChat"),e[5]=d,e[6]=a,e[7]=s.title,e[8]=h):h=e[8];let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(W,{}),e[9]=o):o=e[9];let u;e[10]!==m||e[11]!==h?(u=r.jsx(X,{icon:m,name:h,size:"sm",fallbackIcon:o,className:"shadow-edge shrink-0 rounded-md"}),e[10]=m,e[11]=h,e[12]=u):u=e[12];let g;e[13]!==a||e[14]!==s.title?(g=s.title||a("orgs.threads.untitledChat"),e[13]=a,e[14]=s.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=r.jsx(ie,{className:"text-sm leading-snug truncate",children:g}),e[16]=g,e[17]=b):b=e[17];let v;e[18]!==d?(v=d&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:d}),e[18]=d,e[19]=v):v=e[19];let p;e[20]!==b||e[21]!==v?(p=r.jsxs("div",{className:"min-w-0",children:[b,v]}),e[20]=b,e[21]=v,e[22]=p):p=e[22];let f;e[23]!==u||e[24]!==p?(f=r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u,p]}),e[23]=u,e[24]=p,e[25]=f):f=e[25];let x;e[26]!==l||e[27]!==a?(x=l&&r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onPrev,disabled:l.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.previousChat"),children:r.jsx(oe,{size:14})}),r.jsx(K,{size:"icon",variant:"ghost",onClick:l.onNext,disabled:l.index===l.total-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.nextChat"),children:r.jsx(ce,{size:14})})]}),e[26]=l,e[27]=a,e[28]=x):x=e[28];let j;return e[29]!==x||e[30]!==f?(j=r.jsx(le,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:r.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[f,x]})}),e[29]=x,e[30]=f,e[31]=j):j=e[31],j}function ve(t){const e=P.c(62),{thread:s,connections:n,virtualMcps:i,members:l}=t,a=F();let d,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const I=Y(s);d=Z(I,i,n,""),c=J(I,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=d,e[4]=c}else d=e[3],c=e[4];const m=c;let h;if(e[5]!==l||e[6]!==s.created_by){const I=je(l);let R;e[8]!==s.created_by?(R=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=R):R=e[9],h=I.find(R),e[5]=l,e[6]=s.created_by,e[7]=h}else h=e[7];const o=h;let u;e[10]!==o?.user.email||e[11]!==o?.user.name||e[12]!==s.created_by?(u=o?.user.name??o?.user.email??s.created_by?.substring(0,8)??"—",e[10]=o?.user.email,e[11]=o?.user.name,e[12]=s.created_by,e[13]=u):u=e[13];const g=u,b=o?.user.image??void 0;let v;e[14]!==s.created_at?(v=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=v):v=e[15];const p=v;let f,x,j,N,C,w;if(e[16]!==a||e[17]!==s.status){const I=xe(s.status),R=I.icon;f="px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm";let L;e[24]!==a?(L=a("orgs.threads.status"),e[24]=a,e[25]=L):L=e[25],e[26]!==L?(w=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[26]=L,e[27]=w):w=e[27],N="flex items-center gap-1.5",C=r.jsx(R,{size:13,className:I.iconClassName}),x=ne("text-sm",I.labelColor),j=a(I.labelKey),e[16]=a,e[17]=s.status,e[18]=f,e[19]=x,e[20]=j,e[21]=N,e[22]=C,e[23]=w}else f=e[18],x=e[19],j=e[20],N=e[21],C=e[22],w=e[23];let T;e[28]!==x||e[29]!==j?(T=r.jsx("span",{className:x,children:j}),e[28]=x,e[29]=j,e[30]=T):T=e[30];let S;e[31]!==T||e[32]!==N||e[33]!==C?(S=r.jsxs("div",{className:N,children:[C,T]}),e[31]=T,e[32]=N,e[33]=C,e[34]=S):S=e[34];let y;e[35]!==S||e[36]!==w?(y=r.jsxs("div",{children:[w,S]}),e[35]=S,e[36]=w,e[37]=y):y=e[37];let E;e[38]!==a?(E=a("orgs.threads.date"),e[38]=a,e[39]=E):E=e[39];let _;e[40]!==E?(_=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:E}),e[40]=E,e[41]=_):_=e[41];let M;e[42]!==p?(M=r.jsx("div",{className:"text-sm text-foreground",children:p}),e[42]=p,e[43]=M):M=e[43];let D;e[44]!==_||e[45]!==M?(D=r.jsxs("div",{children:[_,M]}),e[44]=_,e[45]=M,e[46]=D):D=e[46];let $;e[47]!==a||e[48]!==s.created_by||e[49]!==b||e[50]!==g?($=s.created_by&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.user")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(re,{url:b,fallback:g,shape:"circle",size:"2xs",className:"shrink-0"}),r.jsx("span",{className:"text-sm text-foreground",children:g})]})]}),e[47]=a,e[48]=s.created_by,e[49]=b,e[50]=g,e[51]=$):$=e[51];let k;e[52]!==m||e[53]!==d||e[54]!==a?(k=d&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.agent")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(X,{icon:m,name:d,size:"xs",fallbackIcon:r.jsx(W,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),r.jsx("span",{className:"text-sm text-foreground",children:d})]})]}),e[52]=m,e[53]=d,e[54]=a,e[55]=k):k=e[55];let z;return e[56]!==f||e[57]!==y||e[58]!==D||e[59]!==$||e[60]!==k?(z=r.jsxs("div",{className:f,children:[y,D,$,k]}),e[56]=f,e[57]=y,e[58]=D,e[59]=$,e[60]=k,e[61]=z):z=e[61],z}const q=100;function Ne(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.noMessagesInChat"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Me(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingMore"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}const Te=400,Se=5e3;function ye(t,e,s){const n=P.c(8),i=se(),l=G.useRef(null);let a;n[0]!==e||n[1]!==i||n[2]!==s?(a=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.invalidateQueries({queryKey:Q.threadMessages(e,s)})},Te)},n[0]=e,n[1]=i,n[2]=s,n[3]=a):a=n[3];const d=a;let c;n[4]!==t||n[5]!==d||n[6]!==s?(c={orgSlug:t,taskId:s,onStep:d,onFinish:d,onReconnect:d},n[4]=t,n[5]=d,n[6]=s,n[7]=c):c=n[7],fe(c)}function _e(t){const e=P.c(36),{client:s,locator:n,thread:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,{org:h}=te();let o;e[0]!==n||e[1]!==i.id?(o=Q.threadMessages(n,i.id),e[0]=n,e[1]=i.id,e[2]=o):o=e[2];let u;e[3]!==s||e[4]!==i.id?(u=async _=>{const{pageParam:M}=_,D=M===void 0?0:M;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:i.id,limit:q,offset:D}});return $.structuredContent??$},e[3]=s,e[4]=i.id,e[5]=u):u=e[5];let g;e[6]!==o||e[7]!==u?(g={queryKey:o,queryFn:u,initialPageParam:0,getNextPageParam:Ee,staleTime:0,refetchInterval:Se},e[6]=o,e[7]=u,e[8]=g):g=e[8];const{data:b,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:f}=ae(g);ye(h.slug,n,i.id);let x;e[9]!==b.pages?(x=b.pages.flatMap(Ce).filter(we),e[9]=b.pages,e[10]=x):x=e[10];const j=x,N=de(j);let C;e[11]!==v||e[12]!==p||e[13]!==f?(C=()=>{p&&!f&&v()},e[11]=v,e[12]=p,e[13]=f,e[14]=C):C=e[14];const w=ge(C,p??!1,f);let T;e[15]!==l||e[16]!==c||e[17]!==i||e[18]!==a?(T=r.jsx(V,{thread:i,connections:l,virtualMcps:a,nav:c}),e[15]=l,e[16]=c,e[17]=i,e[18]=a,e[19]=T):T=e[19];let S;e[20]!==l||e[21]!==d||e[22]!==m||e[23]!==i||e[24]!==a?(S=m&&r.jsx(ve,{thread:i,connections:l,virtualMcps:a,members:d}),e[20]=l,e[21]=d,e[22]=m,e[23]=i,e[24]=a,e[25]=S):S=e[25];let y;e[26]!==f||e[27]!==w||e[28]!==N||e[29]!==j.length||e[30]!==i.status?(y=j.length===0?r.jsx(Ne,{}):r.jsx("div",{"data-chat-scroller":!0,className:"flex-1 overflow-y-auto min-h-0",children:r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[N.map((_,M)=>r.jsx("div",{ref:M===N.length-1?w:void 0,children:r.jsx(ue,{pair:_,isLastPair:M===N.length-1,status:M===N.length-1&&i.status==="in_progress"?"streaming":"ready"})},`pair-${_.user?.id??_.assistant?.id}`)),f&&r.jsx(Me,{})]})}),e[26]=f,e[27]=w,e[28]=N,e[29]=j.length,e[30]=i.status,e[31]=y):y=e[31];let E;return e[32]!==T||e[33]!==S||e[34]!==y?(E=r.jsxs(r.Fragment,{children:[T,S,y]}),e[32]=T,e[33]=S,e[34]=y,e[35]=E):E=e[35],E}function we(t){return t.role==="user"||t.role==="assistant"}function Ce(t){return t.items??[]}function Ee(t,e){const s=t,n=e;if(!((s?.items?.length??0)<q))return n.length*q}function Ie(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.failedToLoadMessages"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingConversation"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Xe(t){const e=P.c(31),{thread:s,client:n,locator:i,connections:l,virtualMcps:a,members:d,nav:c,meta:m}=t,h=m===void 0?!0:m;let o;e[0]!==l||e[1]!==c||e[2]!==s||e[3]!==a?(o=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[0]=l,e[1]=c,e[2]=s,e[3]=a,e[4]=o):o=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=r.jsx(Ie,{}),e[5]=u):u=e[5];let g;e[6]!==o?(g=r.jsxs(r.Fragment,{children:[o,u]}),e[6]=o,e[7]=g):g=e[7];let b;e[8]!==l||e[9]!==c||e[10]!==s||e[11]!==a?(b=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[8]=l,e[9]=c,e[10]=s,e[11]=a,e[12]=b):b=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx($e,{}),e[13]=v):v=e[13];let p;e[14]!==b?(p=r.jsxs(r.Fragment,{children:[b,v]}),e[14]=b,e[15]=p):p=e[15];let f;e[16]!==n||e[17]!==l||e[18]!==i||e[19]!==d||e[20]!==h||e[21]!==c||e[22]!==s||e[23]!==a?(f=r.jsx(_e,{client:n,locator:i,thread:s,connections:l,virtualMcps:a,members:d,nav:c,meta:h}),e[16]=n,e[17]=l,e[18]=i,e[19]=d,e[20]=h,e[21]=c,e[22]=s,e[23]=a,e[24]=f):f=e[24];let x;e[25]!==p||e[26]!==f?(x=r.jsx(G.Suspense,{fallback:p,children:f}),e[25]=p,e[26]=f,e[27]=x):x=e[27];let j;return e[28]!==g||e[29]!==x?(j=r.jsx(me,{children:r.jsx(ee,{fallback:g,children:x})}),e[28]=g,e[29]=x,e[30]=j):j=e[30],j}export{Xe as T,Oe as a,Ue as b,be as c,We as d,Qe as e,He as f,Ke as g,Ge as h,je as i,Y as j,J as k,Z as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,j as t,I as O,l as E,B as C}from"./index-
|
|
1
|
+
import{r as u,j as t,I as O,l as E,B as C}from"./index-BJ9m9LNK.js";import{P as H,a as P,b as _}from"./popover-C5Dt3qOY.js";import{S as G}from"./scroll-area-ButOmQch.js";import{t as K}from"./ChevronUp-PedQ2gd6.js";import{r as W,W as Y}from"./agent-icon-CTGtlw1z.js";import{C as q}from"./calendar-CZnHQIdE.js";const B=/^now(?:-(\d+)([mhdwM]))?$/,J={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function z(e){const s=e.trim();if(s==="now")return{isNow:!0,offset:0,unit:null};const r=s.match(B);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,n=r[2]||null;return{isNow:!0,offset:l,unit:n}}function h(e,s=new Date){const r=e.trim(),l=new Date(r);if(!Number.isNaN(l.getTime())&&r.includes("-"))return{valid:!0,date:l};const n=z(r);if(!n)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const o=new Date(s);if(n.offset===0||!n.unit)return{valid:!0,date:o};switch(n.unit){case"m":o.setMinutes(o.getMinutes()-n.offset);break;case"h":o.setHours(o.getHours()-n.offset);break;case"d":o.setDate(o.getDate()-n.offset);break;case"w":o.setDate(o.getDate()-n.offset*7);break;case"M":o.setMonth(o.getMonth()-n.offset);break}return{valid:!0,date:o}}function Z(e){return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Q(e){const s=e.trim();return B.test(s)}function V(e){const s=e.trim();if(s==="now")return"Now";const r=z(s);if(!r||!r.unit){const o=h(s);return o.valid&&o.date?Z(o.date):s}const l=J[r.unit],n=r.offset!==1?"s":"";return`${r.offset} ${l}${n} ago`}const U=[{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 ee(e,s,r=U){const l=r.find(n=>n.from===e&&n.to===s);return l?l.label:`${V(e)} to ${V(s)}`}function T(e){const s=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),l=String(e.getDate()).padStart(2,"0"),n=String(e.getHours()).padStart(2,"0"),o=String(e.getMinutes()).padStart(2,"0"),p=String(e.getSeconds()).padStart(2,"0");return`${s}-${r}-${l} ${n}:${o}:${p}`}function te(e){const s=e.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!s)return null;const[,r,l,n,o,p,g]=s,x=new Date(Number(r),Number(l)-1,Number(n),Number(o),Number(p),Number(g));return Number.isNaN(x.getTime())?null:x}function $(e){if(Q(e))return e;const s=h(e);return s.valid&&s.date?T(s.date):e}function A({value:e,onChange:s,placeholder:r="now or now-2d",className:l,disabled:n,error:o}){const[p,g]=u.useState(!1),[x,m]=u.useState(()=>$(e)),[L,c]=u.useState(),[D,w]=u.useState(!1),b=u.useRef(e);b.current!==e&&(b.current=e,D||m($(e)));const y=i=>{const d=i.target.value;m(d),c(void 0)},R=()=>{w(!0)},N=()=>{w(!1);const i=x.trim();if(Q(i)){c(void 0),s(i);return}const d=te(i);if(d){c(void 0),s(d.toISOString()),m(T(d));return}const f=h(i);if(f.valid&&f.date){c(void 0),s(i),m(T(f.date));return}m($(e)),c(void 0)},v=i=>{if(i){const f=h(e).date||new Date;i.setHours(f.getHours()),i.setMinutes(f.getMinutes()),i.setSeconds(0),i.setMilliseconds(0);const F=i.toISOString();m(T(i)),s(F),c(void 0)}g(!1)},M=i=>{const[d,f]=i.target.value.split(":").map(Number),j=h(e).date||new Date;j.setHours(d||0),j.setMinutes(f||0),j.setSeconds(0),j.setMilliseconds(0);const X=j.toISOString();m(T(j)),s(X)},I=h(e),S=I.valid?I.date:new Date,k=S?`${String(S.getHours()).padStart(2,"0")}:${String(S.getMinutes()).padStart(2,"0")}`:"",a=o||L;return t.jsxs("div",{className:E("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(O,{value:x,onChange:y,onFocus:R,onBlur:N,placeholder:r,disabled:n,className:E("text-sm h-8",a&&"border-destructive focus-visible:ring-destructive")}),a&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:a})]}),t.jsxs(H,{open:p,onOpenChange:g,children:[t.jsx(P,{asChild:!0,children:t.jsx(C,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:n,children:t.jsx(W,{className:"h-4 w-4"})})}),t.jsxs(_,{className:"w-auto p-0",align:"end",children:[t.jsx(q,{mode:"single",selected:S||void 0,onSelect:v,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(O,{type:"time",value:k,onChange:M,className:"text-sm h-8"})]})]})]})]})}function le({value:e,onChange:s,className:r,disabled:l,quickRanges:n=U,labels:o}){const p=o?.absoluteTimeRange??"Absolute time range",g=o?.from??"From",x=o?.to??"To",m=o?.applyTimeRange??"Apply time range",[L,c]=u.useState(!1),[D,w]=u.useState(e.from),[b,y]=u.useState(e.to),[R,N]=u.useState(null),v=u.useRef({from:e.from,to:e.to});(v.current.from!==e.from||v.current.to!==e.to)&&(v.current={from:e.from,to:e.to},w(e.from),y(e.to));const M=a=>{v.current={from:a.from,to:a.to},w(a.from),y(a.to),c(!1),s({from:a.from,to:a.to})},I=()=>{const a=h(D),i=h(b);if(!a.valid||!a.date){N("Invalid 'From' date");return}if(!i.valid||!i.date){N("Invalid 'To' date");return}if(a.date>=i.date){N("'From' must be before 'To'");return}N(null),s({from:D,to:b}),c(!1)},S=a=>e.from===a.from&&e.to===a.to,k=ee(e.from,e.to,n);return t.jsxs(H,{open:L,onOpenChange:c,children:[t.jsx(P,{asChild:!0,children:t.jsxs(C,{variant:"outline",className:E("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(Y,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:k})]}),t.jsx(K,{className:"size-4 text-muted-foreground"})]})}),t.jsx(_,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:a=>a.preventDefault(),style:L?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:p}),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:g}),t.jsx(A,{value:D,onChange:w,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:x}),t.jsx(A,{value:b,onChange:y,placeholder:"now"})]}),R&&t.jsx("p",{className:"text-xs text-destructive",children:R}),t.jsx(C,{onClick:I,className:"w-full",size:"sm",children:m})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(G,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:n.map(a=>{const i=S(a);return t.jsx("button",{type:"button",onClick:()=>M(a),className:E("w-full text-left px-3 py-2 text-sm rounded-lg transition-colors","hover:bg-accent hover:text-accent-foreground",i&&"bg-accent text-accent-foreground font-medium"),children:a.label},a.value)})})})})]})})]})}export{le as T,h as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,cu as y,j as i,cz as P,cA as O,fd as v,fF as B,ct as H,fG as q,fH as R,cM as K,cr as L,c as w,l as I}from"./index-
|
|
1
|
+
import{r as C,cu as y,j as i,cz as P,cA as O,fd as v,fF as B,ct as H,fG as q,fH as R,cM as K,cr as L,c as w,l as I}from"./index-BJ9m9LNK.js";import{A as U,t as J}from"./active-indicator-CCMhAsc_.js";import{T as Q,a as W,c as X}from"./tooltip-BP50pkvP.js";var A="Toggle",N=C.forwardRef((o,e)=>{const{pressed:t,defaultPressed:r,onPressedChange:s,...n}=o,[a,l]=y({prop:t,onChange:s,defaultProp:r??!1,caller:A});return i.jsx(P.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":o.disabled?"":void 0,...n,ref:e,onClick:O(o.onClick,()=>{o.disabled||l(!a)})})});N.displayName=A;var m="ToggleGroup",[E]=K(m,[R]),V=R(),z=v.forwardRef((o,e)=>{const{type:t,...r}=o;if(t==="single"){const s=r;return i.jsx(Y,{...s,ref:e})}if(t==="multiple"){const s=r;return i.jsx(Z,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${m}\``)});z.displayName=m;var[S,M]=E(m),Y=v.forwardRef((o,e)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...n}=o,[a,l]=y({prop:t,defaultProp:r??"",onChange:s,caller:m});return i.jsx(S,{scope:o.__scopeToggleGroup,type:"single",value:v.useMemo(()=>a?[a]:[],[a]),onItemActivate:l,onItemDeactivate:v.useCallback(()=>l(""),[l]),children:i.jsx(F,{...n,ref:e})})}),Z=v.forwardRef((o,e)=>{const{value:t,defaultValue:r,onValueChange:s=()=>{},...n}=o,[a,l]=y({prop:t,defaultProp:r??[],onChange:s,caller:m}),d=v.useCallback(g=>l((c=[])=>[...c,g]),[l]),u=v.useCallback(g=>l((c=[])=>c.filter(p=>p!==g)),[l]);return i.jsx(S,{scope:o.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:d,onItemDeactivate:u,children:i.jsx(F,{...n,ref:e})})});z.displayName=m;var[ee,te]=E(m),F=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,disabled:r=!1,rovingFocus:s=!0,orientation:n,dir:a,loop:l=!0,...d}=o,u=V(t),g=H(a),c={role:"group",dir:g,...d};return i.jsx(ee,{scope:t,rovingFocus:s,disabled:r,children:s?i.jsx(q,{asChild:!0,...u,orientation:n,dir:g,loop:l,children:i.jsx(P.div,{...c,ref:e})}):i.jsx(P.div,{...c,ref:e})})}),j="ToggleGroupItem",$=v.forwardRef((o,e)=>{const t=M(j,o.__scopeToggleGroup),r=te(j,o.__scopeToggleGroup),s=V(o.__scopeToggleGroup),n=t.value.includes(o.value),a=r.disabled||o.disabled,l={...o,pressed:n,disabled:a},d=v.useRef(null);return r.rovingFocus?i.jsx(B,{asChild:!0,...s,focusable:!a,active:n,ref:d,children:i.jsx(k,{...l,ref:e})}):i.jsx(k,{...l,ref:e})});$.displayName=j;var k=v.forwardRef((o,e)=>{const{__scopeToggleGroup:t,value:r,...s}=o,n=M(j,t),a={role:"radio","aria-checked":o.pressed,"aria-pressed":void 0},l=n.type==="single"?a:void 0;return i.jsx(N,{...l,...s,ref:e,onPressedChange:d=>{d?n.onItemActivate(r):n.onItemDeactivate(r)}})}),ae=z,oe=$;const re=L("inline-flex items-center justify-center gap-2 rounded-full text-sm font-medium hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-muted data-[state=on]:hover:bg-secondary-hover data-[state=on]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-ring outline-none transition-[color,background-color,box-shadow] whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"bg-card shadow-edge hover:bg-accent hover:text-accent-foreground",segmented:"text-muted-foreground hover:bg-transparent hover:text-foreground data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-[0_1px_2px_0_#0000000d] dark:data-[state=on]:bg-accent"},size:{default:"h-8 px-3 min-w-8",sm:"h-7 px-2.5 min-w-7",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),D=C.createContext({size:"default",variant:"default"}),ne=J(':scope > [data-slot="toggle-group-item"][data-state="on"]');function ce(o){const e=w.c(24);let t,r,s,n,a;e[0]!==o?({className:r,variant:a,size:n,children:t,...s}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=s,e[4]=n,e[5]=a):(t=e[1],r=e[2],s=e[3],n=e[4],a=e[5]);const l=a==="segmented"&&s.type==="single",d=l||void 0;let u;e[6]!==r?(u=I("group/toggle-group relative flex w-fit items-center rounded-full data-[variant=segmented]:bg-muted data-[variant=segmented]:gap-0.5 data-[variant=segmented]:p-0.5 data-[variant=outline]:after:pointer-events-none data-[variant=outline]:after:absolute data-[variant=outline]:after:inset-0 data-[variant=outline]:after:rounded-full data-[variant=outline]:after:shadow-edge data-[variant=outline]:bg-card data-[variant=outline]:after:content-['']",r),e[6]=r,e[7]=u):u=e[7];let g;e[8]!==l?(g=l&&i.jsx("span",{"aria-hidden":!0,ref:ne,"data-slot":"toggle-group-indicator",className:I(U,"bg-background dark:bg-accent top-0.5 bottom-0.5 rounded-full shadow-[0_1px_2px_0_#0000000d] opacity-0 in-data-has-active:opacity-100")}),e[8]=l,e[9]=g):g=e[9];let c;e[10]!==n||e[11]!==a?(c={variant:a,size:n},e[10]=n,e[11]=a,e[12]=c):c=e[12];let p;e[13]!==t||e[14]!==c?(p=i.jsx(D.Provider,{value:c,children:t}),e[13]=t,e[14]=c,e[15]=p):p=e[15];let f;return e[16]!==s||e[17]!==n||e[18]!==d||e[19]!==u||e[20]!==g||e[21]!==p||e[22]!==a?(f=i.jsxs(ae,{"data-slot":"toggle-group","data-variant":a,"data-size":n,"data-sliding":d,className:u,...s,children:[g,p]}),e[16]=s,e[17]=n,e[18]=d,e[19]=u,e[20]=g,e[21]=p,e[22]=a,e[23]=f):f=e[23],f}function se(o){const e=w.c(4);let t;if(e[0]!==o){const{"data-state":s,...n}=o;t=n,e[0]=o,e[1]=t}else t=e[1];let r;return e[2]!==t?(r=i.jsx(oe,{...t}),e[2]=t,e[3]=r):r=e[3],r}function ue(o){const e=w.c(30);let t,r,s,n,a,l;e[0]!==o?({className:r,children:t,variant:l,size:n,tooltip:a,...s}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=s,e[4]=n,e[5]=a,e[6]=l):(t=e[1],r=e[2],s=e[3],n=e[4],a=e[5],l=e[6]);const d=C.useContext(D);let u;e[7]!==t?(u=C.isValidElement(t),e[7]=t,e[8]=u):u=e[8];const g=u,c=d.variant||l,p=d.size||n,f=g||void 0;let x;e[9]!==r||e[10]!==d.size||e[11]!==d.variant||e[12]!==n||e[13]!==l?(x=I(re({variant:d.variant||l,size:d.size||n}),"relative z-10 min-w-0 flex-1 shrink-0 rounded-none first:rounded-l-full last:rounded-r-full focus:z-10 focus-visible:z-10 data-[icon-only]:aspect-square data-[icon-only]:px-0","data-[variant=segmented]:flex-none data-[variant=segmented]:rounded-full in-data-sliding:data-[state=on]:bg-transparent in-data-sliding:data-[state=on]:shadow-none","data-[variant=outline]:shadow-none data-[variant=outline]:border-hairline data-[variant=outline]:not-first:border-l",r),e[9]=r,e[10]=d.size,e[11]=d.variant,e[12]=n,e[13]=l,e[14]=x):x=e[14];let G;e[15]!==t||e[16]!==s||e[17]!==c||e[18]!==p||e[19]!==f||e[20]!==x||e[21]!==a?(G=i.jsx(se,{"data-slot":"toggle-group-item","data-variant":c,"data-size":p,"data-icon-only":f,"aria-label":a,className:x,...s,children:t}),e[15]=t,e[16]=s,e[17]=c,e[18]=p,e[19]=f,e[20]=x,e[21]=a,e[22]=G):G=e[22];const T=G;if(!a)return T;let h;e[23]!==T?(h=i.jsx(Q,{asChild:!0,children:T}),e[23]=T,e[24]=h):h=e[24];let b;e[25]!==a?(b=i.jsx(W,{children:a}),e[25]=a,e[26]=b):b=e[26];let _;return e[27]!==h||e[28]!==b?(_=i.jsxs(X,{children:[h,b]}),e[27]=h,e[28]=b,e[29]=_):_=e[29],_}export{ue as T,ce as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-BJ9m9LNK.js";function i(t){let r=2166136261;for(let e=0;e<t.length;e++)r=Math.imul(r^t.charCodeAt(e),16777619);return`a${(r>>>0).toString(36).padStart(6,"0").slice(-6)}`}function l(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function n(t,r){if(!r)return t;const e=`${i(r)}_`;return t.startsWith(e)?t.slice(e.length):t}function s(t,r){return n(t,r).replace(/[_-]/g," ").toLowerCase()}const o=/^mcp__[a-zA-Z0-9_-]+__/;function c(t){return t.replace(o,"")}export{c as a,s as d,l as g,n as s};
|
package/dist/client/assets/{toolbar-icon-button-fBm5AosV.js → toolbar-icon-button-CsFCKDkl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as b,B as d}from"./index-
|
|
1
|
+
import{c as f,l as u,j as b,B as d}from"./index-BJ9m9LNK.js";const v="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease] hover:bg-sidebar-accent hover:text-sidebar-foreground dark:hover:bg-sidebar-accent",v,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60")}function p(n){const e=f.c(14);let o,s,t,i,c;e[0]!==n?({active:o,className:s,ref:i,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=i,e[5]=c):(o=e[1],s=e[2],t=e[3],i=e[4],c=e[5]);const a=c===void 0?"button":c;let r;e[6]!==o||e[7]!==s?(r=u("relative size-10 md:size-7","max-md:[&_svg:not([class*='size-'])]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=r):r=e[8];let l;return e[9]!==t||e[10]!==i||e[11]!==r||e[12]!==a?(l=b.jsx(d,{ref:i,type:a,variant:"ghost",size:"icon-sm",className:r,...t}),e[9]=t,e[10]=i,e[11]=r,e[12]=a,e[13]=l):l=e[13],l}export{v as I,p as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,cw as K,cu as W,j as c,cv as J,cx as H,cy as Q,cz as Z,cA as C,eo as S,cC as ee,cD as $,cL as te,cO as oe,cM as re,ep as ne,cP as se,c as j,l as ae}from"./index-
|
|
1
|
+
import{r as i,cw as K,cu as W,j as c,cv as J,cx as H,cy as Q,cz as Z,cA as C,eo as S,cC as ee,cD as $,cL as te,cO as oe,cM as re,ep as ne,cP as se,c as j,l as ae}from"./index-BJ9m9LNK.js";import{R as ie}from"./index-Zaz397OF.js";var[O]=re("Tooltip",[$]),D=$(),G="TooltipProvider",le=700,A="tooltip.open",[ce,k]=O(G),z=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),d=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const p=a.current;return()=>window.clearTimeout(p)},[]),c.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};z.displayName=G;var R="Tooltip",[ue,_]=O(R),F=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,a=k(R,o.__scopeTooltip),p=D(e),[u,v]=i.useState(null),x=K(),f=i.useRef(0),h=l??a.disableHoverableContent,T=d??a.delayDuration,g=i.useRef(!1),[y,m]=W({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(A))):a.onClose(),s?.(I)},caller:R}),w=i.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),N=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(J,{...p,children:c.jsx(ue,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?N():P()},[a.isOpenDelayedRef,N,P]),onTriggerLeave:i.useCallback(()=>{h?E():(window.clearTimeout(f.current),f.current=0)},[E,h]),onOpen:P,onClose:E,disableHoverableContent:h,children:t})})};F.displayName=R;var L="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(L,t),s=k(L,t),l=D(t),d=i.useRef(null),a=H(e,d,n.onTriggerChange),p=i.useRef(!1),u=i.useRef(!1),v=i.useCallback(()=>p.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(Q,{asChild:!0,...l,children:c.jsx(Z.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=L;var M="TooltipPortal",[de,pe]=O(M,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(M,e);return c.jsx(de,{scope:e,forceMount:t,children:c.jsx(S,{present:t||s.open,children:c.jsx(ee,{asChild:!0,container:n,children:r})})})};U.displayName=M;var b="TooltipContent",V=i.forwardRef((o,e)=>{const t=pe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(S,{present:r||l.open,children:l.disableHoverableContent?c.jsx(Y,{side:n,...s,ref:e}):c.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,d]=i.useState(null),{trigger:a,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{d(null),v(!1)},[v]),f=i.useCallback((h,T)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},m=ge(y,g.getBoundingClientRect()),w=Te(y,m),P=me(T.getBoundingClientRect()),E=Ce([...w,...P]);d(E),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&u){const h=g=>f(g,u),T=g=>f(g,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[a,u,f,x]),i.useEffect(()=>{if(l){const h=T=>{const g=T.target,y={x:T.clientX,y:T.clientY},m=a?.contains(g)||u?.contains(g),w=!ye(y,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,l,p,x]),c.jsx(Y,{...o,ref:s})}),[ve,xe]=O(R,{isInside:!1}),he=ne("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,a=_(b,t),p=D(t),{onClose:u}=a;return i.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),i.useEffect(()=>{if(a.trigger){const v=x=>{x.target?.contains(a.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,u]),c.jsx(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(oe,{"data-state":a.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(he,{children:r}),c.jsx(ve,{scope:t,isInside:!0,children:c.jsx(ie,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return xe(q,t).isInside?null:c.jsx(se,{...n,...r,ref:e})});X.displayName=q;function ge(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Te(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function me(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function ye(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],a=e[l],p=d.x,u=d.y,v=a.x,x=a.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ce(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),be(e)}function be(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=z,Pe=F,Ee=B,Re=U,_e=V,je=X;function Oe(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Le(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Oe,{children:c.jsx(Pe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function ke(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ee,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ae("notranslate bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-lg px-2 py-1 text-xs font-medium text-balance",r),e[5]=r,e[6]=d):d=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Re,{children:c.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,translate:"no",className:d,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{ke as T,Me as a,Oe as b,Le as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a5 as l,af as I,ag as p,ah as d}from"./CategoricalChart-
|
|
1
|
+
import{a5 as l,af as I,ag as p,ah as d}from"./CategoricalChart-CiyWbCkx.js";var r=a=>null;r.displayName="Cell";var h=(a,e,i)=>{var v=l();return(t,c)=>s=>{a?.(t,c,s),v(I({activeIndex:String(c),activeDataKey:e,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}},n=a=>{var e=l();return(i,v)=>t=>{a?.(i,v,t),e(p())}},m=(a,e,i)=>{var v=l();return(t,c)=>s=>{a?.(t,c,s),v(d({activeIndex:String(c),activeDataKey:e,activeCoordinate:t.tooltipPosition,activeGraphicalItemId:i}))}};export{r as C,n as a,m as b,h as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as m,a1 as _}from"./index-
|
|
1
|
+
import{F as m,a1 as _}from"./index-BJ9m9LNK.js";const y="onepager",l="report:auth-attempt:",p=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${l}${e}`}function f(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function s(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>p?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function d(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function g(e){const t=s(e);if(t)return t;const n={attempt_id:f(),domain:e,gate_shown_at:Date.now(),...c()};return d(n),n}function R(e,t){const n={...g(e),...t};return d(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function v(e){const t=s(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e,t,n){if(m())try{_.capture(e,{...c(),...t},n)}catch{}}export{y as R,T as a,S as b,I as c,g as d,v as e,h as r,R as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dX as l,e0 as e,dY as h,aL as r,gq as b,aK as t,cR as p,cT as d,b9 as c,dW as m,d_ as v,gr as I,gs as E,gt as w,dx as x,eL as T,gu as z,gv as C,gw as D,db as O,gx as B,dO as V,gy as W,gz as $,gA as K,gB as F,dK as J,dy as Z,dH as j,dI as Y,dJ as Q,dA as G,dG as X,dz as ee,dS as te}from"./index-
|
|
1
|
+
import{dX as l,e0 as e,dY as h,aL as r,gq as b,aK as t,cR as p,cT as d,b9 as c,dW as m,d_ as v,gr as I,gs as E,gt as w,dx as x,eL as T,gu as z,gv as C,gw as D,db as O,gx as B,dO as V,gy as W,gz as $,gA as K,gB as F,dK as J,dy as Z,dH as j,dI as Y,dJ as Q,dA as G,dG as X,dz as ee,dS as te}from"./index-BJ9m9LNK.js";import{P as oe}from"./use-mcp-client-Do4_ndrI.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let A of[...u.listeners])A(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
|
|
2
2
|
|
|
3
3
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
4
4
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aL as s}from"./index-
|
|
1
|
+
import{aL as s}from"./index-BJ9m9LNK.js";const n=2,t=64,i=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,r=new Set(["new","edit","settings","apps","projects","connections"]),o=s().min(n).max(t).regex(i,"Use lowercase letters, digits, and single hyphens between them").refine(e=>!e.includes("--"),"Use single hyphens").refine(e=>!r.has(e),"This slug is reserved");export{o as U};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as V,f_ as Sc,fW as Yf,j as k,bP as Xf,fd as _t,f$ as Qf,c as Yt,b as So,aI as Zf,h as eh,B as xl,aL as Sl,aK as th,aJ as nh,x as rh,w as sh,I as ih,y as oh,v as lh,D as ah,l as er,ai as ch,C as uh,fI as Cl}from"./index-C4tYnNih.js";import{d as dh,g as fh}from"./tool-namespace-cn6zTT0m.js";import{a as hh,F as ph,b as mh,c as gh,d as yh,f as bh}from"./form-CKF06Eu0.js";import{t as Ml}from"./utils-CVEq3hMx.js";import{a as kh,M as xh}from"./markdown-C-J5-sTt.js";import{u as Sh}from"./use-copy-C9NYM8DB.js";import{a as Ch}from"./Copy01-B9x501ud.js";import{T as tr,a as nr,c as rr}from"./tooltip-B1eS9Khq.js";import{j as Mh}from"./agent-icon-KvVT3fA8.js";import{c as Co}from"./use-decopilot-events-4yDcDH2I.js";import{K as Mo}from"./chat-context-CIOqAIIy.js";var Tl=Object.defineProperty,Th=(n,e)=>{let t={};for(var r in n)Tl(t,r,{get:n[r],enumerable:!0});return Tl(t,Symbol.toStringTag,{value:"Module"}),t};function ae(n){this.content=n}ae.prototype={constructor:ae,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ae(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ae(t)},addToStart:function(n,e){return new ae([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ae(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ae(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ae.from(n),n.size?new ae(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ae.from(n),n.size?new ae(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ae.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ae.from=function(n){if(n instanceof ae)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ae(e)};function Cc(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){let o=s.text,l=i.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a<o.length&&a<l.length&&Ec(o.charCodeAt(a-1))&&Tc(o.charCodeAt(a))&&t--,t}if(s.content.size||i.content.size){let o=Cc(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Mc(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,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--,t--,r--;return d&&f&&d<c.length&&Ec(c.charCodeAt(d-1))&&Tc(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||l.content.size){let c=Mc(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}function Tc(n){return n>=56320&&n<57344}function Ec(n){return n>=55296&&n<56320}class S{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new S(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new S(r,s)}cutByIndex(e,t){return e==t?S.empty:e==0&&t==this.content.length?this:new S(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new S(s,i)}addToStart(e){return new S([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new S(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Cc(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Mc(this,e,t,r)}findIndex(e){if(e==0)return vr(0,e);if(e==this.size)return vr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vr(t+1,i):vr(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return S.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return S.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return S.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new S(t||e,r)}static from(e){if(!e)return S.empty;if(e instanceof S)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new S([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}S.empty=new S([],0);const ti={index:0,offset:0};function vr(n,e){return ti.index=n,ti.offset=e,ti}function Ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let F=class Di{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Di.none;if(e instanceof Di)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};F.none=[];class sr extends Error{}class E{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vc(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new E(r,this.openStart,this.openEnd)}removeBetween(e,t){return new E(wc(this.content,e+this.openStart,t+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,t){if(!t)return E.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new E(S.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new E(e,r,s)}}E.empty=new E(S.empty,0,0);function wc(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(wc(i.content,e-s-1,t-s-1)))}function vc(n,e,t,r,s,i){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=vc(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?s-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function Eh(n,e,t){if(t.openStart>n.depth)throw new sr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new sr("Inconsistent open depths");return Nc(n,e,t,0)}function Nc(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Nc(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Bt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=wh(t,n);return Bt(i,Oc(n,o,l,e,r))}else return Bt(i,qr(n,e,r))}function Ac(n,e){if(!e.type.compatibleContent(n.type))throw new sr("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Ac(r,e.node(t)),r}function zt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Fn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)zt(s.child(l),r);e&&e.depth==t&&e.textOffset&&zt(e.nodeBefore,r)}function Bt(n,e){if(!n.type.validContent(e))throw new sr("Invalid content for node "+n.type.name);return n.copy(e)}function Oc(n,e,t,r,s){let i=n.depth>s&&Ri(n,e,s+1),o=r.depth>s&&Ri(t,r,s+1),l=[];return Fn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Ac(i,o),zt(Bt(i,Oc(n,e,t,r,s+1)),l)):(i&&zt(Bt(i,qr(n,e,s+1)),l),Fn(e,t,s,l),o&&zt(Bt(o,qr(t,r,s+1)),l)),Fn(r,null,s,l),new S(l)}function qr(n,e,t){let r=[];if(Fn(null,n,t,r),n.depth>t){let s=Ri(n,e,t+1);zt(Bt(s,qr(n,e,t+1)),r)}return Fn(e,null,t,r),new S(r)}function wh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(S.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class ir{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return F.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new ir(t,r,i)}static resolveCached(e,t){let r=El.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else El.set(e,r=new vh);let s=r.elts[r.i]=ir.resolve(e,t);return r.i=(r.i+1)%Nh,s}}class vh{constructor(){this.elts=[],this.i=0}}const Nh=12,El=new WeakMap;class Jr{constructor(e,t,r){this.$from=e,this.$to=t,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 Ah=Object.create(null);let Ft=class Ii{constructor(e,t,r,s=F.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||S.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,t,r,s=0){this.content.nodesBetween(e,t,r,s,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,t,r,s){return this.content.textBetween(e,t,r,s)}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,t,r){return this.type==e&&Ur(this.attrs,t||e.defaultAttrs||Ah)&&F.sameSet(this.marks,r||F.none)}copy(e=null){return e==this.content?this:new Ii(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ii(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return E.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new E(c,s.depth-o,i.depth-o)}replace(e,t,r){return Eh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Dc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=S.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);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=F.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!F.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=S.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ft.prototype.text=void 0;class Gr extends Ft{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Oh(e,t);if(r.next==null)return Ut.empty;let s=Rc(r);r.next&&r.err("Unexpected trailing text");let i=zh($h(s));return Bh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return S.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())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[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 t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{r as V,f_ as Sc,fW as Yf,j as k,bP as Xf,fd as _t,f$ as Qf,c as Yt,b as So,aI as Zf,h as eh,B as xl,aL as Sl,aK as th,aJ as nh,x as rh,w as sh,I as ih,y as oh,v as lh,D as ah,l as er,ai as ch,C as uh,fI as Cl}from"./index-BJ9m9LNK.js";import{d as dh,g as fh}from"./tool-namespace-BDVFYO2h.js";import{a as hh,F as ph,b as mh,c as gh,d as yh,f as bh}from"./form-DrzlJwQH.js";import{t as Ml}from"./utils-CVEq3hMx.js";import{a as kh,M as xh}from"./markdown-BG06zpZJ.js";import{u as Sh}from"./use-copy-Dgppamoo.js";import{a as Ch}from"./Copy01-B6cJ_ygs.js";import{T as tr,a as nr,c as rr}from"./tooltip-BP50pkvP.js";import{j as Mh}from"./agent-icon-CTGtlw1z.js";import{c as Co}from"./use-decopilot-events-8w_hmlMJ.js";import{N as Mo}from"./chat-context-2letHrEJ.js";var Tl=Object.defineProperty,Th=(n,e)=>{let t={};for(var r in n)Tl(t,r,{get:n[r],enumerable:!0});return Tl(t,Symbol.toStringTag,{value:"Module"}),t};function ae(n){this.content=n}ae.prototype={constructor:ae,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ae(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ae(t)},addToStart:function(n,e){return new ae([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ae(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ae(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ae.from(n),n.size?new ae(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ae.from(n),n.size?new ae(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ae.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ae.from=function(n){if(n instanceof ae)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ae(e)};function Cc(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){let o=s.text,l=i.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a<o.length&&a<l.length&&Ec(o.charCodeAt(a-1))&&Tc(o.charCodeAt(a))&&t--,t}if(s.content.size||i.content.size){let o=Cc(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Mc(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,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--,t--,r--;return d&&f&&d<c.length&&Ec(c.charCodeAt(d-1))&&Tc(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||l.content.size){let c=Mc(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}function Tc(n){return n>=56320&&n<57344}function Ec(n){return n>=55296&&n<56320}class S{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new S(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new S(r,s)}cutByIndex(e,t){return e==t?S.empty:e==0&&t==this.content.length?this:new S(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new S(s,i)}addToStart(e){return new S([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new S(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Cc(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Mc(this,e,t,r)}findIndex(e){if(e==0)return vr(0,e);if(e==this.size)return vr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vr(t+1,i):vr(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return S.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return S.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return S.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new S(t||e,r)}static from(e){if(!e)return S.empty;if(e instanceof S)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new S([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}S.empty=new S([],0);const ti={index:0,offset:0};function vr(n,e){return ti.index=n,ti.offset=e,ti}function Ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let F=class Di{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Di.none;if(e instanceof Di)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};F.none=[];class sr extends Error{}class E{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vc(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new E(r,this.openStart,this.openEnd)}removeBetween(e,t){return new E(wc(this.content,e+this.openStart,t+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,t){if(!t)return E.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new E(S.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new E(e,r,s)}}E.empty=new E(S.empty,0,0);function wc(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(wc(i.content,e-s-1,t-s-1)))}function vc(n,e,t,r,s,i){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=vc(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?s-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function Eh(n,e,t){if(t.openStart>n.depth)throw new sr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new sr("Inconsistent open depths");return Nc(n,e,t,0)}function Nc(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Nc(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Bt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=wh(t,n);return Bt(i,Oc(n,o,l,e,r))}else return Bt(i,qr(n,e,r))}function Ac(n,e){if(!e.type.compatibleContent(n.type))throw new sr("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Ac(r,e.node(t)),r}function zt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Fn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)zt(s.child(l),r);e&&e.depth==t&&e.textOffset&&zt(e.nodeBefore,r)}function Bt(n,e){if(!n.type.validContent(e))throw new sr("Invalid content for node "+n.type.name);return n.copy(e)}function Oc(n,e,t,r,s){let i=n.depth>s&&Ri(n,e,s+1),o=r.depth>s&&Ri(t,r,s+1),l=[];return Fn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Ac(i,o),zt(Bt(i,Oc(n,e,t,r,s+1)),l)):(i&&zt(Bt(i,qr(n,e,s+1)),l),Fn(e,t,s,l),o&&zt(Bt(o,qr(t,r,s+1)),l)),Fn(r,null,s,l),new S(l)}function qr(n,e,t){let r=[];if(Fn(null,n,t,r),n.depth>t){let s=Ri(n,e,t+1);zt(Bt(s,qr(n,e,t+1)),r)}return Fn(e,null,t,r),new S(r)}function wh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(S.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class ir{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return F.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new ir(t,r,i)}static resolveCached(e,t){let r=El.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else El.set(e,r=new vh);let s=r.elts[r.i]=ir.resolve(e,t);return r.i=(r.i+1)%Nh,s}}class vh{constructor(){this.elts=[],this.i=0}}const Nh=12,El=new WeakMap;class Jr{constructor(e,t,r){this.$from=e,this.$to=t,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 Ah=Object.create(null);let Ft=class Ii{constructor(e,t,r,s=F.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||S.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,t,r,s=0){this.content.nodesBetween(e,t,r,s,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,t,r,s){return this.content.textBetween(e,t,r,s)}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,t,r){return this.type==e&&Ur(this.attrs,t||e.defaultAttrs||Ah)&&F.sameSet(this.marks,r||F.none)}copy(e=null){return e==this.content?this:new Ii(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ii(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return E.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new E(c,s.depth-o,i.depth-o)}replace(e,t,r){return Eh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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()+")"),Dc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=S.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);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=F.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!F.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=S.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ft.prototype.text=void 0;class Gr extends Ft{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Oh(e,t);if(r.next==null)return Ut.empty;let s=Rc(r);r.next&&r.err("Unexpected trailing text");let i=zh($h(s));return Bh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return S.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())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[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 t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}Ut.empty=new Ut(!0);class Oh{constructor(e,t){this.string=e,this.nodeTypes=t,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 Rc(n){let e=[];do e.push(Dh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Dh(n){let e=[];do e.push(Rh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Rh(n){let e=Lh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Ih(n,e);else break;return e}function wl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Ih(n,e){let t=wl(n),r=t;return n.eat(",")&&(n.next!="}"?r=wl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Ph(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function Lh(n){if(n.eat("(")){let e=Rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Ph(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function $h(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(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 Ic(n,e){return e-n}function vl(n,e){let t=[];return r(e),t.sort(Ic);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function zh(n){let e=Object.create(null);return t(vl(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);vl(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Ut(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Ic);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Bh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pc(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Lc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function $c(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${r}`);for(let s in n)n[s].validate&&n[s].validate(e[s])}function zc(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new jh(n,r,e[r]);return t}let Nl=class Bc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zc(e,r.attrs),this.defaultAttrs=Pc(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:Lc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ft(this,this.computeAttrs(e),S.from(t),F.setFrom(r))}createChecked(e=null,t,r){return t=S.from(t),this.checkContent(t),new Ft(this,this.computeAttrs(e),t,F.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=S.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(S.empty,!0);return i?new Ft(this,e,t.append(i),F.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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){$c(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:F.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Bc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Fh(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class jh{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Fh(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=zc(e,s.attrs),this.excluded=null;let i=Pc(this.attrs);this.instance=i?new F(this,i):null}create(e=null){return!e&&this.instance?this.instance:new F(this,Lc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){$c(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Fc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ae.from(e.nodes),t.marks=ae.from(e.marks||{}),this.nodes=Nl.compile(this.spec.nodes,this),this.marks=Fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Al(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Al(this,o.split(" "))}this.nodeFromJSON=s=>Ft.fromJSON(this,s),this.markFromJSON=s=>F.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Nl){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(t,r,s)}text(e,t){let r=this.nodes.text;return new Gr(r,r.defaultAttrs,e,F.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Al(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Hh(n){return n.tag!=null}function Vh(n){return n.style!=null}class He{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Hh(s))this.tags.push(s);else if(Vh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Dl(this,t,!1);return r.addAll(e,F.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Dl(this,t,!0);return r.addAll(e,F.none,t.from,t.to),E.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(_h(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],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)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const jc={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},Wh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hc={ol:!0,ul:!0},or=1,Pi=2,jn=4;function Ol(n,e,t){return e!=null?(e?or:0)|(e==="full"?Pi:0):n&&n.whitespace=="pre"?or|Pi:t&~jn}class Nr{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=F.none,this.match=i||(o&jn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(S.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&or)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=S.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(S.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!jc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Dl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Ol(null,t.preserveWhitespace,0)|(r?jn:0);s?i=new Nr(s.type,s.attrs,F.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Nr(null,null,F.none,!0,null,o):i=new Nr(e.schema.topNodeType,null,F.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Pi?"full":this.localPreserveWS||(s.options&or)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="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(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\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=s.content[s.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),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Kh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Wh.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);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(jc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=F.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Il(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Ol(e,i,o.options);o.options&jn&&o.content.length==0&&(l|=jn);let a=F.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Il(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Nr(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=or)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Kh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function _h(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Rl(n){let e={};for(let t in n)e[t]=n[t];return e}function Il(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class rt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ar(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){if(e.isText)return Ar(t).createTextNode(e.text);let{dom:r,contentDOM:s}=Hr(Ar(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Hr(Ar(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return typeof t=="string"?{dom:e.createTextNode(t)}:Hr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Pl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Pl(e.marks)}}function Pl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ar(n){return n.document||window.document}const Ll=new WeakMap;function Uh(n){let e=Ll.get(n);return e===void 0&&Ll.set(n,e=qh(n)),e}function qh(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Hr(n,e,t,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Uh(r))&&i.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=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),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(n.createTextNode(f));else{let{dom:h,contentDOM:p}=Hr(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Vc=65535,Wc=Math.pow(2,16);function Jh(n,e){return n+e*Wc}function $l(n){return n&Vc}function Gh(n){return(n-(n&Vc))/Wc}const Kc=1,_c=2,Vr=4,Uc=8;class Li{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Uc)>0}get deletedBefore(){return(this.delInfo&(Kc|Vr))>0}get deletedAfter(){return(this.delInfo&(_c|Vr))>0}get deletedAcross(){return(this.delInfo&Vr)>0}}class Me{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Me.empty)return Me.empty}recover(e){let t=0,r=$l(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Gh(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=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?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Jh(l/3,e-a),g=e==a?_c:e==d?Kc:Vr;return(t<0?e!=a:e!=d)&&(g|=Uc),new Li(h,g,p)}s+=u-c}return r?e+s:new Li(e+s,0,null)}touches(e,t){let r=0,s=$l(t),i=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+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new Me(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Me.empty:new Me(e<0?[0,-e,0]:[0,0,e])}}Me.empty=new Me([]);class lr{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new lr(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new lr;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Li(e,s,null)}}const ni=Object.create(null);class pe{getMap(){return Me.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ni[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ni)throw new RangeError("Duplicate use of step JSON ID "+e);return ni[e]=t,t.prototype.jsonID=e,t}}class Z{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Z(e,null)}static fail(e){return new Z(null,e)}static fromReplace(e,t,r,s){try{return Z.ok(e.replace(t,r,s))}catch(i){if(i instanceof sr)return Z.fail(i.message);throw i}}}function To(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(To(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return S.fromArray(r)}class mt extends pe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new E(To(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Z.fromReplace(e,this.from,this.to,i)}invert(){return new Ie(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new mt(t.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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(t.from,t.to,e.markFromJSON(t.mark))}}pe.jsonID("addMark",mt);class Ie extends pe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new E(To(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Z.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ie(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ie&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ie(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ie(t.from,t.to,e.markFromJSON(t.mark))}}pe.jsonID("removeMark",Ie);class gt extends pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Z.fromReplace(e,this.pos,this.pos+1,new E(S.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new gt(this.pos,t.marks[s]);return new gt(this.pos,this.mark)}}return new qt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new gt(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(t.pos,e.markFromJSON(t.mark))}}pe.jsonID("addNodeMark",gt);class qt extends pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Z.fromReplace(e,this.pos,this.pos+1,new E(S.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new gt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new qt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new qt(t.pos,e.markFromJSON(t.mark))}}pe.jsonID("removeNodeMark",qt);class X extends pe{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&$i(e,this.from,this.to)?Z.fail("Structure replace would overwrite content"):Z.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Me([this.from,this.to-this.from,this.slice.size])}invert(e){return new X(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&X.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new X(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof X)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?E.empty:new E(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new X(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?E.empty:new E(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new X(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new X(t.from,t.to,E.fromJSON(e,t.slice),!!t.structure)}}X.MAP_BIAS=1;pe.jsonID("replace",X);class se extends pe{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&($i(e,this.from,this.gapFrom)||$i(e,this.gapTo,this.to)))return Z.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Z.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Z.fromReplace(e,this.from,this.to,r):Z.fail("Content does not fit in gap")}getMap(){return new Me([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new se(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new se(t.pos,r.pos,s,i,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new se(t.from,t.to,t.gapFrom,t.gapTo,E.fromJSON(e,t.slice),t.insert,!!t.structure)}}pe.jsonID("replaceAround",se);function $i(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Yh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(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,t),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:s.push(o=new Ie(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new mt(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Xh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Fs){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,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Ie(o.from,o.to,o.style)))}function Eo(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new X(l,u,E.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Ie(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new E(S.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new X(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(S.empty,!0);n.replace(l,l,new E(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Qh(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function En(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!Qh(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Zh(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=S.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=S.from(r.node(p).copy(u)),d++):a--;let f=S.empty,h=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,f=S.from(s.node(p).copy(f)),h++):c++;n.step(new se(a,c,o,l,new E(u.append(f),d,h),u.size-d,!0))}function wo(n,e,t=null,r=n){let s=ep(n,e),i=s&&tp(r,e);return i?s.map(zl).concat({type:e,attrs:t}).concat(i.map(zl)):null}function zl(n){return{type:n,attrs:null}}function ep(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function tp(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function np(n,e,t){let r=S.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[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=S.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new se(s,i,s,i,new E(r,0,0),t.length,!0))}function rp(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&sp(n.doc,n.mapping.slice(i).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&&Jc(n,o,l,i),Eo(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new se(d,f,d+1,f-1,new E(S.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&qc(n,o,l,i),!1}})}function qc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Jc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,a4 as h,aq as R,K as m,m as y,U as S,as as P}from"./index-
|
|
1
|
+
import{c as p,a4 as h,aq as R,K as m,m as y,U as S,as as P}from"./index-BJ9m9LNK.js";const M=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],O=new Set(M);function A(o){return O.has(o)}const C=new Set(["anthropic","openrouter","deco"]);function z(o){return C.has(o)}function _(o){return o.capabilities?.includes("decisions")===!0}function B(o){return!_(o)&&o.asyncResearch!==!0}const L={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},T={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},w={openrouter:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],deco:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},x={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function I(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function q(o){return I(o).includes("deepresearch")}const F=["sonar","searchpreview","online"];function D(o){const e=I(o);return e.includes("deepresearch")?!1:F.some(t=>e.includes(t))}function b(o){return o.asyncResearch!==!0&&D(o.modelId)}function H(o){return o.asyncResearch===!0||q(o.modelId)||D(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function N(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=(e[n.id]??[]).filter(a=>!_(a)),s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,L[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,T[s]??[])),t.image||(t.image=u(i,n.id,w[s]??[],a=>a.capabilities?.includes("image")===!0&&!a.modelId.startsWith("openrouter/auto"))),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],b)),t.deepResearch||(t.deepResearch=u(i,n.id,x[s]??[],H))}return t}function V(o,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await P(o,"AI_PROVIDER_KEY_LIST",{})}}function G(){const o=p.c(7),{org:e}=h(),t=R();let n;o[0]!==e.id?(n=m.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function Q(){const o=p.c(5),{org:e}=h();let t;o[0]!==e.id||o[1]!==e.slug?(t=V(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function W(){const o=p.c(2),e=Q();let t;return o[0]!==e?(t=e.filter($),o[0]=e,o[1]=t):t=o[1],t}function $(o){return A(o.providerId)}function E(o){const e=p.c(15),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function Y(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=N(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function j(o){const e=p.c(11),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{E as a,H as b,B as c,Y as d,G as e,Q as f,A as g,j as h,b as i,N as p,z as s,W as u};
|
package/dist/client/assets/{use-apply-named-rule-9ihG8ELj.js → use-apply-named-rule-2pgSelD5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as X,b as Z,q as ee,e as te,K as ne,t as T,bp as oe,bo as U,bq as se,br as re,hm as ie,bw as ae,hn as ce,fw as le}from"./index-
|
|
1
|
+
import{c as X,b as Z,q as ee,e as te,K as ne,t as T,bp as oe,bo as U,bq as se,br as re,hm as ie,bw as ae,hn as ce,fw as le}from"./index-BJ9m9LNK.js";import{u as ue,D as fe,F as de,G as pe,R as he,U as me,ax as B,O as ye,V as be,ay as ke,W as G,P as we,az as ge,aA as Ee,aq as Ce}from"./site-editor-toast-Drt9__vU.js";import{c as Oe,e as ve,O as Re,Q as je,R as Ke,T as Pe,k as Se,U as De,g as Me}from"./blocks-tab-states-EZ53-FeU.js";import{aa as xe}from"./parse-sections-CzJo2WgK.js";import{a as Ae}from"./use-move-blocks-0Xns2gtz.js";function Te(t,e){const i=(t.deletes??[]).filter(s=>!Object.hasOwn(t.writes,s)),a=[...Object.keys(t.writes),...i],n={},o=[];for(const s of a){const A=e(s);A===void 0?o.push(s):n[s]=A}return o.length>0?{kind:"unread",blockKeys:o}:{kind:"apply",patch:{set:t.writes,...i.length>0?{delete:i}:{}},ifMatch:n}}function Be(t,e){const i=e.pointer.split("/").slice(1).map(o=>o.replaceAll("~1","/").replaceAll("~0","~")),a=xe(i[0]),n=i[1];return!a||n===void 0?e:a==="experiments"?{...e,label:t("sectionsEditor.formConflict.ruleExperiment",{name:n}),phrase:t("sectionsEditor.formConflict.ruleExperimentPhrase",{name:n})}:{...e,label:t("sectionsEditor.formConflict.ruleCampaign",{name:n}),phrase:t("sectionsEditor.formConflict.ruleCampaignPhrase",{name:n}),mine:J(e.mine,i.length),theirs:J(e.theirs,i.length)}}function J(t,e){return e===3?ce(t)??t:e===2&&t&&typeof t=="object"?le(t)??t:t}function He(t){return{type:"object",properties:{experiments:{type:"object",title:t("thread.publishPopover.abTests")},campaigns:{type:"object",title:t("thread.publishPopover.campaignDates")}}}}function _e(t){return new ge(Ee.Conflict,"not read yet",{entries:Object.fromEntries(t.map(e=>[e,{expected:null,actual:null}]))})}function Ue(t){const e=X.c(53),{orgSlug:i,virtualMcpId:a,branch:n}=t,o=Z(),s=ee(),A=ue(a,n),c=A.kind==="protocol"?A:null,R=c?.source==="github";let H;e[0]!==n||e[1]!==i||e[2]!==a?(H={orgSlug:i,virtualMcpId:a,branch:n},e[0]=n,e[1]=i,e[2]=a,e[3]=H):H=e[3];const f=fe(H);let _;e[4]!==n||e[5]!==i||e[6]!==a?(_={orgSlug:i,virtualMcpId:a,branch:n},e[4]=n,e[5]=i,e[6]=a,e[7]=_):_=e[7];const y=_;let Q;e[8]!==f?(Q=ne.decofile(f),e[8]=f,e[9]=Q):Q=e[9];const j=Q;let K;e[10]!==n||e[11]!==i||e[12]!==a?(K=pe(i,a,n),e[10]=n,e[11]=i,e[12]=a,e[13]=K):K=e[13];let P;e[14]!==n||e[15]!==i||e[16]!==a?(P=de(i,a,n),e[14]=n,e[15]=i,e[16]=a,e[17]=P):P=e[17];let S;e[18]!==f||e[19]!==y||e[20]!==c||e[21]!==s?(S=async w=>{const g=Te(w,E=>Object.hasOwn(w.pinned,E)?w.pinned[E]:G(s,f,E,c));if(g.kind==="unread")throw _e(g.blockKeys);return he(s,c,y,f,g.patch,g.ifMatch)},e[18]=f,e[19]=y,e[20]=c,e[21]=s,e[22]=S):S=e[22];let F;e[23]!==K||e[24]!==P||e[25]!==S?(F={mutationKey:K,scope:P,mutationFn:S},e[23]=K,e[24]=P,e[25]=S,e[26]=F):F=e[26];const D=te(F);let q;e[27]!==f||e[28]!==y||e[29]!==c||e[30]!==s||e[31]!==o?(q=async(w,g)=>{for(const E of w)await me(s,c,y,f,E,g);return T.info(o("sectionsEditor.namedRules.changedMeanwhile"),{...B,description:o("sectionsEditor.namedRules.changedMeanwhileHint")}),{ok:!1,reason:"changed"}},e[27]=f,e[28]=y,e[29]=c,e[30]=s,e[31]=o,e[32]=q):q=e[32];const z=q;let M,k;if(e[33]!==f||e[34]!==z||e[35]!==R||e[36]!==D||e[37]!==y||e[38]!==c||e[39]!==s||e[40]!==j||e[41]!==o){const w=async(u,C,h,d)=>{const p=await g(u,C,h,d);if(R&&!(!p.ok&&p.reason==="unavailable")){const l=Oe(y),r=[...Object.keys(u.writes),...u.deletes];se.schedule(()=>{for(const m of r)ve(l,m)})}return p},g=async(u,C,h,d)=>{const p=[...Object.keys(u.writes),...u.deletes];if(h>=Me||!re())return z(p,d);const l=c&&Ce(s,c,f,d)?s.getQueryData(j)??{}:await k();if(!l)return T.info(o("sectionsEditor.namedRules.unavailable"),{...B,description:o("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const r=Re(p,C,u,l),m=r.pointers.length===0?{}:await je(r,He(o),{author:(()=>{const O=c?ie(c,y):null,x=Ke(r.pointers[0]??"");return O&&x?{draft:O,blockKey:x}:null})()},O=>Be(o,O)),v=r.pointers.length===0?r.merged:ae(r,m),b=Pe(p,v,l);return Se(m)&&De(b,l)?{ok:!0,keptTheirs:!0}:E(b,h+1)};M=u=>E(u,0);const E=async(u,C)=>{if(!c)return T.info(o("sectionsEditor.namedRules.unavailable"),{...B,description:o("sectionsEditor.namedRules.unavailableHint")}),{ok:!1,reason:"unavailable"};const h=c.source==="github"?u.writes:oe(u.writes),d=(u.deletes??[]).filter(b=>!Object.hasOwn(h,b)),p=[...Object.keys(h),...d];if(p.length===0)return{ok:!0};const l=s.getQueryData(j),r=R?Y(u.basis,l):null;if(r)return w({writes:h,deletes:d},r,C);const m=await $(p,l);if(!m)return w({writes:h,deletes:d},l,C);const v=new Map;for(const b of p)l&&Object.hasOwn(l,b)&&v.set(b,l[b]);s.setQueryData(j,b=>Ae(b,{writes:h,deletes:d})),s.cancelQueries({queryKey:j});try{return await D.mutateAsync({writes:h,deletes:d,pinned:m}),{ok:!0}}catch(b){const O=b;return s.setQueryData(j,x=>{if(!x)return x;const L={...x};for(const W of p)v.has(W)?L[W]=v.get(W):delete L[W];return L}),ye(O)?w({writes:h,deletes:d},l,C,O):(be(o,O instanceof Error?O:new Error(String(O)),c.source),{ok:!1,reason:"failed"})}},Y=Qe,$=async(u,C)=>{const h=ke(s,y),d={},p=[];for(const r of u){if(h.has(r))continue;const m=G(s,f,r,c);m===void 0?p.push(r):d[r]=m}if(p.length===0)return d;const l=await k();if(!l)return null;for(const r of p){const m=!!C&&Object.hasOwn(C,r);if(m!==Object.hasOwn(l,r)||m&&U(l[r])!==U(C[r]))return null;const v=G(s,f,r,c);if(v===void 0)return null;d[r]=v}return d};k=async()=>{if(!c)return null;try{return(await we(s,c,y,f)).blocks}catch{return null}},e[33]=f,e[34]=z,e[35]=R,e[36]=D,e[37]=y,e[38]=c,e[39]=s,e[40]=j,e[41]=o,e[42]=M,e[43]=k}else M=e[42],k=e[43];let N;e[44]!==k||e[45]!==o?(N=async w=>{const g=await k();if(!g)return T.info(o("sectionsEditor.namedRules.unavailable"),{...B,description:o("sectionsEditor.namedRules.unavailableHint")}),null;const E=w(g);return E||T.info(o("sectionsEditor.namedRules.changedMeanwhile"),{...B,description:o("sectionsEditor.namedRules.changedMeanwhileHint")}),E},e[44]=k,e[45]=o,e[46]=N):N=e[46];const I=N;let V;return e[47]!==M||e[48]!==R||e[49]!==D.isPending||e[50]!==I||e[51]!==k?(V={apply:M,reread:k,planStored:I,isPending:D.isPending,holdsCopy:R},e[47]=M,e[48]=R,e[49]=D.isPending,e[50]=I,e[51]=k,e[52]=V):V=e[52],V}function Qe(t,e){if(!t||!Object.keys(t).some(n=>U(t[n]??null)!==U(e?.[n]??null)))return null;const a={...e};for(const[n,o]of Object.entries(t))o===void 0?delete a[n]:a[n]=o;return a}export{Ue as u};
|