@inkeep/open-knowledge 0.25.0-beta.9 → 0.25.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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +65 -65
- package/dist/constants-yKbJK8XR.mjs +2 -0
- package/dist/dist-DX1pr3BF.mjs +1 -0
- package/dist/{dist-Bj79e9B6.mjs → dist-V-C0Ejac.mjs} +41 -45
- package/dist/{gh-detect-Ck0zE5NU.mjs → gh-detect-DD9zzsz3.mjs} +2 -2
- package/dist/{git-handle-DY9lXoT3-CfssnuIB.mjs → git-handle-Bhgrj9qX-DBwQr-02.mjs} +2 -2
- package/dist/git-handle-DjEtQkHv-DQXg1XhZ.mjs +1 -0
- package/dist/index.d.mts +758 -1
- package/dist/index.mjs +1 -1
- package/dist/init-BRGhGrt3.mjs +1 -0
- package/dist/init-By8oGFWX.mjs +321 -0
- package/dist/{loader-1IrHrVRY.mjs → loader-C6q_dNMP.mjs} +3 -3
- package/dist/loader-D2NUZ1XL.mjs +1 -0
- package/dist/preview-BbcPCLGI.mjs +1 -0
- package/dist/{preview-qP8Vfz3W.mjs → preview-DNM7BfJy.mjs} +2 -2
- package/dist/public/assets/ActivityModeContent-DLFbXUxu.js +2 -0
- package/dist/public/assets/ConsentDialogBody-Bza0TMPd.js +2 -0
- package/dist/public/assets/DocumentContext-G9L-k-gp.js +32 -0
- package/dist/public/assets/EnableSyncConfirmDialog-CN-y9rVU.js +1 -0
- package/dist/public/assets/{GraphPanel-DiyMfzQg.js → GraphPanel-Cf9lwwnw.js} +3 -3
- package/dist/public/assets/ManagedArtifactProperties-BHlXkycH.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-DXwlUNR4.js +1 -0
- package/dist/public/assets/PropertyPanel-COyeCUEm.js +2 -0
- package/dist/public/assets/SettingsDialogBody-aM9cYdrY.js +7 -0
- package/dist/public/assets/ShareBranchSwitchDialog-Bo95Aacz.js +1 -0
- package/dist/public/assets/ShareReceiveDialog-jEI9GD0l.js +1 -0
- package/dist/public/assets/ShareReceiveMissDialog-5z7ipD0K.js +1 -0
- package/dist/public/assets/{SkillEditorActions-BsGotb40.js → SkillEditorActions-85awfZeZ.js} +1 -1
- package/dist/public/assets/SourceEditor-5neNfhZp.js +2 -0
- package/dist/public/assets/{TerminalPanel-XlICQw5o.js → TerminalPanel-BNR82pgE.js} +2 -2
- package/dist/public/assets/{_baseFor-D25oCqSU.js → _baseFor-D774tcxR.js} +1 -1
- package/dist/public/assets/{agent-presence-BRmBPq78.js → agent-presence-C79Orlhd.js} +1 -1
- package/dist/public/assets/{arc-DHpQGPKi.js → arc-CbtK-u7K.js} +1 -1
- package/dist/public/assets/architecture-YZFGNWBL-BuVsq_Vy.js +1 -0
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-Dl6zKdMi.js → architectureDiagram-Q4EWVU46-BEI0DR2f.js} +1 -1
- package/dist/public/assets/arrow-up-right-DoN2FmSd.js +1 -0
- package/dist/public/assets/auth-state-cache-DL7IyBXT.js +11 -0
- package/dist/public/assets/{blockDiagram-DXYQGD6D-TTNbipzm.js → blockDiagram-DXYQGD6D-CvhaR3v1.js} +1 -1
- package/dist/public/assets/button-cneJOVxD.js +1 -0
- package/dist/public/assets/{c4Diagram-AHTNJAMY-DJ6_yNro.js → c4Diagram-AHTNJAMY-CGJ_dXh7.js} +1 -1
- package/dist/public/assets/{calendar-BefXYqrv.js → calendar-D62otKE3.js} +1 -1
- package/dist/public/assets/channel-DQ8biAJJ.js +1 -0
- package/dist/public/assets/check-Dqb-7gfx.js +1 -0
- package/dist/public/assets/checkbox-P04sbGVQ.js +1 -0
- package/dist/public/assets/chevron-down-D3nis7uo.js +1 -0
- package/dist/public/assets/chevron-left-C6Q_NKVx.js +1 -0
- package/dist/public/assets/chevron-right-BfmqRYl8.js +1 -0
- package/dist/public/assets/{chunk-2KRD3SAO-tPsWTtQ8.js → chunk-2KRD3SAO-CTZc4q6X.js} +1 -1
- package/dist/public/assets/{chunk-336JU56O-BDNF8ABQ.js → chunk-336JU56O-Df_WdTwV.js} +2 -2
- package/dist/public/assets/chunk-426QAEUC-Bmtezokd.js +1 -0
- package/dist/public/assets/{chunk-4BX2VUAB-B11p4CCh.js → chunk-4BX2VUAB-DdaeBv7j.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-k8il4Vah.js → chunk-4TB4RGXK-Z_KF79WQ.js} +1 -1
- package/dist/public/assets/chunk-55IACEB6-BMw0jGoU.js +1 -0
- package/dist/public/assets/{chunk-5FUZZQ4R-BhDATrAC.js → chunk-5FUZZQ4R-BP1tPdP4.js} +1 -1
- package/dist/public/assets/{chunk-5PVQY5BW-7GSXpGpA.js → chunk-5PVQY5BW-DHmdYl18.js} +1 -1
- package/dist/public/assets/{chunk-67CJDMHE-DhsO5dA4.js → chunk-67CJDMHE-Dr8TgESK.js} +1 -1
- package/dist/public/assets/{chunk-7N4EOEYR-_OPnqGDq.js → chunk-7N4EOEYR-wyEzdjqa.js} +1 -1
- package/dist/public/assets/{chunk-AA7GKIK3-CmQNMaMq.js → chunk-AA7GKIK3-DwcoEi3L.js} +1 -1
- package/dist/public/assets/{chunk-BSJP7CBP-DRn1Q8qZ.js → chunk-BSJP7CBP-Bi10nqUB.js} +1 -1
- package/dist/public/assets/{chunk-CIAEETIT-B6L60eSe.js → chunk-CIAEETIT-BRhaZZvf.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-TfqLQBKW.js → chunk-EDXVE4YY-Cdm2p7eD.js} +1 -1
- package/dist/public/assets/{chunk-ENJZ2VHE-CqUfmxZL.js → chunk-ENJZ2VHE-CtYN5PYG.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-_M3xiFqk.js → chunk-FMBD7UC4-yxpni0iy.js} +1 -1
- package/dist/public/assets/{chunk-FOC6F5B3-R--gjWDw.js → chunk-FOC6F5B3-zU_D2qL3.js} +1 -1
- package/dist/public/assets/{chunk-ICPOFSXX-MhneOmo1.js → chunk-ICPOFSXX-B1LaL7po.js} +2 -2
- package/dist/public/assets/{chunk-K5T4RW27-kfFBI7dm.js → chunk-K5T4RW27-CMA0573G.js} +1 -1
- package/dist/public/assets/{chunk-KGLVRYIC-MGoiNxXR.js → chunk-KGLVRYIC-4qBf2hVO.js} +1 -1
- package/dist/public/assets/{chunk-LIHQZDEY-3OBi6RFi.js → chunk-LIHQZDEY-DLhCQB7m.js} +1 -1
- package/dist/public/assets/{chunk-ORNJ4GCN-D1jJqGHz.js → chunk-ORNJ4GCN-DYvOtc7p.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-Dn8GoIJo.js → chunk-OYMX7WX6-Cb6J6ILi.js} +1 -1
- package/dist/public/assets/chunk-QZHKN3VN-D9Augrqb.js +1 -0
- package/dist/public/assets/{chunk-U2HBQHQK-Wd4MIHD7.js → chunk-U2HBQHQK-BQEFtvNE.js} +1 -1
- package/dist/public/assets/{chunk-X2U36JSP-DgR3BYDC.js → chunk-X2U36JSP-B0NFvVYj.js} +1 -1
- package/dist/public/assets/{chunk-XPW4576I-BIhGQhfc.js → chunk-XPW4576I-CWtaxsuf.js} +1 -1
- package/dist/public/assets/{chunk-YZCP3GAM-DfCU0Z-P.js → chunk-YZCP3GAM-wveZpL2J.js} +1 -1
- package/dist/public/assets/{chunk-ZZ45TVLE-Bml1MOax.js → chunk-ZZ45TVLE-DjoyvapL.js} +1 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-Bh_mU7DM.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-thFVFTz4.js +1 -0
- package/dist/public/assets/clone-CJvW7gHo.js +1 -0
- package/dist/public/assets/collapsible-iVWLn36m.js +1 -0
- package/dist/public/assets/config-context-CVpOcWSZ.js +1 -0
- package/dist/public/assets/config-provider-NM1p9Zm_.js +4 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-CIV0yZWV.js → cose-bilkent-S5V4N54A--ojmzpj3.js} +1 -1
- package/dist/public/assets/{cursor-CpjEfgnv.js → cursor-CGeB2PU5.js} +1 -1
- package/dist/public/assets/{dagre-BUnZfAns.js → dagre-D_jVclke.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-Bscv1HQo.js → dagre-KV5264BT-LC6-Nebl.js} +1 -1
- package/dist/public/assets/desktop-bridge-types-C22Y6m5Y.js +1 -0
- package/dist/public/assets/{diagram-5BDNPKRD-QBP7yg8z.js → diagram-5BDNPKRD-HYhuDT0y.js} +1 -1
- package/dist/public/assets/{diagram-G4DWMVQ6-CMdeZ41j.js → diagram-G4DWMVQ6-CSvJiR_m.js} +1 -1
- package/dist/public/assets/{diagram-MMDJMWI5-DCz0ew8n.js → diagram-MMDJMWI5-CaR4m-x5.js} +1 -1
- package/dist/public/assets/{diagram-TYMM5635-zN9Dx1fB.js → diagram-TYMM5635-C2IGbfjW.js} +1 -1
- package/dist/public/assets/dialog-BiB39Lhy.js +45 -0
- package/dist/public/assets/dist-0Zj_lz7j.js +11 -0
- package/dist/public/assets/{dist-BdwnfcKi.js → dist-BEW6C_CZ.js} +1 -1
- package/dist/public/assets/dist-BVOt51sU.js +1 -0
- package/dist/public/assets/dist-BkxMNfFN.js +528 -0
- package/dist/public/assets/{dist-znFZQjzE.js → dist-BuoXuHTG.js} +1 -1
- package/dist/public/assets/dist-C0qRhuIN.js +1 -0
- package/dist/public/assets/{dist-CHEQzAl9.js → dist-CPpRuwFX.js} +1 -1
- package/dist/public/assets/{dist-3l3ADjEo.js → dist-CgYE3gek.js} +1 -1
- package/dist/public/assets/{dist-Dtxdqotp.js → dist-CkLidFHS.js} +1 -1
- package/dist/public/assets/{dist-E5KjgWw7.js → dist-D7I9jMga.js} +1 -1
- package/dist/public/assets/{dist-BgLh90uo2.js → dist-D8Itza26.js} +1 -1
- package/dist/public/assets/dist-D9WIglau.js +1 -0
- package/dist/public/assets/{dist-C3ftUzLd.js → dist-DI8cI4NP.js} +1 -1
- package/dist/public/assets/{dist-BZEgBj4N.js → dist-DPfhM7y8.js} +1 -1
- package/dist/public/assets/{dist-AQSp7Qij.js → dist-DQdOYnjt.js} +1 -1
- package/dist/public/assets/{dist-DWaLpHcz.js → dist-DVPtn9Zx.js} +1 -1
- package/dist/public/assets/dist-DfThKWJX.js +1 -0
- package/dist/public/assets/{dist-Bqo1ZTng.js → dist-Dg5nhLZ2.js} +1 -1
- package/dist/public/assets/{dist-KBKQayVB.js → dist-IEs1iCqd.js} +1 -1
- package/dist/public/assets/doc-hash-5OIPOG-G.js +1 -0
- package/dist/public/assets/documents-events-D064jVvV.js +1 -0
- package/dist/public/assets/{erDiagram-SMLLAGMA-CFPPEjz0.js → erDiagram-SMLLAGMA-D1J1j3Yx.js} +1 -1
- package/dist/public/assets/file-tree-adapter-Bg8FQvOB.js +1 -0
- package/dist/public/assets/{flatten-sS3L8FSH.js → flatten-CaB4Oqne.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-DOjygKY4.js → flowDiagram-DWJPFMVM-CMNxv96M.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-Cox3d5Yp.js → ganttDiagram-T4ZO3ILL-DSJ51gJ8.js} +1 -1
- package/dist/public/assets/git-branch-DtntyZcb.js +1 -0
- package/dist/public/assets/gitGraph-7Q5UKJZL-t28UFBv3.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BXvw3bmB.js → gitGraphDiagram-UUTBAWPF-eqtXz7Hn.js} +1 -1
- package/dist/public/assets/{graphlib-FYrXvm7X.js → graphlib-CgeMr8SV.js} +1 -1
- package/dist/public/assets/index-CAO2ZCmA.js +2003 -0
- package/dist/public/assets/index-DJtUU5yP.css +1 -0
- package/dist/public/assets/info-B_9IOYHV.js +1 -0
- package/dist/public/assets/info-OMHHGYJF-B1OgcQSI.js +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-Bk54rrHD.js → infoDiagram-42DDH7IO-CB_Gw_tn.js} +1 -1
- package/dist/public/assets/{input-DkQ8Zmzd.js → input-D0MSkqYi.js} +1 -1
- package/dist/public/assets/{isEmpty-DKKUMPPC.js → isEmpty-DA9OVgr8.js} +1 -1
- package/dist/public/assets/isSymbol-BR3mCdgP.js +1 -0
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-Bc3G_190.js → ishikawaDiagram-UXIWVN3A-Cnz_ITKx.js} +1 -1
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-CLrtuKm7.js → journeyDiagram-VCZTEJTY-3INdsNOc.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-DwQiIK5Z.js → kanban-definition-6JOO6SKY-BXFLNQXS.js} +1 -1
- package/dist/public/assets/keyboard-shortcuts-DiiTkD4P.js +1 -0
- package/dist/public/assets/label-hTzLGQhh.js +1 -0
- package/dist/public/assets/{line-Dk1foLQO.js → line-DXPDJkMA.js} +1 -1
- package/dist/public/assets/{linear-D7qoVA2u.js → linear-BmFs-_tv.js} +1 -1
- package/dist/public/assets/loader-circle-CiIO3Fk-.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-WlD4T62P.js → mermaid-parser.core-B0CngrEV.js} +2 -2
- package/dist/public/assets/{mermaid.core-CLOkRfd8.js → mermaid.core-BKAbpHOL.js} +3 -3
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-DYJRBCQs.js → mindmap-definition-QFDTVHPH-Bm9VbqSR.js} +1 -1
- package/dist/public/assets/miss-dialog-store-Ay7SdCdU.js +1 -0
- package/dist/public/assets/{now-C9pOxV0O.js → now-Cnt3xXdO.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DBkxdYp_.js → open-managed-artifact-tab-TH1tyrz4.js} +2 -2
- package/dist/public/assets/{ordinal-BLFf0NQg.js → ordinal-Ca5DZ3xr.js} +1 -1
- package/dist/public/assets/packet-4T2RLAQJ-BPKm0rz4.js +1 -0
- package/dist/public/assets/panel-BH2RZRZQ.js +1 -0
- package/dist/public/assets/pending-receive-nav-store-Vn0w1zmV.js +1 -0
- package/dist/public/assets/pie-ZZUOXDRM-C37JdEN8.js +1 -0
- package/dist/public/assets/{pieDiagram-DEJITSTG-BtJ94Yhu.js → pieDiagram-DEJITSTG-0LpqYimt.js} +1 -1
- package/dist/public/assets/project-paths-Dvd83Cnz.js +1 -0
- package/dist/public/assets/prop-types-PwAyvfNz.js +1 -0
- package/dist/public/assets/{propagation-api-CR2CQW4x.js → propagation-api-BHhJitgG.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-B8wf6FVG.js → quadrantDiagram-34T5L4WZ-D4bhJC5O.js} +1 -1
- package/dist/public/assets/radar-PYXPWWZC-BqODBTH1.js +1 -0
- package/dist/public/assets/radio-group-1_2tsQbc.js +1 -0
- package/dist/public/assets/receive-store-z_JiltPn.js +2 -0
- package/dist/public/assets/{reduce-CrpTR7cO.js → reduce-BkAOm6E5.js} +1 -1
- package/dist/public/assets/refresh-cw-EVALIeLp.js +1 -0
- package/dist/public/assets/{requirementDiagram-MS252O5E-PrH6Wk-f.js → requirementDiagram-MS252O5E-CrZIuUV5.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-DuDWdyws.js → sankeyDiagram-XADWPNL6-CDJh0Hcw.js} +1 -1
- package/dist/public/assets/{selection-context-vh0MmCBb.js → selection-context-DaaHnwDJ.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-BvF_oV_w.js → sequenceDiagram-FGHM5R23-Crf8F-0v.js} +1 -1
- package/dist/public/assets/share-metadata-rows-COyU9rhn.js +1 -0
- package/dist/public/assets/skill-actions-DmQL_HGK.js +1 -0
- package/dist/public/assets/skill-scope-Bt2TwqtA.js +1 -0
- package/dist/public/assets/skills-api-T8UMKFuI.js +1 -0
- package/dist/public/assets/{src-DEzC9TbA.js → src-60u1_sM3.js} +1 -1
- package/dist/public/assets/{stateDiagram-FHFEXIEX-BvOoHTsD.js → stateDiagram-FHFEXIEX-CoUQpm-3.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BM5GAHWg.js +1 -0
- package/dist/public/assets/target-navigation-intent-idRDy9hG.js +1 -0
- package/dist/public/assets/{telemetry-impl-BM7BnAv2.js → telemetry-impl-CgvC5Fqj.js} +2 -2
- package/dist/public/assets/telemetry-startup-CJa6t0AY.js +1 -0
- package/dist/public/assets/{textarea-BQFFQ9_l.js → textarea-CUjvX3CU.js} +1 -1
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-_VzX4HAF.js → timeline-definition-GMOUNBTQ-CiQZrQPS.js} +1 -1
- package/dist/public/assets/toggle-group-IN7Np0Is.js +1 -0
- package/dist/public/assets/tooltip-C9Dd0rIc.js +1 -0
- package/dist/public/assets/treeView-SZITEDCU-ByrE6Vcb.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-BcYBme24.js +1 -0
- package/dist/public/assets/triangle-alert-r1Ou0VrE.js +1 -0
- package/dist/public/assets/{typing-burst-detector-BT98lJOb.js → typing-burst-detector-D5zZVgAZ.js} +3 -3
- package/dist/public/assets/{vennDiagram-DHZGUBPP-BiS2w_m-.js → vennDiagram-DHZGUBPP-CoqI8iiY.js} +1 -1
- package/dist/public/assets/wardley-RL74JXVD-DDdV8nDz.js +1 -0
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-BgB2gOdF.js → wardleyDiagram-NUSXRM2D-6pXCRu0Y.js} +1 -1
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-DIurDFny.js → xychartDiagram-5P7HB3ND-C3ELwBEZ.js} +1 -1
- package/dist/public/index.html +74 -58
- package/dist/{repair-launch-json-B2igGItE.mjs → repair-launch-json-DyLvrVW1.mjs} +2 -2
- package/dist/{repair-mcp-configs-B0YDgxKo.mjs → repair-mcp-configs-CT33n5tH.mjs} +2 -2
- package/dist/repair-skills-CdRibIoP.mjs +1 -0
- package/dist/repair-skills-DVU2ihEV.mjs +3 -0
- package/dist/server-lock-LsXsWtim-BrcDoV-6.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-BYuwTc93.mjs → server-lock-ltHt39S2-p0c2u2YF.mjs} +183 -181
- package/dist/{src-DD9KqmOQ.mjs → src-DcaRpMrD.mjs} +3 -3
- package/dist/{start-DYPIgVG4.mjs → start-DJG5OWGG.mjs} +2 -2
- package/dist/start-DSlZGsa_.mjs +1 -0
- package/dist/write-project-skill-CrWQ96do.mjs +36 -0
- package/package.json +1 -1
- package/scripts/aggregate-tolerance-class-fires.ts +15 -0
- package/scripts/build-config-schema.mjs +69 -0
- package/scripts/postinstall.mjs +19 -0
- package/scripts/probe-exec.ts +8 -0
- package/scripts/probe-read-document.ts +12 -0
- package/dist/constants-BwIQxzxy.mjs +0 -2
- package/dist/dist-DUXDeyBp.mjs +0 -1
- package/dist/git-handle-DdgvPBh6-C80s8fFN.mjs +0 -1
- package/dist/init-BzdKgHZr.mjs +0 -321
- package/dist/init-HqjPAvpy.mjs +0 -1
- package/dist/loader-BEm7pFin.mjs +0 -1
- package/dist/preview-BoSe54Y5.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-QvRIx_do.js +0 -2
- package/dist/public/assets/ConsentDialogBody-CPX75E6Q.js +0 -2
- package/dist/public/assets/DocumentContext-zL3ZbwDo.js +0 -34
- package/dist/public/assets/ManagedArtifactProperties-OxkUY14x.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-Dr_AIi2H.js +0 -1
- package/dist/public/assets/PropertyPanel-D9A27c2E.js +0 -2
- package/dist/public/assets/SettingsDialogBody-cotnwVMw.js +0 -7
- package/dist/public/assets/SourceEditor-BZ3cbLjs.js +0 -2
- package/dist/public/assets/architecture-YZFGNWBL-0pWnpYMK.js +0 -1
- package/dist/public/assets/button-DGf25ccp.js +0 -1
- package/dist/public/assets/channel-ClECMrL_.js +0 -1
- package/dist/public/assets/checkbox-EGJP9xna.js +0 -1
- package/dist/public/assets/chevron-down-CzFz_0zd.js +0 -1
- package/dist/public/assets/chevron-left-Bb3WBx0B.js +0 -1
- package/dist/public/assets/chevron-right-jyIhGBkw.js +0 -1
- package/dist/public/assets/chunk-426QAEUC-UlKin18B.js +0 -1
- package/dist/public/assets/chunk-55IACEB6-maKdi3q_.js +0 -1
- package/dist/public/assets/chunk-QZHKN3VN-DUJDGGgJ.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-C9zXtHUq.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BLmW_Iw2.js +0 -1
- package/dist/public/assets/clone-1iKEKVKL.js +0 -1
- package/dist/public/assets/collapsible-CjgfK1G5.js +0 -1
- package/dist/public/assets/config-context-DhhN0rlf.js +0 -1
- package/dist/public/assets/config-validation-events-yB2QWKKJ.js +0 -11
- package/dist/public/assets/dialog-CIq9aQLf.js +0 -45
- package/dist/public/assets/dist-BRGUidv4.js +0 -526
- package/dist/public/assets/dist-BXd_K33i.js +0 -1
- package/dist/public/assets/dist-ICp_3rWY.js +0 -1
- package/dist/public/assets/documents-events-DA8Q5ICz.js +0 -11
- package/dist/public/assets/file-tree-adapter-CP3Xa3us.js +0 -1
- package/dist/public/assets/gitGraph-7Q5UKJZL-DNLE-2Tt.js +0 -1
- package/dist/public/assets/index-CG7gf_6X.css +0 -1
- package/dist/public/assets/index-CoukPsjj.js +0 -2004
- package/dist/public/assets/info-OMHHGYJF-BiaOigFV.js +0 -1
- package/dist/public/assets/isSymbol-BgthEULk.js +0 -1
- package/dist/public/assets/keyboard-shortcuts-DOkzBlgc.js +0 -1
- package/dist/public/assets/label-DyT4OD9H.js +0 -1
- package/dist/public/assets/navigation-targets-DNRja8Z0.js +0 -1
- package/dist/public/assets/packet-4T2RLAQJ-v1yqEdTP.js +0 -1
- package/dist/public/assets/panel-BbrtnF__.js +0 -1
- package/dist/public/assets/pie-ZZUOXDRM-pmbX_rAr.js +0 -1
- package/dist/public/assets/project-paths-CcPGtodV.js +0 -1
- package/dist/public/assets/prop-types-C-aZftyS.js +0 -1
- package/dist/public/assets/radar-PYXPWWZC-CQRfh76o.js +0 -1
- package/dist/public/assets/radio-group-CFPLlVag.js +0 -1
- package/dist/public/assets/skill-actions-Sc4IN52j.js +0 -1
- package/dist/public/assets/skills-api-ts3L80AV.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B02IOISZ.js +0 -1
- package/dist/public/assets/target-navigation-intent-CIKQ1Hj-.js +0 -1
- package/dist/public/assets/telemetry-startup-Pz1ro4a2.js +0 -1
- package/dist/public/assets/toggle-group-Bc5FaFo3.js +0 -1
- package/dist/public/assets/tooltip-DiL7DBhT.js +0 -1
- package/dist/public/assets/treeView-SZITEDCU-iExObZ_v.js +0 -1
- package/dist/public/assets/treemap-W4RFUUIX-B-jRsyTq.js +0 -1
- package/dist/public/assets/wardley-RL74JXVD-DGsNLwY0.js +0 -1
- package/dist/repair-skills-Cv_2HgEN.mjs +0 -3
- package/dist/repair-skills-XaoNNrHC.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-xTK-ENFB.mjs +0 -1
- package/dist/start-B4zA8vv3.mjs +0 -1
- package/dist/write-project-skill-HXJW0bDK.mjs +0 -36
- /package/dist/public/assets/{ActivityPanelDiffView-TEHR9A38.js → ActivityPanelDiffView-BPrpOwiv.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-DimdflAw.js → __vite-browser-external-DfbEpKPK.js} +0 -0
- /package/dist/public/assets/{array-CXyn2wAU.js → array-DrKFfLpK.js} +0 -0
- /package/dist/public/assets/{clike-kHME1xsl.js → clike-CY4jFeI9.js} +0 -0
- /package/dist/public/assets/{colors-DOVRXUpv.js → colors-BwB-X4pV.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-DGKrBfTH.js → cytoscape.esm-B72MXB0V.js} +0 -0
- /package/dist/public/assets/{defaultLocale-CIVmmKdD.js → defaultLocale-DEFJZ-43.js} +0 -0
- /package/dist/public/assets/{diff-B_7QuALZ.js → diff-VsLDmRbo.js} +0 -0
- /package/dist/public/assets/{dist-BAzUe-Rb.js → dist-BdpTVkuI.js} +0 -0
- /package/dist/public/assets/{dist-ug68MPTZ.js → dist-CbgmYSt6.js} +0 -0
- /package/dist/public/assets/{external-link-Bc6KvE1i.js → external-link-ChNdN5KK.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-BqGkSO9-.js → file-tree-rename-validation-BkATWpiZ.js} +0 -0
- /package/dist/public/assets/{format-Fsxus_sZ.js → format-CFXD031r.js} +0 -0
- /package/dist/public/assets/{go-DlHfV6Cv.js → go-CJnIK4Uo.js} +0 -0
- /package/dist/public/assets/{init-DAmDTHXL.js → init-20ACqh4a.js} +0 -0
- /package/dist/public/assets/{isObjectLike-0yTn5bno.js → isObjectLike-DURfeUEd.js} +0 -0
- /package/dist/public/assets/{katex-gTwLOSI2.js → katex-BunQWEOH.js} +0 -0
- /package/dist/public/assets/{lua-Cpo6SgEb.js → lua-BTUOHEPy.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-Q_heVQ86.js → mcp-consent-store-Bx7YkTj-.js} +0 -0
- /package/dist/public/assets/{min-CGFu6QbN.js → min-cXlECwx8.js} +0 -0
- /package/dist/public/assets/{panzoom.es-1vRDHCmL.js → panzoom.es-BPpDWM66.js} +0 -0
- /package/dist/public/assets/{path-1iyJ-o9O.js → path-Bbctax8p.js} +0 -0
- /package/dist/public/assets/{pdf-BjE4l7oX.js → pdf-Cz6vffXS.js} +0 -0
- /package/dist/public/assets/{pdf.worker-CU7PVDgr.js → pdf.worker-CUSszLRa.js} +0 -0
- /package/dist/public/assets/{perl-uq5LpsPX.js → perl-CSl7RrAK.js} +0 -0
- /package/dist/public/assets/{properties-DuLkwqft.js → properties-KpJMIKzZ.js} +0 -0
- /package/dist/public/assets/{r-DcEDABBa.js → r-DFsc7DIH.js} +0 -0
- /package/dist/public/assets/{rough.esm-Bk-GM2I8.js → rough.esm-CTApjP9q.js} +0 -0
- /package/dist/public/assets/{ruby-C6V5dDsD.js → ruby-dZPnOz8h.js} +0 -0
- /package/dist/public/assets/{shell-CVvCNjui.js → shell-CYSl653a.js} +0 -0
- /package/dist/public/assets/{sql-CQQBnjZX.js → sql-BfVjfYES.js} +0 -0
- /package/dist/public/assets/{src-C3imF5Zq.js → src-BjEzLuzr.js} +0 -0
- /package/dist/public/assets/{startup-marks-CWTDb1CP.js → startup-marks-DdMtjWR-.js} +0 -0
- /package/dist/public/assets/{stex-coA_FIxI.js → stex-DYxKXJZx.js} +0 -0
- /package/dist/public/assets/{swift-BBOV2SBg.js → swift-DjBuuwmF.js} +0 -0
- /package/dist/public/assets/{toml-lQGk0tnp.js → toml-C3_Svn60.js} +0 -0
- /package/dist/public/assets/{trace-api-MhJXZpsM.js → trace-api-D6fqC5Nw.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-beU76Hfb.js → w3c-keyname-CHcJEDvG.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,At as t,Bt as n,Et as r,Ft as i,It as a,J as o,Lt as s,Nt as c,O as l,Ot as u,P as d,Pt as f,Q as p,Rt as m,Ut as h,X as g,Y as ee,ft as _,it as v,jt as y,kt as b,ut as x,vt as te,wt as S,xt as ne,zt as C}from"./dist-DWaLpHcz.js";var w=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=d(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(se(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 T(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 re(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=T(t)+T(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function ie(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:re(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ae(e,t){return n=>{for(let t=d(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 oe=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function E(e){return e.selection.main.from}function se(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 D=ne.define();function ce(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 O=new WeakMap;function le(e){if(!Array.isArray(e))return e;let t=O.get(e);return t||O.set(e,t=ie(e)),t}var k=f.define(),A=f.define(),ue=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 n=m(e,t),r=C(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(m(a==i?i.toLowerCase():a,0)),t+=r}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:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=m(e,0),i=C(r),a=i==e.length?0:-100;if(r!=t[0])if(r==n[0])a+=-200;else return null;return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=m(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=C(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,g=-1,ee=/[a-z]/.test(e),_=!0;for(let r=0,c=Math.min(e.length,200),v=0;r<c&&u<s;){let c=m(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),g=r+1,f++):f=0));let y,b=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(y=h(c))==y.toLowerCase()?y==y.toUpperCase()?0:2:1;(!r||b==1&&ee||v==0&&b!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(_=!1)),v=b,r+=C(c)}return u==s&&a[0]==0&&_?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,g]):u==s?this.result(-100+(d?-200:0)+-700+(_?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?C(m(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},de=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)}},j=u.define({combine(e){return n(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=>M(e(n),t(n)),optionClass:(e,t)=>n=>M(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function M(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==ee.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=f.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.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*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(j);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(j).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:A.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(j).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(j).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=>_(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(j).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(j);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 oe(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new de(n):new ue(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 oe(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(j).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:Te,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(j),i=(r.override||n.languageDataAt(`autocomplete`,E(n)).map(le)).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(B));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(D);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(k))i=new e(i.source,1,n.value);else if(n.is(A))i=new e(i.source,0);else if(n.is(B))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(E(e.state))}},z=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=E(t.state);if(o>a||!r||n&2&&(E(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return we(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 w(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??E(t.state)):new R(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new e(this.source,this.explicit,t.mapPos(this.limit),this.result,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 we(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):se(e,!0).test(i)}var B=f.define({map(e,t){return e.map(e=>e.map(t))}}),V=i.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[te.from(e,e=>e.tooltip),g.contentAttributes.from(e,e=>e.attrs)]});function H(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V).active.find(e=>e.source==t.source);return r instanceof z?(typeof n==`string`?e.dispatch({...ce(e.state,n,r.from,r.to),annotations:D.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Te=he(V,H);function U(e,t=`option`){return n=>{let r=n.state.field(V,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(j).interactionDelay)return!1;let i=1,a;t==`page`&&(a=v(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 Ee=e=>{let t=e.state.field(V,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(j).interactionDelay?!1:H(e,t.open.options[t.open.selected])},W=e=>e.state.field(V,!1)?(e.dispatch({effects:k.of(!0)}),!0):!1,De=e=>{let t=e.state.field(V,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:A.of(null)}),!0)},Oe=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ke=50,Ae=1e3,je=p.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(V).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V),n=e.state.facet(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V)==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>ke&&Date.now()-n.time>Ae){for(let e of n.context.abortListeners)try{e()}catch(e){_(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(k)))&&(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(V);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(j).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new w(t,E(t),e.explicit,this.view),r=new Oe(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:A.of(null)}),_(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(j).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(j),n=this.view.state.field(V);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=E(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new z(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:B.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V,!1);if(t&&t.tooltip&&this.view.state.facet(j).closeOnBlur){let n=t.open&&v(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:A.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:k.of(!1)}),20),this.composing=0}}}),Me=typeof navigator==`object`&&/Win/.test(navigator.platform),Ne=t.highest(g.domEventHandlers({keydown(e,t){let n=t.state.field(V,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Me&&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&&H(t,r),!1}})),G=g.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`},".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`}}}),Pe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Fe=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,b.TrackDel),r=t.mapPos(this.to,1,b.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Ie=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 Fe(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,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 Pe(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)}},Le=o.widget({widget:new class extends e{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Re=o.mark({class:`cm-snippetField`}),K=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=o.set(e.map(e=>(e.from==e.to?Le:Re).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))}},q=f.define({map(e,t){return e&&e.map(t)}}),ze=f.define(),J=i.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(q))return n.value;if(n.is(ze)&&e)return new K(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=>g.decorations.from(e,e=>e?e.deco:o.none)});function Y(e,t){return r.create(e.filter(e=>e.field==t).map(e=>r.range(e.from,e.to)))}function Be(e){let t=Ie.parse(e);return(e,n,r,i)=>{let{text:o,ranges:c}=t.instantiate(e.state,r),{main:l}=e.state.selection,u={changes:{from:r,to:i==l.from?l.to:i,insert:a.of(o)},scrollIntoView:!0,annotations:n?[D.of(n),s.userEvent.of(`input.complete`)]:void 0};if(c.length&&(u.selection=Y(c,0)),c.some(e=>e.field>0)){let t=new K(c,0),n=u.effects=[q.of(t)];e.state.field(J,!1)===void 0&&n.push(f.appendConfig.of([J,We,Ke,G]))}e.dispatch(e.state.update(u))}}function Ve(e){return({state:t,dispatch:n})=>{let r=t.field(J,!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:Y(r.ranges,i),effects:q.of(a?null:new K(r.ranges,i)),scrollIntoView:!0})),!0}}var He=[{key:`Tab`,run:Ve(1),shift:Ve(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(J,!1)?(t(e.update({effects:q.of(null)})),!0):!1}],Ue=u.define({combine(e){return e.length?e[0]:He}}),We=t.highest(x.compute([Ue],e=>e.facet(Ue)));function Ge(e,t){return{...t,apply:Be(e)}}var Ke=g.domEventHandlers({mousedown(e,t){let n=t.state.field(J,!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:Y(n.ranges,i.field),effects:q.of(n.ranges.some(e=>e.field>i.field)?new K(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),X={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Z=f.define({map(e,t){return t.mapPos(e,-1,b.TrackAfter)??void 0}}),Q=new class extends c{};Q.startSide=1,Q.endSide=-1;var qe=i.define({create(){return y.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(Z)&&(e=e.update({add:[Q.range(n.value,n.value+1)]}));return e}});function Je(){return[$e,qe]}var Ye=`()[]{}<>«»»«[]{}`;function Xe(e){for(let t=0;t<16;t+=2)if(Ye.charCodeAt(t)==e)return Ye.charAt(t+1);return h(e<128?e:e+1)}function Ze(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||X}var Qe=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),$e=g.inputHandler.of((e,t,n,r)=>{if((Qe?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&C(m(r,0))==1||t!=i.from||n!=i.to)return!1;let a=tt(e.state,r);return a?(e.dispatch(a),!0):!1}),et=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Ze(e,e.selection.main.head).brackets||X.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)==Xe(m(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 tt(e,t){let n=Ze(e,e.selection.main.head),r=n.brackets||X.brackets;for(let i of r){let a=Xe(m(i,0));if(t==i)return a==i?ot(e,i,r.indexOf(i+i+i)>-1,n):it(e,i,a,n.before||X.before);if(t==a&&nt(e,e.selection.main.from))return at(e,i,a)}return null}function nt(e,t){let n=!1;return e.field(qe).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let n=e.sliceString(t,t+2);return n.slice(0,C(m(n,0)))}function rt(e,t){let n=e.sliceString(t-2,t);return C(m(n,0))==n.length?n:n.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:Z.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:Z.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||X.stringPrefixes,o=null,s=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:Z.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:Z.of(s+t.length),range:r.cursor(s+t.length)};if(nt(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:Z.of(s+t.length),range:r.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=S.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:Z.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=d(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=d(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))!=S.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))!=S.Word)return n}return-1}function ut(e={}){return[Ne,V,j.of(e),je,ft,G]}var dt=[{key:`Ctrl-Space`,run:W},{mac:"Alt-`",run:W},{mac:`Alt-i`,run:W},{key:`Escape`,run:De},{key:`ArrowDown`,run:U(!0)},{key:`ArrowUp`,run:U(!1)},{key:`PageDown`,run:U(!0,`page`)},{key:`PageUp`,run:U(!1,`page`)},{key:`Enter`,run:Ee}],ft=t.highest(x.computeN([j],e=>e.facet(j).defaultKeymap?[dt]:[]));export{ie as a,Ge as c,et as i,ut as n,dt as o,Je as r,ae as s,w as t};
|
|
1
|
+
import{$ as e,At as t,Bt as n,Et as r,Ft as i,It as a,J as o,Lt as s,Nt as c,O as l,Ot as u,P as d,Pt as f,Q as p,Rt as m,Ut as h,X as g,Y as ee,ft as _,it as v,jt as y,kt as b,ut as x,vt as te,wt as S,xt as ne,zt as C}from"./dist-DVPtn9Zx.js";var w=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=d(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(se(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 T(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 re(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=T(t)+T(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function ie(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:re(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ae(e,t){return n=>{for(let t=d(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 oe=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function E(e){return e.selection.main.from}function se(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 D=ne.define();function ce(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 O=new WeakMap;function le(e){if(!Array.isArray(e))return e;let t=O.get(e);return t||O.set(e,t=ie(e)),t}var k=f.define(),A=f.define(),ue=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 n=m(e,t),r=C(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(m(a==i?i.toLowerCase():a,0)),t+=r}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:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=m(e,0),i=C(r),a=i==e.length?0:-100;if(r!=t[0])if(r==n[0])a+=-200;else return null;return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=m(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=C(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,g=-1,ee=/[a-z]/.test(e),_=!0;for(let r=0,c=Math.min(e.length,200),v=0;r<c&&u<s;){let c=m(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),g=r+1,f++):f=0));let y,b=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(y=h(c))==y.toLowerCase()?y==y.toUpperCase()?0:2:1;(!r||b==1&&ee||v==0&&b!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(_=!1)),v=b,r+=C(c)}return u==s&&a[0]==0&&_?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,g]):u==s?this.result(-100+(d?-200:0)+-700+(_?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?C(m(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},de=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)}},j=u.define({combine(e){return n(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=>M(e(n),t(n)),optionClass:(e,t)=>n=>M(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function M(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==ee.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=f.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.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*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(j);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(j).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:A.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(j).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(j).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=>_(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(j).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(j);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 oe(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new de(n):new ue(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 oe(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(j).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:Te,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(j),i=(r.override||n.languageDataAt(`autocomplete`,E(n)).map(le)).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(B));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(D);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(k))i=new e(i.source,1,n.value);else if(n.is(A))i=new e(i.source,0);else if(n.is(B))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(E(e.state))}},z=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=E(t.state);if(o>a||!r||n&2&&(E(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return we(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 w(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??E(t.state)):new R(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new e(this.source,this.explicit,t.mapPos(this.limit),this.result,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 we(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):se(e,!0).test(i)}var B=f.define({map(e,t){return e.map(e=>e.map(t))}}),V=i.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[te.from(e,e=>e.tooltip),g.contentAttributes.from(e,e=>e.attrs)]});function H(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V).active.find(e=>e.source==t.source);return r instanceof z?(typeof n==`string`?e.dispatch({...ce(e.state,n,r.from,r.to),annotations:D.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Te=he(V,H);function U(e,t=`option`){return n=>{let r=n.state.field(V,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(j).interactionDelay)return!1;let i=1,a;t==`page`&&(a=v(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 Ee=e=>{let t=e.state.field(V,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(j).interactionDelay?!1:H(e,t.open.options[t.open.selected])},W=e=>e.state.field(V,!1)?(e.dispatch({effects:k.of(!0)}),!0):!1,De=e=>{let t=e.state.field(V,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:A.of(null)}),!0)},Oe=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ke=50,Ae=1e3,je=p.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(V).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V),n=e.state.facet(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V)==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>ke&&Date.now()-n.time>Ae){for(let e of n.context.abortListeners)try{e()}catch(e){_(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(k)))&&(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(V);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(j).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new w(t,E(t),e.explicit,this.view),r=new Oe(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:A.of(null)}),_(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(j).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(j),n=this.view.state.field(V);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=E(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new z(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:B.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V,!1);if(t&&t.tooltip&&this.view.state.facet(j).closeOnBlur){let n=t.open&&v(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:A.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:k.of(!1)}),20),this.composing=0}}}),Me=typeof navigator==`object`&&/Win/.test(navigator.platform),Ne=t.highest(g.domEventHandlers({keydown(e,t){let n=t.state.field(V,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Me&&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&&H(t,r),!1}})),G=g.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`},".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`}}}),Pe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Fe=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,b.TrackDel),r=t.mapPos(this.to,1,b.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Ie=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 Fe(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,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 Pe(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)}},Le=o.widget({widget:new class extends e{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Re=o.mark({class:`cm-snippetField`}),K=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=o.set(e.map(e=>(e.from==e.to?Le:Re).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))}},q=f.define({map(e,t){return e&&e.map(t)}}),ze=f.define(),J=i.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(q))return n.value;if(n.is(ze)&&e)return new K(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=>g.decorations.from(e,e=>e?e.deco:o.none)});function Y(e,t){return r.create(e.filter(e=>e.field==t).map(e=>r.range(e.from,e.to)))}function Be(e){let t=Ie.parse(e);return(e,n,r,i)=>{let{text:o,ranges:c}=t.instantiate(e.state,r),{main:l}=e.state.selection,u={changes:{from:r,to:i==l.from?l.to:i,insert:a.of(o)},scrollIntoView:!0,annotations:n?[D.of(n),s.userEvent.of(`input.complete`)]:void 0};if(c.length&&(u.selection=Y(c,0)),c.some(e=>e.field>0)){let t=new K(c,0),n=u.effects=[q.of(t)];e.state.field(J,!1)===void 0&&n.push(f.appendConfig.of([J,We,Ke,G]))}e.dispatch(e.state.update(u))}}function Ve(e){return({state:t,dispatch:n})=>{let r=t.field(J,!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:Y(r.ranges,i),effects:q.of(a?null:new K(r.ranges,i)),scrollIntoView:!0})),!0}}var He=[{key:`Tab`,run:Ve(1),shift:Ve(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(J,!1)?(t(e.update({effects:q.of(null)})),!0):!1}],Ue=u.define({combine(e){return e.length?e[0]:He}}),We=t.highest(x.compute([Ue],e=>e.facet(Ue)));function Ge(e,t){return{...t,apply:Be(e)}}var Ke=g.domEventHandlers({mousedown(e,t){let n=t.state.field(J,!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:Y(n.ranges,i.field),effects:q.of(n.ranges.some(e=>e.field>i.field)?new K(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),X={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Z=f.define({map(e,t){return t.mapPos(e,-1,b.TrackAfter)??void 0}}),Q=new class extends c{};Q.startSide=1,Q.endSide=-1;var qe=i.define({create(){return y.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(Z)&&(e=e.update({add:[Q.range(n.value,n.value+1)]}));return e}});function Je(){return[$e,qe]}var Ye=`()[]{}<>«»»«[]{}`;function Xe(e){for(let t=0;t<16;t+=2)if(Ye.charCodeAt(t)==e)return Ye.charAt(t+1);return h(e<128?e:e+1)}function Ze(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||X}var Qe=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),$e=g.inputHandler.of((e,t,n,r)=>{if((Qe?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&C(m(r,0))==1||t!=i.from||n!=i.to)return!1;let a=tt(e.state,r);return a?(e.dispatch(a),!0):!1}),et=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Ze(e,e.selection.main.head).brackets||X.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)==Xe(m(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 tt(e,t){let n=Ze(e,e.selection.main.head),r=n.brackets||X.brackets;for(let i of r){let a=Xe(m(i,0));if(t==i)return a==i?ot(e,i,r.indexOf(i+i+i)>-1,n):it(e,i,a,n.before||X.before);if(t==a&&nt(e,e.selection.main.from))return at(e,i,a)}return null}function nt(e,t){let n=!1;return e.field(qe).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let n=e.sliceString(t,t+2);return n.slice(0,C(m(n,0)))}function rt(e,t){let n=e.sliceString(t-2,t);return C(m(n,0))==n.length?n:n.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:Z.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:Z.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||X.stringPrefixes,o=null,s=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:Z.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:Z.of(s+t.length),range:r.cursor(s+t.length)};if(nt(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:Z.of(s+t.length),range:r.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=S.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:Z.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=d(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=d(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))!=S.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))!=S.Word)return n}return-1}function ut(e={}){return[Ne,V,j.of(e),je,ft,G]}var dt=[{key:`Ctrl-Space`,run:W},{mac:"Alt-`",run:W},{mac:`Alt-i`,run:W},{key:`Escape`,run:De},{key:`ArrowDown`,run:U(!0)},{key:`ArrowUp`,run:U(!1)},{key:`PageDown`,run:U(!0,`page`)},{key:`PageUp`,run:U(!1,`page`)},{key:`Enter`,run:Ee}],ft=t.highest(x.computeN([j],e=>e.facet(j).defaultKeymap?[dt]:[]));export{ie as a,Ge as c,et as i,ut as n,dt as o,Je as r,ae as s,w as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t}from"./compiler-runtime-CVnuRdak.js";import{t as n}from"./react-dom-C-oc-P2K.js";import{u as r}from"./button-DGf25ccp.js";var i=r(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),a=e(t(),1),o=e(n(),1);function s(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var c=e=>{switch(e){case`success`:return d;case`info`:return p;case`warning`:return f;case`error`:return m;default:return null}},l=Array(12).fill(0),u=({visible:e,className:t})=>a.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},a.createElement(`div`,{className:`sonner-spinner`},l.map((e,t)=>a.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),d=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),f=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),p=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),m=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ee=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},a.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),a.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),te=()=>{let[e,t]=a.useState(document.hidden);return a.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},h=1,g=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:h++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,o,s=r.then(async e=>{if(o=[`resolve`,e],a.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(v(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,o=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=t?.id||h++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_=(e,t)=>{let n=t?.id||h++;return g.addToast({title:e,...t,id:n}),n},v=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,y=Object.assign(_,{success:g.success,info:g.info,warning:g.warning,error:g.error,custom:g.custom,message:g.message,promise:g.promise,dismiss:g.dismiss,loading:g.loading},{getHistory:()=>g.toasts,getToasts:()=>g.getActiveToasts()});s(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function b(e){return e.label!==void 0}var ne=3,x=`24px`,S=`16px`,C=4e3,w=356,re=14,T=45,ie=200;function E(...e){return e.filter(Boolean).join(` `)}function ae(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var D=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:o,visibleToasts:s,heights:l,index:d,toasts:f,expanded:p,removeToast:m,defaultRichColors:h,closeButton:g,style:_,cancelButtonStyle:v,actionButtonStyle:y,className:ne=``,descriptionClassName:x=``,duration:S,position:w,gap:re,expandByDefault:D,classNames:O,icons:k,closeButtonAriaLabel:A=`Close toast`}=e,[j,M]=a.useState(null),[N,oe]=a.useState(null),[P,F]=a.useState(!1),[I,L]=a.useState(!1),[R,z]=a.useState(!1),[B,se]=a.useState(!1),[ce,V]=a.useState(!1),[le,H]=a.useState(0),[ue,U]=a.useState(0),W=a.useRef(n.duration||S||C),de=a.useRef(null),G=a.useRef(null),fe=d===0,pe=d+1<=s,K=n.type,q=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,J=a.useMemo(()=>l.findIndex(e=>e.toastId===n.id)||0,[l,n.id]),ge=a.useMemo(()=>n.closeButton??g,[n.closeButton,g]),_e=a.useMemo(()=>n.duration||S||C,[n.duration,S]),Y=a.useRef(0),X=a.useRef(0),ve=a.useRef(0),Z=a.useRef(null),[ye,be]=w.split(`-`),xe=a.useMemo(()=>l.reduce((e,t,n)=>n>=J?e:e+t.height,0),[l,J]),Se=te(),Ce=n.invert||t,Q=K===`loading`;X.current=a.useMemo(()=>J*re+xe,[J,xe]),a.useEffect(()=>{W.current=_e},[_e]),a.useEffect(()=>{F(!0)},[]),a.useEffect(()=>{let e=G.current;if(e){let t=e.getBoundingClientRect().height;return U(t),o(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>o(e=>e.filter(e=>e.toastId!==n.id))}},[o,n.id]),a.useLayoutEffect(()=>{if(!P)return;let e=G.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,U(r),o(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[P,n.title,n.description,o,n.id,n.jsx,n.action,n.cancel]);let $=a.useCallback(()=>{L(!0),H(X.current),o(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{m(n)},ie)},[n,m,o,X]);a.useEffect(()=>{if(n.promise&&K===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return p||i||Se?(()=>{if(ve.current<Y.current){let e=new Date().getTime()-Y.current;W.current-=e}ve.current=new Date().getTime()})():W.current!==1/0&&(Y.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),$()},W.current)),()=>clearTimeout(e)},[p,i,n,K,Se,$]),a.useEffect(()=>{n.delete&&($(),n.onDismiss==null||n.onDismiss.call(n,n))},[$,n.delete]);function we(){return k?.loading?a.createElement(`div`,{className:E(O?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":K===`loading`},k.loading):a.createElement(u,{className:E(O?.loader,n?.classNames?.loader),visible:K===`loading`})}let Te=n.icon||k?.[K]||c(K);return a.createElement(`li`,{tabIndex:0,ref:G,className:E(ne,me,O?.toast,n?.classNames?.toast,O?.default,O?.[K],n?.classNames?.[K]),"data-sonner-toast":``,"data-rich-colors":n.richColors??h,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":P,"data-promise":!!n.promise,"data-swiped":ce,"data-removed":I,"data-visible":pe,"data-y-position":ye,"data-x-position":be,"data-index":d,"data-front":fe,"data-swiping":R,"data-dismissible":q,"data-type":K,"data-invert":Ce,"data-swipe-out":B,"data-swipe-direction":N,"data-expanded":!!(p||D&&P),"data-testid":n.testId,style:{"--index":d,"--toasts-before":d,"--z-index":f.length-d,"--offset":`${I?le:X.current}px`,"--initial-height":D?`auto`:`${ue}px`,..._,...n.style},onDragEnd:()=>{z(!1),M(null),Z.current=null},onPointerDown:e=>{e.button!==2&&(Q||!q||(de.current=new Date,H(X.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(z(!0),Z.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(B||!q)return;Z.current=null;let e=Number(G.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(G.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-de.current?.getTime(),i=j===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=T||a>.11){H(X.current),n.onDismiss==null||n.onDismiss.call(n,n),oe(j===`x`?e>0?`right`:`left`:t>0?`down`:`up`),$(),se(!0);return}else{var o,s;(o=G.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=G.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}V(!1),z(!1),M(null)},onPointerMove:t=>{var n,r;if(!Z.current||!q||window.getSelection()?.toString().length>0)return;let i=t.clientY-Z.current.y,a=t.clientX-Z.current.x,o=e.swipeDirections??ae(w);!j&&(Math.abs(a)>1||Math.abs(i)>1)&&M(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(j===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(j===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&V(!0),(n=G.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=G.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ge&&!n.jsx&&K!==`loading`?a.createElement(`button`,{"aria-label":A,"data-disabled":Q,"data-close-button":!0,onClick:Q||!q?()=>{}:()=>{$(),n.onDismiss==null||n.onDismiss.call(n,n)},className:E(O?.closeButton,n?.classNames?.closeButton)},k?.close??ee):null,(K||n.icon||n.promise)&&n.icon!==null&&(k?.[K]!==null||n.icon)?a.createElement(`div`,{"data-icon":``,className:E(O?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||we():null,n.type===`loading`?null:Te):null,a.createElement(`div`,{"data-content":``,className:E(O?.content,n?.classNames?.content)},a.createElement(`div`,{"data-title":``,className:E(O?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?a.createElement(`div`,{"data-description":``,className:E(x,he,O?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),a.isValidElement(n.cancel)?n.cancel:n.cancel&&b(n.cancel)?a.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||v,onClick:e=>{b(n.cancel)&&q&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),$())},className:E(O?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,a.isValidElement(n.action)?n.action:n.action&&b(n.action)?a.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||y,onClick:e=>{b(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&$())},className:E(O?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function O(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function k(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?S:x;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var A=a.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:s=[`altKey`,`KeyT`],expand:c,closeButton:l,className:u,offset:d,mobileOffset:f,theme:p=`light`,richColors:m,duration:ee,style:te,visibleToasts:h=ne,toastOptions:_,dir:v=O(),gap:y=re,icons:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=a.useState([]),T=a.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),ie=a.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[E,ae]=a.useState([]),[A,j]=a.useState(!1),[M,N]=a.useState(!1),[oe,P]=a.useState(p===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p),F=a.useRef(null),I=s.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=a.useRef(null),R=a.useRef(!1),z=a.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||g.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return a.useEffect(()=>g.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{o.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[S]),a.useEffect(()=>{if(p!==`system`){P(p);return}if(p===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[p]),a.useEffect(()=>{S.length<=1&&j(!1)},[S]),a.useEffect(()=>{let e=e=>{if(s.every(t=>e[t]||e.code===t)){var t;j(!0),(t=F.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===F.current||F.current?.contains(document.activeElement))&&j(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]),a.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),a.createElement(`section`,{ref:t,"aria-label":`${x} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},ie.map((t,n)=>{let[i,o]=t.split(`-`);return T.length?a.createElement(`ol`,{key:t,dir:v===`auto`?O():v,tabIndex:-1,ref:F,className:u,"data-sonner-toaster":!0,"data-sonner-theme":oe,"data-y-position":i,"data-x-position":o,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${w}px`,"--gap":`${y}px`,...te,...k(d,f)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&=(L.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{M||j(!1)},onDragEnd:()=>j(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N(!0)},onPointerUp:()=>N(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>a.createElement(D,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:m,duration:_?.duration??ee,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:h,closeButton:_?.closeButton??l,interacting:M,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:z,toasts:T.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:ae,expandByDefault:c,gap:y,expanded:A,swipeDirections:e.swipeDirections}))):null}))});export{y as n,i as r,A as t};
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t}from"./compiler-runtime-CVnuRdak.js";import{t as n}from"./react-dom-C-oc-P2K.js";import{u as r}from"./button-cneJOVxD.js";var i=r(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),a=e(t(),1),o=e(n(),1);function s(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var c=e=>{switch(e){case`success`:return d;case`info`:return p;case`warning`:return f;case`error`:return m;default:return null}},l=Array(12).fill(0),u=({visible:e,className:t})=>a.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},a.createElement(`div`,{className:`sonner-spinner`},l.map((e,t)=>a.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),d=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),f=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),p=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),m=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},a.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ee=a.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},a.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),a.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),te=()=>{let[e,t]=a.useState(document.hidden);return a.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},h=1,g=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:h++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,o,s=r.then(async e=>{if(o=[`resolve`,e],a.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(v(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,o=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,o=typeof t.description==`function`?await t.description(e):t.description,s=typeof r==`object`&&!a.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:o,...s})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{let n=t?.id||h++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},_=(e,t)=>{let n=t?.id||h++;return g.addToast({title:e,...t,id:n}),n},v=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,y=Object.assign(_,{success:g.success,info:g.info,warning:g.warning,error:g.error,custom:g.custom,message:g.message,promise:g.promise,dismiss:g.dismiss,loading:g.loading},{getHistory:()=>g.toasts,getToasts:()=>g.getActiveToasts()});s(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function b(e){return e.label!==void 0}var ne=3,x=`24px`,S=`16px`,C=4e3,w=356,re=14,T=45,ie=200;function E(...e){return e.filter(Boolean).join(` `)}function ae(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var D=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:o,visibleToasts:s,heights:l,index:d,toasts:f,expanded:p,removeToast:m,defaultRichColors:h,closeButton:g,style:_,cancelButtonStyle:v,actionButtonStyle:y,className:ne=``,descriptionClassName:x=``,duration:S,position:w,gap:re,expandByDefault:D,classNames:O,icons:k,closeButtonAriaLabel:A=`Close toast`}=e,[j,M]=a.useState(null),[N,oe]=a.useState(null),[P,F]=a.useState(!1),[I,L]=a.useState(!1),[R,z]=a.useState(!1),[B,se]=a.useState(!1),[ce,V]=a.useState(!1),[le,H]=a.useState(0),[ue,U]=a.useState(0),W=a.useRef(n.duration||S||C),de=a.useRef(null),G=a.useRef(null),fe=d===0,pe=d+1<=s,K=n.type,q=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,J=a.useMemo(()=>l.findIndex(e=>e.toastId===n.id)||0,[l,n.id]),ge=a.useMemo(()=>n.closeButton??g,[n.closeButton,g]),_e=a.useMemo(()=>n.duration||S||C,[n.duration,S]),Y=a.useRef(0),X=a.useRef(0),ve=a.useRef(0),Z=a.useRef(null),[ye,be]=w.split(`-`),xe=a.useMemo(()=>l.reduce((e,t,n)=>n>=J?e:e+t.height,0),[l,J]),Se=te(),Ce=n.invert||t,Q=K===`loading`;X.current=a.useMemo(()=>J*re+xe,[J,xe]),a.useEffect(()=>{W.current=_e},[_e]),a.useEffect(()=>{F(!0)},[]),a.useEffect(()=>{let e=G.current;if(e){let t=e.getBoundingClientRect().height;return U(t),o(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>o(e=>e.filter(e=>e.toastId!==n.id))}},[o,n.id]),a.useLayoutEffect(()=>{if(!P)return;let e=G.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,U(r),o(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[P,n.title,n.description,o,n.id,n.jsx,n.action,n.cancel]);let $=a.useCallback(()=>{L(!0),H(X.current),o(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{m(n)},ie)},[n,m,o,X]);a.useEffect(()=>{if(n.promise&&K===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return p||i||Se?(()=>{if(ve.current<Y.current){let e=new Date().getTime()-Y.current;W.current-=e}ve.current=new Date().getTime()})():W.current!==1/0&&(Y.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),$()},W.current)),()=>clearTimeout(e)},[p,i,n,K,Se,$]),a.useEffect(()=>{n.delete&&($(),n.onDismiss==null||n.onDismiss.call(n,n))},[$,n.delete]);function we(){return k?.loading?a.createElement(`div`,{className:E(O?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":K===`loading`},k.loading):a.createElement(u,{className:E(O?.loader,n?.classNames?.loader),visible:K===`loading`})}let Te=n.icon||k?.[K]||c(K);return a.createElement(`li`,{tabIndex:0,ref:G,className:E(ne,me,O?.toast,n?.classNames?.toast,O?.default,O?.[K],n?.classNames?.[K]),"data-sonner-toast":``,"data-rich-colors":n.richColors??h,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":P,"data-promise":!!n.promise,"data-swiped":ce,"data-removed":I,"data-visible":pe,"data-y-position":ye,"data-x-position":be,"data-index":d,"data-front":fe,"data-swiping":R,"data-dismissible":q,"data-type":K,"data-invert":Ce,"data-swipe-out":B,"data-swipe-direction":N,"data-expanded":!!(p||D&&P),"data-testid":n.testId,style:{"--index":d,"--toasts-before":d,"--z-index":f.length-d,"--offset":`${I?le:X.current}px`,"--initial-height":D?`auto`:`${ue}px`,..._,...n.style},onDragEnd:()=>{z(!1),M(null),Z.current=null},onPointerDown:e=>{e.button!==2&&(Q||!q||(de.current=new Date,H(X.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(z(!0),Z.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(B||!q)return;Z.current=null;let e=Number(G.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(G.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-de.current?.getTime(),i=j===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=T||a>.11){H(X.current),n.onDismiss==null||n.onDismiss.call(n,n),oe(j===`x`?e>0?`right`:`left`:t>0?`down`:`up`),$(),se(!0);return}else{var o,s;(o=G.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=G.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}V(!1),z(!1),M(null)},onPointerMove:t=>{var n,r;if(!Z.current||!q||window.getSelection()?.toString().length>0)return;let i=t.clientY-Z.current.y,a=t.clientX-Z.current.x,o=e.swipeDirections??ae(w);!j&&(Math.abs(a)>1||Math.abs(i)>1)&&M(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(j===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(j===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&V(!0),(n=G.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=G.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ge&&!n.jsx&&K!==`loading`?a.createElement(`button`,{"aria-label":A,"data-disabled":Q,"data-close-button":!0,onClick:Q||!q?()=>{}:()=>{$(),n.onDismiss==null||n.onDismiss.call(n,n)},className:E(O?.closeButton,n?.classNames?.closeButton)},k?.close??ee):null,(K||n.icon||n.promise)&&n.icon!==null&&(k?.[K]!==null||n.icon)?a.createElement(`div`,{"data-icon":``,className:E(O?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||we():null,n.type===`loading`?null:Te):null,a.createElement(`div`,{"data-content":``,className:E(O?.content,n?.classNames?.content)},a.createElement(`div`,{"data-title":``,className:E(O?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?a.createElement(`div`,{"data-description":``,className:E(x,he,O?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),a.isValidElement(n.cancel)?n.cancel:n.cancel&&b(n.cancel)?a.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||v,onClick:e=>{b(n.cancel)&&q&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),$())},className:E(O?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,a.isValidElement(n.action)?n.action:n.action&&b(n.action)?a.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||y,onClick:e=>{b(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&$())},className:E(O?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function O(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function k(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?S:x;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var A=a.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:s=[`altKey`,`KeyT`],expand:c,closeButton:l,className:u,offset:d,mobileOffset:f,theme:p=`light`,richColors:m,duration:ee,style:te,visibleToasts:h=ne,toastOptions:_,dir:v=O(),gap:y=re,icons:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=a.useState([]),T=a.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),ie=a.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[E,ae]=a.useState([]),[A,j]=a.useState(!1),[M,N]=a.useState(!1),[oe,P]=a.useState(p===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p),F=a.useRef(null),I=s.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=a.useRef(null),R=a.useRef(!1),z=a.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||g.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return a.useEffect(()=>g.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{o.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[S]),a.useEffect(()=>{if(p!==`system`){P(p);return}if(p===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[p]),a.useEffect(()=>{S.length<=1&&j(!1)},[S]),a.useEffect(()=>{let e=e=>{if(s.every(t=>e[t]||e.code===t)){var t;j(!0),(t=F.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===F.current||F.current?.contains(document.activeElement))&&j(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]),a.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),a.createElement(`section`,{ref:t,"aria-label":`${x} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},ie.map((t,n)=>{let[i,o]=t.split(`-`);return T.length?a.createElement(`ol`,{key:t,dir:v===`auto`?O():v,tabIndex:-1,ref:F,className:u,"data-sonner-toaster":!0,"data-sonner-theme":oe,"data-y-position":i,"data-x-position":o,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${w}px`,"--gap":`${y}px`,...te,...k(d,f)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&=(L.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{M||j(!1)},onDragEnd:()=>j(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N(!0)},onPointerUp:()=>N(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>a.createElement(D,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:m,duration:_?.duration??ee,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:h,closeButton:_?.closeButton??l,interacting:M,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:z,toasts:T.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:ae,expandByDefault:c,gap:y,expanded:A,swipeDirections:e.swipeDirections}))):null}))});export{y as n,i as r,A as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,G as t,Hn as n,Wn as r,Xn as i,dr as a,ir as o,or as s,wr as c,zn as l}from"./dist-BkxMNfFN.js";function u(e){return e.kind===`asset`}function d(e){return e.kind===`document`}function f(e){return e.kind===`folder`}function p(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??m(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function m(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function h(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function g(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function _(e,t=!1){return e.filter(e=>{let r=e.docName??e.path??``;return r===``?!1:t?!0:!n(r)})}function v(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\.mdx?$/i,``)}function y(e){let t=v(e);return t?`${t}.md`:`untitled.md`}function b(e){let t=v(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}function x(e){let t=e.trim();return{normalizedTarget:v(t).replace(/\/+$/g,``),expectsFolder:/\/+$/.test(t)}}function S(e){let t=new Set;for(let n of e)for(let e of h(n))t.add(e);return t}function C(e,t){if(!t)return;let n=c(e);if(n)return t.get(n)}function w(e,t){if(!t||e.includes(`/`))return;let n=c(e);if(n)return t.get(n)}function T(e,t){if(r(e)){let t=o(e);if(t?.kind===`reference`){let e=`references/${t.rel}.md`;return{kind:`skill-file`,target:`global/${t.name}/${e}`,scope:`global`,name:t.name,path:e}}let n=s(e);if(n?.kind===`skill`&&n.scope===`project`){let e=a(n.name);return{kind:`doc`,target:e,docName:e}}return{kind:`doc`,target:e,docName:e}}let n=i(e);if(n)return{kind:`doc`,target:n,docName:n};let{normalizedTarget:c,expectsFolder:l}=x(e);if(!c)return{kind:`missing`,target:c};if(!l&&t.pages.has(c))return{kind:`doc`,target:c,docName:c};if(!l){let e=C(c,t.pagesBySlug);if(e)return{kind:`doc`,target:e,docName:e}}let u=`${c}/index`;if(t.pages.has(u))return{kind:`folder-index`,target:c,folderPath:c,docName:u,noteKind:`canonical-index`};let d=c.split(`/`).pop(),f=d?`${c}/${d}`:null;if(f&&t.pages.has(f))return{kind:`folder-index`,target:c,folderPath:c,docName:f,noteKind:`legacy-folder-note`};if(!l){let e=w(c,t.pagesByBasename);if(e)return{kind:`doc`,target:e,docName:e}}return(t.folderPaths??S(t.pages)).has(c)?{kind:`folder`,target:c,folderPath:c}:{kind:`missing`,target:c}}function E(e){return e.kind===`folder-index`?{kind:`folder`,target:e.folderPath,folderPath:e.folderPath}:e}function D(t,n,r=e){return typeof n!=`number`||!l(n,r)?null:{kind:`large-file`,target:t,docName:t,size:n,limit:r}}function O(t,n,r=e){return t.kind!==`doc`&&t.kind!==`folder-index`?t:D(t.docName,n.get(t.docName)?.size,r)??t}function k(e){switch(e.kind){case`doc`:case`folder-index`:case`large-file`:return e.docName;case`missing`:return e.target;case`asset`:case`skill-file`:case`folder`:return null}}function A(e){return t.includes(e)}function j(e){if(e.startsWith(z)||e.startsWith(U)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=B(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function M(e){if(e.startsWith(z)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}function N(e,t){let n=`#/${e}`;return t?`${n}#${encodeURIComponent(t)}`:n}function P(e){if(window.location.hash===e)return;let{pathname:t,search:n}=window.location;window.history.replaceState(null,``,`${t}${n}${e}`)}function F(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function I(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${n}/`:`#/`;return t?`${r}#${encodeURIComponent(t)}`:r}function L(e,t,n){if(e===`folder`)return I(t);let r=`#/${encodeURIComponent(t)}`;return n==null||n===``?r:`${r}?branch=${encodeURIComponent(n)}`}function R(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var z=`#/__asset__/`;function B(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function V(e){if(!e.startsWith(z))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function H(e){return`${z}${e.split(`/`).map(encodeURIComponent).join(`/`)}`}var U=`#/__skill-file__/`;function W(e){return`${U}${[e.scope,e.name].map(encodeURIComponent).join(`/`)}/${e.path.split(`/`).map(encodeURIComponent).join(`/`)}`}function G(e){if(!e.startsWith(U))return null;let t=e.slice(17);if(!t)return null;let n;try{n=t.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<3)return null;let[r,i,...a]=n,o=a.join(`/`);return!r||!i||!o||!A(r)?null:{scope:r,name:i,path:o}}export{g as C,f as D,d as E,m as O,v as S,u as T,x as _,F as a,b,I as c,P as d,G as f,D as g,E as h,L as i,p as k,W as l,k as m,V as n,H as o,S as p,j as r,N as s,M as t,R as u,T as v,_ as w,y as x,O as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as e}from"./dist-BkxMNfFN.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}var o=`open-knowledge:branch-changed`;function s(e){window.dispatchEvent(new CustomEvent(o,{detail:{branch:e}}))}function c(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)}var l=`open-knowledge:templates-changed`;function u(){window.dispatchEvent(new CustomEvent(l))}function d(e){let t=()=>e();return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}var f=`open-knowledge:skills-changed`;function p(){window.dispatchEvent(new CustomEvent(f))}function m(e){let t=()=>e();return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}export{c as a,d as c,u as i,i as n,a as o,p as r,m as s,s as t};
|
package/dist/public/assets/{erDiagram-SMLLAGMA-CFPPEjz0.js → erDiagram-SMLLAGMA-D1J1j3Yx.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./src-DEzC9TbA.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,b as l,nt as u,v as d}from"./chunk-ICPOFSXX-MhneOmo1.js";import{t as f}from"./channel-ClECMrL_.js";import{C as p}from"./src-C3imF5Zq.js";import{h as m,s as h}from"./chunk-5PVQY5BW-7GSXpGpA.js";import"./chunk-U2HBQHQK-Wd4MIHD7.js";import"./chunk-BSJP7CBP-DRn1Q8qZ.js";import"./chunk-ZZ45TVLE-Bml1MOax.js";import{t as g}from"./chunk-55IACEB6-maKdi3q_.js";import{t as _}from"./chunk-EDXVE4YY-TfqLQBKW.js";import"./chunk-X2U36JSP-DgR3BYDC.js";import"./chunk-5FUZZQ4R-BhDATrAC.js";import"./chunk-ENJZ2VHE-CqUfmxZL.js";import{r as v,t as y}from"./chunk-336JU56O-BDNF8ABQ.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,5]),t(n,[2,6]),t(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(n,[2,27]),t(n,[2,28]),t(n,[2,29]),t(n,[2,30]),t(n,[2,31]),t(w,[2,54]),t(w,[2,55]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(n,[2,32]),t(n,[2,33]),t(n,[2,34]),t(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},t(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},t(O,[2,72]),t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},t(P,[2,37]),t(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},t(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},t(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},t(F,[2,77]),t(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},t(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),t(V,[2,45]),t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},t(n,[2,12]),{19:[2,60]},t(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),t([19,58,61,62],[2,66]),t(n,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},t(n,[2,47]),t(n,[2,48]),t(n,[2,49]),t(P,[2,39]),t(P,[2,40]),t(V,[2,46]),t(n,[2,42]),t(n,[2,8]),t(n,[2,79]),t(n,[2,80]),t(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},t(n,[2,15]),t(G,[2,62],{57:109,60:[1,110],62:q}),t(G,[2,63]),t(J,[2,67]),t(G,[2,70]),t(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},t(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},t(n,[2,13]),t(G,[2,64]),{59:117,61:K},{19:[1,118]},t(n,[2,20]),t(n,[2,23],{17:[1,119],42:j}),t(n,[2,11]),{13:[1,120],42:j},t(n,[2,10]),t(J,[2,68]),t(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},t(n,[2,21]),t(n,[2,9]),t(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{n as e,r as t,t as n}from"./src-60u1_sM3.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,b as l,nt as u,v as d}from"./chunk-ICPOFSXX-B1LaL7po.js";import{t as f}from"./channel-DQ8biAJJ.js";import{C as p}from"./src-BjEzLuzr.js";import{h as m,s as h}from"./chunk-5PVQY5BW-DHmdYl18.js";import"./chunk-U2HBQHQK-BQEFtvNE.js";import"./chunk-BSJP7CBP-Bi10nqUB.js";import"./chunk-ZZ45TVLE-DjoyvapL.js";import{t as g}from"./chunk-55IACEB6-BMw0jGoU.js";import{t as _}from"./chunk-EDXVE4YY-Cdm2p7eD.js";import"./chunk-X2U36JSP-B0NFvVYj.js";import"./chunk-5FUZZQ4R-BP1tPdP4.js";import"./chunk-ENJZ2VHE-CtYN5PYG.js";import{r as v,t as y}from"./chunk-336JU56O-Df_WdTwV.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,5]),t(n,[2,6]),t(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(n,[2,27]),t(n,[2,28]),t(n,[2,29]),t(n,[2,30]),t(n,[2,31]),t(w,[2,54]),t(w,[2,55]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(n,[2,32]),t(n,[2,33]),t(n,[2,34]),t(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},t(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},t(O,[2,72]),t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},t(P,[2,37]),t(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},t(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},t(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},t(F,[2,77]),t(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},t(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),t(V,[2,45]),t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},t(n,[2,12]),{19:[2,60]},t(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),t([19,58,61,62],[2,66]),t(n,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},t(n,[2,47]),t(n,[2,48]),t(n,[2,49]),t(P,[2,39]),t(P,[2,40]),t(V,[2,46]),t(n,[2,42]),t(n,[2,8]),t(n,[2,79]),t(n,[2,80]),t(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},t(n,[2,15]),t(G,[2,62],{57:109,60:[1,110],62:q}),t(G,[2,63]),t(J,[2,67]),t(G,[2,70]),t(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},t(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},t(n,[2,13]),t(G,[2,64]),{59:117,61:K},{19:[1,118]},t(n,[2,20]),t(n,[2,23],{17:[1,119],42:j}),t(n,[2,11]),{13:[1,120],42:j},t(n,[2,10]),t(J,[2,68]),t(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},t(n,[2,21]),t(n,[2,9]),t(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fi as e}from"./dist-BkxMNfFN.js";import{t}from"./file-tree-rename-validation-BkATWpiZ.js";import{D as n,E as r,T as i,c as a,g as o,o as s,s as c}from"./doc-hash-5OIPOG-G.js";var l=`application/x-open-knowledge-sidebar-item+json`,u={image:!0,video:!0,audio:!0,pdf:!0,text:!0};function d(e){return JSON.stringify(e)}function f(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:a(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:s(e.assetPath)}:{target:o(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:c(e.docName)}}function p(e){if(!e||!Array.from(e.types).includes(`application/x-open-knowledge-sidebar-item+json`))return null;let t=e.getData(l);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!m(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!h(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function h(e){return typeof e==`string`&&Object.hasOwn(u,e)}var g={background:`#171717`,foreground:`#e5e5e5`,cursor:`#e5e5e5`,cursorAccent:`#171717`,selectionBackground:`#3a3d41`,black:`#000000`,red:`#cd3131`,green:`#0dbc79`,yellow:`#e5e510`,blue:`#2472c8`,magenta:`#bc3fbc`,cyan:`#11a8cd`,white:`#e5e5e5`,brightBlack:`#666666`,brightRed:`#f14c4c`,brightGreen:`#23d18b`,brightYellow:`#f5f543`,brightBlue:`#3b8eea`,brightMagenta:`#d670d6`,brightCyan:`#29b8db`,brightWhite:`#ffffff`},_={background:`#ffffff`,foreground:`#262626`,cursor:`#262626`,cursorAccent:`#ffffff`,selectionBackground:`#add6ff`,black:`#000000`,red:`#cd3131`,green:`#00bc00`,yellow:`#949800`,blue:`#0451a5`,magenta:`#bc05bc`,cyan:`#0598bc`,white:`#555555`,brightBlack:`#666666`,brightRed:`#cd3131`,brightGreen:`#14ce14`,brightYellow:`#b5ba00`,brightBlue:`#0451a5`,brightMagenta:`#bc05bc`,brightCyan:`#0598bc`,brightWhite:`#a5a5a5`};function v(e){return e===`dark`?g:_}var y=`.md`,b=/\.(md|mdx)$/i;function x(e,t=y){return`${e}${t}`}function S(e){return X(e).replace(b,``)}function C(e){return n(e)?E(e.path):i(e)?e.path:x(e.docName,e.docExt)}function w(e){let t=X(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function T(e){return X(e)}function E(e){let t=X(e.trim());return t?`${t}/`:``}function D(e){return e.endsWith(`/`)?T(e):S(e)}function O(e){return e.map(C)}function k(e){return[...e].sort().join(`\0`)}function A(e){return k(O(e))}function j(e){let t=new Set;for(let r of e){let e=(n(r)||i(r)?r.path:r.docName).split(`/`).filter(Boolean);if(e.includes(`.ok`))continue;if(n(r)){let e=E(r.path);e&&t.add(e)}let a=n(r)?e.length:e.length-1;for(let n=1;n<=a;n++)t.add(`${e.slice(0,n).join(`/`)}/`)}return[...t].sort()}function M(e){if(!e)return[];let t=X(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function N(e,t,n){let i=w(e);if(i)return i;let a=n.find(e=>r(e)&&e.docName===t);return a?a.docExt??y:Y(e).includes(`.`)?void 0:y}function P(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),a=n===-1?e:e.slice(n+1),o=t.filter(e=>{if(!i(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${a}.`)});return o.length===1?o[0].path:null}function F(e,t,n){if(w(e))return null;let r=n.find(e=>i(e)&&e.path===t);return r?r.path:Y(e).includes(`.`)?t:P(t,n)}function I(e,t){let n=e.kind===`directory`,r=n?T(e.path):S(e.path);if(n)return{kind:`folder`,name:X(Y(e.path)).replace(b,``),path:r,treePath:R(e.path,!0)};let i=F(e.path,r,t);if(i)return{kind:`asset`,name:X(Y(i)),path:i,treePath:i};let a=N(e.path,r,t);return{kind:`file`,name:X(Y(e.path)).replace(b,``),path:r,treePath:R(e.path,!1),docExt:a}}function L(e){return e.kind===`directory`?T(e.path):e.path}function R(e,t){return t?E(e):b.test(e)?e:`${e}${y}`}function z(e,t,n){let r=E(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function B(e,t){return e===`file`?R(t,!1):`${T(t)}/index${y}`}function V(e,t){return t.kind===`root`||t.directoryPath==null?Y(e):`${t.directoryPath}${Y(e)}`}function H(e,t){if(t)return T(E(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function U(e,t){let n=T(E(e));return n?`${n}/${t}`:t}function W(e,t,n){e.append(`parentDocName`,U(t,n)),e.append(`placement`,`parent-dir`)}function G(e,t){return(t.path??U(e,t.src)).replace(/^\/+/,``)}function K(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function q(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function J(n,r){let i=t(n).toLowerCase();if(i===``)return null;let a=new Date().toISOString();if(i===`.md`||i===`.mdx`)return{kind:`document`,docName:S(n),docExt:i,modified:a,size:r.size};let o=i.startsWith(`.`)?i.slice(1):i;return{kind:`asset`,path:n,assetExt:o,mediaKind:e(o),modified:a,size:r.size}}function Y(e){let t=X(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function X(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{D as C,f as D,l as E,p as O,k as S,v as T,L as _,B as a,S as b,O as c,C as d,q as f,H as g,R as h,V as i,d as k,A as l,K as m,j as n,z as o,E as p,M as r,x as s,W as t,J as u,P as v,G as w,I as x,T as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,d as t,l as n,s as r}from"./reduce-
|
|
1
|
+
import{T as e,d as t,l as n,s as r}from"./reduce-BkAOm6E5.js";import{h as i,i as a,n as o}from"./_baseFor-D774tcxR.js";import{t as s}from"./isSymbol-BR3mCdgP.js";function c(e,t){var r=-1,i=a(e)?Array(e.length):[];return n(e,function(e,n,a){i[++r]=t(e,n,a)}),i}function l(n,r){return(i(n)?e:c)(n,t(r,3))}function u(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(c===void 0?o===o&&!s(o):n(o,c)))var c=o,l=a}return l}function d(e,t){return e<t}function f(e){return e&&e.length?u(e,o,d):void 0}function p(e){return e!=null&&e.length?r(e,1):[]}export{l as a,u as i,f as n,c as o,d as r,p as t};
|
package/dist/public/assets/{flowDiagram-DWJPFMVM-DOjygKY4.js → flowDiagram-DWJPFMVM-CMNxv96M.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./src-
|
|
1
|
+
import{n as e,r as t}from"./src-60u1_sM3.js";import{B as n,C as r,U as i,V as a,W as o,Z as s,_ as c,a as l,b as u,nt as d,s as f,u as p,v as ee}from"./chunk-ICPOFSXX-B1LaL7po.js";import{t as m}from"./channel-DQ8biAJJ.js";import{C as h}from"./src-BjEzLuzr.js";import{h as g,s as _}from"./chunk-5PVQY5BW-DHmdYl18.js";import"./chunk-U2HBQHQK-BQEFtvNE.js";import{t as te}from"./chunk-FMBD7UC4-yxpni0iy.js";import"./chunk-BSJP7CBP-Bi10nqUB.js";import"./chunk-ZZ45TVLE-DjoyvapL.js";import{t as ne}from"./chunk-YZCP3GAM-wveZpL2J.js";import{t as re}from"./chunk-55IACEB6-BMw0jGoU.js";import{t as v}from"./chunk-EDXVE4YY-Cdm2p7eD.js";import"./chunk-X2U36JSP-B0NFvVYj.js";import{o as y}from"./chunk-5FUZZQ4R-BP1tPdP4.js";import"./chunk-ENJZ2VHE-CtYN5PYG.js";import{r as b,t as x}from"./chunk-336JU56O-Df_WdTwV.js";import{n as S,t as C}from"./chunk-XPW4576I-CWtaxsuf.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=u(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=a,this.setAccDescription=n,this.setDiagramTitle=o,this.getAccTitle=ee,this.getAccDescription=c,this.getDiagramTitle=r,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return f.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
|
|
2
2
|
`)?c+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+c+`
|