@inkeep/open-knowledge 0.49.1 → 0.50.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-C8FhVWZi.mjs → acp-harness-probe-LTFljjjT.mjs} +2 -2
- package/dist/cli.mjs +26 -26
- package/dist/constants-DKkdtsrQ.mjs +2 -0
- package/dist/{git-handle-r3d7s3VF.mjs → git-handle-B9WUn7B2.mjs} +2 -2
- package/dist/git-handle-BfyNyc1q.mjs +1 -0
- package/dist/index.mjs +192 -192
- package/dist/init-CUlzbSqG.mjs +1 -0
- package/dist/{init-VslWN3Iz.mjs → init-DoE9fKH8.mjs} +3 -3
- package/dist/{launch-json-removal-9-8M5r9e.mjs → launch-json-removal--afgb0jV.mjs} +2 -2
- package/dist/{loader-f3tIWlWk.mjs → loader-C00kGDZz.mjs} +2 -2
- package/dist/loader-Dd0F_wFU.mjs +1 -0
- package/dist/md-manager-DGG55-uN.mjs +2 -0
- package/dist/{open-browser-BgReR_t5.mjs → open-browser-BuOrhXvS.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-CdESX2Ja.mjs → preview-CMjft0ek.mjs} +2 -2
- package/dist/preview-D-x1bfxi.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-HRSmxB9_.js +1 -0
- package/dist/public/assets/{AgentDiffPane-T499-ugv.js → AgentDiffPane-BGYo5UN6.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BlMGv16y.js → AgentThreadClientBinder-0uU00Tq4.js} +1 -1
- package/dist/public/assets/{AppMenubar-dik_dmjC.js → AppMenubar-Dk1BEmD9.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DymFE_6x.js → BugReportHistory-CRlvJE2K.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-D28ahq-6.js → BugReportHistoryDialog-DIqnZXkT.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-CG45zoCT.js +1 -0
- package/dist/public/assets/{CodeMirrorPropInput-3TWUbzXY.js → CodeMirrorPropInput-B__Dqs8P.js} +3 -3
- package/dist/public/assets/{ConfigSharingInfoTooltip-Bwt_R43K.js → ConfigSharingInfoTooltip-BNI3Q3Qo.js} +1 -1
- package/dist/public/assets/ConsentDialogBody-BlayjFQq.js +2 -0
- package/dist/public/assets/{CopyButton-DysciFW5.js → CopyButton-Q-6hSzy6.js} +1 -1
- package/dist/public/assets/{DiffView-DY54R06f.js → DiffView-BnNY_4OT.js} +1 -1
- package/dist/public/assets/DocumentContext-Dxzqsjf0.js +38 -0
- package/dist/public/assets/EditorModeToggle-OACqdrIA.js +1 -0
- package/dist/public/assets/EnableSyncConfirmDialog-DBMws9uC.js +1 -0
- package/dist/public/assets/FeedbackForm-YQbdmBFL.js +1 -0
- package/dist/public/assets/GraphPanel-BlBOG-me.js +44 -0
- package/dist/public/assets/ImportSkillDialog-CgeVAxXn.js +1 -0
- package/dist/public/assets/{LintConfigEditor-3f4-NF1O.js → LintConfigEditor-v0oqzBfd.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BfO4jYnj.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-Dmjq1ugS.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-DcaMMYmf.js +1 -0
- package/dist/public/assets/{Mermaid-Cr48L9fH.js → Mermaid-cUFqNhzC.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-C30-UfMg.js → MermaidDocEditor-YEj8k0Fj.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-Cdt1gfjt.js → RegisteredAgentIcon-CCgDsAUc.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BUGec7jk.js → ReportBugDialogBody-f7fl9dVO.js} +1 -1
- package/dist/public/assets/SchemaConfigEditor-C_BBar0x.js +1 -0
- package/dist/public/assets/SessionsHost-DPObQsYR.js +2 -0
- package/dist/public/assets/SettingsDialogBody-C53PpDiP.js +12 -0
- package/dist/public/assets/ShareBranchSwitchDialog-DMbjNni-.js +1 -0
- package/dist/public/assets/ShareReceiveDialog-DMLSpBoi.js +1 -0
- package/dist/public/assets/{ShareReceiveMissDialog-B03ClkaE.js → ShareReceiveMissDialog-TTjnDvC9.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-C7z-32HN.js → SkillEditBanner-Dmsi4hSW.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DgWSnmXH.js → SkillOriginInline-BoGssBkU.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-PvRY_LHn.js → SkillToolbarControls-C8yypIJ3.js} +1 -1
- package/dist/public/assets/SlidesToolbarControls-CWIkYgNX.js +1 -0
- package/dist/public/assets/SourceEditor-D3dXest3.js +1 -0
- package/dist/public/assets/{TerminalPanel-Bl3bWVA_.js → TerminalPanel-D_OODFVz.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-CFxcrkfe.js → TerminalWindowApp-Dwoah4yb.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CHDC5byq.js → TextDocEditor-DzdzVGmP.js} +1 -1
- package/dist/public/assets/ThreadView-DJxvdzfd.js +10 -0
- package/dist/public/assets/TimelineDiffPane-D5U46urB.js +2 -0
- package/dist/public/assets/{agent-diff-store-B7oQn7l7.js → agent-diff-store-DmpkFUx3.js} +1 -1
- package/dist/public/assets/arrow-up-right-CXYxHO7Z.js +1 -0
- package/dist/public/assets/auth-state-cache-Dm1J9vyz.js +11 -0
- package/dist/public/assets/{braces-Ytg60O62.js → braces-54VO1tdr.js} +1 -1
- package/dist/public/assets/{calendar-GynmFVw0.js → calendar-BhCmsdcp.js} +1 -1
- package/dist/public/assets/{case-sensitive-DvBZDISP.js → case-sensitive-BpYLDHFG.js} +1 -1
- package/dist/public/assets/check-DA6LolTH.js +1 -0
- package/dist/public/assets/{checkbox-V0IoPAe3.js → checkbox-gpfWb1pY.js} +1 -1
- package/dist/public/assets/{chevron-down-DrpHBSgH.js → chevron-down-Ccgt58N5.js} +1 -1
- package/dist/public/assets/chevron-left-DY9flfyc.js +1 -0
- package/dist/public/assets/chevron-right-2RK4DD3b.js +1 -0
- package/dist/public/assets/{chevron-up-CsH_dTwv.js → chevron-up-DXAtCwKR.js} +1 -1
- package/dist/public/assets/client-version-BbTOZkhQ.js +1 -0
- package/dist/public/assets/{cm-theme-BJSRL90r.js → cm-theme-DPWSzbOc.js} +1 -1
- package/dist/public/assets/comment-chips-CNh6cTT4.js +5 -0
- package/dist/public/assets/config-provider-CZ_6SNHv.js +5 -0
- package/dist/public/assets/{dialog-eak3pI7G.js → dialog-O4u6_xiQ.js} +1 -1
- package/dist/public/assets/{dist-DndwauQ3.js → dist-BpOfJRMm.js} +1 -1
- package/dist/public/assets/{dist-hwUYIgzz.js → dist-C1TyNsxp.js} +1 -1
- package/dist/public/assets/{dist-BCM06z1D.js → dist-CDMQmWZl.js} +1 -1
- package/dist/public/assets/{dist-BDJLSjo2.js → dist-CI5_cNui.js} +1 -1
- package/dist/public/assets/{dist-CkHhDuKZ.js → dist-CJuiZAB0.js} +1 -1
- package/dist/public/assets/{dist-DvtYFuZI.js → dist-CNm9tACe.js} +1 -1
- package/dist/public/assets/{dist-DJ3iQH0N.js → dist-CebtYbHb.js} +1 -1
- package/dist/public/assets/{dist--4AcVRue.js → dist-CpwfhxFl.js} +1 -1
- package/dist/public/assets/{dist-DNV7r8rH.js → dist-DU2smIGg.js} +1 -1
- package/dist/public/assets/{dist-PVtTd_Sj2.js → dist-TVrIGknK2.js} +111 -111
- package/dist/public/assets/{dist-Wj2cwRLU.js → dist-hrQOAqN1.js} +1 -1
- package/dist/public/assets/{dist-yYRRvtMr.js → dist-wfUjMP-v.js} +1 -1
- package/dist/public/assets/{dist-ClczuKkQ.js → dist-y6w4IT08.js} +1 -1
- package/dist/public/assets/doc-paths-BKAhPn1c.js +1 -0
- package/dist/public/assets/{documents-events-COSAPFkC.js → documents-events-B6nWdFan.js} +1 -1
- package/dist/public/assets/{download-Bq4sKAdj.js → download-BuEN0lZf.js} +1 -1
- package/dist/public/assets/{dropdown-menu-BhMtMvZp.js → dropdown-menu-CP1RnfZI.js} +1 -1
- package/dist/public/assets/{eye-DYUvwA0Z.js → eye-CYj_zi2W.js} +1 -1
- package/dist/public/assets/{field-DN11CYjs.js → field-BADrt9_J.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-B9dmiTPy.js → file-tree-adapter-Dhf8gmFi.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CvsKsHRh.js → file-tree-utils-Cx1c51Ql.js} +1 -1
- package/dist/public/assets/{folder-Cnftw7jd.js → folder-CWVPrRtx.js} +1 -1
- package/dist/public/assets/folder-config-api-CKhPo3Lt.js +1 -0
- package/dist/public/assets/{folder-open-DoQalFip.js → folder-open-BXfoqsrp.js} +1 -1
- package/dist/public/assets/{follow-file-BymUhAtT.js → follow-file-BRGwJuKy.js} +1 -1
- package/dist/public/assets/{git-branch-BWBPTGqT.js → git-branch-CMN6cdzm.js} +1 -1
- package/dist/public/assets/globals-CIRDbOmQ.css +1 -0
- package/dist/public/assets/{hash-BZXl_HqD.js → hash-BS4ux6bl.js} +1 -1
- package/dist/public/assets/history-CiIvI4I4.js +1 -0
- package/dist/public/assets/i18n-iRTrMKQI.js +1 -0
- package/dist/public/assets/index-Dask65mE.js +2097 -0
- package/dist/public/assets/{info-Jj1j2YxC.js → info-160SNOuG.js} +1 -1
- package/dist/public/assets/{input-group-H-ZoGiXT.js → input-group-CPKSxoq5.js} +1 -1
- package/dist/public/assets/{lint-config-client-DkwFMG_T.js → lint-config-client-KRlZx1_T.js} +1 -1
- package/dist/public/assets/{list-plus-IYEFhKGU.js → list-plus-BPvSuFZX.js} +1 -1
- package/dist/public/assets/loader-circle-BbuX0POi.js +1 -0
- package/dist/public/assets/{local-menu-action-bus-DLozq_c4.js → local-menu-action-bus-BDB0W02w.js} +1 -1
- package/dist/public/assets/markdownlint-rule-browser-BAnqBevm.js +1 -0
- package/dist/public/assets/{mcp-consent-store-B_Tog3LX.js → mcp-consent-store-yqsuAEir.js} +1 -1
- package/dist/public/assets/messages-52Q73NDn.js +1 -0
- package/dist/public/assets/messages-B-LUKCxb.js +1 -0
- package/dist/public/assets/messages-Bjt29O_q.js +1 -0
- package/dist/public/assets/messages-BzwBNPDu.js +1 -0
- package/dist/public/assets/messages-CGjveR2E.js +1 -0
- package/dist/public/assets/messages-CkanzrCR.js +1 -0
- package/dist/public/assets/messages-Cy75Ipbk.js +1 -0
- package/dist/public/assets/messages-D2UntltU.js +1 -0
- package/dist/public/assets/messages-D8H0FnV4.js +1 -0
- package/dist/public/assets/messages-Dl7JEKLk.js +1 -0
- package/dist/public/assets/messages-s-nrsPLp.js +1 -0
- package/dist/public/assets/minus-Ba4o_31L.js +1 -0
- package/dist/public/assets/{miss-dialog-store--ihxgGwV.js → miss-dialog-store-CdaZpyLg.js} +1 -1
- package/dist/public/assets/{navigation-targets-DKe7BSku.js → navigation-targets-BhdJAW-R.js} +1 -1
- package/dist/public/assets/open-managed-artifact-tab-CgUiYJiR.js +1 -0
- package/dist/public/assets/{panel-right-open-BhUOm1Eq.js → panel-right-open-_nL1w4h-.js} +1 -1
- package/dist/public/assets/{paperclip-9gdTBktj.js → paperclip-DV67TMJS.js} +1 -1
- package/dist/public/assets/pending-receive-nav-store-Crda7hlg.js +1 -0
- package/dist/public/assets/{project-paths-fLhDAPyF.js → project-paths-BWmSfpDI.js} +1 -1
- package/dist/public/assets/prop-types-CvU-2DkU.js +1 -0
- package/dist/public/assets/{receive-store-BvkW9HUo.js → receive-store--Bc0z-E4.js} +1 -1
- package/dist/public/assets/{refresh-cw-REpEMEB2.js → refresh-cw-Bjv-Fpq5.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-DZFjFt0c.js → schema-fields-view-intent-BMlW8LRz.js} +1 -1
- package/dist/public/assets/{select-CRztynyQ.js → select-BaOsrrG7.js} +1 -1
- package/dist/public/assets/{selection-context-CSP8zK1H.js → selection-context-CsRnyGFj.js} +1 -1
- package/dist/public/assets/{separator-k0mwGcaM.js → separator-BXBsYPiB.js} +1 -1
- package/dist/public/assets/skill-actions-B7Cmxryy.js +2 -0
- package/dist/public/assets/{skill-scope-Dr7iwSW3.js → skill-scope-CwmLPgmT.js} +1 -1
- package/dist/public/assets/{skills-api-qDbnaMmu.js → skills-api-DDfyPLwg.js} +1 -1
- package/dist/public/assets/{square-pen-D3oI-YUs.js → square-pen-CW0s3lqC.js} +1 -1
- package/dist/public/assets/{src-VcUCSe0b.js → src-DfI4uz3u.js} +1 -1
- package/dist/public/assets/{tag-pill-input-pBac7WXR.js → tag-pill-input-DnM-Fz1E.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DAyeqt__.js → target-navigation-intent-D8zAsaUV.js} +1 -1
- package/dist/public/assets/{telemetry-impl-C9jF13xo.js → telemetry-impl-DFcgjFFc.js} +1 -1
- package/dist/public/assets/{telemetry-startup-1DamiHqT.js → telemetry-startup-0F_AW_hr.js} +1 -1
- package/dist/public/assets/terminal-BNdVsbND.js +1 -0
- package/dist/public/assets/terminal-cli-display-Djf7X5gE.js +1 -0
- package/dist/public/assets/terminal-launch-events-B76nHQ-9.js +1 -0
- package/dist/public/assets/terminal-telemetry-CynEAJPS.js +1 -0
- package/dist/public/assets/{text-viewer-languages-BTzKrM_y.js → text-viewer-languages-BBrkAtBf.js} +2 -2
- package/dist/public/assets/thread-client-CER-baRK.js +1 -0
- package/dist/public/assets/{trash-2-BSr7FcE8.js → trash-2-rgduGgZB.js} +1 -1
- package/dist/public/assets/{triangle-alert-DNTyNeem.js → triangle-alert-CnW4IElJ.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BOmjXV-P.js → typing-burst-detector-DzIKrNKg.js} +4 -4
- package/dist/public/assets/{undo-2-u9f9OoCF.js → undo-2-BmxrL5XS.js} +1 -1
- package/dist/public/assets/{uninstall-36twrq5C.js → uninstall-DT91VYMe.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BwANCYjg.js → use-activity-panel-CbIsW8Oq.js} +1 -1
- package/dist/public/assets/use-apply-config-color-theme-Cd_bVm8F.js +1 -0
- package/dist/public/assets/{use-collab-url-TKpnPAW8.js → use-collab-url-DESxkkaS.js} +1 -1
- package/dist/public/assets/use-live-xterm-theme-D9HFWiME.js +1 -0
- package/dist/public/assets/use-open-skill-DyTRfvTr.js +1 -0
- package/dist/public/assets/use-settings-route-BXWhuQbZ.js +1 -0
- package/dist/public/assets/{use-skill-directory-D9S5f8By.js → use-skill-directory-BaP9hj7C.js} +1 -1
- package/dist/public/assets/use-skill-origin-DBXnPKZS.js +1 -0
- package/dist/public/assets/{use-skills-D5kEHDif.js → use-skills-CVci-eTA.js} +1 -1
- package/dist/public/assets/use-terminal-enabled-DDthawVX.js +1 -0
- package/dist/public/assets/{use-timeline-entry-diff-CB_cI1yy.js → use-timeline-entry-diff-BC2rFPLm.js} +2 -2
- package/dist/public/assets/{use-workspace--QTATo27.js → use-workspace-CAcWHNxj.js} +1 -1
- package/dist/public/assets/{wrench-BPXVnAE5.js → wrench-DtGaC8XY.js} +1 -1
- package/dist/public/assets/x-D8xzRaMT.js +1 -0
- package/dist/public/index.html +122 -122
- package/dist/public/uninstall.html +14 -14
- package/dist/{repair-launch-json-DwJ_yLw4.mjs → repair-launch-json-DWyYbCft.mjs} +2 -2
- package/dist/{repair-mcp-configs-Q1hO02co.mjs → repair-mcp-configs-IqhFyLaP.mjs} +2 -2
- package/dist/repair-skills-Cl53MdUh.mjs +1 -0
- package/dist/{repair-skills-DADI6iaT.mjs → repair-skills-DwcUYwoH.mjs} +2 -2
- package/dist/server-lock-C5RpbiEy.mjs +1 -0
- package/dist/{server-lock-aXnDVUI8.mjs → server-lock-DQ_whZyH.mjs} +2 -2
- package/dist/{skill-teardown-onVYT1VF.mjs → skill-teardown-DzuNnHSF.mjs} +2 -2
- package/dist/src-BPPzfDas.mjs +2032 -0
- package/dist/src-BmsPBIN0.mjs +20 -0
- package/dist/src-CWRDxPCK.mjs +1 -0
- package/dist/{src-TKCctdpc.mjs → src-Cb3i1kcm.mjs} +5 -5
- package/dist/{src-cRpQSbXB.mjs → src-DpX6KBvU.mjs} +1 -1
- package/dist/start-BhtWVSU0.mjs +1 -0
- package/dist/{start-DRG6a2sz.mjs → start-CB1ruR88.mjs} +3 -3
- package/dist/{write-project-skill-DOogyZge.mjs → write-project-skill-DfjjNq9T.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-BkYBCRUx.mjs +0 -2
- package/dist/git-handle-DBSzQutT.mjs +0 -1
- package/dist/init-BlCMJ0yB.mjs +0 -1
- package/dist/loader-Birwg2h1.mjs +0 -1
- package/dist/md-manager-BbSzMHHE.mjs +0 -2
- package/dist/preview-gKyXf1a0.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-C08FYohG.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +0 -1
- package/dist/public/assets/ConsentDialogBody-Clb82Qbo.js +0 -2
- package/dist/public/assets/DocumentContext-C-Lo65-_.js +0 -38
- package/dist/public/assets/EditorModeToggle-BjgmECAn.js +0 -1
- package/dist/public/assets/EnableSyncConfirmDialog-B1Eo_sVE.js +0 -1
- package/dist/public/assets/FeedbackForm-C_A-lpjC.js +0 -1
- package/dist/public/assets/GraphPanel-CxJeFUDp.js +0 -44
- package/dist/public/assets/ImportSkillDialog-ChsGV6eb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-CG5af4os.js +0 -1
- package/dist/public/assets/SchemaConfigEditor-DPK5XbMd.js +0 -1
- package/dist/public/assets/SessionsHost-BRUQMi7f.js +0 -2
- package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +0 -12
- package/dist/public/assets/ShareBranchSwitchDialog-C0mAHHVQ.js +0 -1
- package/dist/public/assets/ShareReceiveDialog-Coi9tYAP.js +0 -1
- package/dist/public/assets/SlidesToolbarControls-8TzXHMwI.js +0 -1
- package/dist/public/assets/SourceEditor-Duqpede9.js +0 -1
- package/dist/public/assets/ThreadView-CAGruMiN.js +0 -10
- package/dist/public/assets/TimelineDiffPane-DnaRcvCk.js +0 -2
- package/dist/public/assets/agent-visibility-CHYjRInm.js +0 -1
- package/dist/public/assets/arrow-up-right-0IN5lFEX.js +0 -1
- package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +0 -11
- package/dist/public/assets/check-BLuQ2zvV.js +0 -1
- package/dist/public/assets/chevron-left-BUr-yKA4.js +0 -1
- package/dist/public/assets/chevron-right-BU8AeJST.js +0 -1
- package/dist/public/assets/client-version-DfXcf1Qf.js +0 -1
- package/dist/public/assets/comment-chips-BhvfCPCk.js +0 -5
- package/dist/public/assets/config-context-DNY4at5d.js +0 -1
- package/dist/public/assets/config-provider-B7dMDFNr.js +0 -5
- package/dist/public/assets/doc-paths-CH8QyanF.js +0 -1
- package/dist/public/assets/folder-config-api-IGZhtkRo.js +0 -1
- package/dist/public/assets/globals-D9Q1kf3c.css +0 -1
- package/dist/public/assets/history-BNEST2Cx.js +0 -1
- package/dist/public/assets/i18n-CIRn0AvV.js +0 -1
- package/dist/public/assets/index-B-snLDY1.js +0 -2097
- package/dist/public/assets/loader-circle-Coob8S41.js +0 -1
- package/dist/public/assets/markdownlint-rule-browser-DY5CRVFm.js +0 -1
- package/dist/public/assets/messages-6Fd7I7zn.js +0 -1
- package/dist/public/assets/messages-BJIB1I1L.js +0 -1
- package/dist/public/assets/messages-BOXmrfhw.js +0 -1
- package/dist/public/assets/messages-BeOM8jWl.js +0 -1
- package/dist/public/assets/messages-CCWKIebo.js +0 -1
- package/dist/public/assets/messages-CQFityfC.js +0 -1
- package/dist/public/assets/messages-CzRXVtjz.js +0 -1
- package/dist/public/assets/messages-DYiuNk7y.js +0 -1
- package/dist/public/assets/messages-Db5U-G1d.js +0 -1
- package/dist/public/assets/messages-DohtKbKM.js +0 -1
- package/dist/public/assets/messages-WWFblTuV.js +0 -1
- package/dist/public/assets/minus-DPAjfzCa.js +0 -1
- package/dist/public/assets/open-managed-artifact-tab-DGO7syz6.js +0 -1
- package/dist/public/assets/pending-receive-nav-store-SZ8w-xKW.js +0 -1
- package/dist/public/assets/prop-types-DoONHMUn.js +0 -1
- package/dist/public/assets/skill-actions-98H3SnCL.js +0 -2
- package/dist/public/assets/terminal-launch-events-CIULxHeu.js +0 -1
- package/dist/public/assets/terminal-mGTI25Qq.js +0 -1
- package/dist/public/assets/terminal-telemetry-CqkILJJU.js +0 -1
- package/dist/public/assets/thread-client-DSDduEdo.js +0 -1
- package/dist/public/assets/use-live-xterm-theme-B8OPZLR3.js +0 -1
- package/dist/public/assets/use-open-skill-DCSEJ3jJ.js +0 -1
- package/dist/public/assets/use-settings-route-CKMxexs3.js +0 -1
- package/dist/public/assets/use-skill-origin-8_nwflm6.js +0 -1
- package/dist/public/assets/use-terminal-enabled-Ctosnrg_.js +0 -1
- package/dist/public/assets/x-COTyTduF.js +0 -1
- package/dist/repair-skills-DKwDAoHc.mjs +0 -1
- package/dist/server-lock-U8YDpJpq.mjs +0 -1
- package/dist/src-BgeIHNkQ.mjs +0 -1
- package/dist/src-DNPRz0-U.mjs +0 -20
- package/dist/src-Dt5dAyFQ.mjs +0 -2032
- package/dist/start-CWIlNpAT.mjs +0 -1
- /package/dist/public/assets/{asset-dispatch-Dst62kKY.js → asset-dispatch-_dEhJuVP.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-B92v76dM.js → auth-prompt-store-CeaWNesV.js} +0 -0
- /package/dist/public/assets/{badge-B89o8Vy9.js → badge-CY_v_nGy.js} +0 -0
- /package/dist/public/assets/{copilot-qpaFt06v.js → copilot-D0J83lOh.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BbftclCc.js → createLucideIcon-BcLKHslE.js} +0 -0
- /package/dist/public/assets/{cursor-Df-vt--2.js → cursor-B6-YoFzF.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-BjBBs_pU.js → desktop-bridge-types-rBjHIYSI.js} +0 -0
- /package/dist/public/assets/{dist-BlH6jxEE.js → dist-BTu6o3T-.js} +0 -0
- /package/dist/public/assets/{dist-CEwo98ia.js → dist-Bkx5dDHT2.js} +0 -0
- /package/dist/public/assets/{dist-C7IFraT6.js → dist-DoS8xGN6.js} +0 -0
- /package/dist/public/assets/{documents-fetch-BTUkzxjd.js → documents-fetch-B8A9IAH3.js} +0 -0
- /package/dist/public/assets/{external-link-BkNoUOYg.js → external-link-Bw5EK5AQ.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-CEz8MVWM.js → file-tree-rename-validation-Dt6fQYnB.js} +0 -0
- /package/dist/public/assets/{globals-C-kRTFCu.js → globals-C9aYStL7.js} +0 -0
- /package/dist/public/assets/{input-BKUcczSW.js → input-_CzMpvY9.js} +0 -0
- /package/dist/public/assets/{overlay-layers-BqWhClsR.js → overlay-layers-C1Y78Wu8.js} +0 -0
- /package/dist/public/assets/{panel-CbGx_cRv.js → panel-DVJ8gssn.js} +0 -0
- /package/dist/public/assets/{parse-api-error-Cyn4P6OR.js → parse-api-error-Mgtc4OJu.js} +0 -0
- /package/dist/public/assets/{startup-marks-BzFN1cqP.js → startup-marks-BPO-vrjH.js} +0 -0
- /package/dist/public/assets/{stex-CyLY7DTo.js → stex-Cj2UNqUe.js} +0 -0
- /package/dist/public/assets/{workspace-paths-EgbOaHls.js → workspace-paths-D7hYulMY.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,At as t,Bt as n,Dt as r,Ft as i,It as a,J as o,Lt as s,Mt as c,O as l,P as u,Pt as d,Q as f,Rt as p,St as m,Tt as h,Vt as g,Wt as _,X as v,Y as y,at as b,dt as x,jt as S,kt as ee,pt as C,yt as te,zt as w}from"./dist-BlH6jxEE.js";var T=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=u(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(O(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function E(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function ne(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=E(t)+E(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function re(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:ne(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ie(e,t){return n=>{for(let t=u(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ae=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function D(e){return e.selection.main.from}function O(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var k=m.define();function oe(e,t,n,i){let{main:a}=e.selection,o=n-a.from,s=i-a.from;return{...e.changeByRange(c=>{if(c!=a&&n!=i&&e.sliceDoc(c.from+o,c.from+s)!=e.sliceDoc(n,i))return{range:c};let l=e.toText(t);return{changes:{from:c.from+o,to:i==a.from?c.to:c.from+s,insert:l},range:r.cursor(c.from+o+l.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var se=new WeakMap;function ce(e){if(!Array.isArray(e))return e;let t=se.get(e);return t||se.set(e,t=re(e)),t}var A=i.define(),j=i.define(),le=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=w(e,t),i=n(r);this.chars.push(r);let a=e.slice(t,t+i),o=a.toUpperCase();this.folded.push(w(o==a?a.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:a,byWord:o}=this;if(t.length==1){let i=w(e,0),a=n(i),o=a==e.length?0:-100;if(i!=t[0])if(i==r[0])o+=-200;else return null;return this.ret(o,[0,a])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,l=0;if(s<0){for(let a=0,o=Math.min(e.length,200);a<o&&l<c;){let o=w(e,a);(o==t[l]||o==r[l])&&(i[l++]=a),a+=n(o)}if(l<c)return null}let u=0,d=0,f=!1,p=0,m=-1,h=-1,g=/[a-z]/.test(e),v=!0;for(let i=0,l=Math.min(e.length,200),y=0;i<l&&d<c;){let l=w(e,i);s<0&&(u<c&&l==t[u]&&(a[u++]=i),p<c&&(l==t[p]||l==r[p]?(p==0&&(m=i),h=i+1,p++):p=0));let b,x=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(b=_(l))==b.toLowerCase()?b==b.toUpperCase()?0:2:1;(!i||x==1&&g||y==0&&x!=0)&&(t[d]==l||r[d]==l&&(f=!0)?o[d++]=i:o.length&&(v=!1)),y=x,i+=n(l)}return d==c&&o[0]==0&&v?this.result(-100+(f?-200:0),o,e):p==c&&m==0?this.ret(-200-e.length+(h==e.length?0:-100),[0,h]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):p==c?this.ret(-900-e.length,[m,h]):d==c?this.result(-100+(f?-200:0)+-700+(v?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],a=0;for(let e of t){let t=e+(this.astral?n(w(r,e)):1);a&&i[a-1]==e?i[a-1]=t:(i[a++]=e,i[a++]=t)}return this.ret(e-r.length,i)}},ue=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},M=ee.define({combine(e){return g(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fe,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>de(e(n),t(n)),optionClass:(e,t)=>n=>de(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function de(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==y.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var N=i.define();function pe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function P(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var me=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(M);this.optionContent=pe(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=P(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:N.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(M).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:j.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=P(r.length,i,e.state.facet(M).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=P(t.options.length,t.selected,this.view.state.facet(M).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>C(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&ge(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(M).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0))if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function he(e,t){return n=>new me(n,e,t)}function ge(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function F(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function _e(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(M);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new ae(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new ue(n):new le(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new ae(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):F(e.completion)>F(c)&&(s[s.length-1]=e),c=e.completion}return s}var ve=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,I(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=_e(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(M).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,I(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Ee,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ye=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Ce,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(M),i=(r.override||n.languageDataAt(`autocomplete`,D(n)).map(ce)).map(e=>(this.active.find(t=>t.source==e)||new R(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(z));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!be(i,this.active)||o?a=ve.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new R(e.source,0):e));for(let e of t.effects)e.is(N)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xe:Se}};function be(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var xe={"aria-autocomplete":`list`},Se={};function I(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Ce=[];function L(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(k);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var R=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=L(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(A))i=new e(i.source,1,n.value);else if(n.is(j))i=new e(i.source,0);else if(n.is(z))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(D(e.state))}},we=class e extends R{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=D(t.state);if(o>a||!r||n&2&&(D(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return Te(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new T(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??D(t.state)):new R(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function Te(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):O(e,!0).test(i)}var z=i.define({map(e,t){return e.map(e=>e.map(t))}}),B=a.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[te.from(e,e=>e.tooltip),v.contentAttributes.from(e,e=>e.attrs)]});function V(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(B).active.find(e=>e.source==t.source);return r instanceof we?(typeof n==`string`?e.dispatch({...oe(e.state,n,r.from,r.to),annotations:k.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Ee=he(B,V);function H(e,t=`option`){return n=>{let r=n.state.field(B,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(M).interactionDelay)return!1;let i=1,a;t==`page`&&(a=b(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:N.of(s)}),!0}}var De=e=>{let t=e.state.field(B,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(M).interactionDelay?!1:V(e,t.open.options[t.open.selected])},U=e=>e.state.field(B,!1)?(e.dispatch({effects:A.of(!0)}),!0):!1,Oe=e=>{let t=e.state.field(B,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:j.of(null)}),!0)},ke=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Ae=50,je=1e3,Me=f.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(B).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(B),n=e.state.facet(M);if(!e.selectionSet&&!e.docChanged&&e.startState.field(B)==t)return;let r=e.transactions.some(e=>{let t=L(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Ae&&Date.now()-n.time>je){for(let e of n.context.abortListeners)try{e()}catch(e){C(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(A)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(B);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(M).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new T(t,D(t),e.explicit,this.view),r=new ke(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:j.of(null)}),C(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(M).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(M),n=this.view.state.field(B);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=D(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new we(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(i.done==null){let n=new R(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:z.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(B,!1);if(t&&t.tooltip&&this.view.state.facet(M).closeOnBlur){let n=t.open&&b(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:j.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:A.of(!1)}),20),this.composing=0}}}),Ne=typeof navigator==`object`&&/Win/.test(navigator.platform),Pe=S.highest(v.domEventHandlers({keydown(e,t){let n=t.state.field(B,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Ne&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&V(t,r),!1}})),W=v.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Fe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Ie=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(n){let r=n.mapPos(this.from,-1,t.TrackDel),i=n.mapPos(this.to,1,t.TrackDel);return r==null||i==null?null:new e(this.field,r,i)}},Le=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(l);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Ie(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Fe(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Re=o.widget({widget:new class extends e{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),ze=o.mark({class:`cm-snippetField`}),G=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=o.set(e.map(e=>(e.from==e.to?Re:ze).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},K=i.define({map(e,t){return e&&e.map(t)}}),Be=i.define(),q=a.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(K))return n.value;if(n.is(Be)&&e)return new G(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>v.decorations.from(e,e=>e?e.deco:o.none)});function J(e,t){return r.create(e.filter(e=>e.field==t).map(e=>r.range(e.from,e.to)))}function Ve(e){let t=Le.parse(e);return(e,n,r,a)=>{let{text:o,ranges:c}=t.instantiate(e.state,r),{main:l}=e.state.selection,u={changes:{from:r,to:a==l.from?l.to:a,insert:s.of(o)},scrollIntoView:!0,annotations:n?[k.of(n),p.userEvent.of(`input.complete`)]:void 0};if(c.length&&(u.selection=J(c,0)),c.some(e=>e.field>0)){let t=new G(c,0),n=u.effects=[K.of(t)];e.state.field(q,!1)===void 0&&n.push(i.appendConfig.of([q,Ge,qe,W]))}e.dispatch(e.state.update(u))}}function He(e){return({state:t,dispatch:n})=>{let r=t.field(q,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:J(r.ranges,i),effects:K.of(a?null:new G(r.ranges,i)),scrollIntoView:!0})),!0}}var Ue=[{key:`Tab`,run:He(1),shift:He(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(q,!1)?(t(e.update({effects:K.of(null)})),!0):!1}],We=ee.define({combine(e){return e.length?e[0]:Ue}}),Ge=S.highest(x.compute([We],e=>e.facet(We)));function Ke(e,t){return{...t,apply:Ve(e)}}var qe=v.domEventHandlers({mousedown(e,t){let n=t.state.field(q,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:J(n.ranges,i.field),effects:K.of(n.ranges.some(e=>e.field>i.field)?new G(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Y={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},X=i.define({map(e,n){return n.mapPos(e,-1,t.TrackAfter)??void 0}}),Z=new class extends d{};Z.startSide=1,Z.endSide=-1;var Je=a.define({create(){return c.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(X)&&(e=e.update({add:[Z.range(n.value,n.value+1)]}));return e}});function Ye(){return[et,Je]}var Xe=`()[]{}<>«»»«[]{}`;function Ze(e){for(let t=0;t<16;t+=2)if(Xe.charCodeAt(t)==e)return Xe.charAt(t+1);return _(e<128?e:e+1)}function Qe(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||Y}var $e=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),et=v.inputHandler.of((e,t,r,i)=>{if(($e?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let a=e.state.selection.main;if(i.length>2||i.length==2&&n(w(i,0))==1||t!=a.from||r!=a.to)return!1;let o=nt(e.state,i);return o?(e.dispatch(o),!0):!1}),tt=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Qe(e,e.selection.main.head).brackets||Y.brackets,i=null,a=e.changeByRange(t=>{if(t.empty){let i=rt(e.doc,t.head);for(let a of n)if(a==i&&$(e.doc,t.head)==Ze(w(a,0)))return{changes:{from:t.head-a.length,to:t.head+a.length},range:r.cursor(t.head-a.length)}}return{range:i=t}});return i||t(e.update(a,{scrollIntoView:!0,userEvent:`delete.backward`})),!i}}];function nt(e,t){let n=Qe(e,e.selection.main.head),r=n.brackets||Y.brackets;for(let i of r){let a=Ze(w(i,0));if(t==i)return a==i?ot(e,i,r.indexOf(i+i+i)>-1,n):it(e,i,a,n.before||Y.before);if(t==a&&Q(e,e.selection.main.from))return at(e,i,a)}return null}function Q(e,t){let n=!1;return e.field(Je).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let r=e.sliceString(t,t+2);return r.slice(0,n(w(r,0)))}function rt(e,t){let r=e.sliceString(t-2,t);return n(w(r,0))==r.length?r:r.slice(1)}function it(e,t,n,i){let a=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:X.of(o.to+t.length),range:r.range(o.anchor+t.length,o.head+t.length)};let s=$(e.doc,o.head);return!s||/\s/.test(s)||i.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:X.of(o.head+t.length),range:r.cursor(o.head+t.length)}:{range:a=o}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function at(e,t,n){let i=null,a=e.changeByRange(t=>t.empty&&$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:r.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function ot(e,t,n,i){let a=i.stringPrefixes||Y.stringPrefixes,o=null,s=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:X.of(i.to+t.length),range:r.range(i.anchor+t.length,i.head+t.length)};let s=i.head,c=$(e.doc,s),l;if(c==t){if(st(e,s))return{changes:{insert:t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};if(Q(e,s)){let i=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+i.length,insert:i},range:r.cursor(s+i.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=lt(e,s-2*t.length,a))>-1&&st(e,l))return{changes:{insert:t+t+t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=h.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};return{range:o=i}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function st(e,t){let n=u(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=u(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function lt(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=h.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=h.Word)return n}return-1}function ut(e={}){return[Pe,B,M.of(e),Me,ft,W]}var dt=[{key:`Ctrl-Space`,run:U},{mac:"Alt-`",run:U},{mac:`Alt-i`,run:U},{key:`Escape`,run:Oe},{key:`ArrowDown`,run:H(!0)},{key:`ArrowUp`,run:H(!1)},{key:`PageDown`,run:H(!0,`page`)},{key:`PageUp`,run:H(!1,`page`)},{key:`Enter`,run:De}],ft=S.highest(x.computeN([M],e=>e.facet(M).defaultKeymap?[dt]:[]));export{re as a,Ke as c,tt as i,ut as n,dt as o,Ye as r,ie as s,T as t};
|
|
1
|
+
import{$ as e,At as t,Bt as n,Dt as r,Ft as i,It as a,J as o,Lt as s,Mt as c,O as l,P as u,Pt as d,Q as f,Rt as p,St as m,Tt as h,Vt as g,Wt as _,X as v,Y as y,at as b,dt as x,jt as S,kt as ee,pt as C,yt as te,zt as w}from"./dist-BTu6o3T-.js";var T=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=u(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(O(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function E(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function ne(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=E(t)+E(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function re(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:ne(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ie(e,t){return n=>{for(let t=u(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var ae=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function D(e){return e.selection.main.from}function O(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var k=m.define();function oe(e,t,n,i){let{main:a}=e.selection,o=n-a.from,s=i-a.from;return{...e.changeByRange(c=>{if(c!=a&&n!=i&&e.sliceDoc(c.from+o,c.from+s)!=e.sliceDoc(n,i))return{range:c};let l=e.toText(t);return{changes:{from:c.from+o,to:i==a.from?c.to:c.from+s,insert:l},range:r.cursor(c.from+o+l.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var se=new WeakMap;function ce(e){if(!Array.isArray(e))return e;let t=se.get(e);return t||se.set(e,t=re(e)),t}var A=i.define(),j=i.define(),le=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=w(e,t),i=n(r);this.chars.push(r);let a=e.slice(t,t+i),o=a.toUpperCase();this.folded.push(w(o==a?a.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:a,byWord:o}=this;if(t.length==1){let i=w(e,0),a=n(i),o=a==e.length?0:-100;if(i!=t[0])if(i==r[0])o+=-200;else return null;return this.ret(o,[0,a])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=t.length,l=0;if(s<0){for(let a=0,o=Math.min(e.length,200);a<o&&l<c;){let o=w(e,a);(o==t[l]||o==r[l])&&(i[l++]=a),a+=n(o)}if(l<c)return null}let u=0,d=0,f=!1,p=0,m=-1,h=-1,g=/[a-z]/.test(e),v=!0;for(let i=0,l=Math.min(e.length,200),y=0;i<l&&d<c;){let l=w(e,i);s<0&&(u<c&&l==t[u]&&(a[u++]=i),p<c&&(l==t[p]||l==r[p]?(p==0&&(m=i),h=i+1,p++):p=0));let b,x=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(b=_(l))==b.toLowerCase()?b==b.toUpperCase()?0:2:1;(!i||x==1&&g||y==0&&x!=0)&&(t[d]==l||r[d]==l&&(f=!0)?o[d++]=i:o.length&&(v=!1)),y=x,i+=n(l)}return d==c&&o[0]==0&&v?this.result(-100+(f?-200:0),o,e):p==c&&m==0?this.ret(-200-e.length+(h==e.length?0:-100),[0,h]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):p==c?this.ret(-900-e.length,[m,h]):d==c?this.result(-100+(f?-200:0)+-700+(v?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],a=0;for(let e of t){let t=e+(this.astral?n(w(r,e)):1);a&&i[a-1]==e?i[a-1]=t:(i[a++]=e,i[a++]=t)}return this.ret(e-r.length,i)}},ue=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},M=ee.define({combine(e){return g(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fe,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>de(e(n),t(n)),optionClass:(e,t)=>n=>de(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function de(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==y.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var N=i.define();function pe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function P(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var me=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(M);this.optionContent=pe(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=P(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:N.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(M).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:j.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=P(r.length,i,e.state.facet(M).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=P(t.options.length,t.selected,this.view.state.facet(M).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>C(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&ge(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(M).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0))if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function he(e,t){return n=>new me(n,e,t)}function ge(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function F(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function _e(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(M);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new ae(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new ue(n):new le(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new ae(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):F(e.completion)>F(c)&&(s[s.length-1]=e),c=e.completion}return s}var ve=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,I(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=_e(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(M).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,I(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Ee,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ye=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Ce,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(M),i=(r.override||n.languageDataAt(`autocomplete`,D(n)).map(ce)).map(e=>(this.active.find(t=>t.source==e)||new R(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(z));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!be(i,this.active)||o?a=ve.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new R(e.source,0):e));for(let e of t.effects)e.is(N)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xe:Se}};function be(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var xe={"aria-autocomplete":`list`},Se={};function I(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Ce=[];function L(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(k);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var R=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=L(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(A))i=new e(i.source,1,n.value);else if(n.is(j))i=new e(i.source,0);else if(n.is(z))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(D(e.state))}},we=class e extends R{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=D(t.state);if(o>a||!r||n&2&&(D(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return Te(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new T(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??D(t.state)):new R(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function Te(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):O(e,!0).test(i)}var z=i.define({map(e,t){return e.map(e=>e.map(t))}}),B=a.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[te.from(e,e=>e.tooltip),v.contentAttributes.from(e,e=>e.attrs)]});function V(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(B).active.find(e=>e.source==t.source);return r instanceof we?(typeof n==`string`?e.dispatch({...oe(e.state,n,r.from,r.to),annotations:k.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Ee=he(B,V);function H(e,t=`option`){return n=>{let r=n.state.field(B,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(M).interactionDelay)return!1;let i=1,a;t==`page`&&(a=b(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:N.of(s)}),!0}}var De=e=>{let t=e.state.field(B,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(M).interactionDelay?!1:V(e,t.open.options[t.open.selected])},U=e=>e.state.field(B,!1)?(e.dispatch({effects:A.of(!0)}),!0):!1,Oe=e=>{let t=e.state.field(B,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:j.of(null)}),!0)},ke=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Ae=50,je=1e3,Me=f.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(B).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(B),n=e.state.facet(M);if(!e.selectionSet&&!e.docChanged&&e.startState.field(B)==t)return;let r=e.transactions.some(e=>{let t=L(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Ae&&Date.now()-n.time>je){for(let e of n.context.abortListeners)try{e()}catch(e){C(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(A)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(B);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(M).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new T(t,D(t),e.explicit,this.view),r=new ke(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:j.of(null)}),C(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(M).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(M),n=this.view.state.field(B);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=D(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new we(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(i.done==null){let n=new R(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:z.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(B,!1);if(t&&t.tooltip&&this.view.state.facet(M).closeOnBlur){let n=t.open&&b(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:j.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:A.of(!1)}),20),this.composing=0}}}),Ne=typeof navigator==`object`&&/Win/.test(navigator.platform),Pe=S.highest(v.domEventHandlers({keydown(e,t){let n=t.state.field(B,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Ne&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&V(t,r),!1}})),W=v.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Fe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Ie=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(n){let r=n.mapPos(this.from,-1,t.TrackDel),i=n.mapPos(this.to,1,t.TrackDel);return r==null||i==null?null:new e(this.field,r,i)}},Le=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(l);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Ie(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Fe(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Re=o.widget({widget:new class extends e{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),ze=o.mark({class:`cm-snippetField`}),G=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=o.set(e.map(e=>(e.from==e.to?Re:ze).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},K=i.define({map(e,t){return e&&e.map(t)}}),Be=i.define(),q=a.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(K))return n.value;if(n.is(Be)&&e)return new G(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>v.decorations.from(e,e=>e?e.deco:o.none)});function J(e,t){return r.create(e.filter(e=>e.field==t).map(e=>r.range(e.from,e.to)))}function Ve(e){let t=Le.parse(e);return(e,n,r,a)=>{let{text:o,ranges:c}=t.instantiate(e.state,r),{main:l}=e.state.selection,u={changes:{from:r,to:a==l.from?l.to:a,insert:s.of(o)},scrollIntoView:!0,annotations:n?[k.of(n),p.userEvent.of(`input.complete`)]:void 0};if(c.length&&(u.selection=J(c,0)),c.some(e=>e.field>0)){let t=new G(c,0),n=u.effects=[K.of(t)];e.state.field(q,!1)===void 0&&n.push(i.appendConfig.of([q,Ge,qe,W]))}e.dispatch(e.state.update(u))}}function He(e){return({state:t,dispatch:n})=>{let r=t.field(q,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:J(r.ranges,i),effects:K.of(a?null:new G(r.ranges,i)),scrollIntoView:!0})),!0}}var Ue=[{key:`Tab`,run:He(1),shift:He(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(q,!1)?(t(e.update({effects:K.of(null)})),!0):!1}],We=ee.define({combine(e){return e.length?e[0]:Ue}}),Ge=S.highest(x.compute([We],e=>e.facet(We)));function Ke(e,t){return{...t,apply:Ve(e)}}var qe=v.domEventHandlers({mousedown(e,t){let n=t.state.field(q,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:J(n.ranges,i.field),effects:K.of(n.ranges.some(e=>e.field>i.field)?new G(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Y={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},X=i.define({map(e,n){return n.mapPos(e,-1,t.TrackAfter)??void 0}}),Z=new class extends d{};Z.startSide=1,Z.endSide=-1;var Je=a.define({create(){return c.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(X)&&(e=e.update({add:[Z.range(n.value,n.value+1)]}));return e}});function Ye(){return[et,Je]}var Xe=`()[]{}<>«»»«[]{}`;function Ze(e){for(let t=0;t<16;t+=2)if(Xe.charCodeAt(t)==e)return Xe.charAt(t+1);return _(e<128?e:e+1)}function Qe(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||Y}var $e=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),et=v.inputHandler.of((e,t,r,i)=>{if(($e?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let a=e.state.selection.main;if(i.length>2||i.length==2&&n(w(i,0))==1||t!=a.from||r!=a.to)return!1;let o=nt(e.state,i);return o?(e.dispatch(o),!0):!1}),tt=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Qe(e,e.selection.main.head).brackets||Y.brackets,i=null,a=e.changeByRange(t=>{if(t.empty){let i=rt(e.doc,t.head);for(let a of n)if(a==i&&$(e.doc,t.head)==Ze(w(a,0)))return{changes:{from:t.head-a.length,to:t.head+a.length},range:r.cursor(t.head-a.length)}}return{range:i=t}});return i||t(e.update(a,{scrollIntoView:!0,userEvent:`delete.backward`})),!i}}];function nt(e,t){let n=Qe(e,e.selection.main.head),r=n.brackets||Y.brackets;for(let i of r){let a=Ze(w(i,0));if(t==i)return a==i?ot(e,i,r.indexOf(i+i+i)>-1,n):it(e,i,a,n.before||Y.before);if(t==a&&Q(e,e.selection.main.from))return at(e,i,a)}return null}function Q(e,t){let n=!1;return e.field(Je).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let r=e.sliceString(t,t+2);return r.slice(0,n(w(r,0)))}function rt(e,t){let r=e.sliceString(t-2,t);return n(w(r,0))==r.length?r:r.slice(1)}function it(e,t,n,i){let a=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:X.of(o.to+t.length),range:r.range(o.anchor+t.length,o.head+t.length)};let s=$(e.doc,o.head);return!s||/\s/.test(s)||i.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:X.of(o.head+t.length),range:r.cursor(o.head+t.length)}:{range:a=o}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function at(e,t,n){let i=null,a=e.changeByRange(t=>t.empty&&$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:r.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function ot(e,t,n,i){let a=i.stringPrefixes||Y.stringPrefixes,o=null,s=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:X.of(i.to+t.length),range:r.range(i.anchor+t.length,i.head+t.length)};let s=i.head,c=$(e.doc,s),l;if(c==t){if(st(e,s))return{changes:{insert:t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};if(Q(e,s)){let i=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+i.length,insert:i},range:r.cursor(s+i.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=lt(e,s-2*t.length,a))>-1&&st(e,l))return{changes:{insert:t+t+t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=h.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:X.of(s+t.length),range:r.cursor(s+t.length)};return{range:o=i}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function st(e,t){let n=u(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=u(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function lt(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=h.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=h.Word)return n}return-1}function ut(e={}){return[Pe,B,M.of(e),Me,ft,W]}var dt=[{key:`Ctrl-Space`,run:U},{mac:"Alt-`",run:U},{mac:`Alt-i`,run:U},{key:`Escape`,run:Oe},{key:`ArrowDown`,run:H(!0)},{key:`ArrowUp`,run:H(!1)},{key:`PageDown`,run:H(!0,`page`)},{key:`PageUp`,run:H(!1,`page`)},{key:`Enter`,run:De}],ft=S.highest(x.computeN([M],e=>e.facet(M).defaultKeymap?[dt]:[]));export{re as a,Ke as c,tt as i,ut as n,dt as o,Ye as r,ie as s,T as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CYidjpOJ.js";import{Dt as t,L as n,P as r,R as i,T as a,X as o,b as s,o as c,q as l,r as ee,u as te}from"./dist-BlH6jxEE.js";import{n as u,r as ne,t as re}from"./dist-BCM06z1D.js";import{n as d,t as ie}from"./dist-DndwauQ3.js";import{a as ae,i as oe,n as se,o as ce,r as f}from"./dist-ClczuKkQ.js";var le=55,ue=1,de=56,fe=2,pe=57,me=3,p=4,he=5,m=6,ge=7,h=8,g=9,_=10,_e=11,ve=12,ye=13,v=58,be=14,xe=15,y=59,b=21,Se=23,x=24,Ce=25,S=27,C=28,we=29,Te=32,Ee=35,De=37,Oe=38,ke=0,Ae=1,je={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Me={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},w={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ne(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var T=null,E=null,D=0;function O(e,t){let n=e.pos+t;if(D==n&&E==e)return T;let r=e.peek(t),i=``;for(;Ne(r);)i+=String.fromCharCode(r),r=e.peek(++t);return E=e,D=n,T=i?i.toLowerCase():r==Pe||r==Fe?void 0:null}var k=60,A=62,j=47,Pe=63,Fe=33,Ie=45;function M(e,t){this.name=e,this.parent=t}var Le=[m,_,ge,h,g],Re=new re({start:null,shift(e,t,n,r){return Le.indexOf(t)>-1?new M(O(r,1)||``,e):e},reduce(e,t){return t==b&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==m||i==De?new M(O(r,1)||``,e):e},strict:!1}),ze=new u((e,t)=>{if(e.next!=k){e.next<0&&t.context&&e.acceptToken(v);return}e.advance();let n=e.next==j;n&&e.advance();let r=O(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?xe:be);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(_e);if(i&&Me[i])return e.acceptToken(v,-2);if(t.dialectEnabled(ke))return e.acceptToken(ve);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(ye)}else{if(r==`script`)return e.acceptToken(ge);if(r==`style`)return e.acceptToken(h);if(r==`textarea`)return e.acceptToken(g);if(je.hasOwnProperty(r))return e.acceptToken(_);i&&w[i]&&w[i][r]?e.acceptToken(v,-1):e.acceptToken(m)}},{contextual:!0}),Be=new u(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(y);break}if(e.next==Ie)t++;else if(e.next==A&&t>=2){n>=3&&e.acceptToken(y,-2);break}else t=0;e.advance()}});function Ve(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var He=new u((e,t)=>{if(e.next==j&&e.peek(1)==A){let n=t.dialectEnabled(Ae)||Ve(t.context);e.acceptToken(n?he:p,2)}else e.next==A&&e.acceptToken(p,1)});function N(e,t,n){let r=2+e.length;return new u(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==k||a==1&&i.next==j||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==A){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Ue=N(`script`,le,ue),We=N(`style`,de,fe),Ge=N(`textarea`,pe,me),Ke=n({"Text RawText IncompleteTag IncompleteCloseTag":i.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":i.angleBracket,TagName:i.tagName,"MismatchedCloseTag/TagName":[i.tagName,i.invalid],AttributeName:i.attributeName,"AttributeValue UnquotedAttributeValue":i.attributeValue,Is:i.definitionOperator,"EntityReference CharacterReference":i.character,Comment:i.blockComment,ProcessingInst:i.processingInstruction,DoctypeDecl:i.documentMeta}),qe=ne.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p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gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Re,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42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=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ue,We,Ge,He,ze,Be,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function P(e,t){let n=Object.create(null);for(let r of e.getChildren(x)){let e=r.getChild(Ce),i=r.getChild(S)||r.getChild(C);e&&(n[t.read(e.from,e.to)]=i?i.type.id==S?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function F(e,t){let n=e.getChild(Se);return n?t.read(n.from,n.to):` `}function I(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=P(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function Je(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return l((e,t)=>{let s=e.type.id;if(s==we)return I(e,t,n);if(s==Te)return I(e,t,r);if(s==Ee)return I(e,t,i);if(s==b&&a.length){let n=e.node,r=n.firstChild,i=r&&F(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=P(r,t)))){let t=n.lastChild,i=t.type.id==Oe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==x){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=F(n.parent,t))continue;let e=n.lastChild;if(e.type.id==S){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==C)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var Ye=e({autoCloseTags:()=>lt,html:()=>st,htmlCompletionSource:()=>tt,htmlCompletionSourceWith:()=>nt,htmlLanguage:()=>$}),L=[`_blank`,`_self`,`_top`,`_parent`],R=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],z=[`get`,`post`,`put`,`delete`],B=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],V=[`true`,`false`],H={},Xe={a:{attrs:{href:null,ping:null,type:null,media:null,target:L,hreflang:null}},abbr:H,address:H,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:H,aside:H,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:H,base:{attrs:{href:null,target:L}},bdi:H,bdo:H,blockquote:{attrs:{cite:null}},body:H,br:H,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:B,formmethod:z,formnovalidate:[`novalidate`],formtarget:L,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:H,center:H,cite:H,code:H,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:H,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:H,div:H,dl:H,dt:H,em:H,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:H,figure:H,footer:H,form:{attrs:{action:null,name:null,"accept-charset":R,autocomplete:[`on`,`off`],enctype:B,method:z,novalidate:[`novalidate`],target:L}},h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:H,hgroup:H,hr:H,html:{attrs:{manifest:null}},i:H,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:B,formmethod:z,formnovalidate:[`novalidate`],formtarget:L,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:H,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:H,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:H,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:R,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:H,noscript:H,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:H,param:{attrs:{name:null,value:null}},pre:H,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:H,rt:H,ruby:H,samp:H,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:R}},section:H,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:H,source:{attrs:{src:null,type:null,media:null}},span:H,strong:H,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:H,summary:H,sup:H,table:H,tbody:H,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:H,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:H,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:H,time:{attrs:{datetime:null}},title:H,tr:H,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:H,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:H},U={accesskey:null,class:null,contenteditable:V,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:V,autocorrect:V,autocapitalize:V,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":V,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":V,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":V,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":V,"aria-hidden":V,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":V,"aria-multiselectable":V,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":V,"aria-relevant":null,"aria-required":V,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},W=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of W)U[e]=null;var G=class{constructor(e,t){this.tags={...Xe,...e},this.globalAttrs={...U,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};G.default=new G;function K(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function q(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function J(e,t,n){return n.tags[K(e,q(t))]?.children||n.allTags}function Y(e,t){let n=[];for(let r=q(t);r&&!r.type.isTop;r=q(r.parent)){let i=K(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var X=/^[:\-\.\w\u00b7-\uffff]*$/;function Z(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=q(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:J(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(Y(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Q(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:Y(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:X}}function Ze(e,t,n,r){let i=[],a=0;for(let r of J(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of Y(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Qe(e,t,n,r,i){let a=q(n),o=a?t.tags[K(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:X}}function $e(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=q(n),i=r?t.tags[K(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function et(e,t){let{state:n,pos:i}=t,a=r(n).resolveInner(i,-1),o=a.resolve(i);for(let e=i,t;o==a&&(t=a.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;o=a=t,e=n.from}return a.name==`TagName`?a.parent&&/CloseTag$/.test(a.parent.name)?Q(n,a,a.from,i):Z(n,e,a,a.from,i):a.name==`StartTag`||a.name==`IncompleteTag`?Z(n,e,a,i,i):a.name==`StartCloseTag`||a.name==`IncompleteCloseTag`?Q(n,a,i,i):a.name==`OpenTag`||a.name==`SelfClosingTag`||a.name==`AttributeName`?Qe(n,e,a,a.name==`AttributeName`?a.from:i,i):a.name==`Is`||a.name==`AttributeValue`||a.name==`UnquotedAttributeValue`?$e(n,e,a,a.name==`Is`?i:a.from,i):t.explicit&&(o.name==`Element`||o.name==`Text`||o.name==`Document`)?Ze(n,e,a,i):null}function tt(e){return et(G.default,e)}function nt(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new G(t,n):G.default;return e=>et(r,e)}var rt=f.parser.configure({top:`SingleExpression`}),it=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:ce.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:oe.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:ae.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:rt},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:f.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:d.parser}],at=[{name:`style`,parser:d.parser.configure({top:`Styles`})}].concat(W.map(e=>({name:e,parser:f.parser}))),ot=ee.define({name:`html`,parser:qe.configure({props:[a.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),te.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),$=ot.configure({wrap:Je(it,at)});function st(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=Je((e.nestedLanguages||[]).concat(it),(e.nestedAttributes||[]).concat(at))),new c(n?ot.configure({wrap:n,dialect:t}):t?$.configure({dialect:t}):$,[$.data.of({autocomplete:nt(e)}),e.autoCloseTags===!1?[]:lt,se().support,ie().support])}var ct=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),lt=o.inputHandler.of((e,n,i,a,o)=>{if(e.composing||e.state.readOnly||n!=i||a!=`>`&&a!=`/`||!$.isActiveAt(e.state,n,-1))return!1;let s=o(),{state:c}=s,l=c.changeByRange(e=>{let n=c.doc.sliceString(e.from-1,e.to)==a,{head:i}=e,o=r(c).resolveInner(i,-1),s;if(n&&a==`>`&&o.name==`EndTag`){let t=o.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(s=K(c.doc,t.parent,i))&&!ct.has(s))return{range:e,changes:{from:i,to:i+ +(c.doc.sliceString(i,i+1)===`>`),insert:`</${s}>`}}}else if(n&&a==`/`&&o.name==`IncompleteCloseTag`){let e=o.parent;if(o.from==i-2&&e.lastChild?.name!=`CloseTag`&&(s=K(c.doc,e,i))&&!ct.has(s)){let e=i+ +(c.doc.sliceString(i,i+1)===`>`),n=`${s}>`;return{range:t.cursor(i+n.length,-1),changes:{from:i,to:e,insert:n}}}}return{range:e}});return l.changes.empty?!1:(e.dispatch([s,c.update(l,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)});export{st as n,tt as r,Ye as t};
|
|
1
|
+
import{r as e}from"./chunk-CYidjpOJ.js";import{Dt as t,L as n,P as r,R as i,T as a,X as o,b as s,o as c,q as l,r as ee,u as te}from"./dist-BTu6o3T-.js";import{n as u,r as ne,t as re}from"./dist-CDMQmWZl.js";import{n as d,t as ie}from"./dist-BpOfJRMm.js";import{a as ae,i as oe,n as se,o as ce,r as f}from"./dist-y6w4IT08.js";var le=55,ue=1,de=56,fe=2,pe=57,me=3,p=4,he=5,m=6,ge=7,h=8,g=9,_=10,_e=11,ve=12,ye=13,v=58,be=14,xe=15,y=59,b=21,Se=23,x=24,Ce=25,S=27,C=28,we=29,Te=32,Ee=35,De=37,Oe=38,ke=0,Ae=1,je={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Me={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},w={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ne(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var T=null,E=null,D=0;function O(e,t){let n=e.pos+t;if(D==n&&E==e)return T;let r=e.peek(t),i=``;for(;Ne(r);)i+=String.fromCharCode(r),r=e.peek(++t);return E=e,D=n,T=i?i.toLowerCase():r==Pe||r==Fe?void 0:null}var k=60,A=62,j=47,Pe=63,Fe=33,Ie=45;function M(e,t){this.name=e,this.parent=t}var Le=[m,_,ge,h,g],Re=new re({start:null,shift(e,t,n,r){return Le.indexOf(t)>-1?new M(O(r,1)||``,e):e},reduce(e,t){return t==b&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==m||i==De?new M(O(r,1)||``,e):e},strict:!1}),ze=new u((e,t)=>{if(e.next!=k){e.next<0&&t.context&&e.acceptToken(v);return}e.advance();let n=e.next==j;n&&e.advance();let r=O(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?xe:be);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(_e);if(i&&Me[i])return e.acceptToken(v,-2);if(t.dialectEnabled(ke))return e.acceptToken(ve);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(ye)}else{if(r==`script`)return e.acceptToken(ge);if(r==`style`)return e.acceptToken(h);if(r==`textarea`)return e.acceptToken(g);if(je.hasOwnProperty(r))return e.acceptToken(_);i&&w[i]&&w[i][r]?e.acceptToken(v,-1):e.acceptToken(m)}},{contextual:!0}),Be=new u(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(y);break}if(e.next==Ie)t++;else if(e.next==A&&t>=2){n>=3&&e.acceptToken(y,-2);break}else t=0;e.advance()}});function Ve(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var He=new u((e,t)=>{if(e.next==j&&e.peek(1)==A){let n=t.dialectEnabled(Ae)||Ve(t.context);e.acceptToken(n?he:p,2)}else e.next==A&&e.acceptToken(p,1)});function N(e,t,n){let r=2+e.length;return new u(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==k||a==1&&i.next==j||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==A){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Ue=N(`script`,le,ue),We=N(`style`,de,fe),Ge=N(`textarea`,pe,me),Ke=n({"Text RawText IncompleteTag IncompleteCloseTag":i.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":i.angleBracket,TagName:i.tagName,"MismatchedCloseTag/TagName":[i.tagName,i.invalid],AttributeName:i.attributeName,"AttributeValue UnquotedAttributeValue":i.attributeValue,Is:i.definitionOperator,"EntityReference CharacterReference":i.character,Comment:i.blockComment,ProcessingInst:i.processingInstruction,DoctypeDecl:i.documentMeta}),qe=ne.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zO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QpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Re,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[Ke],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#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.getChildren(x)){let e=r.getChild(Ce),i=r.getChild(S)||r.getChild(C);e&&(n[t.read(e.from,e.to)]=i?i.type.id==S?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function F(e,t){let n=e.getChild(Se);return n?t.read(n.from,n.to):` `}function I(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=P(e.node.parent.firstChild,t)))return{parser:i.parser,bracketed:!0};return null}function Je(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return l((e,t)=>{let s=e.type.id;if(s==we)return I(e,t,n);if(s==Te)return I(e,t,r);if(s==Ee)return I(e,t,i);if(s==b&&a.length){let n=e.node,r=n.firstChild,i=r&&F(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=P(r,t)))){let t=n.lastChild,i=t.type.id==Oe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==x){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=F(n.parent,t))continue;let e=n.lastChild;if(e.type.id==S){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}],bracketed:!0}}else if(e.type.id==C)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var Ye=e({autoCloseTags:()=>lt,html:()=>st,htmlCompletionSource:()=>tt,htmlCompletionSourceWith:()=>nt,htmlLanguage:()=>$}),L=[`_blank`,`_self`,`_top`,`_parent`],R=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],z=[`get`,`post`,`put`,`delete`],B=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],V=[`true`,`false`],H={},Xe={a:{attrs:{href:null,ping:null,type:null,media:null,target:L,hreflang:null}},abbr:H,address:H,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:H,aside:H,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:H,base:{attrs:{href:null,target:L}},bdi:H,bdo:H,blockquote:{attrs:{cite:null}},body:H,br:H,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:B,formmethod:z,formnovalidate:[`novalidate`],formtarget:L,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:H,center:H,cite:H,code:H,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:H,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:H,div:H,dl:H,dt:H,em:H,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:H,figure:H,footer:H,form:{attrs:{action:null,name:null,"accept-charset":R,autocomplete:[`on`,`off`],enctype:B,method:z,novalidate:[`novalidate`],target:L}},h1:H,h2:H,h3:H,h4:H,h5:H,h6:H,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:H,hgroup:H,hr:H,html:{attrs:{manifest:null}},i:H,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:B,formmethod:z,formnovalidate:[`novalidate`],formtarget:L,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:H,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:H,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:H,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:R,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:H,noscript:H,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:H,param:{attrs:{name:null,value:null}},pre:H,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:H,rt:H,ruby:H,samp:H,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:R}},section:H,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:H,source:{attrs:{src:null,type:null,media:null}},span:H,strong:H,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:H,summary:H,sup:H,table:H,tbody:H,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:H,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:H,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:H,time:{attrs:{datetime:null}},title:H,tr:H,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:H,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:H},U={accesskey:null,class:null,contenteditable:V,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:V,autocorrect:V,autocapitalize:V,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":V,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":V,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":V,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":V,"aria-hidden":V,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":V,"aria-multiselectable":V,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":V,"aria-relevant":null,"aria-required":V,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},W=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of W)U[e]=null;var G=class{constructor(e,t){this.tags={...Xe,...e},this.globalAttrs={...U,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};G.default=new G;function K(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function q(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function J(e,t,n){return n.tags[K(e,q(t))]?.children||n.allTags}function Y(e,t){let n=[];for(let r=q(t);r&&!r.type.isTop;r=q(r.parent)){let i=K(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var X=/^[:\-\.\w\u00b7-\uffff]*$/;function Z(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=q(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:J(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(Y(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Q(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:Y(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:X}}function Ze(e,t,n,r){let i=[],a=0;for(let r of J(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of Y(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Qe(e,t,n,r,i){let a=q(n),o=a?t.tags[K(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:X}}function $e(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=q(n),i=r?t.tags[K(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function et(e,t){let{state:n,pos:i}=t,a=r(n).resolveInner(i,-1),o=a.resolve(i);for(let e=i,t;o==a&&(t=a.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;o=a=t,e=n.from}return a.name==`TagName`?a.parent&&/CloseTag$/.test(a.parent.name)?Q(n,a,a.from,i):Z(n,e,a,a.from,i):a.name==`StartTag`||a.name==`IncompleteTag`?Z(n,e,a,i,i):a.name==`StartCloseTag`||a.name==`IncompleteCloseTag`?Q(n,a,i,i):a.name==`OpenTag`||a.name==`SelfClosingTag`||a.name==`AttributeName`?Qe(n,e,a,a.name==`AttributeName`?a.from:i,i):a.name==`Is`||a.name==`AttributeValue`||a.name==`UnquotedAttributeValue`?$e(n,e,a,a.name==`Is`?i:a.from,i):t.explicit&&(o.name==`Element`||o.name==`Text`||o.name==`Document`)?Ze(n,e,a,i):null}function tt(e){return et(G.default,e)}function nt(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new G(t,n):G.default;return e=>et(r,e)}var rt=f.parser.configure({top:`SingleExpression`}),it=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:ce.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:oe.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:ae.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:rt},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:f.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:d.parser}],at=[{name:`style`,parser:d.parser.configure({top:`Styles`})}].concat(W.map(e=>({name:e,parser:f.parser}))),ot=ee.define({name:`html`,parser:qe.configure({props:[a.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),te.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),$=ot.configure({wrap:Je(it,at)});function st(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=Je((e.nestedLanguages||[]).concat(it),(e.nestedAttributes||[]).concat(at))),new c(n?ot.configure({wrap:n,dialect:t}):t?$.configure({dialect:t}):$,[$.data.of({autocomplete:nt(e)}),e.autoCloseTags===!1?[]:lt,se().support,ie().support])}var ct=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),lt=o.inputHandler.of((e,n,i,a,o)=>{if(e.composing||e.state.readOnly||n!=i||a!=`>`&&a!=`/`||!$.isActiveAt(e.state,n,-1))return!1;let s=o(),{state:c}=s,l=c.changeByRange(e=>{let n=c.doc.sliceString(e.from-1,e.to)==a,{head:i}=e,o=r(c).resolveInner(i,-1),s;if(n&&a==`>`&&o.name==`EndTag`){let t=o.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(s=K(c.doc,t.parent,i))&&!ct.has(s))return{range:e,changes:{from:i,to:i+ +(c.doc.sliceString(i,i+1)===`>`),insert:`</${s}>`}}}else if(n&&a==`/`&&o.name==`IncompleteCloseTag`){let e=o.parent;if(o.from==i-2&&e.lastChild?.name!=`CloseTag`&&(s=K(c.doc,e,i))&&!ct.has(s)){let e=i+ +(c.doc.sliceString(i,i+1)===`>`),n=`${s}>`;return{range:t.cursor(i+n.length,-1),changes:{from:i,to:e,insert:n}}}}return{range:e}});return l.changes.empty?!1:(e.dispatch([s,c.update(l,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)});export{st as n,tt as r,Ye as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./chunk-CYidjpOJ.js";import{A as t,Dt as n,F as r,G as i,H as a,Ht as o,K as s,L as c,O as l,Ot as u,P as d,R as f,T as p,U as m,V as h,X as g,a as ee,b as _,dt as te,i as ne,jt as re,o as ie,p as ae,q as oe,s as se,x as ce}from"./dist-BlH6jxEE.js";import{n as le,r as ue}from"./dist-DJ3iQH0N.js";import{t as de}from"./dist-DvtYFuZI.js";var fe=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[h.contextHash,r]]}addChild(e,t){e.prop(h.contextHash)!=this.hash&&(e=new s(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new s(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new s(m.none,e,t,n,this.hashProp)})}},v;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(v||={});var pe=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},me=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return b(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function he(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==v.OrderedList?w:C)(n,t,!1);return r>0&&(e.type!=v.BulletList||S(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var ge={[v.Blockquote](e,t,n){return n.next==62?(n.markers.push(R(v.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(y(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[v.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[v.OrderedList]:he,[v.BulletList]:he,[v.Document](){return!0}};function y(e){return e==32||e==9||e==10||e==13}function b(e,t=0){for(;t<e.length&&y(e.charCodeAt(t));)t++;return t}function x(e,t,n){for(;t>n&&y(e.charCodeAt(t-1));)t--;return t}function _e(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function ve(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function S(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!y(n))return-1}return n&&e.next==45&&xe(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(j.SetextHeading)>-1||r<3?-1:1}function ye(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function C(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||y(e.text.charCodeAt(e.pos+1)))&&(!n||ye(t,v.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function w(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!y(e.text.charCodeAt(r+1))||n&&!ye(t,v.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function be(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function xe(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&y(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var T=/^[ \t]*$/,Se=/-->/,Ce=/\?>/,E=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Se],[/^\s*<\?/,Ce],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,T],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,T]];function we(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=E.length-+!!n;e<t;e++)if(E[e][0].test(r))return e;return-1}function D(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function O(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==v.CodeText?e[r].to=n:e.push(R(v.CodeText,t,n))}var k={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(O(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){O(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==v.CodeText?O(o,e.from,e.to):o.push(e);s=[]}O(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&O(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=v.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(v.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=_e(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=x(t.text,t.text.length,o),c=[R(v.CodeMark,r,r+a)];o<s&&c.push(R(v.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&O(c,e.lineStart-1,e.lineStart),c.push(R(v.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(O(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(O(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(v.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=ve(t);return n<0?!1:(e.startContext(v.Blockquote,t.pos),e.addNode(v.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(S(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(v.HorizontalRule,n),!0},BulletList(e,t){let n=C(t,e,!1);if(n<0)return!1;e.block.type!=v.BulletList&&e.startContext(v.BulletList,t.basePos,t.next);let r=D(t,t.pos+1);return e.startContext(v.ListItem,t.basePos,r-t.baseIndent),e.addNode(v.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=w(t,e,!1);if(n<0)return!1;e.block.type!=v.OrderedList&&e.startContext(v.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=D(t,t.pos+n);return e.startContext(v.ListItem,t.basePos,r-t.baseIndent),e.addNode(v.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=be(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=x(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!y(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(v.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(v.HeaderMark,o-r,a-r);let c=s.finish(v.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=we(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=E[n][1],a=[],o=i!=T;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==Se?v.CommentBlock:i==Ce?v.ProcessingInstructionBlock:v.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},Te=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
1
|
+
import{r as e}from"./chunk-CYidjpOJ.js";import{A as t,Dt as n,F as r,G as i,H as a,Ht as o,K as s,L as c,O as l,Ot as u,P as d,R as f,T as p,U as m,V as h,X as g,a as ee,b as _,dt as te,i as ne,jt as re,o as ie,p as ae,q as oe,s as se,x as ce}from"./dist-BTu6o3T-.js";import{n as le,r as ue}from"./dist-CebtYbHb.js";import{t as de}from"./dist-CNm9tACe.js";var fe=class e{static create(t,n,r,i,a){return new e(t,n,r,i+(i<<8)+t+(n<<4)|0,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[h.contextHash,r]]}addChild(e,t){e.prop(h.contextHash)!=this.hash&&(e=new s(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new s(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new s(m.none,e,t,n,this.hashProp)})}},v;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(v||={});var pe=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},me=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return b(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function he(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==v.OrderedList?w:C)(n,t,!1);return r>0&&(e.type!=v.BulletList||S(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var ge={[v.Blockquote](e,t,n){return n.next==62?(n.markers.push(R(v.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(y(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0):!1},[v.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[v.OrderedList]:he,[v.BulletList]:he,[v.Document](){return!0}};function y(e){return e==32||e==9||e==10||e==13}function b(e,t=0){for(;t<e.length&&y(e.charCodeAt(t));)t++;return t}function x(e,t,n){for(;t>n&&y(e.charCodeAt(t-1));)t--;return t}function _e(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function ve(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function S(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!y(n))return-1}return n&&e.next==45&&xe(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(j.SetextHeading)>-1||r<3?-1:1}function ye(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function C(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||y(e.text.charCodeAt(e.pos+1)))&&(!n||ye(t,v.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function w(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!y(e.text.charCodeAt(r+1))||n&&!ye(t,v.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function be(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function xe(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&y(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var T=/^[ \t]*$/,Se=/-->/,Ce=/\?>/,E=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,Se],[/^\s*<\?/,Ce],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,T],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,T]];function we(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=E.length-+!!n;e<t;e++)if(E[e][0].test(r))return e;return-1}function D(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.countIndent(e.skipSpace(t),t,n);return r>=n+5?n+1:r}function O(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==v.CodeText?e[r].to=n:e.push(R(v.CodeText,t,n))}var k={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(O(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){O(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==v.CodeText?O(o,e.from,e.to):o.push(e);s=[]}O(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&O(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=v.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(v.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=_e(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=x(t.text,t.text.length,o),c=[R(v.CodeMark,r,r+a)];o<s&&c.push(R(v.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&O(c,e.lineStart-1,e.lineStart),c.push(R(v.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}else{o=!0,n||(O(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(O(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(v.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=ve(t);return n<0?!1:(e.startContext(v.Blockquote,t.pos),e.addNode(v.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(S(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(v.HorizontalRule,n),!0},BulletList(e,t){let n=C(t,e,!1);if(n<0)return!1;e.block.type!=v.BulletList&&e.startContext(v.BulletList,t.basePos,t.next);let r=D(t,t.pos+1);return e.startContext(v.ListItem,t.basePos,r-t.baseIndent),e.addNode(v.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=w(t,e,!1);if(n<0)return!1;e.block.type!=v.OrderedList&&e.startContext(v.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=D(t,t.pos+n);return e.startContext(v.ListItem,t.basePos,r-t.baseIndent),e.addNode(v.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=be(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=x(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!y(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(v.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(v.HeaderMark,o-r,a-r);let c=s.finish(v.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=we(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=E[n][1],a=[],o=i!=T;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==Se?v.CommentBlock:i==Ce?v.ProcessingInstructionBlock:v.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},Te=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
|
|
2
2
|
`+t.scrub(),i=this.advance(r);return i>-1&&i<r.length?this.complete(e,n,i):!1}finish(e,t){return(this.stage==2||this.stage==3)&&b(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,R(v.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(Be(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(R(v.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Re(e,b(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=b(e,this.pos),n=0;if(t>this.pos){let r=ze(e,t,this.start);if(r){let t=A(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=A(e,this.pos),n>0&&n<e.length?n:-1}else return A(e,this.pos)}};function A(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!y(n))return-1}return t}var Ee=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:xe(t),i=t.next;if(r<0)return!1;let a=R(v.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,R(i==61?v.SetextHeading1:v.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},j={LinkReference(e,t){return t.content.charCodeAt(0)==91?new Te(t):null},SetextHeading(){return new Ee}},De=[(e,t)=>be(t)>=0,(e,t)=>_e(t)>=0,(e,t)=>ve(t)>=0,(e,t)=>C(t,e,!0)>=0,(e,t)=>w(t,e,!0)>=0,(e,t)=>S(t,e,!0)>=0,(e,t)=>we(t,e,!0)>=0],Oe={text:``,end:0},ke=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new me,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=fe.create(v.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new He(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}let t=new pe(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
|
|
3
3
|
`+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Ue(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Oe;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+v[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
|
|
4
4
|
`?``:t;else{let e=t.indexOf(`
|