@inkeep/open-knowledge 0.12.0-beta.8 → 0.12.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/THIRD_PARTY_NOTICES.md +35 -0
- package/dist/_baseFor-m0TxKeb9.mjs +2 -0
- package/dist/alias-JE7RI5QX-DmHh8yog.mjs +1 -0
- package/dist/arc-Doj9VrmJ.mjs +2 -0
- package/dist/architecture-YZFGNWBL-YPACCZ88.mjs +1 -0
- package/dist/architectureDiagram-Q4EWVU46-C9cSuC8m.mjs +37 -0
- package/dist/array-1jkOhClC.mjs +2 -0
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +6 -4
- package/dist/awk2-POPGKRAI-C7696e-z.mjs +1 -0
- package/dist/{banner-BeneQTB4.mjs → banner-BxCFCyu8.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +1 -0
- package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +1 -0
- package/dist/bash-IJWYRKFO-DgruzS3i.mjs +1 -0
- package/dist/blockDiagram-DXYQGD6D-Dr7L7QsL.mjs +133 -0
- package/dist/build-CCDQyip-.mjs +1 -0
- package/dist/{build-CJEQ0nGy.mjs → build-DCHzh6iE.mjs} +1 -1
- package/dist/c4Diagram-AHTNJAMY-CPm6kKNR.mjs +11 -0
- package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +1 -0
- package/dist/channel-DE79NHCf.mjs +2 -0
- package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +1 -0
- package/dist/{chokidar-BDjANGpQ.mjs → chokidar-Bu9Rdqzq.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-C-Zyd2K_.mjs → chunk-24IMIIXA-DaS5XS55.mjs} +2 -2
- package/dist/chunk-2KRD3SAO-BXl7sX-7.mjs +2 -0
- package/dist/chunk-336JU56O-KTMEs5Wk.mjs +2 -0
- package/dist/{chunk-3THT3N7L-Ce6LrnIA.mjs → chunk-3THT3N7L-B1WzJUh4.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-C93H8j0V.mjs → chunk-3ZUFRYJ4-Bv1jGN68.mjs} +1 -1
- package/dist/chunk-426QAEUC-DUpKwtVu.mjs +2 -0
- package/dist/{chunk-44UOCSGV-uErOrz7G.mjs → chunk-44UOCSGV-BZ6LfyW2.mjs} +1 -1
- package/dist/chunk-4BX2VUAB-DM-mXRDw.mjs +2 -0
- package/dist/{chunk-4GTNDTRF-_OVmXcJ-.mjs → chunk-4GTNDTRF-DLnFbNSw.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-Dm69hDaZ.mjs → chunk-4HHKTUW3-Ct4ue15f.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-DDQRsilN.mjs → chunk-4Q4SM6WR-CAvCnPq5.mjs} +2 -2
- package/dist/chunk-4TB4RGXK-Ct6WjPoY.mjs +207 -0
- package/dist/chunk-55IACEB6-Cmyc0XwJ.mjs +2 -0
- package/dist/{chunk-55VFSPNA-DVZfQAzN.mjs → chunk-55VFSPNA-RFvY6zq0.mjs} +2 -2
- package/dist/chunk-5FUZZQ4R-Bf6nbyQG.mjs +63 -0
- package/dist/chunk-5PVQY5BW-DUXm3tDu.mjs +3 -0
- package/dist/{chunk-5QMZ5MUS-BfIuRNkK.mjs → chunk-5QMZ5MUS-BwpNU33k.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-BvsipSFW.mjs → chunk-5QVNJEHU-BV0xuiYW.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-BCr5_GDF.mjs → chunk-5V6VZH6T-ByuVaPWr.mjs} +2 -2
- package/dist/{chunk-62RKD26F-CvuML91F.mjs → chunk-62RKD26F-DebCAz0V.mjs} +2 -2
- package/dist/{chunk-64BAICW3-CTJNEx4Q.mjs → chunk-64BAICW3-BlirlXmE.mjs} +2 -2
- package/dist/chunk-67CJDMHE-C58W8DAL.mjs +2 -0
- package/dist/{chunk-74CEPOFO-D1bzz49u.mjs → chunk-74CEPOFO-V0JXh91S.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-RiPZFKaV.mjs → chunk-7L36YK2X-B3QRwLbB.mjs} +1 -1
- package/dist/chunk-7N4EOEYR-DzEIb3Sc.mjs +2 -0
- package/dist/{chunk-7TSDKFEO-a-GUGBTu.mjs → chunk-7TSDKFEO-CMVuiOdP.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-hefV_YmW.mjs → chunk-A4HU7SVR-Bjuqsbev.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-k-tJSZgB.mjs → chunk-A4JSPFCI-CQJoYugB.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-C6ngIqYR.mjs → chunk-A5O5YHGN-DApqA6Ow.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-D7J5l9eq.mjs → chunk-A65PWWJC-GGt9898w.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-PLfkXLI4.mjs → chunk-A7A2DBEE-BqvlRSRw.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-Drb3XsEL.mjs → chunk-A7ICOL4V-D5TsVU6v.mjs} +2 -2
- package/dist/chunk-AA7GKIK3-DKgpQZxa.mjs +2 -0
- package/dist/{chunk-ALLTKNUZ-BMiTDN50.mjs → chunk-ALLTKNUZ-4H3OLfNN.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-CXHnSuct.mjs → chunk-APT7OOP2-DnIeUlVe.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-Oks1GMhO.mjs → chunk-BBXLRYSX-XWD4jM9A.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-CHO764qS.mjs → chunk-BRGMQKJV-CHbk2NqS.mjs} +3 -3
- package/dist/chunk-BSJP7CBP-BG3yJGkJ.mjs +2 -0
- package/dist/{chunk-FK9Q3tQk.mjs → chunk-C94x7I9S.mjs} +1 -1
- package/dist/chunk-CIAEETIT-CH33zQ9L.mjs +2 -0
- package/dist/{chunk-CR5AFCPT-CH8ZGz3B.mjs → chunk-CR5AFCPT-DN7EAdus.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-BP3kiNgH.mjs → chunk-CWQS3NFK-BkE4vqrf.mjs} +1 -1
- package/dist/{chunk-D4J545R4-C8nMOauR.mjs → chunk-D4J545R4-KlK3EOFl.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-BgQGt8eQ.mjs → chunk-D6CWQ5DW-CF9bBHyK.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-Csvth_Ss.mjs → chunk-D7MEQ3VN-BM_kIbvf.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-BdrR5ttw.mjs → chunk-DCAAORBQ-BUMlCZ4-.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-C2RuFAAY.mjs → chunk-DXB73IDG-F_tmy-Lz.mjs} +2 -2
- package/dist/chunk-EDXVE4YY-CI4s3JHP.mjs +2 -0
- package/dist/{chunk-EEXR5ZDP-C5AJH114.mjs → chunk-EEXR5ZDP-CvpAxUxM.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-8bsVXqW0.mjs → chunk-EIZGF4BS-C8wRSfCC.mjs} +2 -2
- package/dist/chunk-ENJZ2VHE-CQwjtY5A.mjs +11 -0
- package/dist/{chunk-F23WWYKW-DST0dB7V.mjs → chunk-F23WWYKW-DLeNVzzD.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-Bkfd8ak_.mjs → chunk-F55TLFGB-BZSRX-Vi.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-DmvuPNqm.mjs → chunk-FEIOJCZD-NzTooVTc.mjs} +2 -2
- package/dist/chunk-FMBD7UC4-CAloFUY3.mjs +16 -0
- package/dist/chunk-FOC6F5B3-Cv5O0Fxp.mjs +2 -0
- package/dist/{chunk-GCTKCWKD-Deqi1D_N.mjs → chunk-GCTKCWKD-D3J1Ev9z.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-ePq2jelx.mjs → chunk-GFQRA5P5-DbAN9IDm.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-CyL1eJ32.mjs → chunk-GOV5EKKI-CDGzZWfT.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-993FoPmq.mjs → chunk-GXVXFKBA-D0BDCtkE.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-pGV4pOJA.mjs → chunk-HDQ56CKY-DZc2LbWr.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-Ci3vsKQW.mjs → chunk-HJQJAYMS-BS_JF11O.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-UZig4wUt.mjs → chunk-HJWBQKYG-DknkBuxy.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-BeVrNfQw.mjs → chunk-HWBSOZZR-5PJ_z6D6.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-CPSjqtR_.mjs → chunk-HWKDQ44K-BJxdK4fT.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-5RFY25TO.mjs → chunk-I57KEIP3-DSoF8c_0.mjs} +2 -2
- package/dist/chunk-ICPOFSXX-C--tVIY5.mjs +123 -0
- package/dist/{chunk-IPJHKYVM-D6H6ZTtk.mjs → chunk-IPJHKYVM-CUKythEA.mjs} +1 -1
- package/dist/{chunk-J642UCRS-D87gHOLP.mjs → chunk-J642UCRS-HjD8qpZD.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-DnQCNjpq.mjs → chunk-JVPRLUMK-D6CRdXSO.mjs} +2 -2
- package/dist/chunk-K5T4RW27-BPgPjo39.mjs +98 -0
- package/dist/chunk-KGLVRYIC-CmkADDeV.mjs +2 -0
- package/dist/{chunk-KMEYNNUA-DfdK88O_.mjs → chunk-KMEYNNUA-Qk0eg7gN.mjs} +2 -2
- package/dist/chunk-LIHQZDEY-Fy8O-IVI.mjs +2 -0
- package/dist/{chunk-LL3S3NLB-DxXgE3kY.mjs → chunk-LL3S3NLB-CH16p_-s.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-DyyhWSR7.mjs → chunk-LPQPILI2-OoVL_l9j.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-GAjTFNwG.mjs → chunk-LTZRCH7N-BfgCUlp9.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-BALY4RLC.mjs → chunk-LWEGUNWT-DhbhFY11.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-poQ25EjI.mjs → chunk-MDDMCKUK-ChL1CU4m.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-oBQf6bGE.mjs → chunk-MDLLFABN-UsHGHHoh.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-dKmK6Hw7.mjs → chunk-MHTUABJP-Dk5ocjFo.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-BdoPqh_Y.mjs → chunk-MIZPJHVH-BD7tHmLL.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-DwewZM3r.mjs → chunk-MLXIYONF-CV7WHBm-.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-B4pRo9ma.mjs → chunk-MYE6AGBJ-DwzjGrc0.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-BFcmkHme.mjs → chunk-NAERJDUW-Cyg2DAzO.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-BFGan4lR.mjs → chunk-NCNPKYJZ-Ct0_l0YT.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-DAvAseHr.mjs → chunk-NUYSJFDK-BH2DjyxF.mjs} +2 -2
- package/dist/{chunk-NYQYO467-_2947cgi.mjs → chunk-NYQYO467-CY88QCuT.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-vxL5zuWx.mjs → chunk-OARHFVLG-dXiYYC4o.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-C7k2qEN6.mjs → chunk-OCLXQMOG-DOkdFgyf.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-Lh1p0H-V.mjs → chunk-OCS6LSEM-Bcx6uxmm.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-DWhg7YHU.mjs → chunk-OJDRYQWQ-CmrD0Dg2.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-B3hSNlNP.mjs → chunk-OL3S66CO-CWEDi2F_.mjs} +2 -2
- package/dist/chunk-ORNJ4GCN-R_gUIosC.mjs +2 -0
- package/dist/chunk-OYMX7WX6-Dvg98Zb-.mjs +232 -0
- package/dist/{chunk-PBXLG62G-MmAqjdXR.mjs → chunk-PBXLG62G-CpvczNyQ.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-DMC_XCfO.mjs → chunk-PP6PSHAB-DQ3LPONR.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-CY7pclEB.mjs → chunk-PYSFUGCK-B_Gv8rUn.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-D1RuXtOm.mjs → chunk-QCDB2VPH-Bays5mAr.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-BH67tCjg.mjs → chunk-QJ7O6ZN3-BCF2wp2J.mjs} +2 -2
- package/dist/chunk-QZHKN3VN-D0OJ2eQ1.mjs +2 -0
- package/dist/{chunk-R6QSAL5T-CtbJTvt9.mjs → chunk-R6QSAL5T-RaNW7MSS.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-D1Ufj9fh.mjs → chunk-R6VWJ2ZL-BVeTwIsz.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-BughPjdR.mjs → chunk-RPNGRAAP-yHFoBjjv.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-C3GEf3VZ.mjs → chunk-SDNKECQQ-BsAYzqU5.mjs} +2 -2
- package/dist/{chunk-SYMJJMQ4-DLPoQaug.mjs → chunk-SYMJJMQ4-jdmKoBFb.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-TppyesRp.mjs → chunk-T56QNPHK-DmDxJbbD.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-B2VV2ufQ.mjs → chunk-TLSUDHID-CSDR438C.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-DfLjxpHW.mjs → chunk-TOMNU26N-CrDa7MpH.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-l48TczF5.mjs → chunk-TXBZCHCQ-BxbbtyNr.mjs} +2 -2
- package/dist/chunk-U2HBQHQK-C1Q2DiEX.mjs +71 -0
- package/dist/{chunk-UNYNJIFU--HT-3lrq.mjs → chunk-UNYNJIFU-CZ2Mla0s.mjs} +3 -3
- package/dist/{chunk-V7TAPXDL-CnKUp2df.mjs → chunk-V7TAPXDL-CKif4_mH.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-IiUXkKX0.mjs → chunk-VJFXDYWH-CWlZv59U.mjs} +2 -2
- package/dist/{chunk-VLGZJRPG-DbWYxLfI.mjs → chunk-VLGZJRPG-DpYP_EVp.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-BT7gUxqf.mjs → chunk-VOBGTVA6-D6fSjWnx.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-BvibOnKG.mjs → chunk-VYOJP4TV-DN1CSkP5.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-DCZdrA8x.mjs → chunk-WKFATFPP-CoPg2OGf.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-BaH6i1Rq.mjs → chunk-X2AJGDEF-ClcErtij.mjs} +1 -1
- package/dist/chunk-X2U36JSP-BiF0R9ys.mjs +2 -0
- package/dist/{chunk-XHM67O4N-BWGDFyz_.mjs → chunk-XHM67O4N-C_wCK9HT.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-cVWA9gEB.mjs → chunk-XKQRETAK-BC2HZ_y9.mjs} +2 -2
- package/dist/{chunk-XORM457F-D-QrjagQ.mjs → chunk-XORM457F-BuPOSqOe.mjs} +2 -2
- package/dist/chunk-XPW4576I-BkucPPwf.mjs +39 -0
- package/dist/{chunk-XVDPCNWR-CtK-Xs2O.mjs → chunk-XVDPCNWR-CkzIJQaO.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-CFJxSbsH.mjs → chunk-YCFVLTST-DsF45PbT.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-DkT4NiqV.mjs → chunk-YFG2CMIF-DjdwxBNc.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-iQGTFdx0.mjs → chunk-YNYSPYQ5-gU4-j5DO.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-w6Dw8reo.mjs → chunk-YS3AZT3J-CB0wWPLc.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-Cz_dxkBy.mjs → chunk-YTNYSM6T-DpkSVTln.mjs} +2 -2
- package/dist/chunk-YZCP3GAM-DRdMIQsB.mjs +2 -0
- package/dist/{chunk-Z6LRHWXI-BcgkPhhu.mjs → chunk-Z6LRHWXI-EsbeaQ3V.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-BzR-yvwK.mjs → chunk-Z7JVV2SM-BtFBVQEW.mjs} +2 -2
- package/dist/chunk-ZZ45TVLE-DwKS4e_N.mjs +2 -0
- package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +2 -0
- package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +2 -0
- package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +1 -0
- package/dist/cli.mjs +53 -52
- package/dist/clone-BD_JFVST.mjs +2 -0
- package/dist/{colors-BtKMHmBX.mjs → colors-8SzMRIVy.mjs} +2 -2
- package/dist/colors-CkPULM8m.mjs +1 -0
- package/dist/column-WLPMMSTS-DTBoovzp.mjs +1 -0
- package/dist/comm-5SLSESQG-DT3SY7zS.mjs +1 -0
- package/dist/constants-iOPbvTyC.mjs +2 -0
- package/dist/cose-bilkent-S5V4N54A-E5vxHQ63.mjs +2 -0
- package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +1 -0
- package/dist/{curl-47BFPSFW-CdMFK7aW.mjs → curl-47BFPSFW-xgS5bDTx.mjs} +2 -2
- package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +1 -0
- package/dist/cytoscape.esm-BNCKY88j.mjs +332 -0
- package/dist/dagre-KV5264BT-Ci7CcQr4.mjs +5 -0
- package/dist/dagre-L3rg9n9q.mjs +2 -0
- package/dist/date-DD7FVA2V-Dv3os04S.mjs +1 -0
- package/dist/defaultLocale-BljHASC9.mjs +2 -0
- package/dist/diagram-5BDNPKRD-BM3C88Zx.mjs +11 -0
- package/dist/diagram-G4DWMVQ6-Dt1Kt-mj.mjs +25 -0
- package/dist/diagram-MMDJMWI5-DomPsk0L.mjs +44 -0
- package/dist/diagram-TYMM5635-eOfCqwhs.mjs +25 -0
- package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +1 -0
- package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +1 -0
- package/dist/{dist-BtrtJyLX.mjs → dist-D7myPw4s.mjs} +51 -51
- package/dist/dist-DZb_HoiN.mjs +2 -0
- package/dist/dist-GL5zcXSU.mjs +1 -0
- package/dist/dist-bundle-BnlRWriT.mjs +1 -0
- package/dist/{dist-bundle-B3l-HkEL.mjs → dist-bundle-D75dREX-.mjs} +2 -2
- package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +1 -0
- package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +1 -0
- package/dist/env-5EPCWSXR-DSwwgRF5.mjs +1 -0
- package/dist/erDiagram-SMLLAGMA-CPcwhEue.mjs +86 -0
- package/dist/{esm-CEs3LWY3.mjs → esm-BLMtE3s6.mjs} +2 -2
- package/dist/{esm-k1YlZnpm.mjs → esm-BS2W3Uzl.mjs} +2 -2
- package/dist/{execAsync-0jii24p9.mjs → execAsync-B4xEJACY.mjs} +2 -2
- package/dist/{execAsync-Czqc-yAz.mjs → execAsync-Chx_LJuI.mjs} +2 -2
- package/dist/{execAsync-DgmLXmTx.mjs → execAsync-DunQtInX.mjs} +2 -2
- package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +1 -0
- package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +1 -0
- package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +1 -0
- package/dist/find-TPUOAIUQ-CJd25AiD.mjs +1 -0
- package/dist/flag-coverage-QT4N2Z44-DJYVWsW6.mjs +2 -0
- package/dist/flatten-CX5MwHL4.mjs +2 -0
- package/dist/flowDiagram-DWJPFMVM-WnIxEgSt.mjs +163 -0
- package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +1 -0
- package/dist/ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs +293 -0
- package/dist/getMachineId-bsd-B7ue3N1o.mjs +2 -0
- package/dist/getMachineId-bsd-DYQqYqxN.mjs +2 -0
- package/dist/getMachineId-bsd-ucL-2FoT.mjs +2 -0
- package/dist/{getMachineId-darwin-C4PiguA-.mjs → getMachineId-darwin-BNCkZc-0.mjs} +2 -2
- package/dist/{getMachineId-darwin-COcA_c6l.mjs → getMachineId-darwin-CSTYV_Bd.mjs} +2 -2
- package/dist/{getMachineId-darwin-CywdnyvB.mjs → getMachineId-darwin-DWmBOUuk.mjs} +2 -2
- package/dist/getMachineId-linux-BaNp1ZEm.mjs +2 -0
- package/dist/getMachineId-linux-Bv6oOXxT.mjs +2 -0
- package/dist/getMachineId-linux-tTgUzx-Z.mjs +2 -0
- package/dist/getMachineId-unsupported-Kf9p6LJQ.mjs +2 -0
- package/dist/getMachineId-unsupported-fh_7WYkB.mjs +2 -0
- package/dist/getMachineId-unsupported-iDvWGFBk.mjs +2 -0
- package/dist/{getMachineId-win-B20yaCSB.mjs → getMachineId-win-Bo1_B38N.mjs} +2 -2
- package/dist/{getMachineId-win-BXWDfxLS.mjs → getMachineId-win-DHmdubaR.mjs} +2 -2
- package/dist/{getMachineId-win-BfSvDvM7.mjs → getMachineId-win-DQ2s9Z1n.mjs} +2 -2
- package/dist/{gh-detect-Dew_sAQh.mjs → gh-detect-CNO7EkgF.mjs} +2 -2
- package/dist/{git-handle--dq7Gq14-C8bnaqHA.mjs → git-handle--dq7Gq14-BpH0pmv5.mjs} +2 -2
- package/dist/git-handle-BaZ9y3AC-CCCU9J5d.mjs +1 -0
- package/dist/gitGraph-7Q5UKJZL-ClGjTWw6.mjs +1 -0
- package/dist/gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs +107 -0
- package/dist/graphlib-BI4uS4Lx.mjs +2 -0
- package/dist/grep-3AIAIJVR-CzG01gPs.mjs +1 -0
- package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +1 -0
- package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +1 -0
- package/dist/help-VVWX7SA5-C4HsVKec.mjs +1 -0
- package/dist/history-J4QRNGRO-1CYG7cs0.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/info-OMHHGYJF-11Qh6VJr.mjs +1 -0
- package/dist/infoDiagram-42DDH7IO-0lM1lRCH.mjs +3 -0
- package/dist/init-BCTt64EX.mjs +1 -0
- package/dist/{init-BJASd1l6.mjs → init-DjkROmXh.mjs} +9 -9
- package/dist/init-L1KCVOHH.mjs +2 -0
- package/dist/{is-object-C-4FJ0rP.mjs → is-object-Cie0xXKD.mjs} +1 -1
- package/dist/isEmpty-CaTO-fHo.mjs +2 -0
- package/dist/ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs +71 -0
- package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +1 -0
- package/dist/journeyDiagram-VCZTEJTY-BDX_OcrR.mjs +140 -0
- package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-Bo7dCQVP.mjs → js-exec-M6UR76J5-Cu6NIWHE.mjs} +2 -2
- package/dist/kanban-definition-6JOO6SKY-C5XJUD3U.mjs +90 -0
- package/dist/katex-DEJL_MaU.mjs +258 -0
- package/dist/{lib-Dl2j2VNl.mjs → lib-BbNAtG4h.mjs} +2 -2
- package/dist/lib-CItGM3rN.mjs +195 -0
- package/dist/{libesm-D3nlnq5U.mjs → libesm-Ob3yvbRV.mjs} +1 -1
- package/dist/line-C6RZPh4T.mjs +2 -0
- package/dist/linear-gA98NGf7.mjs +2 -0
- package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +1 -0
- package/dist/loader-DlfckqdT.mjs +1 -0
- package/dist/{loader-THH_o851.mjs → loader-ZHA8qsxF.mjs} +2 -2
- package/dist/ls-KSXFZCWH-Beyjypib.mjs +1 -0
- package/dist/{lzma-DMoteSiK.mjs → lzma-D4yjI8KW.mjs} +1 -1
- package/dist/{mcp-migrate-event-BF8ILHwp.mjs → mcp-migrate-event-D0NrGjvc.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +1 -0
- package/dist/mermaid-parser.core-Cx4njenA.mjs +4 -0
- package/dist/mermaid.core-CcmmzbTt.mjs +16 -0
- package/dist/mindmap-definition-QFDTVHPH-WLdthwDy.mjs +97 -0
- package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +1 -0
- package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +1 -0
- package/dist/nl-U5YJDM32-SP99R3HJ.mjs +1 -0
- package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +1 -0
- package/dist/{open-browser-C6LU_1mt.mjs → open-browser-DHTbHSqx.mjs} +1 -1
- package/dist/ordinal-BCuCMCHk.mjs +2 -0
- package/dist/packet-4T2RLAQJ-jzF54bgp.mjs +1 -0
- package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +1 -0
- package/dist/path-C9DYqGo_.mjs +2 -0
- package/dist/pie-ZZUOXDRM-x8WFG16Q.mjs +1 -0
- package/dist/pieDiagram-DEJITSTG-7oeIAT-R.mjs +31 -0
- package/dist/preview-1rr7IXHj.mjs +1 -0
- package/dist/{preview-D2aUkK2G.mjs → preview-BI2sVxtF.mjs} +2 -2
- package/dist/printf-CX64KX2P-GrZNCK4M.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-icee786E.js → ActivityModeContent-BWmb9zCZ.js} +1 -1
- package/dist/public/assets/{DocumentContext-CPNCcJL_.js → DocumentContext-9Sn6Kq-o.js} +22 -22
- package/dist/public/assets/{GraphPanel-Ru_nQ2bj.js → GraphPanel-PYMXWVsg.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-Cd4Y_C3_.js → SettingsDialogBody-YOvgrn38.js} +1 -1
- package/dist/public/assets/{SourceEditor-DorrRiI-.js → SourceEditor-D1zhJS8f.js} +1 -1
- package/dist/public/assets/{config-validation-events-VDOuCcdw.js → config-validation-events-BUyp1R_U.js} +1 -1
- package/dist/public/assets/index-BXgWyDFu.css +1 -0
- package/dist/public/assets/index-CEtMQRxi.js +1915 -0
- package/dist/public/assets/{keyboard-shortcuts-Bk8qxCCx.js → keyboard-shortcuts-CNJfczoS.js} +1 -1
- package/dist/public/assets/prop-types-COA7UVY9.js +516 -0
- package/dist/public/assets/{target-navigation-intent-VPniz9mY.js → target-navigation-intent-Cp-mOxXo.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BIeQ5WQY.js → typing-burst-detector-DWg86xJw.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +1 -0
- package/dist/{python3-AUFTPCU6-1PPUn2I7.mjs → python3-AUFTPCU6-DmPp1QHj.mjs} +2 -2
- package/dist/quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs +8 -0
- package/dist/radar-PYXPWWZC-C-wbHKao.mjs +1 -0
- package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +1 -0
- package/dist/reduce-V0ODtSr4.mjs +2 -0
- package/dist/{repair-launch-json-Cc9XVvLw.mjs → repair-launch-json-DCXsAQuF.mjs} +2 -2
- package/dist/{repair-mcp-configs-CMdzPlf3.mjs → repair-mcp-configs-BV1WJulV.mjs} +2 -2
- package/dist/repair-skills-BSA3PyS7.mjs +1 -0
- package/dist/{repair-skills-DeOPRNTk.mjs → repair-skills-uHQb0hCn.mjs} +2 -2
- package/dist/requirementDiagram-MS252O5E-Bneel37I.mjs +85 -0
- package/dist/rev-XOSYPP45-KAKdorsx.mjs +1 -0
- package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +1 -0
- package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +1 -0
- package/dist/rough.cjs-C-63phNL.mjs +2 -0
- package/dist/sankeyDiagram-XADWPNL6-4f2f9-uf.mjs +11 -0
- package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +1 -0
- package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +1 -0
- package/dist/sequenceDiagram-FGHM5R23-B1K4VtLp.mjs +158 -0
- package/dist/{server-lock-BpjJj3OD-dbH8FP82.mjs → server-lock-BpjJj3OD-CUhVvie4.mjs} +58 -58
- package/dist/server-lock-CyhBidkz-D41BTXw5.mjs +1 -0
- package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +1 -0
- package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +1 -0
- package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +1 -0
- package/dist/split-SITCSYCZ-Q5NIWguo.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-B4_LAdBq.mjs +1 -0
- package/dist/src-BkCVz_TJ.mjs +2 -0
- package/dist/{src-C_Q7AFoS.mjs → src-DnynaviS.mjs} +3 -3
- package/dist/start-DYkSDg3x.mjs +1 -0
- package/dist/{start-Dl_YsC2w.mjs → start-NIyRsRSX.mjs} +2 -2
- package/dist/stat-BT5A227F-CYFqsI8W.mjs +1 -0
- package/dist/stateDiagram-FHFEXIEX-BREbMXiC.mjs +2 -0
- package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +2 -0
- package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +1 -0
- package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +1 -0
- package/dist/tail-S5ULNTJU-BOBd42y5.mjs +1 -0
- package/dist/tar-ANUBEFJY-GYQ0YvKO.mjs +1 -0
- package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +1 -0
- package/dist/time-DEUO3QV2-CxVP9vXG.mjs +1 -0
- package/dist/timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs +121 -0
- package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +1 -0
- package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +1 -0
- package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +1 -0
- package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +1 -0
- package/dist/treeView-SZITEDCU-DXyZ3zQc.mjs +1 -0
- package/dist/treemap-W4RFUUIX-CZRYHpYU.mjs +1 -0
- package/dist/true-WHJNXCHG-CJH22fVg.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +1 -0
- package/dist/uniq-SUNANL47-MRCnRrGo.mjs +1 -0
- package/dist/vennDiagram-DHZGUBPP-Bk-INjRY.mjs +35 -0
- package/dist/wardley-RL74JXVD-UKzwcBOa.mjs +1 -0
- package/dist/wardleyDiagram-NUSXRM2D-DOD6wQla.mjs +21 -0
- package/dist/wc-TQB3VNOX-JPk1lni-.mjs +1 -0
- package/dist/which-XZHEH76L-Cl63MOrV.mjs +1 -0
- package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +1 -0
- package/dist/wrapper-BZO_sIci.mjs +7 -0
- package/dist/{write-project-skill-D_1mDT-1.mjs → write-project-skill-DnuutHfZ.mjs} +2 -2
- package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +1 -0
- package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +1 -0
- package/dist/xychartDiagram-5P7HB3ND-B4AGYFQs.mjs +8 -0
- package/dist/yazl-CQSNnbvt.mjs +1 -0
- package/dist/{yazl-CB0sfSbo.mjs → yazl-Docqgl6q.mjs} +2 -2
- package/dist/yq-MJMAR36V-_D_zdU3z.mjs +1 -0
- package/package.json +1 -1
- package/scripts/aggregate-tolerance-class-fires.ts +19 -10
- package/dist/alias-JE7RI5QX-oTDRHt3W.mjs +0 -1
- package/dist/awk2-POPGKRAI-BZ_7e8H1.mjs +0 -1
- package/dist/base64-4YMZCVJ5-BhIrz6He.mjs +0 -1
- package/dist/basename-AA2KJYZQ-C5R0pcfV.mjs +0 -1
- package/dist/bash-IJWYRKFO-DywpGlyx.mjs +0 -1
- package/dist/build-CZpdADQB.mjs +0 -1
- package/dist/cat-RDUMLXKC-BNwer8pK.mjs +0 -1
- package/dist/chmod-SYMGL4JA-BN-B1xmG.mjs +0 -1
- package/dist/clear-5CZ5X4YR-B6kVcfOw.mjs +0 -1
- package/dist/colors-gw_5YWUu.mjs +0 -1
- package/dist/column-WLPMMSTS-CEev_e2R.mjs +0 -1
- package/dist/comm-5SLSESQG-BXsiD7To.mjs +0 -1
- package/dist/constants-DAbcLLp_.mjs +0 -2
- package/dist/cp-XOYR4ABJ-Dy5aHk72.mjs +0 -1
- package/dist/cut-OPC3VAGB-GohHdbJ4.mjs +0 -1
- package/dist/date-DD7FVA2V-RM_vdvCh.mjs +0 -1
- package/dist/diff-HJF2MPDN-DTuHZGVW.mjs +0 -1
- package/dist/dirname-LEMTZZFS-C6aDcxLl.mjs +0 -1
- package/dist/dist-DiX0-B7g.mjs +0 -1
- package/dist/dist-bundle-XlngXUNr.mjs +0 -1
- package/dist/du-WO2ENHXQ-Da1HuQkH.mjs +0 -1
- package/dist/echo-O45JWWI2-Cr9jHdYm.mjs +0 -1
- package/dist/env-5EPCWSXR-6RSqo9Bn.mjs +0 -1
- package/dist/expand-DTNXU4LQ-D4dbwBrD.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-Bv6RV19y.mjs +0 -1
- package/dist/expr-5T3UU5KE-D7ekHiOy.mjs +0 -1
- package/dist/file-ZIGAJ4YS-DzKHvjCj.mjs +0 -1
- package/dist/find-TPUOAIUQ-DuBwOGWI.mjs +0 -1
- package/dist/flag-coverage-QT4N2Z44-DmAL_7h5.mjs +0 -2
- package/dist/fold-LDSORVYE-BQyKAmCr.mjs +0 -1
- package/dist/getMachineId-bsd-CzP05Ffc.mjs +0 -2
- package/dist/getMachineId-bsd-D0erQsHH.mjs +0 -2
- package/dist/getMachineId-bsd-Dp2q7huT.mjs +0 -2
- package/dist/getMachineId-linux-BRPjBsHg.mjs +0 -2
- package/dist/getMachineId-linux-CQZJR55S.mjs +0 -2
- package/dist/getMachineId-linux-DcN5tfI_.mjs +0 -2
- package/dist/getMachineId-unsupported-BokXsjFr.mjs +0 -2
- package/dist/getMachineId-unsupported-DZAxq-oW.mjs +0 -2
- package/dist/getMachineId-unsupported-GPbM_evk.mjs +0 -2
- package/dist/git-handle-BaZ9y3AC-B05Md-6F.mjs +0 -1
- package/dist/grep-3AIAIJVR-DhLMPK9o.mjs +0 -1
- package/dist/gzip-AQXSGOVS-kzAFjO_Y.mjs +0 -1
- package/dist/head-HT2B6D2J-BR-dv_ar.mjs +0 -1
- package/dist/help-VVWX7SA5-jdvqGfQj.mjs +0 -1
- package/dist/history-J4QRNGRO-jb5B-tWQ.mjs +0 -1
- package/dist/hostname-BK6HG2DE-CVVAGatl.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-B5yiu2Qr.mjs +0 -1
- package/dist/init-D1UzS4tm.mjs +0 -1
- package/dist/join-GG2LDHE5-BLgXAHZ_.mjs +0 -1
- package/dist/jq-ODXZBPLY-JpgGenzN.mjs +0 -1
- package/dist/ln-4TRFBYAT-C7xn5Rqr.mjs +0 -1
- package/dist/loader-D3p97Pi7.mjs +0 -1
- package/dist/ls-KSXFZCWH-BFVVAoBi.mjs +0 -1
- package/dist/md5sum-INMIK4DX-0GZIz1Ci.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-DTyG__G-.mjs +0 -1
- package/dist/mv-Z6MORUFL-CmjBk72Q.mjs +0 -1
- package/dist/nl-U5YJDM32-5XaxKjVN.mjs +0 -1
- package/dist/od-VJEF2UR5-BYZOEzSd.mjs +0 -1
- package/dist/paste-7N6AFSDS-BnDgUhuq.mjs +0 -1
- package/dist/preview-BpHHevx8.mjs +0 -1
- package/dist/printf-CX64KX2P-0abCeF-D.mjs +0 -1
- package/dist/public/assets/index-C-eV_aX_.css +0 -1
- package/dist/public/assets/index-CKQZFT_Z.js +0 -1915
- package/dist/public/assets/prop-types-CiBqwiqK.js +0 -516
- package/dist/pwd-D4OZ7N27-AYS4A9o1.mjs +0 -1
- package/dist/readlink-MI4GCHJF-BvzND_DT.mjs +0 -1
- package/dist/repair-skills-DoHj-jkH.mjs +0 -1
- package/dist/rev-XOSYPP45-Bqdhxuez.mjs +0 -1
- package/dist/rg-FOQSCCX3-CrVzsut-.mjs +0 -1
- package/dist/rm-RTZG23RL-DVQCHLUL.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-DrUUkxCF.mjs +0 -1
- package/dist/sed-VFTTATXJ-QHemmbCP.mjs +0 -1
- package/dist/seq-RN5ZUASB-BBSGpJq5.mjs +0 -1
- package/dist/server-lock-CyhBidkz-BRXgOcGh.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-D6-7B21n.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-BYVtIJOS.mjs +0 -1
- package/dist/sleep-VZFPZFWA-C-x_VGtG.mjs +0 -1
- package/dist/sort-DCNRDA7U-BTlvuG7X.mjs +0 -1
- package/dist/split-SITCSYCZ-BmGbaiMe.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-Cjvsy5Oo.mjs +0 -1
- package/dist/start-C8peDw-k.mjs +0 -1
- package/dist/stat-BT5A227F-BjNsVAze.mjs +0 -1
- package/dist/strings-7PLOGTPD-B6_kjNM-.mjs +0 -1
- package/dist/tac-SJGXQ4T2-BEQ9sZmi.mjs +0 -1
- package/dist/tail-S5ULNTJU-DSe2aEO8.mjs +0 -1
- package/dist/tar-ANUBEFJY-HbwMpE1g.mjs +0 -1
- package/dist/tee-O7VXZDCO-BD6QXg_b.mjs +0 -1
- package/dist/time-DEUO3QV2-CRnH51wk.mjs +0 -1
- package/dist/timeout-VRKMCG72-D_oS0IDg.mjs +0 -1
- package/dist/touch-DX2IJOQ4-4yR1M9Nd.mjs +0 -1
- package/dist/tr-2HXZRDSW-Ca-NmLk7.mjs +0 -1
- package/dist/tree-LYXBS7DC-CR3kfmh6.mjs +0 -1
- package/dist/true-WHJNXCHG-x85l8vsW.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-D-1EwjbB.mjs +0 -1
- package/dist/uniq-SUNANL47-DtBj3lmA.mjs +0 -1
- package/dist/wc-TQB3VNOX-Qw6WjSl1.mjs +0 -1
- package/dist/which-XZHEH76L-B-Xo178d.mjs +0 -1
- package/dist/whoami-DGKU3D2X-_Mgzu6ty.mjs +0 -1
- package/dist/xan-BXDXYEIB-qijhj_cA.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-BfZejrY6.mjs +0 -1
- package/dist/xargs-I6EZUCYF-aS184J1w.mjs +0 -1
- package/dist/yazl-Dqnhfxk7.mjs +0 -1
- package/dist/yq-MJMAR36V-Cgql6fKu.mjs +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import{a as e,i as t,r as n,s as r,t as i}from"./chunk-C94x7I9S.mjs";import{a,c as o,d as s,n as c,s as l,t as u}from"./reduce-V0ODtSr4.mjs";import{t as d}from"./isEmpty-CaTO-fHo.mjs";import{a as f,n as p,t as m}from"./flatten-CX5MwHL4.mjs";function h(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function g(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function _(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function v(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function y(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var b=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return h(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function x(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function S(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function C(e){return x(e)&&typeof e.fullText==`string`}var w=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return D})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=T(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?D:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return D})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(E(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return D})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(E(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return D})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?D:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return D})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function T(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function E(e){return!!e&&typeof e[Symbol.iterator]==`function`}const ee=new w(()=>void 0,()=>D),D=Object.freeze({done:!0,value:void 0});function O(...e){if(e.length===1){let t=e[0];if(t instanceof w)return t;if(E(t))return new w(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new w(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:D)}return e.length>1?new w(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];E(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return D}):ee}var k=class extends w{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return D})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},te;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(te||={});function ne(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{h(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&ne(r,t))}):h(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&ne(r,t)))}function re(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function A(e){let t=ie(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function ie(e){for(;e.$container;)e=e.$container;return e}function ae(e){return g(e)?e.ref?[e.ref]:[]:_(e)?e.items.map(e=>e.ref):[]}function j(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(h(i)){if(t.keyIndex++,oe(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(h(e)&&oe(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return D})}function M(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new k(e,e=>j(e,t))}function N(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!oe(e,t.range)?new k(e,()=>[]):new k(e,e=>j(e,t),{includeRoot:!0})}function oe(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Ht(n,t):!1}function P(e){return new w(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(g(r)||_(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(g(a)||_(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return D})}function se(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=ce(e.defaultValue))}function ce(e){return Array.isArray(e)?[...e.map(ce)]:e}const F={$type:`AbstractElement`,cardinality:`cardinality`};function le(e){return R.isInstance(e,F.$type)}const ue={$type:`AbstractParserRule`};function de(e){return R.isInstance(e,ue.$type)}const fe={$type:`AbstractRule`},I={$type:`AbstractType`},pe={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function me(e){return R.isInstance(e,pe.$type)}const he={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function ge(e){return R.isInstance(e,he.$type)}const _e={$type:`ArrayLiteral`,elements:`elements`},ve={$type:`ArrayType`,elementType:`elementType`},ye={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function be(e){return R.isInstance(e,ye.$type)}const xe={$type:`BooleanLiteral`,true:`true`};function Se(e){return R.isInstance(e,xe.$type)}const Ce={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function we(e){return R.isInstance(e,Ce.$type)}const Te={$type:`Condition`},Ee={$type:`Conjunction`,left:`left`,right:`right`};function De(e){return R.isInstance(e,Ee.$type)}const Oe={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function ke(e){return R.isInstance(e,Oe.$type)}const Ae={$type:`Disjunction`,left:`left`,right:`right`};function je(e){return R.isInstance(e,Ae.$type)}const Me={$type:`EndOfFile`,cardinality:`cardinality`};function Ne(e){return R.isInstance(e,Me.$type)}const Pe={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},Fe={$type:`GrammarImport`,path:`path`},Ie={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function Le(e){return R.isInstance(e,Ie.$type)}const Re={$type:`InferredType`,name:`name`};function ze(e){return R.isInstance(e,Re.$type)}const Be={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Ve(e){return R.isInstance(e,Be.$type)}const He={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Ue={$type:`InfixRuleOperators`,precedences:`precedences`},We={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Ge(e){return R.isInstance(e,We.$type)}const Ke={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function L(e){return R.isInstance(e,Ke.$type)}const qe={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Je={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ye(e){return R.isInstance(e,Je.$type)}const Xe={$type:`Negation`,value:`value`};function Ze(e){return R.isInstance(e,Xe.$type)}const Qe={$type:`NumberLiteral`,value:`value`},$e={$type:`Parameter`,name:`name`},et={$type:`ParameterReference`,parameter:`parameter`};function tt(e){return R.isInstance(e,et.$type)}const nt={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function rt(e){return R.isInstance(e,nt.$type)}const it={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},at={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function ot(e){return R.isInstance(e,at.$type)}const st={$type:`ReturnType`,name:`name`};function ct(e){return R.isInstance(e,st.$type)}const lt={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function ut(e){return R.isInstance(e,lt.$type)}const dt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function ft(e){return R.isInstance(e,dt.$type)}const pt={$type:`StringLiteral`,value:`value`},mt={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function ht(e){return R.isInstance(e,mt.$type)}const gt={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},_t={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function vt(e){return R.isInstance(e,_t.$type)}const yt={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function bt(e){return R.isInstance(e,yt.$type)}const xt={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function St(e){return R.isInstance(e,xt.$type)}const Ct={$type:`Type`,name:`name`,type:`type`};function wt(e){return R.isInstance(e,Ct.$type)}const Tt={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},Et={$type:`TypeDefinition`},Dt={$type:`UnionType`,types:`types`},Ot={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function kt(e){return R.isInstance(e,Ot.$type)}const At={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function jt(e){return R.isInstance(e,At.$type)}const Mt={$type:`ValueLiteral`},Nt={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Pt(e){return R.isInstance(e,Nt.$type)}var Ft=class extends b{constructor(){super(...arguments),this.types={AbstractElement:{name:F.$type,properties:{cardinality:{name:F.cardinality}},superTypes:[]},AbstractParserRule:{name:ue.$type,properties:{},superTypes:[fe.$type,I.$type]},AbstractRule:{name:fe.$type,properties:{},superTypes:[]},AbstractType:{name:I.$type,properties:{},superTypes:[]},Action:{name:pe.$type,properties:{cardinality:{name:pe.cardinality},feature:{name:pe.feature},inferredType:{name:pe.inferredType},operator:{name:pe.operator},type:{name:pe.type,referenceType:I.$type}},superTypes:[F.$type]},Alternatives:{name:he.$type,properties:{cardinality:{name:he.cardinality},elements:{name:he.elements,defaultValue:[]}},superTypes:[F.$type]},ArrayLiteral:{name:_e.$type,properties:{elements:{name:_e.elements,defaultValue:[]}},superTypes:[Mt.$type]},ArrayType:{name:ve.$type,properties:{elementType:{name:ve.elementType}},superTypes:[Et.$type]},Assignment:{name:ye.$type,properties:{cardinality:{name:ye.cardinality},feature:{name:ye.feature},operator:{name:ye.operator},predicate:{name:ye.predicate},terminal:{name:ye.terminal}},superTypes:[F.$type]},BooleanLiteral:{name:xe.$type,properties:{true:{name:xe.true,defaultValue:!1}},superTypes:[Te.$type,Mt.$type]},CharacterRange:{name:Ce.$type,properties:{cardinality:{name:Ce.cardinality},left:{name:Ce.left},lookahead:{name:Ce.lookahead},parenthesized:{name:Ce.parenthesized,defaultValue:!1},right:{name:Ce.right}},superTypes:[gt.$type]},Condition:{name:Te.$type,properties:{},superTypes:[]},Conjunction:{name:Ee.$type,properties:{left:{name:Ee.left},right:{name:Ee.right}},superTypes:[Te.$type]},CrossReference:{name:Oe.$type,properties:{cardinality:{name:Oe.cardinality},deprecatedSyntax:{name:Oe.deprecatedSyntax,defaultValue:!1},isMulti:{name:Oe.isMulti,defaultValue:!1},terminal:{name:Oe.terminal},type:{name:Oe.type,referenceType:I.$type}},superTypes:[F.$type]},Disjunction:{name:Ae.$type,properties:{left:{name:Ae.left},right:{name:Ae.right}},superTypes:[Te.$type]},EndOfFile:{name:Me.$type,properties:{cardinality:{name:Me.cardinality}},superTypes:[F.$type]},Grammar:{name:Pe.$type,properties:{imports:{name:Pe.imports,defaultValue:[]},interfaces:{name:Pe.interfaces,defaultValue:[]},isDeclared:{name:Pe.isDeclared,defaultValue:!1},name:{name:Pe.name},rules:{name:Pe.rules,defaultValue:[]},types:{name:Pe.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Fe.$type,properties:{path:{name:Fe.path}},superTypes:[]},Group:{name:Ie.$type,properties:{cardinality:{name:Ie.cardinality},elements:{name:Ie.elements,defaultValue:[]},guardCondition:{name:Ie.guardCondition},predicate:{name:Ie.predicate}},superTypes:[F.$type]},InferredType:{name:Re.$type,properties:{name:{name:Re.name}},superTypes:[I.$type]},InfixRule:{name:Be.$type,properties:{call:{name:Be.call},dataType:{name:Be.dataType},inferredType:{name:Be.inferredType},name:{name:Be.name},operators:{name:Be.operators},parameters:{name:Be.parameters,defaultValue:[]},returnType:{name:Be.returnType,referenceType:I.$type}},superTypes:[ue.$type]},InfixRuleOperatorList:{name:He.$type,properties:{associativity:{name:He.associativity},operators:{name:He.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ue.$type,properties:{precedences:{name:Ue.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:We.$type,properties:{attributes:{name:We.attributes,defaultValue:[]},name:{name:We.name},superTypes:{name:We.superTypes,defaultValue:[],referenceType:I.$type}},superTypes:[I.$type]},Keyword:{name:Ke.$type,properties:{cardinality:{name:Ke.cardinality},predicate:{name:Ke.predicate},value:{name:Ke.value}},superTypes:[F.$type]},NamedArgument:{name:qe.$type,properties:{calledByName:{name:qe.calledByName,defaultValue:!1},parameter:{name:qe.parameter,referenceType:$e.$type},value:{name:qe.value}},superTypes:[]},NegatedToken:{name:Je.$type,properties:{cardinality:{name:Je.cardinality},lookahead:{name:Je.lookahead},parenthesized:{name:Je.parenthesized,defaultValue:!1},terminal:{name:Je.terminal}},superTypes:[gt.$type]},Negation:{name:Xe.$type,properties:{value:{name:Xe.value}},superTypes:[Te.$type]},NumberLiteral:{name:Qe.$type,properties:{value:{name:Qe.value}},superTypes:[Mt.$type]},Parameter:{name:$e.$type,properties:{name:{name:$e.name}},superTypes:[]},ParameterReference:{name:et.$type,properties:{parameter:{name:et.parameter,referenceType:$e.$type}},superTypes:[Te.$type]},ParserRule:{name:nt.$type,properties:{dataType:{name:nt.dataType},definition:{name:nt.definition},entry:{name:nt.entry,defaultValue:!1},fragment:{name:nt.fragment,defaultValue:!1},inferredType:{name:nt.inferredType},name:{name:nt.name},parameters:{name:nt.parameters,defaultValue:[]},returnType:{name:nt.returnType,referenceType:I.$type}},superTypes:[ue.$type]},ReferenceType:{name:it.$type,properties:{isMulti:{name:it.isMulti,defaultValue:!1},referenceType:{name:it.referenceType}},superTypes:[Et.$type]},RegexToken:{name:at.$type,properties:{cardinality:{name:at.cardinality},lookahead:{name:at.lookahead},parenthesized:{name:at.parenthesized,defaultValue:!1},regex:{name:at.regex}},superTypes:[gt.$type]},ReturnType:{name:st.$type,properties:{name:{name:st.name}},superTypes:[]},RuleCall:{name:lt.$type,properties:{arguments:{name:lt.arguments,defaultValue:[]},cardinality:{name:lt.cardinality},predicate:{name:lt.predicate},rule:{name:lt.rule,referenceType:fe.$type}},superTypes:[F.$type]},SimpleType:{name:dt.$type,properties:{primitiveType:{name:dt.primitiveType},stringType:{name:dt.stringType},typeRef:{name:dt.typeRef,referenceType:I.$type}},superTypes:[Et.$type]},StringLiteral:{name:pt.$type,properties:{value:{name:pt.value}},superTypes:[Mt.$type]},TerminalAlternatives:{name:mt.$type,properties:{cardinality:{name:mt.cardinality},elements:{name:mt.elements,defaultValue:[]},lookahead:{name:mt.lookahead},parenthesized:{name:mt.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[F.$type]},TerminalGroup:{name:_t.$type,properties:{cardinality:{name:_t.cardinality},elements:{name:_t.elements,defaultValue:[]},lookahead:{name:_t.lookahead},parenthesized:{name:_t.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:yt.$type,properties:{definition:{name:yt.definition},fragment:{name:yt.fragment,defaultValue:!1},hidden:{name:yt.hidden,defaultValue:!1},name:{name:yt.name},type:{name:yt.type}},superTypes:[fe.$type]},TerminalRuleCall:{name:xt.$type,properties:{cardinality:{name:xt.cardinality},lookahead:{name:xt.lookahead},parenthesized:{name:xt.parenthesized,defaultValue:!1},rule:{name:xt.rule,referenceType:yt.$type}},superTypes:[gt.$type]},Type:{name:Ct.$type,properties:{name:{name:Ct.name},type:{name:Ct.type}},superTypes:[I.$type]},TypeAttribute:{name:Tt.$type,properties:{defaultValue:{name:Tt.defaultValue},isOptional:{name:Tt.isOptional,defaultValue:!1},name:{name:Tt.name},type:{name:Tt.type}},superTypes:[]},TypeDefinition:{name:Et.$type,properties:{},superTypes:[]},UnionType:{name:Dt.$type,properties:{types:{name:Dt.types,defaultValue:[]}},superTypes:[Et.$type]},UnorderedGroup:{name:Ot.$type,properties:{cardinality:{name:Ot.cardinality},elements:{name:Ot.elements,defaultValue:[]}},superTypes:[F.$type]},UntilToken:{name:At.$type,properties:{cardinality:{name:At.cardinality},lookahead:{name:At.lookahead},parenthesized:{name:At.parenthesized,defaultValue:!1},terminal:{name:At.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:Mt.$type,properties:{},superTypes:[]},Wildcard:{name:Nt.$type,properties:{cardinality:{name:Nt.cardinality},lookahead:{name:Nt.lookahead},parenthesized:{name:Nt.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}};const R=new Ft;function It(e){return new k(e,e=>x(e)?e.content:[],{includeRoot:!0})}function Lt(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Rt(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function zt(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Bt;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Bt||={});function Vt(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Bt.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Bt.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Bt.Inside:n?Bt.OverlapBack:r?Bt.OverlapFront:Bt.Outside}function Ht(e,t){return Vt(e,t)>Bt.After}const Ut=/^[\w\p{L}]$/u;function Wt(e,t){if(e){let n=Kt(e,!0);if(n&&Gt(n,t))return n;if(C(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Gt(n,t))return n}}}}function Gt(e,t){return S(e)&&t.includes(e.tokenType.name)}function Kt(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var qt=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Jt(e,t=`Error: Got unexpected value.`){throw Error(t)}function z(e){return e.charCodeAt(0)}function Yt(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Xt(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Zt(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function Qt(){throw Error(`Internal Error - Should never get here!`)}function $t(e){return e.type===`Character`}const en=[];for(let e=z(`0`);e<=z(`9`);e++)en.push(e);const tn=[z(`_`)].concat(en);for(let e=z(`a`);e<=z(`z`);e++)tn.push(e);for(let e=z(`A`);e<=z(`Z`);e++)tn.push(e);const nn=[z(` `),z(`\f`),z(`
|
|
2
|
+
`),z(`\r`),z(` `),z(`\v`),z(` `),z(`\xA0`),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(` `),z(`\u2028`),z(`\u2029`),z(` `),z(` `),z(` `),z(``)],rn=/[0-9a-fA-F]/,an=/[0-9]/,on=/[1-9]/;var sn=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:Xt(n,`global`);break;case`i`:Xt(n,`ignoreCase`);break;case`m`:Xt(n,`multiLine`);break;case`u`:Xt(n,`unicode`);break;case`y`:Xt(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}Zt(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return Qt()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;Zt(t);break}if(!(e===!0&&t===void 0)&&Zt(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Zt(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Qt()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[z(`
|
|
3
|
+
`),z(`\r`),z(`\u2028`),z(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=en;break;case`D`:e=en,t=!0;break;case`s`:e=nn;break;case`S`:e=nn,t=!0;break;case`w`:e=tn;break;case`W`:e=tn,t=!0;break}return Zt(e)?{type:`Set`,value:e,complement:t}:Qt()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=z(`\f`);break;case`n`:e=z(`
|
|
4
|
+
`);break;case`r`:e=z(`\r`);break;case`t`:e=z(` `);break;case`v`:e=z(`\v`);break}return Zt(e)?{type:`Character`,value:e}:Qt()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:z(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:z(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
5
|
+
`:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:z(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,$t(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,$t(n)){if(n.value<t.value)throw Error(`Range out of order in character class`);e.push({from:t.value,to:n.value})}else Yt(t.value,e),e.push(z(`-`)),Yt(n.value,e)}else Yt(t.value,e)}return this.consumeChar(`]`),{type:`Set`,complement:t,value:e}}classAtom(){switch(this.peekChar()){case`]`:case`
|
|
6
|
+
`:case`\r`:case`\u2028`:case`\u2029`:throw Error(`TBD`);case`\\`:return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`b`:return this.consumeChar(`b`),{type:`Character`,value:z(`\b`)};case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar(`(`),this.peekChar(0)){case`?`:this.consumeChar(`?`),this.consumeChar(`:`),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(`)`);let n={type:`Group`,capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(on.test(e)===!1)throw Error(`Expecting a positive integer`);for(;an.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(an.test(e)===!1)throw Error(`Expecting an integer`);for(;an.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
|
|
7
|
+
`:case`\r`:case`\u2028`:case`\u2029`:case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:throw Error(`TBD`);default:return{type:`Character`,value:z(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}}isRangeDash(){return this.peekChar()===`-`&&this.isClassAtom(1)}isDigit(){return an.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case`]`:case`
|
|
8
|
+
`:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case`^`:case`$`:return!0;case`\\`:switch(this.peekChar(1)){case`b`:case`B`:return!0;default:return!1}case`(`:return this.peekChar(1)===`?`&&(this.peekChar(2)===`=`||this.peekChar(2)===`!`||this.peekChar(2)===`<`&&(this.peekChar(3)===`=`||this.peekChar(3)===`!`));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`
|
|
9
|
+
`:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}parseHexDigits(e){let t=``;for(let n=0;n<e;n++){let e=this.popChar();if(rn.test(e)===!1)throw Error(`Expecting a HexDecimal digits`);t+=e}return{type:`Character`,value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error(`Expected: '`+e+`' but found: '`+this.input[this.idx]+`' at offset: `+this.idx);if(this.idx>=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},cn=class{visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}};const ln=/\r?\n/gm,un=new sn,dn=new class extends cn{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===`
|
|
10
|
+
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=hn(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!`
|
|
11
|
+
`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}};function fn(e){try{return typeof e==`string`&&(e=new RegExp(e)),e=e.toString(),dn.reset(e),dn.visit(un.pattern(e)),dn.multiline}catch{return!1}}const pn=`\f
|
|
12
|
+
\r \v \xA0 \u2028\u2029 `.split(``);function mn(e){let t=typeof e==`string`?new RegExp(e):e;return pn.some(e=>t.test(e))}function hn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function gn(e,t){let n=_n(e),r=t.match(n);return!!r&&r[0].length>0}function _n(e){typeof e==`string`&&(e=new RegExp(e));let t=e,n=e.source,r=0;function i(){let e=``,a;function o(t){e+=n.substr(r,t),r+=t}function s(t){e+=`(?:`+n.substr(r,t)+`|$)`,r+=t}for(;r<n.length;)switch(n[r]){case`\\`:switch(n[r+1]){case`c`:s(3);break;case`x`:s(4);break;case`u`:t.unicode?n[r+2]===`{`?s(n.indexOf(`}`,r)-r+1):s(6):s(2);break;case`p`:case`P`:t.unicode?s(n.indexOf(`}`,r)-r+1):s(2);break;case`k`:s(n.indexOf(`>`,r)-r+1);break;default:s(2);break}break;case`[`:a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],s(a[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:o(1);break;case`{`:a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?o(a[0].length):s(1);break;case`(`:if(n[r+1]===`?`)switch(n[r+2]){case`:`:e+=`(?:`,r+=3,e+=i()+`|$)`;break;case`=`:e+=`(?=`,r+=3,e+=i()+`)`;break;case`!`:a=r,r+=3,i(),e+=n.substr(a,r-a);break;case`<`:switch(n[r+3]){case`=`:case`!`:a=r,r+=4,i(),e+=n.substr(a,r-a);break;default:o(n.indexOf(`>`,r)-r+1),e+=i()+`|$)`;break}break}else o(1),e+=i()+`|$)`;break;case`)`:return++r,e;default:s(1);break}return e}return new RegExp(i(),e.flags)}function vn(e){return e.rules.find(e=>rt(e)&&e.entry)}function yn(e){return e.rules.filter(e=>bt(e)&&e.hidden)}function bn(e,t){let n=new Set,r=vn(e);if(!r)return new Set(e.rules);let i=[r].concat(yn(e));for(let e of i)xn(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||bt(t)&&t.hidden)&&a.add(t);return a}function xn(e,t,n){t.add(e.name),M(e).forEach(e=>{if(ut(e)||n&&St(e)){let r=e.rule.ref;r&&!t.has(r.name)&&xn(r,t,n)}})}function Sn(e){if(e.terminal)return e.terminal;if(e.type.ref)return An(e.type.ref)?.terminal}function Cn(e){return e.hidden&&!mn(Rn(e))}function wn(e,t){return!e||!t?[]:En(e,t,e.astNode,!0)}function Tn(e,t,n){if(!e||!t)return;let r=En(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function En(e,t,n,r){if(!r){let n=re(e.grammarSource,be);if(n&&n.feature===t)return[e]}return x(e)&&e.astNode===n?e.content.flatMap(e=>En(e,t,n,!1)):[]}function Dn(e,t,n){if(!e)return;let r=On(e,t,e?.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function On(e,t,n){if(e.astNode!==n)return[];if(L(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=It(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?L(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}function kn(e){let t=e.astNode;for(;t===e.container?.astNode;){let t=re(e.grammarSource,be);if(t)return t;e=e.container}}function An(e){let t=e;return ze(t)&&(me(t.$container)?t=t.$container.$container:de(t.$container)?t=t.$container:Jt(t.$container)),jn(e,t,new Map)}function jn(e,t,n){function r(t,r){let i;return re(t,be)||(i=jn(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(let i of M(t))if(be(i)&&i.feature.toLowerCase()===`name`)return n.set(e,i),i;else if(ut(i)&&rt(i.rule.ref))return r(i,i.rule.ref);else if(ft(i)&&i.typeRef?.ref)return r(i,i.typeRef.ref)}function Mn(e){return Nn(e,new Set)}function Nn(e,t){if(t.has(e))return!0;t.add(e);for(let n of M(e))if(ut(n)){if(!n.rule.ref||rt(n.rule.ref)&&!Nn(n.rule.ref,t)||Ve(n.rule.ref))return!1}else if(be(n))return!1;else if(me(n))return!1;return!!e.definition}function Pn(e){if(!bt(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function Fn(e){if(de(e))return rt(e)&&Mn(e)?e.name:Pn(e)??e.name;if(Ge(e)||wt(e)||ct(e))return e.name;if(me(e)){let t=In(e);if(t)return t}else if(ze(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}function In(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Fn(e.type.ref)}function Ln(e){return bt(e)?e.type?.name??`string`:Pn(e)??e.name}function Rn(e){let t={s:!1,i:!1,u:!1},n=Bn(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}const zn=`[\\s\\S]`;function Bn(e,t){if(ht(e))return Vn(e);if(vt(e))return Hn(e);if(we(e))return Gn(e);if(St(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return qn(Bn(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else if(Ye(e))return Wn(e);else if(jt(e))return Un(e);else if(ot(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),qn(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else if(Pt(e))return qn(zn,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});else throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function Vn(e){return qn(e.elements.map(e=>Bn(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Hn(e){return qn(e.elements.map(e=>Bn(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Un(e){return qn(`${zn}*?${Bn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Wn(e){return qn(`(?!${Bn(e.terminal)})${zn}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function Gn(e){return e.right?qn(`[${Kn(e.left)}-${Kn(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):qn(Kn(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Kn(e){return hn(e.value)}function qn(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function Jn(e){let t=[],n=e.Grammar;for(let e of n.rules)bt(e)&&Cn(e)&&fn(Rn(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:Ut}}function Yn(e){console&&console.error&&console.error(`Error: ${e}`)}function Xn(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function Zn(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function Qn(e){function t(){}t.prototype=e;let n=new t;function r(){return typeof n.bar}return r(),r(),e}function $n(e){return er(e)?e.LABEL:e.name}function er(e){return typeof e.LABEL==`string`&&e.LABEL!==``}var tr=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}},nr=class extends tr{constructor(e){super([]),this.idx=1,Object.assign(this,dr(e))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},rr=class extends tr{constructor(e){super(e.definition),this.orgText=``,Object.assign(this,dr(e))}},ir=class extends tr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,dr(e))}},B=class extends tr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,dr(e))}},ar=class extends tr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,dr(e))}},or=class extends tr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,dr(e))}},V=class extends tr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,dr(e))}},sr=class extends tr{constructor(e){super(e.definition),this.idx=1,Object.assign(this,dr(e))}},cr=class extends tr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,dr(e))}},H=class{constructor(e){this.idx=1,Object.assign(this,dr(e))}accept(e){e.visit(this)}};function lr(e){return e.map(ur)}function ur(e){function t(e){return e.map(ur)}if(e instanceof nr){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return typeof e.label==`string`&&(t.label=e.label),t}else if(e instanceof ir)return{type:`Alternative`,definition:t(e.definition)};else if(e instanceof B)return{type:`Option`,idx:e.idx,definition:t(e.definition)};else if(e instanceof ar)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};else if(e instanceof or)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:ur(new H({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof sr)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:ur(new H({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof V)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};else if(e instanceof cr)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};else if(e instanceof H){let t={type:`Terminal`,name:e.terminalType.name,label:$n(e.terminalType),idx:e.idx};typeof e.label==`string`&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else if(e instanceof rr)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error(`non exhaustive match`)}function dr(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}var fr=class{visit(e){let t=e;switch(t.constructor){case nr:return this.visitNonTerminal(t);case ir:return this.visitAlternative(t);case B:return this.visitOption(t);case ar:return this.visitRepetitionMandatory(t);case or:return this.visitRepetitionMandatoryWithSeparator(t);case sr:return this.visitRepetitionWithSeparator(t);case V:return this.visitRepetition(t);case cr:return this.visitAlternation(t);case H:return this.visitTerminal(t);case rr:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function pr(e){return e instanceof ir||e instanceof B||e instanceof V||e instanceof ar||e instanceof or||e instanceof sr||e instanceof H||e instanceof rr}function mr(e,t=[]){return e instanceof B||e instanceof V||e instanceof sr?!0:e instanceof cr?e.definition.some(e=>mr(e,t)):e instanceof nr&&t.includes(e)?!1:e instanceof tr?(e instanceof nr&&t.push(e),e.definition.every(e=>mr(e,t))):!1}function hr(e){return e instanceof cr}function gr(e){if(e instanceof nr)return`SUBRULE`;if(e instanceof B)return`OPTION`;if(e instanceof cr)return`OR`;if(e instanceof ar)return`AT_LEAST_ONE`;if(e instanceof or)return`AT_LEAST_ONE_SEP`;if(e instanceof sr)return`MANY_SEP`;if(e instanceof V)return`MANY`;if(e instanceof H)return`CONSUME`;throw Error(`non exhaustive match`)}var _r=class{walk(e,t=[]){e.definition.forEach((n,r)=>{let i=e.definition.slice(r+1);if(n instanceof nr)this.walkProdRef(n,i,t);else if(n instanceof H)this.walkTerminal(n,i,t);else if(n instanceof ir)this.walkFlat(n,i,t);else if(n instanceof B)this.walkOption(n,i,t);else if(n instanceof ar)this.walkAtLeastOne(n,i,t);else if(n instanceof or)this.walkAtLeastOneSep(n,i,t);else if(n instanceof sr)this.walkManySep(n,i,t);else if(n instanceof V)this.walkMany(n,i,t);else if(n instanceof cr)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new B({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=vr(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new B({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=vr(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);e.definition.forEach(e=>{let t=new ir({definition:[e]});this.walk(t,r)})}};function vr(e,t,n){return[new B({definition:[new H({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function yr(e){if(e instanceof nr)return yr(e.referencedRule);if(e instanceof H)return Sr(e);if(pr(e))return br(e);if(hr(e))return xr(e);throw Error(`non exhaustive match`)}function br(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=mr(a),t=t.concat(yr(a)),r+=1,i=n.length>r;return[...new Set(t)]}function xr(e){let t=e.definition.map(e=>yr(e));return[...new Set(t.flat())]}function Sr(e){return[e.terminalType]}const Cr=`_~IN~_`;var wr=class extends _r{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=Er(e.referencedRule,e.idx)+this.topProd.name,i=yr(new ir({definition:t.concat(n)}));this.follows[r]=i}};function Tr(e){let t={};return e.forEach(e=>{let n=new wr(e).startWalking();Object.assign(t,n)}),t}function Er(e,t){return e.name+t+Cr}let Dr={};const Or=new sn;function kr(e){let t=e.toString();if(Dr.hasOwnProperty(t))return Dr[t];{let e=Or.pattern(t);return Dr[t]=e,e}}function Ar(){Dr={}}const jr=`Complement Sets are not supported for first char optimization`,Mr=`Unable to use "first char" lexer optimizations:
|
|
13
|
+
`;function Nr(e,t=!1){try{let t=kr(e);return Pr(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===jr)t&&Xn(`${Mr}\tUnable to optimize: < ${e.toString()} >\n Complement Sets cannot be automatically optimized.
|
|
14
|
+
This will disable the lexer's first char optimizations.
|
|
15
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=`
|
|
16
|
+
This will disable the lexer's first char optimizations.
|
|
17
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Yn(`${Mr}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Pr(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r<e.value.length;r++)Pr(e.value[r],t,n);break;case`Alternative`:let r=e.value;for(let e=0;e<r.length;e++){let i=r[e];switch(i.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`Lookbehind`:case`NegativeLookbehind`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}let a=i;switch(a.type){case`Character`:Fr(a.value,t,n);break;case`Set`:if(a.complement===!0)throw Error(jr);a.value.forEach(e=>{if(typeof e==`number`)Fr(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)Fr(e,t,n);else{for(let e=r.from;e<=r.to&&e<256;e++)Fr(e,t,n);if(r.to>=256){let e=r.from>=256?r.from:256,n=r.to,i=yi(e),a=yi(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:Pr(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&Rr(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return Object.values(t)}function Fr(e,t,n){let r=yi(e);t[r]=r,n===!0&&Ir(e,t)}function Ir(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=yi(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=yi(e.charCodeAt(0));t[n]=n}}}function Lr(e,t){return e.value.find(e=>{if(typeof e==`number`)return t.includes(e);{let n=e;return t.find(e=>n.from<=e&&e<=n.to)!==void 0}})}function Rr(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Array.isArray(e.value)?e.value.every(Rr):Rr(e.value):!1}var zr=class extends cn{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?Lr(e,this.targetCharCodes)===void 0&&(this.found=!0):Lr(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Br(e,t){if(t instanceof RegExp){let n=kr(t),r=new zr(e);return r.visit(n),r.found}else{for(let n of t){let t=n.charCodeAt(0);if(e.includes(t))return!0}return!1}}const Vr=`PATTERN`,Hr=`defaultMode`;function Ur(e,t){t=Object.assign({safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
|
|
18
|
+
`],tracer:(e,t)=>t()},t);let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{bi()});let r;n(`Reject Lexer.NA`,()=>{r=e.filter(e=>e[Vr]!==Ri.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=r.map(e=>{let t=e[Vr];if(t instanceof RegExp){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&![`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`].includes(e[1])?e[1]:si(t)}else if(typeof t==`function`)return i=!0,{exec:t};else if(typeof t==`object`)return i=!0,t;else if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return si(new RegExp(e))}}else throw Error(`non exhaustive match`)})});let o,s,c,l,u;n(`misc mapping`,()=>{o=r.map(e=>e.tokenTypeIdx),s=r.map(e=>{let t=e.GROUP;if(t!==Ri.SKIPPED){if(typeof t==`string`)return t;if(t===void 0)return!1;throw Error(`non exhaustive match`)}}),c=r.map(e=>{let t=e.LONGER_ALT;if(t)return Array.isArray(t)?t.map(e=>r.indexOf(e)):[r.indexOf(t)]}),l=r.map(e=>e.PUSH_MODE),u=r.map(e=>Object.hasOwn(e,`POP_MODE`))});let d;n(`Line Terminator Handling`,()=>{let e=gi(t.lineTerminatorCharacters);d=r.map(e=>!1),t.positionTracking!==`onlyOffset`&&(d=r.map(t=>Object.hasOwn(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:mi(t,e)===!1&&Br(e,t.PATTERN)))});let f,p,m,h;n(`Misc Mapping #2`,()=>{f=r.map(di),p=a.map(fi),m=r.reduce((e,t)=>{let n=t.GROUP;return typeof n==`string`&&n!==Ri.SKIPPED&&(e[n]=[]),e},{}),h=a.map((e,t)=>({pattern:a[t],longerAlt:c[t],canLineTerminator:d[t],isCustom:f[t],short:p[t],group:s[t],push:l[t],pop:u[t],tokenTypeIdx:o[t],tokenType:r[t]}))});let g=!0,_=[];return t.safeMode||n(`First Char Optimization`,()=>{_=r.reduce((e,n,r)=>{if(typeof n.PATTERN==`string`)_i(e,yi(n.PATTERN.charCodeAt(0)),h[r]);else if(Array.isArray(n.START_CHARS_HINT)){let t;n.START_CHARS_HINT.forEach(n=>{let i=yi(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,_i(e,i,h[r]))})}else if(n.PATTERN instanceof RegExp)if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&Yn(`${Mr}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
19
|
+
This will disable the lexer's first char optimizations.
|
|
20
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=Nr(n.PATTERN,t.ensureOptimizations);i.length===0&&(g=!1),i.forEach(t=>{_i(e,t,h[r])})}else t.ensureOptimizations&&Yn(`${Mr}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n This will disable the lexer's first char optimizations.
|
|
21
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e},[])}),{emptyGroups:m,patternIdxToConfig:h,charCodeToPatternIdxToConfig:_,hasCustom:i,canBeOptimized:g}}function Wr(e,t){let n=[],r=Kr(e);n=n.concat(r.errors);let i=qr(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(Gr(a)),n=n.concat(ti(a)),n=n.concat(ni(a,t)),n=n.concat(ri(a)),n}function Gr(e){let t=[],n=e.filter(e=>e[Vr]instanceof RegExp);return t=t.concat(Yr(n)),t=t.concat(Qr(n)),t=t.concat($r(n)),t=t.concat(ei(n)),t=t.concat(Xr(n)),t}function Kr(e){let t=e.filter(e=>!Object.hasOwn(e,Vr));return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:U.MISSING_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}function qr(e){let t=e.filter(e=>{let t=e[Vr];return!(t instanceof RegExp)&&typeof t!=`function`&&!Object.hasOwn(t,`exec`)&&typeof t!=`string`});return{errors:t.map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:U.INVALID_PATTERN,tokenTypes:[e]})),valid:e.filter(e=>!t.includes(e))}}const Jr=/[^\\][$]/;function Yr(e){class t extends cn{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=kr(n),r=new t;return r.visit(e),r.found}catch{return Jr.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
|
|
22
|
+
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
23
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:U.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Xr(e){return e.filter(e=>e.PATTERN.test(``)).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:U.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}const Zr=/[^\\[][\^]|^\^/;function Qr(e){class t extends cn{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=kr(n),r=new t;return r.visit(e),r.found}catch{return Zr.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
|
|
24
|
+
Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
25
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:U.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function $r(e){return e.filter(e=>{let t=e[Vr];return t instanceof RegExp&&(t.multiline||t.global)}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:U.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function ei(e){let t=[],n=e.map(n=>e.reduce((e,r)=>n.PATTERN.source===r.PATTERN.source&&!t.includes(r)&&r.PATTERN!==Ri.NA?(t.push(r),e.push(r),e):e,[]));return n=n.filter(Boolean),n.filter(e=>e.length>1).map(e=>{let t=e.map(e=>e.name);return{message:`The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:U.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function ti(e){return e.filter(e=>{if(!Object.hasOwn(e,`GROUP`))return!1;let t=e.GROUP;return t!==Ri.SKIPPED&&t!==Ri.NA&&typeof t!=`string`}).map(e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:U.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function ni(e,t){return e.filter(e=>e.PUSH_MODE!==void 0&&!t.includes(e.PUSH_MODE)).map(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:U.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function ri(e){let t=[],n=e.reduce((e,t,n)=>{let r=t.PATTERN;return r===Ri.NA||(typeof r==`string`?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&ai(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return e.forEach((e,r)=>{n.forEach(({str:n,idx:i,tokenType:a})=>{if(r<i&&ii(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:U.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function ii(e,t){if(t instanceof RegExp){if(oi(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}else if(typeof t==`function`)return t(e,0,[],{});else if(Object.hasOwn(t,`exec`))return t.exec(e,0,[],{});else if(typeof t==`string`)return t===e;else throw Error(`non exhaustive match`)}function ai(e){return[`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`].find(t=>e.source.indexOf(t)!==-1)===void 0}function oi(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function si(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}function ci(e,t,n){let r=[];return Object.hasOwn(e,`defaultMode`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Hr+`> property in its definition
|
|
26
|
+
`,type:U.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,`modes`)||r.push({message:`A MultiMode Lexer cannot be initialized without a <modes> property in its definition
|
|
27
|
+
`,type:U.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,`modes`)&&Object.hasOwn(e,`defaultMode`)&&!Object.hasOwn(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Hr}: <${e.defaultMode}>which does not exist\n`,type:U.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,`modes`)&&Object.keys(e.modes).forEach(t=>{let n=e.modes[t];n.forEach((e,i)=>{e===void 0?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,type:U.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(e,`LONGER_ALT`)&&(Array.isArray(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT]).forEach(i=>{i!==void 0&&!n.includes(i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${e.name}> outside of mode <${t}>\n`,type:U.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}function li(e,t,n){let r=[],i=!1,a=Object.values(e.modes||{}).flat().filter(Boolean).filter(e=>e[Vr]!==Ri.NA),o=gi(n);return t&&a.forEach(e=>{let t=mi(e,o);if(t!==!1){let n={message:hi(e,t),type:t.issue,tokenType:e};r.push(n)}else Object.hasOwn(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):Br(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.
|
|
28
|
+
This Lexer has been defined to track line and column information,
|
|
29
|
+
But none of the Token Types can be identified as matching a line terminator.
|
|
30
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
31
|
+
for details.`,type:U.NO_LINE_BREAKS_FLAGS}),r}function ui(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(Array.isArray(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}function di(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t==`function`||Object.hasOwn(t,`exec`))return!0;if(typeof t==`string`)return!1;throw Error(`non exhaustive match`)}function fi(e){return typeof e==`string`&&e.length===1?e.charCodeAt(0):!1}const pi={test:function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(t===10)return this.lastIndex=n+1,!0;if(t===13)return e.charCodeAt(n+1)===10?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function mi(e,t){if(Object.hasOwn(e,`LINE_BREAKS`))return!1;if(e.PATTERN instanceof RegExp){try{Br(t,e.PATTERN)}catch(e){return{issue:U.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}else if(typeof e.PATTERN==`string`)return!1;else if(di(e))return{issue:U.CUSTOM_LINE_BREAK};else throw Error(`non exhaustive match`)}function hi(e,t){if(t.issue===U.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
32
|
+
\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===U.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
33
|
+
\tThe problem is in the <${e.name}> Token Type\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function gi(e){return e.map(e=>typeof e==`string`?e.charCodeAt(0):e)}function _i(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}let vi=[];function yi(e){return e<256?e:vi[e]}function bi(){if(vi.length===0){vi=Array(65536);for(let e=0;e<65536;e++)vi[e]=e>255?255+~~(e/255):e}}function xi(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}function Si(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let Ci=1;const wi={};function Ti(e){let t=Ei(e);Di(t),ki(t),Oi(t),t.forEach(e=>{e.isParent=e.categoryMatches.length>0})}function Ei(e){let t=[...e],n=e,r=!0;for(;r;){n=n.map(e=>e.CATEGORIES).flat().filter(Boolean);let e=n.filter(e=>!t.includes(e));t=t.concat(e),e.length===0?r=!1:n=e}return t}function Di(e){e.forEach(e=>{ji(e)||(wi[Ci]=e,e.tokenTypeIdx=Ci++),Mi(e)&&!Array.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Mi(e)||(e.CATEGORIES=[]),Ni(e)||(e.categoryMatches=[]),Pi(e)||(e.categoryMatchesMap={})})}function Oi(e){e.forEach(e=>{e.categoryMatches=[],Object.keys(e.categoryMatchesMap).forEach(t=>{e.categoryMatches.push(wi[t].tokenTypeIdx)})})}function ki(e){e.forEach(e=>{Ai([],e)})}function Ai(e,t){e.forEach(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(n=>{let r=e.concat(t);r.includes(n)||Ai(r,n)})}function ji(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}function Mi(e){return Object.hasOwn(e??{},`CATEGORIES`)}function Ni(e){return Object.hasOwn(e??{},`categoryMatches`)}function Pi(e){return Object.hasOwn(e??{},`categoryMatchesMap`)}function Fi(e){return Object.hasOwn(e??{},`tokenTypeIdx`)}const Ii={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}};var U;(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(U||={});const Li={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
34
|
+
`,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ii,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Li);var Ri=class{constructor(e,t=Li){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=Zn(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
35
|
+
a boolean 2nd argument is no longer supported`);this.config=Object.assign({},Li,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===Li.lineTerminatorsPattern)this.config.lineTerminatorsPattern=pi;else if(this.config.lineTerminatorCharacters===Li.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
36
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:Hr}:(r=!1,n=Object.assign({},e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ci(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(li(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([e,t])=>{n.modes[e]=t.filter(e=>e!==void 0)});let i=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([e,n])=>{this.TRACE_INIT(`Mode: <${e}> processing`,()=>{if(this.modes.push(e),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Wr(n,i))}),this.lexerDefinitionErrors.length===0){Ti(n);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=Ur(n,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[e]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[e]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[e]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
|
|
37
|
+
`);throw Error(`Errors detected in definition of Lexer:
|
|
38
|
+
`+e)}this.lexerDefinitionWarning.forEach(e=>{Xn(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=e=>e),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=Object.entries(this.canModeBeOptimized).reduce((e,[t,n])=>(n===!1&&e.push(t),e),[]);if(t.ensureOptimizations&&e.length>0)throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized.\n Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
39
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{Ar()}),this.TRACE_INIT(`toFastProperties`,()=>{Qn(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let e=this.lexerDefinitionErrors.map(e=>e.message).join(`-----------------------
|
|
40
|
+
`);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
41
|
+
`+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_=e,v=_.length,y=0,b=0,x=this.hasCustom?0:Math.floor(e.length/10),S=Array(x),C=[],w=this.trackStartLines?1:void 0,T=this.trackStartLines?1:void 0,E=ui(this.emptyGroups),ee=this.trackStartLines,D=this.config.lineTerminatorsPattern,O=0,k=[],te=[],ne=[],re=[];Object.freeze(re);let A=!1,ie=e=>{if(ne.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{ne.pop();let e=ne.at(-1);k=this.patternIdxToConfig[e],te=this.charCodeToPatternIdxToConfig[e],O=k.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;A=!!(te&&t)}};function ae(e){ne.push(e),te=this.charCodeToPatternIdxToConfig[e],k=this.patternIdxToConfig[e],O=k.length,O=k.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;A=!!(te&&t)}ae.call(this,t);let j,M=this.config.recoveryEnabled;for(;y<v;){s=null,u=-1;let t=_.charCodeAt(y),x;if(A){let e=yi(t),n=te[e];x=n===void 0?re:n}else x=k;let N=x.length;for(n=0;n<N;n++){j=x[n];let r=j.pattern;c=null;let d=j.short;if(d===!1?j.isCustom===!0?(g=r.exec(_,y,S,E),g===null?s=null:(s=g[0],u=s.length,g.payload!==void 0&&(c=g.payload))):(r.lastIndex=y,u=this.matchLength(r,e,y)):t===d&&(u=1,s=r),u!==-1){if(o=j.longerAlt,o!==void 0){s=e.substring(y,y+u);let t=o.length;for(i=0;i<t;i++){let t=k[o[i]],n=t.pattern;if(l=null,t.isCustom===!0?(g=n.exec(_,y,S,E),g===null?a=null:(a=g[0],g.payload!==void 0&&(l=g.payload))):(n.lastIndex=y,a=this.match(n,e,y)),a&&a.length>s.length){s=a,u=a.length,c=l,j=t;break}}}break}}if(u!==-1){if(d=j.group,d!==void 0&&(s=s===null?e.substring(y,y+u):s,f=j.tokenTypeIdx,p=this.createTokenInstance(s,y,f,j.tokenType,w,T,u),this.handlePayload(p,c),d===!1?b=this.addToken(S,b,p):E[d].push(p)),ee===!0&&j.canLineTerminator===!0){let t=0,n,r;D.lastIndex=0;do s=s===null?e.substring(y,y+u):s,n=D.test(s),n===!0&&(r=D.lastIndex-1,t++);while(n===!0);t===0?T=this.computeNewColumn(T,u):(w+=t,T=u-r,this.updateTokenEndLineColumnLocation(p,d,r,t,w,T,u))}else T=this.computeNewColumn(T,u);y+=u,this.handleModes(j,ie,ae,p)}else{let t=y,n=w,i=T,a=M===!1;for(;a===!1&&y<v;)for(y++,r=0;r<O;r++){let t=k[r],n=t.pattern,i=t.short;if(i===!1?t.isCustom===!0?a=n.exec(_,y,S,E)!==null:(n.lastIndex=y,a=n.exec(e)!==null):_.charCodeAt(y)===i&&(a=!0),a===!0)break}if(m=y-t,T=this.computeNewColumn(T,m),h=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_,t,m,n,i,ne.at(-1)),C.push({offset:t,line:n,column:i,length:m,message:h}),M===!1)break}}return this.hasCustom||(S.length=b),{tokens:S,groups:E,errors:C}}handleModes(e,t,n,r){if(e.pop===!0){let i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,a,o){let s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&s===!0||(e.endLine=i+c,e.endColumn=a-1+-c))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}match(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return e.test(t)===!0?e.lastIndex-n:-1}};Ri.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,Ri.NA=/NOT_APPLICABLE/;function zi(e){return Bi(e)?e.LABEL:e.name}function Bi(e){return typeof e.LABEL==`string`&&e.LABEL!==``}const Vi=`categories`,Hi=`label`,Ui=`group`,Wi=`push_mode`,Gi=`pop_mode`,Ki=`longer_alt`,qi=`line_breaks`,Ji=`start_chars_hint`;function Yi(e){return Xi(e)}function Xi(e){let t=e.pattern,n={};if(n.name=e.name,t!==void 0&&(n.PATTERN=t),Object.hasOwn(e,`parent`))throw`The parent property is no longer supported.
|
|
42
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(e,Vi)&&(n.CATEGORIES=e[Vi]),Ti([n]),Object.hasOwn(e,Hi)&&(n.LABEL=e[Hi]),Object.hasOwn(e,Ui)&&(n.GROUP=e[Ui]),Object.hasOwn(e,Gi)&&(n.POP_MODE=e[Gi]),Object.hasOwn(e,Wi)&&(n.PUSH_MODE=e[Wi]),Object.hasOwn(e,Ki)&&(n.LONGER_ALT=e[Ki]),Object.hasOwn(e,qi)&&(n.LINE_BREAKS=e[qi]),Object.hasOwn(e,Ji)&&(n.START_CHARS_HINT=e[Ji]),n}const Zi=Yi({name:`EOF`,pattern:Ri.NA});Ti([Zi]);function Qi(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function $i(e,t){return xi(e,t)}const ea={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){return`Expecting ${Bi(e)?`--> ${zi(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=`
|
|
43
|
+
but found: '`+t[0].image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences:\n${e.reduce((e,t)=>e.concat(t),[]).map(e=>`[${e.map(e=>zi(e)).join(`, `)}]`).map((e,t)=>` ${t+1}. ${e}`).join(`
|
|
44
|
+
`)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=`
|
|
45
|
+
but found: '`+t[0].image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map(e=>`[${e.map(e=>zi(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(ea);const ta={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<-
|
|
46
|
+
inside top level rule: ->`+e.name+`<-`}},na={buildDuplicateFoundError(e,t){function n(e){return e instanceof H?e.terminalType.name:e instanceof nr?e.nonTerminalName:``}let r=e.name,i=t[0],a=i.idx,o=gr(i),s=n(i),c=`->${o}${a>0?a:``}<- ${s?`with argument: ->${s}<-`:``}
|
|
47
|
+
appears more than once (${t.length} times) in the top level rule: ->${r}<-.
|
|
48
|
+
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
49
|
+
`;return c=c.replace(/[ \t]+/g,` `),c=c.replace(/\s\s+/g,`
|
|
50
|
+
`),c},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=e.prefixPath.map(e=>zi(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable.
|
|
51
|
+
Only the last alternative may be empty.
|
|
52
|
+
`;else{let t=e.prefixPath.map(e=>zi(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives.\n`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
53
|
+
For Further details.`,r},buildEmptyRepetitionError(e){let t=gr(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --> ${e.leftRecursionPath.map(e=>e.name).concat([t]).join(` --> `)}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof rr?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function ra(e,t){let n=new ia(e,t);return n.resolveRefs(),n.errors}var ia=class extends fr{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:$o.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},aa=class extends _r{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},oa=class extends aa{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(this.possibleTokTypes=yr(new ir({definition:t.concat(n)})),this.found=!0)}},sa=class extends _r{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ca=class extends sa{walkMany(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof H&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},la=class extends sa{walkManySep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof H&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},ua=class extends sa{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof H&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},da=class extends sa{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=t.concat(n)[0];this.result.isEndOfRule=e===void 0,e instanceof H&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function fa(e,t,n=[]){n=[...n];let r=[],i=0;function a(t){return t.concat(e.slice(i+1))}function o(e){let i=fa(a(e),t,n);return r.concat(i)}for(;n.length<t&&i<e.length;){let t=e[i];if(t instanceof ir||t instanceof nr)return o(t.definition);if(t instanceof B)r=o(t.definition);else if(t instanceof ar)return o(t.definition.concat([new V({definition:t.definition})]));else if(t instanceof or)return o([new ir({definition:t.definition}),new V({definition:[new H({terminalType:t.separator})].concat(t.definition)})]);else if(t instanceof sr)r=o(t.definition.concat([new V({definition:[new H({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof V)r=o(t.definition.concat([new V({definition:t.definition})]));else if(t instanceof cr)return t.definition.forEach(e=>{e.definition.length!==0&&(r=o(e.definition))}),r;else if(t instanceof H)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:e.slice(i)}),r}function pa(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});d.length!==0;){let e=d.pop();if(e===o){s&&d.at(-1).idx<=l&&d.pop();continue}let r=e.def,f=e.idx,p=e.ruleStack,m=e.occurrenceStack;if(r.length===0)continue;let h=r[0];if(h===i){let e={idx:f,def:r.slice(1),ruleStack:p.slice(0,-1),occurrenceStack:m.slice(0,-1)};d.push(e)}else if(h instanceof H)if(f<c-1){let e=f+1,i=t[e];if(n(i,h.terminalType)){let t={idx:e,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(t)}}else if(f===c-1)u.push({nextTokenType:h.terminalType,nextTokenOccurrence:h.idx,ruleStack:p,occurrenceStack:m}),s=!0;else throw Error(`non exhaustive match`);else if(h instanceof nr){let e=[...p];e.push(h.nonTerminalName);let t=[...m];t.push(h.idx);let n={idx:f,def:h.definition.concat(a,r.slice(1)),ruleStack:e,occurrenceStack:t};d.push(n)}else if(h instanceof B){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t={idx:f,def:h.definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof ar){let e=new V({definition:h.definition,idx:h.idx}),t={idx:f,def:h.definition.concat([e],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof or){let e=new V({definition:[new H({terminalType:h.separator})].concat(h.definition),idx:h.idx}),t={idx:f,def:h.definition.concat([e],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t)}else if(h instanceof sr){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t=new V({definition:[new H({terminalType:h.separator})].concat(h.definition),idx:h.idx}),n={idx:f,def:h.definition.concat([t],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(n)}else if(h instanceof V){let e={idx:f,def:r.slice(1),ruleStack:p,occurrenceStack:m};d.push(e),d.push(o);let t=new V({definition:h.definition,idx:h.idx}),n={idx:f,def:h.definition.concat([t],r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(n)}else if(h instanceof cr)for(let e=h.definition.length-1;e>=0;e--){let t={idx:f,def:h.definition[e].definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m};d.push(t),d.push(o)}else if(h instanceof ir)d.push({idx:f,def:h.definition.concat(r.slice(1)),ruleStack:p,occurrenceStack:m});else if(h instanceof rr)d.push(ma(h,f,p,m));else throw Error(`non exhaustive match`)}return u}function ma(e,t,n,r){let i=[...n];i.push(e.name);let a=[...r];return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}var W;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(W||={});function ha(e){if(e instanceof B||e===`Option`)return W.OPTION;if(e instanceof V||e===`Repetition`)return W.REPETITION;if(e instanceof ar||e===`RepetitionMandatory`)return W.REPETITION_MANDATORY;if(e instanceof or||e===`RepetitionMandatoryWithSeparator`)return W.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof sr||e===`RepetitionWithSeparator`)return W.REPETITION_WITH_SEPARATOR;if(e instanceof cr||e===`Alternation`)return W.ALTERNATION;throw Error(`non exhaustive match`)}function ga(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=ha(r);return a===W.ALTERNATION?Da(t,n,i):Oa(t,n,a,i)}function _a(e,t,n,r,i,a){let o=Da(e,t,n);return a(o,r,ja(o)?Si:xi,i)}function va(e,t,n,r,i,a){let o=Oa(e,t,i,n),s=ja(o)?Si:xi;return a(o[0],s,r)}function ya(e,t,n,r){let i=e.length,a=e.every(e=>e.every(e=>e.length===1));if(t)return function(t){let r=t.map(e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],a=i.length,o=r[t];if(!(o!==void 0&&o.call(this)===!1))nextPath:for(let e=0;e<a;e++){let r=i[e],a=r.length;for(let e=0;e<a;e++)if(n(this.LA_FAST(e+1),r[e])===!1)continue nextPath;return t}}};if(a&&!r){let t=e.map(e=>e.flat()).reduce((e,t,n)=>(t.forEach(t=>{t.tokenTypeIdx in e||(e[t.tokenTypeIdx]=n),t.categoryMatches.forEach(t=>{Object.hasOwn(e,t)||(e[t]=n)})}),e),{});return function(){return t[this.LA_FAST(1).tokenTypeIdx]}}else return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;nextPath:for(let e=0;e<i;e++){let i=r[e],a=i.length;for(let e=0;e<a;e++)if(n(this.LA_FAST(e+1),i[e])===!1)continue nextPath;return t}}}}function ba(e,t,n){let r=e.every(e=>e.length===1),i=e.length;if(r&&!n){let t=e.flat();if(t.length===1&&t[0].categoryMatches.length===0){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}else{let e=t.reduce((e,t,n)=>(e[t.tokenTypeIdx]=!0,t.categoryMatches.forEach(t=>{e[t]=!0}),e),[]);return function(){return e[this.LA_FAST(1).tokenTypeIdx]===!0}}}else return function(){nextPath:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(t(this.LA_FAST(e+1),r[e])===!1)continue nextPath;return!0}return!1}}var xa=class extends _r{constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1}walkOption(e,t,n){this.checkIsTarget(e,W.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,W.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,W.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,W.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,W.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},Sa=class extends fr{constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,W.OPTION)}visitRepetition(e){this.checkIsTarget(e,W.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,W.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,W.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,W.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,W.ALTERNATION)}};function Ca(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function wa(e){let t=[``];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+`_`+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t=`_`+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function Ta(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(i[t[e]]===!0)return!1}return!0}function Ea(e,t){let n=e.map(e=>fa([e],1)),r=Ca(n.length),i=n.map(e=>{let t={};return e.forEach(e=>{wa(e.partialPath).forEach(e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=Ca(n.length);for(let o=0;o<n.length;o++){let s=n[o];for(let n=0;n<s.length;n++){let c=s[n].partialPath,l=s[n].suffixDef,u=wa(c);if(Ta(i,u,o)||l.length===0||c.length===t){let e=r[o];if(ka(e,c)===!1){e.push(c);for(let e=0;e<u.length;e++){let t=u[e];i[o][t]=!0}}}else{let t=fa(l,e+1,c);a[o]=a[o].concat(t),t.forEach(e=>{wa(e.partialPath).forEach(e=>{i[o][e]=!0})})}}}}return r}function Da(e,t,n,r){let i=new Sa(e,W.ALTERNATION,r);return t.accept(i),Ea(i.result,n)}function Oa(e,t,n,r){let i=new Sa(e,n);t.accept(i);let a=i.result,o=new xa(t,e,n).startWalking();return Ea([new ir({definition:a}),new ir({definition:o})],r)}function ka(e,t){compareOtherPath:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if(!(n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==void 0))continue compareOtherPath}return!0}}return!1}function Aa(e,t){return e.length<t.length&&e.every((e,n)=>{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}function ja(e){return e.every(e=>e.every(e=>e.every(e=>e.categoryMatches.length===0)))}function Ma(e){return e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(e=>Object.assign({type:$o.CUSTOM_LOOKAHEAD_VALIDATION},e))}function Na(e,t,n,r){let i=e.flatMap(e=>Pa(e,n)),a=Xa(e,t,n),o=e.flatMap(e=>Ka(e,n)),s=e.flatMap(t=>Ra(t,e,r,n));return i.concat(a,o,s)}function Pa(e,t){let n=new La;e.accept(n);let r=n.allProductions,i=Object.groupBy(r,Fa),a=Object.fromEntries(Object.entries(i).filter(([e,t])=>t.length>1));return Object.values(a).map(n=>{let r=n[0],i=t.buildDuplicateFoundError(e,n),a=gr(r),o={message:i,type:$o.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=Ia(r);return s&&(o.parameter=s),o})}function Fa(e){return`${gr(e)}_#_${e.idx}_#_${Ia(e)}`}function Ia(e){return e instanceof H?e.terminalType.name:e instanceof nr?e.nonTerminalName:``}var La=class extends fr{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function Ra(e,t,n,r){let i=[];if(t.reduce((t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:$o.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function za(e,t,n){let r=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:$o.INVALID_RULE_OVERRIDE,ruleName:e})),r}function Ba(e,t,n,r=[]){let i=[],a=Va(t.definition);if(a.length===0)return[];{let t=e.name;a.includes(e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:$o.LEFT_RECURSION,ruleName:t});let o=r.concat([e]),s=a.filter(e=>!o.includes(e)).flatMap(t=>{let i=[...r];return i.push(t),Ba(e,t,n,i)});return i.concat(s)}}function Va(e){let t=[];if(e.length===0)return t;let n=e[0];if(n instanceof nr)t.push(n.referencedRule);else if(n instanceof ir||n instanceof B||n instanceof ar||n instanceof or||n instanceof sr||n instanceof V)t=t.concat(Va(n.definition));else if(n instanceof cr)t=n.definition.map(e=>Va(e.definition)).flat();else if(!(n instanceof H))throw Error(`non exhaustive match`);let r=mr(n),i=e.length>1;if(r&&i){let n=e.slice(1);return t.concat(Va(n))}else return t}var Ha=class extends fr{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function Ua(e,t){let n=new Ha;return e.accept(n),n.alternations.flatMap(n=>n.definition.slice(0,-1).flatMap((r,i)=>pa([r],[],xi,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:$o.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function Wa(e,t,n){let r=new Ha;e.accept(r);let i=r.alternations;return i=i.filter(e=>e.ignoreAmbiguities!==!0),i.flatMap(r=>{let i=r.idx,a=Da(i,e,r.maxLookahead||t,r),o=Ja(a,r,e,n),s=Ya(a,r,e,n);return o.concat(s)})}var Ga=class extends fr{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function Ka(e,t){let n=new Ha;return e.accept(n),n.alternations.flatMap(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:$o.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function qa(e,t,n){let r=[];return e.forEach(e=>{let i=new Ga;e.accept(i),i.allProductions.forEach(i=>{let a=ha(i),o=i.maxLookahead||t,s=i.idx;if(Oa(s,e,a,o)[0].flat().length===0){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:$o.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}function Ja(e,t,n,r){let i=[];return e.reduce((n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||r.forEach(r=>{let o=[a];e.forEach((e,n)=>{a!==n&&ka(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!ka(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]).map(e=>{let i=e.alts.map(e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:$o.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}function Ya(e,t,n,r){let i=e.reduce((e,t,n)=>{let r=t.map(e=>({idx:n,path:e}));return e.concat(r)},[]);return i.flatMap(e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return i.filter(e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<a&&Aa(e.path,o)).map(e=>{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:$o.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})})}function Xa(e,t,n){let r=[],i=t.map(e=>e.name);return e.forEach(e=>{let t=e.name;if(i.includes(t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:$o.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}function Za(e){let t=Object.assign({errMsgProvider:ta},e),n={};return e.rules.forEach(e=>{n[e.name]=e}),ra(n,t.errMsgProvider)}function Qa(e){let t=e.errMsgProvider??na;return Na(e.rules,e.tokenTypes,t,e.grammarName)}const $a=`MismatchedTokenException`,eo=`NoViableAltException`,to=`EarlyExitException`,no=`NotAllInputParsedException`,ro=[$a,eo,to,no];Object.freeze(ro);function io(e){return ro.includes(e.name)}var ao=class extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},oo=class extends ao{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=$a}},so=class extends ao{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=eo}},co=class extends ao{constructor(e,t){super(e,t),this.name=no}},lo=class extends ao{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=to}};const uo={};var fo=class extends Error{constructor(e){super(e),this.name=`InRuleRecoveryException`}},po=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,`recoveryEnabled`)?e.recoveryEnabled:Zo.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mo)}getTokenToInsert(e){let t=Qi(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,c=this.LA_FAST(1),l=this.LA_FAST(1),u=()=>{let e=this.LA(0),t=new oo(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),c,this.LA(0));t.resyncedTokens=o.slice(0,-1),this.SAVE_ERROR(t)};for(;!s;)if(this.tokenMatcher(l,r)){u();return}else if(n.call(this)){u(),e.apply(this,t);return}else this.tokenMatcher(l,i)?s=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA_FAST(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getNextPossibleTokenTypes(e){let t=e.ruleStack[0],n=this.getGAstProductions()[t];return new oa(n,e).startWalking()}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new fo(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||t.length===0)return!1;let n=this.LA_FAST(1);return t.find(e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA_FAST(1),n=2;for(;;){let r=e.find(e=>$i(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return uo;let e=this.currRuleShortName,t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,r=Array(n);for(let i=0;i<n;i++)i===0?r[i]=uo:r[i]={ruleName:this.shortRuleNameToFullName(e[i]),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])};return r}flattenFollowSet(){return this.buildFullFollowKeyStack().map(e=>this.getFollowSetFromFollowKey(e)).flat()}getFollowSetFromFollowKey(e){if(e===uo)return[Zi];let t=e.ruleName+e.idxInCallingRule+Cr+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Zi)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA_FAST(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,t=Array(e);for(let n=0;n<e;n++)t[n]=this.shortRuleNameToFullName(this.RULE_STACK[n]);return t}};function mo(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];c=new a(t,i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK_IDX===0&&d&&l===void 0&&(l=Zi,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}const ho=1024,go=1280,_o=1536;function vo(e,t,n){return n|t|e}var yo=class{constructor(e){this.maxLookahead=e?.maxLookahead??Zo.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(t.length===0){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return e.flatMap(e=>Ba(e,e,na))}validateEmptyOrAlternatives(e){return e.flatMap(e=>Ua(e,na))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(e=>Wa(e,t,na))}validateSomeNonEmptyLookaheadPath(e,t){return qa(e,t,na)}buildLookaheadForAlternation(e){return _a(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,ya)}buildLookaheadForOptional(e){return va(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ha(e.prodType),ba)}},bo=class{initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:Zo.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,`maxLookahead`)?e.maxLookahead:Zo.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,`lookaheadStrategy`)?e.lookaheadStrategy:new yo({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){e.forEach(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=So(e);t.forEach(t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${gr(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=vo(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),n.forEach(t=>{this.computeLookaheadFunc(e,t.idx,768,`Repetition`,t.maxLookahead,gr(t))}),r.forEach(t=>{this.computeLookaheadFunc(e,t.idx,512,`Option`,t.maxLookahead,gr(t))}),i.forEach(t=>{this.computeLookaheadFunc(e,t.idx,ho,`RepetitionMandatory`,t.maxLookahead,gr(t))}),a.forEach(t=>{this.computeLookaheadFunc(e,t.idx,_o,`RepetitionMandatoryWithSeparator`,t.maxLookahead,gr(t))}),o.forEach(t=>{this.computeLookaheadFunc(e,t.idx,go,`RepetitionWithSeparator`,t.maxLookahead,gr(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=vo(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return vo(this.currRuleShortName,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}};const xo=new class extends fr{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function So(e){xo.reset(),e.accept(xo);let t=xo.dslMethods;return xo.reset(),t}function Co(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function wo(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function To(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}function Eo(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}function Do(e,t){Object.defineProperty(e,`name`,{enumerable:!1,configurable:!0,writable:!1,value:t})}function Oo(e,t){let n=Object.keys(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],a=r.length;for(let e=0;e<a;e++){let n=r[e];n.tokenTypeIdx===void 0&&this[n.name](n.children,t)}}}function ko(e,t){let n=function(){};return Do(n,e+`BaseSemantics`),n.prototype={visit:function(e,t){if(Array.isArray(e)&&(e=e[0]),e!==void 0)return this[e.name](e.children,t)},validateVisitor:function(){let e=Mo(this,t);if(e.length!==0){let t=e.map(e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join(`
|
|
54
|
+
|
|
55
|
+
`).replace(/\n/g,`
|
|
56
|
+
`)}`)}}},n.prototype.constructor=n,n._RULE_NAMES=t,n}function Ao(e,t,n){let r=function(){};Do(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return t.forEach(e=>{i[e]=Oo}),r.prototype=i,r.prototype.constructor=r,r}var jo;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(jo||={});function Mo(e,t){return No(e,t)}function No(e,t){return t.filter(t=>typeof e[t]!=`function`).map(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:jo.MISSING_METHOD,methodName:t})).filter(Boolean)}var Po=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,`nodeLocationTracking`)?e.nodeLocationTracking:Zo.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wo,this.setNodeLocationFromNode=wo,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Co,this.setNodeLocationFromNode=Co,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];To(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];Eo(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=ko(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=Ao(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},Fo=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):Xo}LA_FAST(e){let t=this.currIdx+e;return this.tokVector[t]}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Xo:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},Io=class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Qo){if(this.definedRulesNames.includes(e)){let t={message:na.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:$o.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Qo){let r=za(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){let n=e.coreRule??e;return function(){this.isBackTrackingStack.push(1);let e=this.saveRecogState();try{return n.apply(this,t),!0}catch(e){if(io(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return lr(Object.values(this.gastProductionsCache))}},Lo=class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Si,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
57
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
58
|
+
For Further details.`);if(Array.isArray(e)){if(e.length===0)throw Error(`A Token Vocabulary cannot be empty.
|
|
59
|
+
Note that the first argument for the parser constructor
|
|
60
|
+
is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
61
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
62
|
+
For Further details.`)}if(Array.isArray(e))this.tokensMap=e.reduce((e,t)=>(e[t.name]=t,e),{});else if(Object.hasOwn(e,`modes`)&&Object.values(e.modes).flat().every(Fi)){let t=Object.values(e.modes).flat();this.tokensMap=[...new Set(t)].reduce((e,t)=>(e[t.name]=t,e),{})}else if(typeof e==`object`&&e)this.tokensMap=Object.assign({},e);else throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=Zi,this.tokenMatcher=(Object.hasOwn(e,`modes`)?Object.values(e.modes).flat():Object.values(e)).every(e=>e.categoryMatches?.length==0)?Si:xi,Ti(Object.values(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=Object.hasOwn(n,`resyncEnabled`)?n.resyncEnabled:Qo.resyncEnabled,i=Object.hasOwn(n,`recoveryValueFunc`)?n.recoveryValueFunc:Qo.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return o=this.outputCst===!0?function(...n){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(function(...t){this.onBeforeParse(e);try{return o.apply(this,t)}finally{this.onAfterParse(e)}},{ruleName:e,originalGrammarAction:t,coreRule:o})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK_IDX===0,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(io(e)){let t=e;if(i){let r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r))if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}else return n(e);else{if(this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}}else if(r)return this.moveToTerminatedState(),n(e);else throw t}else throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof e!=`function`){i=e.DEF;let t=e.GATE;if(t!==void 0){let e=r;r=()=>t.call(this)&&e.call(this)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(ho,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,W.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,ho,e,ua)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(_o,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,da],t,_o,e,da)}else throw this.raiseEarlyExitException(e,W.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,768,e,ca,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(go,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,la],t,go,e,la)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,_o,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(256,t),r=Array.isArray(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.coreRule.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw io(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA_FAST(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new oo(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===`InRuleRecoveryException`?n:e}}else throw n}saveRecogState(){let e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let t=e.RULE_STACK;for(let e=0;e<t.length;e++)this.RULE_STACK[e]=t[e];this.RULE_STACK_IDX=t.length-1,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Zi)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let e=0;e<this.maxLookahead+1;e++)this.tokVector.push(Xo)}onAfterParse(e){if(this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new co(t,e))}for(;this.tokVector.at(-1)===Xo;)this.tokVector.pop()}},Ro=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Object.hasOwn(e,`errorMessageProvider`)?e.errorMessageProvider:Zo.errorMessageProvider}SAVE_ERROR(e){if(io(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return[...this._errors]}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=Oa(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new lo(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=Da(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new so(s,this.LA(1),o))}};const zo={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(zo);const Bo=Yi({name:`RECORDING_PHASE_TOKEN`,pattern:Ri.NA});Ti([Bo]);const Vo=Qi(Bo,`This IToken indicates the Parser is in Recording Phase
|
|
63
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Vo);const Ho={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
64
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};var Uo=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Xo}topLevelRuleRecord(e,t){try{let n=new rr({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=`
|
|
65
|
+
This error was thrown during the "grammar recording phase" For more info see:
|
|
66
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return Wo.call(this,B,e,t)}atLeastOneInternalRecord(e,t){Wo.call(this,ar,t,e)}atLeastOneSepFirstInternalRecord(e,t){Wo.call(this,or,t,e,!0)}manyInternalRecord(e,t){Wo.call(this,V,t,e)}manySepFirstInternalRecord(e,t){Wo.call(this,sr,t,e,!0)}orInternalRecord(e,t){return Go.call(this,e,t)}subruleInternalRecord(e,t,n){if(qo(t),!e||!Object.hasOwn(e,`ruleName`)){let n=Error(`<SUBRULE${Ko(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=e.ruleName,a=new nr({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?Ho:zo}consumeInternalRecord(e,t,n){if(qo(t),!ji(e)){let n=Error(`<CONSUME${Ko(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=this.recordingProdStack.at(-1),i=new H({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),Vo}};function Wo(e,t,n,r=!1){qo(n);let i=this.recordingProdStack.at(-1),a=typeof t==`function`?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),Object.hasOwn(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),zo}function Go(e,t){qo(t);let n=this.recordingProdStack.at(-1),r=Array.isArray(e)===!1,i=r===!1?e:e.DEF,a=new cr({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return Object.hasOwn(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=i.some(e=>typeof e.GATE==`function`),n.definition.push(a),i.forEach(e=>{let t=new ir({definition:[]});a.definition.push(t),Object.hasOwn(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object.hasOwn(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),zo}function Ko(e){return e===0?``:`${e}`}function qo(e){if(e<0||e>255){let t=Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than 256`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Jo=class{initPerformanceTracer(e){if(Object.hasOwn(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Zo.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=Zn(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}else return t()}};function Yo(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}const Xo=Qi(Zi,``,NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Xo);const Zo=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ea,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),Qo=Object.freeze({recoveryValueFunc:()=>void 0,resyncEnabled:!0});var $o;(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})($o||={});function es(e=void 0){return function(){return e}}var ts=class e{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{Qn(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),this.definedRulesNames.forEach(e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=Za({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(r.length===0&&this.skipValidations===!1){let e=Qa({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:na,grammarName:n}),t=Ma({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{this.resyncFollows=Tr(Object.values(this.gastProductionsCache))}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(e=>e.message),Error(`Parser Definition Errors detected:\n ${t.join(`
|
|
67
|
+
-------------------------------
|
|
68
|
+
`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initGastRecorder(t),n.initPerformanceTracer(t),Object.hasOwn(t,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
69
|
+
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
70
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
71
|
+
For further details.`);this.skipValidations=Object.hasOwn(t,`skipValidations`)?t.skipValidations:Zo.skipValidations}};ts.DEFER_DEFINITION_ERRORS_HANDLING=!1,Yo(ts,[po,bo,Po,Fo,Lo,Io,Ro,Uo,Jo]);var ns=class extends ts{constructor(e,t=Zo){let n=Object.assign({},t);n.outputCst=!1,super(e,n)}};function rs(e,t,n){return`${e.name}_${t}_${n}`}var is=class{constructor(e){this.target=e}isEpsilon(){return!1}},as=class extends is{constructor(e,t){super(e),this.tokenType=t}},os=class extends is{constructor(e){super(e)}isEpsilon(){return!0}},ss=class extends is{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}};function cs(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};ls(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=_s(t,n,n);i!==void 0&&Ds(t,n,i)}return t}function ls(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=K(e,n,void 0,{type:2}),a=K(e,n,void 0,{type:7});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}function us(e,t,n){return n instanceof H?Ts(e,t,n.terminalType,n):n instanceof nr?Es(e,t,n):n instanceof cr?hs(e,t,n):n instanceof B?gs(e,t,n):n instanceof V?ds(e,t,n):n instanceof sr?fs(e,t,n):n instanceof ar?ps(e,t,n):n instanceof or?ms(e,t,n):_s(e,t,n)}function ds(e,t,n){let r=K(e,t,n,{type:5});return xs(e,r),ys(e,t,n,Ss(e,t,r,n,_s(e,t,n)))}function fs(e,t,n){let r=K(e,t,n,{type:5});return xs(e,r),ys(e,t,n,Ss(e,t,r,n,_s(e,t,n)),Ts(e,t,n.separator,n))}function ps(e,t,n){let r=K(e,t,n,{type:4});return xs(e,r),vs(e,t,n,Ss(e,t,r,n,_s(e,t,n)))}function ms(e,t,n){let r=K(e,t,n,{type:4});return xs(e,r),vs(e,t,n,Ss(e,t,r,n,_s(e,t,n)),Ts(e,t,n.separator,n))}function hs(e,t,n){let r=K(e,t,n,{type:1});return xs(e,r),Ss(e,t,r,n,...f(n.definition,n=>us(e,t,n)))}function gs(e,t,n){let r=K(e,t,n,{type:1});return xs(e,r),bs(e,t,n,Ss(e,t,r,n,_s(e,t,n)))}function _s(e,t,n){let r=o(f(n.definition,n=>us(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:ws(e,r)}function vs(e,t,n,r,i){let a=r.left,o=r.right,s=K(e,t,n,{type:11});xs(e,s);let c=K(e,t,n,{type:12});return a.loopback=s,c.loopback=s,e.decisionMap[rs(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,G(o,s),i===void 0?(G(s,a),G(s,c)):(G(s,c),G(s,i.left),G(i.right,a)),{left:a,right:c}}function ys(e,t,n,r,i){let a=r.left,o=r.right,s=K(e,t,n,{type:10});xs(e,s);let c=K(e,t,n,{type:12}),l=K(e,t,n,{type:9});return s.loopback=l,c.loopback=l,G(s,a),G(s,c),G(o,l),i===void 0?G(l,s):(G(l,c),G(l,i.left),G(i.right,a)),e.decisionMap[rs(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}function bs(e,t,n,r){let i=r.left,a=r.right;return G(i,a),e.decisionMap[rs(t,`Option`,n.idx)]=i,r}function xs(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Ss(e,t,n,r,...i){let a=K(e,t,r,{type:8,start:n});n.end=a;for(let e of i)e===void 0?G(n,a):(G(n,e.left),G(e.right,a));let o={left:n,right:a};return e.decisionMap[rs(t,Cs(r),r.idx)]=n,o}function Cs(e){if(e instanceof cr)return`Alternation`;if(e instanceof B)return`Option`;if(e instanceof V)return`Repetition`;if(e instanceof sr)return`RepetitionWithSeparator`;if(e instanceof ar)return`RepetitionMandatory`;if(e instanceof or)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}function ws(e,t){let n=t.length;for(let r=0;r<n-1;r++){let n=t[r],i;n.left.transitions.length===1&&(i=n.left.transitions[0]);let a=i instanceof ss,o=i,s=t[r+1].left;n.left.type===1&&n.right.type===1&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,ks(e,n.right)):G(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}function Ts(e,t,n,r){let i=K(e,t,r,{type:1}),a=K(e,t,r,{type:1});return Os(i,new as(a,n)),{left:i,right:a}}function Es(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=K(e,t,n,{type:1}),o=K(e,t,n,{type:1});return Os(a,new ss(i,r,o)),{left:a,right:o}}function Ds(e,t,n){let r=e.ruleToStartState.get(t);G(r,n.left);let i=e.ruleToStopState.get(t);return G(n.right,i),{left:r,right:i}}function G(e,t){Os(e,new os(t))}function K(e,t,n,r){let i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function Os(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function ks(e,t){e.states.splice(e.states.indexOf(t),1)}const As={};var js=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Ms(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return f(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function Ms(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}function Ns(e,t){return l(f(e,t),1)}function Ps(e,t){return e&&e.length?a(e,s(t,2)):[]}function Fs(e,t){let n={};return r=>{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}var Is=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;n<t;n++)e+=this.predicates[n]===!0?`1`:`0`;return e}};const Ls=new Is;var Rs=class extends yo{constructor(e){super(),this.logging=e?.logging??(e=>console.log(e))}initialize(e){this.atn=cs(e.rules),this.dfas=Bs(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=rs(n,`Alternation`,t),l=this.atn.decisionMap[s].decision,d=f(ga({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>f(e,e=>e[0]));if(zs(d,!1)&&!i){let e=u(d,(e,t,n)=>(c(t,t=>{t&&(e[t.tokenTypeIdx]=n,c(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=e[this.LA_FAST(1).tokenTypeIdx];if(t!==void 0&&n!==void 0){let e=t[n]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return n}:function(){return e[this.LA_FAST(1).tokenTypeIdx]}}else if(r)return function(e){let t=new Is,n=e===void 0?0:e.length;for(let r=0;r<n;r++){let n=e?.[r].GATE;t.set(r,n===void 0||n.call(this))}let r=Vs.call(this,a,l,t,o);return typeof r==`number`?r:void 0};else return function(){let e=Vs.call(this,a,l,Ls,o);return typeof e==`number`?e:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=rs(n,r,t),l=this.atn.decisionMap[s].decision,p=f(ga({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>f(e,e=>e[0]));if(zs(p)&&p[0][0]&&!i){let e=p[0],t=m(e);if(t.length===1&&d(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}else{let e=u(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,c(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){return e[this.LA_FAST(1).tokenTypeIdx]===!0}}}return function(){let e=Vs.call(this,a,l,Ls,o);return typeof e==`object`?!1:e===0}}};function zs(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function Bs(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=Fs(e.decisionStates[r],r);return n}function Vs(e,t,n,r){let i=e[t](n),a=i.start;return a===void 0&&(a=ec(i,Qs(tc(i.atnStartState))),i.start=a),Hs.apply(this,[i,a,n,r])}function Hs(e,t,n,r){let i=t,a=1,o=[],s=this.LA_FAST(a++);for(;;){let t=Js(i,s);if(t===void 0&&(t=Us.apply(this,[e,i,s,a,n,r])),t===As)return qs(o,i,s);if(t.isAcceptState===!0)return t.prediction;i=t,o.push(s),s=this.LA(a++)}}function Us(e,t,n,r,i,a){let o=Ys(t.configs,n,i);if(o.size===0)return $s(e,t,n,As),As;let s=Qs(o),c=Zs(o,i);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(oc(o)){let t=p(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,Ws.apply(this,[e,r,o.alts,a])}return s=$s(e,t,n,s),s}function Ws(e,t,n,r){let i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);let a=e.atnStartState,o=a.rule,s=a.production;r(Gs({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}function Gs(e){let t=f(e.prefixPath,e=>zi(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${Ks(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
72
|
+
For Further details.`,r}function Ks(e){if(e instanceof nr)return`SUBRULE`;if(e instanceof B)return`OPTION`;if(e instanceof cr)return`OR`;if(e instanceof ar)return`AT_LEAST_ONE`;if(e instanceof or)return`AT_LEAST_ONE_SEP`;if(e instanceof sr)return`MANY_SEP`;if(e instanceof V)return`MANY`;if(e instanceof H)return`CONSUME`;throw Error(`non exhaustive match`)}function qs(e,t,n){return{actualToken:n,possibleTokenTypes:Ps(Ns(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof as).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Js(e,t){return e.edges[t.tokenTypeIdx]}function Ys(e,t,n){let r=new js,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===7){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=Xs(e,t);i!==void 0&&r.add({state:i,alt:a.alt,stack:a.stack})}}let a;if(i.length===0&&r.size===1&&(a=r),a===void 0){a=new js;for(let e of r.elements)nc(e,a)}if(i.length>0&&!ic(a))for(let e of i)a.add(e);return a}function Xs(e,t){if(e instanceof as&&$i(t,e.tokenType))return e.target}function Zs(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function Qs(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function $s(e,t,n,r){return r=ec(e,r),t.edges[n.tokenTypeIdx]=r,r}function ec(e,t){if(t===As)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}function tc(e){let t=new js,n=e.transitions.length;for(let r=0;r<n;r++)nc({state:e.transitions[r].target,alt:r,stack:[]},t);return t}function nc(e,t){let n=e.state;if(n.type===7){if(e.stack.length>0){let n=[...e.stack];nc({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i<r;i++){let r=n.transitions[i],a=rc(e,r);a!==void 0&&nc(a,t)}}function rc(e,t){if(t instanceof os)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof ss){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}function ic(e){for(let t of e.elements)if(t.state.type===7)return!0;return!1}function ac(e){for(let t of e.elements)if(t.state.type!==7)return!1;return!0}function oc(e){if(ac(e))return!0;let t=sc(e.elements);return cc(t)&&!lc(t)}function sc(e){let t=new Map;for(let n of e){let e=Ms(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}function cc(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function lc(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}var uc;(function(e){function t(e){return typeof e==`string`}e.is=t})(uc||={});var dc;(function(e){function t(e){return typeof e==`string`}e.is=t})(dc||={});var fc;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(fc||={});var pc;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(pc||={});var q;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=pc.MAX_VALUE),t===Number.MAX_VALUE&&(t=pc.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.line)&&Y.uinteger(t.character)}e.is=n})(q||={});var J;(function(e){function t(e,t,n,r){if(Y.uinteger(e)&&Y.uinteger(t)&&Y.uinteger(n)&&Y.uinteger(r))return{start:q.create(e,t),end:q.create(n,r)};if(q.is(e)&&q.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&q.is(t.start)&&q.is(t.end)}e.is=n})(J||={});var mc;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&J.is(t.range)&&(Y.string(t.uri)||Y.undefined(t.uri))}e.is=n})(mc||={});var hc;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&J.is(t.targetRange)&&Y.string(t.targetUri)&&J.is(t.targetSelectionRange)&&(J.is(t.originSelectionRange)||Y.undefined(t.originSelectionRange))}e.is=n})(hc||={});var gc;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.numberRange(t.red,0,1)&&Y.numberRange(t.green,0,1)&&Y.numberRange(t.blue,0,1)&&Y.numberRange(t.alpha,0,1)}e.is=n})(gc||={});var _c;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&J.is(t.range)&&gc.is(t.color)}e.is=n})(_c||={});var vc;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.undefined(t.textEdit)||Dc.is(t))&&(Y.undefined(t.additionalTextEdits)||Y.typedArray(t.additionalTextEdits,Dc.is))}e.is=n})(vc||={});var yc;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(yc||={});var bc;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return Y.defined(n)&&(o.startCharacter=n),Y.defined(r)&&(o.endCharacter=r),Y.defined(i)&&(o.kind=i),Y.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.uinteger(t.startLine)&&Y.uinteger(t.startLine)&&(Y.undefined(t.startCharacter)||Y.uinteger(t.startCharacter))&&(Y.undefined(t.endCharacter)||Y.uinteger(t.endCharacter))&&(Y.undefined(t.kind)||Y.string(t.kind))}e.is=n})(bc||={});var xc;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&mc.is(t.location)&&Y.string(t.message)}e.is=n})(xc||={});var Sc;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Sc||={});var Cc;(function(e){e.Unnecessary=1,e.Deprecated=2})(Cc||={});var wc;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.href)}e.is=t})(wc||={});var Tc;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return Y.defined(n)&&(o.severity=n),Y.defined(r)&&(o.code=r),Y.defined(i)&&(o.source=i),Y.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return Y.defined(t)&&J.is(t.range)&&Y.string(t.message)&&(Y.number(t.severity)||Y.undefined(t.severity))&&(Y.integer(t.code)||Y.string(t.code)||Y.undefined(t.code))&&(Y.undefined(t.codeDescription)||Y.string(t.codeDescription?.href))&&(Y.string(t.source)||Y.undefined(t.source))&&(Y.undefined(t.relatedInformation)||Y.typedArray(t.relatedInformation,xc.is))}e.is=n})(Tc||={});var Ec;(function(e){function t(e,t,...n){let r={title:e,command:t};return Y.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.title)&&Y.string(t.command)}e.is=n})(Ec||={});var Dc;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.newText)&&J.is(t.range)}e.is=i})(Dc||={});var Oc;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&Y.string(t.label)&&(Y.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=n})(Oc||={});var kc;(function(e){function t(e){let t=e;return Y.string(t)}e.is=t})(kc||={});var Ac;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return Dc.is(t)&&(Oc.is(t.annotationId)||kc.is(t.annotationId))}e.is=i})(Ac||={});var jc;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Rc.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(jc||={});var Mc;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&Y.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||kc.is(t.annotationId))}e.is=n})(Mc||={});var Nc;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&Y.string(t.oldUri)&&Y.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||Y.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||Y.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||kc.is(t.annotationId))}e.is=n})(Nc||={});var Pc;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&Y.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||Y.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||Y.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||kc.is(t.annotationId))}e.is=n})(Pc||={});var Fc;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>Y.string(e.kind)?Mc.is(e)||Nc.is(e)||Pc.is(e):jc.is(e)))}e.is=t})(Fc||={});var Ic;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)}e.is=n})(Ic||={});var Lc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.integer(t.version)}e.is=n})(Lc||={});var Rc;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&(t.version===null||Y.integer(t.version))}e.is=n})(Rc||={});var zc;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.string(t.languageId)&&Y.integer(t.version)&&Y.string(t.text)}e.is=n})(zc||={});var Bc;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Bc||={});var Vc;(function(e){function t(e){let t=e;return Y.objectLiteral(e)&&Bc.is(t.kind)&&Y.string(t.value)}e.is=t})(Vc||={});var Hc;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Hc||={});var Uc;(function(e){e.PlainText=1,e.Snippet=2})(Uc||={});var Wc;(function(e){e.Deprecated=1})(Wc||={});var Gc;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&Y.string(t.newText)&&J.is(t.insert)&&J.is(t.replace)}e.is=n})(Gc||={});var Kc;(function(e){e.asIs=1,e.adjustIndentation=2})(Kc||={});var qc;(function(e){function t(e){let t=e;return t&&(Y.string(t.detail)||t.detail===void 0)&&(Y.string(t.description)||t.description===void 0)}e.is=t})(qc||={});var Jc;(function(e){function t(e){return{label:e}}e.create=t})(Jc||={});var Yc;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(Yc||={});var Xc;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return Y.string(t)||Y.objectLiteral(t)&&Y.string(t.language)&&Y.string(t.value)}e.is=n})(Xc||={});var Zc;(function(e){function t(e){let t=e;return!!t&&Y.objectLiteral(t)&&(Vc.is(t.contents)||Xc.is(t.contents)||Y.typedArray(t.contents,Xc.is))&&(e.range===void 0||J.is(e.range))}e.is=t})(Zc||={});var Qc;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(Qc||={});var $c;(function(e){function t(e,t,...n){let r={label:e};return Y.defined(t)&&(r.documentation=t),Y.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})($c||={});var el;(function(e){e.Text=1,e.Read=2,e.Write=3})(el||={});var tl;(function(e){function t(e,t){let n={range:e};return Y.number(t)&&(n.kind=t),n}e.create=t})(tl||={});var nl;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(nl||={});var rl;(function(e){e.Deprecated=1})(rl||={});var il;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(il||={});var al;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(al||={});var ol;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&Y.string(t.name)&&Y.number(t.kind)&&J.is(t.range)&&J.is(t.selectionRange)&&(t.detail===void 0||Y.string(t.detail))&&(t.deprecated===void 0||Y.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(ol||={});var sl;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(sl||={});var cl;(function(e){e.Invoked=1,e.Automatic=2})(cl||={});var ll;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.typedArray(t.diagnostics,Tc.is)&&(t.only===void 0||Y.typedArray(t.only,Y.string))&&(t.triggerKind===void 0||t.triggerKind===cl.Invoked||t.triggerKind===cl.Automatic)}e.is=n})(ll||={});var ul;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):Ec.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&Y.string(t.title)&&(t.diagnostics===void 0||Y.typedArray(t.diagnostics,Tc.is))&&(t.kind===void 0||Y.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||Ec.is(t.command))&&(t.isPreferred===void 0||Y.boolean(t.isPreferred))&&(t.edit===void 0||Fc.is(t.edit))}e.is=n})(ul||={});var dl;(function(e){function t(e,t){let n={range:e};return Y.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return Y.defined(t)&&J.is(t.range)&&(Y.undefined(t.command)||Ec.is(t.command))}e.is=n})(dl||={});var fl;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&Y.uinteger(t.tabSize)&&Y.boolean(t.insertSpaces)}e.is=n})(fl||={});var pl;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Y.defined(t)&&J.is(t.range)&&(Y.undefined(t.target)||Y.string(t.target))}e.is=n})(pl||={});var ml;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Y.objectLiteral(n)&&J.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(ml||={});var hl;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(hl||={});var gl;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(gl||={});var _l;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(_l||={});var vl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&J.is(t.range)&&Y.string(t.text)}e.is=n})(vl||={});var yl;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&J.is(t.range)&&Y.boolean(t.caseSensitiveLookup)&&(Y.string(t.variableName)||t.variableName===void 0)}e.is=n})(yl||={});var bl;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&J.is(t.range)&&(Y.string(t.expression)||t.expression===void 0)}e.is=n})(bl||={});var xl;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return Y.defined(t)&&J.is(e.stoppedLocation)}e.is=n})(xl||={});var Sl;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(Sl||={});var Cl;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&(t.tooltip===void 0||Y.string(t.tooltip)||Vc.is(t.tooltip))&&(t.location===void 0||mc.is(t.location))&&(t.command===void 0||Ec.is(t.command))}e.is=n})(Cl||={});var wl;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return Y.objectLiteral(t)&&q.is(t.position)&&(Y.string(t.label)||Y.typedArray(t.label,Cl.is))&&(t.kind===void 0||Sl.is(t.kind))&&t.textEdits===void 0||Y.typedArray(t.textEdits,Dc.is)&&(t.tooltip===void 0||Y.string(t.tooltip)||Vc.is(t.tooltip))&&(t.paddingLeft===void 0||Y.boolean(t.paddingLeft))&&(t.paddingRight===void 0||Y.boolean(t.paddingRight))}e.is=n})(wl||={});var Tl;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Tl||={});var El;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(El||={});var Dl;(function(e){function t(e){return{items:e}}e.create=t})(Dl||={});var Ol;(function(e){e.Invoked=0,e.Automatic=1})(Ol||={});var kl;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(kl||={});var Al;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Al||={});var jl;(function(e){function t(e){let t=e;return Y.objectLiteral(t)&&dc.is(t.uri)&&Y.string(t.name)}e.is=t})(jl||={});var Ml;(function(e){function t(e,t,n,r){return new Nl(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(Y.defined(t)&&Y.string(t.uri)&&(Y.undefined(t.languageId)||Y.string(t.languageId))&&Y.uinteger(t.lineCount)&&Y.func(t.getText)&&Y.func(t.positionAt)&&Y.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Ml||={});var Nl=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
73
|
+
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
74
|
+
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return q.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return q.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},Y;(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(Y||={});var Pl=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new zl(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Ll;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new Il(e.startOffset,e.image.length,Rt(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new Il(n.startOffset,n.image.length,Rt(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},Fl=class{get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw Error(`This node has no associated AST element`);return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},Il=class extends Fl{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},Ll=class extends Fl{constructor(){super(...arguments),this.content=new Rl(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else return{start:q.create(0,0),end:q.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},Rl=class e extends Array{constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},zl=class extends Ll{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}};const Bl=Symbol(`Datatype`);function Vl(e){return e.$type===Bl}const Hl=e=>e.endsWith(``)?e:e+``;var Ul=class{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?this.wrapper=new Xl(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):this.wrapper=new Yl(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Wl=class extends Ul{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Pl,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;Ve(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(Hl(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),rt(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){let r=e.operators.precedences[t];for(let e of r.operators)n.set(e.value,{precedence:t,rightAssoc:r.associativity===`right`})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return Ve(e)?Fn(e):e.fragment?void 0:Mn(e)?Bl:Fn(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw Error(t.rule?`No rule found with name '${t.rule}'`:`No main rule available.`);let i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,ne(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===Bl?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=L(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(Vl(o)){let e=r.image;L(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(Vl(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):Vl(e)?this.converter.convert(e.value,e.$cstNode):(se(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;e<r.length;e++){let n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>a?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=re(e,be);this.assignmentMap.set(e,{assignment:t,crossRef:t&&ke(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Gl=class{buildMismatchTokenMessage(e){return ea.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return ea.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return ea.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return ea.buildEarlyExitMessage(e)}},Kl=class extends Gl{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},ql=class extends Ul{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),this.tokens=this.lexer.tokenize(e,{mode:`partial`}).tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(Hl(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}};const Jl={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new Kl};var Yl=class extends ns{constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...Jl,lookaheadStrategy:n?new yo({maxLookahead:t.maxLookahead}):new Rs({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},Xl=class extends Yl{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}};function Zl(e,t,n){return Ql({parser:t,tokens:n,ruleNames:new Map},e),t}function Ql(e,t){let n=bn(t,!1),r=O(t.rules).filter(rt).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,eu(n,t.definition))}let i=O(t.rules).filter(Ve).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,$l(e,t))}function $l(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(bt(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},o={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,o);let s={$container:o,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},c={...a,$container:o};o.elements.push(s,c);let l=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,s)})),u;return t=>{u??=fu(e,n),e.parser.subrule(0,u,!1,a,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,l),e.parser.subrule(1,u,!1,c,t)}})}}function eu(e,t,n=!1){let r;if(L(t))r=uu(e,t);else if(me(t))r=tu(e,t);else if(be(t))r=eu(e,t.terminal);else if(ke(t))r=lu(e,t);else if(ut(t))r=nu(e,t);else if(ge(t))r=au(e,t);else if(kt(t))r=ou(e,t);else if(Le(t))r=su(e,t);else if(Ne(t)){let n=e.consume++;r=()=>e.parser.consume(n,Zi,t)}else throw new qt(t.$cstNode,`Unexpected element type: ${t.$type}`);return du(e,n?void 0:cu(t),r,t.cardinality)}function tu(e,t){let n=Fn(t);return()=>e.parser.action(n,t)}function nu(e,t){let n=t.rule.ref;if(de(n)){let r=e.subrule++,i=rt(n)&&n.fragment,a=t.arguments.length>0?ru(n,t.arguments):()=>({}),o;return s=>{o??=fu(e,n),e.parser.subrule(r,o,i,t,a(s))}}else if(bt(n)){let r=e.consume++,i=mu(e,n.name);return()=>e.parser.consume(r,i,t)}else if(n)Jt(n);else throw new qt(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function ru(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:iu(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}else{let n=t.map(e=>iu(e.value));return t=>{let r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){let a=e.parameters[i].name,o=n[i];r[a]=o(t)}return r}}}function iu(e){if(je(e)){let t=iu(e.left),n=iu(e.right);return e=>t(e)||n(e)}else if(De(e)){let t=iu(e.left),n=iu(e.right);return e=>t(e)&&n(e)}else if(Ze(e)){let t=iu(e.value);return e=>!t(e)}else if(tt(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}else if(Se(e)){let t=!!e.true;return()=>t}Jt(e)}function au(e,t){if(t.elements.length===1)return eu(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:eu(e,r,!0)},i=cu(r);i&&(t.GATE=iu(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}function ou(e,t){if(t.elements.length===1)return eu(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:eu(e,r,!0)},i=cu(r);i&&(t.GATE=iu(i)),n.push(t)}let r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,a=du(e,cu(t),t=>e.parser.alternatives(r,n.map((n,a)=>{let o={ALT:()=>!0},s=e.parser;o.ALT=()=>{if(n.ALT(t),!s.isRecording()){let e=i(r,s);s.unorderedGroups.get(e)||s.unorderedGroups.set(e,[]);let t=s.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let c=n.GATE;return c?o.GATE=()=>c(t):o.GATE=()=>!s.unorderedGroups.get(i(r,s))?.[a],o})),`*`);return t=>{a(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}function su(e,t){let n=t.elements.map(t=>eu(e,t));return e=>n.forEach(t=>t(e))}function cu(e){if(Le(e))return e.guardCondition}function lu(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=An(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+Fn(t.type.ref));return lu(e,t,n)}else if(ut(n)&&rt(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=fu(e,r),e.parser.subrule(i,a,!1,t,n)}}else if(ut(n)&&bt(n.rule.ref)){let r=e.consume++,i=mu(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(L(n)){let r=e.consume++,i=mu(e,n.value);return()=>e.parser.consume(r,i,t)}else throw Error(`Could not build cross reference parser`)}function uu(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}function du(e,t,n,r){let i=t&&iu(t);if(!r)if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:es(),GATE:()=>!i(r)}])}else return n;if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}else if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(a)}),GATE:()=>i(a)},{ALT:es(),GATE:()=>!i(a)}])}else return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}else if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}else Jt(r)}function fu(e,t){let n=pu(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}function pu(e,t){if(de(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!rt(r);)(Le(r)||ge(r)||kt(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}function mu(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}function hu(e){let t=e.Grammar,n=e.parser.Lexer,r=new ql(e);return Zl(t,r,n.definition),r.finalize(),r}function gu(e){let t=_u(e);return t.finalize(),t}function _u(e){let t=e.Grammar,n=e.parser.Lexer;return Zl(t,new Wl(e),n.definition)}var vu=class{constructor(){this.diagnostics=[]}buildTokens(e,t){let n=O(bn(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(bt).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=Rn(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=mn(t)?Ri.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(de).flatMap(e=>M(e).filter(L)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(hn(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&gn(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},yu=class{convert(e,t){let n=t.grammarSource;if(ke(n)&&(n=Sn(n)),ut(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return bu.convertInt(t);case`STRING`:return bu.convertString(t);case`ID`:return bu.convertID(t)}switch(Ln(e)?.toLowerCase()){case`number`:return bu.convertNumber(t);case`boolean`:return bu.convertBoolean(t);case`bigint`:return bu.convertBigint(t);case`date`:return bu.convertDate(t);default:return t}}},bu;(function(e){function t(e){let t=``;for(let r=1;r<e.length-1;r++){let i=e.charAt(r);if(i===`\\`){let i=e.charAt(++r);t+=n(i)}else t+=i}return t}e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
|
75
|
+
`;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}function r(e){return e.charAt(0)===`^`?e.substring(1):e}e.convertID=r;function i(e){return parseInt(e)}e.convertInt=i;function a(e){return BigInt(e)}e.convertBigint=a;function o(e){return new Date(e)}e.convertDate=o;function s(e){return Number(e)}e.convertNumber=s;function c(e){return e.toLowerCase()===`true`}e.convertBoolean=c})(bu||={});var xu=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0});let t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}e.install=n})(n||={}),e.default=n})),Su=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s})),Cu=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Emitter=e.Event=void 0;let t=xu();var n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e)if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}else n=!0;if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}})),wu=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;let t=xu(),n=Su(),r=Cu();var i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(i||(e.CancellationToken=i={}));let a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}});var o=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{get token(){return this._token||=new o,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None}}})),X=n({});t(X,r(wu(),1));function Tu(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}let Eu=0;function Du(){return Eu=performance.now(),new X.CancellationTokenSource}const Ou=Symbol(`OperationCancelled`);function ku(e){return e===Ou}async function Au(e){if(e===X.CancellationToken.None)return;let t=performance.now();if(t-Eu>=10&&(Eu=t,await Tu(),Eu=performance.now()),e.isCancellationRequested)throw Ou}var ju=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},Mu=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=Lu(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Fu(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Fu(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Iu(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Nu;(function(e){function t(e,t,n,r){return new Mu(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof Mu)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e.update=n;function r(e,t){let n=e.getText(),r=Pu(t.map(Ru),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e.applyEdits=r})(Nu||={});function Pu(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Pu(r,t),Pu(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function Fu(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Iu(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function Iu(e){return e===13||e===10}function Lu(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ru(e){let t=Lu(e.range);return t===e.range?e:{newText:e.newText,range:t}}var zu;(()=>{var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(!(a===s-1||o===1))if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>u,Utils:()=>C}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function c(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!o.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(s.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}let l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,c(this,a))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new f(t,n,r,i,a)}static parse(e,t=!1){let n=l.exec(e);return n?new f(n[2]||``,b(n[4]||``),b(n[5]||``),b(n[7]||``),b(n[9]||``),t):new f(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new f(`file`,t,e,``,``)}static from(e){let t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return _(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{let t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}let d=i?1:void 0;class f extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=g(this,!1),this._fsPath}toString(e=!1){return e?_(this,!0):(this._formatted||=_(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let p={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function m(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=p[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function h(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=p[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function g(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}function _(e,t){let n=t?h:m,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:m(c,!1,!1)),r}function v(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+v(e.substr(3)):e}}let y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match(y)?e.replace(y,(e=>v(e))):e}var x=n(975);let S=x.posix||x;var C;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(C||={}),zu=r})();const{URI:Bu,Utils:Vu}=zu;var Hu;(function(e){e.basename=Vu.basename,e.dirname=Vu.dirname,e.extname=Vu.extname,e.joinPath=Vu.joinPath,e.resolvePath=Vu.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}e.equals=n;function r(e,n){let r=typeof e==`string`?Bu.parse(e).path:e.path,i=typeof n==`string`?Bu.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return`../`.repeat(a.length-s)+o.slice(s).join(`/`)}e.relative=r;function i(e){return Bu.parse(e.toString()).toString()}e.normalize=i;function a(e,t){let n=typeof e==`string`?e:e.path,r=typeof t==`string`?t:t.path;return r.charAt(r.length-1)===`/`&&(r=r.slice(0,-1)),n.charAt(n.length-1)===`/`&&(n=n.slice(0,-1)),r===n?!0:r.length<n.length||r.charAt(n.length)!==`/`?!1:r.startsWith(n)}e.contains=a})(Hu||={});var Uu=class{constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return Hu.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let n=this.getNode(this.normalizeUri(e),!0);n.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:Hu.joinPath(Bu.parse(t),n.name).toString(),element:n.element}}findChildren(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:Hu.joinPath(Bu.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Hu.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n)if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return;r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},Z;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(Z||={});var Wu=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=X.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=Bu.parse(e.uri),X.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return X.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Z.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Z.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,`textDocument`,{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,`textDocument`,{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Nu.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},Gu=class{constructor(e){this.documentTrie=new Uu,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return O(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Z.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Z.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=Z.Changed;return this.documentTrie.delete(t),n}};const Ku=Symbol(`RefResolving`);var qu=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=X.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of N(e.parseResult.value))await Au(t),P(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of N(e.parseResult.value))await Au(t),P(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=Ku;try{let t=this.getCandidate(e);y(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=Ku;try{let t=this.getCandidates(e),r=[];if(y(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(h(this._ref))return this._ref;if(v(this._nodeDescription))this._ref=i.loadAstNode(this._nodeDescription)??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription);else if(this._ref===void 0){this._ref=Ku;let n=ie(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state<Z.ComputedScopes){this._ref=void 0;return}this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===Ku&&i.throwCyclicReferenceError(e,t,r);return h(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return y(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=Ku;let n=ie(e).$document,r=i.getCandidates({reference:a,container:e,property:t}),o=[];if(y(r))this._linkingError=r;else for(let e of r){let t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===Ku&&i.throwCyclicReferenceError(e,t,r);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(y(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=ie(e.container).$document;return n&&n.state<Z.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}};function Ju(e){return typeof e.name==`string`}var Yu=class{getName(e){if(Ju(e))return e.name}getNameNode(e){return Tn(e.$cstNode,`name`)}},Xu=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=N(e.Grammar).some(e=>ke(e)&&e.isMulti)}findDeclarations(e){if(e){let t=kn(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(g(r)||_(r))return ae(r);if(Array.isArray(r)){for(let t of r)if((g(t)||_(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return ae(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||Lt(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of P(n))if(_(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>Hu.equals(e.sourceUri,t.documentUri))),n.push(...r),O(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=A(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:zt(t),local:!0})}}return n}},Zu=class{constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return te.sum(O(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?O(t):ee}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return O(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return O(this.map.keys())}values(){return O(this.map.values()).flat()}entriesGroupedByKey(){return O(this.map.entries())}},Qu=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t===void 0?!1:(this.map.delete(e),this.inverse.delete(t),!0)}},$u=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=X.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=j,r=X.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Au(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=X.CancellationToken.None){let n=e.parseResult.value,r=new Zu;for(let i of M(n))await Au(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},ed=class{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},td=class{constructor(e,t,n){this.elements=new Zu,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?O(n).concat(this.outerScope.getElements(e)):O(n)}getAllElements(){let e=O(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},nd=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},rd=class extends nd{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},id=class extends nd{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},ad=class extends rd{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},od=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ad(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=A(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new ed(O(e),t,n)}createScopeForNodes(e,t,n){return new ed(O(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new td(this.indexManager.allElements(e)))}};function sd(e){return typeof e.$comment==`string`}function cd(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}var ld=class{constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=A(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(g(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=A(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}else if(_(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=A(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}else if(h(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=wn(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a<i.length;a++){let o=i[a];cd(o)?i[a]=this.reviveReference(e,r,t,o,n):h(o)&&this.linkNode(o,t,n,e,r,a)}else cd(i)?e[r]=this.reviveReference(e,r,t,i,n):h(i)&&this.linkNode(i,t,n,e,r);let o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=a}reviveReference(e,t,n,r,i){let a=r.$refText,o=r.$error,s;if(r.$ref){let e=this.getRefNode(n,r.$ref,i.uriConverter);if(h(e))return a||=this.nameProvider.getName(e),{$refText:a??``,ref:e};o=e}else if(r.$refs){let e=[];for(let t of r.$refs){let r=this.getRefNode(n,t,i.uriConverter);h(r)&&e.push({ref:r})}if(e.length===0)s={$refText:a??``,items:e},o??=`Could not resolve multi-reference`;else return{$refText:a??``,items:e}}if(o)return s??={$refText:a??``,ref:void 0},s.error={info:{container:e,property:t,reference:s},message:o},s}getRefNode(e,t,n){try{let r=t.indexOf(`#`);if(r===0)return this.astNodeLocator.getAstNode(e,t.substring(1))||`Could not resolve path: `+t;if(r<0){let e=n?n(t):Bu.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:`Could not find document for URI: `+t}let i=n?n(t.substring(0,r)):Bu.parse(t.substring(0,r)),a=this.langiumDocuments.getDocument(i);return a?r===t.length-1?a.parseResult.value:this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(r+1))||`Could not resolve URI: `+t:`Could not find document for URI: `+t}catch(e){return String(e)}}},ud=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(let n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let e=this.languageIdMap.get(t);if(e)return e}let n=Hu.extname(e),r=Hu.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw Error(t?`The service registry contains no services for the extension '${n}' for language '${t}'.`:`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function dd(e){return{code:e}}var fd;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(fd||={});var pd=class{constructor(e){this.entries=new Zu,this.knownCategories=new Set(fd.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n=`fast`){if(n===`built-in`)throw Error(`The 'built-in' category is reserved for lexer, parser, and linker errors.`);this.knownCategories.add(n);for(let[r,i]of Object.entries(e)){let e=i;if(Array.isArray(e))for(let i of e){let e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if(typeof e==`function`){let i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else Jt(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(ku(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=O(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}};const md=Object.freeze({validateNode:!0,validateChildren:!0});var hd=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=X.CancellationToken.None){let r=e.parseResult,i=[];if(await Au(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===yd.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===yd.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===yd.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(ku(e))throw e;console.error(`An error occurred during validation:`,e)}return await Au(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:_d(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:vd(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=Rt(n.token);if(e){let r={severity:_d(`error`),range:e,message:n.message,data:dd(yd.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:yd.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=X.CancellationToken.None){let r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=X.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Au(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=X.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=N(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=N(e).iterator();for(let e of i){await Au(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return md}async validateAstAfter(e,t,n,r=X.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Au(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:gd(n),severity:_d(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function gd(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Tn(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Dn(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function _d(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}function vd(e){switch(e){case`error`:return dd(yd.LexingError);case`warning`:return dd(yd.LexingWarning);case`info`:return dd(yd.LexingInfo);case`hint`:return dd(yd.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}var yd;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(yd||={});var bd=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??A(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,o=()=>a??=zt(this.nameProvider.getNameNode(e)??e.$cstNode);return{node:e,name:t,get nameSegment(){return o()},selectionSegment:zt(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},xd=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of N(r))await Au(t),P(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];g(t)&&t.$nodeDescription?n=[t.$nodeDescription]:_(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=A(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=zt(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:Hu.equals(e.documentUri,r)});return a}},Sd=class{constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},Cd=n({});t(Cd,r(Cu(),1));var wd=class{constructor(e){this._ready=new ju,this.onConfigurationSectionUpdateEmitter=new Cd.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!=`object`||e.settings===null||Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},Td=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;let t=Su();var n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{constructor(e){super(e,0)}},e.RequestType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{constructor(e){super(e,2)}},e.RequestType3=class extends i{constructor(e){super(e,3)}},e.RequestType4=class extends i{constructor(e){super(e,4)}},e.RequestType5=class extends i{constructor(e){super(e,5)}},e.RequestType6=class extends i{constructor(e){super(e,6)}},e.RequestType7=class extends i{constructor(e){super(e,7)}},e.RequestType8=class extends i{constructor(e){super(e,8)}},e.RequestType9=class extends i{constructor(e){super(e,9)}},e.NotificationType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{constructor(e){super(e,0)}},e.NotificationType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{constructor(e){super(e,2)}},e.NotificationType3=class extends i{constructor(e){super(e,3)}},e.NotificationType4=class extends i{constructor(e){super(e,4)}},e.NotificationType5=class extends i{constructor(e){super(e,5)}},e.NotificationType6=class extends i{constructor(e){super(e,6)}},e.NotificationType7=class extends i{constructor(e){super(e,7)}},e.NotificationType8=class extends i{constructor(e){super(e,8)}},e.NotificationType9=class extends i{constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}e.isResponse=i})(a||(e.Message=a={}))})),Ed=i((e=>{var t;Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}else return{value:void 0,done:!0}}};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(!(t!==n.First&&t!==n.Last)){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),Dd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}e.create=t})(t||(e.Disposable=t={}))})),Od=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;let t=wu();var n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}})),kd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Semaphore=void 0;let t=xu();e.Semaphore=class{constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}})),Ad=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;let t=xu(),n=Su(),r=Cu(),i=kd();var a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}e.is=t})(a||(e.MessageReader=a={}));var o=class{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=o;var s;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}e.fromOptions=n})(s||={}),e.ReadableStreamMessageReader=class extends o{constructor(e,n){super(),this.readable=e,this.options=s.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}})),jd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;let t=xu(),n=Su(),r=kd(),i=Cu();var a;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}e.is=t})(a||(e.MessageWriter=a={}));var o=class{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=o;var s;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.fromOptions=n})(s||={}),e.WriteableStreamMessageWriter=class extends o{constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(`Content-Length: `,t.byteLength.toString(),`\r
|
|
76
|
+
`),n.push(`\r
|
|
77
|
+
`),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}})),Md=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AbstractMessageBuffer=void 0,e.AbstractMessageBuffer=class{constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,n=0,r=0,i=0;row:for(;n<this._chunks.length;){let e=this._chunks[n];r=0;column:for(;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break row;default:t=0}break;default:t=0}r++}i+=e.byteLength,n++}if(t!==4)return;let a=this._read(i+r),o=new Map,s=this.toString(a,`ascii`).split(`\r
|
|
78
|
+
`);if(s.length<2)return o;for(let t=0;t<s.length-2;t++){let n=s[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'\n${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();o.set(e?i.toLowerCase():i,a)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}})),Nd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;let t=xu(),n=Su(),r=Td(),i=Ed(),a=Cu(),o=wu();var s;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(s||={});var c;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}e.is=t})(c||(e.ProgressToken=c={}));var l;(function(e){e.type=new r.NotificationType(`$/progress`)})(l||={}),e.ProgressType=class{constructor(){}};var u;(function(e){function t(e){return n.func(e)}e.is=t})(u||={}),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(d||(e.Trace=d={}));var f;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(f||(e.TraceValues=f={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}e.toString=r})(d||(e.Trace=d={}));var p;(function(e){e.Text=`text`,e.JSON=`json`})(p||(e.TraceFormat=p={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}e.fromString=t})(p||(e.TraceFormat=p={}));var m;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(m||(e.SetTraceNotification=m={}));var h;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(h||(e.LogTraceNotification=h={}));var g;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(g||(e.ConnectionErrors=g={}));var _=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=_;var v;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}e.is=t})(v||(e.ConnectionStrategy=v={}));var y;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(y||(e.IdCancellationReceiverStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(b||(e.RequestCancellationReceiverStrategy=b={}));var x;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new o.CancellationTokenSource}});function t(e){return y.is(e)||b.is(e)}e.is=t})(x||(e.CancellationReceiverStrategy=x={}));var S;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(s.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}e.is=t})(S||(e.CancellationSenderStrategy=S={}));var C;(function(e){e.Message=Object.freeze({receiver:x.Message,sender:S.Message});function t(e){let t=e;return t&&x.is(t.receiver)&&S.is(t.sender)}e.is=t})(C||(e.CancellationStrategy=C={}));var w;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}e.is=t})(w||(e.MessageStrategy=w={}));var T;(function(e){function t(e){let t=e;return t&&(C.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||w.is(t.messageStrategy))}e.is=t})(T||(e.ConnectionOptions=T={}));var E;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(E||={});function ee(f,v,b,x){let S=b===void 0?e.NullLogger:b,T=0,ee=0,D=0,O,k=new Map,te,ne=new Map,re=new Map,A,ie=new i.LinkedMap,ae=new Map,j=new Set,M=new Map,N=d.Off,oe=p.Text,P,se=E.New,ce=new a.Emitter,F=new a.Emitter,le=new a.Emitter,ue=new a.Emitter,de=new a.Emitter,fe=x&&x.cancellationStrategy?x.cancellationStrategy:C.Message;function I(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}function pe(e){return e===null?`res-unknown-`+(++D).toString():`res-`+e.toString()}function me(){return`not-`+(++ee).toString()}function he(e,t){r.Message.isRequest(t)?e.set(I(t.id),t):r.Message.isResponse(t)?e.set(pe(t.id),t):e.set(me(),t)}function ge(e){}function _e(){return se===E.Listening}function ve(){return se===E.Closed}function ye(){return se===E.Disposed}function be(){(se===E.New||se===E.Listening)&&(se=E.Closed,F.fire(void 0))}function xe(e){ce.fire([e,void 0,void 0])}function Se(e){ce.fire(e)}f.onClose(be),f.onError(xe),v.onClose(be),v.onError(Se);function Ce(){A||ie.size===0||(A=(0,t.default)().timer.setImmediate(()=>{A=void 0,Te()}))}function we(e){r.Message.isRequest(e)?De(e):r.Message.isNotification(e)?ke(e):r.Message.isResponse(e)?Oe(e):Ae(e)}function Te(){if(ie.size===0)return;let e=ie.shift();try{let t=x?.messageStrategy;w.is(t)?t.handleMessage(e,we):we(e)}finally{Ce()}}let Ee=e=>{try{if(r.Message.isNotification(e)&&e.method===s.type.method){let t=e.params.id,n=I(t),i=ie.get(n);if(r.Message.isRequest(i)){let r=x?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,ge):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){ie.delete(n),M.delete(t),a.id=i.id,Pe(a,e.method,Date.now()),v.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=M.get(t);if(a!==void 0){a.cancel(),Ie(e);return}else j.add(t)}he(ie,e)}finally{Ce()}};function De(e){if(ye())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,Pe(a,n,i),v.write(a).catch(()=>S.error(`Sending response failed.`))}function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};Pe(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};Pe(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}Fe(e);let o=k.get(e.method),s,c;o&&(s=o.type,c=o.handler);let l=Date.now();if(c||O){let o=e.id??String(Date.now()),u=y.is(fe.receiver)?fe.receiver.createCancellationTokenSource(o):fe.receiver.createCancellationTokenSource(e);e.id!==null&&j.has(e.id)&&u.cancel(),e.id!==null&&M.set(o,u);try{let d;if(c)if(e.params===void 0){if(s!==void 0&&s.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,l);return}d=c(u.token)}else if(Array.isArray(e.params)){if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);return}d=c(...e.params,u.token)}else{if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);return}d=c(e.params,u.token)}else O&&(d=O(e.method,e.params,u.token));let f=d;d?f.then?f.then(n=>{M.delete(o),t(n,e.method,l)},t=>{M.delete(o),t instanceof r.ResponseError?i(t,e.method,l):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(M.delete(o),t(d,e.method,l)):(M.delete(o),a(d,e.method,l))}catch(a){M.delete(o),a instanceof r.ResponseError?t(a,e.method,l):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}function Oe(e){if(!ye())if(e.id===null)e.error?S.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):S.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=ae.get(t);if(Le(e,n),n!==void 0){ae.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function ke(e){if(ye())return;let t,n;if(e.method===s.type.method){let t=e.params.id;j.delete(t),Ie(e);return}else{let r=ne.get(e.method);r&&(n=r.handler,t=r.type)}if(n||te)try{if(Ie(e),n)if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===l.type.method&&i.length===2&&c.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else te&&te(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else le.fire(e)}function Ae(e){if(!e){S.error(`Received empty message.`);return}S.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=ae.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}function je(e){if(e!=null)switch(N){case d.Verbose:return JSON.stringify(e,null,4);case d.Compact:return JSON.stringify(e);default:return}}function Me(e){if(!(N===d.Off||!P))if(oe===p.Text){let t;(N===d.Verbose||N===d.Compact)&&e.params&&(t=`Params: ${je(e.params)}\n\n`),P.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Re(`send-request`,e)}function Ne(e){if(!(N===d.Off||!P))if(oe===p.Text){let t;(N===d.Verbose||N===d.Compact)&&(t=e.params?`Params: ${je(e.params)}\n\n`:`No parameters provided.
|
|
79
|
+
|
|
80
|
+
`),P.log(`Sending notification '${e.method}'.`,t)}else Re(`send-notification`,e)}function Pe(e,t,n){if(!(N===d.Off||!P))if(oe===p.Text){let r;(N===d.Verbose||N===d.Compact)&&(e.error&&e.error.data?r=`Error data: ${je(e.error.data)}\n\n`:e.result?r=`Result: ${je(e.result)}\n\n`:e.error===void 0&&(r=`No result returned.
|
|
81
|
+
|
|
82
|
+
`)),P.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Re(`send-response`,e)}function Fe(e){if(!(N===d.Off||!P))if(oe===p.Text){let t;(N===d.Verbose||N===d.Compact)&&e.params&&(t=`Params: ${je(e.params)}\n\n`),P.log(`Received request '${e.method} - (${e.id})'.`,t)}else Re(`receive-request`,e)}function Ie(e){if(!(N===d.Off||!P||e.method===h.type.method))if(oe===p.Text){let t;(N===d.Verbose||N===d.Compact)&&(t=e.params?`Params: ${je(e.params)}\n\n`:`No parameters provided.
|
|
83
|
+
|
|
84
|
+
`),P.log(`Received notification '${e.method}'.`,t)}else Re(`receive-notification`,e)}function Le(e,t){if(!(N===d.Off||!P))if(oe===p.Text){let n;if((N===d.Verbose||N===d.Compact)&&(e.error&&e.error.data?n=`Error data: ${je(e.error.data)}\n\n`:e.result?n=`Result: ${je(e.result)}\n\n`:e.error===void 0&&(n=`No result returned.
|
|
85
|
+
|
|
86
|
+
`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;P.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else P.log(`Received response ${e.id} without active response promise.`,n)}else Re(`receive-response`,e)}function Re(e,t){if(!P||N===d.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};P.log(n)}function ze(){if(ve())throw new _(g.Closed,`Connection is closed.`);if(ye())throw new _(g.Disposed,`Connection is disposed.`)}function Be(){if(_e())throw new _(g.AlreadyListening,`Connection is already listening`)}function Ve(){if(!_e())throw Error(`Call listen() first.`)}function He(e){return e===void 0?null:e}function Ue(e){if(e!==null)return e}function We(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}function Ge(e,t){switch(e){case r.ParameterStructures.auto:return We(t)?Ue(t):[He(t)];case r.ParameterStructures.byName:if(!We(t))throw Error(`Received parameters by name but param is not an object literal.`);return Ue(t);case r.ParameterStructures.byPosition:return[He(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}function Ke(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(He(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null);break}return n}let L={sendNotification:(e,...t)=>{ze();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=Ge(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>He(e));break}}else{let n=t;i=e.method,a=Ke(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return Ne(o),v.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},onNotification:(e,t)=>{ze();let r;return n.func(e)?te=e:t&&(n.string(e)?(r=e,ne.set(e,{type:void 0,handler:t})):(r=e.method,ne.set(e.method,{type:e,handler:t}))),{dispose:()=>{r===void 0?te=void 0:ne.delete(r)}}},onProgress:(e,t,n)=>{if(re.has(t))throw Error(`Progress handler for token ${t} already registered`);return re.set(t,n),{dispose:()=>{re.delete(t)}}},sendProgress:(e,t,n)=>L.sendNotification(l.type,{token:t,value:n}),onUnhandledProgress:ue.event,sendRequest:(e,...t)=>{ze(),Ve();let i,a,s;if(n.string(e)){i=e;let n=t[0],c=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;o.CancellationToken.is(c)&&(--d,s=c);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=Ge(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>He(e));break}}else{let n=t;i=e.method,a=Ke(e,n);let r=e.numberOfParams;s=o.CancellationToken.is(n[r])?n[r]:void 0}let c=T++,l;s&&(l=s.onCancellationRequested(()=>{let e=fe.sender.sendCancellation(L,c);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${c} failed`)})}));let u={jsonrpc:`2.0`,id:c,method:i,params:a};return Me(u),typeof fe.sender.enableCancellation==`function`&&fe.sender.enableCancellation(u),new Promise(async(e,t)=>{let n={method:i,timerStart:Date.now(),resolve:t=>{e(t),fe.sender.cleanup(c),l?.dispose()},reject:e=>{t(e),fe.sender.cleanup(c),l?.dispose()}};try{await v.write(u),ae.set(c,n)}catch(e){throw S.error(`Sending request failed.`),n.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},onRequest:(e,t)=>{ze();let r=null;return u.is(e)?(r=void 0,O=e):n.string(e)?(r=null,t!==void 0&&(r=e,k.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,k.set(e.method,{type:e,handler:t})),{dispose:()=>{r!==null&&(r===void 0?O=void 0:k.delete(r))}}},hasPendingResponse:()=>ae.size>0,trace:async(e,t,r)=>{let i=!1,a=p.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||p.Text)),N=e,oe=a,P=N===d.Off?void 0:t,i&&!ve()&&!ye()&&await L.sendNotification(m.type,{value:d.toString(e)})},onError:ce.event,onClose:F.event,onUnhandledNotification:le.event,onDispose:de.event,end:()=>{v.end()},dispose:()=>{if(ye())return;se=E.Disposed,de.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of ae.values())t.reject(e);ae=new Map,M=new Map,j=new Set,ie=new i.LinkedMap,n.func(v.dispose)&&v.dispose(),n.func(f.dispose)&&f.dispose()},listen:()=>{ze(),Be(),se=E.Listening,f.listen(Ee)},inspect:()=>{(0,t.default)().console.log(`inspect`)}};return L.onNotification(h.type,e=>{if(N===d.Off||!P)return;let t=N===d.Verbose||N===d.Compact;P.log(e.message,t?e.verbose:void 0)}),L.onNotification(l.type,e=>{let t=re.get(e.token);t?t(e.value):ue.fire(e)}),L}e.createMessageConnection=ee})),Pd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;let t=Td();Object.defineProperty(e,`Message`,{enumerable:!0,get:function(){return t.Message}}),Object.defineProperty(e,`RequestType`,{enumerable:!0,get:function(){return t.RequestType}}),Object.defineProperty(e,`RequestType0`,{enumerable:!0,get:function(){return t.RequestType0}}),Object.defineProperty(e,`RequestType1`,{enumerable:!0,get:function(){return t.RequestType1}}),Object.defineProperty(e,`RequestType2`,{enumerable:!0,get:function(){return t.RequestType2}}),Object.defineProperty(e,`RequestType3`,{enumerable:!0,get:function(){return t.RequestType3}}),Object.defineProperty(e,`RequestType4`,{enumerable:!0,get:function(){return t.RequestType4}}),Object.defineProperty(e,`RequestType5`,{enumerable:!0,get:function(){return t.RequestType5}}),Object.defineProperty(e,`RequestType6`,{enumerable:!0,get:function(){return t.RequestType6}}),Object.defineProperty(e,`RequestType7`,{enumerable:!0,get:function(){return t.RequestType7}}),Object.defineProperty(e,`RequestType8`,{enumerable:!0,get:function(){return t.RequestType8}}),Object.defineProperty(e,`RequestType9`,{enumerable:!0,get:function(){return t.RequestType9}}),Object.defineProperty(e,`ResponseError`,{enumerable:!0,get:function(){return t.ResponseError}}),Object.defineProperty(e,`ErrorCodes`,{enumerable:!0,get:function(){return t.ErrorCodes}}),Object.defineProperty(e,`NotificationType`,{enumerable:!0,get:function(){return t.NotificationType}}),Object.defineProperty(e,`NotificationType0`,{enumerable:!0,get:function(){return t.NotificationType0}}),Object.defineProperty(e,`NotificationType1`,{enumerable:!0,get:function(){return t.NotificationType1}}),Object.defineProperty(e,`NotificationType2`,{enumerable:!0,get:function(){return t.NotificationType2}}),Object.defineProperty(e,`NotificationType3`,{enumerable:!0,get:function(){return t.NotificationType3}}),Object.defineProperty(e,`NotificationType4`,{enumerable:!0,get:function(){return t.NotificationType4}}),Object.defineProperty(e,`NotificationType5`,{enumerable:!0,get:function(){return t.NotificationType5}}),Object.defineProperty(e,`NotificationType6`,{enumerable:!0,get:function(){return t.NotificationType6}}),Object.defineProperty(e,`NotificationType7`,{enumerable:!0,get:function(){return t.NotificationType7}}),Object.defineProperty(e,`NotificationType8`,{enumerable:!0,get:function(){return t.NotificationType8}}),Object.defineProperty(e,`NotificationType9`,{enumerable:!0,get:function(){return t.NotificationType9}}),Object.defineProperty(e,`ParameterStructures`,{enumerable:!0,get:function(){return t.ParameterStructures}});let n=Ed();Object.defineProperty(e,`LinkedMap`,{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(e,`LRUCache`,{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(e,`Touch`,{enumerable:!0,get:function(){return n.Touch}});let r=Dd();Object.defineProperty(e,`Disposable`,{enumerable:!0,get:function(){return r.Disposable}});let i=Cu();Object.defineProperty(e,`Event`,{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(e,`Emitter`,{enumerable:!0,get:function(){return i.Emitter}});let a=wu();Object.defineProperty(e,`CancellationTokenSource`,{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(e,`CancellationToken`,{enumerable:!0,get:function(){return a.CancellationToken}});let o=Od();Object.defineProperty(e,`SharedArraySenderStrategy`,{enumerable:!0,get:function(){return o.SharedArraySenderStrategy}}),Object.defineProperty(e,`SharedArrayReceiverStrategy`,{enumerable:!0,get:function(){return o.SharedArrayReceiverStrategy}});let s=Ad();Object.defineProperty(e,`MessageReader`,{enumerable:!0,get:function(){return s.MessageReader}}),Object.defineProperty(e,`AbstractMessageReader`,{enumerable:!0,get:function(){return s.AbstractMessageReader}}),Object.defineProperty(e,`ReadableStreamMessageReader`,{enumerable:!0,get:function(){return s.ReadableStreamMessageReader}});let c=jd();Object.defineProperty(e,`MessageWriter`,{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(e,`AbstractMessageWriter`,{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(e,`WriteableStreamMessageWriter`,{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});let l=Md();Object.defineProperty(e,`AbstractMessageBuffer`,{enumerable:!0,get:function(){return l.AbstractMessageBuffer}});let u=Nd();Object.defineProperty(e,`ConnectionStrategy`,{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(e,`ConnectionOptions`,{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(e,`NullLogger`,{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(e,`createMessageConnection`,{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(e,`ProgressToken`,{enumerable:!0,get:function(){return u.ProgressToken}}),Object.defineProperty(e,`ProgressType`,{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(e,`Trace`,{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(e,`TraceValues`,{enumerable:!0,get:function(){return u.TraceValues}}),Object.defineProperty(e,`TraceFormat`,{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(e,`SetTraceNotification`,{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(e,`LogTraceNotification`,{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(e,`ConnectionErrors`,{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(e,`ConnectionError`,{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(e,`CancellationReceiverStrategy`,{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(e,`CancellationSenderStrategy`,{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(e,`CancellationStrategy`,{enumerable:!0,get:function(){return u.CancellationStrategy}}),Object.defineProperty(e,`MessageStrategy`,{enumerable:!0,get:function(){return u.MessageStrategy}}),e.RAL=xu().default})),Fd=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0});let n=e(`util`),r=Pd();var i=class e extends r.AbstractMessageBuffer{constructor(e=`utf-8`){super(e)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new n.TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}};i.emptyBuffer=Buffer.allocUnsafe(0);var a=class{constructor(e){this.stream=e}onClose(e){return this.stream.on(`close`,e),r.Disposable.create(()=>this.stream.off(`close`,e))}onError(e){return this.stream.on(`error`,e),r.Disposable.create(()=>this.stream.off(`error`,e))}onEnd(e){return this.stream.on(`end`,e),r.Disposable.create(()=>this.stream.off(`end`,e))}onData(e){return this.stream.on(`data`,e),r.Disposable.create(()=>this.stream.off(`data`,e))}},o=class{constructor(e){this.stream=e}onClose(e){return this.stream.on(`close`,e),r.Disposable.create(()=>this.stream.off(`close`,e))}onError(e){return this.stream.on(`error`,e),r.Disposable.create(()=>this.stream.off(`error`,e))}onEnd(e){return this.stream.on(`end`,e),r.Disposable.create(()=>this.stream.off(`end`,e))}write(e,t){return new Promise((n,r)=>{let i=e=>{e==null?n():r(e)};typeof e==`string`?this.stream.write(e,t,i):this.stream.write(e,i)})}end(){this.stream.end()}};let s=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:`application/json`,decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new a(e),asWritableStream:e=>new o(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function c(){return s}(function(e){function t(){r.RAL.install(s)}e.install=t})(c||={}),t.default=c})),Id=i((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,`__esModule`,{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;let i=Fd();i.default.install();let a=e(`path`),o=e(`os`),s=e(`crypto`),c=e(`net`),l=Pd();r(Pd(),t),t.IPCMessageReader=class extends l.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on(`error`,e=>this.fireError(e)),t.on(`close`,()=>this.fireClose())}listen(e){return this.process.on(`message`,e),l.Disposable.create(()=>this.process.off(`message`,e))}},t.IPCMessageWriter=class extends l.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;let t=this.process;t.on(`error`,e=>this.fireError(e)),t.on(`close`,()=>this.fireClose)}write(e){try{return typeof this.process.send==`function`&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}},t.PortMessageReader=class extends l.AbstractMessageReader{constructor(e){super(),this.onData=new l.Emitter,e.on(`close`,()=>this.fireClose),e.on(`error`,e=>this.fireError(e)),e.on(`message`,e=>{this.onData.fire(e)})}listen(e){return this.onData.event(e)}},t.PortMessageWriter=class extends l.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on(`close`,()=>this.fireClose()),e.on(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};var u=class extends l.ReadableStreamMessageReader{constructor(e,t=`utf-8`){super((0,i.default)().stream.asReadableStream(e),t)}};t.SocketMessageReader=u;var d=class extends l.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}};t.SocketMessageWriter=d;var f=class extends l.ReadableStreamMessageReader{constructor(e,t){super((0,i.default)().stream.asReadableStream(e),t)}};t.StreamMessageReader=f;var p=class extends l.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t)}};t.StreamMessageWriter=p;let m=process.env.XDG_RUNTIME_DIR,h=new Map([[`linux`,107],[`darwin`,103]]);function g(){let e=(0,s.randomBytes)(21).toString(`hex`);if(process.platform===`win32`)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=m?a.join(m,`vscode-ipc-${e}.sock`):a.join(o.tmpdir(),`vscode-${e}.sock`);let n=h.get(process.platform);return n!==void 0&&t.length>n&&(0,i.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t}t.generateRandomPipeName=g;function _(e,t=`utf-8`){let n,r=new Promise((e,t)=>{n=e});return new Promise((i,a)=>{let o=(0,c.createServer)(e=>{o.close(),n([new u(e,t),new d(e,t)])});o.on(`error`,a),o.listen(e,()=>{o.removeListener(`error`,a),i({onConnected:()=>r})})})}t.createClientPipeTransport=_;function v(e,t=`utf-8`){let n=(0,c.createConnection)(e);return[new u(n,t),new d(n,t)]}t.createServerPipeTransport=v;function y(e,t=`utf-8`){let n,r=new Promise((e,t)=>{n=e});return new Promise((i,a)=>{let o=(0,c.createServer)(e=>{o.close(),n([new u(e,t),new d(e,t)])});o.on(`error`,a),o.listen(e,`127.0.0.1`,()=>{o.removeListener(`error`,a),i({onConnected:()=>r})})})}t.createClientSocketTransport=y;function b(e,t=`utf-8`){let n=(0,c.createConnection)(e,`127.0.0.1`);return[new u(n,t),new d(n,t)]}t.createServerSocketTransport=b;function x(e){let t=e;return t.read!==void 0&&t.addListener!==void 0}function S(e){let t=e;return t.write!==void 0&&t.addListener!==void 0}function C(e,t,n,r){n||=l.NullLogger;let i=x(e)?new f(e):e,a=S(t)?new p(t):t;return l.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,l.createMessageConnection)(i,a,n,r)}t.createMessageConnection=C})),Ld=i(((e,t)=>{t.exports=Id()})),Rd=i(((t,n)=>{(function(r){if(typeof n==`object`&&typeof n.exports==`object`){var i=r(e,t);i!==void 0&&(n.exports=i)}else typeof define==`function`&&define.amd&&define([`require`,`exports`],r)})(function(e,t){Object.defineProperty(t,`__esModule`,{value:!0}),t.TextDocument=t.EOL=t.WorkspaceFolder=t.InlineCompletionContext=t.SelectedCompletionInfo=t.InlineCompletionTriggerKind=t.InlineCompletionList=t.InlineCompletionItem=t.StringValue=t.InlayHint=t.InlayHintLabelPart=t.InlayHintKind=t.InlineValueContext=t.InlineValueEvaluatableExpression=t.InlineValueVariableLookup=t.InlineValueText=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.SelectionRange=t.DocumentLink=t.FormattingOptions=t.CodeLens=t.CodeAction=t.CodeActionContext=t.CodeActionTriggerKind=t.CodeActionKind=t.DocumentSymbol=t.WorkspaceSymbol=t.SymbolInformation=t.SymbolTag=t.SymbolKind=t.DocumentHighlight=t.DocumentHighlightKind=t.SignatureInformation=t.ParameterInformation=t.Hover=t.MarkedString=t.CompletionList=t.CompletionItem=t.CompletionItemLabelDetails=t.InsertTextMode=t.InsertReplaceEdit=t.CompletionItemTag=t.InsertTextFormat=t.CompletionItemKind=t.MarkupContent=t.MarkupKind=t.TextDocumentItem=t.OptionalVersionedTextDocumentIdentifier=t.VersionedTextDocumentIdentifier=t.TextDocumentIdentifier=t.WorkspaceChange=t.WorkspaceEdit=t.DeleteFile=t.RenameFile=t.CreateFile=t.TextDocumentEdit=t.AnnotatedTextEdit=t.ChangeAnnotationIdentifier=t.ChangeAnnotation=t.TextEdit=t.Command=t.Diagnostic=t.CodeDescription=t.DiagnosticTag=t.DiagnosticSeverity=t.DiagnosticRelatedInformation=t.FoldingRange=t.FoldingRangeKind=t.ColorPresentation=t.ColorInformation=t.Color=t.LocationLink=t.Location=t.Range=t.Position=t.uinteger=t.integer=t.URI=t.DocumentUri=void 0;var n;(function(e){function t(e){return typeof e==`string`}e.is=t})(n||(t.DocumentUri=n={}));var r;(function(e){function t(e){return typeof e==`string`}e.is=t})(r||(t.URI=r={}));var i;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(i||(t.integer=i={}));var a;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(a||(t.uinteger=a={}));var o;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&L.uinteger(t.line)&&L.uinteger(t.character)}e.is=n})(o||(t.Position=o={}));var s;(function(e){function t(e,t,n,r){if(L.uinteger(e)&&L.uinteger(t)&&L.uinteger(n)&&L.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}e.is=n})(s||(t.Range=s={}));var c;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&s.is(t.range)&&(L.string(t.uri)||L.undefined(t.uri))}e.is=n})(c||(t.Location=c={}));var l;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&s.is(t.targetRange)&&L.string(t.targetUri)&&s.is(t.targetSelectionRange)&&(s.is(t.originSelectionRange)||L.undefined(t.originSelectionRange))}e.is=n})(l||(t.LocationLink=l={}));var u;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&L.numberRange(t.red,0,1)&&L.numberRange(t.green,0,1)&&L.numberRange(t.blue,0,1)&&L.numberRange(t.alpha,0,1)}e.is=n})(u||(t.Color=u={}));var d;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&s.is(t.range)&&u.is(t.color)}e.is=n})(d||(t.ColorInformation=d={}));var f;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&L.string(t.label)&&(L.undefined(t.textEdit)||x.is(t))&&(L.undefined(t.additionalTextEdits)||L.typedArray(t.additionalTextEdits,x.is))}e.is=n})(f||(t.ColorPresentation=f={}));var p;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(p||(t.FoldingRangeKind=p={}));var m;(function(e){function t(e,t,n,r,i,a){var o={startLine:e,endLine:t};return L.defined(n)&&(o.startCharacter=n),L.defined(r)&&(o.endCharacter=r),L.defined(i)&&(o.kind=i),L.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&L.uinteger(t.startLine)&&L.uinteger(t.startLine)&&(L.undefined(t.startCharacter)||L.uinteger(t.startCharacter))&&(L.undefined(t.endCharacter)||L.uinteger(t.endCharacter))&&(L.undefined(t.kind)||L.string(t.kind))}e.is=n})(m||(t.FoldingRange=m={}));var h;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&c.is(t.location)&&L.string(t.message)}e.is=n})(h||(t.DiagnosticRelatedInformation=h={}));var g;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(g||(t.DiagnosticSeverity=g={}));var _;(function(e){e.Unnecessary=1,e.Deprecated=2})(_||(t.DiagnosticTag=_={}));var v;(function(e){function t(e){var t=e;return L.objectLiteral(t)&&L.string(t.href)}e.is=t})(v||(t.CodeDescription=v={}));var y;(function(e){function t(e,t,n,r,i,a){var o={range:e,message:t};return L.defined(n)&&(o.severity=n),L.defined(r)&&(o.code=r),L.defined(i)&&(o.source=i),L.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){var t=e;return L.defined(t)&&s.is(t.range)&&L.string(t.message)&&(L.number(t.severity)||L.undefined(t.severity))&&(L.integer(t.code)||L.string(t.code)||L.undefined(t.code))&&(L.undefined(t.codeDescription)||L.string(t.codeDescription?.href))&&(L.string(t.source)||L.undefined(t.source))&&(L.undefined(t.relatedInformation)||L.typedArray(t.relatedInformation,h.is))}e.is=n})(y||(t.Diagnostic=y={}));var b;(function(e){function t(e,t){var n=[...arguments].slice(2),r={title:e,command:t};return L.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){var t=e;return L.defined(t)&&L.string(t.title)&&L.string(t.command)}e.is=n})(b||(t.Command=b={}));var x;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){var t=e;return L.objectLiteral(t)&&L.string(t.newText)&&s.is(t.range)}e.is=i})(x||(t.TextEdit=x={}));var S;(function(e){function t(e,t,n){var r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&L.string(t.label)&&(L.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(L.string(t.description)||t.description===void 0)}e.is=n})(S||(t.ChangeAnnotation=S={}));var C;(function(e){function t(e){var t=e;return L.string(t)}e.is=t})(C||(t.ChangeAnnotationIdentifier=C={}));var w;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){var t=e;return x.is(t)&&(S.is(t.annotationId)||C.is(t.annotationId))}e.is=i})(w||(t.AnnotatedTextEdit=w={}));var T;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&A.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(T||(t.TextDocumentEdit=T={}));var E;(function(e){function t(e,t,n){var r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){var t=e;return t&&t.kind===`create`&&L.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||L.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||L.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||C.is(t.annotationId))}e.is=n})(E||(t.CreateFile=E={}));var ee;(function(e){function t(e,t,n,r){var i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){var t=e;return t&&t.kind===`rename`&&L.string(t.oldUri)&&L.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||L.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||L.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||C.is(t.annotationId))}e.is=n})(ee||(t.RenameFile=ee={}));var D;(function(e){function t(e,t,n){var r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){var t=e;return t&&t.kind===`delete`&&L.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||L.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||L.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||C.is(t.annotationId))}e.is=n})(D||(t.DeleteFile=D={}));var O;(function(e){function t(e){var t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(function(e){return L.string(e.kind)?E.is(e)||ee.is(e)||D.is(e):T.is(e)}))}e.is=t})(O||(t.WorkspaceEdit=O={}));var k=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(n===void 0?r=x.insert(e,t):C.is(n)?(i=n,r=w.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=w.insert(e,t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.replace=function(e,t,n){var r,i;if(n===void 0?r=x.replace(e,t):C.is(n)?(i=n,r=w.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=w.replace(e,t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.delete=function(e,t){var n,r;if(t===void 0?n=x.del(e):C.is(t)?(r=t,n=w.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=w.del(e,r)),this.edits.push(n),r!==void 0)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)},e}(),te=function(){function e(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,`size`,{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(C.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();t.WorkspaceChange=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new te(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(e){if(T.is(e)){var n=new k(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new k(e.changes[n]);t._textEditChanges[n]=r}))}return Object.defineProperty(e.prototype,`edit`,{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(A.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);var t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){var r=[],i={textDocument:t,edits:r};this._workspaceEdit.documentChanges.push(i),n=new k(r,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);var n=this._textEditChanges[e];if(!n){var r=[];this._workspaceEdit.changes[e]=r,n=new k(r),this._textEditChanges[e]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new te,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);var r;S.is(t)||C.is(t)?r=t:n=t;var i,a;if(r===void 0?i=E.create(e,n):(a=C.is(r)?r:this._changeAnnotations.manage(r),i=E.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);var i;S.is(n)||C.is(n)?i=n:r=n;var a,o;if(i===void 0?a=ee.create(e,t,r):(o=C.is(i)?i:this._changeAnnotations.manage(i),a=ee.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);var r;S.is(t)||C.is(t)?r=t:n=t;var i,a;if(r===void 0?i=D.create(e,n):(a=C.is(r)?r:this._changeAnnotations.manage(r),i=D.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a},e}();var ne;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){var t=e;return L.defined(t)&&L.string(t.uri)}e.is=n})(ne||(t.TextDocumentIdentifier=ne={}));var re;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.integer(t.version)}e.is=n})(re||(t.VersionedTextDocumentIdentifier=re={}));var A;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&L.string(t.uri)&&(t.version===null||L.integer(t.version))}e.is=n})(A||(t.OptionalVersionedTextDocumentIdentifier=A={}));var ie;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){var t=e;return L.defined(t)&&L.string(t.uri)&&L.string(t.languageId)&&L.integer(t.version)&&L.string(t.text)}e.is=n})(ie||(t.TextDocumentItem=ie={}));var ae;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){var n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(ae||(t.MarkupKind=ae={}));var j;(function(e){function t(e){var t=e;return L.objectLiteral(e)&&ae.is(t.kind)&&L.string(t.value)}e.is=t})(j||(t.MarkupContent=j={}));var M;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(M||(t.CompletionItemKind=M={}));var N;(function(e){e.PlainText=1,e.Snippet=2})(N||(t.InsertTextFormat=N={}));var oe;(function(e){e.Deprecated=1})(oe||(t.CompletionItemTag=oe={}));var P;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){var t=e;return t&&L.string(t.newText)&&s.is(t.insert)&&s.is(t.replace)}e.is=n})(P||(t.InsertReplaceEdit=P={}));var se;(function(e){e.asIs=1,e.adjustIndentation=2})(se||(t.InsertTextMode=se={}));var ce;(function(e){function t(e){var t=e;return t&&(L.string(t.detail)||t.detail===void 0)&&(L.string(t.description)||t.description===void 0)}e.is=t})(ce||(t.CompletionItemLabelDetails=ce={}));var F;(function(e){function t(e){return{label:e}}e.create=t})(F||(t.CompletionItem=F={}));var le;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(le||(t.CompletionList=le={}));var ue;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){var t=e;return L.string(t)||L.objectLiteral(t)&&L.string(t.language)&&L.string(t.value)}e.is=n})(ue||(t.MarkedString=ue={}));var de;(function(e){function t(e){var t=e;return!!t&&L.objectLiteral(t)&&(j.is(t.contents)||ue.is(t.contents)||L.typedArray(t.contents,ue.is))&&(e.range===void 0||s.is(e.range))}e.is=t})(de||(t.Hover=de={}));var fe;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(fe||(t.ParameterInformation=fe={}));var I;(function(e){function t(e,t){var n=[...arguments].slice(2),r={label:e};return L.defined(t)&&(r.documentation=t),L.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(I||(t.SignatureInformation=I={}));var pe;(function(e){e.Text=1,e.Read=2,e.Write=3})(pe||(t.DocumentHighlightKind=pe={}));var me;(function(e){function t(e,t){var n={range:e};return L.number(t)&&(n.kind=t),n}e.create=t})(me||(t.DocumentHighlight=me={}));var he;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(he||(t.SymbolKind=he={}));var ge;(function(e){e.Deprecated=1})(ge||(t.SymbolTag=ge={}));var _e;(function(e){function t(e,t,n,r,i){var a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(_e||(t.SymbolInformation=_e={}));var ve;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(ve||(t.WorkspaceSymbol=ve={}));var ye;(function(e){function t(e,t,n,r,i,a){var o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){var t=e;return t&&L.string(t.name)&&L.number(t.kind)&&s.is(t.range)&&s.is(t.selectionRange)&&(t.detail===void 0||L.string(t.detail))&&(t.deprecated===void 0||L.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(ye||(t.DocumentSymbol=ye={}));var be;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(be||(t.CodeActionKind=be={}));var xe;(function(e){e.Invoked=1,e.Automatic=2})(xe||(t.CodeActionTriggerKind=xe={}));var Se;(function(e){function t(e,t,n){var r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){var t=e;return L.defined(t)&&L.typedArray(t.diagnostics,y.is)&&(t.only===void 0||L.typedArray(t.only,L.string))&&(t.triggerKind===void 0||t.triggerKind===xe.Invoked||t.triggerKind===xe.Automatic)}e.is=n})(Se||(t.CodeActionContext=Se={}));var Ce;(function(e){function t(e,t,n){var r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):b.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){var t=e;return t&&L.string(t.title)&&(t.diagnostics===void 0||L.typedArray(t.diagnostics,y.is))&&(t.kind===void 0||L.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||b.is(t.command))&&(t.isPreferred===void 0||L.boolean(t.isPreferred))&&(t.edit===void 0||O.is(t.edit))}e.is=n})(Ce||(t.CodeAction=Ce={}));var we;(function(e){function t(e,t){var n={range:e};return L.defined(t)&&(n.data=t),n}e.create=t;function n(e){var t=e;return L.defined(t)&&s.is(t.range)&&(L.undefined(t.command)||b.is(t.command))}e.is=n})(we||(t.CodeLens=we={}));var Te;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&L.uinteger(t.tabSize)&&L.boolean(t.insertSpaces)}e.is=n})(Te||(t.FormattingOptions=Te={}));var Ee;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){var t=e;return L.defined(t)&&s.is(t.range)&&(L.undefined(t.target)||L.string(t.target))}e.is=n})(Ee||(t.DocumentLink=Ee={}));var De;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){var n=t;return L.objectLiteral(n)&&s.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(De||(t.SelectionRange=De={}));var Oe;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Oe||(t.SemanticTokenTypes=Oe={}));var ke;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(ke||(t.SemanticTokenModifiers=ke={}));var Ae;(function(e){function t(e){var t=e;return L.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Ae||(t.SemanticTokens=Ae={}));var je;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){var t=e;return t!=null&&s.is(t.range)&&L.string(t.text)}e.is=n})(je||(t.InlineValueText=je={}));var Me;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){var t=e;return t!=null&&s.is(t.range)&&L.boolean(t.caseSensitiveLookup)&&(L.string(t.variableName)||t.variableName===void 0)}e.is=n})(Me||(t.InlineValueVariableLookup=Me={}));var Ne;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){var t=e;return t!=null&&s.is(t.range)&&(L.string(t.expression)||t.expression===void 0)}e.is=n})(Ne||(t.InlineValueEvaluatableExpression=Ne={}));var Pe;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){var t=e;return L.defined(t)&&s.is(e.stoppedLocation)}e.is=n})(Pe||(t.InlineValueContext=Pe={}));var Fe;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(Fe||(t.InlayHintKind=Fe={}));var Ie;(function(e){function t(e){return{value:e}}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&(t.tooltip===void 0||L.string(t.tooltip)||j.is(t.tooltip))&&(t.location===void 0||c.is(t.location))&&(t.command===void 0||b.is(t.command))}e.is=n})(Ie||(t.InlayHintLabelPart=Ie={}));var Le;(function(e){function t(e,t,n){var r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){var t=e;return L.objectLiteral(t)&&o.is(t.position)&&(L.string(t.label)||L.typedArray(t.label,Ie.is))&&(t.kind===void 0||Fe.is(t.kind))&&t.textEdits===void 0||L.typedArray(t.textEdits,x.is)&&(t.tooltip===void 0||L.string(t.tooltip)||j.is(t.tooltip))&&(t.paddingLeft===void 0||L.boolean(t.paddingLeft))&&(t.paddingRight===void 0||L.boolean(t.paddingRight))}e.is=n})(Le||(t.InlayHint=Le={}));var Re;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Re||(t.StringValue=Re={}));var ze;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(ze||(t.InlineCompletionItem=ze={}));var Be;(function(e){function t(e){return{items:e}}e.create=t})(Be||(t.InlineCompletionList=Be={}));var Ve;(function(e){e.Invoked=0,e.Automatic=1})(Ve||(t.InlineCompletionTriggerKind=Ve={}));var He;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(He||(t.SelectedCompletionInfo=He={}));var Ue;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Ue||(t.InlineCompletionContext=Ue={}));var We;(function(e){function t(e){var t=e;return L.objectLiteral(t)&&r.is(t.uri)&&L.string(t.name)}e.is=t})(We||(t.WorkspaceFolder=We={})),t.EOL=[`
|
|
87
|
+
`,`\r
|
|
88
|
+
`,`\r`];var Ge;(function(e){function t(e,t,n,r){return new Ke(e,t,n,r)}e.create=t;function n(e){var t=e;return!!(L.defined(t)&&L.string(t.uri)&&(L.undefined(t.languageId)||L.string(t.languageId))&&L.uinteger(t.lineCount)&&L.func(t.getText)&&L.func(t.positionAt)&&L.func(t.offsetAt))}e.is=n;function r(e,t){for(var n=e.getText(),r=i(t,function(e,t){var n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length,o=r.length-1;o>=0;o--){var s=r[o],c=e.offsetAt(s.range.start),l=e.offsetAt(s.range.end);if(l<=a)n=n.substring(0,c)+s.newText+n.substring(l,n.length);else throw Error(`Overlapping edit`);a=c}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);for(var o=0,s=0,c=0;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Ge||(t.TextDocument=Ge={}));var Ke=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,`uri`,{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`languageId`,{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,`version`,{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&=(e.push(r),!1);var i=t.charAt(r);n=i===`\r`||i===`
|
|
89
|
+
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
90
|
+
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return o.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var a=n-1;return o.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,`lineCount`,{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),L;(function(e){var t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(L||={})})})),Q=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;let t=Id();var n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{constructor(e){super(e,t.ParameterStructures.byName)}}})),zd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s;function c(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=c;function l(e){return typeof e==`object`&&!!e}e.objectLiteral=l})),Bd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ImplementationRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))})),Vd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeDefinitionRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))})),Hd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;let t=Q();var n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))})),Ud=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ConfigurationRequest=void 0;let t=Q();var n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))})),Wd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))})),Gd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))})),Kd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DeclarationRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))})),qd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SelectionRangeRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))})),Jd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;let t=Id(),n=Q();var r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))})),Yd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))})),Xd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;let t=Q();var n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))})),Zd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ShowDocumentRequest=void 0;let t=Q();var n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))})),Qd=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LinkedEditingRangeRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))})),$d=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;let t=Q();var n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))})),ef=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;let t=Q();var n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))})),tf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))})),nf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))})),rf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))})),af=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;let t=Id(),n=zd(),r=Q();var i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var s;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.WorkspaceDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(c||(e.DiagnosticRefreshRequest=c={}))})),of=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;let t=Rd(),n=zd(),r=Q();var i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}e.equals=a})(a||(e.ExecutionSummary=a={}));var o;(function(e){function r(e,t){return{kind:e,document:t}}e.create=r;function o(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}e.is=o;function s(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!c(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}e.diff=s;function c(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}if(n.objectLiteral(e)&&n.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!c(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!c(e[i],t[i]))return!1}}return!0}})(o||(e.NotebookCell=o={}));var s;(function(e){function r(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&n.string(r.uri)&&t.integer.is(r.version)&&n.typedArray(r.cells,o.is)}e.is=i})(s||(e.NotebookDocument=s={}));var c;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)})(c||(e.NotebookDocumentSyncRegistrationType=c={}));var l;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(l||(e.DidOpenNotebookDocumentNotification=l={}));var u;(function(e){function r(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.start)&&t.uinteger.is(r.deleteCount)&&(r.cells===void 0||n.typedArray(r.cells,o.is))}e.is=r;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}e.create=i})(u||(e.NotebookCellArrayChange=u={}));var d;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(d||(e.DidChangeNotebookDocumentNotification=d={}));var f;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(f||(e.DidSaveNotebookDocumentNotification=f={}));var p;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(p||(e.DidCloseNotebookDocumentNotification=p={}))})),sf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.InlineCompletionRequest=void 0;let t=Q();var n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))})),cf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;let t=Q(),n=Rd(),r=zd(),i=Bd();Object.defineProperty(e,`ImplementationRequest`,{enumerable:!0,get:function(){return i.ImplementationRequest}});let a=Vd();Object.defineProperty(e,`TypeDefinitionRequest`,{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});let o=Hd();Object.defineProperty(e,`WorkspaceFoldersRequest`,{enumerable:!0,get:function(){return o.WorkspaceFoldersRequest}}),Object.defineProperty(e,`DidChangeWorkspaceFoldersNotification`,{enumerable:!0,get:function(){return o.DidChangeWorkspaceFoldersNotification}});let s=Ud();Object.defineProperty(e,`ConfigurationRequest`,{enumerable:!0,get:function(){return s.ConfigurationRequest}});let c=Wd();Object.defineProperty(e,`DocumentColorRequest`,{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(e,`ColorPresentationRequest`,{enumerable:!0,get:function(){return c.ColorPresentationRequest}});let l=Gd();Object.defineProperty(e,`FoldingRangeRequest`,{enumerable:!0,get:function(){return l.FoldingRangeRequest}}),Object.defineProperty(e,`FoldingRangeRefreshRequest`,{enumerable:!0,get:function(){return l.FoldingRangeRefreshRequest}});let u=Kd();Object.defineProperty(e,`DeclarationRequest`,{enumerable:!0,get:function(){return u.DeclarationRequest}});let d=qd();Object.defineProperty(e,`SelectionRangeRequest`,{enumerable:!0,get:function(){return d.SelectionRangeRequest}});let f=Jd();Object.defineProperty(e,`WorkDoneProgress`,{enumerable:!0,get:function(){return f.WorkDoneProgress}}),Object.defineProperty(e,`WorkDoneProgressCreateRequest`,{enumerable:!0,get:function(){return f.WorkDoneProgressCreateRequest}}),Object.defineProperty(e,`WorkDoneProgressCancelNotification`,{enumerable:!0,get:function(){return f.WorkDoneProgressCancelNotification}});let p=Yd();Object.defineProperty(e,`CallHierarchyIncomingCallsRequest`,{enumerable:!0,get:function(){return p.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(e,`CallHierarchyOutgoingCallsRequest`,{enumerable:!0,get:function(){return p.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(e,`CallHierarchyPrepareRequest`,{enumerable:!0,get:function(){return p.CallHierarchyPrepareRequest}});let m=Xd();Object.defineProperty(e,`TokenFormat`,{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(e,`SemanticTokensRequest`,{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(e,`SemanticTokensDeltaRequest`,{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(e,`SemanticTokensRangeRequest`,{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(e,`SemanticTokensRefreshRequest`,{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(e,`SemanticTokensRegistrationType`,{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});let h=Zd();Object.defineProperty(e,`ShowDocumentRequest`,{enumerable:!0,get:function(){return h.ShowDocumentRequest}});let g=Qd();Object.defineProperty(e,`LinkedEditingRangeRequest`,{enumerable:!0,get:function(){return g.LinkedEditingRangeRequest}});let _=$d();Object.defineProperty(e,`FileOperationPatternKind`,{enumerable:!0,get:function(){return _.FileOperationPatternKind}}),Object.defineProperty(e,`DidCreateFilesNotification`,{enumerable:!0,get:function(){return _.DidCreateFilesNotification}}),Object.defineProperty(e,`WillCreateFilesRequest`,{enumerable:!0,get:function(){return _.WillCreateFilesRequest}}),Object.defineProperty(e,`DidRenameFilesNotification`,{enumerable:!0,get:function(){return _.DidRenameFilesNotification}}),Object.defineProperty(e,`WillRenameFilesRequest`,{enumerable:!0,get:function(){return _.WillRenameFilesRequest}}),Object.defineProperty(e,`DidDeleteFilesNotification`,{enumerable:!0,get:function(){return _.DidDeleteFilesNotification}}),Object.defineProperty(e,`WillDeleteFilesRequest`,{enumerable:!0,get:function(){return _.WillDeleteFilesRequest}});let v=ef();Object.defineProperty(e,`UniquenessLevel`,{enumerable:!0,get:function(){return v.UniquenessLevel}}),Object.defineProperty(e,`MonikerKind`,{enumerable:!0,get:function(){return v.MonikerKind}}),Object.defineProperty(e,`MonikerRequest`,{enumerable:!0,get:function(){return v.MonikerRequest}});let y=tf();Object.defineProperty(e,`TypeHierarchyPrepareRequest`,{enumerable:!0,get:function(){return y.TypeHierarchyPrepareRequest}}),Object.defineProperty(e,`TypeHierarchySubtypesRequest`,{enumerable:!0,get:function(){return y.TypeHierarchySubtypesRequest}}),Object.defineProperty(e,`TypeHierarchySupertypesRequest`,{enumerable:!0,get:function(){return y.TypeHierarchySupertypesRequest}});let b=nf();Object.defineProperty(e,`InlineValueRequest`,{enumerable:!0,get:function(){return b.InlineValueRequest}}),Object.defineProperty(e,`InlineValueRefreshRequest`,{enumerable:!0,get:function(){return b.InlineValueRefreshRequest}});let x=rf();Object.defineProperty(e,`InlayHintRequest`,{enumerable:!0,get:function(){return x.InlayHintRequest}}),Object.defineProperty(e,`InlayHintResolveRequest`,{enumerable:!0,get:function(){return x.InlayHintResolveRequest}}),Object.defineProperty(e,`InlayHintRefreshRequest`,{enumerable:!0,get:function(){return x.InlayHintRefreshRequest}});let S=af();Object.defineProperty(e,`DiagnosticServerCancellationData`,{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(e,`DocumentDiagnosticReportKind`,{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(e,`DocumentDiagnosticRequest`,{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(e,`WorkspaceDiagnosticRequest`,{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(e,`DiagnosticRefreshRequest`,{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});let C=of();Object.defineProperty(e,`NotebookCellKind`,{enumerable:!0,get:function(){return C.NotebookCellKind}}),Object.defineProperty(e,`ExecutionSummary`,{enumerable:!0,get:function(){return C.ExecutionSummary}}),Object.defineProperty(e,`NotebookCell`,{enumerable:!0,get:function(){return C.NotebookCell}}),Object.defineProperty(e,`NotebookDocument`,{enumerable:!0,get:function(){return C.NotebookDocument}}),Object.defineProperty(e,`NotebookDocumentSyncRegistrationType`,{enumerable:!0,get:function(){return C.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(e,`DidOpenNotebookDocumentNotification`,{enumerable:!0,get:function(){return C.DidOpenNotebookDocumentNotification}}),Object.defineProperty(e,`NotebookCellArrayChange`,{enumerable:!0,get:function(){return C.NotebookCellArrayChange}}),Object.defineProperty(e,`DidChangeNotebookDocumentNotification`,{enumerable:!0,get:function(){return C.DidChangeNotebookDocumentNotification}}),Object.defineProperty(e,`DidSaveNotebookDocumentNotification`,{enumerable:!0,get:function(){return C.DidSaveNotebookDocumentNotification}}),Object.defineProperty(e,`DidCloseNotebookDocumentNotification`,{enumerable:!0,get:function(){return C.DidCloseNotebookDocumentNotification}});let w=sf();Object.defineProperty(e,`InlineCompletionRequest`,{enumerable:!0,get:function(){return w.InlineCompletionRequest}});var T;(function(e){function t(e){let t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}e.is=t})(T||(e.TextDocumentFilter=T={}));var E;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}e.is=t})(E||(e.NotebookDocumentFilter=E={}));var ee;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||E.is(t.notebook))&&(t.language===void 0||r.string(t.language))}e.is=t})(ee||(e.NotebookCellTextDocumentFilter=ee={}));var D;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!T.is(t)&&!ee.is(t))return!1;return!0}e.is=t})(D||(e.DocumentSelector=D={}));var O;(function(e){e.method=`client/registerCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(O||(e.RegistrationRequest=O={}));var k;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(k||(e.UnregistrationRequest=k={}));var te;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(te||(e.ResourceOperationKind=te={}));var ne;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(ne||(e.FailureHandlingKind=ne={}));var re;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(re||(e.PositionEncodingKind=re={}));var A;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}e.hasId=t})(A||(e.StaticRegistrationOptions=A={}));var ie;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||D.is(t.documentSelector))}e.is=t})(ie||(e.TextDocumentRegistrationOptions=ie={}));var ae;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}e.hasWorkDoneProgress=n})(ae||(e.WorkDoneProgressOptions=ae={}));var j;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(j||(e.InitializeRequest=j={}));var M;(function(e){e.unknownProtocolVersion=1})(M||(e.InitializeErrorCodes=M={}));var N;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(N||(e.InitializedNotification=N={}));var oe;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(oe||(e.ShutdownRequest=oe={}));var P;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(P||(e.ExitNotification=P={}));var se;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(se||(e.DidChangeConfigurationNotification=se={}));var ce;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ce||(e.MessageType=ce={}));var F;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(F||(e.ShowMessageNotification=F={}));var le;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(le||(e.ShowMessageRequest=le={}));var ue;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ue||(e.LogMessageNotification=ue={}));var de;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(de||(e.TelemetryEventNotification=de={}));var fe;(function(e){e.None=0,e.Full=1,e.Incremental=2})(fe||(e.TextDocumentSyncKind=fe={}));var I;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(I||(e.DidOpenTextDocumentNotification=I={}));var pe;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}e.isFull=n})(pe||(e.TextDocumentContentChangeEvent=pe={}));var me;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(me||(e.DidChangeTextDocumentNotification=me={}));var he;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(he||(e.DidCloseTextDocumentNotification=he={}));var ge;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.DidSaveTextDocumentNotification=ge={}));var _e;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(_e||(e.TextDocumentSaveReason=_e={}));var ve;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.WillSaveTextDocumentNotification=ve={}));var ye;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ye||(e.WillSaveTextDocumentWaitUntilRequest=ye={}));var be;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(be||(e.DidChangeWatchedFilesNotification=be={}));var xe;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(xe||(e.FileChangeType=xe={}));var Se;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}e.is=t})(Se||(e.RelativePattern=Se={}));var Ce;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Ce||(e.WatchKind=Ce={}));var we;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(we||(e.PublishDiagnosticsNotification=we={}));var Te;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Te||(e.CompletionTriggerKind=Te={}));var Ee;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ee||(e.CompletionRequest=Ee={}));var De;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(De||(e.CompletionResolveRequest=De={}));var Oe;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Oe||(e.HoverRequest=Oe={}));var ke;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ke||(e.SignatureHelpTriggerKind=ke={}));var Ae;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.SignatureHelpRequest=Ae={}));var je;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(je||(e.DefinitionRequest=je={}));var Me;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Me||(e.ReferencesRequest=Me={}));var Ne;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ne||(e.DocumentHighlightRequest=Ne={}));var Pe;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Pe||(e.DocumentSymbolRequest=Pe={}));var Fe;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Fe||(e.CodeActionRequest=Fe={}));var Ie;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.CodeActionResolveRequest=Ie={}));var Le;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.WorkspaceSymbolRequest=Le={}));var Re;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.WorkspaceSymbolResolveRequest=Re={}));var ze;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.CodeLensRequest=ze={}));var Be;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.CodeLensResolveRequest=Be={}));var Ve;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Ve||(e.CodeLensRefreshRequest=Ve={}));var He;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.DocumentLinkRequest=He={}));var Ue;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.DocumentLinkResolveRequest=Ue={}));var We;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentFormattingRequest=We={}));var Ge;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.DocumentRangeFormattingRequest=Ge={}));var Ke;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.DocumentRangesFormattingRequest=Ke={}));var L;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(L||(e.DocumentOnTypeFormattingRequest=L={}));var qe;(function(e){e.Identifier=1})(qe||(e.PrepareSupportDefaultBehavior=qe={}));var Je;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.RenameRequest=Je={}));var Ye;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.PrepareRenameRequest=Ye={}));var Xe;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Xe||(e.ExecuteCommandRequest=Xe={}));var Ze;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(Ze||(e.ApplyWorkspaceEditRequest=Ze={}))})),lf=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;let t=Id();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}e.createProtocolConnection=n})),uf=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(Id(),e),n(Rd(),e),n(Q(),e),n(cf(),e);var r=lf();Object.defineProperty(e,`createProtocolConnection`,{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))})),df=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createProtocolConnection=void 0;let r=Ld();n(Ld(),e),n(uf(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}e.createProtocolConnection=i})),ff;(function(e){function t(e){return{dispose:async()=>await e()}}e.create=t})(ff||={});var pf=df(),mf=class{constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new Zu,this.documentPhaseListeners=new Zu,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=X.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===Z.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,Z.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Z.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Z.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=X.CancellationToken.None){this.currentState=Z.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=Z.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Z.Changed)}let a=O(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,Z.ComputedScopes)),await this.emitUpdate(i,r),await Au(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<Z.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return O(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(e=>e.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),ff.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Z.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Z.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Z.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Z.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Z.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,Z.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.state<t&&(await Au(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));let i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),ff.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),ff.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=X.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Ou):this.currentState>=e&&e>r.state?Promise.reject(new pf.ResponseError(pf.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Z[r.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{Hu.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Ou)})}):Promise.reject(new pf.ResponseError(pf.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Ou):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Ou)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Au(n),await t(e,n)}catch(e){if(!ku(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Au(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=O(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},hf=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new id,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=A(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Hu.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),O(r)}allElements(e,t){let n=O(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=X.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=X.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},gf=class{constructor(e){this.initialBuildOptions={},this._ready=new ju,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=X.CancellationToken.None){let n=await this.performStartup(e);await Au(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=O(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Bu.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=Hu.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},_f=class{buildUnexpectedCharactersMessage(e,t,n,r,i){return Ii.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return Ii.buildUnableToPopLexerModeMessage(e)}};const vf={mode:`full`};var yf=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t),this.chevrotainLexer=new Ri(Sf(t)?Object.values(t):t,{positionTracking:`full`,skipValidations:e.LanguageMetaData.mode===`production`,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=vf){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Sf(e))return e;let t=xf(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function bf(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}function xf(e){return e&&`modes`in e&&`defaultMode`in e}function Sf(e){return!bf(e)&&!xf(e)}function Cf(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=q.create(0,0);let a=Tf(e),o=Vf(r);return Pf({index:0,tokens:Of({lines:a,position:i,options:o}),position:i})}function wf(e,t){let n=Vf(t),r=Tf(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}function Tf(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(ln)}const Ef=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Df=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Of(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){let a=i===0,o=i===e.lines.length-1,s=e.lines[i],c=0;if(a&&e.options.start){let t=e.options.start?.exec(s);t&&(c=t.index+t[0].length)}else{let t=e.options.line?.exec(s);t&&(c=t.index+t[0].length)}if(o){let t=e.options.end?.exec(s);t&&(s=s.substring(0,t.index))}if(s=s.substring(0,Nf(s)),Mf(s,c)>=s.length){if(t.length>0){let e=q.create(n,r);t.push({type:`break`,content:``,range:J.create(e,e)})}}else{Ef.lastIndex=c;let e=Ef.exec(s);if(e){let i=e[0],a=e[1],o=q.create(n,r+c),l=q.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:J.create(o,l)}),c+=i.length,c=Mf(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(Df));t.push(...kf(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}function kf(e,t,n,r){let i=[];if(e.length===0){let e=q.create(n,r),a=q.create(n,r+t.length);i.push({type:`text`,content:t,range:J.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:J.create(q.create(n,a+r),q.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:J.create(q.create(n,a+c+r),q.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:J.create(q.create(n,a+c+r),q.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:J.create(q.create(n,a+c+r),q.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:J.create(q.create(n,a+r),q.create(n,a+r+o.length))})}return i}const Af=/\S/,jf=/\s*$/;function Mf(e,t){let n=e.substring(t).match(Af);return n?t+n.index:e.length}function Nf(e){let t=e.match(jf);if(t&&typeof t.index==`number`)return t.index}function Pf(e){let t=q.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Uf([],J.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=Ff(e,n[n.length-1]);t&&n.push(t)}let r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new Uf(n,J.create(r,i))}function Ff(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return zf(e,!1);if(n.type===`text`||n.type===`inline-tag`)return Lf(e);If(n,t),e.index++}function If(e,t){if(t){let n=new Jf(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}function Lf(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(Rf(e)),r=t,t=e.tokens[e.index];return new qf(i,J.create(n.range.start,r.range.end))}function Rf(e){return e.tokens[e.index].type===`inline-tag`?zf(e,!0):Bf(e)}function zf(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`)if(t){let i=Bf(e);return new Wf(r,new qf([i],i.range),t,J.create(n.range.start,i.range.end))}else{let i=Lf(e);return new Wf(r,i,t,J.create(n.range.start,i.range.end))}else{let e=n.range;return new Wf(r,new qf([],e),t,e)}}function Bf(e){let t=e.tokens[e.index++];return new Jf(t.content,t.range)}function Vf(e){if(!e)return Vf({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:Hf(t,!0),end:Hf(n,!1),line:Hf(r,!0)}}function Hf(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?hn(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}else return e}var Uf=class{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=Yf(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=Yf(t)+r}return t.trim()}},Wf=class{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=Gf(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}};function Gf(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=Mf(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??Kf(t,i)}}function Kf(e,t){try{return Bu.parse(e,!0),`[${t}](${e})`}catch{return e}}var qf=class{constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;t<this.inlines.length;t++){let n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+=`
|
|
91
|
+
`)}return e}toMarkdown(e){let t=``;for(let n=0;n<this.inlines.length;n++){let r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+=`
|
|
92
|
+
`)}return t}},Jf=class{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Yf(e){return e.endsWith(`
|
|
93
|
+
`)?`
|
|
94
|
+
`:`
|
|
95
|
+
|
|
96
|
+
`}var Xf=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&wf(t))return Cf(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=A(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},Zf=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return sd(e)?e.$comment:Wt(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},Qf=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},$f=class{constructor(){this.previousTokenSource=new X.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=Du();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=X.CancellationToken.None){let r=new ju,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){ku(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},ep=class{constructor(e){this.grammarElementIdMap=new Qu,this.tokenTypeIdMap=new Qu,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of N(e))t.set(n,{});if(e.$cstNode)for(let t of It(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)h(n)?e.push(this.dehydrateAstNode(n,t)):g(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else h(i)?n[r]=this.dehydrateAstNode(i,t):g(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i);return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return C(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),x(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):S(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of N(e))t.set(n,{});let r;if(e.$cstNode)for(let t of It(e.$cstNode)){let e;`fullText`in t?(e=new zl(t.fullText),r=e):`content`in t?e=new Ll:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)h(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):g(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else h(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):g(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),x(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,c=e.hidden;return new Il(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of N(this.grammar))le(t)&&this.grammarElementIdMap.set(t,e++)}};function tp(e){return{documentation:{CommentProvider:e=>new Zf(e),DocumentationProvider:e=>new Xf(e)},parser:{AsyncParser:e=>new Qf(e),GrammarConfig:e=>Jn(e),LangiumParser:e=>gu(e),CompletionParser:e=>hu(e),ValueConverter:()=>new yu,TokenBuilder:()=>new vu,Lexer:e=>new yf(e),ParserErrorMessageProvider:()=>new Kl,LexerErrorMessageProvider:()=>new _f},workspace:{AstNodeLocator:()=>new Sd,AstNodeDescriptionProvider:e=>new bd(e),ReferenceDescriptionProvider:e=>new xd(e)},references:{Linker:e=>new qu(e),NameProvider:()=>new Yu,ScopeProvider:e=>new od(e),ScopeComputation:e=>new $u(e),References:e=>new Xu(e)},serializer:{Hydrator:e=>new ep(e),JsonSerializer:e=>new ld(e)},validation:{DocumentValidator:e=>new hd(e),ValidationRegistry:e=>new pd(e)},shared:()=>e.shared}}function np(e){return{ServiceRegistry:e=>new ud(e),workspace:{LangiumDocuments:e=>new Gu(e),LangiumDocumentFactory:e=>new Wu(e),DocumentBuilder:e=>new mf(e),IndexManager:e=>new hf(e),WorkspaceManager:e=>new gf(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new $f,ConfigurationProvider:e=>new wd(e)},profilers:{}}}var rp;(function(e){e.merge=(e,t)=>lp(lp({},e),t)})(rp||={});function ip(e,t,n,r,i,a,o,s,c){return op([e,t,n,r,i,a,o,s,c].reduce(lp,{}))}const ap=Symbol(`isProxy`);function op(e,t){let n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw Error(`Cannot set property on injected service container`)},get:(r,i)=>i===ap?!0:cp(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(cp(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const sp=Symbol();function cp(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===sp)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}else if(t in n){let i=n[t];e[t]=sp;try{e[t]=typeof i==`function`?i(r):op(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}else return}function lp(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null)if(typeof r==`object`){let t=e[n];typeof t==`object`&&t?e[n]=lp(t,r):e[n]=lp({},r)}else e[n]=r}return e}var up=class{stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}};const dp={fileSystemProvider:()=>new up},fp={Grammar:()=>void 0,LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`})},pp={AstReflection:()=>new Ft};function mp(){let e=ip(np(dp),pp),t=ip(tp({shared:e}),fp);return e.ServiceRegistry.register(t),t}function hp(e){let t=mp(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,Bu.parse(`memory:/${n.name??`grammar`}.langium`)),n}var gp=Object.defineProperty,$=(e,t)=>gp(e,`name`,{value:t,configurable:!0}),_p;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(_p||={});var vp;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(vp||={});var yp;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(yp||={});var bp;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(bp||={});var xp;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xp||={});var Sp;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Sp||={});var Cp;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(Cp||={});var wp;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(wp||={});var Tp;(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \t]+[A-Za-z(][A-Za-z0-9_()&]*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Tp||={}),{..._p.Terminals,...vp.Terminals,...yp.Terminals,...bp.Terminals,...xp.Terminals,...Sp.Terminals,...wp.Terminals,...Cp.Terminals,...Tp.Terminals};var Ep={$type:`Accelerator`,name:`name`,x:`x`,y:`y`},Dp={$type:`Anchor`,evolution:`evolution`,name:`name`,visibility:`visibility`},Op={$type:`Annotation`,number:`number`,text:`text`,x:`x`,y:`y`},kp={$type:`Annotations`,x:`x`,y:`y`},Ap={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`};function jp(e){return Nm.isInstance(e,Ap.$type)}$(jp,`isArchitecture`);var Mp={$type:`Axis`,label:`label`,name:`name`},Np={$type:`Branch`,name:`name`,order:`order`};function Pp(e){return Nm.isInstance(e,Np.$type)}$(Pp,`isBranch`);var Fp={$type:`Checkout`,branch:`branch`},Ip={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},Lp={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},Rp={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`};function zp(e){return Nm.isInstance(e,Rp.$type)}$(zp,`isCommit`);var Bp={$type:`Component`,decorator:`decorator`,evolution:`evolution`,inertia:`inertia`,label:`label`,name:`name`,visibility:`visibility`},Vp={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},Hp={$type:`Deaccelerator`,name:`name`,x:`x`,y:`y`},Up={$type:`Decorator`,strategy:`strategy`},Wp={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},Gp={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},Kp={$type:`Entry`,axis:`axis`,value:`value`},qp={$type:`Evolution`,stages:`stages`},Jp={$type:`EvolutionStage`,boundary:`boundary`,name:`name`,secondName:`secondName`},Yp={$type:`Evolve`,component:`component`,target:`target`},Xp={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`};function Zp(e){return Nm.isInstance(e,Xp.$type)}$(Zp,`isGitGraph`);var Qp={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},$p={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`};function em(e){return Nm.isInstance(e,$p.$type)}$(em,`isInfo`);var tm={$type:`Item`,classSelector:`classSelector`,name:`name`},nm={$type:`Junction`,id:`id`,in:`in`},rm={$type:`Label`,negX:`negX`,negY:`negY`,offsetX:`offsetX`,offsetY:`offsetY`},im={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},am={$type:`Link`,arrow:`arrow`,from:`from`,fromPort:`fromPort`,linkLabel:`linkLabel`,to:`to`,toPort:`toPort`},om={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`};function sm(e){return Nm.isInstance(e,om.$type)}$(sm,`isMerge`);var cm={$type:`Note`,evolution:`evolution`,text:`text`,visibility:`visibility`},lm={$type:`Option`,name:`name`,value:`value`},um={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`};function dm(e){return Nm.isInstance(e,um.$type)}$(dm,`isPacket`);var fm={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`};function pm(e){return Nm.isInstance(e,fm.$type)}$(pm,`isPacketBlock`);var mm={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`};function hm(e){return Nm.isInstance(e,mm.$type)}$(hm,`isPie`);var gm={$type:`PieSection`,label:`label`,value:`value`};function _m(e){return Nm.isInstance(e,gm.$type)}$(_m,`isPieSection`);var vm={$type:`Pipeline`,components:`components`,parent:`parent`},ym={$type:`PipelineComponent`,evolution:`evolution`,label:`label`,name:`name`},bm={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},xm={$type:`Section`,classSelector:`classSelector`,name:`name`},Sm={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},Cm={$type:`Size`,height:`height`,width:`width`},wm={$type:`Statement`},Tm={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`};function Em(e){return Nm.isInstance(e,Tm.$type)}$(Em,`isTreemap`);var Dm={$type:`TreemapRow`,indent:`indent`,item:`item`},Om={$type:`TreeNode`,indent:`indent`,name:`name`},km={$type:`TreeView`,accDescr:`accDescr`,accTitle:`accTitle`,nodes:`nodes`,title:`title`},Am={$type:`Wardley`,accDescr:`accDescr`,accelerators:`accelerators`,accTitle:`accTitle`,anchors:`anchors`,annotation:`annotation`,annotations:`annotations`,components:`components`,deaccelerators:`deaccelerators`,evolution:`evolution`,evolves:`evolves`,links:`links`,notes:`notes`,pipelines:`pipelines`,size:`size`,title:`title`};function jm(e){return Nm.isInstance(e,Am.$type)}$(jm,`isWardley`);var Mm=class extends b{constructor(){super(...arguments),this.types={Accelerator:{name:Ep.$type,properties:{name:{name:Ep.name},x:{name:Ep.x},y:{name:Ep.y}},superTypes:[]},Anchor:{name:Dp.$type,properties:{evolution:{name:Dp.evolution},name:{name:Dp.name},visibility:{name:Dp.visibility}},superTypes:[]},Annotation:{name:Op.$type,properties:{number:{name:Op.number},text:{name:Op.text},x:{name:Op.x},y:{name:Op.y}},superTypes:[]},Annotations:{name:kp.$type,properties:{x:{name:kp.x},y:{name:kp.y}},superTypes:[]},Architecture:{name:Ap.$type,properties:{accDescr:{name:Ap.accDescr},accTitle:{name:Ap.accTitle},edges:{name:Ap.edges,defaultValue:[]},groups:{name:Ap.groups,defaultValue:[]},junctions:{name:Ap.junctions,defaultValue:[]},services:{name:Ap.services,defaultValue:[]},title:{name:Ap.title}},superTypes:[]},Axis:{name:Mp.$type,properties:{label:{name:Mp.label},name:{name:Mp.name}},superTypes:[]},Branch:{name:Np.$type,properties:{name:{name:Np.name},order:{name:Np.order}},superTypes:[wm.$type]},Checkout:{name:Fp.$type,properties:{branch:{name:Fp.branch}},superTypes:[wm.$type]},CherryPicking:{name:Ip.$type,properties:{id:{name:Ip.id},parent:{name:Ip.parent},tags:{name:Ip.tags,defaultValue:[]}},superTypes:[wm.$type]},ClassDefStatement:{name:Lp.$type,properties:{className:{name:Lp.className},styleText:{name:Lp.styleText}},superTypes:[]},Commit:{name:Rp.$type,properties:{id:{name:Rp.id},message:{name:Rp.message},tags:{name:Rp.tags,defaultValue:[]},type:{name:Rp.type}},superTypes:[wm.$type]},Component:{name:Bp.$type,properties:{decorator:{name:Bp.decorator},evolution:{name:Bp.evolution},inertia:{name:Bp.inertia,defaultValue:!1},label:{name:Bp.label},name:{name:Bp.name},visibility:{name:Bp.visibility}},superTypes:[]},Curve:{name:Vp.$type,properties:{entries:{name:Vp.entries,defaultValue:[]},label:{name:Vp.label},name:{name:Vp.name}},superTypes:[]},Deaccelerator:{name:Hp.$type,properties:{name:{name:Hp.name},x:{name:Hp.x},y:{name:Hp.y}},superTypes:[]},Decorator:{name:Up.$type,properties:{strategy:{name:Up.strategy}},superTypes:[]},Direction:{name:Wp.$type,properties:{accDescr:{name:Wp.accDescr},accTitle:{name:Wp.accTitle},dir:{name:Wp.dir},statements:{name:Wp.statements,defaultValue:[]},title:{name:Wp.title}},superTypes:[Xp.$type]},Edge:{name:Gp.$type,properties:{lhsDir:{name:Gp.lhsDir},lhsGroup:{name:Gp.lhsGroup,defaultValue:!1},lhsId:{name:Gp.lhsId},lhsInto:{name:Gp.lhsInto,defaultValue:!1},rhsDir:{name:Gp.rhsDir},rhsGroup:{name:Gp.rhsGroup,defaultValue:!1},rhsId:{name:Gp.rhsId},rhsInto:{name:Gp.rhsInto,defaultValue:!1},title:{name:Gp.title}},superTypes:[]},Entry:{name:Kp.$type,properties:{axis:{name:Kp.axis,referenceType:Mp.$type},value:{name:Kp.value}},superTypes:[]},Evolution:{name:qp.$type,properties:{stages:{name:qp.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Jp.$type,properties:{boundary:{name:Jp.boundary},name:{name:Jp.name},secondName:{name:Jp.secondName}},superTypes:[]},Evolve:{name:Yp.$type,properties:{component:{name:Yp.component},target:{name:Yp.target}},superTypes:[]},GitGraph:{name:Xp.$type,properties:{accDescr:{name:Xp.accDescr},accTitle:{name:Xp.accTitle},statements:{name:Xp.statements,defaultValue:[]},title:{name:Xp.title}},superTypes:[]},Group:{name:Qp.$type,properties:{icon:{name:Qp.icon},id:{name:Qp.id},in:{name:Qp.in},title:{name:Qp.title}},superTypes:[]},Info:{name:$p.$type,properties:{accDescr:{name:$p.accDescr},accTitle:{name:$p.accTitle},title:{name:$p.title}},superTypes:[]},Item:{name:tm.$type,properties:{classSelector:{name:tm.classSelector},name:{name:tm.name}},superTypes:[]},Junction:{name:nm.$type,properties:{id:{name:nm.id},in:{name:nm.in}},superTypes:[]},Label:{name:rm.$type,properties:{negX:{name:rm.negX,defaultValue:!1},negY:{name:rm.negY,defaultValue:!1},offsetX:{name:rm.offsetX},offsetY:{name:rm.offsetY}},superTypes:[]},Leaf:{name:im.$type,properties:{classSelector:{name:im.classSelector},name:{name:im.name},value:{name:im.value}},superTypes:[tm.$type]},Link:{name:am.$type,properties:{arrow:{name:am.arrow},from:{name:am.from},fromPort:{name:am.fromPort},linkLabel:{name:am.linkLabel},to:{name:am.to},toPort:{name:am.toPort}},superTypes:[]},Merge:{name:om.$type,properties:{branch:{name:om.branch},id:{name:om.id},tags:{name:om.tags,defaultValue:[]},type:{name:om.type}},superTypes:[wm.$type]},Note:{name:cm.$type,properties:{evolution:{name:cm.evolution},text:{name:cm.text},visibility:{name:cm.visibility}},superTypes:[]},Option:{name:lm.$type,properties:{name:{name:lm.name},value:{name:lm.value,defaultValue:!1}},superTypes:[]},Packet:{name:um.$type,properties:{accDescr:{name:um.accDescr},accTitle:{name:um.accTitle},blocks:{name:um.blocks,defaultValue:[]},title:{name:um.title}},superTypes:[]},PacketBlock:{name:fm.$type,properties:{bits:{name:fm.bits},end:{name:fm.end},label:{name:fm.label},start:{name:fm.start}},superTypes:[]},Pie:{name:mm.$type,properties:{accDescr:{name:mm.accDescr},accTitle:{name:mm.accTitle},sections:{name:mm.sections,defaultValue:[]},showData:{name:mm.showData,defaultValue:!1},title:{name:mm.title}},superTypes:[]},PieSection:{name:gm.$type,properties:{label:{name:gm.label},value:{name:gm.value}},superTypes:[]},Pipeline:{name:vm.$type,properties:{components:{name:vm.components,defaultValue:[]},parent:{name:vm.parent}},superTypes:[]},PipelineComponent:{name:ym.$type,properties:{evolution:{name:ym.evolution},label:{name:ym.label},name:{name:ym.name}},superTypes:[]},Radar:{name:bm.$type,properties:{accDescr:{name:bm.accDescr},accTitle:{name:bm.accTitle},axes:{name:bm.axes,defaultValue:[]},curves:{name:bm.curves,defaultValue:[]},options:{name:bm.options,defaultValue:[]},title:{name:bm.title}},superTypes:[]},Section:{name:xm.$type,properties:{classSelector:{name:xm.classSelector},name:{name:xm.name}},superTypes:[tm.$type]},Service:{name:Sm.$type,properties:{icon:{name:Sm.icon},iconText:{name:Sm.iconText},id:{name:Sm.id},in:{name:Sm.in},title:{name:Sm.title}},superTypes:[]},Size:{name:Cm.$type,properties:{height:{name:Cm.height},width:{name:Cm.width}},superTypes:[]},Statement:{name:wm.$type,properties:{},superTypes:[]},TreeNode:{name:Om.$type,properties:{indent:{name:Om.indent},name:{name:Om.name}},superTypes:[]},TreeView:{name:km.$type,properties:{accDescr:{name:km.accDescr},accTitle:{name:km.accTitle},nodes:{name:km.nodes,defaultValue:[]},title:{name:km.title}},superTypes:[]},Treemap:{name:Tm.$type,properties:{accDescr:{name:Tm.accDescr},accTitle:{name:Tm.accTitle},title:{name:Tm.title},TreemapRows:{name:Tm.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Dm.$type,properties:{indent:{name:Dm.indent},item:{name:Dm.item}},superTypes:[]},Wardley:{name:Am.$type,properties:{accDescr:{name:Am.accDescr},accelerators:{name:Am.accelerators,defaultValue:[]},accTitle:{name:Am.accTitle},anchors:{name:Am.anchors,defaultValue:[]},annotation:{name:Am.annotation,defaultValue:[]},annotations:{name:Am.annotations,defaultValue:[]},components:{name:Am.components,defaultValue:[]},deaccelerators:{name:Am.deaccelerators,defaultValue:[]},evolution:{name:Am.evolution},evolves:{name:Am.evolves,defaultValue:[]},links:{name:Am.links,defaultValue:[]},notes:{name:Am.notes,defaultValue:[]},pipelines:{name:Am.pipelines,defaultValue:[]},size:{name:Am.size},title:{name:Am.title}},superTypes:[]}}}static{$(this,`MermaidAstReflection`)}},Nm=new Mm,Pm,Fm=$(()=>Pm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`ArchitectureGrammarGrammar`),Im,Lm=$(()=>Im??=hp(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`GitGraphGrammarGrammar`),Rm,zm=$(()=>Rm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`InfoGrammarGrammar`),Bm,Vm=$(()=>Bm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PacketGrammarGrammar`),Hm,Um=$(()=>Hm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PieGrammarGrammar`),Wm,Gm=$(()=>Wm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),`RadarGrammarGrammar`),Km,qm=$(()=>Km??=hp(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),`TreemapGrammarGrammar`),Jm,Ym=$(()=>Jm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),`TreeViewGrammarGrammar`),Xm,Zm=$(()=>Xm??=hp(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \\\\t]+[A-Za-z(][A-Za-z0-9_()&]*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`WardleyGrammarGrammar`),Qm={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},$m={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},eh={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},th={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},nh={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},rh={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},ih={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},ah={languageId:`treeView`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},oh={languageId:`wardley`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},sh={AstReflection:$(()=>new Mm,`AstReflection`)},ch={Grammar:$(()=>Fm(),`Grammar`),LanguageMetaData:$(()=>Qm,`LanguageMetaData`),parser:{}},lh={Grammar:$(()=>Lm(),`Grammar`),LanguageMetaData:$(()=>$m,`LanguageMetaData`),parser:{}},uh={Grammar:$(()=>zm(),`Grammar`),LanguageMetaData:$(()=>eh,`LanguageMetaData`),parser:{}},dh={Grammar:$(()=>Vm(),`Grammar`),LanguageMetaData:$(()=>th,`LanguageMetaData`),parser:{}},fh={Grammar:$(()=>Um(),`Grammar`),LanguageMetaData:$(()=>nh,`LanguageMetaData`),parser:{}},ph={Grammar:$(()=>Gm(),`Grammar`),LanguageMetaData:$(()=>rh,`LanguageMetaData`),parser:{}},mh={Grammar:$(()=>qm(),`Grammar`),LanguageMetaData:$(()=>ih,`LanguageMetaData`),parser:{}},hh={Grammar:$(()=>Ym(),`Grammar`),LanguageMetaData:$(()=>ah,`LanguageMetaData`),parser:{}},gh={Grammar:$(()=>Zm(),`Grammar`),LanguageMetaData:$(()=>oh,`LanguageMetaData`),parser:{}},_h={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},vh=class extends yu{static{$(this,`AbstractMermaidValueConverter`)}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=_h[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,`
|
|
97
|
+
`)}}},yh=class extends vh{static{$(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},bh=class extends vu{static{$(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}};(class extends bh{static{$(this,`CommonTokenBuilder`)}});export{tp as _,lh as a,dh as c,hh as d,mh as f,ip as g,dp as h,yh as i,fh as l,$ as m,vh as n,uh as o,gh as p,ch as r,sh as s,bh as t,ph as u,np as v};
|
|
98
|
+
//# sourceMappingURL=chunk-K5T4RW27-BPgPjo39.mjs.map
|