@pi-outpost/embed 0.40.1 → 0.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/{CodeEditor-Cb6i9oIs.cjs → CodeEditor-B699PZlx.cjs} +1 -1
  2. package/dist/{CodeEditor-2Vx8PHAy.js → CodeEditor-CxKTvrhG.js} +5 -5
  3. package/dist/PdfViewer-COOgvLyp.js +428 -0
  4. package/dist/PdfViewer-Dyou2VMw.cjs +1 -0
  5. package/dist/{abnfDiagram-WEYOIA3C-B2ss_Vsq.js → abnfDiagram-WEYOIA3C-B_dTFm2g.js} +5 -5
  6. package/dist/{abnfDiagram-WEYOIA3C-DMn87p58.cjs → abnfDiagram-WEYOIA3C-Dk2VD3Iw.cjs} +1 -1
  7. package/dist/{arc-CLGGhOeW.js → arc-37kcMiGl.js} +1 -1
  8. package/dist/{arc-Dh2Zrypi.cjs → arc-C7P0rHQr.cjs} +1 -1
  9. package/dist/architecture-WOLXFQ4H-Dg4VU8sZ.js +2 -0
  10. package/dist/architecture-WOLXFQ4H-u_y_0ZVC.cjs +1 -0
  11. package/dist/architectureDiagram-ZHVYKT53-Bud-mHjo.cjs +36 -0
  12. package/dist/{architectureDiagram-ZHVYKT53-C5QppHvM.js → architectureDiagram-ZHVYKT53-CslNYmQN.js} +48 -64
  13. package/dist/{blockDiagram-RJAE7QA3-DOvlohR9.js → blockDiagram-RJAE7QA3-Dgm9J6pS.js} +27 -38
  14. package/dist/{blockDiagram-RJAE7QA3-CODM9GdZ.cjs → blockDiagram-RJAE7QA3-lEBn-_Yn.cjs} +2 -2
  15. package/dist/{c4Diagram-XDPPPE54-eTVK3Kzy.cjs → c4Diagram-XDPPPE54-BKNqVY-U.cjs} +1 -1
  16. package/dist/{c4Diagram-XDPPPE54-8dwnUpAO.js → c4Diagram-XDPPPE54-rbzhqhW5.js} +8 -8
  17. package/dist/channel-AESWk0Yw.cjs +1 -0
  18. package/dist/{channel-B1lf-ehw.js → channel-CEoRf1uz.js} +1 -1
  19. package/dist/{chunk-2E7WHVMD-DkV-cet-.cjs → chunk-2E7WHVMD-BNsJOdNP.cjs} +1 -1
  20. package/dist/{chunk-2E7WHVMD-Dg_Sckag.js → chunk-2E7WHVMD-Vo-POJc_.js} +3 -3
  21. package/dist/{chunk-4EMNKR2T-C2XrT3x_.js → chunk-4EMNKR2T-BIO9veC4.js} +1 -1
  22. package/dist/{chunk-4EMNKR2T-DfeN909d.cjs → chunk-4EMNKR2T-CGAdq4EA.cjs} +1 -1
  23. package/dist/{chunk-55XCU76K-d9D4PS_7.cjs → chunk-55XCU76K-IpMfjRYv.cjs} +1 -1
  24. package/dist/{chunk-55XCU76K-CADZXRVb.js → chunk-55XCU76K-o8OgDLPD.js} +3 -3
  25. package/dist/{chunk-7S6XSTFO-DV8etStf.js → chunk-7S6XSTFO-DrDRohsE.js} +4 -4
  26. package/dist/{chunk-7S6XSTFO-DJ37SdG5.cjs → chunk-7S6XSTFO-ejBVk-tI.cjs} +1 -1
  27. package/dist/{chunk-AQDTSKZB-DElrkKED.cjs → chunk-AQDTSKZB-B-MpZ-y2.cjs} +7 -7
  28. package/dist/{chunk-AQDTSKZB-CUCC855j.js → chunk-AQDTSKZB-DUZx386i.js} +14 -73
  29. package/dist/chunk-DSNLSHJZ-BxQ7lMXY.cjs +129 -0
  30. package/dist/{chunk-DSNLSHJZ-Bicto10E.js → chunk-DSNLSHJZ-DPpiuUZK.js} +627 -624
  31. package/dist/{chunk-HAGFOTED-Dykk1LyE.cjs → chunk-HAGFOTED-BUPxFGdn.cjs} +1 -1
  32. package/dist/{chunk-HAGFOTED-BjDmRfgG.js → chunk-HAGFOTED-ceXO12G4.js} +6 -6
  33. package/dist/{chunk-HNE4Q36P-C-j5Nn9f.cjs → chunk-HNE4Q36P-CCHAgwa3.cjs} +1 -1
  34. package/dist/{chunk-HNE4Q36P-5u7dvjgt.js → chunk-HNE4Q36P-uON_vFhT.js} +6 -6
  35. package/dist/{chunk-NGNAAXSQ-kHtfTQLE.cjs → chunk-NGNAAXSQ-BaBpWF2S.cjs} +6 -6
  36. package/dist/{chunk-NGNAAXSQ-DM0DL2MX.js → chunk-NGNAAXSQ-uUWLDjAm.js} +46 -50
  37. package/dist/{chunk-NQOKRVIF-CpOc5MEh.cjs → chunk-NQOKRVIF-DcZqKWzv.cjs} +1 -1
  38. package/dist/{chunk-NQOKRVIF-DUgN94ic.js → chunk-NQOKRVIF-DmOxzSOQ.js} +9 -9
  39. package/dist/{chunk-UHW7PFBP-NbzzxkEP.js → chunk-UHW7PFBP-BTk1ZC8L.js} +1 -1
  40. package/dist/{chunk-UHW7PFBP-SZ8KvGM0.cjs → chunk-UHW7PFBP-Bays5Zi8.cjs} +1 -1
  41. package/dist/{chunk-VQ5W62QI-D3c9tcDC.js → chunk-VQ5W62QI-Bvcxpp51.js} +2 -2
  42. package/dist/{chunk-VQ5W62QI-CsW6i5Ev.cjs → chunk-VQ5W62QI-Dw9Kffnl.cjs} +1 -1
  43. package/dist/{chunk-WQQL4CDK-l3Yf4SAX.js → chunk-WQQL4CDK-C3yDIFZ3.js} +8 -8
  44. package/dist/{chunk-WQQL4CDK-TvwGUFeE.cjs → chunk-WQQL4CDK-DxEEyQzx.cjs} +1 -1
  45. package/dist/{chunk-XXDRQBXY-IzhWXllg.js → chunk-XXDRQBXY-CNtMgRT_.js} +1 -1
  46. package/dist/{chunk-XXDRQBXY-yMT3rT5Y.cjs → chunk-XXDRQBXY-DfReYcER.cjs} +1 -1
  47. package/dist/{chunk-YZO67HFG-CLf5aoHk.cjs → chunk-YZO67HFG-DCQIFG8j.cjs} +1 -1
  48. package/dist/{chunk-YZO67HFG-DWHo0c6-.js → chunk-YZO67HFG-WF3jklBn.js} +2 -2
  49. package/dist/{chunk-ZAUX2LTX-BwjEPfG0.cjs → chunk-ZAUX2LTX-DIQkgUFr.cjs} +1 -1
  50. package/dist/{chunk-ZAUX2LTX-COHXRsvU.js → chunk-ZAUX2LTX-P8LAwm_U.js} +3 -3
  51. package/dist/{chunk-ZCHMQSOR-Cw-9SNln.js → chunk-ZCHMQSOR-BbO7eY2w.js} +78 -80
  52. package/dist/chunk-ZCHMQSOR-Cg8zPt0w.cjs +1 -0
  53. package/dist/{classDiagram-v2-4MYWR3UA-vsmkJ0Cx.js → classDiagram-v2-4MYWR3UA-DIjHIULx.js} +16 -16
  54. package/dist/{classDiagram-v2-4MYWR3UA-wLbwKHvU.cjs → classDiagram-v2-4MYWR3UA-DyMM0DMP.cjs} +2 -2
  55. package/dist/{clike-8rZWBES0.cjs → clike-I-fVVl3d.cjs} +1 -1
  56. package/dist/{clike-D-dOQnrm.js → clike-VB7owi7S.js} +1 -5
  57. package/dist/{conversationExport-BmvGyAf-.cjs → conversationExport-Co-E1-fF.cjs} +1 -1
  58. package/dist/{conversationExport-CBiBLWVk.js → conversationExport-KyCOByU5.js} +7 -8
  59. package/dist/conversationHistory-BYekdNUk.cjs +31 -0
  60. package/dist/conversationHistory-DPZF00Qz.js +21639 -0
  61. package/dist/{core-D_MCdR2m.js → core-BGZbe1UJ.js} +2 -6
  62. package/dist/{core-BrupIPpc.cjs → core-CmCLKhYZ.cjs} +2 -2
  63. package/dist/{cose-bilkent-JH36ORCC-qPjrc3_9.js → cose-bilkent-JH36ORCC-DjbvRWCz.js} +58 -71
  64. package/dist/cose-bilkent-JH36ORCC-KeNQ2SMA.cjs +1 -0
  65. package/dist/cynefin-EF2NZ3EQ-BBhIrDKD.cjs +1 -0
  66. package/dist/cynefin-EF2NZ3EQ-DDZjUykJ.js +2 -0
  67. package/dist/{cynefinDiagram-WF24UDRP-CHBmFbqk.cjs → cynefinDiagram-WF24UDRP-BC09SRT2.cjs} +1 -1
  68. package/dist/{cynefinDiagram-WF24UDRP-BhWkOxCi.js → cynefinDiagram-WF24UDRP-DEFG-MNh.js} +5 -5
  69. package/dist/cytoscape.esm-BN8NndIc.cjs +321 -0
  70. package/dist/{cytoscape.esm-Cq7KPj0t.js → cytoscape.esm-BmhLauwj.js} +412 -513
  71. package/dist/dagre-NK4GIZVX-D0_oLrA9.cjs +4 -0
  72. package/dist/{dagre-NK4GIZVX-CJfLDa-C.js → dagre-NK4GIZVX-D6Xuc_Nw.js} +43 -47
  73. package/dist/{diagram-CBK3MWTC-2pAHlnGJ.js → diagram-CBK3MWTC-CuUrHQAz.js} +7 -7
  74. package/dist/{diagram-CBK3MWTC-B_5GBGbb.cjs → diagram-CBK3MWTC-DbXGbFMz.cjs} +1 -1
  75. package/dist/{diagram-I5XIIV2D-CQ_Y9NJs.js → diagram-I5XIIV2D-DbwsxgDf.js} +5 -5
  76. package/dist/{diagram-I5XIIV2D-BPxYY-Kp.cjs → diagram-I5XIIV2D-Dom9usNq.cjs} +1 -1
  77. package/dist/{diagram-ODIL2UCW-pyDNtrY0.cjs → diagram-ODIL2UCW-CLSAtgxG.cjs} +2 -2
  78. package/dist/{diagram-ODIL2UCW-BJL-7QWJ.js → diagram-ODIL2UCW-CSnuo9bJ.js} +7 -15
  79. package/dist/{diagram-PFBEJUXE-CXd3x3TA.js → diagram-PFBEJUXE-ChA6KYWw.js} +6 -6
  80. package/dist/{diagram-PFBEJUXE-BUvTWvw5.cjs → diagram-PFBEJUXE-DAIw33Bx.cjs} +1 -1
  81. package/dist/{diagram-RJA3I4VV-T3Hd1koB.cjs → diagram-RJA3I4VV-Bt-BxYua.cjs} +1 -1
  82. package/dist/{diagram-RJA3I4VV-eMNhs7pW.js → diagram-RJA3I4VV-DCygetH_.js} +5 -5
  83. package/dist/{diagram-TYUNFSNR-CWpFSB2K.js → diagram-TYUNFSNR-BSq4ni3b.js} +22 -35
  84. package/dist/diagram-TYUNFSNR-Dy2nkVin.cjs +200 -0
  85. package/dist/{dist-Dvqp7T4I.cjs → dist-2ynRxsSC.cjs} +1 -1
  86. package/dist/{dist-B7I27gkN.cjs → dist-AeGgfThs.cjs} +1 -1
  87. package/dist/{dist-Dwv2VYAL.cjs → dist-BB5r6V4R.cjs} +1 -1
  88. package/dist/{dist-BvsCdwbL.cjs → dist-BDenKBYL.cjs} +1 -1
  89. package/dist/{dist-BhXQJ0x3.js → dist-BJHB0x8Y.js} +12 -18
  90. package/dist/{dist-BWlGU9XM.js → dist-BTD5L343.js} +3 -3
  91. package/dist/{dist-Dr4zY56l.js → dist-BWEDf1a-.js} +2 -2
  92. package/dist/{dist-BlD6NhiG.js → dist-BWVp6Da-.js} +4 -7
  93. package/dist/{dist-B8gmxwh-.cjs → dist-C6eKaA9j.cjs} +1 -1
  94. package/dist/{dist-C0_uLrCb.cjs → dist-CCIM600Y.cjs} +1 -1
  95. package/dist/{dist-BZcglaBe.cjs → dist-CFf_g4kk.cjs} +1 -1
  96. package/dist/{dist-DPXHxuWb.js → dist-CGZbBQje.js} +2 -2
  97. package/dist/{dist-Xjm88mbq.js → dist-CIBKGNWD.js} +4 -4
  98. package/dist/{dist-DqbI0un6.cjs → dist-CQNYwGEy.cjs} +1 -1
  99. package/dist/{dist-CyFPTQ2l.cjs → dist-CT7H4C9g.cjs} +1 -1
  100. package/dist/{dist-BBUKMRrs.js → dist-CYUF5YPj.js} +2 -2
  101. package/dist/{dist-DWv23S35.js → dist-CZhfI1u7.js} +1 -1
  102. package/dist/{dist-CHKg1Qb9.js → dist-ChWDi62w.js} +3 -3
  103. package/dist/dist-CmF-TINl.cjs +1 -0
  104. package/dist/{dist-C8jjSrIs.cjs → dist-Cz8GulTe.cjs} +1 -1
  105. package/dist/{dist-qNFo_ASR.cjs → dist-D6LkseRA.cjs} +1 -1
  106. package/dist/{dist-BZjcsPqi.cjs → dist-DEZD35IP.cjs} +7 -7
  107. package/dist/{dist-DZrtSp8H.js → dist-DNg4hNu7.js} +3 -3
  108. package/dist/dist-D_oMTxAl.cjs +2 -0
  109. package/dist/{dist-BfQGuM1r.js → dist-DaJf_JYz.js} +4 -4
  110. package/dist/dist-Dpu_aN4m.cjs +1 -0
  111. package/dist/{dist-CA6ERWRG.js → dist-DszFZlYh.js} +2 -2
  112. package/dist/{dist-qq9a_ch2.js → dist-Kg2QsUg8.js} +4 -4
  113. package/dist/{dist-FSzij9Rn.js → dist-LM11INLG.js} +2 -2
  114. package/dist/{dist-C9dtxVRR.cjs → dist-M4fo1U45.cjs} +1 -1
  115. package/dist/{dist-BhNvvg0I.js → dist-gn9y7Yb8.js} +116 -119
  116. package/dist/{dist-B0lO3k1f.js → dist-hv72z6I6.js} +3 -3
  117. package/dist/{dist-Bppoi_v9.js → dist-lPCEVnGX.js} +2 -2
  118. package/dist/{dist-D8I4FQ-Q.cjs → dist-rfjaCa2V.cjs} +1 -1
  119. package/dist/{docxExport-BGYavEI-.js → docxExport-DpgcioIA.js} +2 -2
  120. package/dist/{docxExport-B24fOHFl.cjs → docxExport-ZYp4tZ7k.cjs} +1 -1
  121. package/dist/{ebnfDiagram-V4P3TTPT-DAoJZ85k.cjs → ebnfDiagram-V4P3TTPT-6xhHNshj.cjs} +1 -1
  122. package/dist/{ebnfDiagram-V4P3TTPT-B7cCNP3X.js → ebnfDiagram-V4P3TTPT-e4I3Otpa.js} +5 -5
  123. package/dist/{elk-QONTBCTQ-BYnAuRAH.js → elk-QONTBCTQ-B8RYU1Ay.js} +746 -1241
  124. package/dist/elk-QONTBCTQ-hBYUI6Nr.cjs +27 -0
  125. package/dist/{erDiagram-KYQIGQAA-BKkxORU3.js → erDiagram-KYQIGQAA-BTNANm6p.js} +14 -14
  126. package/dist/{erDiagram-KYQIGQAA-BIlejnVi.cjs → erDiagram-KYQIGQAA-DsqyoDOz.cjs} +1 -1
  127. package/dist/eventmodeling-K75KTNOO-Ckh9Djrw.js +2 -0
  128. package/dist/eventmodeling-K75KTNOO-DKYlYG2c.cjs +1 -0
  129. package/dist/flowDiagram-IUGLLWBU-BJlVRCj8.js +15 -0
  130. package/dist/flowDiagram-IUGLLWBU-CsC_IEV_.cjs +1 -0
  131. package/dist/{ganttDiagram-R7GPNTJY-BGcXo1KA.cjs → ganttDiagram-R7GPNTJY-B1juClwW.cjs} +2 -2
  132. package/dist/{ganttDiagram-R7GPNTJY-dcubAqZI.js → ganttDiagram-R7GPNTJY-CEGQ6hzi.js} +18 -26
  133. package/dist/gitGraph-VSP46ZUC-5x2CrP9e.js +2 -0
  134. package/dist/gitGraph-VSP46ZUC-Cgx_wrMl.cjs +1 -0
  135. package/dist/{gitGraphDiagram-PDYL7XHY-BoJsALki.cjs → gitGraphDiagram-PDYL7XHY-6cCNinUi.cjs} +1 -1
  136. package/dist/{gitGraphDiagram-PDYL7XHY-CfRYMd3w.js → gitGraphDiagram-PDYL7XHY-D_ADFBrL.js} +4 -4
  137. package/dist/info-OHQRW6UA-DDzA9eXN.cjs +1 -0
  138. package/dist/info-OHQRW6UA-DkaWmfEE.js +2 -0
  139. package/dist/{infoDiagram-MVDRKAX5-B1QBSTSo.cjs → infoDiagram-MVDRKAX5-CVeFOzof.cjs} +1 -1
  140. package/dist/{infoDiagram-MVDRKAX5-BYGrp2QT.js → infoDiagram-MVDRKAX5-Dkuw3h5s.js} +4 -4
  141. package/dist/{ishikawaDiagram-HPEHV2GE-BWJo3pFM.cjs → ishikawaDiagram-HPEHV2GE-92CAbMpi.cjs} +2 -2
  142. package/dist/{ishikawaDiagram-HPEHV2GE-C32LoFQd.js → ishikawaDiagram-HPEHV2GE-oTSoKUOA.js} +5 -7
  143. package/dist/{javascript-CIP6I0eT.js → javascript-BSRoJWCv.js} +1 -8
  144. package/dist/javascript-B_OkdA1F.cjs +1 -0
  145. package/dist/{journeyDiagram-BOSHW7O7-DJ9OKW8H.js → journeyDiagram-BOSHW7O7-CMbGxPLA.js} +4 -4
  146. package/dist/{journeyDiagram-BOSHW7O7-090H5NM8.cjs → journeyDiagram-BOSHW7O7-Cb_yTQWF.cjs} +1 -1
  147. package/dist/{kanban-definition-FNSA4HC5-BhC2u-9L.cjs → kanban-definition-FNSA4HC5-DlUMoAIT.cjs} +1 -1
  148. package/dist/{kanban-definition-FNSA4HC5-FqIvMKJw.js → kanban-definition-FNSA4HC5-DzEQcVPw.js} +10 -10
  149. package/dist/{katex-DTnCNBYg.js → katex-BOYcAQ2I.js} +17 -26
  150. package/dist/{katex-DBUQi-HZ.cjs → katex-C-T_oEhv.cjs} +5 -5
  151. package/dist/lib-CRTt_FoR.cjs +26 -0
  152. package/dist/{lib-DILNlJGg.js → lib-CSMo4o20.js} +1522 -1452
  153. package/dist/{line-CJjnW4T-.js → line-0VTxwDiV.js} +1 -1
  154. package/dist/{line-DjYp3Ff8.cjs → line-ZwhMGa3_.cjs} +1 -1
  155. package/dist/linear-Bh2vuvAF.cjs +1 -0
  156. package/dist/{linear-DVFZQF4V.js → linear-CxE0kir0.js} +2 -3
  157. package/dist/{loadReferencedImage-CkvnSeQi.js → loadReferencedImage-2qNdVVhQ.js} +2 -2
  158. package/dist/{loadReferencedImage-CHTgZKAP.cjs → loadReferencedImage-qVqyIGz2.cjs} +1 -1
  159. package/dist/mermaid-parser.core-DKJw9lm9.cjs +6 -0
  160. package/dist/{mermaid-parser.core-CI12FMcX.js → mermaid-parser.core-IoY9gmm6.js} +19 -25
  161. package/dist/{mermaid.core-2PafqU96.cjs → mermaid.core-73kk5oPm.cjs} +7 -7
  162. package/dist/{mermaid.core-BxQmR6RW.js → mermaid.core-C8dp1dnD.js} +69 -75
  163. package/dist/{mermaidToImage-DowDuCUe.js → mermaidToImage-B2aJB9x8.js} +4900 -2274
  164. package/dist/mermaidToImage-qujM0Ggp.cjs +28 -0
  165. package/dist/{mindmap-definition-6OY57UG3-C0JXAaiI.js → mindmap-definition-6OY57UG3-CXobmoZM.js} +13 -13
  166. package/dist/{mindmap-definition-6OY57UG3-QMaMZxqJ.cjs → mindmap-definition-6OY57UG3-DLx3d1V6.cjs} +1 -1
  167. package/dist/packet-JDAUHWVQ-7Kdl1aNj.js +2 -0
  168. package/dist/packet-JDAUHWVQ-BB_DuPiR.cjs +1 -0
  169. package/dist/{pdf-D6MygsxO.js → pdf-CL7gVGT1.js} +3278 -3383
  170. package/dist/pdf-HcLHRelN.cjs +54 -0
  171. package/dist/{pegDiagram-ECIUJNBX-agFLe55J.cjs → pegDiagram-ECIUJNBX-B-eSDSQK.cjs} +1 -1
  172. package/dist/{pegDiagram-ECIUJNBX-BluDPMz-.js → pegDiagram-ECIUJNBX-ODBWqs1V.js} +5 -5
  173. package/dist/pi-outpost-embed.cjs +15 -15
  174. package/dist/pi-outpost-embed.js +160 -325
  175. package/dist/pie-XZMESJXO-CxP1ntAS.cjs +1 -0
  176. package/dist/pie-XZMESJXO-vkOzPeYA.js +2 -0
  177. package/dist/{pieDiagram-GNMPY74T-Bkt6LXIr.cjs → pieDiagram-GNMPY74T-BtYyKCrf.cjs} +1 -1
  178. package/dist/{pieDiagram-GNMPY74T-D2Dlw9oL.js → pieDiagram-GNMPY74T-DYDC5z2D.js} +7 -7
  179. package/dist/{quadrantDiagram-D57K4MC3-vbdBbRAF.js → quadrantDiagram-D57K4MC3-BfQWcg-D.js} +3 -3
  180. package/dist/{quadrantDiagram-D57K4MC3-BwUPO-ri.cjs → quadrantDiagram-D57K4MC3-Cu6JmzPE.cjs} +1 -1
  181. package/dist/radar-ABXABTNO-BIDY5R4F.cjs +1 -0
  182. package/dist/radar-ABXABTNO-DvS23EDt.js +2 -0
  183. package/dist/railroad-I3PHUGI6-BRbLa2w3.cjs +1 -0
  184. package/dist/railroad-I3PHUGI6-DH5Ttw2P.js +2 -0
  185. package/dist/railroad-abnf-LNEFI6M7-Qj3WuV4C.cjs +1 -0
  186. package/dist/railroad-abnf-LNEFI6M7-wA0DIfJr.js +2 -0
  187. package/dist/railroad-ebnf-DWYD2UWJ-C7YCjuXb.cjs +1 -0
  188. package/dist/railroad-ebnf-DWYD2UWJ-CkakbyYF.js +2 -0
  189. package/dist/railroad-peg-JR7BVNR7-CpVGf7CG.cjs +1 -0
  190. package/dist/railroad-peg-JR7BVNR7-Kw2gXekA.js +2 -0
  191. package/dist/{railroadDiagram-Y72NRBL7-CJ9MP3wV.cjs → railroadDiagram-Y72NRBL7-BdHmqKV_.cjs} +1 -1
  192. package/dist/{railroadDiagram-Y72NRBL7-B2x_q8pa.js → railroadDiagram-Y72NRBL7-ChQwG3mZ.js} +5 -5
  193. package/dist/{requirementDiagram-EQYSW5RA-CP0M11vC.cjs → requirementDiagram-EQYSW5RA-CDQ6Nza1.cjs} +1 -1
  194. package/dist/{requirementDiagram-EQYSW5RA-j7VZ-e65.js → requirementDiagram-EQYSW5RA-Dj4E0fE3.js} +13 -13
  195. package/dist/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-5HNE8Q1r.js} +1 -1
  196. package/dist/rolldown-runtime-DbbDpzbe.cjs +1 -0
  197. package/dist/{sankeyDiagram-SY24JHO5-B7NuxaKG.cjs → sankeyDiagram-SY24JHO5-BPFkmPzT.cjs} +1 -1
  198. package/dist/{sankeyDiagram-SY24JHO5-Cgewgbc8.js → sankeyDiagram-SY24JHO5-luxVW4uf.js} +2 -2
  199. package/dist/{sequenceDiagram-BLEHNHQU-B5THoiqW.cjs → sequenceDiagram-BLEHNHQU-DX51aIRY.cjs} +1 -1
  200. package/dist/{sequenceDiagram-BLEHNHQU-DsjvHcWN.js → sequenceDiagram-BLEHNHQU-H4rQDzp-.js} +6 -6
  201. package/dist/{sizeCapture-INFHLROL-B5Lg3qGn.js → sizeCapture-INFHLROL-Uzko9_4n.js} +1 -1
  202. package/dist/sizeCapture-INFHLROL-bi8MyHwB.cjs +1 -0
  203. package/dist/{src-Dkp7vqs8.js → src-65Lfw03T.js} +12 -18
  204. package/dist/src-BN1VgXwj.cjs +1 -0
  205. package/dist/{stateDiagram-v2-A6IESKWZ-BD0FNkiB.js → stateDiagram-v2-A6IESKWZ-DBJ11U2p.js} +14 -14
  206. package/dist/{stateDiagram-v2-A6IESKWZ-Dqzvdrv1.cjs → stateDiagram-v2-A6IESKWZ-Dbp783Hd.cjs} +1 -1
  207. package/dist/{swimlanes-B3ENRKFQ-Do-xntE9.js → swimlanes-B3ENRKFQ-Bp3vZCmK.js} +38 -60
  208. package/dist/swimlanes-B3ENRKFQ-DY1V--Rq.cjs +1 -0
  209. package/dist/swimlanesDiagram-AYQRV4AK-COavJcG4.js +27 -0
  210. package/dist/swimlanesDiagram-AYQRV4AK-dUd5QjxZ.cjs +8 -0
  211. package/dist/{timeline-definition-JXYKGLGB-Cxi2ay-W.js → timeline-definition-JXYKGLGB-BE6iAj4r.js} +5 -5
  212. package/dist/{timeline-definition-JXYKGLGB-B_QITrmE.cjs → timeline-definition-JXYKGLGB-DKhMPFBi.cjs} +1 -1
  213. package/dist/treeView-D4JQ5SDB-BAXbN8Bf.cjs +1 -0
  214. package/dist/treeView-D4JQ5SDB-BAub6u3e.js +2 -0
  215. package/dist/treemap-SAJKECNS-DlyYa6yd.js +2 -0
  216. package/dist/treemap-SAJKECNS-EjU-hEqB.cjs +1 -0
  217. package/dist/{typescript-C93MG6Zk.js → typescript-4QjI-Ug2.js} +1 -8
  218. package/dist/typescript-CUdTaGTg.cjs +1 -0
  219. package/dist/{usecaseDiagram-WPOLBNNX-_GFZAFdK.cjs → usecaseDiagram-WPOLBNNX-BRWufOTq.cjs} +6 -6
  220. package/dist/{usecaseDiagram-WPOLBNNX-C5u6uogx.js → usecaseDiagram-WPOLBNNX-DY9Md_AG.js} +36 -48
  221. package/dist/{vennDiagram-Q3Y3IDCW-CircfM4o.js → vennDiagram-Q3Y3IDCW-DbPGt27W.js} +4 -4
  222. package/dist/{vennDiagram-Q3Y3IDCW-Bf1i94bS.cjs → vennDiagram-Q3Y3IDCW-NYVHk5sI.cjs} +1 -1
  223. package/dist/wardley-7MLQ67FV-BDYz-MEd.js +2 -0
  224. package/dist/wardley-7MLQ67FV-BdwutaJ8.cjs +1 -0
  225. package/dist/{wardleyDiagram-IVAIDKWA-BOSseRAa.js → wardleyDiagram-IVAIDKWA-BHkJFpfC.js} +5 -5
  226. package/dist/{wardleyDiagram-IVAIDKWA-Cr5LS-u2.cjs → wardleyDiagram-IVAIDKWA-DsYJNlmX.cjs} +1 -1
  227. package/dist/{xychartDiagram-4URNHDU4-DOUN6alM.cjs → xychartDiagram-4URNHDU4-B_g46bSg.cjs} +1 -1
  228. package/dist/{xychartDiagram-4URNHDU4-C4X8LFY4.js → xychartDiagram-4URNHDU4-IvFjWG-y.js} +8 -8
  229. package/package.json +14 -14
  230. package/dist/PdfViewer-BJfC4rzg.js +0 -428
  231. package/dist/PdfViewer-D6C-NAyn.cjs +0 -1
  232. package/dist/architecture-WOLXFQ4H-DupyKILn.cjs +0 -1
  233. package/dist/architecture-WOLXFQ4H-X4ZWxzi-.js +0 -3
  234. package/dist/architectureDiagram-ZHVYKT53-DBfdIpyr.cjs +0 -36
  235. package/dist/channel-BRczbI_M.cjs +0 -1
  236. package/dist/chunk-DSNLSHJZ-DZO9xahH.cjs +0 -129
  237. package/dist/chunk-ZCHMQSOR-7slscxYq.cjs +0 -1
  238. package/dist/conversationHistory-DN1r7WZT.cjs +0 -287
  239. package/dist/conversationHistory-DwB6hasI.js +0 -43647
  240. package/dist/cose-bilkent-JH36ORCC-Cc2qvpLA.cjs +0 -1
  241. package/dist/cynefin-EF2NZ3EQ-BB_WO8YQ.js +0 -3
  242. package/dist/cynefin-EF2NZ3EQ-Du3-s5Z7.cjs +0 -1
  243. package/dist/cytoscape.esm-uHsEX1XI.cjs +0 -321
  244. package/dist/dagre-NK4GIZVX-BI_akQkH.cjs +0 -4
  245. package/dist/diagram-TYUNFSNR-B_p2UHsR.cjs +0 -200
  246. package/dist/dist-DEl2Ze0j.cjs +0 -2
  247. package/dist/dist-DJbgM591.cjs +0 -1
  248. package/dist/dist-Dja2VlN5.cjs +0 -1
  249. package/dist/elk-QONTBCTQ-BDAptnPT.cjs +0 -27
  250. package/dist/eventmodeling-K75KTNOO-CMoz0K5S.js +0 -3
  251. package/dist/eventmodeling-K75KTNOO-DZdZrgwl.cjs +0 -1
  252. package/dist/flowDiagram-IUGLLWBU-BSiCLGuL.cjs +0 -1
  253. package/dist/flowDiagram-IUGLLWBU-DL_I6QCE.js +0 -16
  254. package/dist/gitGraph-VSP46ZUC-DoTshgkY.js +0 -3
  255. package/dist/gitGraph-VSP46ZUC-lawIO6K6.cjs +0 -1
  256. package/dist/info-OHQRW6UA-DPTZOb30.js +0 -3
  257. package/dist/info-OHQRW6UA-deop1PPz.cjs +0 -1
  258. package/dist/javascript-Gn0piXHk.cjs +0 -1
  259. package/dist/lib-BDkAiWI9.cjs +0 -26
  260. package/dist/linear-Nt9BuHfn.cjs +0 -1
  261. package/dist/mermaid-parser.core-BHBS1DqP.cjs +0 -6
  262. package/dist/mermaidToImage-CSR5Vyvs.cjs +0 -25
  263. package/dist/packet-JDAUHWVQ-Bcik24Kz.js +0 -3
  264. package/dist/packet-JDAUHWVQ-CrY7ylWJ.cjs +0 -1
  265. package/dist/pdf-BcvU2rBV.cjs +0 -54
  266. package/dist/pie-XZMESJXO-BYQC-ufi.js +0 -3
  267. package/dist/pie-XZMESJXO-WjCBboSE.cjs +0 -1
  268. package/dist/radar-ABXABTNO-BoQ7hH7Z.cjs +0 -1
  269. package/dist/radar-ABXABTNO-MxbyaZja.js +0 -3
  270. package/dist/railroad-I3PHUGI6-DckUArT-.js +0 -3
  271. package/dist/railroad-I3PHUGI6-DuGTlHry.cjs +0 -1
  272. package/dist/railroad-abnf-LNEFI6M7-DmAJaMEu.js +0 -3
  273. package/dist/railroad-abnf-LNEFI6M7-DoWf9u55.cjs +0 -1
  274. package/dist/railroad-ebnf-DWYD2UWJ-Bf05ZyW1.cjs +0 -1
  275. package/dist/railroad-ebnf-DWYD2UWJ-CS2AUYSv.js +0 -3
  276. package/dist/railroad-peg-JR7BVNR7-B-nctVbV.js +0 -3
  277. package/dist/railroad-peg-JR7BVNR7-CcV5KH4m.cjs +0 -1
  278. package/dist/rolldown-runtime-DF3sbh8G.cjs +0 -1
  279. package/dist/sizeCapture-INFHLROL-bJ2ZX4Du.cjs +0 -1
  280. package/dist/src-D9o9TOtH.cjs +0 -1
  281. package/dist/swimlanes-B3ENRKFQ-DEsfJ_Va.cjs +0 -1
  282. package/dist/swimlanesDiagram-AYQRV4AK-CU4USE4p.cjs +0 -8
  283. package/dist/swimlanesDiagram-AYQRV4AK-ora_Y3LB.js +0 -27
  284. package/dist/treeView-D4JQ5SDB-C3ticT1s.cjs +0 -1
  285. package/dist/treeView-D4JQ5SDB-CEuRf8gK.js +0 -3
  286. package/dist/treemap-SAJKECNS-BwIfwvl-.cjs +0 -1
  287. package/dist/treemap-SAJKECNS-DiC0668-.js +0 -3
  288. package/dist/typescript-BarIi8q9.cjs +0 -1
  289. package/dist/wardley-7MLQ67FV-BoIyQQ0E.cjs +0 -1
  290. package/dist/wardley-7MLQ67FV-CFF6IT1d.js +0 -3
@@ -3,8 +3,8 @@ ${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)
3
3
  `,f;(function(e){function t(e){let t=e;return t&&s.func(t.dispose)&&s.func(t.onClose)&&s.func(t.onError)&&s.func(t.write)}o(t,`is`),e.is=t})(f||(e.MessageWriter=f={}));var m=class{static{o(this,`AbstractMessageWriter`)}errorEmitter;closeEmitter;constructor(){this.errorEmitter=new l.Emitter,this.closeEmitter=new l.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: ${s.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=m;var h;(function(e){function t(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,a.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,a.default)().applicationJson.encoder}}o(t,`fromOptions`),e.fromOptions=t})(h||={}),e.WriteableStreamMessageWriter=class extends m{static{o(this,`WriteableStreamMessageWriter`)}writable;options;errorCount;writeSemaphore;constructor(e,t){super(),this.writable=e,this.options=h.fromOptions(t),this.errorCount=0,this.writeSemaphore=new c.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(u,t.byteLength.toString(),d),n.push(d),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()}}}}),C=c({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,n=10,r=`\r
4
4
  `;e.AbstractMessageBuffer=class{static{o(this,`AbstractMessageBuffer`)}_encoding;_chunks;_totalLength;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 i=0,a=0,o=0,s=0;row:for(;a<this._chunks.length;){let e=this._chunks[a];for(o=0;o<e.length;){switch(e[o]){case t:switch(i){case 0:i=1;break;case 2:i=3;break;default:i=0}break;case n:switch(i){case 1:i=2;break;case 3:i=4,o++;break row;default:i=0}break;default:i=0}o++}s+=e.byteLength,a++}if(i!==4)return;let c=this._read(s+o),l=new Map,u=this.toString(c,`ascii`).split(r);if(u.length<2)return l;for(let t=0;t<u.length-2;t++){let n=u[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'
5
5
  ${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();l.set(e?i.toLowerCase():i,a)}return l}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}}}}),te=c({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";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:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=o(function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)},`ownKeys`);return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!=="default"&&t(i,r,a[o]);return n(i,r),i}})(),i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),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.TraceValue=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0,e.createMessageConnection=A;var a=i(_()),s=r(p()),c=m(),l=h(),u=v(),d=y(),f;(function(e){e.type=new c.NotificationType(`$/cancelRequest`)})(f||={});var g;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}o(t,`is`),e.is=t})(g||(e.ProgressToken=g={}));var b;(function(e){e.type=new c.NotificationType(`$/progress`)})(b||={}),e.ProgressType=class{static{o(this,`ProgressType`)}__;_pr;constructor(){}};var ee;(function(e){function t(e){return s.func(e)}o(t,`is`),e.is=t})(ee||={}),e.NullLogger=Object.freeze({error:o(()=>{},`error`),warn:o(()=>{},`warn`),info:o(()=>{},`info`),log:o(()=>{},`log`)});var x;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(x||(e.Trace=x={}));var S;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(S||(e.TraceValue=S={})),e.TraceValues=S,(function(e){function t(t){if(!s.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}}o(t,`fromString`),e.fromString=t;function n(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`}}o(n,`toString`),e.toString=n})(x||(e.Trace=x={}));var C;(function(e){e.Text=`text`,e.JSON=`json`})(C||(e.TraceFormat=C={})),(function(e){function t(t){return s.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}o(t,`fromString`),e.fromString=t})(C||(e.TraceFormat=C={}));var te;(function(e){e.type=new c.NotificationType(`$/setTrace`)})(te||(e.SetTraceNotification=te={}));var w;(function(e){e.type=new c.NotificationType(`$/logTrace`)})(w||(e.LogTraceNotification=w={}));var ne;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(ne||(e.ConnectionErrors=ne={}));var re=class e extends Error{static{o(this,`ConnectionError`)}code;constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=re;var T;(function(e){function t(e){let t=e;return t&&s.func(t.cancelUndispatched)}o(t,`is`),e.is=t})(T||(e.ConnectionStrategy=T={}));var ie;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&s.func(t.createCancellationTokenSource)&&(t.dispose===void 0||s.func(t.dispose))}o(t,`is`),e.is=t})(ie||(e.IdCancellationReceiverStrategy=ie={}));var E;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&s.func(t.createCancellationTokenSource)&&(t.dispose===void 0||s.func(t.dispose))}o(t,`is`),e.is=t})(E||(e.RequestCancellationReceiverStrategy=E={}));var D;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new d.CancellationTokenSource}});function t(e){return ie.is(e)||E.is(e)}o(t,`is`),e.is=t})(D||(e.CancellationReceiverStrategy=D={}));var O;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(f.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&s.func(t.sendCancellation)&&s.func(t.cleanup)}o(t,`is`),e.is=t})(O||(e.CancellationSenderStrategy=O={}));var ae;(function(e){e.Message=Object.freeze({receiver:D.Message,sender:O.Message});function t(e){let t=e;return t&&D.is(t.receiver)&&O.is(t.sender)}o(t,`is`),e.is=t})(ae||(e.CancellationStrategy=ae={}));var oe;(function(e){function t(e){let t=e;return t&&s.func(t.handleMessage)}o(t,`is`),e.is=t})(oe||(e.MessageStrategy=oe={}));var se;(function(e){function t(e){let t=e;return t&&(ae.is(t.cancellationStrategy)||T.is(t.connectionStrategy)||oe.is(t.messageStrategy)||s.number(t.maxParallelism))}o(t,`is`),e.is=t})(se||(e.ConnectionOptions=se={}));var k;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(k||={});function A(t,n,r,i){let p=r===void 0?e.NullLogger:r,m=0,h=0,_=0,v=i?.maxParallelism??-1,y=0,S,T=new Map,E,D=new Map,O=new Map,se,A=new l.LinkedMap,ce=new Map,le=new Set,ue=new Map,j=x.Off,de=C.Text,M,fe=k.New,pe=new u.Emitter,me=new u.Emitter,he=new u.Emitter,N=new u.Emitter,ge=new u.Emitter,_e=i&&i.cancellationStrategy?i.cancellationStrategy:ae.Message;function ve(e){}o(ve,`cancelUndispatched`);function ye(){return fe===k.Listening}o(ye,`isListening`);function be(){return fe===k.Closed}o(be,`isClosed`);function xe(){return fe===k.Disposed}o(xe,`isDisposed`);function Se(){(fe===k.New||fe===k.Listening)&&(fe=k.Closed,me.fire(void 0))}o(Se,`closeHandler`);function Ce(e){pe.fire([e,void 0,void 0])}o(Ce,`readErrorHandler`);function we(e){pe.fire(e)}o(we,`writeErrorHandler`),t.onClose(Se),t.onError(Ce),n.onClose(Se),n.onError(we);function Te(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}o(Te,`createRequestQueueKey`);function Ee(e){return e===null?`res-unknown-`+(++_).toString():`res-`+e.toString()}o(Ee,`createResponseQueueKey`);function De(){return`not-`+(++h).toString()}o(De,`createNotificationQueueKey`);function Oe(e,t){c.Message.isRequest(t)?e.set(Te(t.id),t):c.Message.isResponse(t)?v===-1?e.set(Ee(t.id),t):Ne(t):e.set(De(),t)}o(Oe,`addMessageToQueue`);function ke(){se||A.size===0||v!==-1&&y>=v||(se=(0,a.default)().timer.setImmediate(async()=>{if(se=void 0,A.size===0||v!==-1&&y>=v)return;let e=A.shift(),t;try{y++;let n=i?.messageStrategy;t=oe.is(n)?n.handleMessage(e,Ae):Ae(e)}catch(e){p.error(`Processing message queue failed: ${e.toString()}`)}finally{t instanceof Promise?t.then(()=>{y--,ke()}).catch(e=>{p.error(`Processing message queue failed: ${e.toString()}`)}):y--,ke()}}))}o(ke,`triggerMessageQueue`);async function Ae(e){return c.Message.isRequest(e)?Me(e):c.Message.isNotification(e)?Pe(e):c.Message.isResponse(e)?Ne(e):Fe(e)}o(Ae,`handleMessage`);let je=o(e=>{try{if(c.Message.isNotification(e)&&e.method===f.type.method){let t=e.params.id,r=Te(t),a=A.get(r);if(c.Message.isRequest(a)){let o=i?.connectionStrategy,s=o&&o.cancelUndispatched?o.cancelUndispatched(a,ve):void 0;if(s&&(s.error!==void 0||s.result!==void 0)){A.delete(r),ue.delete(t),s.id=a.id,ze(s,e.method,Date.now()),n.write(s).catch(()=>p.error(`Sending response for canceled message failed.`));return}}let o=ue.get(t);if(o!==void 0){o.cancel(),Ve(e);return}le.add(t)}Oe(A,e)}finally{ke()}},`callback`);async function Me(e){if(xe())return Promise.resolve();function t(t,r,i){let a={jsonrpc:`2.0`,id:e.id};return t instanceof c.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,ze(a,r,i),n.write(a)}o(t,`reply`);function r(t,r,i){let a={jsonrpc:`2.0`,id:e.id,error:t.toJson()};return ze(a,r,i),n.write(a)}o(r,`replyError`),Be(e);let i=T.get(e.method),a,l;i&&(a=i.type,l=i.handler);let u=Date.now();if(l||S){let n=e.id??String(Date.now()),i=ie.is(_e.receiver)?_e.receiver.createCancellationTokenSource(n):_e.receiver.createCancellationTokenSource(e);e.id!==null&&le.has(e.id)&&i.cancel(),e.id!==null&&ue.set(n,i);try{let n;if(l){if(e.params===void 0){if(a!==void 0&&a.numberOfParams!==0)return r(new c.ResponseError(c.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);n=l(i.token)}else if(Array.isArray(e.params)){if(a!==void 0&&a.parameterStructures===c.ParameterStructures.byName)return r(new c.ResponseError(c.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);n=l(...e.params,i.token)}else{if(a!==void 0&&a.parameterStructures===c.ParameterStructures.byPosition)return r(new c.ResponseError(c.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);n=l(e.params,i.token)}}else S&&(n=S(e.method,e.params,i.token));await t(await n,e.method,u)}catch(n){n instanceof c.ResponseError?await t(n,e.method,u):n&&s.string(n.message)?await r(new c.ResponseError(c.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):await r(new c.ResponseError(c.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}finally{ue.delete(n)}}else await r(new c.ResponseError(c.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}o(Me,`handleRequest`);function Ne(e){if(!xe()){if(e.id===null)e.error?p.error(`Received response message without id: Error is:
6
- ${JSON.stringify(e.error,void 0,4)}`):p.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=ce.get(t);if(He(e,n),n!==void 0){ce.delete(t);try{if(e.error){let t=e.error;n.reject(new c.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?p.error(`Response handler '${n.method}' failed with message: ${e.message}`):p.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}o(Ne,`handleResponse`);async function Pe(e){if(xe())return;let t,n;if(e.method===f.type.method){let t=e.params.id;le.delete(t),Ve(e);return}{let r=D.get(e.method);r&&(n=r.handler,t=r.type)}if(n||E)try{if(Ve(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==c.ParameterStructures.byName&&p.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){let r=e.params;e.method===b.type.method&&r.length===2&&g.is(r[0])?await n({token:r[0],value:r[1]}):(t!==void 0&&(t.parameterStructures===c.ParameterStructures.byName&&p.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&p.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else t!==void 0&&t.parameterStructures===c.ParameterStructures.byPosition&&p.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params)}else E&&await E(e.method,e.params)}catch(t){t.message?p.error(`Notification handler '${e.method}' failed with message: ${t.message}`):p.error(`Notification handler '${e.method}' failed unexpectedly.`)}else he.fire(e)}o(Pe,`handleNotification`);function Fe(e){if(!e){p.error(`Received empty message.`);return}p.error(`Received message which is neither a response nor a notification message:
7
- ${JSON.stringify(e,null,4)}`);let t=e;if(s.string(t.id)||s.number(t.id)){let e=t.id,n=ce.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}o(Fe,`handleInvalidMessage`);function Ie(e){if(e!=null)switch(j){case x.Verbose:return JSON.stringify(e,null,4);case x.Compact:return JSON.stringify(e);default:return}}o(Ie,`stringifyTrace`);function Le(e){if(!(j===x.Off||!M)){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&e.params&&(t=`Params: ${Ie(e.params)}`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ue(`send-request`,e)}}o(Le,`traceSendingRequest`);function Re(e){if(!(j===x.Off||!M)){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&(t=e.params?`Params: ${Ie(e.params)}`:`No parameters provided.`),M.log(`Sending notification '${e.method}'.`,t)}else Ue(`send-notification`,e)}}o(Re,`traceSendingNotification`);function ze(e,t,n){if(!(j===x.Off||!M)){if(de===C.Text){let r;(j===x.Verbose||j===x.Compact)&&(e.error&&e.error.data?r=`Error data: ${Ie(e.error.data)}`:e.result?r=`Result: ${Ie(e.result)}`:e.error===void 0&&(r=`No result returned.`));let i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms.${i}`,r)}else Ue(`send-response`,e)}}o(ze,`traceSendingResponse`);function Be(e){if(!(j===x.Off||!M)){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&e.params&&(t=`Params: ${Ie(e.params)}`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ue(`receive-request`,e)}}o(Be,`traceReceivedRequest`);function Ve(e){if(!(j===x.Off||!M||e.method===w.type.method)){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&(t=e.params?`Params: ${Ie(e.params)}`:`No parameters provided.`),M.log(`Received notification '${e.method}'.`,t)}else Ue(`receive-notification`,e)}}o(Ve,`traceReceivedNotification`);function He(e,t){if(!(j===x.Off||!M)){if(de===C.Text){let n;if((j===x.Verbose||j===x.Compact)&&(e.error&&e.error.data?n=`Error data: ${Ie(e.error.data)}`:e.result?n=`Result: ${Ie(e.result)}`:e.error===void 0&&(n=`No result returned.`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else M.log(`Received response ${e.id} without active response promise.`,n)}else Ue(`receive-response`,e)}}o(He,`traceReceivedResponse`);function Ue(e,t){if(!M||j===x.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(n)}o(Ue,`logLSPMessage`);function We(){if(be())throw new re(ne.Closed,`Connection is closed.`);if(xe())throw new re(ne.Disposed,`Connection is disposed.`)}o(We,`throwIfClosedOrDisposed`);function Ge(){if(ye())throw new re(ne.AlreadyListening,`Connection is already listening`)}o(Ge,`throwIfListening`);function Ke(){if(!ye())throw Error(`Call listen() first.`)}o(Ke,`throwIfNotListening`);function qe(e){return e===void 0?null:e}o(qe,`undefinedToNull`);function Je(e){if(e!==null)return e}o(Je,`nullToUndefined`);function Ye(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}o(Ye,`isNamedParam`);function Xe(e,t){switch(e){case c.ParameterStructures.auto:return Ye(t)?Je(t):[qe(t)];case c.ParameterStructures.byName:if(!Ye(t))throw Error(`Received parameters by name but param is not an object literal.`);return Je(t);case c.ParameterStructures.byPosition:return[qe(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}o(Xe,`computeSingleParam`);function Ze(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Xe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(qe(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}o(Ze,`computeMessageParams`);let Qe={sendNotification:o((e,...t)=>{We();let r,i;if(s.string(e)){r=e;let n=t[0],a=0,o=c.ParameterStructures.auto;c.ParameterStructures.is(n)&&(a=1,o=n);let s=t.length,l=s-a;switch(l){case 0:i=void 0;break;case 1:i=Xe(o,t[a]);break;default:if(o===c.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);i=t.slice(a,s).map(e=>qe(e))}}else{let n=t;r=e.method,i=Ze(e,n)}let a={jsonrpc:`2.0`,method:r,params:i};return Re(a),n.write(a).catch(e=>{throw p.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:o((e,t)=>{We();let n;return s.func(e)?E=e:t&&(s.string(e)?(n=e,D.set(e,{type:void 0,handler:t})):(n=e.method,D.set(e.method,{type:e,handler:t}))),{dispose:o(()=>{n===void 0?E===e&&(E=void 0):D.get(n)?.handler===t&&D.delete(n)},`dispose`)}},`onNotification`),onProgress:o((e,t,n)=>{if(O.has(t))throw Error(`Progress handler for token ${t} already registered`);return O.set(t,n),{dispose:o(()=>{O.get(t)===n&&O.delete(t)},`dispose`)}},`onProgress`),sendProgress:o((e,t,n)=>Qe.sendNotification(b.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:N.event,sendRequest:o((e,...t)=>{We(),Ke();function r(e,t){let n=_e.sender.sendCancellation(e,t);n===void 0?p.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch(()=>{p.log(`Sending cancellation messages for id ${t} failed.`)})}o(r,`sendCancellation`);let i,a,l;if(s.string(e)){i=e;let n=t[0],r=t[t.length-1],o=0,s=c.ParameterStructures.auto;c.ParameterStructures.is(n)&&(o=1,s=n);let u=t.length;d.CancellationToken.is(r)&&(--u,l=r);let f=u-o;switch(f){case 0:a=void 0;break;case 1:a=Xe(s,t[o]);break;default:if(s===c.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(o,u).map(e=>qe(e))}}else{let n=t;i=e.method,a=Ze(e,n);let r=e.numberOfParams;l=d.CancellationToken.is(n[r])?n[r]:void 0}let u=m++,f,h=!1;l!==void 0&&(l.isCancellationRequested?h=!0:f=l.onCancellationRequested(()=>{r(Qe,u)}));let g={jsonrpc:`2.0`,id:u,method:i,params:a};return Le(g),typeof _e.sender.enableCancellation==`function`&&_e.sender.enableCancellation(g),new Promise(async(e,t)=>{let a=o(t=>{e(t),_e.sender.cleanup(u),f?.dispose()},`resolveWithCleanup`),s=o(e=>{t(e),_e.sender.cleanup(u),f?.dispose()},`rejectWithCleanup`),l={method:i,timerStart:Date.now(),resolve:a,reject:s};try{ce.set(u,l),await n.write(g),h&&r(Qe,u)}catch(e){ce.delete(u),l.reject(new c.ResponseError(c.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),p.error(`Sending request failed.`)}})},`sendRequest`),onRequest:o((e,t)=>{We();let n=null;return ee.is(e)?(n=void 0,S=e):s.string(e)?(n=null,t!==void 0&&(n=e,T.set(e,{handler:t,type:void 0}))):t!==void 0&&(n=e.method,T.set(e.method,{type:e,handler:t})),{dispose:o(()=>{n!==null&&(n===void 0?S===e&&(S=void 0):T.get(n)?.handler===t&&T.delete(n))},`dispose`)}},`onRequest`),hasPendingResponse:o(()=>ce.size>0,`hasPendingResponse`),trace:o(async(e,t,n)=>{let r=!1,i=C.Text;n!==void 0&&(s.boolean(n)?r=n:(r=n.sendNotification||!1,i=n.traceFormat||C.Text)),j=e,de=i,M=j===x.Off?void 0:t,r&&!be()&&!xe()&&await Qe.sendNotification(te.type,{value:x.toString(e)})},`trace`),onError:pe.event,onClose:me.event,onUnhandledNotification:he.event,onDispose:ge.event,end:o(()=>{n.end()},`end`),dispose:o(()=>{if(xe())return;fe=k.Disposed,ge.fire(void 0);let e=new c.ResponseError(c.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of ce.values())t.reject(e);ce=new Map,ue=new Map,le=new Set,A=new l.LinkedMap,s.func(n.dispose)&&n.dispose(),s.func(t.dispose)&&t.dispose()},`dispose`),listen:o(()=>{We(),Ge(),fe=k.Listening,t.listen(je)},`listen`),inspect:o(()=>{(0,a.default)().console.log(`inspect`)},`inspect`)};return Qe.onNotification(w.type,e=>{if(j===x.Off||!M)return;let t=j===x.Verbose||j===x.Compact;M.log(e.message,t?e.verbose:void 0)}),Qe.onNotification(b.type,async e=>{let t=O.get(e.token);t?await t(e.value):N.fire(e)}),Qe}o(A,`createMessageConnection`)}}),w=c({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default: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.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.TraceValue=e.Trace=void 0;var n=m();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return n.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return n.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return n.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return n.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return n.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return n.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return n.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return n.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return n.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return n.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return n.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return n.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return n.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return n.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return n.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return n.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return n.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return n.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return n.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return n.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return n.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return n.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return n.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return n.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return n.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return n.ParameterStructures},`get`)});var r=h();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return r.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return r.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return r.Touch},`get`)});var i=g();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return i.Disposable},`get`)});var a=v();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return a.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return a.Emitter},`get`)});var s=y();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return s.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return s.CancellationToken},`get`)});var c=b();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return c.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return c.SharedArrayReceiverStrategy},`get`)});var l=x();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return l.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return l.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return l.ReadableStreamMessageReader},`get`)});var u=S();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return u.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return u.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return u.WriteableStreamMessageWriter},`get`)});var d=C();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return d.AbstractMessageBuffer},`get`)});var f=te();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return f.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return f.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return f.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return f.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return f.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return f.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return f.Trace},`get`)}),Object.defineProperty(e,"TraceValue",{enumerable:!0,get:o(function(){return f.TraceValue},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return f.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return f.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return f.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return f.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return f.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"IdCancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.IdCancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"RequestCancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.RequestCancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return f.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return f.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return f.MessageStrategy},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return f.TraceValues},`get`)}),e.RAL=t(_()).default}}),ne={};l(ne,{AnnotatedTextEdit:()=>ge,ApplyKind:()=>Re,ChangeAnnotation:()=>he,ChangeAnnotationIdentifier:()=>N,CodeAction:()=>rt,CodeActionContext:()=>tt,CodeActionKind:()=>$e,CodeActionTag:()=>nt,CodeActionTriggerKind:()=>et,CodeDescription:()=>M,CodeLens:()=>it,Color:()=>se,ColorInformation:()=>k,ColorPresentation:()=>A,Command:()=>pe,CompletionItem:()=>Be,CompletionItemKind:()=>Ne,CompletionItemLabelDetails:()=>ze,CompletionItemTag:()=>Fe,CompletionList:()=>Ve,CreateFile:()=>ve,DeleteFile:()=>be,Diagnostic:()=>fe,DiagnosticRelatedInformation:()=>ue,DiagnosticSeverity:()=>j,DiagnosticTag:()=>de,DocumentHighlight:()=>qe,DocumentHighlightKind:()=>Ke,DocumentLink:()=>ot,DocumentSymbol:()=>Qe,DocumentUri:()=>re,EOL:()=>Tt,FoldingRange:()=>le,FoldingRangeKind:()=>ce,FormattingOptions:()=>at,Hover:()=>Ue,InlayHint:()=>_t,InlayHintKind:()=>ht,InlayHintLabelPart:()=>gt,InlineCompletionContext:()=>Ct,InlineCompletionItem:()=>yt,InlineCompletionList:()=>bt,InlineCompletionTriggerKind:()=>xt,InlineValueContext:()=>mt,InlineValueEvaluatableExpression:()=>pt,InlineValueText:()=>dt,InlineValueVariableLookup:()=>ft,InsertReplaceEdit:()=>Ie,InsertTextFormat:()=>Pe,InsertTextMode:()=>Le,LanguageKind:()=>ke,Location:()=>ae,LocationLink:()=>oe,MarkedString:()=>He,MarkupContent:()=>Me,MarkupKind:()=>je,OptionalVersionedTextDocumentIdentifier:()=>Oe,ParameterInformation:()=>We,Position:()=>D,Range:()=>O,RenameFile:()=>ye,SelectedCompletionInfo:()=>St,SelectionRange:()=>st,SemanticTokenModifiers:()=>lt,SemanticTokenTypes:()=>ct,SemanticTokens:()=>ut,SignatureInformation:()=>Ge,SnippetTextEdit:()=>Ce,StringValue:()=>vt,SymbolInformation:()=>Xe,SymbolKind:()=>Je,SymbolTag:()=>Ye,TextDocument:()=>Et,TextDocumentEdit:()=>_e,TextDocumentIdentifier:()=>Ee,TextDocumentItem:()=>Ae,TextEdit:()=>me,URI:()=>T,VersionedTextDocumentIdentifier:()=>De,WorkspaceChange:()=>Te,WorkspaceEdit:()=>xe,WorkspaceFolder:()=>wt,WorkspaceSymbol:()=>Ze,integer:()=>ie,uinteger:()=>E});var re,T,ie,E,D,O,ae,oe,se,k,A,ce,le,ue,j,de,M,fe,pe,me,he,N,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,P,Ot=s({"../../node_modules/.pnpm/vscode-languageserver-types@3.18.4/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(re||={}),(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(T||={}),(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}o(t,`is`),e.is=t})(ie||={}),(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}o(t,`is`),e.is=t})(E||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=E.MAX_VALUE),t===Number.MAX_VALUE&&(t=E.MAX_VALUE),{line:e,character:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.line)&&P.uinteger(t.character)}o(n,`is`),e.is=n})(D||={}),(function(e){function t(e,t,n,r){if(P.uinteger(e)&&P.uinteger(t)&&P.uinteger(n)&&P.uinteger(r))return{start:D.create(e,t),end:D.create(n,r)};if(D.is(e)&&D.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&D.is(t.start)&&D.is(t.end)}o(n,`is`),e.is=n})(O||={}),(function(e){function t(e,t){return{uri:e,range:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&(P.string(t.uri)||P.undefined(t.uri))}o(n,`is`),e.is=n})(ae||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.targetRange)&&P.string(t.targetUri)&&O.is(t.targetSelectionRange)&&(O.is(t.originSelectionRange)||P.undefined(t.originSelectionRange))}o(n,`is`),e.is=n})(oe||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.numberRange(t.red,0,1)&&P.numberRange(t.green,0,1)&&P.numberRange(t.blue,0,1)&&P.numberRange(t.alpha,0,1)}o(n,`is`),e.is=n})(se||={}),(function(e){function t(e,t){return{range:e,color:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&se.is(t.color)}o(n,`is`),e.is=n})(k||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.undefined(t.textEdit)||me.is(t))&&(P.undefined(t.additionalTextEdits)||P.typedArray(t.additionalTextEdits,me.is))}o(n,`is`),e.is=n})(A||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(ce||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return P.defined(n)&&(o.startCharacter=n),P.defined(r)&&(o.endCharacter=r),P.defined(i)&&(o.kind=i),P.defined(a)&&(o.collapsedText=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.startLine)&&P.uinteger(t.startLine)&&(P.undefined(t.startCharacter)||P.uinteger(t.startCharacter))&&(P.undefined(t.endCharacter)||P.uinteger(t.endCharacter))&&(P.undefined(t.kind)||P.string(t.kind))}o(n,`is`),e.is=n})(le||={}),(function(e){function t(e,t){return{location:e,message:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&ae.is(t.location)&&P.string(t.message)}o(n,`is`),e.is=n})(ue||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(j||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(de||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&P.string(t.href)}o(t,`is`),e.is=t})(M||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return P.defined(n)&&(o.severity=n),P.defined(r)&&(o.code=r),P.defined(i)&&(o.source=i),P.defined(a)&&(o.relatedInformation=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.string(t.message)||Me.is(t.message))&&(P.number(t.severity)||P.undefined(t.severity))&&(P.integer(t.code)||P.string(t.code)||P.undefined(t.code))&&(P.undefined(t.codeDescription)||P.string(t.codeDescription?.href))&&(P.string(t.source)||P.undefined(t.source))&&(P.undefined(t.relatedInformation)||P.typedArray(t.relatedInformation,ue.is))}o(n,`is`),e.is=n;function r(e){return P.string(e.message)}o(r,`is3_17`),e.is3_17=r;function i(e){if(P.string(e.message))return e.message;if(Me.is(e.message))return e.message.value;throw Error(`Unknown message type ${typeof e.message}`)}o(i,`getMessageString`),e.getMessageString=i})(fe||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return P.defined(n)&&n.length>0&&(r.arguments=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.title)&&(t.tooltip===void 0||P.string(t.tooltip))&&P.string(t.command)}o(n,`is`),e.is=n})(pe||={}),(function(e){function t(e,t){return{range:e,newText:t}}o(t,`replace`),e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}o(n,`insert`),e.insert=n;function r(e){return{range:e,newText:``}}o(r,`del`),e.del=r;function i(e){let t=e;return P.objectLiteral(t)&&P.string(t.newText)&&O.is(t.range)}o(i,`is`),e.is=i})(me||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(P.string(t.description)||t.description===void 0)}o(n,`is`),e.is=n})(he||={}),(function(e){function t(e){let t=e;return P.string(t)}o(t,`is`),e.is=t})(N||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}o(t,`replace`),e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}o(n,`insert`),e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}o(r,`del`),e.del=r;function i(e){let t=e;return me.is(t)&&(he.is(t.annotationId)||N.is(t.annotationId))}o(i,`is`),e.is=i})(ge||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&Oe.is(t.textDocument)&&Array.isArray(t.edits)}o(n,`is`),e.is=n})(_e||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&P.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(ve||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&P.string(t.oldUri)&&P.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(ye||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&P.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||P.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||P.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(be||={}),(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=>P.string(e.kind)?ve.is(e)||ye.is(e)||be.is(e):_e.is(e)))}o(t,`is`),e.is=t})(xe||={}),Se=class{static{o(this,`TextEditChangeImpl`)}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=me.insert(e,t):N.is(n)?(i=n,r=ge.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ge.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=me.replace(e,t):N.is(n)?(i=n,r=ge.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ge.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=me.del(e):N.is(t)?(r=t,n=ge.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=ge.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},(function(e){function t(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&vt.isSnippet(t.snippet)&&(t.annotationId===void 0||he.is(t.annotationId)||N.is(t.annotationId))}o(t,`is`),e.is=t})(Ce||={}),we=class{static{o(this,`ChangeAnnotations`)}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(N.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}nextId(){return this._counter++,this._counter.toString()}},Te=class{static{o(this,`WorkspaceChange`)}constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new we(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(_e.is(e)){let t=new Se(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new Se(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Oe.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Se(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Se(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new we,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;he.is(t)||N.is(t)?r=t:n=t;let i,a;if(r===void 0?i=ve.create(e,n):(a=N.is(r)?r:this._changeAnnotations.manage(r),i=ve.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;he.is(n)||N.is(n)?i=n:r=n;let a,o;if(i===void 0?a=ye.create(e,t,r):(o=N.is(i)?i:this._changeAnnotations.manage(i),a=ye.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;he.is(t)||N.is(t)?r=t:n=t;let i,a;if(r===void 0?i=be.create(e,n):(a=N.is(r)?r:this._changeAnnotations.manage(r),i=be.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)}o(n,`is`),e.is=n})(Ee||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.integer(t.version)}o(n,`is`),e.is=n})(De||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&(t.version===null||P.integer(t.version))}o(n,`is`),e.is=n})(Oe||={}),(function(e){e.ABAP=`abap`,e.WindowsBat=`bat`,e.BibTeX=`bibtex`,e.Clojure=`clojure`,e.Coffeescript=`coffeescript`,e.C=`c`,e.CPP=`cpp`,e.CSharp=`csharp`,e.CSS=`css`,e.D=`d`,e.Delphi=`pascal`,e.Diff=`diff`,e.Dart=`dart`,e.Dockerfile=`dockerfile`,e.Elixir=`elixir`,e.Erlang=`erlang`,e.FSharp=`fsharp`,e.GitCommit=`git-commit`,e.GitRebase=`git-rebase`,e.Go=`go`,e.Groovy=`groovy`,e.Handlebars=`handlebars`,e.Haskell=`haskell`,e.HTML=`html`,e.Ini=`ini`,e.Java=`java`,e.JavaScript=`javascript`,e.JavaScriptReact=`javascriptreact`,e.JSON=`json`,e.LaTeX=`latex`,e.Less=`less`,e.Lua=`lua`,e.Makefile=`makefile`,e.Markdown=`markdown`,e.ObjectiveC=`objective-c`,e.ObjectiveCPP=`objective-cpp`,e.Pascal=`pascal`,e.Perl=`perl`,e.Perl6=`perl6`,e.PHP=`php`,e.Plaintext=`plaintext`,e.Powershell=`powershell`,e.Pug=`jade`,e.Python=`python`,e.R=`r`,e.Razor=`razor`,e.Ruby=`ruby`,e.Rust=`rust`,e.SCSS=`scss`,e.SASS=`sass`,e.Scala=`scala`,e.ShaderLab=`shaderlab`,e.ShellScript=`shellscript`,e.SQL=`sql`,e.Swift=`swift`,e.TypeScript=`typescript`,e.TypeScriptReact=`typescriptreact`,e.TeX=`tex`,e.VisualBasic=`vb`,e.XML=`xml`,e.XSL=`xsl`,e.YAML=`yaml`})(ke||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.string(t.languageId)&&P.integer(t.version)&&P.string(t.text)}o(n,`is`),e.is=n})(Ae||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}o(t,`is`),e.is=t})(je||={}),(function(e){function t(e){let t=e;return P.objectLiteral(e)&&je.is(t.kind)&&P.string(t.value)}o(t,`is`),e.is=t})(Me||={}),(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})(Ne||={}),(function(e){e.PlainText=1,e.Snippet=2})(Pe||={}),(function(e){e.Deprecated=1})(Fe||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.newText)&&O.is(t.insert)&&O.is(t.replace)}o(n,`is`),e.is=n})(Ie||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Le||={}),(function(e){e.Replace=1,e.Merge=2})(Re||={}),(function(e){function t(e){let t=e;return t&&(P.string(t.detail)||t.detail===void 0)&&(P.string(t.description)||t.description===void 0)}o(t,`is`),e.is=t})(ze||={}),(function(e){function t(e){return{label:e}}o(t,`create`),e.create=t})(Be||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}o(t,`create`),e.create=t})(Ve||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}o(t,`fromPlainText`),e.fromPlainText=t;function n(e){let t=e;return P.string(t)||P.objectLiteral(t)&&P.string(t.language)&&P.string(t.value)}o(n,`is`),e.is=n})(He||={}),(function(e){function t(e){let t=e;return!!t&&P.objectLiteral(t)&&(Me.is(t.contents)||He.is(t.contents)||P.typedArray(t.contents,He.is))&&(e.range===void 0||O.is(e.range))}o(t,`is`),e.is=t})(Ue||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}o(t,`create`),e.create=t})(We||={}),(function(e){function t(e,t,...n){let r={label:e};return P.defined(t)&&(r.documentation=t),r.parameters=P.defined(n)?n:[],r}o(t,`create`),e.create=t})(Ge||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Ke||={}),(function(e){function t(e,t){let n={range:e};return P.number(t)&&(n.kind=t),n}o(t,`create`),e.create=t})(qe||={}),(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})(Je||={}),(function(e){e.Deprecated=1})(Ye||={}),(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}o(t,`create`),e.create=t})(Xe||={}),(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}}}o(t,`create`),e.create=t})(Ze||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.name)&&P.number(t.kind)&&O.is(t.range)&&O.is(t.selectionRange)&&(t.detail===void 0||P.string(t.detail))&&(t.deprecated===void 0||P.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}o(n,`is`),e.is=n})(Qe||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorMove=`refactor.move`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`,e.Notebook=`notebook`})($e||={}),(function(e){e.Invoked=1,e.Automatic=2})(et||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.typedArray(t.diagnostics,fe.is)&&(t.only===void 0||P.typedArray(t.only,P.string))&&(t.triggerKind===void 0||t.triggerKind===et.Invoked||t.triggerKind===et.Automatic)}o(n,`is`),e.is=n})(tt||={}),(function(e){e.LLMGenerated=1;function t(t){return P.defined(t)&&t===e.LLMGenerated}o(t,`is`),e.is=t})(nt||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):pe.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.title)&&(t.diagnostics===void 0||P.typedArray(t.diagnostics,fe.is))&&(t.kind===void 0||P.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||pe.is(t.command))&&(t.isPreferred===void 0||P.boolean(t.isPreferred))&&(t.edit===void 0||xe.is(t.edit))&&(t.tags===void 0||P.typedArray(t.tags,nt.is))}o(n,`is`),e.is=n})(rt||={}),(function(e){function t(e,t){let n={range:e};return P.defined(t)&&(n.data=t),n}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.undefined(t.command)||pe.is(t.command))}o(n,`is`),e.is=n})(it||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.uinteger(t.tabSize)&&P.boolean(t.insertSpaces)}o(n,`is`),e.is=n})(at||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.undefined(t.target)||P.string(t.target))}o(n,`is`),e.is=n})(ot||={}),(function(e){function t(e,t){return{range:e,parent:t}}o(t,`create`),e.create=t;function n(t){let n=t;return P.objectLiteral(n)&&O.is(n.range)&&(n.parent===void 0||e.is(n.parent))}o(n,`is`),e.is=n})(st||={}),(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`,e.label=`label`})(ct||={}),(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`})(lt||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}o(t,`is`),e.is=t})(ut||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&P.string(t.text)}o(n,`is`),e.is=n})(dt||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&P.boolean(t.caseSensitiveLookup)&&(P.string(t.variableName)||t.variableName===void 0)}o(n,`is`),e.is=n})(ft||={}),(function(e){function t(e,t){return{range:e,expression:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&(P.string(t.expression)||t.expression===void 0)}o(n,`is`),e.is=n})(pt||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(e.stoppedLocation)}o(n,`is`),e.is=n})(mt||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(ht||={}),(function(e){function t(e){return{value:e}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&(t.tooltip===void 0||P.string(t.tooltip)||Me.is(t.tooltip))&&(t.location===void 0||ae.is(t.location))&&(t.command===void 0||pe.is(t.command))}o(n,`is`),e.is=n})(gt||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&D.is(t.position)&&(P.string(t.label)||P.typedArray(t.label,gt.is))&&(t.kind===void 0||ht.is(t.kind))&&t.textEdits===void 0||P.typedArray(t.textEdits,me.is)&&(t.tooltip===void 0||P.string(t.tooltip)||Me.is(t.tooltip))&&(t.paddingLeft===void 0||P.boolean(t.paddingLeft))&&(t.paddingRight===void 0||P.boolean(t.paddingRight))}o(n,`is`),e.is=n})(_t||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}o(t,`createSnippet`),e.createSnippet=t;function n(e){let t=e;return P.objectLiteral(t)&&t.kind===`snippet`&&P.string(t.value)}o(n,`isSnippet`),e.isSnippet=n})(vt||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}o(t,`create`),e.create=t})(yt||={}),(function(e){function t(e){return{items:e}}o(t,`create`),e.create=t})(bt||={}),(function(e){e.Invoked=1,e.Automatic=2})(xt||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t})(St||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}o(t,`create`),e.create=t})(Ct||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&T.is(t.uri)&&P.string(t.name)}o(t,`is`),e.is=t})(wt||={}),Tt=[`
6
+ ${JSON.stringify(e.error,void 0,4)}`):p.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=ce.get(t);if(He(e,n),n!==void 0){ce.delete(t);try{if(e.error){let t=e.error;n.reject(new c.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?p.error(`Response handler '${n.method}' failed with message: ${e.message}`):p.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}o(Ne,`handleResponse`);async function Pe(e){if(xe())return;let t,n;if(e.method===f.type.method){let t=e.params.id;le.delete(t),Ve(e)}else{{let r=D.get(e.method);r&&(n=r.handler,t=r.type)}if(n||E)try{if(Ve(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==c.ParameterStructures.byName&&p.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),await n();else if(Array.isArray(e.params)){let r=e.params;e.method===b.type.method&&r.length===2&&g.is(r[0])?await n({token:r[0],value:r[1]}):(t!==void 0&&(t.parameterStructures===c.ParameterStructures.byName&&p.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&p.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),await n(...r))}else t!==void 0&&t.parameterStructures===c.ParameterStructures.byPosition&&p.error(`Notification ${e.method} defines parameters by position but received parameters by name`),await n(e.params)}else E&&await E(e.method,e.params)}catch(t){t.message?p.error(`Notification handler '${e.method}' failed with message: ${t.message}`):p.error(`Notification handler '${e.method}' failed unexpectedly.`)}else he.fire(e)}}o(Pe,`handleNotification`);function Fe(e){if(!e){p.error(`Received empty message.`);return}p.error(`Received message which is neither a response nor a notification message:
7
+ ${JSON.stringify(e,null,4)}`);let t=e;if(s.string(t.id)||s.number(t.id)){let e=t.id,n=ce.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}o(Fe,`handleInvalidMessage`);function Ie(e){if(e!=null)switch(j){case x.Verbose:return JSON.stringify(e,null,4);case x.Compact:return JSON.stringify(e);default:return}}o(Ie,`stringifyTrace`);function Le(e){if(j!==x.Off&&M){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&e.params&&(t=`Params: ${Ie(e.params)}`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ue(`send-request`,e)}}o(Le,`traceSendingRequest`);function Re(e){if(j!==x.Off&&M){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&(t=e.params?`Params: ${Ie(e.params)}`:`No parameters provided.`),M.log(`Sending notification '${e.method}'.`,t)}else Ue(`send-notification`,e)}}o(Re,`traceSendingNotification`);function ze(e,t,n){if(j!==x.Off&&M){if(de===C.Text){let r;(j===x.Verbose||j===x.Compact)&&(e.error&&e.error.data?r=`Error data: ${Ie(e.error.data)}`:e.result?r=`Result: ${Ie(e.result)}`:e.error===void 0&&(r=`No result returned.`));let i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms.${i}`,r)}else Ue(`send-response`,e)}}o(ze,`traceSendingResponse`);function Be(e){if(j!==x.Off&&M){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&e.params&&(t=`Params: ${Ie(e.params)}`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ue(`receive-request`,e)}}o(Be,`traceReceivedRequest`);function Ve(e){if(j!==x.Off&&M&&e.method!==w.type.method){if(de===C.Text){let t;(j===x.Verbose||j===x.Compact)&&(t=e.params?`Params: ${Ie(e.params)}`:`No parameters provided.`),M.log(`Received notification '${e.method}'.`,t)}else Ue(`receive-notification`,e)}}o(Ve,`traceReceivedNotification`);function He(e,t){if(j!==x.Off&&M){if(de===C.Text){let n;if((j===x.Verbose||j===x.Compact)&&(e.error&&e.error.data?n=`Error data: ${Ie(e.error.data)}`:e.result?n=`Result: ${Ie(e.result)}`:e.error===void 0&&(n=`No result returned.`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else M.log(`Received response ${e.id} without active response promise.`,n)}else Ue(`receive-response`,e)}}o(He,`traceReceivedResponse`);function Ue(e,t){if(!M||j===x.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(n)}o(Ue,`logLSPMessage`);function We(){if(be())throw new re(ne.Closed,`Connection is closed.`);if(xe())throw new re(ne.Disposed,`Connection is disposed.`)}o(We,`throwIfClosedOrDisposed`);function Ge(){if(ye())throw new re(ne.AlreadyListening,`Connection is already listening`)}o(Ge,`throwIfListening`);function Ke(){if(!ye())throw Error(`Call listen() first.`)}o(Ke,`throwIfNotListening`);function qe(e){return e===void 0?null:e}o(qe,`undefinedToNull`);function Je(e){if(e!==null)return e}o(Je,`nullToUndefined`);function Ye(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}o(Ye,`isNamedParam`);function Xe(e,t){switch(e){case c.ParameterStructures.auto:return Ye(t)?Je(t):[qe(t)];case c.ParameterStructures.byName:if(!Ye(t))throw Error(`Received parameters by name but param is not an object literal.`);return Je(t);case c.ParameterStructures.byPosition:return[qe(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}o(Xe,`computeSingleParam`);function Ze(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Xe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(qe(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}o(Ze,`computeMessageParams`);let Qe={sendNotification:o((e,...t)=>{We();let r,i;if(s.string(e)){r=e;let n=t[0],a=0,o=c.ParameterStructures.auto;c.ParameterStructures.is(n)&&(a=1,o=n);let s=t.length,l=s-a;switch(l){case 0:i=void 0;break;case 1:i=Xe(o,t[a]);break;default:if(o===c.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);i=t.slice(a,s).map(e=>qe(e))}}else{let n=t;r=e.method,i=Ze(e,n)}let a={jsonrpc:`2.0`,method:r,params:i};return Re(a),n.write(a).catch(e=>{throw p.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:o((e,t)=>{We();let n;return s.func(e)?E=e:t&&(s.string(e)?(n=e,D.set(e,{type:void 0,handler:t})):(n=e.method,D.set(e.method,{type:e,handler:t}))),{dispose:o(()=>{n===void 0?E===e&&(E=void 0):D.get(n)?.handler===t&&D.delete(n)},`dispose`)}},`onNotification`),onProgress:o((e,t,n)=>{if(O.has(t))throw Error(`Progress handler for token ${t} already registered`);return O.set(t,n),{dispose:o(()=>{O.get(t)===n&&O.delete(t)},`dispose`)}},`onProgress`),sendProgress:o((e,t,n)=>Qe.sendNotification(b.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:N.event,sendRequest:o((e,...t)=>{We(),Ke();function r(e,t){let n=_e.sender.sendCancellation(e,t);n===void 0?p.log(`Received no promise from cancellation strategy when cancelling id ${t}`):n.catch(()=>{p.log(`Sending cancellation messages for id ${t} failed.`)})}o(r,`sendCancellation`);let i,a,l;if(s.string(e)){i=e;let n=t[0],r=t[t.length-1],o=0,s=c.ParameterStructures.auto;c.ParameterStructures.is(n)&&(o=1,s=n);let u=t.length;d.CancellationToken.is(r)&&(--u,l=r);let f=u-o;switch(f){case 0:a=void 0;break;case 1:a=Xe(s,t[o]);break;default:if(s===c.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(o,u).map(e=>qe(e))}}else{let n=t;i=e.method,a=Ze(e,n);let r=e.numberOfParams;l=d.CancellationToken.is(n[r])?n[r]:void 0}let u=m++,f,h=!1;l!==void 0&&(l.isCancellationRequested?h=!0:f=l.onCancellationRequested(()=>{r(Qe,u)}));let g={jsonrpc:`2.0`,id:u,method:i,params:a};return Le(g),typeof _e.sender.enableCancellation==`function`&&_e.sender.enableCancellation(g),new Promise(async(e,t)=>{let a=o(t=>{e(t),_e.sender.cleanup(u),f?.dispose()},`resolveWithCleanup`),s=o(e=>{t(e),_e.sender.cleanup(u),f?.dispose()},`rejectWithCleanup`),l={method:i,timerStart:Date.now(),resolve:a,reject:s};try{ce.set(u,l),await n.write(g),h&&r(Qe,u)}catch(e){ce.delete(u),l.reject(new c.ResponseError(c.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),p.error(`Sending request failed.`)}})},`sendRequest`),onRequest:o((e,t)=>{We();let n=null;return ee.is(e)?(n=void 0,S=e):s.string(e)?(n=null,t!==void 0&&(n=e,T.set(e,{handler:t,type:void 0}))):t!==void 0&&(n=e.method,T.set(e.method,{type:e,handler:t})),{dispose:o(()=>{n!==null&&(n===void 0?S===e&&(S=void 0):T.get(n)?.handler===t&&T.delete(n))},`dispose`)}},`onRequest`),hasPendingResponse:o(()=>ce.size>0,`hasPendingResponse`),trace:o(async(e,t,n)=>{let r=!1,i=C.Text;n!==void 0&&(s.boolean(n)?r=n:(r=n.sendNotification||!1,i=n.traceFormat||C.Text)),j=e,de=i,M=j===x.Off?void 0:t,r&&!be()&&!xe()&&await Qe.sendNotification(te.type,{value:x.toString(e)})},`trace`),onError:pe.event,onClose:me.event,onUnhandledNotification:he.event,onDispose:ge.event,end:o(()=>{n.end()},`end`),dispose:o(()=>{if(xe())return;fe=k.Disposed,ge.fire(void 0);let e=new c.ResponseError(c.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of ce.values())t.reject(e);ce=new Map,ue=new Map,le=new Set,A=new l.LinkedMap,s.func(n.dispose)&&n.dispose(),s.func(t.dispose)&&t.dispose()},`dispose`),listen:o(()=>{We(),Ge(),fe=k.Listening,t.listen(je)},`listen`),inspect:o(()=>{(0,a.default)().console.log(`inspect`)},`inspect`)};return Qe.onNotification(w.type,e=>{if(j===x.Off||!M)return;let t=j===x.Verbose||j===x.Compact;M.log(e.message,t?e.verbose:void 0)}),Qe.onNotification(b.type,async e=>{let t=O.get(e.token);t?await t(e.value):N.fire(e)}),Qe}o(A,`createMessageConnection`)}}),w=c({"../../node_modules/.pnpm/vscode-jsonrpc@9.0.3/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default: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.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.TraceValue=e.Trace=void 0;var n=m();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return n.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return n.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return n.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return n.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return n.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return n.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return n.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return n.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return n.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return n.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return n.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return n.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return n.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return n.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return n.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return n.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return n.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return n.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return n.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return n.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return n.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return n.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return n.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return n.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return n.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return n.ParameterStructures},`get`)});var r=h();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return r.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return r.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return r.Touch},`get`)});var i=g();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return i.Disposable},`get`)});var a=v();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return a.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return a.Emitter},`get`)});var s=y();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return s.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return s.CancellationToken},`get`)});var c=b();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return c.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return c.SharedArrayReceiverStrategy},`get`)});var l=x();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return l.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return l.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return l.ReadableStreamMessageReader},`get`)});var u=S();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return u.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return u.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return u.WriteableStreamMessageWriter},`get`)});var d=C();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return d.AbstractMessageBuffer},`get`)});var f=te();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return f.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return f.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return f.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return f.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return f.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return f.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return f.Trace},`get`)}),Object.defineProperty(e,"TraceValue",{enumerable:!0,get:o(function(){return f.TraceValue},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return f.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return f.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return f.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return f.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return f.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"IdCancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.IdCancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"RequestCancellationReceiverStrategy",{enumerable:!0,get:o(function(){return f.RequestCancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return f.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return f.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return f.MessageStrategy},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return f.TraceValues},`get`)}),e.RAL=t(_()).default}}),ne={};l(ne,{AnnotatedTextEdit:()=>ge,ApplyKind:()=>Re,ChangeAnnotation:()=>he,ChangeAnnotationIdentifier:()=>N,CodeAction:()=>rt,CodeActionContext:()=>tt,CodeActionKind:()=>$e,CodeActionTag:()=>nt,CodeActionTriggerKind:()=>et,CodeDescription:()=>M,CodeLens:()=>it,Color:()=>se,ColorInformation:()=>k,ColorPresentation:()=>A,Command:()=>pe,CompletionItem:()=>Be,CompletionItemKind:()=>Ne,CompletionItemLabelDetails:()=>ze,CompletionItemTag:()=>Fe,CompletionList:()=>Ve,CreateFile:()=>ve,DeleteFile:()=>be,Diagnostic:()=>fe,DiagnosticRelatedInformation:()=>ue,DiagnosticSeverity:()=>j,DiagnosticTag:()=>de,DocumentHighlight:()=>qe,DocumentHighlightKind:()=>Ke,DocumentLink:()=>ot,DocumentSymbol:()=>Qe,DocumentUri:()=>re,EOL:()=>Tt,FoldingRange:()=>le,FoldingRangeKind:()=>ce,FormattingOptions:()=>at,Hover:()=>Ue,InlayHint:()=>_t,InlayHintKind:()=>ht,InlayHintLabelPart:()=>gt,InlineCompletionContext:()=>Ct,InlineCompletionItem:()=>yt,InlineCompletionList:()=>bt,InlineCompletionTriggerKind:()=>xt,InlineValueContext:()=>mt,InlineValueEvaluatableExpression:()=>pt,InlineValueText:()=>dt,InlineValueVariableLookup:()=>ft,InsertReplaceEdit:()=>Ie,InsertTextFormat:()=>Pe,InsertTextMode:()=>Le,LanguageKind:()=>ke,Location:()=>ae,LocationLink:()=>oe,MarkedString:()=>He,MarkupContent:()=>Me,MarkupKind:()=>je,OptionalVersionedTextDocumentIdentifier:()=>Oe,ParameterInformation:()=>We,Position:()=>D,Range:()=>O,RenameFile:()=>ye,SelectedCompletionInfo:()=>St,SelectionRange:()=>st,SemanticTokenModifiers:()=>lt,SemanticTokenTypes:()=>ct,SemanticTokens:()=>ut,SignatureInformation:()=>Ge,SnippetTextEdit:()=>Ce,StringValue:()=>vt,SymbolInformation:()=>Xe,SymbolKind:()=>Je,SymbolTag:()=>Ye,TextDocument:()=>Et,TextDocumentEdit:()=>_e,TextDocumentIdentifier:()=>Ee,TextDocumentItem:()=>Ae,TextEdit:()=>me,URI:()=>T,VersionedTextDocumentIdentifier:()=>De,WorkspaceChange:()=>Te,WorkspaceEdit:()=>xe,WorkspaceFolder:()=>wt,WorkspaceSymbol:()=>Ze,integer:()=>ie,uinteger:()=>E});var re,T,ie,E,D,O,ae,oe,se,k,A,ce,le,ue,j,de,M,fe,pe,me,he,N,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,P,Ot=s({"../../node_modules/.pnpm/vscode-languageserver-types@3.18.4/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(re||={}),(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(T||={}),(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}o(t,`is`),e.is=t})(ie||={}),(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}o(t,`is`),e.is=t})(E||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=E.MAX_VALUE),t===Number.MAX_VALUE&&(t=E.MAX_VALUE),{line:e,character:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.line)&&P.uinteger(t.character)}o(n,`is`),e.is=n})(D||={}),(function(e){function t(e,t,n,r){if(P.uinteger(e)&&P.uinteger(t)&&P.uinteger(n)&&P.uinteger(r))return{start:D.create(e,t),end:D.create(n,r)};if(D.is(e)&&D.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&D.is(t.start)&&D.is(t.end)}o(n,`is`),e.is=n})(O||={}),(function(e){function t(e,t){return{uri:e,range:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&(P.string(t.uri)||P.undefined(t.uri))}o(n,`is`),e.is=n})(ae||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.targetRange)&&P.string(t.targetUri)&&O.is(t.targetSelectionRange)&&(O.is(t.originSelectionRange)||P.undefined(t.originSelectionRange))}o(n,`is`),e.is=n})(oe||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.numberRange(t.red,0,1)&&P.numberRange(t.green,0,1)&&P.numberRange(t.blue,0,1)&&P.numberRange(t.alpha,0,1)}o(n,`is`),e.is=n})(se||={}),(function(e){function t(e,t){return{range:e,color:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&se.is(t.color)}o(n,`is`),e.is=n})(k||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.undefined(t.textEdit)||me.is(t))&&(P.undefined(t.additionalTextEdits)||P.typedArray(t.additionalTextEdits,me.is))}o(n,`is`),e.is=n})(A||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(ce||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return P.defined(n)&&(o.startCharacter=n),P.defined(r)&&(o.endCharacter=r),P.defined(i)&&(o.kind=i),P.defined(a)&&(o.collapsedText=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.uinteger(t.startLine)&&P.uinteger(t.startLine)&&(P.undefined(t.startCharacter)||P.uinteger(t.startCharacter))&&(P.undefined(t.endCharacter)||P.uinteger(t.endCharacter))&&(P.undefined(t.kind)||P.string(t.kind))}o(n,`is`),e.is=n})(le||={}),(function(e){function t(e,t){return{location:e,message:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&ae.is(t.location)&&P.string(t.message)}o(n,`is`),e.is=n})(ue||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(j||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(de||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&P.string(t.href)}o(t,`is`),e.is=t})(M||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return P.defined(n)&&(o.severity=n),P.defined(r)&&(o.code=r),P.defined(i)&&(o.source=i),P.defined(a)&&(o.relatedInformation=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.string(t.message)||Me.is(t.message))&&(P.number(t.severity)||P.undefined(t.severity))&&(P.integer(t.code)||P.string(t.code)||P.undefined(t.code))&&(P.undefined(t.codeDescription)||P.string(t.codeDescription?.href))&&(P.string(t.source)||P.undefined(t.source))&&(P.undefined(t.relatedInformation)||P.typedArray(t.relatedInformation,ue.is))}o(n,`is`),e.is=n;function r(e){return P.string(e.message)}o(r,`is3_17`),e.is3_17=r;function i(e){if(P.string(e.message))return e.message;if(Me.is(e.message))return e.message.value;throw Error(`Unknown message type ${typeof e.message}`)}o(i,`getMessageString`),e.getMessageString=i})(fe||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return P.defined(n)&&n.length>0&&(r.arguments=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.title)&&(t.tooltip===void 0||P.string(t.tooltip))&&P.string(t.command)}o(n,`is`),e.is=n})(pe||={}),(function(e){function t(e,t){return{range:e,newText:t}}o(t,`replace`),e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}o(n,`insert`),e.insert=n;function r(e){return{range:e,newText:``}}o(r,`del`),e.del=r;function i(e){let t=e;return P.objectLiteral(t)&&P.string(t.newText)&&O.is(t.range)}o(i,`is`),e.is=i})(me||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&P.string(t.label)&&(P.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(P.string(t.description)||t.description===void 0)}o(n,`is`),e.is=n})(he||={}),(function(e){function t(e){let t=e;return P.string(t)}o(t,`is`),e.is=t})(N||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}o(t,`replace`),e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}o(n,`insert`),e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}o(r,`del`),e.del=r;function i(e){let t=e;return me.is(t)&&(he.is(t.annotationId)||N.is(t.annotationId))}o(i,`is`),e.is=i})(ge||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&Oe.is(t.textDocument)&&Array.isArray(t.edits)}o(n,`is`),e.is=n})(_e||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&P.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(ve||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&P.string(t.oldUri)&&P.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||P.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||P.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(ye||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&P.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||P.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||P.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||N.is(t.annotationId))}o(n,`is`),e.is=n})(be||={}),(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=>P.string(e.kind)?ve.is(e)||ye.is(e)||be.is(e):_e.is(e)))}o(t,`is`),e.is=t})(xe||={}),Se=class{static{o(this,`TextEditChangeImpl`)}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=me.insert(e,t):N.is(n)?(i=n,r=ge.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ge.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=me.replace(e,t):N.is(n)?(i=n,r=ge.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ge.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=me.del(e):N.is(t)?(r=t,n=ge.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=ge.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},(function(e){function t(e){let t=e;return P.objectLiteral(t)&&O.is(t.range)&&vt.isSnippet(t.snippet)&&(t.annotationId===void 0||he.is(t.annotationId)||N.is(t.annotationId))}o(t,`is`),e.is=t})(Ce||={}),we=class{static{o(this,`ChangeAnnotations`)}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(N.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}nextId(){return this._counter++,this._counter.toString()}},Te=class{static{o(this,`WorkspaceChange`)}constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new we(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(_e.is(e)){let t=new Se(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new Se(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Oe.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Se(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Se(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new we,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;he.is(t)||N.is(t)?r=t:n=t;let i,a;if(r===void 0?i=ve.create(e,n):(a=N.is(r)?r:this._changeAnnotations.manage(r),i=ve.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;he.is(n)||N.is(n)?i=n:r=n;let a,o;if(i===void 0?a=ye.create(e,t,r):(o=N.is(i)?i:this._changeAnnotations.manage(i),a=ye.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;he.is(t)||N.is(t)?r=t:n=t;let i,a;if(r===void 0?i=be.create(e,n):(a=N.is(r)?r:this._changeAnnotations.manage(r),i=be.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)}o(n,`is`),e.is=n})(Ee||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.integer(t.version)}o(n,`is`),e.is=n})(De||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&(t.version===null||P.integer(t.version))}o(n,`is`),e.is=n})(Oe||={}),(function(e){e.ABAP=`abap`,e.WindowsBat=`bat`,e.BibTeX=`bibtex`,e.Clojure=`clojure`,e.Coffeescript=`coffeescript`,e.C=`c`,e.CPP=`cpp`,e.CSharp=`csharp`,e.CSS=`css`,e.D=`d`,e.Delphi=`pascal`,e.Diff=`diff`,e.Dart=`dart`,e.Dockerfile=`dockerfile`,e.Elixir=`elixir`,e.Erlang=`erlang`,e.FSharp=`fsharp`,e.GitCommit=`git-commit`,e.GitRebase=`git-rebase`,e.Go=`go`,e.Groovy=`groovy`,e.Handlebars=`handlebars`,e.Haskell=`haskell`,e.HTML=`html`,e.Ini=`ini`,e.Java=`java`,e.JavaScript=`javascript`,e.JavaScriptReact=`javascriptreact`,e.JSON=`json`,e.LaTeX=`latex`,e.Less=`less`,e.Lua=`lua`,e.Makefile=`makefile`,e.Markdown=`markdown`,e.ObjectiveC=`objective-c`,e.ObjectiveCPP=`objective-cpp`,e.Pascal=`pascal`,e.Perl=`perl`,e.Perl6=`perl6`,e.PHP=`php`,e.Plaintext=`plaintext`,e.Powershell=`powershell`,e.Pug=`jade`,e.Python=`python`,e.R=`r`,e.Razor=`razor`,e.Ruby=`ruby`,e.Rust=`rust`,e.SCSS=`scss`,e.SASS=`sass`,e.Scala=`scala`,e.ShaderLab=`shaderlab`,e.ShellScript=`shellscript`,e.SQL=`sql`,e.Swift=`swift`,e.TypeScript=`typescript`,e.TypeScriptReact=`typescriptreact`,e.TeX=`tex`,e.VisualBasic=`vb`,e.XML=`xml`,e.XSL=`xsl`,e.YAML=`yaml`})(ke||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.string(t.uri)&&P.string(t.languageId)&&P.integer(t.version)&&P.string(t.text)}o(n,`is`),e.is=n})(Ae||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}o(t,`is`),e.is=t})(je||={}),(function(e){function t(e){let t=e;return P.objectLiteral(e)&&je.is(t.kind)&&P.string(t.value)}o(t,`is`),e.is=t})(Me||={}),(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})(Ne||={}),(function(e){e.PlainText=1,e.Snippet=2})(Pe||={}),(function(e){e.Deprecated=1})(Fe||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.newText)&&O.is(t.insert)&&O.is(t.replace)}o(n,`is`),e.is=n})(Ie||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Le||={}),(function(e){e.Replace=1,e.Merge=2})(Re||={}),(function(e){function t(e){let t=e;return t&&(P.string(t.detail)||t.detail===void 0)&&(P.string(t.description)||t.description===void 0)}o(t,`is`),e.is=t})(ze||={}),(function(e){function t(e){return{label:e}}o(t,`create`),e.create=t})(Be||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}o(t,`create`),e.create=t})(Ve||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}o(t,`fromPlainText`),e.fromPlainText=t;function n(e){let t=e;return P.string(t)||P.objectLiteral(t)&&P.string(t.language)&&P.string(t.value)}o(n,`is`),e.is=n})(He||={}),(function(e){function t(e){let t=e;return!!t&&P.objectLiteral(t)&&(Me.is(t.contents)||He.is(t.contents)||P.typedArray(t.contents,He.is))&&(e.range===void 0||O.is(e.range))}o(t,`is`),e.is=t})(Ue||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}o(t,`create`),e.create=t})(We||={}),(function(e){function t(e,t,...n){let r={label:e};return P.defined(t)&&(r.documentation=t),r.parameters=P.defined(n)?n:[],r}o(t,`create`),e.create=t})(Ge||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Ke||={}),(function(e){function t(e,t){let n={range:e};return P.number(t)&&(n.kind=t),n}o(t,`create`),e.create=t})(qe||={}),(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})(Je||={}),(function(e){e.Deprecated=1})(Ye||={}),(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}o(t,`create`),e.create=t})(Xe||={}),(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}}}o(t,`create`),e.create=t})(Ze||={}),(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}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.name)&&P.number(t.kind)&&O.is(t.range)&&O.is(t.selectionRange)&&(t.detail===void 0||P.string(t.detail))&&(t.deprecated===void 0||P.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}o(n,`is`),e.is=n})(Qe||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorMove=`refactor.move`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`,e.Notebook=`notebook`})($e||={}),(function(e){e.Invoked=1,e.Automatic=2})(et||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.typedArray(t.diagnostics,fe.is)&&(t.only===void 0||P.typedArray(t.only,P.string))&&(t.triggerKind===void 0||t.triggerKind===et.Invoked||t.triggerKind===et.Automatic)}o(n,`is`),e.is=n})(tt||={}),(function(e){e.LLMGenerated=1;function t(t){return P.defined(t)&&t===e.LLMGenerated}o(t,`is`),e.is=t})(nt||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):pe.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return t&&P.string(t.title)&&(t.diagnostics===void 0||P.typedArray(t.diagnostics,fe.is))&&(t.kind===void 0||P.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||pe.is(t.command))&&(t.isPreferred===void 0||P.boolean(t.isPreferred))&&(t.edit===void 0||xe.is(t.edit))&&(t.tags===void 0||P.typedArray(t.tags,nt.is))}o(n,`is`),e.is=n})(rt||={}),(function(e){function t(e,t){let n={range:e};return P.defined(t)&&(n.data=t),n}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.undefined(t.command)||pe.is(t.command))}o(n,`is`),e.is=n})(it||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&P.uinteger(t.tabSize)&&P.boolean(t.insertSpaces)}o(n,`is`),e.is=n})(at||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(t.range)&&(P.undefined(t.target)||P.string(t.target))}o(n,`is`),e.is=n})(ot||={}),(function(e){function t(e,t){return{range:e,parent:t}}o(t,`create`),e.create=t;function n(t){let n=t;return P.objectLiteral(n)&&O.is(n.range)&&(n.parent===void 0||e.is(n.parent))}o(n,`is`),e.is=n})(st||={}),(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`,e.label=`label`})(ct||={}),(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`})(lt||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}o(t,`is`),e.is=t})(ut||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&P.string(t.text)}o(n,`is`),e.is=n})(dt||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&P.boolean(t.caseSensitiveLookup)&&(P.string(t.variableName)||t.variableName===void 0)}o(n,`is`),e.is=n})(ft||={}),(function(e){function t(e,t){return{range:e,expression:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&O.is(t.range)&&(P.string(t.expression)||t.expression===void 0)}o(n,`is`),e.is=n})(pt||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}o(t,`create`),e.create=t;function n(e){let t=e;return P.defined(t)&&O.is(e.stoppedLocation)}o(n,`is`),e.is=n})(mt||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(ht||={}),(function(e){function t(e){return{value:e}}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&(t.tooltip===void 0||P.string(t.tooltip)||Me.is(t.tooltip))&&(t.location===void 0||ae.is(t.location))&&(t.command===void 0||pe.is(t.command))}o(n,`is`),e.is=n})(gt||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return P.objectLiteral(t)&&D.is(t.position)&&(P.string(t.label)||P.typedArray(t.label,gt.is))&&(t.kind===void 0||ht.is(t.kind))&&t.textEdits===void 0||P.typedArray(t.textEdits,me.is)&&(t.tooltip===void 0||P.string(t.tooltip)||Me.is(t.tooltip))&&(t.paddingLeft===void 0||P.boolean(t.paddingLeft))&&(t.paddingRight===void 0||P.boolean(t.paddingRight))}o(n,`is`),e.is=n})(_t||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}o(t,`createSnippet`),e.createSnippet=t;function n(e){let t=e;return P.objectLiteral(t)&&t.kind===`snippet`&&P.string(t.value)}o(n,`isSnippet`),e.isSnippet=n})(vt||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}o(t,`create`),e.create=t})(yt||={}),(function(e){function t(e){return{items:e}}o(t,`create`),e.create=t})(bt||={}),(function(e){e.Invoked=1,e.Automatic=2})(xt||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t})(St||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}o(t,`create`),e.create=t})(Ct||={}),(function(e){function t(e){let t=e;return P.objectLiteral(t)&&T.is(t.uri)&&P.string(t.name)}o(t,`is`),e.is=t})(wt||={}),Tt=[`
8
8
  `,`\r
9
9
  `,`\r`],(function(e){function t(e,t,n,r){return new Dt(e,t,n,r)}o(t,`create`),e.create=t;function n(e){let t=e;return!!(P.defined(t)&&P.string(t.uri)&&(P.undefined(t.languageId)||P.string(t.languageId))&&P.uinteger(t.lineCount)&&P.func(t.getText)&&P.func(t.positionAt)&&P.func(t.offsetAt))}o(n,`is`),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}o(r,`applyEdits`),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}o(i,`mergeSort`)})(Et||={}),Dt=class{static{o(this,`FullTextDocument`)}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===`
10
10
  `,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
@@ -38,7 +38,7 @@ ${JSON.stringify(e,null,4)}`);let t=e;if(s.string(t.id)||s.number(t.id)){let e=t
38
38
  Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
39
39
  See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:U.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}o(To,`findEndOfInputAnchor`);function Eo(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]}))}o(Eo,`findEmptyMatchRegExps`);var Do=/[^\\[][\^]|^\^/;function Oo(e){class t extends ji{static{o(this,`StartAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e.filter(e=>{let n=e.PATTERN;try{let e=Qa(n),r=new t;return r.visit(e),r.found}catch{return Do.test(n.source)}}).map(e=>({message:`Unexpected RegExp Anchor Error:
40
40
  Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
41
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:U.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}o(Oo,`findStartOfInputAnchor`);function ko(e){return e.filter(e=>{let t=e[uo];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]}))}o(ko,`findUnsupportedFlags`);function Ao(e){let t=[],n=e.map(n=>e.reduce((e,r)=>n.PATTERN.source===r.PATTERN.source&&!t.includes(r)&&r.PATTERN!==ms.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}})}o(Ao,`findDuplicatePatterns`);function jo(e){return e.filter(e=>{if(!Object.hasOwn(e,`GROUP`))return!1;let t=e.GROUP;return t!==ms.SKIPPED&&t!==ms.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]}))}o(jo,`findInvalidGroupType`);function Mo(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]}))}o(Mo,`findModesThatDoNotExist`);function No(e){let t=[],n=e.reduce((e,t,n)=>{let r=t.PATTERN;return r===ms.NA||(typeof r==`string`?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&Fo(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&&Po(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.
41
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:U.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}o(Oo,`findStartOfInputAnchor`);function ko(e){return e.filter(e=>{let t=e[uo];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]}))}o(ko,`findUnsupportedFlags`);function Ao(e){let t=[],n=e.map(n=>e.reduce((e,r)=>(n.PATTERN.source===r.PATTERN.source&&!t.includes(r)&&r.PATTERN!==ms.NA&&(t.push(r),e.push(r)),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}})}o(Ao,`findDuplicatePatterns`);function jo(e){return e.filter(e=>{if(!Object.hasOwn(e,`GROUP`))return!1;let t=e.GROUP;return t!==ms.SKIPPED&&t!==ms.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]}))}o(jo,`findInvalidGroupType`);function Mo(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]}))}o(Mo,`findModesThatDoNotExist`);function No(e){let t=[],n=e.reduce((e,t,n)=>{let r=t.PATTERN;return r===ms.NA||(typeof r==`string`?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&Fo(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&&Po(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.
42
42
  Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.
43
43
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:U.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}o(No,`findUnreachablePatterns`);function Po(e,t){if(t instanceof RegExp){if(Io(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}if(typeof t==`function`)return t(e,0,[],{});if(Object.hasOwn(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}o(Po,`tryToMatchStrToPattern`);function Fo(e){return[`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`].find(t=>e.source.indexOf(t)!==-1)===void 0}o(Fo,`noMetaChar`);function Io(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}o(Io,`usesLookAheadOrBehind`);function Lo(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}o(Lo,`addStickyFlag`);function Ro(e,t,n){let r=[];return Object.hasOwn(e,fo)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+fo+`> property in its definition
44
44
  `,type:U.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,po)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+po+`> property in its definition
@@ -120,11 +120,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
120
120
  `)}`)})}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.
121
121
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
122
122
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
123
- For further details.`);this.skipValidations=Object.hasOwn(t,`skipValidations`)?t.skipValidations:Pl.skipValidations}};Rl.DEFER_DEFINITION_ERRORS_HANDLING=!1,Ml(Rl,[Wc,el,hl,gl,vl,_l,yl,El,jl]);var zl=class extends Rl{static{o(this,`EmbeddedActionsParser`)}constructor(e,t=Pl){let n=Object.assign({},t);n.outputCst=!1,super(e,n)}};function Bl(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}o(Bl,`arrayMap`);var Vl=Bl;function Hl(){this.__data__=[],this.size=0}o(Hl,`listCacheClear`);var Ul=Hl;function Wl(e,t){return e===t||e!==e&&t!==t}o(Wl,`eq`);var Gl=Wl;function Kl(e,t){for(var n=e.length;n--;)if(Gl(e[n][0],t))return n;return-1}o(Kl,`assocIndexOf`);var ql=Kl,Jl=Array.prototype.splice;function Yl(e){var t=this.__data__,n=ql(t,e);return n<0?!1:(n==t.length-1?t.pop():Jl.call(t,n,1),--this.size,!0)}o(Yl,`listCacheDelete`);var Xl=Yl;function Zl(e){var t=this.__data__,n=ql(t,e);return n<0?void 0:t[n][1]}o(Zl,`listCacheGet`);var Ql=Zl;function $l(e){return ql(this.__data__,e)>-1}o($l,`listCacheHas`);var eu=$l;function tu(e,t){var n=this.__data__,r=ql(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}o(tu,`listCacheSet`);var nu=tu;function ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(ru,`ListCache`),ru.prototype.clear=Ul,ru.prototype.delete=Xl,ru.prototype.get=Ql,ru.prototype.has=eu,ru.prototype.set=nu;var iu=ru;function au(){this.__data__=new iu,this.size=0}o(au,`stackClear`);var ou=au;function su(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}o(su,`stackDelete`);var cu=su;function lu(e){return this.__data__.get(e)}o(lu,`stackGet`);var uu=lu;function du(e){return this.__data__.has(e)}o(du,`stackHas`);var fu=du,pu=typeof global==`object`&&global&&global.Object===Object&&global,mu=typeof self==`object`&&self&&self.Object===Object&&self,hu=pu||mu||Function(`return this`)(),gu=hu.Symbol,_u=Object.prototype,vu=_u.hasOwnProperty,yu=_u.toString,bu=gu?gu.toStringTag:void 0;function xu(e){var t=vu.call(e,bu),n=e[bu];try{e[bu]=void 0;var r=!0}catch{}var i=yu.call(e);return r&&(t?e[bu]=n:delete e[bu]),i}o(xu,`getRawTag`);var Su=xu,Cu=Object.prototype.toString;function wu(e){return Cu.call(e)}o(wu,`objectToString`);var Tu=wu,Eu=`[object Null]`,Du=`[object Undefined]`,Ou=gu?gu.toStringTag:void 0;function ku(e){return e==null?e===void 0?Du:Eu:Ou&&Ou in Object(e)?Su(e):Tu(e)}o(ku,`baseGetTag`);var Au=ku;function ju(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}o(ju,`isObject`);var Mu=ju,Nu=`[object AsyncFunction]`,Pu=`[object Function]`,Fu=`[object GeneratorFunction]`,Iu=`[object Proxy]`;function Lu(e){if(!Mu(e))return!1;var t=Au(e);return t==Pu||t==Fu||t==Nu||t==Iu}o(Lu,`isFunction`);var Ru=Lu,zu=hu[`__core-js_shared__`],Bu=(function(){var e=/[^.]+$/.exec(zu&&zu.keys&&zu.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})();function Vu(e){return!!Bu&&Bu in e}o(Vu,`isMasked`);var Hu=Vu,Uu=Function.prototype.toString;function Wu(e){if(e!=null){try{return Uu.call(e)}catch{}try{return e+``}catch{}}return``}o(Wu,`toSource`);var Gu=Wu,Ku=/[\\^$.*+?()[\]{}|]/g,qu=/^\[object .+?Constructor\]$/,Ju=Function.prototype,Yu=Object.prototype,Xu=Ju.toString,Zu=Yu.hasOwnProperty,Qu=RegExp(`^`+Xu.call(Zu).replace(Ku,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function $u(e){return!Mu(e)||Hu(e)?!1:(Ru(e)?Qu:qu).test(Gu(e))}o($u,`baseIsNative`);var ed=$u;function td(e,t){return e?.[t]}o(td,`getValue`);var nd=td;function rd(e,t){var n=nd(e,t);return ed(n)?n:void 0}o(rd,`getNative`);var id=rd,ad=id(hu,`Map`),od=id(Object,`create`);function sd(){this.__data__=od?od(null):{},this.size=0}o(sd,`hashClear`);var cd=sd;function ld(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}o(ld,`hashDelete`);var ud=ld,dd=`__lodash_hash_undefined__`,fd=Object.prototype.hasOwnProperty;function pd(e){var t=this.__data__;if(od){var n=t[e];return n===dd?void 0:n}return fd.call(t,e)?t[e]:void 0}o(pd,`hashGet`);var md=pd,hd=Object.prototype.hasOwnProperty;function gd(e){var t=this.__data__;return od?t[e]!==void 0:hd.call(t,e)}o(gd,`hashHas`);var _d=gd,vd=`__lodash_hash_undefined__`;function yd(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=od&&t===void 0?vd:t,this}o(yd,`hashSet`);var bd=yd;function xd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(xd,`Hash`),xd.prototype.clear=cd,xd.prototype.delete=ud,xd.prototype.get=md,xd.prototype.has=_d,xd.prototype.set=bd;var Sd=xd;function Cd(){this.size=0,this.__data__={hash:new Sd,map:new(ad||iu),string:new Sd}}o(Cd,`mapCacheClear`);var wd=Cd;function Td(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}o(Td,`isKeyable`);var Ed=Td;function Dd(e,t){var n=e.__data__;return Ed(t)?n[typeof t==`string`?`string`:`hash`]:n.map}o(Dd,`getMapData`);var Od=Dd;function kd(e){var t=Od(this,e).delete(e);return this.size-=+!!t,t}o(kd,`mapCacheDelete`);var Ad=kd;function jd(e){return Od(this,e).get(e)}o(jd,`mapCacheGet`);var Md=jd;function Nd(e){return Od(this,e).has(e)}o(Nd,`mapCacheHas`);var Pd=Nd;function Fd(e,t){var n=Od(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}o(Fd,`mapCacheSet`);var Id=Fd;function Ld(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(Ld,`MapCache`),Ld.prototype.clear=wd,Ld.prototype.delete=Ad,Ld.prototype.get=Md,Ld.prototype.has=Pd,Ld.prototype.set=Id;var Rd=Ld,zd=200;function Bd(e,t){var n=this.__data__;if(n instanceof iu){var r=n.__data__;if(!ad||r.length<zd-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rd(r)}return n.set(e,t),this.size=n.size,this}o(Bd,`stackSet`);var Vd=Bd;function Hd(e){var t=this.__data__=new iu(e);this.size=t.size}o(Hd,`Stack`),Hd.prototype.clear=ou,Hd.prototype.delete=cu,Hd.prototype.get=uu,Hd.prototype.has=fu,Hd.prototype.set=Vd;var Ud=Hd,Wd=`__lodash_hash_undefined__`;function Gd(e){return this.__data__.set(e,Wd),this}o(Gd,`setCacheAdd`);var Kd=Gd;function qd(e){return this.__data__.has(e)}o(qd,`setCacheHas`);var Jd=qd;function Yd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Rd;++t<n;)this.add(e[t])}o(Yd,`SetCache`),Yd.prototype.add=Yd.prototype.push=Kd,Yd.prototype.has=Jd;var Xd=Yd;function Zd(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}o(Zd,`arraySome`);var Qd=Zd;function $d(e,t){return e.has(t)}o($d,`cacheHas`);var ef=$d,tf=1,nf=2;function rf(e,t,n,r,i,a){var o=n&tf,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&nf?new Xd:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Qd(t,function(e,t){if(!ef(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}o(rf,`equalArrays`);var af=rf,of=hu.Uint8Array;function sf(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}o(sf,`mapToArray`);var cf=sf;function lf(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}o(lf,`setToArray`);var uf=lf,df=1,ff=2,pf=`[object Boolean]`,mf=`[object Date]`,hf=`[object Error]`,gf=`[object Map]`,_f=`[object Number]`,vf=`[object RegExp]`,yf=`[object Set]`,bf=`[object String]`,xf=`[object Symbol]`,Sf=`[object ArrayBuffer]`,Cf=`[object DataView]`,wf=gu?gu.prototype:void 0,Tf=wf?wf.valueOf:void 0;function Ef(e,t,n,r,i,a,o){switch(n){case Cf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Sf:return!(e.byteLength!=t.byteLength||!a(new of(e),new of(t)));case pf:case mf:case _f:return Gl(+e,+t);case hf:return e.name==t.name&&e.message==t.message;case vf:case bf:return e==t+``;case gf:var s=cf;case yf:var c=r&df;if(s||=uf,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=ff,o.set(e,t);var u=af(s(e),s(t),r,i,a,o);return o.delete(e),u;case xf:if(Tf)return Tf.call(e)==Tf.call(t)}return!1}o(Ef,`equalByTag`);var Df=Ef;function Of(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}o(Of,`arrayPush`);var kf=Of,Af=Array.isArray;function jf(e,t,n){var r=t(e);return Af(e)?r:kf(r,n(e))}o(jf,`baseGetAllKeys`);var Mf=jf;function Nf(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}o(Nf,`arrayFilter`);var Pf=Nf;function Ff(){return[]}o(Ff,`stubArray`);var If=Ff,Lf=Object.prototype.propertyIsEnumerable,Rf=Object.getOwnPropertySymbols,zf=Rf?function(e){return e==null?[]:(e=Object(e),Pf(Rf(e),function(t){return Lf.call(e,t)}))}:If;function Bf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}o(Bf,`baseTimes`);var Vf=Bf;function Hf(e){return typeof e==`object`&&!!e}o(Hf,`isObjectLike`);var Uf=Hf,Wf=`[object Arguments]`;function Gf(e){return Uf(e)&&Au(e)==Wf}o(Gf,`baseIsArguments`);var Kf=Gf,qf=Object.prototype,Jf=qf.hasOwnProperty,Yf=qf.propertyIsEnumerable,Xf=Kf((function(){return arguments})())?Kf:function(e){return Uf(e)&&Jf.call(e,`callee`)&&!Yf.call(e,`callee`)};function Zf(){return!1}o(Zf,`stubFalse`);var Qf=Zf,$f=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ep=$f&&typeof module==`object`&&module&&!module.nodeType&&module,tp=ep&&ep.exports===$f?hu.Buffer:void 0,np=(tp?tp.isBuffer:void 0)||Qf,rp=9007199254740991,ip=/^(?:0|[1-9]\d*)$/;function ap(e,t){var n=typeof e;return t??=rp,!!t&&(n==`number`||n!=`symbol`&&ip.test(e))&&e>-1&&e%1==0&&e<t}o(ap,`isIndex`);var op=ap,sp=9007199254740991;function cp(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=sp}o(cp,`isLength`);var lp=cp,up=`[object Arguments]`,dp=`[object Array]`,fp=`[object Boolean]`,pp=`[object Date]`,mp=`[object Error]`,hp=`[object Function]`,gp=`[object Map]`,_p=`[object Number]`,vp=`[object Object]`,yp=`[object RegExp]`,bp=`[object Set]`,xp=`[object String]`,Sp=`[object WeakMap]`,Cp=`[object ArrayBuffer]`,wp=`[object DataView]`,Tp=`[object Float32Array]`,Ep=`[object Float64Array]`,Dp=`[object Int8Array]`,Op=`[object Int16Array]`,kp=`[object Int32Array]`,Ap=`[object Uint8Array]`,jp=`[object Uint8ClampedArray]`,Mp=`[object Uint16Array]`,Np=`[object Uint32Array]`,G={};G[Tp]=G[Ep]=G[Dp]=G[Op]=G[kp]=G[Ap]=G[jp]=G[Mp]=G[Np]=!0,G[up]=G[dp]=G[Cp]=G[fp]=G[wp]=G[pp]=G[mp]=G[hp]=G[gp]=G[_p]=G[vp]=G[yp]=G[bp]=G[xp]=G[Sp]=!1;function Pp(e){return Uf(e)&&lp(e.length)&&!!G[Au(e)]}o(Pp,`baseIsTypedArray`);var Fp=Pp;function Ip(e){return function(t){return e(t)}}o(Ip,`baseUnary`);var Lp=Ip,Rp=typeof exports==`object`&&exports&&!exports.nodeType&&exports,zp=Rp&&typeof module==`object`&&module&&!module.nodeType&&module,Bp=zp&&zp.exports===Rp&&pu.process,Vp=(function(){try{return zp&&zp.require&&zp.require(`util`).types||Bp&&Bp.binding&&Bp.binding(`util`)}catch{}})(),Hp=Vp&&Vp.isTypedArray,Up=Hp?Lp(Hp):Fp,Wp=Object.prototype.hasOwnProperty;function Gp(e,t){var n=Af(e),r=!n&&Xf(e),i=!n&&!r&&np(e),a=!n&&!r&&!i&&Up(e),o=n||r||i||a,s=o?Vf(e.length,String):[],c=s.length;for(var l in e)(t||Wp.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||op(l,c)))&&s.push(l);return s}o(Gp,`arrayLikeKeys`);var Kp=Gp,qp=Object.prototype;function Jp(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||qp)}o(Jp,`isPrototype`);var Yp=Jp;function Xp(e,t){return function(n){return e(t(n))}}o(Xp,`overArg`);var Zp=Xp(Object.keys,Object),Qp=Object.prototype.hasOwnProperty;function $p(e){if(!Yp(e))return Zp(e);var t=[];for(var n in Object(e))Qp.call(e,n)&&n!=`constructor`&&t.push(n);return t}o($p,`baseKeys`);var em=$p;function tm(e){return e!=null&&lp(e.length)&&!Ru(e)}o(tm,`isArrayLike`);var nm=tm;function rm(e){return nm(e)?Kp(e):em(e)}o(rm,`keys`);var im=rm;function am(e){return Mf(e,im,zf)}o(am,`getAllKeys`);var om=am,sm=1,cm=Object.prototype.hasOwnProperty;function lm(e,t,n,r,i,a){var o=n&sm,s=om(e),c=s.length;if(c!=om(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:cm.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}o(lm,`equalObjects`);var um=lm,dm=id(hu,`DataView`),fm=id(hu,`Promise`),pm=id(hu,`Set`),mm=id(hu,`WeakMap`),hm=`[object Map]`,gm=`[object Object]`,_m=`[object Promise]`,vm=`[object Set]`,ym=`[object WeakMap]`,bm=`[object DataView]`,xm=Gu(dm),Sm=Gu(ad),Cm=Gu(fm),wm=Gu(pm),Tm=Gu(mm),Em=Au;(dm&&Em(new dm(new ArrayBuffer(1)))!=bm||ad&&Em(new ad)!=hm||fm&&Em(fm.resolve())!=_m||pm&&Em(new pm)!=vm||mm&&Em(new mm)!=ym)&&(Em=o(function(e){var t=Au(e),n=t==gm?e.constructor:void 0,r=n?Gu(n):``;if(r)switch(r){case xm:return bm;case Sm:return hm;case Cm:return _m;case wm:return vm;case Tm:return ym}return t},`getTag`));var Dm=Em,Om=1,km=`[object Arguments]`,Am=`[object Array]`,jm=`[object Object]`,Mm=Object.prototype.hasOwnProperty;function Nm(e,t,n,r,i,a){var o=Af(e),s=Af(t),c=o?Am:Dm(e),l=s?Am:Dm(t);c=c==km?jm:c,l=l==km?jm:l;var u=c==jm,d=l==jm,f=c==l;if(f&&np(e)){if(!np(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Ud,o||Up(e)?af(e,t,n,r,i,a):Df(e,t,c,n,r,i,a);if(!(n&Om)){var p=u&&Mm.call(e,`__wrapped__`),m=d&&Mm.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Ud,i(h,g,n,r,a)}}return f?(a||=new Ud,um(e,t,n,r,i,a)):!1}o(Nm,`baseIsEqualDeep`);var Pm=Nm;function Fm(e,t,n,r,i){return e===t?!0:e==null||t==null||!Uf(e)&&!Uf(t)?e!==e&&t!==t:Pm(e,t,n,r,Fm,i)}o(Fm,`baseIsEqual`);var Im=Fm,Lm=1,Rm=2;function zm(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Ud;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Im(u,l,Lm|Rm,r,d):f))return!1}}return!0}o(zm,`baseIsMatch`);var Bm=zm;function Vm(e){return e===e&&!Mu(e)}o(Vm,`isStrictComparable`);var Hm=Vm;function Um(e){for(var t=im(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Hm(i)]}return t}o(Um,`getMatchData`);var Wm=Um;function Gm(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}o(Gm,`matchesStrictComparable`);var Km=Gm;function qm(e){var t=Wm(e);return t.length==1&&t[0][2]?Km(t[0][0],t[0][1]):function(n){return n===e||Bm(n,e,t)}}o(qm,`baseMatches`);var Jm=qm,Ym=`[object Symbol]`;function Xm(e){return typeof e==`symbol`||Uf(e)&&Au(e)==Ym}o(Xm,`isSymbol`);var Zm=Xm,Qm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$m=/^\w*$/;function eh(e,t){if(Af(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Zm(e)?!0:$m.test(e)||!Qm.test(e)||t!=null&&e in Object(t)}o(eh,`isKey`);var th=eh,nh=`Expected a function`;function rh(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(nh);var n=o(function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o},`memoized`);return n.cache=new(rh.Cache||Rd),n}o(rh,`memoize`),rh.Cache=Rd;var ih=rh,ah=500;function oh(e){var t=ih(e,function(e){return n.size===ah&&n.clear(),e}),n=t.cache;return t}o(oh,`memoizeCapped`);var sh=oh,ch=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lh=/\\(\\)?/g,uh=sh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(ch,function(e,n,r,i){t.push(r?i.replace(lh,`$1`):n||e)}),t}),dh=1/0,fh=gu?gu.prototype:void 0,ph=fh?fh.toString:void 0;function mh(e){if(typeof e==`string`)return e;if(Af(e))return Vl(e,mh)+``;if(Zm(e))return ph?ph.call(e):``;var t=e+``;return t==`0`&&1/e==-dh?`-0`:t}o(mh,`baseToString`);var hh=mh;function gh(e){return e==null?``:hh(e)}o(gh,`toString`);var _h=gh;function vh(e,t){return Af(e)?e:th(e,t)?[e]:uh(_h(e))}o(vh,`castPath`);var yh=vh,bh=1/0;function xh(e){if(typeof e==`string`||Zm(e))return e;var t=e+``;return t==`0`&&1/e==-bh?`-0`:t}o(xh,`toKey`);var Sh=xh;function Ch(e,t){t=yh(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Sh(t[n++])];return n&&n==r?e:void 0}o(Ch,`baseGet`);var wh=Ch;function Th(e,t,n){var r=e==null?void 0:wh(e,t);return r===void 0?n:r}o(Th,`get`);var Eh=Th;function Dh(e,t){return e!=null&&t in Object(e)}o(Dh,`baseHasIn`);var Oh=Dh;function kh(e,t,n){t=yh(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Sh(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&lp(i)&&op(o,i)&&(Af(e)||Xf(e)))}o(kh,`hasPath`);var Ah=kh;function jh(e,t){return e!=null&&Ah(e,t,Oh)}o(jh,`hasIn`);var Mh=jh,Nh=1,Ph=2;function Fh(e,t){return th(e)&&Hm(t)?Km(Sh(e),t):function(n){var r=Eh(n,e);return r===void 0&&r===t?Mh(n,e):Im(t,r,Nh|Ph)}}o(Fh,`baseMatchesProperty`);var Ih=Fh;function Lh(e){return e}o(Lh,`identity`);var Rh=Lh;function zh(e){return function(t){return t?.[e]}}o(zh,`baseProperty`);var Bh=zh;function Vh(e){return function(t){return wh(t,e)}}o(Vh,`basePropertyDeep`);var Hh=Vh;function Uh(e){return th(e)?Bh(Sh(e)):Hh(e)}o(Uh,`property`);var Wh=Uh;function Gh(e){return typeof e==`function`?e:e==null?Rh:typeof e==`object`?Af(e)?Ih(e[0],e[1]):Jm(e):Wh(e)}o(Gh,`baseIteratee`);var Kh=Gh;function qh(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}o(qh,`createBaseFor`);var Jh=qh();function Yh(e,t){return e&&Jh(e,t,im)}o(Yh,`baseForOwn`);var Xh=Yh;function Zh(e,t){return function(n,r){if(n==null)return n;if(!nm(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}o(Zh,`createBaseEach`);var Qh=Zh(Xh);function $h(e,t){var n=-1,r=nm(e)?Array(e.length):[];return Qh(e,function(e,i,a){r[++n]=t(e,i,a)}),r}o($h,`baseMap`);var eg=$h;function tg(e,t){return(Af(e)?Vl:eg)(e,Kh(t,3))}o(tg,`map`);var ng=tg;function rg(e,t){var n=[];return Qh(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}o(rg,`baseFilter`);var ig=rg;function ag(e,t){return(Af(e)?Pf:ig)(e,Kh(t,3))}o(ag,`filter`);var og=ag;function sg(e,t,n){return`${e.name}_${t}_${n}`}o(sg,`buildATNKey`);var cg=1,lg=2,ug=4,dg=5,fg=7,pg=8,mg=9,hg=10,gg=11,_g=12,vg=class{static{o(this,`AbstractTransition`)}constructor(e){this.target=e}isEpsilon(){return!1}},yg=class extends vg{static{o(this,`AtomTransition`)}constructor(e,t){super(e),this.tokenType=t}},bg=class extends vg{static{o(this,`EpsilonTransition`)}constructor(e){super(e)}isEpsilon(){return!0}},xg=class extends vg{static{o(this,`RuleTransition`)}constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}};function Sg(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Cg(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=jg(t,n,n);i!==void 0&&Vg(t,n,i)}return t}o(Sg,`createATN`);function Cg(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=q(e,n,void 0,{type:lg}),a=q(e,n,void 0,{type:fg});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}o(Cg,`createRuleStartAndStopATNStates`);function wg(e,t,n){return n instanceof H?zg(e,t,n.terminalType,n):n instanceof Ta?Bg(e,t,n):n instanceof ja?kg(e,t,n):n instanceof B?Ag(e,t,n):n instanceof V?Tg(e,t,n):n instanceof Aa?Eg(e,t,n):n instanceof Oa?Dg(e,t,n):n instanceof ka?Og(e,t,n):jg(e,t,n)}o(wg,`atom`);function Tg(e,t,n){let r=q(e,t,n,{type:dg});return Fg(e,r),Ng(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Tg,`repetition`);function Eg(e,t,n){let r=q(e,t,n,{type:dg});return Fg(e,r),Ng(e,t,n,Ig(e,t,r,n,jg(e,t,n)),zg(e,t,n.separator,n))}o(Eg,`repetitionSep`);function Dg(e,t,n){let r=q(e,t,n,{type:ug});return Fg(e,r),Mg(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Dg,`repetitionMandatory`);function Og(e,t,n){let r=q(e,t,n,{type:ug});return Fg(e,r),Mg(e,t,n,Ig(e,t,r,n,jg(e,t,n)),zg(e,t,n.separator,n))}o(Og,`repetitionMandatorySep`);function kg(e,t,n){let r=q(e,t,n,{type:cg});return Fg(e,r),Ig(e,t,r,n,...ng(n.definition,n=>wg(e,t,n)))}o(kg,`alternation`);function Ag(e,t,n){let r=q(e,t,n,{type:cg});return Fg(e,r),Pg(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Ag,`option`);function jg(e,t,n){let r=og(ng(n.definition,n=>wg(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:Rg(e,r)}o(jg,`block`);function Mg(e,t,n,r,i){let a=r.left,o=r.right,s=q(e,t,n,{type:gg});Fg(e,s);let c=q(e,t,n,{type:_g});return a.loopback=s,c.loopback=s,e.decisionMap[sg(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,K(o,s),i===void 0?(K(s,a),K(s,c)):(K(s,c),K(s,i.left),K(i.right,a)),{left:a,right:c}}o(Mg,`plus`);function Ng(e,t,n,r,i){let a=r.left,o=r.right,s=q(e,t,n,{type:hg});Fg(e,s);let c=q(e,t,n,{type:_g}),l=q(e,t,n,{type:mg});return s.loopback=l,c.loopback=l,K(s,a),K(s,c),K(o,l),i===void 0?K(l,s):(K(l,c),K(l,i.left),K(i.right,a)),e.decisionMap[sg(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}o(Ng,`star`);function Pg(e,t,n,r){let i=r.left,a=r.right;return K(i,a),e.decisionMap[sg(t,`Option`,n.idx)]=i,r}o(Pg,`optional`);function Fg(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}o(Fg,`defineDecisionState`);function Ig(e,t,n,r,...i){let a=q(e,t,r,{type:pg,start:n});n.end=a;for(let e of i)e===void 0?K(n,a):(K(n,e.left),K(e.right,a));let o={left:n,right:a};return e.decisionMap[sg(t,Lg(r),r.idx)]=n,o}o(Ig,`makeAlts`);function Lg(e){if(e instanceof ja)return`Alternation`;if(e instanceof B)return`Option`;if(e instanceof V)return`Repetition`;if(e instanceof Aa)return`RepetitionWithSeparator`;if(e instanceof Oa)return`RepetitionMandatory`;if(e instanceof ka)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}o(Lg,`getProdType`);function Rg(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 xg,o=i,s=t[r+1].left;n.left.type===cg&&n.right.type===cg&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,Ug(e,n.right)):K(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}o(Rg,`makeBlock`);function zg(e,t,n,r){let i=q(e,t,r,{type:cg}),a=q(e,t,r,{type:cg});return Hg(i,new yg(a,n)),{left:i,right:a}}o(zg,`tokenRef`);function Bg(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=q(e,t,n,{type:cg}),o=q(e,t,n,{type:cg});return Hg(a,new xg(i,r,o)),{left:a,right:o}}o(Bg,`ruleRef`);function Vg(e,t,n){let r=e.ruleToStartState.get(t);K(r,n.left);let i=e.ruleToStopState.get(t);return K(n.right,i),{left:r,right:i}}o(Vg,`buildRuleHandle`);function K(e,t){Hg(e,new bg(t))}o(K,`epsilon`);function q(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}o(q,`newState`);function Hg(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}o(Hg,`addTransition`);function Ug(e,t){e.states.splice(e.states.indexOf(t),1)}o(Ug,`removeState`);var Wg={},Gg=class{static{o(this,`ATNConfigSet`)}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Kg(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return ng(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function Kg(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}o(Kg,`getATNConfigKey`);function qg(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!Zm(o):n(o,s)))var s=o,c=a}return c}o(qg,`baseExtremum`);var Jg=qg;function Yg(e,t){return e<t}o(Yg,`baseLt`);var Xg=Yg;function Zg(e){return e&&e.length?Jg(e,Rh,Xg):void 0}o(Zg,`min`);var Qg=Zg,$g=gu?gu.isConcatSpreadable:void 0;function e_(e){return Af(e)||Xf(e)||!!($g&&e&&e[$g])}o(e_,`isFlattenable`);var t_=e_;function n_(e,t,n,r,i){var a=-1,o=e.length;for(n||=t_,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?n_(s,t-1,n,r,i):kf(i,s):r||(i[i.length]=s)}return i}o(n_,`baseFlatten`);var r_=n_;function i_(e,t){return r_(ng(e,t),1)}o(i_,`flatMap`);var a_=i_;function o_(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}o(o_,`baseFindIndex`);var s_=o_;function c_(e){return e!==e}o(c_,`baseIsNaN`);var l_=c_;function u_(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}o(u_,`strictIndexOf`);var d_=u_;function f_(e,t,n){return t===t?d_(e,t,n):s_(e,l_,n)}o(f_,`baseIndexOf`);var p_=f_;function m_(e,t){return!!(e!=null&&e.length)&&p_(e,t,0)>-1}o(m_,`arrayIncludes`);var h_=m_;function g_(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}o(g_,`arrayIncludesWith`);var __=g_;function v_(){}o(v_,`noop`);var y_=v_,b_=pm&&1/uf(new pm([,-0]))[1]==1/0?function(e){return new pm(e)}:y_,x_=200;function S_(e,t,n){var r=-1,i=h_,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=__;else if(a>=x_){var l=t?null:b_(e);if(l)return uf(l);o=!1,i=ef,c=new Xd}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}o(S_,`baseUniq`);var C_=S_;function w_(e,t){return e&&e.length?C_(e,Kh(t,2)):[]}o(w_,`uniqBy`);var T_=w_;function E_(e){return e!=null&&e.length?r_(e,1):[]}o(E_,`flatten`);var D_=E_;function O_(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}o(O_,`arrayEach`);var k_=O_;function A_(e){return typeof e==`function`?e:Rh}o(A_,`castFunction`);var j_=A_;function M_(e,t){return(Af(e)?k_:Qh)(e,j_(t))}o(M_,`forEach`);var N_=M_,P_=`[object Map]`,F_=`[object Set]`,I_=Object.prototype.hasOwnProperty;function L_(e){if(e==null)return!0;if(nm(e)&&(Af(e)||typeof e==`string`||typeof e.splice==`function`||np(e)||Up(e)||Xf(e)))return!e.length;var t=Dm(e);if(t==P_||t==F_)return!e.size;if(Yp(e))return!em(e).length;for(var n in e)if(I_.call(e,n))return!1;return!0}o(L_,`isEmpty`);var R_=L_;function z_(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}o(z_,`arrayReduce`);var B_=z_;function V_(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}o(V_,`baseReduce`);var H_=V_;function U_(e,t,n){var r=Af(e)?B_:H_,i=arguments.length<3;return r(e,Kh(t,4),n,i,Qh)}o(U_,`reduce`);var W_=U_;function G_(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}}o(G_,`createDFACache`);var K_=class{static{o(this,`PredicateSet`)}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}},q_=new K_,J_=class extends $c{static{o(this,`LLStarLookaheadStrategy`)}constructor(e){super(),this.logging=e?.logging??(e=>console.log(e)),this.incomplete=e?.incomplete??!1}initialize(e){this.atn=Sg(e.rules),this.dfas=$_(this.atn),this.callers=X_(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=this.incomplete,c=sg(n,`Alternation`,t),l=this.atn.decisionMap[c].decision,u=ng(qs({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>ng(e,e=>e[0]));if(Y_(u,!1)&&!i){let e=W_(u,(e,t,n)=>(N_(t,t=>{t&&(e[t.tokenTypeIdx]=n,N_(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=this.LA_FAST(1),r=e[n.tokenTypeIdx];if(t!==void 0&&r!==void 0){let e=t[r]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return r}:function(){let t=this.LA_FAST(1);return e[t.tokenTypeIdx]}}return r?function(e){let t=new K_,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=ev.call(this,a,l,t,o,s);return typeof r==`number`?r:void 0}:function(){let e=ev.call(this,a,l,q_,o,s);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=this.incomplete,c=this.callers,l=sg(n,r,t),u=this.atn.decisionMap[l],d=u.decision,f=ng(qs({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>ng(e,e=>e[0]));if(Y_(f)&&f[0][0]&&!i&&!Q_(u,r,c)){let e=f[0],t=D_(e);if(t.length===1&&R_(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}{let e=W_(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,N_(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA_FAST(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=ev.call(this,a,d,q_,o,s);return typeof e!=`object`&&e===0}}};function Y_(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}o(Y_,`isLL1Sequence`);function X_(e){let t=new Map;for(let n of e.states)for(let e of n.transitions)if(e instanceof xg){let n=t.get(e.rule);n===void 0&&(n=[],t.set(e.rule,n)),n.push(e.followState)}return t}o(X_,`buildCallers`);function Z_(e,t){let n=new Set,r=new Set,i=[e];for(;i.length>0;){let e=i.shift();if(!r.has(e)){if(r.add(e),e.type===fg){if(t!==void 0){let n=t.get(e.rule);n!==void 0&&i.push(...n)}continue}for(let t of e.transitions)if(t instanceof yg){n.add(t.tokenType.tokenTypeIdx);for(let e of t.tokenType.categoryMatches)n.add(e)}else i.push(t.target)}}return n}o(Z_,`firstSet`);function Q_(e,t,n){let r=t===`RepetitionMandatoryWithSeparator`,i=e.transitions[+!!r],a=e.transitions[+!r];if(i===void 0||a===void 0)return!1;let o=Z_(i.target),s=Z_(a.target,n);for(let e of o)if(s.has(e))return!0;return!1}o(Q_,`optionalHasFollowConflict`);function $_(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=G_(e.decisionStates[r],r);return n}o($_,`initATNSimulator`);function ev(e,t,n,r,i){let a=e[t](n),o=a.start;return o===void 0&&(o=pv(a,dv(mv(a.atnStartState))),a.start=o),tv.apply(this,[a,o,n,r,i])}o(ev,`adaptivePredict`);function tv(e,t,n,r,i){let a=t,o=1,s=[],c=this.LA_FAST(o++);for(;;){let t=sv(a,c);if(t===void 0&&(t=nv.apply(this,[e,a,c,o,n,r])),t===Wg)return ov(s,a,c);if(t.isAcceptState===!0){if(i===!0&&As(c,Os)){let e=Cv(a,n);if(e!==void 0)return e}return t.prediction}a=t,s.push(c),c=this.LA(o++)}}o(tv,`performLookahead`);function nv(e,t,n,r,i,a){let o=cv(t.configs,n,i);if(o.size===0)return fv(e,t,n,Wg),Wg;let s=dv(o),c=uv(o,i);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(yv(o)){let t=Qg(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,rv.apply(this,[e,r,o.alts,a])}return s=fv(e,t,n,s),s}o(nv,`computeLookaheadTarget`);function rv(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(iv({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}o(rv,`reportLookaheadAmbiguity`);function iv(e){let t=ng(e.prefixPath,e=>hs(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${av(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,
123
+ For further details.`);this.skipValidations=Object.hasOwn(t,`skipValidations`)?t.skipValidations:Pl.skipValidations}};Rl.DEFER_DEFINITION_ERRORS_HANDLING=!1,Ml(Rl,[Wc,el,hl,gl,vl,_l,yl,El,jl]);var zl=class extends Rl{static{o(this,`EmbeddedActionsParser`)}constructor(e,t=Pl){let n=Object.assign({},t);n.outputCst=!1,super(e,n)}};function Bl(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}o(Bl,`arrayMap`);var Vl=Bl;function Hl(){this.__data__=[],this.size=0}o(Hl,`listCacheClear`);var Ul=Hl;function Wl(e,t){return e===t||e!==e&&t!==t}o(Wl,`eq`);var Gl=Wl;function Kl(e,t){for(var n=e.length;n--;)if(Gl(e[n][0],t))return n;return-1}o(Kl,`assocIndexOf`);var ql=Kl,Jl=Array.prototype.splice;function Yl(e){var t=this.__data__,n=ql(t,e);return n<0?!1:(n==t.length-1?t.pop():Jl.call(t,n,1),--this.size,!0)}o(Yl,`listCacheDelete`);var Xl=Yl;function Zl(e){var t=this.__data__,n=ql(t,e);return n<0?void 0:t[n][1]}o(Zl,`listCacheGet`);var Ql=Zl;function $l(e){return ql(this.__data__,e)>-1}o($l,`listCacheHas`);var eu=$l;function tu(e,t){var n=this.__data__,r=ql(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}o(tu,`listCacheSet`);var nu=tu;function ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(ru,`ListCache`),ru.prototype.clear=Ul,ru.prototype.delete=Xl,ru.prototype.get=Ql,ru.prototype.has=eu,ru.prototype.set=nu;var iu=ru;function au(){this.__data__=new iu,this.size=0}o(au,`stackClear`);var ou=au;function su(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}o(su,`stackDelete`);var cu=su;function lu(e){return this.__data__.get(e)}o(lu,`stackGet`);var uu=lu;function du(e){return this.__data__.has(e)}o(du,`stackHas`);var fu=du,pu=typeof global==`object`&&global&&global.Object===Object&&global,mu=typeof self==`object`&&self&&self.Object===Object&&self,hu=pu||mu||Function(`return this`)(),gu=hu.Symbol,_u=Object.prototype,vu=_u.hasOwnProperty,yu=_u.toString,bu=gu?gu.toStringTag:void 0;function xu(e){var t=vu.call(e,bu),n=e[bu];try{e[bu]=void 0;var r=!0}catch{}var i=yu.call(e);return r&&(t?e[bu]=n:delete e[bu]),i}o(xu,`getRawTag`);var Su=xu,Cu=Object.prototype.toString;function wu(e){return Cu.call(e)}o(wu,`objectToString`);var Tu=wu,Eu=`[object Null]`,Du=`[object Undefined]`,Ou=gu?gu.toStringTag:void 0;function ku(e){return e==null?e===void 0?Du:Eu:Ou&&Ou in Object(e)?Su(e):Tu(e)}o(ku,`baseGetTag`);var Au=ku;function ju(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}o(ju,`isObject`);var Mu=ju,Nu=`[object AsyncFunction]`,Pu=`[object Function]`,Fu=`[object GeneratorFunction]`,Iu=`[object Proxy]`;function Lu(e){if(!Mu(e))return!1;var t=Au(e);return t==Pu||t==Fu||t==Nu||t==Iu}o(Lu,`isFunction`);var Ru=Lu,zu=hu[`__core-js_shared__`],Bu=(function(){var e=/[^.]+$/.exec(zu&&zu.keys&&zu.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})();function Vu(e){return!!Bu&&Bu in e}o(Vu,`isMasked`);var Hu=Vu,Uu=Function.prototype.toString;function Wu(e){if(e!=null){try{return Uu.call(e)}catch{}try{return e+``}catch{}}return``}o(Wu,`toSource`);var Gu=Wu,Ku=/[\\^$.*+?()[\]{}|]/g,qu=/^\[object .+?Constructor\]$/,Ju=Function.prototype,Yu=Object.prototype,Xu=Ju.toString,Zu=Yu.hasOwnProperty,Qu=RegExp(`^`+Xu.call(Zu).replace(Ku,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function $u(e){return!Mu(e)||Hu(e)?!1:(Ru(e)?Qu:qu).test(Gu(e))}o($u,`baseIsNative`);var ed=$u;function td(e,t){return e?.[t]}o(td,`getValue`);var nd=td;function rd(e,t){var n=nd(e,t);return ed(n)?n:void 0}o(rd,`getNative`);var id=rd,ad=id(hu,`Map`),od=id(Object,`create`);function sd(){this.__data__=od?od(null):{},this.size=0}o(sd,`hashClear`);var cd=sd;function ld(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}o(ld,`hashDelete`);var ud=ld,dd=`__lodash_hash_undefined__`,fd=Object.prototype.hasOwnProperty;function pd(e){var t=this.__data__;if(od){var n=t[e];return n===dd?void 0:n}return fd.call(t,e)?t[e]:void 0}o(pd,`hashGet`);var md=pd,hd=Object.prototype.hasOwnProperty;function gd(e){var t=this.__data__;return od?t[e]!==void 0:hd.call(t,e)}o(gd,`hashHas`);var _d=gd,vd=`__lodash_hash_undefined__`;function yd(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=od&&t===void 0?vd:t,this}o(yd,`hashSet`);var bd=yd;function xd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(xd,`Hash`),xd.prototype.clear=cd,xd.prototype.delete=ud,xd.prototype.get=md,xd.prototype.has=_d,xd.prototype.set=bd;var Sd=xd;function Cd(){this.size=0,this.__data__={hash:new Sd,map:new(ad||iu),string:new Sd}}o(Cd,`mapCacheClear`);var wd=Cd;function Td(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}o(Td,`isKeyable`);var Ed=Td;function Dd(e,t){var n=e.__data__;return Ed(t)?n[typeof t==`string`?`string`:`hash`]:n.map}o(Dd,`getMapData`);var Od=Dd;function kd(e){var t=Od(this,e).delete(e);return this.size-=+!!t,t}o(kd,`mapCacheDelete`);var Ad=kd;function jd(e){return Od(this,e).get(e)}o(jd,`mapCacheGet`);var Md=jd;function Nd(e){return Od(this,e).has(e)}o(Nd,`mapCacheHas`);var Pd=Nd;function Fd(e,t){var n=Od(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}o(Fd,`mapCacheSet`);var Id=Fd;function Ld(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o(Ld,`MapCache`),Ld.prototype.clear=wd,Ld.prototype.delete=Ad,Ld.prototype.get=Md,Ld.prototype.has=Pd,Ld.prototype.set=Id;var Rd=Ld,zd=200;function Bd(e,t){var n=this.__data__;if(n instanceof iu){var r=n.__data__;if(!ad||r.length<zd-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rd(r)}return n.set(e,t),this.size=n.size,this}o(Bd,`stackSet`);var Vd=Bd;function Hd(e){var t=this.__data__=new iu(e);this.size=t.size}o(Hd,`Stack`),Hd.prototype.clear=ou,Hd.prototype.delete=cu,Hd.prototype.get=uu,Hd.prototype.has=fu,Hd.prototype.set=Vd;var Ud=Hd,Wd=`__lodash_hash_undefined__`;function Gd(e){return this.__data__.set(e,Wd),this}o(Gd,`setCacheAdd`);var Kd=Gd;function qd(e){return this.__data__.has(e)}o(qd,`setCacheHas`);var Jd=qd;function Yd(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Rd;++t<n;)this.add(e[t])}o(Yd,`SetCache`),Yd.prototype.add=Yd.prototype.push=Kd,Yd.prototype.has=Jd;var Xd=Yd;function Zd(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}o(Zd,`arraySome`);var Qd=Zd;function $d(e,t){return e.has(t)}o($d,`cacheHas`);var ef=$d,tf=1,nf=2;function rf(e,t,n,r,i,a){var o=n&tf,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&nf?new Xd:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Qd(t,function(e,t){if(!ef(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}o(rf,`equalArrays`);var af=rf,of=hu.Uint8Array;function sf(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}o(sf,`mapToArray`);var cf=sf;function lf(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}o(lf,`setToArray`);var uf=lf,df=1,ff=2,pf=`[object Boolean]`,mf=`[object Date]`,hf=`[object Error]`,gf=`[object Map]`,_f=`[object Number]`,vf=`[object RegExp]`,yf=`[object Set]`,bf=`[object String]`,xf=`[object Symbol]`,Sf=`[object ArrayBuffer]`,Cf=`[object DataView]`,wf=gu?gu.prototype:void 0,Tf=wf?wf.valueOf:void 0;function Ef(e,t,n,r,i,a,o){switch(n){case Cf:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Sf:return!(e.byteLength!=t.byteLength||!a(new of(e),new of(t)));case pf:case mf:case _f:return Gl(+e,+t);case hf:return e.name==t.name&&e.message==t.message;case vf:case bf:return e==t+``;case gf:var s=cf;case yf:var c=r&df;if(s||=uf,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=ff,o.set(e,t);var u=af(s(e),s(t),r,i,a,o);return o.delete(e),u;case xf:if(Tf)return Tf.call(e)==Tf.call(t)}return!1}o(Ef,`equalByTag`);var Df=Ef;function Of(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}o(Of,`arrayPush`);var kf=Of,Af=Array.isArray;function jf(e,t,n){var r=t(e);return Af(e)?r:kf(r,n(e))}o(jf,`baseGetAllKeys`);var Mf=jf;function Nf(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}o(Nf,`arrayFilter`);var Pf=Nf;function Ff(){return[]}o(Ff,`stubArray`);var If=Ff,Lf=Object.prototype.propertyIsEnumerable,Rf=Object.getOwnPropertySymbols,zf=Rf?function(e){return e==null?[]:(e=Object(e),Pf(Rf(e),function(t){return Lf.call(e,t)}))}:If;function Bf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}o(Bf,`baseTimes`);var Vf=Bf;function Hf(e){return typeof e==`object`&&!!e}o(Hf,`isObjectLike`);var Uf=Hf,Wf=`[object Arguments]`;function Gf(e){return Uf(e)&&Au(e)==Wf}o(Gf,`baseIsArguments`);var Kf=Gf,qf=Object.prototype,Jf=qf.hasOwnProperty,Yf=qf.propertyIsEnumerable,Xf=Kf((function(){return arguments})())?Kf:function(e){return Uf(e)&&Jf.call(e,`callee`)&&!Yf.call(e,`callee`)};function Zf(){return!1}o(Zf,`stubFalse`);var Qf=Zf,$f=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ep=$f&&typeof module==`object`&&module&&!module.nodeType&&module,tp=ep&&ep.exports===$f?hu.Buffer:void 0,np=(tp?tp.isBuffer:void 0)||Qf,rp=9007199254740991,ip=/^(?:0|[1-9]\d*)$/;function ap(e,t){var n=typeof e;return t??=rp,!!t&&(n==`number`||n!=`symbol`&&ip.test(e))&&e>-1&&e%1==0&&e<t}o(ap,`isIndex`);var op=ap,sp=9007199254740991;function cp(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=sp}o(cp,`isLength`);var lp=cp,up=`[object Arguments]`,dp=`[object Array]`,fp=`[object Boolean]`,pp=`[object Date]`,mp=`[object Error]`,hp=`[object Function]`,gp=`[object Map]`,_p=`[object Number]`,vp=`[object Object]`,yp=`[object RegExp]`,bp=`[object Set]`,xp=`[object String]`,Sp=`[object WeakMap]`,Cp=`[object ArrayBuffer]`,wp=`[object DataView]`,Tp=`[object Float32Array]`,Ep=`[object Float64Array]`,Dp=`[object Int8Array]`,Op=`[object Int16Array]`,kp=`[object Int32Array]`,Ap=`[object Uint8Array]`,jp=`[object Uint8ClampedArray]`,Mp=`[object Uint16Array]`,Np=`[object Uint32Array]`,G={};G[Tp]=G[Ep]=G[Dp]=G[Op]=G[kp]=G[Ap]=G[jp]=G[Mp]=G[Np]=!0,G[up]=G[dp]=G[Cp]=G[fp]=G[wp]=G[pp]=G[mp]=G[hp]=G[gp]=G[_p]=G[vp]=G[yp]=G[bp]=G[xp]=G[Sp]=!1;function Pp(e){return Uf(e)&&lp(e.length)&&!!G[Au(e)]}o(Pp,`baseIsTypedArray`);var Fp=Pp;function Ip(e){return function(t){return e(t)}}o(Ip,`baseUnary`);var Lp=Ip,Rp=typeof exports==`object`&&exports&&!exports.nodeType&&exports,zp=Rp&&typeof module==`object`&&module&&!module.nodeType&&module,Bp=zp&&zp.exports===Rp&&pu.process,Vp=(function(){try{return zp&&zp.require&&zp.require(`util`).types||Bp&&Bp.binding&&Bp.binding(`util`)}catch{}})(),Hp=Vp&&Vp.isTypedArray,Up=Hp?Lp(Hp):Fp,Wp=Object.prototype.hasOwnProperty;function Gp(e,t){var n=Af(e),r=!n&&Xf(e),i=!n&&!r&&np(e),a=!n&&!r&&!i&&Up(e),o=n||r||i||a,s=o?Vf(e.length,String):[],c=s.length;for(var l in e)(t||Wp.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||op(l,c)))&&s.push(l);return s}o(Gp,`arrayLikeKeys`);var Kp=Gp,qp=Object.prototype;function Jp(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||qp)}o(Jp,`isPrototype`);var Yp=Jp;function Xp(e,t){return function(n){return e(t(n))}}o(Xp,`overArg`);var Zp=Xp(Object.keys,Object),Qp=Object.prototype.hasOwnProperty;function $p(e){if(!Yp(e))return Zp(e);var t=[];for(var n in Object(e))Qp.call(e,n)&&n!=`constructor`&&t.push(n);return t}o($p,`baseKeys`);var em=$p;function tm(e){return e!=null&&lp(e.length)&&!Ru(e)}o(tm,`isArrayLike`);var nm=tm;function rm(e){return nm(e)?Kp(e):em(e)}o(rm,`keys`);var im=rm;function am(e){return Mf(e,im,zf)}o(am,`getAllKeys`);var om=am,sm=1,cm=Object.prototype.hasOwnProperty;function lm(e,t,n,r,i,a){var o=n&sm,s=om(e),c=s.length;if(c!=om(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:cm.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}o(lm,`equalObjects`);var um=lm,dm=id(hu,`DataView`),fm=id(hu,`Promise`),pm=id(hu,`Set`),mm=id(hu,`WeakMap`),hm=`[object Map]`,gm=`[object Object]`,_m=`[object Promise]`,vm=`[object Set]`,ym=`[object WeakMap]`,bm=`[object DataView]`,xm=Gu(dm),Sm=Gu(ad),Cm=Gu(fm),wm=Gu(pm),Tm=Gu(mm),Em=Au;(dm&&Em(new dm(new ArrayBuffer(1)))!=bm||ad&&Em(new ad)!=hm||fm&&Em(fm.resolve())!=_m||pm&&Em(new pm)!=vm||mm&&Em(new mm)!=ym)&&(Em=o(function(e){var t=Au(e),n=t==gm?e.constructor:void 0,r=n?Gu(n):``;if(r)switch(r){case xm:return bm;case Sm:return hm;case Cm:return _m;case wm:return vm;case Tm:return ym}return t},`getTag`));var Dm=Em,Om=1,km=`[object Arguments]`,Am=`[object Array]`,jm=`[object Object]`,Mm=Object.prototype.hasOwnProperty;function Nm(e,t,n,r,i,a){var o=Af(e),s=Af(t),c=o?Am:Dm(e),l=s?Am:Dm(t);c=c==km?jm:c,l=l==km?jm:l;var u=c==jm,d=l==jm,f=c==l;if(f&&np(e)){if(!np(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Ud,o||Up(e)?af(e,t,n,r,i,a):Df(e,t,c,n,r,i,a);if(!(n&Om)){var p=u&&Mm.call(e,`__wrapped__`),m=d&&Mm.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Ud,i(h,g,n,r,a)}}return f?(a||=new Ud,um(e,t,n,r,i,a)):!1}o(Nm,`baseIsEqualDeep`);var Pm=Nm;function Fm(e,t,n,r,i){return e===t?!0:e==null||t==null||!Uf(e)&&!Uf(t)?e!==e&&t!==t:Pm(e,t,n,r,Fm,i)}o(Fm,`baseIsEqual`);var Im=Fm,Lm=1,Rm=2;function zm(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Ud;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Im(u,l,Lm|Rm,r,d):f))return!1}}return!0}o(zm,`baseIsMatch`);var Bm=zm;function Vm(e){return e===e&&!Mu(e)}o(Vm,`isStrictComparable`);var Hm=Vm;function Um(e){for(var t=im(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Hm(i)]}return t}o(Um,`getMatchData`);var Wm=Um;function Gm(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}o(Gm,`matchesStrictComparable`);var Km=Gm;function qm(e){var t=Wm(e);return t.length==1&&t[0][2]?Km(t[0][0],t[0][1]):function(n){return n===e||Bm(n,e,t)}}o(qm,`baseMatches`);var Jm=qm,Ym=`[object Symbol]`;function Xm(e){return typeof e==`symbol`||Uf(e)&&Au(e)==Ym}o(Xm,`isSymbol`);var Zm=Xm,Qm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$m=/^\w*$/;function eh(e,t){if(Af(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Zm(e)?!0:$m.test(e)||!Qm.test(e)||t!=null&&e in Object(t)}o(eh,`isKey`);var th=eh,nh=`Expected a function`;function rh(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(nh);var n=o(function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o},`memoized`);return n.cache=new(rh.Cache||Rd),n}o(rh,`memoize`),rh.Cache=Rd;var ih=rh,ah=500;function oh(e){var t=ih(e,function(e){return n.size===ah&&n.clear(),e}),n=t.cache;return t}o(oh,`memoizeCapped`);var sh=oh,ch=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lh=/\\(\\)?/g,uh=sh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(ch,function(e,n,r,i){t.push(r?i.replace(lh,`$1`):n||e)}),t}),dh=1/0,fh=gu?gu.prototype:void 0,ph=fh?fh.toString:void 0;function mh(e){if(typeof e==`string`)return e;if(Af(e))return Vl(e,mh)+``;if(Zm(e))return ph?ph.call(e):``;var t=e+``;return t==`0`&&1/e==-dh?`-0`:t}o(mh,`baseToString`);var hh=mh;function gh(e){return e==null?``:hh(e)}o(gh,`toString`);var _h=gh;function vh(e,t){return Af(e)?e:th(e,t)?[e]:uh(_h(e))}o(vh,`castPath`);var yh=vh,bh=1/0;function xh(e){if(typeof e==`string`||Zm(e))return e;var t=e+``;return t==`0`&&1/e==-bh?`-0`:t}o(xh,`toKey`);var Sh=xh;function Ch(e,t){t=yh(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Sh(t[n++])];return n&&n==r?e:void 0}o(Ch,`baseGet`);var wh=Ch;function Th(e,t,n){var r=e==null?void 0:wh(e,t);return r===void 0?n:r}o(Th,`get`);var Eh=Th;function Dh(e,t){return e!=null&&t in Object(e)}o(Dh,`baseHasIn`);var Oh=Dh;function kh(e,t,n){t=yh(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Sh(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&lp(i)&&op(o,i)&&(Af(e)||Xf(e)))}o(kh,`hasPath`);var Ah=kh;function jh(e,t){return e!=null&&Ah(e,t,Oh)}o(jh,`hasIn`);var Mh=jh,Nh=1,Ph=2;function Fh(e,t){return th(e)&&Hm(t)?Km(Sh(e),t):function(n){var r=Eh(n,e);return r===void 0&&r===t?Mh(n,e):Im(t,r,Nh|Ph)}}o(Fh,`baseMatchesProperty`);var Ih=Fh;function Lh(e){return e}o(Lh,`identity`);var Rh=Lh;function zh(e){return function(t){return t?.[e]}}o(zh,`baseProperty`);var Bh=zh;function Vh(e){return function(t){return wh(t,e)}}o(Vh,`basePropertyDeep`);var Hh=Vh;function Uh(e){return th(e)?Bh(Sh(e)):Hh(e)}o(Uh,`property`);var Wh=Uh;function Gh(e){return typeof e==`function`?e:e==null?Rh:typeof e==`object`?Af(e)?Ih(e[0],e[1]):Jm(e):Wh(e)}o(Gh,`baseIteratee`);var Kh=Gh;function qh(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}o(qh,`createBaseFor`);var Jh=qh();function Yh(e,t){return e&&Jh(e,t,im)}o(Yh,`baseForOwn`);var Xh=Yh;function Zh(e,t){return function(n,r){if(n==null)return n;if(!nm(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}o(Zh,`createBaseEach`);var Qh=Zh(Xh);function $h(e,t){var n=-1,r=nm(e)?Array(e.length):[];return Qh(e,function(e,i,a){r[++n]=t(e,i,a)}),r}o($h,`baseMap`);var eg=$h;function tg(e,t){return(Af(e)?Vl:eg)(e,Kh(t,3))}o(tg,`map`);var ng=tg;function rg(e,t){var n=[];return Qh(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}o(rg,`baseFilter`);var ig=rg;function ag(e,t){return(Af(e)?Pf:ig)(e,Kh(t,3))}o(ag,`filter`);var og=ag;function sg(e,t,n){return`${e.name}_${t}_${n}`}o(sg,`buildATNKey`);var cg=1,lg=2,ug=4,dg=5,fg=7,pg=8,mg=9,hg=10,gg=11,_g=12,vg=class{static{o(this,`AbstractTransition`)}constructor(e){this.target=e}isEpsilon(){return!1}},yg=class extends vg{static{o(this,`AtomTransition`)}constructor(e,t){super(e),this.tokenType=t}},bg=class extends vg{static{o(this,`EpsilonTransition`)}constructor(e){super(e)}isEpsilon(){return!0}},xg=class extends vg{static{o(this,`RuleTransition`)}constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}};function Sg(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Cg(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=jg(t,n,n);i!==void 0&&Vg(t,n,i)}return t}o(Sg,`createATN`);function Cg(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=q(e,n,void 0,{type:lg}),a=q(e,n,void 0,{type:fg});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}o(Cg,`createRuleStartAndStopATNStates`);function wg(e,t,n){return n instanceof H?zg(e,t,n.terminalType,n):n instanceof Ta?Bg(e,t,n):n instanceof ja?kg(e,t,n):n instanceof B?Ag(e,t,n):n instanceof V?Tg(e,t,n):n instanceof Aa?Eg(e,t,n):n instanceof Oa?Dg(e,t,n):n instanceof ka?Og(e,t,n):jg(e,t,n)}o(wg,`atom`);function Tg(e,t,n){let r=q(e,t,n,{type:dg});return Fg(e,r),Ng(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Tg,`repetition`);function Eg(e,t,n){let r=q(e,t,n,{type:dg});return Fg(e,r),Ng(e,t,n,Ig(e,t,r,n,jg(e,t,n)),zg(e,t,n.separator,n))}o(Eg,`repetitionSep`);function Dg(e,t,n){let r=q(e,t,n,{type:ug});return Fg(e,r),Mg(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Dg,`repetitionMandatory`);function Og(e,t,n){let r=q(e,t,n,{type:ug});return Fg(e,r),Mg(e,t,n,Ig(e,t,r,n,jg(e,t,n)),zg(e,t,n.separator,n))}o(Og,`repetitionMandatorySep`);function kg(e,t,n){let r=q(e,t,n,{type:cg});return Fg(e,r),Ig(e,t,r,n,...ng(n.definition,n=>wg(e,t,n)))}o(kg,`alternation`);function Ag(e,t,n){let r=q(e,t,n,{type:cg});return Fg(e,r),Pg(e,t,n,Ig(e,t,r,n,jg(e,t,n)))}o(Ag,`option`);function jg(e,t,n){let r=og(ng(n.definition,n=>wg(e,t,n)),e=>e!==void 0);if(r.length===1)return r[0];if(r.length!==0)return Rg(e,r)}o(jg,`block`);function Mg(e,t,n,r,i){let a=r.left,o=r.right,s=q(e,t,n,{type:gg});Fg(e,s);let c=q(e,t,n,{type:_g});return a.loopback=s,c.loopback=s,e.decisionMap[sg(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,K(o,s),i===void 0?(K(s,a),K(s,c)):(K(s,c),K(s,i.left),K(i.right,a)),{left:a,right:c}}o(Mg,`plus`);function Ng(e,t,n,r,i){let a=r.left,o=r.right,s=q(e,t,n,{type:hg});Fg(e,s);let c=q(e,t,n,{type:_g}),l=q(e,t,n,{type:mg});return s.loopback=l,c.loopback=l,K(s,a),K(s,c),K(o,l),i===void 0?K(l,s):(K(l,c),K(l,i.left),K(i.right,a)),e.decisionMap[sg(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}o(Ng,`star`);function Pg(e,t,n,r){let i=r.left,a=r.right;return K(i,a),e.decisionMap[sg(t,`Option`,n.idx)]=i,r}o(Pg,`optional`);function Fg(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}o(Fg,`defineDecisionState`);function Ig(e,t,n,r,...i){let a=q(e,t,r,{type:pg,start:n});n.end=a;for(let e of i)e===void 0?K(n,a):(K(n,e.left),K(e.right,a));let o={left:n,right:a};return e.decisionMap[sg(t,Lg(r),r.idx)]=n,o}o(Ig,`makeAlts`);function Lg(e){if(e instanceof ja)return`Alternation`;if(e instanceof B)return`Option`;if(e instanceof V)return`Repetition`;if(e instanceof Aa)return`RepetitionWithSeparator`;if(e instanceof Oa)return`RepetitionMandatory`;if(e instanceof ka)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}o(Lg,`getProdType`);function Rg(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 xg,o=i,s=t[r+1].left;n.left.type===cg&&n.right.type===cg&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,Ug(e,n.right)):K(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}o(Rg,`makeBlock`);function zg(e,t,n,r){let i=q(e,t,r,{type:cg}),a=q(e,t,r,{type:cg});return Hg(i,new yg(a,n)),{left:i,right:a}}o(zg,`tokenRef`);function Bg(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=q(e,t,n,{type:cg}),o=q(e,t,n,{type:cg});return Hg(a,new xg(i,r,o)),{left:a,right:o}}o(Bg,`ruleRef`);function Vg(e,t,n){let r=e.ruleToStartState.get(t);K(r,n.left);let i=e.ruleToStopState.get(t);return K(n.right,i),{left:r,right:i}}o(Vg,`buildRuleHandle`);function K(e,t){Hg(e,new bg(t))}o(K,`epsilon`);function q(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}o(q,`newState`);function Hg(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}o(Hg,`addTransition`);function Ug(e,t){e.states.splice(e.states.indexOf(t),1)}o(Ug,`removeState`);var Wg={},Gg=class{static{o(this,`ATNConfigSet`)}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Kg(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return ng(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function Kg(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}o(Kg,`getATNConfigKey`);function qg(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!Zm(o):n(o,s)))var s=o,c=a}return c}o(qg,`baseExtremum`);var Jg=qg;function Yg(e,t){return e<t}o(Yg,`baseLt`);var Xg=Yg;function Zg(e){return e&&e.length?Jg(e,Rh,Xg):void 0}o(Zg,`min`);var Qg=Zg,$g=gu?gu.isConcatSpreadable:void 0;function e_(e){return Af(e)||Xf(e)||!!($g&&e&&e[$g])}o(e_,`isFlattenable`);var t_=e_;function n_(e,t,n,r,i){var a=-1,o=e.length;for(n||=t_,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?n_(s,t-1,n,r,i):kf(i,s):r||(i[i.length]=s)}return i}o(n_,`baseFlatten`);var r_=n_;function i_(e,t){return r_(ng(e,t),1)}o(i_,`flatMap`);var a_=i_;function o_(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}o(o_,`baseFindIndex`);var s_=o_;function c_(e){return e!==e}o(c_,`baseIsNaN`);var l_=c_;function u_(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}o(u_,`strictIndexOf`);var d_=u_;function f_(e,t,n){return t===t?d_(e,t,n):s_(e,l_,n)}o(f_,`baseIndexOf`);var p_=f_;function m_(e,t){return!!(e!=null&&e.length)&&p_(e,t,0)>-1}o(m_,`arrayIncludes`);var h_=m_;function g_(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}o(g_,`arrayIncludesWith`);var __=g_;function v_(){}o(v_,`noop`);var y_=v_,b_=pm&&1/uf(new pm([,-0]))[1]==1/0?function(e){return new pm(e)}:y_,x_=200;function S_(e,t,n){var r=-1,i=h_,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=__;else if(a>=x_){var l=t?null:b_(e);if(l)return uf(l);o=!1,i=ef,c=new Xd}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}o(S_,`baseUniq`);var C_=S_;function w_(e,t){return e&&e.length?C_(e,Kh(t,2)):[]}o(w_,`uniqBy`);var T_=w_;function E_(e){return e!=null&&e.length?r_(e,1):[]}o(E_,`flatten`);var D_=E_;function O_(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}o(O_,`arrayEach`);var k_=O_;function A_(e){return typeof e==`function`?e:Rh}o(A_,`castFunction`);var j_=A_;function M_(e,t){return(Af(e)?k_:Qh)(e,j_(t))}o(M_,`forEach`);var N_=M_,P_=`[object Map]`,F_=`[object Set]`,I_=Object.prototype.hasOwnProperty;function L_(e){if(e==null)return!0;if(nm(e)&&(Af(e)||typeof e==`string`||typeof e.splice==`function`||np(e)||Up(e)||Xf(e)))return!e.length;var t=Dm(e);if(t==P_||t==F_)return!e.size;if(Yp(e))return!em(e).length;for(var n in e)if(I_.call(e,n))return!1;return!0}o(L_,`isEmpty`);var R_=L_;function z_(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}o(z_,`arrayReduce`);var B_=z_;function V_(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}o(V_,`baseReduce`);var H_=V_;function U_(e,t,n){var r=Af(e)?B_:H_,i=arguments.length<3;return r(e,Kh(t,4),n,i,Qh)}o(U_,`reduce`);var W_=U_;function G_(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}}o(G_,`createDFACache`);var K_=class{static{o(this,`PredicateSet`)}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}},q_=new K_,J_=class extends $c{static{o(this,`LLStarLookaheadStrategy`)}constructor(e){super(),this.logging=e?.logging??(e=>console.log(e)),this.incomplete=e?.incomplete??!1}initialize(e){this.atn=Sg(e.rules),this.dfas=$_(this.atn),this.callers=X_(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=this.incomplete,c=sg(n,`Alternation`,t),l=this.atn.decisionMap[c].decision,u=ng(qs({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>ng(e,e=>e[0]));if(Y_(u,!1)&&!i){let e=W_(u,(e,t,n)=>(N_(t,t=>{t&&(e[t.tokenTypeIdx]=n,N_(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=this.LA_FAST(1),r=e[n.tokenTypeIdx];if(t!==void 0&&r!==void 0){let e=t[r]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return r}:function(){let t=this.LA_FAST(1);return e[t.tokenTypeIdx]}}return r?function(e){let t=new K_,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=ev.call(this,a,l,t,o,s);return typeof r==`number`?r:void 0}:function(){let e=ev.call(this,a,l,q_,o,s);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=this.incomplete,c=this.callers,l=sg(n,r,t),u=this.atn.decisionMap[l],d=u.decision,f=ng(qs({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>ng(e,e=>e[0]));if(Y_(f)&&f[0][0]&&!i&&!Q_(u,r,c)){let e=f[0],t=D_(e);if(t.length===1&&R_(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}{let e=W_(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,N_(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA_FAST(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=ev.call(this,a,d,q_,o,s);return typeof e!=`object`&&e===0}}};function Y_(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}o(Y_,`isLL1Sequence`);function X_(e){let t=new Map;for(let n of e.states)for(let e of n.transitions)if(e instanceof xg){let n=t.get(e.rule);n===void 0&&(n=[],t.set(e.rule,n)),n.push(e.followState)}return t}o(X_,`buildCallers`);function Z_(e,t){let n=new Set,r=new Set,i=[e];for(;i.length>0;){let e=i.shift();if(!r.has(e)){if(r.add(e),e.type===fg){if(t!==void 0){let n=t.get(e.rule);n!==void 0&&i.push(...n)}}else for(let t of e.transitions)if(t instanceof yg){n.add(t.tokenType.tokenTypeIdx);for(let e of t.tokenType.categoryMatches)n.add(e)}else i.push(t.target)}}return n}o(Z_,`firstSet`);function Q_(e,t,n){let r=t===`RepetitionMandatoryWithSeparator`,i=e.transitions[+!!r],a=e.transitions[+!r];if(i===void 0||a===void 0)return!1;let o=Z_(i.target),s=Z_(a.target,n);for(let e of o)if(s.has(e))return!0;return!1}o(Q_,`optionalHasFollowConflict`);function $_(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=G_(e.decisionStates[r],r);return n}o($_,`initATNSimulator`);function ev(e,t,n,r,i){let a=e[t](n),o=a.start;return o===void 0&&(o=pv(a,dv(mv(a.atnStartState))),a.start=o),tv.apply(this,[a,o,n,r,i])}o(ev,`adaptivePredict`);function tv(e,t,n,r,i){let a=t,o=1,s=[],c=this.LA_FAST(o++);for(;;){let t=sv(a,c);if(t===void 0&&(t=nv.apply(this,[e,a,c,o,n,r])),t===Wg)return ov(s,a,c);if(t.isAcceptState===!0){if(i===!0&&As(c,Os)){let e=Cv(a,n);if(e!==void 0)return e}return t.prediction}a=t,s.push(c),c=this.LA(o++)}}o(tv,`performLookahead`);function nv(e,t,n,r,i,a){let o=cv(t.configs,n,i);if(o.size===0)return fv(e,t,n,Wg),Wg;let s=dv(o),c=uv(o,i);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(yv(o)){let t=Qg(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,rv.apply(this,[e,r,o.alts,a])}return s=fv(e,t,n,s),s}o(nv,`computeLookaheadTarget`);function rv(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(iv({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}o(rv,`reportLookaheadAmbiguity`);function iv(e){let t=ng(e.prefixPath,e=>hs(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${av(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,
124
124
  <${t}> may appears as a prefix path in all these alternatives.
125
125
  `;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
126
- For Further details.`,r}o(iv,`buildAmbiguityError`);function av(e){if(e instanceof Ta)return`SUBRULE`;if(e instanceof B)return`OPTION`;if(e instanceof ja)return`OR`;if(e instanceof Oa)return`AT_LEAST_ONE`;if(e instanceof ka)return`AT_LEAST_ONE_SEP`;if(e instanceof Aa)return`MANY_SEP`;if(e instanceof V)return`MANY`;if(e instanceof H)return`CONSUME`;throw Error(`non exhaustive match`)}o(av,`getProductionDslName`);function ov(e,t,n){return{actualToken:n,possibleTokenTypes:T_(a_(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof yg).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}o(ov,`buildAdaptivePredictError`);function sv(e,t){return e.edges[t.tokenTypeIdx]}o(sv,`getExistingTargetState`);function cv(e,t,n){let r=new Gg,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===fg){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=lv(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 Gg;for(let e of r.elements)hv(e,a)}if(i.length>0&&!_v(a))for(let e of i)a.add(e);return a}o(cv,`computeReachSet`);function lv(e,t){if(e instanceof yg&&As(t,e.tokenType))return e.target}o(lv,`getReachableTarget`);function uv(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}o(uv,`getUniqueAlt`);function dv(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}o(dv,`newDFAState`);function fv(e,t,n,r){return r=pv(e,r),t.edges[n.tokenTypeIdx]=r,r}o(fv,`addDFAEdge`);function pv(e,t){if(t===Wg)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}o(pv,`addDFAState`);function mv(e){let t=new Gg,n=e.transitions.length;for(let r=0;r<n;r++)hv({state:e.transitions[r].target,alt:r,stack:[]},t);return t}o(mv,`computeStartState`);function hv(e,t){let n=e.state;if(n.type===fg){if(e.stack.length>0){let n=[...e.stack];hv({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=gv(e,r);a!==void 0&&hv(a,t)}}o(hv,`closure`);function gv(e,t){if(t instanceof bg)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof xg){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}o(gv,`getEpsilonTarget`);function _v(e){for(let t of e.elements)if(t.state.type===fg)return!0;return!1}o(_v,`hasConfigInRuleStopState`);function vv(e){for(let t of e.elements)if(t.state.type!==fg)return!1;return!0}o(vv,`allConfigsInRuleStopStates`);function yv(e){if(vv(e))return!0;let t=bv(e.elements);return xv(t)&&!Sv(t)}o(yv,`hasConflictTerminatingPrediction`);function bv(e){let t=new Map;for(let n of e){let e=Kg(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}o(bv,`getConflictingAltSets`);function xv(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}o(xv,`hasConflictingAltSet`);function Sv(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}o(Sv,`hasStateAssociatedWithOneAlt`);function Cv(e,t){let n;for(let r of e.configs.elements)if(t.is(r.alt)!==!1&&r.state.type!==fg){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}o(Cv,`getBestGuess`);var wv=class{static{o(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new kv(e),this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Ov;return t.grammarSource=e,this.appendChild(this.current,t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=this.createLeafNode(e,!t);return t&&(n.grammarSource=t),this.appendChild(this.current,n),n}createLeafNode(e,t){return new Ev(e.startOffset,e.image.length,e.startLine-1,e.startColumn-1,e.endLine-1,e.endColumn,e.tokenType,t)}appendChild(e,t){t.container=e,e.content.push(t)}appendChildren(e,t){for(let n of t)n.container=e;e.content.length===0?e.content=t.slice():e.content.push(...t)}insertChildren(e,t,n){for(let t of n)t.container=e;e.content.splice(t,0,...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)t.push(this.createLeafNode(n,!0));let n=this.current,r=!1;if(n.content.length>0){this.appendChildren(n,t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){this.insertChildren(n.container,e,t),r=!0;break}n=n.container}r||this.insertChildren(this.rootNode,0,t)}construct(e){e.$cstNode=this.current;let t=this.nodeStack.pop();t&&(t.content.length===0?this.removeNode(t):t.content=t.content.slice())}},Tv=class{static{o(this,`AbstractCstNode`)}constructor(){this.container=void 0,this.grammarSource=void 0}get root(){let e=this;for(;e.container;)e=e.container;return e}get text(){return this.root.fullText.substring(this.offset,this.end)}},Ev=class extends Tv{static{o(this,`LeafCstNodeImpl`)}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 astNode(){let e=this.container;if(!e)throw Error(`This node has no associated AST element`);return e.astNode}get range(){return{start:{line:this._startLine,character:this._startColumn},end:{line:this._endLine,character:this._endColumn}}}constructor(e,t,n,r,i,a,o,s=!1){super(),this._hidden=s,this._offset=Dv(e),this._length=Dv(t),this._startLine=Dv(n),this._startColumn=Dv(r),this._endLine=Dv(i),this._endColumn=Dv(a),this._tokenType=o}};function Dv(e){return e|0}o(Dv,`toSmi`);var Ov=class extends Tv{static{o(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=[],this._astNode=void 0,this._rangeCache=void 0}get astNode(){let e=this;for(;e;){if(e._astNode)return e._astNode;e=e.container}throw Error(`This node has no associated AST element`)}set astNode(e){this._astNode=e}get hidden(){return!1}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._rangeCache;if(e===void 0){let t=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(t&&n){let{range:r}=t,{range:i}=n;this._rangeCache=e={start:r.start,end:i.end.line<r.start.line?r.start:i.end}}else return{start:{line:0,character:0},end:{line:0,character:0}}}return e}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]}},kv=class extends Ov{static{o(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},Av=Symbol(`Datatype`);function jv(e){return e.$type===Av}o(jv,`isDataTypeNode`);var Mv=`​`,Nv=o(e=>e.endsWith(Mv)?e:e+Mv,`withRuleSuffix`),Pv=class{static{o(this,`AbstractLangiumParser`)}constructor(e,t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let n=this.lexer.definition,r=e.LanguageMetaData.mode===`production`;this.wrapper=e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?new Vv(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},t,e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):new Bv(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},t)}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()}},Fv=class extends Pv{static{o(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e,!1),this.nodeBuilder=new wv,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;lr(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(Nv(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Er(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 lr(e)?ia(e):e.fragment?void 0:ta(e)?Av:ia(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,_n(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 this.linkCstNode(t),t}linkCstNode(e){I(e)&&e.$cstNode&&(e.$cstNode.astNode=e)}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===Av?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=hr(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(jv(o)){let e=r.image;hr(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&ci(e)}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(jv(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);let r=this.nodeBuilder.buildCompositeNode(t);this.nodeBuilder.appendChild(r,n.$cstNode);let i={$type:e};this.stack.push(i),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)):jv(e)?this.converter.convert(e.value,e.$cstNode):(Dn(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=vn(e,Hn);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Zn(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,this.linkCstNode(o),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)}return e.$cstNode=void 0,e}get definitionErrors(){return this.wrapper.definitionErrors}},Iv=class{static{o(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return js.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return js.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return js.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return js.buildEarlyExitMessage(e)}},Lv=class extends Iv{static{o(this,`LangiumParserErrorMessageProvider`)}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}\`.`}},Rv=class extends Pv{static{o(this,`LangiumCompletionParser`)}constructor(e){super(e,!0),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.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(Nv(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}},zv={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new Lv},Bv=class extends zl{static{o(this,`ChevrotainWrapper`)}constructor(e,t,n){let r=t&&`maxLookahead`in t;super(e,{...zv,lookaheadStrategy:r?new $c({maxLookahead:t.maxLookahead}):new J_({logging:t.skipValidations?()=>{}:void 0,incomplete:n}),...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,{})}},Vv=class extends Bv{static{o(this,`ProfilerWrapper`)}constructor(e,t,n,r){super(e,t,n),this.task=r}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 Hv(e,t,n){return Uv({parser:t,tokens:n,ruleNames:new Map},e),t}o(Hv,`createParser`);function Uv(e,t){let n=Ui(t,!1),r=L(t.rules).filter(Er).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,Gv(n,t.definition))}let i=L(t.rules).filter(lr).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,Wv(e,t))}o(Uv,`buildRules`);function Wv(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(Ur(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},s={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,s);let c={$container:s,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:s};s.elements.push(c,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:o(()=>e.parser.consume(n,t,c),`ALT`)})),d;return t=>{d??=ry(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}o(Wv,`buildInfixRule`);function Gv(e,t,n=!1){let r;if(hr(t))r=ty(e,t);else if(In(t))r=Kv(e,t);else if(Hn(t))r=Gv(e,t.terminal);else if(Zn(t))r=ey(e,t);else if(Nr(t))r=qv(e,t);else if(Rn(t))r=Xv(e,t);else if(Qr(t))r=Zv(e,t);else if(ar(t))r=Qv(e,t);else if(tr(t)){let n=e.consume++;r=o(()=>e.parser.consume(n,Os,t),`method`)}else throw new _i(t.$cstNode,`Unexpected element type: ${t.$type}`);return ny(e,n?void 0:$v(t),r,t.cardinality)}o(Gv,`buildElement`);function Kv(e,t){let n=ia(t);return()=>e.parser.action(n,t)}o(Kv,`buildAction`);function qv(e,t){let n=t.rule.ref;if(Mn(n)){let r=e.subrule++,i=Er(n)&&n.fragment,a=t.arguments.length>0?Jv(n,t.arguments):()=>({}),o;return s=>{o??=ry(e,n),e.parser.subrule(r,o,i,t,a(s))}}if(Ur(n)){let r=e.consume++,i=ay(e,n.name);return()=>e.parser.consume(r,i,t)}if(n)vi(n);else throw new _i(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}o(qv,`buildRuleCall`);function Jv(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Yv(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{let n=t.map(e=>Yv(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}}}o(Jv,`buildRuleCallPredicate`);function Yv(e){if($n(e)){let t=Yv(e.left),n=Yv(e.right);return e=>t(e)||n(e)}if(Yn(e)){let t=Yv(e.left),n=Yv(e.right);return e=>t(e)&&n(e)}if(br(e)){let t=Yv(e.value);return e=>!t(e)}if(wr(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}if(Wn(e)){let t=!!e.true;return()=>t}vi(e)}o(Yv,`buildPredicate`);function Xv(e,t){if(t.elements.length===1)return Gv(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:Gv(e,r,!0)},i=$v(r);i&&(t.GATE=Yv(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:o(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}o(Xv,`buildAlternatives`);function Zv(e,t){if(t.elements.length===1)return Gv(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:Gv(e,r,!0)},i=$v(r);i&&(t.GATE=Yv(i)),n.push(t)}let r=e.or++,i=o((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=o(t=>e.parser.alternatives(r,n.map((n,a)=>{let s={ALT:o(()=>!0,`ALT`)},c=e.parser;s.ALT=()=>{if(n.ALT(t),!c.isRecording()){let e=i(r,c);c.unorderedGroups.get(e)||c.unorderedGroups.set(e,[]);let t=c.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return s.GATE=l?()=>l(t):()=>!c.unorderedGroups.get(i(r,c))?.[a],s})),`alternatives`),s=ny(e,$v(t),a,`*`);return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}o(Zv,`buildUnorderedGroup`);function Qv(e,t){let n=t.elements.map(t=>Gv(e,t));return e=>n.forEach(t=>t(e))}o(Qv,`buildGroup`);function $v(e){if(ar(e))return e.guardCondition}o($v,`getGuardCondition`);function ey(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=$i(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+ia(t.type.ref));return ey(e,t,n)}if(Nr(n)&&Er(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=ry(e,r),e.parser.subrule(i,a,!1,t,n)}}if(Nr(n)&&Ur(n.rule.ref)){let r=e.consume++,i=ay(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(hr(n)){let r=e.consume++,i=ay(e,n.value);return()=>e.parser.consume(r,i,t)}throw Error(`Could not build cross reference parser`)}o(ey,`buildCrossReference`);function ty(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)}o(ty,`buildKeyword`);function ny(e,t,n,r){let i=t&&Yv(t);if(!r){if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:o(()=>n(r),`ALT`),GATE:o(()=>i(r),`GATE`)},{ALT:Ll(),GATE:o(()=>!i(r),`GATE`)}])}return n}if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:o(()=>e.parser.atLeastOne(t,{DEF:o(()=>n(a),`DEF`)}),`ALT`),GATE:o(()=>i(a),`GATE`)},{ALT:Ll(),GATE:o(()=>!i(a),`GATE`)}])}return r=>e.parser.atLeastOne(t,{DEF:o(()=>n(r),`DEF`)})}if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}vi(r)}o(ny,`wrap`);function ry(e,t){let n=iy(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}o(ry,`getRule`);function iy(e,t){if(Mn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Er(r);)(ar(r)||Rn(r)||Qr(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}o(iy,`getRuleName`);function ay(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}o(ay,`getToken`);function oy(e){let t=e.Grammar,n=e.parser.Lexer,r=new Rv(e);return Hv(t,r,n.definition),r.finalize(),r}o(oy,`createCompletionParser`);function sy(e){let t=cy(e);return t.finalize(),t}o(sy,`createLangiumParser`);function cy(e){let t=e.Grammar,n=e.parser.Lexer;return Hv(t,new Fv(e),n.definition)}o(cy,`prepareLangiumParser`);var ly=class{static{o(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=L(Ui(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(Ur).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=sa(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=Li(t)?ms.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(Mn).flatMap(e=>Cn(e).filter(hr)).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(Ri(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&zi(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},uy=class{static{o(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(Zn(n)&&(n=Gi(n)),Nr(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 dy.convertInt(t);case`STRING`:return dy.convertString(t);case`ID`:return dy.convertID(t)}switch(oa(e)?.toLowerCase()){case`number`:return dy.convertNumber(t);case`boolean`:return dy.convertBoolean(t);case`bigint`:return dy.convertBigint(t);case`date`:return dy.convertDate(t);default:return t}}},dy;(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}o(t,`convertString`),e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
127
- `;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}o(n,`convertEscapeCharacter`);function r(e){return e.charAt(0)===`^`?e.substring(1):e}o(r,`convertID`),e.convertID=r;function i(e){return parseInt(e)}o(i,`convertInt`),e.convertInt=i;function a(e){return BigInt(e)}o(a,`convertBigint`),e.convertBigint=a;function s(e){return new Date(e)}o(s,`convertDate`),e.convertDate=s;function c(e){return Number(e)}o(c,`convertNumber`),e.convertNumber=c;function l(e){return e.toLowerCase()===`true`}o(l,`convertBoolean`),e.convertBoolean=l})(dy||={});var J=d(en(),1);function fy(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}o(fy,`delayNextTick`);var py=0,my=10;function hy(){return py=performance.now(),new J.CancellationTokenSource}o(hy,`startCancelableOperation`);var gy=Symbol(`OperationCancelled`);function _y(e){return e===gy}o(_y,`isOperationCancelled`);async function Y(e){if(e===J.CancellationToken.None)return;let t=performance.now();if(t-py>=my&&(py=t,await fy(),py=performance.now()),e.isCancellationRequested)throw gy}o(Y,`interruptAndCheck`);var vy=class{static{o(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},yy=class e{static{o(this,`FullTextDocument`)}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=wy(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=Sy(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=Sy(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)}getLineRange(e){let t=this.getLineOffsets();if(e>=t.length){let e=t.length-1;return{start:{line:e,character:0},end:{line:e,character:this._content.length-t[e]}}}if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let n=t[e],r=e+1<t.length?t[e+1]:this._content.length,i=this.ensureBeforeEOL(r,n);return{start:{line:e,character:0},end:{line:e,character:i-n}}}getEOLCharacters(e){let t=this.getLineOffsets();if(e>=t.length||e<0)return``;let n=e+1<t.length?t[e+1]:this._content.length,r=this.ensureBeforeEOL(n,t[e]);return this._content.substring(r,n)}ensureBeforeEOL(e,t){for(;e>t&&Cy(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}},by;(function(e){function t(e,t,n,r){return new yy(e,t,n,r)}o(t,`create`),e.create=t;function n(e,t,n){if(e instanceof yy)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}o(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=xy(t.map(Ty),(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(``)}o(r,`applyEdits`),e.applyEdits=r})(by||={});function xy(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);xy(r,t),xy(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}o(xy,`mergeSort`);function Sy(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Cy(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}o(Sy,`computeLineOffsets`);function Cy(e){return e===13||e===10}o(Cy,`isEOL`);function wy(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}o(wy,`getWellformedRange`);function Ty(e){let t=wy(e.range);return t===e.range?e:{newText:e.newText,range:t}}o(Ty,`getWellformedEdit`);var Ey;(()=>{"use strict";var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}o(t,`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}o(n,`r`);var r={resolve:o(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:`.`},`resolve`),normalize:o(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},`normalize`),isAbsolute:o(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:o(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)},`join`),relative:o(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))},`relative`),_makeLong:o(function(e){return e},`_makeLong`),dirname:o(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)},`dirname`),basename:o(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)},`basename`),extname:o(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)},`extname`),format:o(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)},`format`),parse:o(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},`parse`),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}o(n,`r`),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:o(()=>d,`URI`),Utils:o(()=>C,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function l(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(!s.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(c.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}o(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{o(this,`l`)}static isUri(e){return e instanceof d||!!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||``,l(this,a))}get fsPath(){return _(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 p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,ee(n[4]||``),ee(n[5]||``),ee(n[7]||``),ee(n[9]||``),t):new p(``,``,``,``,``)}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 p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{o(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),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 m={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 h(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=m[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}o(h,`m`);function g(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+=m[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}o(g,`y`);function _(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}o(_,`v`);function v(e,t){let n=t?g:h,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:h(c,!1,!1)),r}o(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}o(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ee(e){return e.match(b)?e.replace(b,(e=>y(e))):e}o(ee,`w`);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||={}),Ey=r})();var{URI:Dy,Utils:Oy}=Ey,ky;(function(e){e.basename=Oy.basename,e.dirname=Oy.dirname,e.extname=Oy.extname,e.joinPath=Oy.joinPath,e.resolvePath=Oy.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}o(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?Dy.parse(e).path:e.path,i=typeof n==`string`?Dy.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(`/`)}o(r,`relative`),e.relative=r;function i(e){return Dy.parse(e.toString()).toString()}o(i,`normalize`),e.normalize=i;function a(e,t){let n=typeof e==`string`?Dy.parse(e):e,r=typeof t==`string`?Dy.parse(t):t;if(n.scheme!==r.scheme)return!1;let i=n.path,a=r.path;return a.charAt(a.length-1)===`/`&&(a=a.slice(0,-1)),i.charAt(i.length-1)===`/`&&(i=i.slice(0,-1)),a===i?!0:a.length<i.length||a.charAt(i.length)!==`/`?!1:a.startsWith(i)}o(a,`contains`),e.contains=a})(ky||={});var Ay=class{static{o(this,`UriTrie`)}constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return ky.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:ky.joinPath(Dy.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:ky.joinPath(Dy.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(this.normalizeUri(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}},X;(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`})(X||={});var jy=class{static{o(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=J.CancellationToken.None){let n=await this.getInitialText(e,t);return this.createAsync(e,n,t)}async getInitialText(e,t){return this.fileSystemProvider.readFile(e)}fromTextDocument(e,t,n){return t??=Dy.parse(e.uri),J.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return J.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)}if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{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)}{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:X.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:X.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=await this.getUpdatedText(e,r,t);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=X.Parsed,e}async getUpdatedText(e,t,n){return t?t.getText():await this.fileSystemProvider.readFile(e.uri)}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??=by.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},My=class{static{o(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new Ay,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return L(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,X.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=X.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=X.Changed;return this.documentTrie.delete(t),n}},Ny=Symbol(`RefResolving`),Py=class{static{o(this,`DefaultReferenceImpl`)}constructor(e,t,n,r,i){this.resolver=e,this.node=t,this.property=n,this._ref=void 0,this.$refNode=r,this.$refText=i}get ref(){return this.resolver.resolveReference(this,this.node,this.property)}get $nodeDescription(){return this._nodeDescription}get error(){return an(this._ref)?this._ref:void 0}},Fy=class{static{o(this,`DefaultMultiReferenceImpl`)}constructor(e,t,n,r,i){this.resolver=e,this.node=t,this.property=n,this._items=void 0,this.$refNode=r,this.$refText=i}get items(){return this.resolver.resolveMultiReference(this,this.node,this.property)}get error(){return this._linkingError}},Iy=class{static{o(this,`DefaultLinker`)}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,this.referenceResolver={resolveReference:this.resolveReference.bind(this),resolveMultiReference:this.resolveMultiReference.bind(this)}}async link(e,t=J.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of wn(e.parseResult.value))await Y(t),En(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 wn(e.parseResult.value))await Y(t),En(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=Ny;try{let t=this.getCandidate(e);an(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=Ny;try{let t=this.getCandidates(e),r=[];if(an(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){return new Py(this.referenceResolver,e,t,n,r)}buildMultiReference(e,t,n,r){return new Fy(this.referenceResolver,e,t,n,r)}resolveReference(e,t,n){if(I(e._ref))return e._ref;if(rn(e._nodeDescription))e._ref=this.loadAstNode(e._nodeDescription)??this.createLinkingError({reference:e,container:t,property:n},e._nodeDescription);else if(e._ref===void 0){e._ref=Ny;let r=bn(t).$document,i=this.getLinkedNode({reference:e,container:t,property:n});if(i.error&&r&&r.state<X.ComputedScopes){e._ref=void 0;return}e._ref=i.node??i.error,e._nodeDescription=i.descr,r?.references.push(e)}else e._ref===Ny&&this.throwCyclicReferenceError(t,n,e.$refText);return I(e._ref)?e._ref:void 0}resolveMultiReference(e,t,n){if(Array.isArray(e._items))return e._items;if(e._items===void 0){e._items=Ny;let r=bn(t).$document,i=this.getCandidates({reference:e,container:t,property:n}),a=[];if(an(i))e._linkingError=i;else{for(let e of i){let t=this.loadAstNode(e);t&&a.push({ref:t,$nodeDescription:e})}a.length===0&&(e._linkingError=this.createLinkingError({reference:e,container:t,property:n}))}e._items=a,r?.references.push(e)}else e._items===Ny&&this.throwCyclicReferenceError(t,n,e.$refText);return Array.isArray(e._items)?e._items:[]}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(an(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=bn(e.container).$document;return n&&n.state<X.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 Ly(e){return typeof e.name==`string`}o(Ly,`isNamed`);var Ry=class{static{o(this,`DefaultNameProvider`)}getName(e){if(Ly(e))return e.name}getNameNode(e){return Ji(e.$cstNode,`name`)}},zy=class{static{o(this,`DefaultReferences`)}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=wn(e.Grammar).some(e=>Zn(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Qi(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(tn(r)||nn(r))return xn(r);if(Array.isArray(r)){for(let t of r)if((tn(t)||nn(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return xn(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||oi(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 En(n))if(nn(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}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=>ky.equals(e.sourceUri,t.documentUri))),n.push(...r),L(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=yn(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:li(t),local:!0})}}return n}},By=class{static{o(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return gn.sum(L(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?L(t):pn}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 L(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return L(this.map.keys())}values(){return L(this.map.values()).flat()}entriesGroupedByKey(){return L(this.map.entries())}},Vy=class{static{o(this,`BiMap`)}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&&(this.map.delete(e),this.inverse.delete(t),!0)}},Hy=class{static{o(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=J.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=Sn,r=J.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Y(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=J.CancellationToken.None){let n=e.parseResult.value,r=new By;for(let i of Cn(n))await Y(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))}}},Uy=class{static{o(this,`StreamScope`)}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}},Wy=class{static{o(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new By,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?L(n).concat(this.outerScope.getElements(e)):L(n)}getAllElements(){let e=L(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Gy=class{static{o(this,`DisposableCache`)}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`)}},Ky=class extends Gy{static{o(this,`SimpleCache`)}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}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},qy=class extends Gy{static{o(this,`ContextCache`)}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}}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}},Jy=class extends Ky{static{o(this,`WorkspaceCache`)}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()}))}},Yy=class{static{o(this,`DefaultScopeProvider`)}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 Jy(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=yn(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 Uy(L(e),t,n)}createScopeForNodes(e,t,n){return new Uy(L(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 Wy(this.indexManager.allElements(e)))}};function Xy(e){return typeof e.$comment==`string`}o(Xy,`isAstNodeWithComment`);function Zy(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$refs`in e||`$error`in e)}o(Zy,`isIntermediateReference`);var Qy=class{static{o(this,`DefaultJsonSerializer`)}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=o((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=yn(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(tn(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=yn(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}}return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}if(nn(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=yn(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}}if(I(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}return t}}addAstNodeRegionWithAssignmentsTo(e){let t=o(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);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=qi(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];Zy(o)?i[a]=this.reviveReference(e,r,t,o,n):I(o)&&this.linkNode(o,t,n,e,r,a)}else Zy(i)?e[r]=this.reviveReference(e,r,t,i,n):I(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(I(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);I(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):Dy.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)):Dy.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)}}},$y=class{static{o(this,`DefaultServiceRegistry`)}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=ky.extname(e),r=ky.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 eb(e){return{code:e}}o(eb,`diagnosticData`);var tb;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(tb||={});var nb=class{static{o(this,`ValidationRegistry`)}constructor(e){this.entries=new By,this.knownCategories=new Set(tb.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 vi(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(_y(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=L(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}},rb=Object.freeze({validateNode:!0,validateChildren:!0}),ib=class{static{o(this,`DefaultDocumentValidator`)}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=J.CancellationToken.None){let r=e.parseResult,i=[];if(await Y(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===cb.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===cb.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===cb.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(_y(e))throw e;console.error(`An error occurred during validation:`,e)}return await Y(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:ob(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:sb(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(ci(n.token))e=si(n.token);else if(`previousToken`in n){let t=n.previousToken;if(ci(t)){let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}else{let t={line:0,character:0};e={start:t,end:t}}}if(e){let r={severity:ob(`error`),range:e,message:n.message,data:eb(cb.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:cb.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=J.CancellationToken.None){let r=[],i=o((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);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=J.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Y(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=J.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=wn(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=wn(e).iterator();for(let e of i){await Y(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 rb}async validateAstAfter(e,t,n,r=J.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Y(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:ab(n),severity:ob(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 ab(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Ji(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Xi(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}o(ab,`getDiagnosticRange`);function ob(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)}}o(ob,`toDiagnosticSeverity`);function sb(e){switch(e){case`error`:return eb(cb.LexingError);case`warning`:return eb(cb.LexingWarning);case`info`:return eb(cb.LexingInfo);case`hint`:return eb(cb.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}o(sb,`toDiagnosticData`);var cb;(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`})(cb||={});var lb=class{static{o(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??yn(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,s=o(()=>a??=li(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return s()},selectionSegment:li(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},ub=class{static{o(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=J.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of wn(r))await Y(t),En(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=[];tn(t)&&t.$nodeDescription?n=[t.$nodeDescription]:nn(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=yn(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=li(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:ky.equals(e.documentUri,r)});return a}},db=class{static{o(this,`DefaultAstNodeLocator`)}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)}},fb=d(en(),1),pb=class{static{o(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new vy,this.onConfigurationSectionUpdateEmitter=new fb.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}},mb=d(en(),1),hb;(function(e){function t(e){return{dispose:o(async()=>await e(),`dispose`)}}o(t,`create`),e.create=t})(hb||={});var gb=class{static{o(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new By,this.documentPhaseListeners=new By,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=X.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=J.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===X.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,X.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=X.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=X.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=J.CancellationToken.None){this.currentState=X.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=X.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,X.Changed)}let a=L(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,X.ComputedScopes)),await this.emitUpdate(i,r),await Y(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<X.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 L(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),hb.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case X.Changed:case X.Parsed:this.indexManager.removeContent(e.uri);case X.IndexedContent:e.localSymbols=void 0;case X.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case X.Linked:this.indexManager.removeReferences(e.uri);case X.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case X.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=X.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,X.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,X.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,X.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,X.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,X.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,X.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 Y(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),hb.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),hb.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=J.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(gy):this.currentState>=e&&e>r.state?Promise.reject(new mb.ResponseError(mb.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${X[r.state]}, requiring ${X[e]}, but workspace state is already ${X[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{ky.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(gy)})}):Promise.reject(new mb.ResponseError(mb.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(gy):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(gy)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Y(n),await t(e,n)}catch(e){if(!_y(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 Y(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=L(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},_b=class{static{o(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new qy,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=yn(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{ky.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),L(r)}allElements(e,t){let n=L(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=J.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=J.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}},vb=class{static{o(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new vy,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=J.CancellationToken.None){let n=await this.performStartup(e);await Y(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=o(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);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=L(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 Dy.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=ky.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},yb=class{static{o(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return fs.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return fs.buildUnableToPopLexerModeMessage(e)}},bb={mode:`full`},xb=class{static{o(this,`DefaultLexer`)}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);let n=wb(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new ms(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=bb){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(wb(e))return e;let t=Cb(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function Sb(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}o(Sb,`isTokenTypeArray`);function Cb(e){return e&&`modes`in e&&`defaultMode`in e}o(Cb,`isIMultiModeLexerDefinition`);function wb(e){return!Sb(e)&&!Cb(e)}o(wb,`isTokenTypeDictionary`),Ot();function Tb(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=D.create(0,0);let a=Db(e),o=Ub(r);return Ib({index:0,tokens:Ab({lines:a,position:i,options:o}),position:i})}o(Tb,`parseJSDoc`);function Eb(e,t){let n=Ub(t),r=Db(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)}o(Eb,`isJSDoc`);function Db(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(Mi)}o(Db,`getLines`);var Ob=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,kb=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Ab(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,Fb(s)),Pb(s,c)>=s.length){if(t.length>0){let e=D.create(n,r);t.push({type:`break`,content:``,range:O.create(e,e)})}}else{Ob.lastIndex=c;let e=Ob.exec(s);if(e){let i=e[0],a=e[1],o=D.create(n,r+c),l=D.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:O.create(o,l)}),c+=i.length,c=Pb(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(kb));t.push(...jb(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}o(Ab,`tokenize`);function jb(e,t,n,r){let i=[];if(e.length===0){let e=D.create(n,r),a=D.create(n,r+t.length);i.push({type:`text`,content:t,range:O.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:O.create(D.create(n,a+r),D.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:O.create(D.create(n,a+c+r),D.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:O.create(D.create(n,a+c+r),D.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:O.create(D.create(n,a+c+r),D.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:O.create(D.create(n,a+r),D.create(n,a+r+o.length))})}return i}o(jb,`buildInlineTokens`);var Mb=/\S/,Nb=/\s*$/;function Pb(e,t){let n=e.substring(t).match(Mb);return n?t+n.index:e.length}o(Pb,`skipWhitespace`);function Fb(e){let t=e.match(Nb);if(t&&typeof t.index==`number`)return t.index}o(Fb,`lastCharacter`);function Ib(e){let t=D.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Gb([],O.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=Lb(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 Gb(n,O.create(r,i))}o(Ib,`parseJSDocComment`);function Lb(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return Vb(e,!1);if(n.type===`text`||n.type===`inline-tag`)return zb(e);Rb(n,t),e.index++}o(Lb,`parseJSDocElement`);function Rb(e,t){if(t){let n=new Xb(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}o(Rb,`appendEmptyLine`);function zb(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(Bb(e)),r=t,t=e.tokens[e.index];return new Yb(i,O.create(n.range.start,r.range.end))}o(zb,`parseJSDocText`);function Bb(e){return e.tokens[e.index].type===`inline-tag`?Vb(e,!0):Hb(e)}o(Bb,`parseJSDocInline`);function Vb(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`){if(t){let i=Hb(e);return new Kb(r,new Yb([i],i.range),t,O.create(n.range.start,i.range.end))}{let i=zb(e);return new Kb(r,i,t,O.create(n.range.start,i.range.end))}}{let e=n.range;return new Kb(r,new Yb([],e),t,e)}}o(Vb,`parseJSDocTag`);function Hb(e){let t=e.tokens[e.index++];return new Xb(t.content,t.range)}o(Hb,`parseJSDocLine`);function Ub(e){if(!e)return Ub({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:Wb(t,!0),end:Wb(n,!1),line:Wb(r,!0)}}o(Ub,`normalizeOptions`);function Wb(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?Ri(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}return e}o(Wb,`normalizeOption`);var Gb=class{static{o(this,`JSDocCommentImpl`)}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+=Zb(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+=Zb(t)+r}return t.trim()}},Kb=class{static{o(this,`JSDocTagImpl`)}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}
126
+ For Further details.`,r}o(iv,`buildAmbiguityError`);function av(e){if(e instanceof Ta)return`SUBRULE`;if(e instanceof B)return`OPTION`;if(e instanceof ja)return`OR`;if(e instanceof Oa)return`AT_LEAST_ONE`;if(e instanceof ka)return`AT_LEAST_ONE_SEP`;if(e instanceof Aa)return`MANY_SEP`;if(e instanceof V)return`MANY`;if(e instanceof H)return`CONSUME`;throw Error(`non exhaustive match`)}o(av,`getProductionDslName`);function ov(e,t,n){return{actualToken:n,possibleTokenTypes:T_(a_(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof yg).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}o(ov,`buildAdaptivePredictError`);function sv(e,t){return e.edges[t.tokenTypeIdx]}o(sv,`getExistingTargetState`);function cv(e,t,n){let r=new Gg,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===fg){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=lv(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 Gg;for(let e of r.elements)hv(e,a)}if(i.length>0&&!_v(a))for(let e of i)a.add(e);return a}o(cv,`computeReachSet`);function lv(e,t){if(e instanceof yg&&As(t,e.tokenType))return e.target}o(lv,`getReachableTarget`);function uv(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}o(uv,`getUniqueAlt`);function dv(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}o(dv,`newDFAState`);function fv(e,t,n,r){return r=pv(e,r),t.edges[n.tokenTypeIdx]=r,r}o(fv,`addDFAEdge`);function pv(e,t){if(t===Wg)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}o(pv,`addDFAState`);function mv(e){let t=new Gg,n=e.transitions.length;for(let r=0;r<n;r++)hv({state:e.transitions[r].target,alt:r,stack:[]},t);return t}o(mv,`computeStartState`);function hv(e,t){let n=e.state;if(n.type===fg){if(e.stack.length>0){let n=[...e.stack];hv({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=gv(e,r);a!==void 0&&hv(a,t)}}o(hv,`closure`);function gv(e,t){if(t instanceof bg)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof xg){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}o(gv,`getEpsilonTarget`);function _v(e){for(let t of e.elements)if(t.state.type===fg)return!0;return!1}o(_v,`hasConfigInRuleStopState`);function vv(e){for(let t of e.elements)if(t.state.type!==fg)return!1;return!0}o(vv,`allConfigsInRuleStopStates`);function yv(e){if(vv(e))return!0;let t=bv(e.elements);return xv(t)&&!Sv(t)}o(yv,`hasConflictTerminatingPrediction`);function bv(e){let t=new Map;for(let n of e){let e=Kg(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}o(bv,`getConflictingAltSets`);function xv(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}o(xv,`hasConflictingAltSet`);function Sv(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}o(Sv,`hasStateAssociatedWithOneAlt`);function Cv(e,t){let n;for(let r of e.configs.elements)if(t.is(r.alt)!==!1&&r.state.type!==fg){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}o(Cv,`getBestGuess`);var wv=class{static{o(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new kv(e),this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Ov;return t.grammarSource=e,this.appendChild(this.current,t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=this.createLeafNode(e,!t);return t&&(n.grammarSource=t),this.appendChild(this.current,n),n}createLeafNode(e,t){return new Ev(e.startOffset,e.image.length,e.startLine-1,e.startColumn-1,e.endLine-1,e.endColumn,e.tokenType,t)}appendChild(e,t){t.container=e,e.content.push(t)}appendChildren(e,t){for(let n of t)n.container=e;e.content.length===0?e.content=t.slice():e.content.push(...t)}insertChildren(e,t,n){for(let t of n)t.container=e;e.content.splice(t,0,...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)t.push(this.createLeafNode(n,!0));let n=this.current,r=!1;if(n.content.length>0)this.appendChildren(n,t);else{for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){this.insertChildren(n.container,e,t),r=!0;break}n=n.container}r||this.insertChildren(this.rootNode,0,t)}}construct(e){e.$cstNode=this.current;let t=this.nodeStack.pop();t&&(t.content.length===0?this.removeNode(t):t.content=t.content.slice())}},Tv=class{static{o(this,`AbstractCstNode`)}constructor(){this.container=void 0,this.grammarSource=void 0}get root(){let e=this;for(;e.container;)e=e.container;return e}get text(){return this.root.fullText.substring(this.offset,this.end)}},Ev=class extends Tv{static{o(this,`LeafCstNodeImpl`)}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 astNode(){let e=this.container;if(!e)throw Error(`This node has no associated AST element`);return e.astNode}get range(){return{start:{line:this._startLine,character:this._startColumn},end:{line:this._endLine,character:this._endColumn}}}constructor(e,t,n,r,i,a,o,s=!1){super(),this._hidden=s,this._offset=Dv(e),this._length=Dv(t),this._startLine=Dv(n),this._startColumn=Dv(r),this._endLine=Dv(i),this._endColumn=Dv(a),this._tokenType=o}};function Dv(e){return e|0}o(Dv,`toSmi`);var Ov=class extends Tv{static{o(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=[],this._astNode=void 0,this._rangeCache=void 0}get astNode(){let e=this;for(;e;){if(e._astNode)return e._astNode;e=e.container}throw Error(`This node has no associated AST element`)}set astNode(e){this._astNode=e}get hidden(){return!1}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._rangeCache;if(e===void 0){let t=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(t&&n){let{range:r}=t,{range:i}=n;this._rangeCache=e={start:r.start,end:i.end.line<r.start.line?r.start:i.end}}else return{start:{line:0,character:0},end:{line:0,character:0}}}return e}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]}},kv=class extends Ov{static{o(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},Av=Symbol(`Datatype`);function jv(e){return e.$type===Av}o(jv,`isDataTypeNode`);var Mv=`​`,Nv=o(e=>e.endsWith(Mv)?e:e+Mv,`withRuleSuffix`),Pv=class{static{o(this,`AbstractLangiumParser`)}constructor(e,t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let n=this.lexer.definition,r=e.LanguageMetaData.mode===`production`;this.wrapper=e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?new Vv(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},t,e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):new Bv(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},t)}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()}},Fv=class extends Pv{static{o(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e,!1),this.nodeBuilder=new wv,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;lr(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(Nv(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Er(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){if(lr(e))return ia(e);if(!e.fragment)return ta(e)?Av:ia(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,_n(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 this.linkCstNode(t),t}linkCstNode(e){I(e)&&e.$cstNode&&(e.$cstNode.astNode=e)}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===Av?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=hr(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(jv(o)){let e=r.image;hr(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&ci(e)}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(jv(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);let r=this.nodeBuilder.buildCompositeNode(t);this.nodeBuilder.appendChild(r,n.$cstNode);let i={$type:e};this.stack.push(i),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)):jv(e)?this.converter.convert(e.value,e.$cstNode):(Dn(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=vn(e,Hn);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Zn(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,this.linkCstNode(o),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)}return e.$cstNode=void 0,e}get definitionErrors(){return this.wrapper.definitionErrors}},Iv=class{static{o(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return js.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return js.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return js.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return js.buildEarlyExitMessage(e)}},Lv=class extends Iv{static{o(this,`LangiumParserErrorMessageProvider`)}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}\`.`}},Rv=class extends Pv{static{o(this,`LangiumCompletionParser`)}constructor(e){super(e,!0),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.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(Nv(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}},zv={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new Lv},Bv=class extends zl{static{o(this,`ChevrotainWrapper`)}constructor(e,t,n){let r=t&&`maxLookahead`in t;super(e,{...zv,lookaheadStrategy:r?new $c({maxLookahead:t.maxLookahead}):new J_({logging:t.skipValidations?()=>{}:void 0,incomplete:n}),...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,{})}},Vv=class extends Bv{static{o(this,`ProfilerWrapper`)}constructor(e,t,n,r){super(e,t,n),this.task=r}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 Hv(e,t,n){return Uv({parser:t,tokens:n,ruleNames:new Map},e),t}o(Hv,`createParser`);function Uv(e,t){let n=Ui(t,!1),r=L(t.rules).filter(Er).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,Gv(n,t.definition))}let i=L(t.rules).filter(lr).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,Wv(e,t))}o(Uv,`buildRules`);function Wv(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(Ur(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},s={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,s);let c={$container:s,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:s};s.elements.push(c,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:o(()=>e.parser.consume(n,t,c),`ALT`)})),d;return t=>{d??=ry(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}o(Wv,`buildInfixRule`);function Gv(e,t,n=!1){let r;if(hr(t))r=ty(e,t);else if(In(t))r=Kv(e,t);else if(Hn(t))r=Gv(e,t.terminal);else if(Zn(t))r=ey(e,t);else if(Nr(t))r=qv(e,t);else if(Rn(t))r=Xv(e,t);else if(Qr(t))r=Zv(e,t);else if(ar(t))r=Qv(e,t);else if(tr(t)){let n=e.consume++;r=o(()=>e.parser.consume(n,Os,t),`method`)}else throw new _i(t.$cstNode,`Unexpected element type: ${t.$type}`);return ny(e,n?void 0:$v(t),r,t.cardinality)}o(Gv,`buildElement`);function Kv(e,t){let n=ia(t);return()=>e.parser.action(n,t)}o(Kv,`buildAction`);function qv(e,t){let n=t.rule.ref;if(Mn(n)){let r=e.subrule++,i=Er(n)&&n.fragment,a=t.arguments.length>0?Jv(n,t.arguments):()=>({}),o;return s=>{o??=ry(e,n),e.parser.subrule(r,o,i,t,a(s))}}if(Ur(n)){let r=e.consume++,i=ay(e,n.name);return()=>e.parser.consume(r,i,t)}if(n)vi(n);else throw new _i(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}o(qv,`buildRuleCall`);function Jv(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Yv(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{let n=t.map(e=>Yv(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}}}o(Jv,`buildRuleCallPredicate`);function Yv(e){if($n(e)){let t=Yv(e.left),n=Yv(e.right);return e=>t(e)||n(e)}if(Yn(e)){let t=Yv(e.left),n=Yv(e.right);return e=>t(e)&&n(e)}if(br(e)){let t=Yv(e.value);return e=>!t(e)}if(wr(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}if(Wn(e)){let t=!!e.true;return()=>t}vi(e)}o(Yv,`buildPredicate`);function Xv(e,t){if(t.elements.length===1)return Gv(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:Gv(e,r,!0)},i=$v(r);i&&(t.GATE=Yv(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:o(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}o(Xv,`buildAlternatives`);function Zv(e,t){if(t.elements.length===1)return Gv(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:Gv(e,r,!0)},i=$v(r);i&&(t.GATE=Yv(i)),n.push(t)}let r=e.or++,i=o((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=o(t=>e.parser.alternatives(r,n.map((n,a)=>{let s={ALT:o(()=>!0,`ALT`)},c=e.parser;s.ALT=()=>{if(n.ALT(t),!c.isRecording()){let e=i(r,c);c.unorderedGroups.get(e)||c.unorderedGroups.set(e,[]);let t=c.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return s.GATE=l?()=>l(t):()=>!c.unorderedGroups.get(i(r,c))?.[a],s})),`alternatives`),s=ny(e,$v(t),a,`*`);return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}o(Zv,`buildUnorderedGroup`);function Qv(e,t){let n=t.elements.map(t=>Gv(e,t));return e=>n.forEach(t=>t(e))}o(Qv,`buildGroup`);function $v(e){if(ar(e))return e.guardCondition}o($v,`getGuardCondition`);function ey(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=$i(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+ia(t.type.ref));return ey(e,t,n)}if(Nr(n)&&Er(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=ry(e,r),e.parser.subrule(i,a,!1,t,n)}}if(Nr(n)&&Ur(n.rule.ref)){let r=e.consume++,i=ay(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(hr(n)){let r=e.consume++,i=ay(e,n.value);return()=>e.parser.consume(r,i,t)}throw Error(`Could not build cross reference parser`)}o(ey,`buildCrossReference`);function ty(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)}o(ty,`buildKeyword`);function ny(e,t,n,r){let i=t&&Yv(t);if(!r){if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:o(()=>n(r),`ALT`),GATE:o(()=>i(r),`GATE`)},{ALT:Ll(),GATE:o(()=>!i(r),`GATE`)}])}return n}if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:o(()=>e.parser.atLeastOne(t,{DEF:o(()=>n(a),`DEF`)}),`ALT`),GATE:o(()=>i(a),`GATE`)},{ALT:Ll(),GATE:o(()=>!i(a),`GATE`)}])}return r=>e.parser.atLeastOne(t,{DEF:o(()=>n(r),`DEF`)})}if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}vi(r)}o(ny,`wrap`);function ry(e,t){let n=iy(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}o(ry,`getRule`);function iy(e,t){if(Mn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Er(r);)(ar(r)||Rn(r)||Qr(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}o(iy,`getRuleName`);function ay(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}o(ay,`getToken`);function oy(e){let t=e.Grammar,n=e.parser.Lexer,r=new Rv(e);return Hv(t,r,n.definition),r.finalize(),r}o(oy,`createCompletionParser`);function sy(e){let t=cy(e);return t.finalize(),t}o(sy,`createLangiumParser`);function cy(e){let t=e.Grammar,n=e.parser.Lexer;return Hv(t,new Fv(e),n.definition)}o(cy,`prepareLangiumParser`);var ly=class{static{o(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=L(Ui(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(Ur).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=sa(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=Li(t)?ms.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(Mn).flatMap(e=>Cn(e).filter(hr)).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(Ri(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&zi(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},uy=class{static{o(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(Zn(n)&&(n=Gi(n)),Nr(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 dy.convertInt(t);case`STRING`:return dy.convertString(t);case`ID`:return dy.convertID(t)}switch(oa(e)?.toLowerCase()){case`number`:return dy.convertNumber(t);case`boolean`:return dy.convertBoolean(t);case`bigint`:return dy.convertBigint(t);case`date`:return dy.convertDate(t);default:return t}}},dy;(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}o(t,`convertString`),e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
127
+ `;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}o(n,`convertEscapeCharacter`);function r(e){return e.charAt(0)===`^`?e.substring(1):e}o(r,`convertID`),e.convertID=r;function i(e){return parseInt(e)}o(i,`convertInt`),e.convertInt=i;function a(e){return BigInt(e)}o(a,`convertBigint`),e.convertBigint=a;function s(e){return new Date(e)}o(s,`convertDate`),e.convertDate=s;function c(e){return Number(e)}o(c,`convertNumber`),e.convertNumber=c;function l(e){return e.toLowerCase()===`true`}o(l,`convertBoolean`),e.convertBoolean=l})(dy||={});var J=d(en(),1);function fy(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}o(fy,`delayNextTick`);var py=0,my=10;function hy(){return py=performance.now(),new J.CancellationTokenSource}o(hy,`startCancelableOperation`);var gy=Symbol(`OperationCancelled`);function _y(e){return e===gy}o(_y,`isOperationCancelled`);async function Y(e){if(e===J.CancellationToken.None)return;let t=performance.now();if(t-py>=my&&(py=t,await fy(),py=performance.now()),e.isCancellationRequested)throw gy}o(Y,`interruptAndCheck`);var vy=class{static{o(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},yy=class e{static{o(this,`FullTextDocument`)}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=wy(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=Sy(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=Sy(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)}getLineRange(e){let t=this.getLineOffsets();if(e>=t.length){let e=t.length-1;return{start:{line:e,character:0},end:{line:e,character:this._content.length-t[e]}}}if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let n=t[e],r=e+1<t.length?t[e+1]:this._content.length,i=this.ensureBeforeEOL(r,n);return{start:{line:e,character:0},end:{line:e,character:i-n}}}getEOLCharacters(e){let t=this.getLineOffsets();if(e>=t.length||e<0)return``;let n=e+1<t.length?t[e+1]:this._content.length,r=this.ensureBeforeEOL(n,t[e]);return this._content.substring(r,n)}ensureBeforeEOL(e,t){for(;e>t&&Cy(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}},by;(function(e){function t(e,t,n,r){return new yy(e,t,n,r)}o(t,`create`),e.create=t;function n(e,t,n){if(e instanceof yy)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}o(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=xy(t.map(Ty),(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(``)}o(r,`applyEdits`),e.applyEdits=r})(by||={});function xy(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);xy(r,t),xy(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}o(xy,`mergeSort`);function Sy(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Cy(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}o(Sy,`computeLineOffsets`);function Cy(e){return e===13||e===10}o(Cy,`isEOL`);function wy(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}o(wy,`getWellformedRange`);function Ty(e){let t=wy(e.range);return t===e.range?e:{newText:e.newText,range:t}}o(Ty,`getWellformedEdit`);var Ey;(()=>{"use strict";var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}o(t,`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}o(n,`r`);var r={resolve:o(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:`.`},`resolve`),normalize:o(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},`normalize`),isAbsolute:o(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:o(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)},`join`),relative:o(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))},`relative`),_makeLong:o(function(e){return e},`_makeLong`),dirname:o(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)},`dirname`),basename:o(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)},`basename`),extname:o(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)},`extname`),format:o(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)},`format`),parse:o(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},`parse`),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}o(n,`r`),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:o(()=>d,`URI`),Utils:o(()=>C,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function l(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(!s.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(c.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}o(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{o(this,`l`)}static isUri(e){return e instanceof d||!!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||``,l(this,a))}get fsPath(){return _(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 p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,ee(n[4]||``),ee(n[5]||``),ee(n[7]||``),ee(n[9]||``),t):new p(``,``,``,``,``)}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 p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{o(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),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 m={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 h(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=m[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}o(h,`m`);function g(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+=m[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}o(g,`y`);function _(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}o(_,`v`);function v(e,t){let n=t?g:h,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:h(c,!1,!1)),r}o(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}o(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ee(e){return e.match(b)?e.replace(b,(e=>y(e))):e}o(ee,`w`);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||={}),Ey=r})();var{URI:Dy,Utils:Oy}=Ey,ky;(function(e){e.basename=Oy.basename,e.dirname=Oy.dirname,e.extname=Oy.extname,e.joinPath=Oy.joinPath,e.resolvePath=Oy.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}o(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?Dy.parse(e).path:e.path,i=typeof n==`string`?Dy.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(`/`)}o(r,`relative`),e.relative=r;function i(e){return Dy.parse(e.toString()).toString()}o(i,`normalize`),e.normalize=i;function a(e,t){let n=typeof e==`string`?Dy.parse(e):e,r=typeof t==`string`?Dy.parse(t):t;if(n.scheme!==r.scheme)return!1;let i=n.path,a=r.path;return a.charAt(a.length-1)===`/`&&(a=a.slice(0,-1)),i.charAt(i.length-1)===`/`&&(i=i.slice(0,-1)),a===i?!0:a.length<i.length||a.charAt(i.length)!==`/`?!1:a.startsWith(i)}o(a,`contains`),e.contains=a})(ky||={});var Ay=class{static{o(this,`UriTrie`)}constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return ky.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:ky.joinPath(Dy.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:ky.joinPath(Dy.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(this.normalizeUri(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}},X;(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`})(X||={});var jy=class{static{o(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=J.CancellationToken.None){let n=await this.getInitialText(e,t);return this.createAsync(e,n,t)}async getInitialText(e,t){return this.fileSystemProvider.readFile(e)}fromTextDocument(e,t,n){return t??=Dy.parse(e.uri),J.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return J.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)}if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{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)}{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:X.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:X.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=await this.getUpdatedText(e,r,t);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=X.Parsed,e}async getUpdatedText(e,t,n){return t?t.getText():await this.fileSystemProvider.readFile(e.uri)}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??=by.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},My=class{static{o(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new Ay,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return L(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,X.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=X.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=X.Changed;return this.documentTrie.delete(t),n}},Ny=Symbol(`RefResolving`),Py=class{static{o(this,`DefaultReferenceImpl`)}constructor(e,t,n,r,i){this.resolver=e,this.node=t,this.property=n,this._ref=void 0,this.$refNode=r,this.$refText=i}get ref(){return this.resolver.resolveReference(this,this.node,this.property)}get $nodeDescription(){return this._nodeDescription}get error(){return an(this._ref)?this._ref:void 0}},Fy=class{static{o(this,`DefaultMultiReferenceImpl`)}constructor(e,t,n,r,i){this.resolver=e,this.node=t,this.property=n,this._items=void 0,this.$refNode=r,this.$refText=i}get items(){return this.resolver.resolveMultiReference(this,this.node,this.property)}get error(){return this._linkingError}},Iy=class{static{o(this,`DefaultLinker`)}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,this.referenceResolver={resolveReference:this.resolveReference.bind(this),resolveMultiReference:this.resolveMultiReference.bind(this)}}async link(e,t=J.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of wn(e.parseResult.value))await Y(t),En(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 wn(e.parseResult.value))await Y(t),En(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=Ny;try{let t=this.getCandidate(e);an(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=Ny;try{let t=this.getCandidates(e),r=[];if(an(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){return new Py(this.referenceResolver,e,t,n,r)}buildMultiReference(e,t,n,r){return new Fy(this.referenceResolver,e,t,n,r)}resolveReference(e,t,n){if(I(e._ref))return e._ref;if(rn(e._nodeDescription))e._ref=this.loadAstNode(e._nodeDescription)??this.createLinkingError({reference:e,container:t,property:n},e._nodeDescription);else if(e._ref===void 0){e._ref=Ny;let r=bn(t).$document,i=this.getLinkedNode({reference:e,container:t,property:n});if(i.error&&r&&r.state<X.ComputedScopes){e._ref=void 0;return}e._ref=i.node??i.error,e._nodeDescription=i.descr,r?.references.push(e)}else e._ref===Ny&&this.throwCyclicReferenceError(t,n,e.$refText);return I(e._ref)?e._ref:void 0}resolveMultiReference(e,t,n){if(Array.isArray(e._items))return e._items;if(e._items===void 0){e._items=Ny;let r=bn(t).$document,i=this.getCandidates({reference:e,container:t,property:n}),a=[];if(an(i))e._linkingError=i;else{for(let e of i){let t=this.loadAstNode(e);t&&a.push({ref:t,$nodeDescription:e})}a.length===0&&(e._linkingError=this.createLinkingError({reference:e,container:t,property:n}))}e._items=a,r?.references.push(e)}else e._items===Ny&&this.throwCyclicReferenceError(t,n,e.$refText);return Array.isArray(e._items)?e._items:[]}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(an(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=bn(e.container).$document;return n&&n.state<X.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 Ly(e){return typeof e.name==`string`}o(Ly,`isNamed`);var Ry=class{static{o(this,`DefaultNameProvider`)}getName(e){if(Ly(e))return e.name}getNameNode(e){return Ji(e.$cstNode,`name`)}},zy=class{static{o(this,`DefaultReferences`)}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=wn(e.Grammar).some(e=>Zn(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Qi(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(tn(r)||nn(r))return xn(r);if(Array.isArray(r)){for(let t of r)if((tn(t)||nn(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return xn(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||oi(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 En(n))if(nn(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}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=>ky.equals(e.sourceUri,t.documentUri))),n.push(...r),L(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=yn(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:li(t),local:!0})}}return n}},By=class{static{o(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return gn.sum(L(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?L(t):pn}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 L(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return L(this.map.keys())}values(){return L(this.map.values()).flat()}entriesGroupedByKey(){return L(this.map.entries())}},Vy=class{static{o(this,`BiMap`)}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&&(this.map.delete(e),this.inverse.delete(t),!0)}},Hy=class{static{o(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=J.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=Sn,r=J.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Y(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=J.CancellationToken.None){let n=e.parseResult.value,r=new By;for(let i of Cn(n))await Y(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))}}},Uy=class{static{o(this,`StreamScope`)}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}},Wy=class{static{o(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new By,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?L(n).concat(this.outerScope.getElements(e)):L(n)}getAllElements(){let e=L(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Gy=class{static{o(this,`DisposableCache`)}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`)}},Ky=class extends Gy{static{o(this,`SimpleCache`)}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}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},qy=class extends Gy{static{o(this,`ContextCache`)}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}}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}},Jy=class extends Ky{static{o(this,`WorkspaceCache`)}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()}))}},Yy=class{static{o(this,`DefaultScopeProvider`)}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 Jy(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=yn(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 Uy(L(e),t,n)}createScopeForNodes(e,t,n){return new Uy(L(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 Wy(this.indexManager.allElements(e)))}};function Xy(e){return typeof e.$comment==`string`}o(Xy,`isAstNodeWithComment`);function Zy(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$refs`in e||`$error`in e)}o(Zy,`isIntermediateReference`);var Qy=class{static{o(this,`DefaultJsonSerializer`)}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=o((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=yn(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(tn(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=yn(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}}return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}if(nn(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=yn(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}}if(I(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}return t}}addAstNodeRegionWithAssignmentsTo(e){let t=o(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);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=qi(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];Zy(o)?i[a]=this.reviveReference(e,r,t,o,n):I(o)&&this.linkNode(o,t,n,e,r,a)}else Zy(i)?e[r]=this.reviveReference(e,r,t,i,n):I(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(I(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);I(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):Dy.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)):Dy.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)}}},$y=class{static{o(this,`DefaultServiceRegistry`)}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=ky.extname(e),r=ky.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 eb(e){return{code:e}}o(eb,`diagnosticData`);var tb;(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(tb||={});var nb=class{static{o(this,`ValidationRegistry`)}constructor(e){this.entries=new By,this.knownCategories=new Set(tb.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 vi(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(_y(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);else for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=L(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}},rb=Object.freeze({validateNode:!0,validateChildren:!0}),ib=class{static{o(this,`DefaultDocumentValidator`)}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=J.CancellationToken.None){let r=e.parseResult,i=[];if(await Y(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===cb.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===cb.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===cb.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(_y(e))throw e;console.error(`An error occurred during validation:`,e)}return await Y(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:ob(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:sb(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(ci(n.token))e=si(n.token);else if(`previousToken`in n){let t=n.previousToken;if(ci(t)){let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}else{let t={line:0,character:0};e={start:t,end:t}}}if(e){let r={severity:ob(`error`),range:e,message:n.message,data:eb(cb.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:cb.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=J.CancellationToken.None){let r=[],i=o((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);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=J.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Y(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=J.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=wn(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=wn(e).iterator();for(let e of i){await Y(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 rb}async validateAstAfter(e,t,n,r=J.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Y(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:ab(n),severity:ob(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 ab(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=Ji(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Xi(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}o(ab,`getDiagnosticRange`);function ob(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)}}o(ob,`toDiagnosticSeverity`);function sb(e){switch(e){case`error`:return eb(cb.LexingError);case`warning`:return eb(cb.LexingWarning);case`info`:return eb(cb.LexingInfo);case`hint`:return eb(cb.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}o(sb,`toDiagnosticData`);var cb;(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`})(cb||={});var lb=class{static{o(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??yn(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,s=o(()=>a??=li(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return s()},selectionSegment:li(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},ub=class{static{o(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=J.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of wn(r))await Y(t),En(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=[];tn(t)&&t.$nodeDescription?n=[t.$nodeDescription]:nn(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=yn(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=li(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:ky.equals(e.documentUri,r)});return a}},db=class{static{o(this,`DefaultAstNodeLocator`)}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)}},fb=d(en(),1),pb=class{static{o(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new vy,this.onConfigurationSectionUpdateEmitter=new fb.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}},mb=d(en(),1),hb;(function(e){function t(e){return{dispose:o(async()=>await e(),`dispose`)}}o(t,`create`),e.create=t})(hb||={});var gb=class{static{o(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new By,this.documentPhaseListeners=new By,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=X.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=J.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===X.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,X.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=X.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=X.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=J.CancellationToken.None){this.currentState=X.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=X.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,X.Changed)}let a=L(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,X.ComputedScopes)),await this.emitUpdate(i,r),await Y(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<X.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 L(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),hb.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case X.Changed:case X.Parsed:this.indexManager.removeContent(e.uri);case X.IndexedContent:e.localSymbols=void 0;case X.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case X.Linked:this.indexManager.removeReferences(e.uri);case X.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case X.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=X.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,X.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,X.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,X.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,X.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,X.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,X.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 Y(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),hb.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),hb.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=J.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(gy):this.currentState>=e&&e>r.state?Promise.reject(new mb.ResponseError(mb.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${X[r.state]}, requiring ${X[e]}, but workspace state is already ${X[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{ky.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(gy)})}):Promise.reject(new mb.ResponseError(mb.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(gy):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(gy)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Y(n),await t(e,n)}catch(e){if(!_y(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 Y(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=L(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},_b=class{static{o(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new qy,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=yn(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{ky.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),L(r)}allElements(e,t){let n=L(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=J.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=J.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}},vb=class{static{o(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new vy,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=J.CancellationToken.None){let n=await this.performStartup(e);await Y(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=o(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);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=L(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 Dy.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=ky.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},yb=class{static{o(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return fs.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return fs.buildUnableToPopLexerModeMessage(e)}},bb={mode:`full`},xb=class{static{o(this,`DefaultLexer`)}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);let n=wb(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new ms(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=bb){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(wb(e))return e;let t=Cb(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function Sb(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}o(Sb,`isTokenTypeArray`);function Cb(e){return e&&`modes`in e&&`defaultMode`in e}o(Cb,`isIMultiModeLexerDefinition`);function wb(e){return!Sb(e)&&!Cb(e)}o(wb,`isTokenTypeDictionary`),Ot();function Tb(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=D.create(0,0);let a=Db(e),o=Ub(r);return Ib({index:0,tokens:Ab({lines:a,position:i,options:o}),position:i})}o(Tb,`parseJSDoc`);function Eb(e,t){let n=Ub(t),r=Db(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)}o(Eb,`isJSDoc`);function Db(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(Mi)}o(Db,`getLines`);var Ob=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,kb=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Ab(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,Fb(s)),Pb(s,c)>=s.length){if(t.length>0){let e=D.create(n,r);t.push({type:`break`,content:``,range:O.create(e,e)})}}else{Ob.lastIndex=c;let e=Ob.exec(s);if(e){let i=e[0],a=e[1],o=D.create(n,r+c),l=D.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:O.create(o,l)}),c+=i.length,c=Pb(s,c)}if(c<s.length){let e=s.substring(c),i=Array.from(e.matchAll(kb));t.push(...jb(i,e,n,r+c))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}o(Ab,`tokenize`);function jb(e,t,n,r){let i=[];if(e.length===0){let e=D.create(n,r),a=D.create(n,r+t.length);i.push({type:`text`,content:t,range:O.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:O.create(D.create(n,a+r),D.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:O.create(D.create(n,a+c+r),D.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:O.create(D.create(n,a+c+r),D.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:O.create(D.create(n,a+c+r),D.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:O.create(D.create(n,a+r),D.create(n,a+r+o.length))})}return i}o(jb,`buildInlineTokens`);var Mb=/\S/,Nb=/\s*$/;function Pb(e,t){let n=e.substring(t).match(Mb);return n?t+n.index:e.length}o(Pb,`skipWhitespace`);function Fb(e){let t=e.match(Nb);if(t&&typeof t.index==`number`)return t.index}o(Fb,`lastCharacter`);function Ib(e){let t=D.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Gb([],O.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=Lb(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 Gb(n,O.create(r,i))}o(Ib,`parseJSDocComment`);function Lb(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return Vb(e,!1);if(n.type===`text`||n.type===`inline-tag`)return zb(e);Rb(n,t),e.index++}o(Lb,`parseJSDocElement`);function Rb(e,t){if(t){let n=new Xb(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}o(Rb,`appendEmptyLine`);function zb(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(Bb(e)),r=t,t=e.tokens[e.index];return new Yb(i,O.create(n.range.start,r.range.end))}o(zb,`parseJSDocText`);function Bb(e){return e.tokens[e.index].type===`inline-tag`?Vb(e,!0):Hb(e)}o(Bb,`parseJSDocInline`);function Vb(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`){if(t){let i=Hb(e);return new Kb(r,new Yb([i],i.range),t,O.create(n.range.start,i.range.end))}{let i=zb(e);return new Kb(r,i,t,O.create(n.range.start,i.range.end))}}{let e=n.range;return new Kb(r,new Yb([],e),t,e)}}o(Vb,`parseJSDocTag`);function Hb(e){let t=e.tokens[e.index++];return new Xb(t.content,t.range)}o(Hb,`parseJSDocLine`);function Ub(e){if(!e)return Ub({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:Wb(t,!0),end:Wb(n,!1),line:Wb(r,!0)}}o(Ub,`normalizeOptions`);function Wb(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?Ri(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}return e}o(Wb,`normalizeOption`);var Gb=class{static{o(this,`JSDocCommentImpl`)}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+=Zb(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+=Zb(t)+r}return t.trim()}},Kb=class{static{o(this,`JSDocTagImpl`)}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}
128
128
  ${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=qb(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} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}
129
129
  ${t}`),this.inline?`{${r}}`:r}};function qb(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=Pb(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)??Jb(t,i)}}o(qb,`renderInlineTag`);function Jb(e,t){try{return Dy.parse(e,!0),`[${t}](${e})`}catch{return e}}o(Jb,`renderLinkDefault`);var Yb=class{static{o(this,`JSDocTextImpl`)}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+=`
130
130
  `)}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+=`