agent-whiteboard 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/CHANGELOG.md +470 -0
  2. package/LICENSE +21 -0
  3. package/README.md +313 -0
  4. package/bin/cli.js +30 -0
  5. package/dist/client/apple-touch-icon.png +0 -0
  6. package/dist/client/assets/KaTeX_AMS-Regular-0cdd387c.woff2 +0 -0
  7. package/dist/client/assets/KaTeX_AMS-Regular-30da91e8.woff +0 -0
  8. package/dist/client/assets/KaTeX_AMS-Regular-68534840.ttf +0 -0
  9. package/dist/client/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf +0 -0
  10. package/dist/client/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff +0 -0
  11. package/dist/client/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 +0 -0
  12. package/dist/client/assets/KaTeX_Caligraphic-Regular-3398dd02.woff +0 -0
  13. package/dist/client/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 +0 -0
  14. package/dist/client/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf +0 -0
  15. package/dist/client/assets/KaTeX_Fraktur-Bold-74444efd.woff2 +0 -0
  16. package/dist/client/assets/KaTeX_Fraktur-Bold-9163df9c.ttf +0 -0
  17. package/dist/client/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff +0 -0
  18. package/dist/client/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf +0 -0
  19. package/dist/client/assets/KaTeX_Fraktur-Regular-51814d27.woff2 +0 -0
  20. package/dist/client/assets/KaTeX_Fraktur-Regular-5e28753b.woff +0 -0
  21. package/dist/client/assets/KaTeX_Main-Bold-0f60d1b8.woff2 +0 -0
  22. package/dist/client/assets/KaTeX_Main-Bold-138ac28d.ttf +0 -0
  23. package/dist/client/assets/KaTeX_Main-Bold-c76c5d69.woff +0 -0
  24. package/dist/client/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf +0 -0
  25. package/dist/client/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 +0 -0
  26. package/dist/client/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff +0 -0
  27. package/dist/client/assets/KaTeX_Main-Italic-0d85ae7c.ttf +0 -0
  28. package/dist/client/assets/KaTeX_Main-Italic-97479ca6.woff2 +0 -0
  29. package/dist/client/assets/KaTeX_Main-Italic-f1d6ef86.woff +0 -0
  30. package/dist/client/assets/KaTeX_Main-Regular-c2342cd8.woff2 +0 -0
  31. package/dist/client/assets/KaTeX_Main-Regular-c6368d87.woff +0 -0
  32. package/dist/client/assets/KaTeX_Main-Regular-d0332f52.ttf +0 -0
  33. package/dist/client/assets/KaTeX_Math-BoldItalic-850c0af5.woff +0 -0
  34. package/dist/client/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 +0 -0
  35. package/dist/client/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf +0 -0
  36. package/dist/client/assets/KaTeX_Math-Italic-08ce98e5.ttf +0 -0
  37. package/dist/client/assets/KaTeX_Math-Italic-7af58c5e.woff2 +0 -0
  38. package/dist/client/assets/KaTeX_Math-Italic-8a8d2445.woff +0 -0
  39. package/dist/client/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf +0 -0
  40. package/dist/client/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 +0 -0
  41. package/dist/client/assets/KaTeX_SansSerif-Bold-ece03cfd.woff +0 -0
  42. package/dist/client/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 +0 -0
  43. package/dist/client/assets/KaTeX_SansSerif-Italic-3931dd81.ttf +0 -0
  44. package/dist/client/assets/KaTeX_SansSerif-Italic-91ee6750.woff +0 -0
  45. package/dist/client/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff +0 -0
  46. package/dist/client/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 +0 -0
  47. package/dist/client/assets/KaTeX_SansSerif-Regular-f36ea897.ttf +0 -0
  48. package/dist/client/assets/KaTeX_Script-Regular-036d4e95.woff2 +0 -0
  49. package/dist/client/assets/KaTeX_Script-Regular-1c67f068.ttf +0 -0
  50. package/dist/client/assets/KaTeX_Script-Regular-d96cdf2b.woff +0 -0
  51. package/dist/client/assets/KaTeX_Size1-Regular-6b47c401.woff2 +0 -0
  52. package/dist/client/assets/KaTeX_Size1-Regular-95b6d2f1.ttf +0 -0
  53. package/dist/client/assets/KaTeX_Size1-Regular-c943cc98.woff +0 -0
  54. package/dist/client/assets/KaTeX_Size2-Regular-2014c523.woff +0 -0
  55. package/dist/client/assets/KaTeX_Size2-Regular-a6b2099f.ttf +0 -0
  56. package/dist/client/assets/KaTeX_Size2-Regular-d04c5421.woff2 +0 -0
  57. package/dist/client/assets/KaTeX_Size3-Regular-500e04d5.ttf +0 -0
  58. package/dist/client/assets/KaTeX_Size3-Regular-6ab6b62e.woff +0 -0
  59. package/dist/client/assets/KaTeX_Size4-Regular-99f9c675.woff +0 -0
  60. package/dist/client/assets/KaTeX_Size4-Regular-a4af7d41.woff2 +0 -0
  61. package/dist/client/assets/KaTeX_Size4-Regular-c647367d.ttf +0 -0
  62. package/dist/client/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 +0 -0
  63. package/dist/client/assets/KaTeX_Typewriter-Regular-e14fed02.woff +0 -0
  64. package/dist/client/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf +0 -0
  65. package/dist/client/assets/arc-4691b008.js +1 -0
  66. package/dist/client/assets/architecture-7EHR7CIX-e08620e8.js +1 -0
  67. package/dist/client/assets/architectureDiagram-3BPJPVTR-9e2f2dbd.js +36 -0
  68. package/dist/client/assets/blockDiagram-GPEHLZMM-d9dd3f7a.js +132 -0
  69. package/dist/client/assets/bootstrap.min-21652813.js +6 -0
  70. package/dist/client/assets/c4Diagram-AAUBKEIU-4ed97d79.js +10 -0
  71. package/dist/client/assets/channel-9d07a35d.js +1 -0
  72. package/dist/client/assets/chunk-2J33WTMH-8049adc8.js +1 -0
  73. package/dist/client/assets/chunk-4BX2VUAB-fd7396be.js +1 -0
  74. package/dist/client/assets/chunk-55IACEB6-ae1ac93c.js +1 -0
  75. package/dist/client/assets/chunk-727SXJPM-7e3658d9.js +206 -0
  76. package/dist/client/assets/chunk-AQP2D5EJ-114f64b0.js +231 -0
  77. package/dist/client/assets/chunk-FMBD7UC4-f2647c5e.js +15 -0
  78. package/dist/client/assets/chunk-ND2GUHAM-0a2fcd8c.js +1 -0
  79. package/dist/client/assets/chunk-QZHKN3VN-d00b3f33.js +1 -0
  80. package/dist/client/assets/classDiagram-4FO5ZUOK-ebb5cc4a.js +1 -0
  81. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-ebb5cc4a.js +1 -0
  82. package/dist/client/assets/colors-98f238a0.js +1 -0
  83. package/dist/client/assets/cose-bilkent-S5V4N54A-1f808fd7.js +1 -0
  84. package/dist/client/assets/cytoscape.esm-1491e259.js +331 -0
  85. package/dist/client/assets/dagre-BM42HDAG-e8ec1c9d.js +4 -0
  86. package/dist/client/assets/defaultLocale-a8476f12.js +1 -0
  87. package/dist/client/assets/diagram-2AECGRRQ-83b385bf.js +43 -0
  88. package/dist/client/assets/diagram-5GNKFQAL-d9406c6a.js +10 -0
  89. package/dist/client/assets/diagram-KO2AKTUF-3db5b95a.js +3 -0
  90. package/dist/client/assets/diagram-LMA3HP47-fbd90397.js +24 -0
  91. package/dist/client/assets/diagram-OG6HWLK6-3c697534.js +24 -0
  92. package/dist/client/assets/embed-2b4adf34.js +201 -0
  93. package/dist/client/assets/erDiagram-TEJ5UH35-7f41448f.js +85 -0
  94. package/dist/client/assets/eventmodeling-FCH6USID-e6d9019e.js +1 -0
  95. package/dist/client/assets/flowDiagram-I6XJVG4X-38f05cc7.js +162 -0
  96. package/dist/client/assets/ganttDiagram-6RSMTGT7-39287f5a.js +292 -0
  97. package/dist/client/assets/gitGraph-WXDBUCRP-037e225a.js +1 -0
  98. package/dist/client/assets/gitGraphDiagram-PVQCEYII-3c2e3ef7.js +106 -0
  99. package/dist/client/assets/graph-f3dfaf53.js +1 -0
  100. package/dist/client/assets/index-4abf3da0.js +5 -0
  101. package/dist/client/assets/index-a1656aec.js +1 -0
  102. package/dist/client/assets/index-d674a6a4.css +1 -0
  103. package/dist/client/assets/info-J43DQDTF-51cd3390.js +1 -0
  104. package/dist/client/assets/infoDiagram-5YYISTIA-ef2826b7.js +2 -0
  105. package/dist/client/assets/init-a5b10ee5.js +1 -0
  106. package/dist/client/assets/ishikawaDiagram-YF4QCWOH-d0b8a2e0.js +70 -0
  107. package/dist/client/assets/journeyDiagram-JHISSGLW-586ffcf8.js +139 -0
  108. package/dist/client/assets/kanban-definition-UN3LZRKU-9e58e14f.js +89 -0
  109. package/dist/client/assets/katex-0cba7652.js +257 -0
  110. package/dist/client/assets/katex-4c9ea27f.js +257 -0
  111. package/dist/client/assets/layout-3a4eff80.js +1 -0
  112. package/dist/client/assets/linear-fed00341.js +1 -0
  113. package/dist/client/assets/mermaid-parser.core-7ee09942.js +173 -0
  114. package/dist/client/assets/mermaid.core-9fc8f6d2.js +306 -0
  115. package/dist/client/assets/mindmap-definition-RKZ34NQL-a40dd09f.js +96 -0
  116. package/dist/client/assets/ordinal-db88ae6f.js +1 -0
  117. package/dist/client/assets/packet-YPE3B663-f55b568a.js +1 -0
  118. package/dist/client/assets/pie-LRSECV5Y-88c1a5e6.js +1 -0
  119. package/dist/client/assets/pieDiagram-4H26LBE5-51aae5ea.js +30 -0
  120. package/dist/client/assets/quadrantDiagram-W4KKPZXB-bc4686f9.js +7 -0
  121. package/dist/client/assets/radar-GUYGQ44K-6ede145d.js +1 -0
  122. package/dist/client/assets/range-6bc2a9a0.js +1 -0
  123. package/dist/client/assets/requirementDiagram-4Y6WPE33-8466f5a1.js +84 -0
  124. package/dist/client/assets/sankeyDiagram-5OEKKPKP-fd54c1f6.js +40 -0
  125. package/dist/client/assets/sequenceDiagram-3UESZ5HK-baa63c66.js +162 -0
  126. package/dist/client/assets/stateDiagram-AJRCARHV-bb4f0d0b.js +1 -0
  127. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-9479cd12.js +1 -0
  128. package/dist/client/assets/step-171ad54a.js +1 -0
  129. package/dist/client/assets/time-043b3464.js +1 -0
  130. package/dist/client/assets/timeline-definition-PNZ67QCA-f64b58bd.js +120 -0
  131. package/dist/client/assets/treeView-BLDUP644-73ba1a83.js +1 -0
  132. package/dist/client/assets/treemap-LRROVOQU-98e47821.js +1 -0
  133. package/dist/client/assets/vennDiagram-CIIHVFJN-a410b1f7.js +34 -0
  134. package/dist/client/assets/wardley-L42UT6IY-a27badb9.js +1 -0
  135. package/dist/client/assets/wardleyDiagram-YWT4CUSO-527ffe52.js +78 -0
  136. package/dist/client/assets/xychartDiagram-2RQKCTM6-42b5914b.js +7 -0
  137. package/dist/client/favicon-16x16.png +0 -0
  138. package/dist/client/favicon-32x32.png +0 -0
  139. package/dist/client/favicon.ico +0 -0
  140. package/dist/client/icon-192.png +0 -0
  141. package/dist/client/icon-512.png +0 -0
  142. package/dist/client/index.html +18 -0
  143. package/dist/server/app.js +429 -0
  144. package/dist/server/channel.js +42 -0
  145. package/dist/server/events.js +90 -0
  146. package/dist/server/export-html.js +461 -0
  147. package/dist/server/index.js +79 -0
  148. package/dist/server/interaction.js +135 -0
  149. package/dist/server/mcp.js +421 -0
  150. package/dist/server/paths.js +11 -0
  151. package/dist/server/persist.js +56 -0
  152. package/dist/server/presentation.js +5 -0
  153. package/dist/server/render-core.js +213 -0
  154. package/dist/server/session.js +103 -0
  155. package/dist/server/slideshow.js +83 -0
  156. package/dist/server/snapshot-reader.js +190 -0
  157. package/dist/server/snapshot-writer.js +117 -0
  158. package/dist/server/snapshot.js +47 -0
  159. package/dist/server/step-frames-builder.js +70 -0
  160. package/dist/server/validate.js +140 -0
  161. package/dist/server/viewport-cache.js +69 -0
  162. package/dist/server/ws.js +71 -0
  163. package/package.json +92 -0
@@ -0,0 +1,173 @@
1
+ var mN=Object.defineProperty;var gN=(t,e,r)=>e in t?mN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>(gN(t,typeof e!="symbol"?e+"":e,r),r);import{_ as er}from"./index-4abf3da0.js";var yN=Object.create,hu=Object.defineProperty,vN=Object.getOwnPropertyDescriptor,Gh=Object.getOwnPropertyNames,TN=Object.getPrototypeOf,RN=Object.prototype.hasOwnProperty,s=(t,e)=>hu(t,"name",{value:e,configurable:!0}),$N=(t,e)=>function(){return t&&(e=(0,t[Gh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Gh(t)[0]])((e={exports:{}}).exports,e),e.exports},Zr=(t,e)=>{for(var r in e)hu(t,r,{get:e[r],enumerable:!0})},Ec=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Gh(e))!RN.call(t,a)&&a!==r&&hu(t,a,{get:()=>e[a],enumerable:!(n=vN(e,a))||n.enumerable});return t},df=(t,e,r)=>(Ec(t,e,"default"),r&&Ec(r,e,"default")),jh=(t,e,r)=>(r=t!=null?yN(TN(t)):{},Ec(e||!t||!t.__esModule?hu(r,"default",{value:t,enumerable:!0}):r,t)),Uh=t=>Ec(hu({},"__esModule",{value:!0}),t),pf={};Zr(pf,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>cn,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>_p,CodeActionContext:()=>Ep,CodeActionKind:()=>Ap,CodeActionTriggerKind:()=>qi,CodeDescription:()=>ep,CodeLens:()=>Cp,Color:()=>rc,ColorInformation:()=>Hd,ColorPresentation:()=>Yd,Command:()=>un,CompletionItem:()=>cp,CompletionItemKind:()=>ap,CompletionItemLabelDetails:()=>up,CompletionItemTag:()=>sp,CompletionList:()=>fp,CreateFile:()=>va,DeleteFile:()=>Ra,Diagnostic:()=>Ui,DiagnosticRelatedInformation:()=>nc,DiagnosticSeverity:()=>Zd,DiagnosticTag:()=>Qd,DocumentHighlight:()=>gp,DocumentHighlightKind:()=>mp,DocumentLink:()=>bp,DocumentSymbol:()=>$p,DocumentUri:()=>qd,EOL:()=>mT,FoldingRange:()=>Jd,FoldingRangeKind:()=>Xd,FormattingOptions:()=>Sp,Hover:()=>dp,InlayHint:()=>Mp,InlayHintKind:()=>sc,InlayHintLabelPart:()=>oc,InlineCompletionContext:()=>zp,InlineCompletionItem:()=>Fp,InlineCompletionList:()=>Gp,InlineCompletionTriggerKind:()=>jp,InlineValueContext:()=>Dp,InlineValueEvaluatableExpression:()=>Lp,InlineValueText:()=>Pp,InlineValueVariableLookup:()=>Op,InsertReplaceEdit:()=>op,InsertTextFormat:()=>ip,InsertTextMode:()=>lp,Location:()=>ji,LocationLink:()=>Vd,MarkedString:()=>Ki,MarkupContent:()=>$a,MarkupKind:()=>ic,OptionalVersionedTextDocumentIdentifier:()=>Bi,ParameterInformation:()=>pp,Position:()=>ie,Range:()=>ee,RenameFile:()=>Ta,SelectedCompletionInfo:()=>Up,SelectionRange:()=>wp,SemanticTokenModifiers:()=>Np,SemanticTokenTypes:()=>Ip,SemanticTokens:()=>kp,SignatureInformation:()=>hp,StringValue:()=>xp,SymbolInformation:()=>Tp,SymbolKind:()=>yp,SymbolTag:()=>vp,TextDocument:()=>Kp,TextDocumentEdit:()=>zi,TextDocumentIdentifier:()=>tp,TextDocumentItem:()=>np,TextEdit:()=>rr,URI:()=>tc,VersionedTextDocumentIdentifier:()=>rp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>ac,WorkspaceFolder:()=>Bp,WorkspaceSymbol:()=>Rp,integer:()=>Wd,uinteger:()=>Gi});var qd,tc,Wd,Gi,ie,ee,ji,Vd,rc,Hd,Yd,Xd,Jd,nc,Zd,Qd,ep,Ui,un,rr,cn,Xe,Tr,zi,va,Ta,Ra,ac,Ii,Ad,hT,tp,rp,Bi,np,ic,$a,ap,ip,sp,op,lp,up,cp,fp,Ki,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,$p,Ap,qi,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,Lp,Dp,sc,oc,Mp,xp,Fp,Gp,jp,Up,zp,Bp,mT,Kp,_y,_,mu=$N({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(qd||(qd={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(tc||(tc={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Wd||(Wd={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Gi||(Gi={})),function(a){function i(u,l){return u===Number.MAX_VALUE&&(u=Gi.MAX_VALUE),l===Number.MAX_VALUE&&(l=Gi.MAX_VALUE),{line:u,character:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o}(ie||(ie={})),function(a){function i(u,l,c,f){if(_.uinteger(u)&&_.uinteger(l)&&_.uinteger(c)&&_.uinteger(f))return{start:ie.create(u,l),end:ie.create(c,f)};if(ie.is(u)&&ie.is(l))return{start:u,end:l};throw new Error(`Range#create called with invalid arguments[${u}, ${l}, ${c}, ${f}]`)}s(i,"create"),a.create=i;function o(u){let l=u;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o}(ee||(ee={})),function(a){function i(u,l){return{uri:u,range:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o}(ji||(ji={})),function(a){function i(u,l,c,f){return{targetUri:u,targetRange:l,targetSelectionRange:c,originSelectionRange:f}}s(i,"create"),a.create=i;function o(u){let l=u;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(Vd||(Vd={})),function(a){function i(u,l,c,f){return{red:u,green:l,blue:c,alpha:f}}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(rc||(rc={})),function(a){function i(u,l){return{range:u,color:l}}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&ee.is(l.range)&&rc.is(l.color)}s(o,"is"),a.is=o}(Hd||(Hd={})),function(a){function i(u,l,c){return{label:u,textEdit:l,additionalTextEdits:c}}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o}(Yd||(Yd={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(Xd||(Xd={})),function(a){function i(u,l,c,f,d,p){const m={startLine:u,endLine:l};return _.defined(c)&&(m.startCharacter=c),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o}(Jd||(Jd={})),function(a){function i(u,l){return{location:u,message:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&ji.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o}(nc||(nc={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Zd||(Zd={})),function(a){a.Unnecessary=1,a.Deprecated=2}(Qd||(Qd={})),function(a){function i(o){const u=o;return _.objectLiteral(u)&&_.string(u.href)}s(i,"is"),a.is=i}(ep||(ep={})),function(a){function i(u,l,c,f,d,p){let m={range:u,message:l};return _.defined(c)&&(m.severity=c),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(u){var l;let c=u;return _.defined(c)&&ee.is(c.range)&&_.string(c.message)&&(_.number(c.severity)||_.undefined(c.severity))&&(_.integer(c.code)||_.string(c.code)||_.undefined(c.code))&&(_.undefined(c.codeDescription)||_.string((l=c.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(c.source)||_.undefined(c.source))&&(_.undefined(c.relatedInformation)||_.typedArray(c.relatedInformation,nc.is))}s(o,"is"),a.is=o}(Ui||(Ui={})),function(a){function i(u,l,...c){let f={title:u,command:l};return _.defined(c)&&c.length>0&&(f.arguments=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o}(un||(un={})),function(a){function i(c,f){return{range:c,newText:f}}s(i,"replace"),a.replace=i;function o(c,f){return{range:{start:c,end:c},newText:f}}s(o,"insert"),a.insert=o;function u(c){return{range:c,newText:""}}s(u,"del"),a.del=u;function l(c){const f=c;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l}(rr||(rr={})),function(a){function i(u,l,c){const f={label:u};return l!==void 0&&(f.needsConfirmation=l),c!==void 0&&(f.description=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(cn||(cn={})),function(a){function i(o){const u=o;return _.string(u)}s(i,"is"),a.is=i}(Xe||(Xe={})),function(a){function i(c,f,d){return{range:c,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(c,f,d){return{range:{start:c,end:c},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function u(c,f){return{range:c,newText:"",annotationId:f}}s(u,"del"),a.del=u;function l(c){const f=c;return rr.is(f)&&(cn.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l}(Tr||(Tr={})),function(a){function i(u,l){return{textDocument:u,edits:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&Bi.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(zi||(zi={})),function(a){function i(u,l,c){let f={kind:"create",uri:u};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(va||(va={})),function(a){function i(u,l,c,f){let d={kind:"rename",oldUri:u,newUri:l};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(d.options=c),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Ta||(Ta={})),function(a){function i(u,l,c){let f={kind:"delete",uri:u};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o}(Ra||(Ra={})),function(a){function i(o){let u=o;return u&&(u.changes!==void 0||u.documentChanges!==void 0)&&(u.documentChanges===void 0||u.documentChanges.every(l=>_.string(l.kind)?va.is(l)||Ta.is(l)||Ra.is(l):zi.is(l)))}s(i,"is"),a.is=i}(ac||(ac={})),Ii=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,u){let l,c;if(u===void 0?l=rr.insert(i,o):Xe.is(u)?(c=u,l=Tr.insert(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Tr.insert(i,o,c)),this.edits.push(l),c!==void 0)return c}replace(i,o,u){let l,c;if(u===void 0?l=rr.replace(i,o):Xe.is(u)?(c=u,l=Tr.replace(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Tr.replace(i,o,c)),this.edits.push(l),c!==void 0)return c}delete(i,o){let u,l;if(o===void 0?u=rr.del(i):Xe.is(o)?(l=o,u=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),u=Tr.del(i,l)),this.edits.push(u),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Ad=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let u;if(Xe.is(i)?u=i:(u=this.nextId(),o=i),this._annotations[u]!==void 0)throw new Error(`Id ${u} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${u}`);return this._annotations[u]=o,this._size++,u}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Ad(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(zi.is(o)){const u=new Ii(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=u}})):i.changes&&Object.keys(i.changes).forEach(o=>{const u=new Ii(i.changes[o]);this._textEditChanges[o]=u})):this._workspaceEdit={}}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(i){if(Bi.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let u=this._textEditChanges[o.uri];if(!u){const l=[],c={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(c),u=new Ii(l,this._changeAnnotations),this._textEditChanges[o.uri]=u}return u}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let u=[];this._workspaceEdit.changes[i]=u,o=new Ii(u),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ad,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(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;cn.is(o)||Xe.is(o)?l=o:u=o;let c,f;if(l===void 0?c=va.create(i,u):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),c=va.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}renameFile(i,o,u,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let c;cn.is(u)||Xe.is(u)?c=u:l=u;let f,d;if(c===void 0?f=Ta.create(i,o,l):(d=Xe.is(c)?c:this._changeAnnotations.manage(c),f=Ta.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;cn.is(o)||Xe.is(o)?l=o:u=o;let c,f;if(l===void 0?c=Ra.create(i,u):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),c=Ra.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(u){return{uri:u}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o}(tp||(tp={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o}(rp||(rp={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o}(Bi||(Bi={})),function(a){function i(u,l,c,f){return{uri:u,languageId:l,version:c,text:f}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o}(np||(np={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const u=o;return u===a.PlainText||u===a.Markdown}s(i,"is"),a.is=i}(ic||(ic={})),function(a){function i(o){const u=o;return _.objectLiteral(o)&&ic.is(u.kind)&&_.string(u.value)}s(i,"is"),a.is=i}($a||($a={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(ap||(ap={})),function(a){a.PlainText=1,a.Snippet=2}(ip||(ip={})),function(a){a.Deprecated=1}(sp||(sp={})),function(a){function i(u,l,c){return{newText:u,insert:l,replace:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o}(op||(op={})),function(a){a.asIs=1,a.adjustIndentation=2}(lp||(lp={})),function(a){function i(o){const u=o;return u&&(_.string(u.detail)||u.detail===void 0)&&(_.string(u.description)||u.description===void 0)}s(i,"is"),a.is=i}(up||(up={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(cp||(cp={})),function(a){function i(o,u){return{items:o||[],isIncomplete:!!u}}s(i,"create"),a.create=i}(fp||(fp={})),function(a){function i(u){return u.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(u){const l=u;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o}(Ki||(Ki={})),function(a){function i(o){let u=o;return!!u&&_.objectLiteral(u)&&($a.is(u.contents)||Ki.is(u.contents)||_.typedArray(u.contents,Ki.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i}(dp||(dp={})),function(a){function i(o,u){return u?{label:o,documentation:u}:{label:o}}s(i,"create"),a.create=i}(pp||(pp={})),function(a){function i(o,u,...l){let c={label:o};return _.defined(u)&&(c.documentation=u),_.defined(l)?c.parameters=l:c.parameters=[],c}s(i,"create"),a.create=i}(hp||(hp={})),function(a){a.Text=1,a.Read=2,a.Write=3}(mp||(mp={})),function(a){function i(o,u){let l={range:o};return _.number(u)&&(l.kind=u),l}s(i,"create"),a.create=i}(gp||(gp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(yp||(yp={})),function(a){a.Deprecated=1}(vp||(vp={})),function(a){function i(o,u,l,c,f){let d={name:o,kind:u,location:{uri:c,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i}(Tp||(Tp={})),function(a){function i(o,u,l,c){return c!==void 0?{name:o,kind:u,location:{uri:l,range:c}}:{name:o,kind:u,location:{uri:l}}}s(i,"create"),a.create=i}(Rp||(Rp={})),function(a){function i(u,l,c,f,d,p){let m={name:u,detail:l,kind:c,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(u){let l=u;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}($p||($p={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(Ap||(Ap={})),function(a){a.Invoked=1,a.Automatic=2}(qi||(qi={})),function(a){function i(u,l,c){let f={diagnostics:u};return l!=null&&(f.only=l),c!=null&&(f.triggerKind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.typedArray(l.diagnostics,Ui.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===qi.Invoked||l.triggerKind===qi.Automatic)}s(o,"is"),a.is=o}(Ep||(Ep={})),function(a){function i(u,l,c){let f={title:u},d=!0;return typeof l=="string"?(d=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,d&&c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Ui.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||ac.is(l.edit))}s(o,"is"),a.is=o}(_p||(_p={})),function(a){function i(u,l){let c={range:u};return _.defined(l)&&(c.data=l),c}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o}(Cp||(Cp={})),function(a){function i(u,l){return{tabSize:u,insertSpaces:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(Sp||(Sp={})),function(a){function i(u,l,c){return{range:u,target:l,data:c}}s(i,"create"),a.create=i;function o(u){let l=u;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o}(bp||(bp={})),function(a){function i(u,l){return{range:u,parent:l}}s(i,"create"),a.create=i;function o(u){let l=u;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(wp||(wp={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(Ip||(Ip={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(Np||(Np={})),function(a){function i(o){const u=o;return _.objectLiteral(u)&&(u.resultId===void 0||typeof u.resultId=="string")&&Array.isArray(u.data)&&(u.data.length===0||typeof u.data[0]=="number")}s(i,"is"),a.is=i}(kp||(kp={})),function(a){function i(u,l){return{range:u,text:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(u,l,c){return{range:u,variableName:l,caseSensitiveLookup:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(Op||(Op={})),function(a){function i(u,l){return{range:u,expression:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(Lp||(Lp={})),function(a){function i(u,l){return{frameId:u,stoppedLocation:l}}s(i,"create"),a.create=i;function o(u){const l=u;return _.defined(l)&&ee.is(u.stoppedLocation)}s(o,"is"),a.is=o}(Dp||(Dp={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(sc||(sc={})),function(a){function i(u){return{value:u}}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||$a.is(l.tooltip))&&(l.location===void 0||ji.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o}(oc||(oc={})),function(a){function i(u,l,c){const f={position:u,label:l};return c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,oc.is))&&(l.kind===void 0||sc.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||$a.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o}(Mp||(Mp={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(xp||(xp={})),function(a){function i(o,u,l,c){return{insertText:o,filterText:u,range:l,command:c}}s(i,"create"),a.create=i}(Fp||(Fp={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(Gp||(Gp={})),function(a){a.Invoked=0,a.Automatic=1}(jp||(jp={})),function(a){function i(o,u){return{range:o,text:u}}s(i,"create"),a.create=i}(Up||(Up={})),function(a){function i(o,u){return{triggerKind:o,selectedCompletionInfo:u}}s(i,"create"),a.create=i}(zp||(zp={})),function(a){function i(o){const u=o;return _.objectLiteral(u)&&tc.is(u.uri)&&_.string(u.name)}s(i,"is"),a.is=i}(Bp||(Bp={})),mT=[`
2
+ `,`\r
3
+ `,"\r"],function(a){function i(c,f,d,p){return new _y(c,f,d,p)}s(i,"create"),a.create=i;function o(c){let f=c;return!!(_.defined(f)&&_.string(f.uri)&&(_.undefined(f.languageId)||_.string(f.languageId))&&_.uinteger(f.lineCount)&&_.func(f.getText)&&_.func(f.positionAt)&&_.func(f.offsetAt))}s(o,"is"),a.is=o;function u(c,f){let d=c.getText(),p=l(f,(g,v)=>{let E=g.range.start.line-v.range.start.line;return E===0?g.range.start.character-v.range.start.character:E}),m=d.length;for(let g=p.length-1;g>=0;g--){let v=p[g],E=c.offsetAt(v.range.start),T=c.offsetAt(v.range.end);if(T<=m)d=d.substring(0,E)+v.newText+d.substring(T,d.length);else throw new Error("Overlapping edit");m=E}return d}s(u,"applyEdits"),a.applyEdits=u;function l(c,f){if(c.length<=1)return c;const d=c.length/2|0,p=c.slice(0,d),m=c.slice(d);l(p,f),l(m,f);let g=0,v=0,E=0;for(;g<p.length&&v<m.length;)f(p[g],m[v])<=0?c[E++]=p[g++]:c[E++]=m[v++];for(;g<p.length;)c[E++]=p[g++];for(;v<m.length;)c[E++]=m[v++];return c}s(l,"mergeSort")}(Kp||(Kp={})),_y=(n=class{constructor(i,o,u,l){this._uri=i,this._languageId=o,this._version=u,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),u=this.offsetAt(i.end);return this._content.substring(o,u)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,u=!0;for(let l=0;l<o.length;l++){u&&(i.push(l),u=!1);let c=o.charAt(l);u=c==="\r"||c===`
4
+ `,c==="\r"&&l+1<o.length&&o.charAt(l+1)===`
5
+ `&&l++}u&&o.length>0&&i.push(o.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let o=this.getLineOffsets(),u=0,l=o.length;if(l===0)return ie.create(0,i);for(;u<l;){let f=Math.floor((u+l)/2);o[f]>i?l=f:u=f+1}let c=u-1;return ie.create(c,i-o[c])}offsetAt(i){let o=this.getLineOffsets();if(i.line>=o.length)return this._content.length;if(i.line<0)return 0;let u=o[i.line],l=i.line+1<o.length?o[i.line+1]:this._content.length;return Math.max(Math.min(u+i.character,l),u)}get lineCount(){return this.getLineOffsets().length}},s(n,"FullTextDocument"),n),function(a){const i=Object.prototype.toString;function o(T){return typeof T<"u"}s(o,"defined"),a.defined=o;function u(T){return typeof T>"u"}s(u,"undefined"),a.undefined=u;function l(T){return T===!0||T===!1}s(l,"boolean"),a.boolean=l;function c(T){return i.call(T)==="[object String]"}s(c,"string"),a.string=c;function f(T){return i.call(T)==="[object Number]"}s(f,"number"),a.number=f;function d(T,b,C){return i.call(T)==="[object Number]"&&b<=T&&T<=C}s(d,"numberRange"),a.numberRange=d;function p(T){return i.call(T)==="[object Number]"&&-2147483648<=T&&T<=2147483647}s(p,"integer"),a.integer=p;function m(T){return i.call(T)==="[object Number]"&&0<=T&&T<=2147483647}s(m,"uinteger"),a.uinteger=m;function g(T){return i.call(T)==="[object Function]"}s(g,"func"),a.func=g;function v(T){return T!==null&&typeof T=="object"}s(v,"objectLiteral"),a.objectLiteral=v;function E(T,b){return Array.isArray(T)&&T.every(b)}s(E,"typedArray"),a.typedArray=E}(_||(_={}))}}),jn=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var e;function r(){if(e===void 0)throw new Error("No runtime abstraction layer installed");return e}s(r,"RAL"),function(n){function a(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");e=i}s(a,"install"),n.install=a}(r||(r={})),t.default=r}}),gu=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(l){return l===!0||l===!1}s(e,"boolean"),t.boolean=e;function r(l){return typeof l=="string"||l instanceof String}s(r,"string"),t.string=r;function n(l){return typeof l=="number"||l instanceof Number}s(n,"number"),t.number=n;function a(l){return l instanceof Error}s(a,"error"),t.error=a;function i(l){return typeof l=="function"}s(i,"func"),t.func=i;function o(l){return Array.isArray(l)}s(o,"array"),t.array=o;function u(l){return o(l)&&l.every(c=>r(c))}s(u,"stringArray"),t.stringArray=u}}),ti=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){var i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e=jn(),r;(function(u){const l={dispose(){}};u.None=function(){return l}})(r||(t.Event=r={}));var n=(i=class{add(l,c=null,f){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(l),this._contexts.push(c),Array.isArray(f)&&f.push({dispose:s(()=>this.remove(l,c),"dispose")})}remove(l,c=null){if(!this._callbacks)return;let f=!1;for(let d=0,p=this._callbacks.length;d<p;d++)if(this._callbacks[d]===l)if(this._contexts[d]===c){this._callbacks.splice(d,1),this._contexts.splice(d,1);return}else f=!0;if(f)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...l){if(!this._callbacks)return[];const c=[],f=this._callbacks.slice(0),d=this._contexts.slice(0);for(let p=0,m=f.length;p<m;p++)try{c.push(f[p].apply(d[p],l))}catch(g){(0,e.default)().console.error(g)}return c}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},s(i,"CallbackList"),i),a=(o=class{constructor(l){this._options=l}get event(){return this._event||(this._event=(l,c,f)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,c);const d={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(l,c),d.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(f)&&f.push(d),d}),this._event}fire(l){this._callbacks&&this._callbacks.invoke.call(this._callbacks,l)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},s(o,"Emitter"),o);t.Emitter=a,a._noop=function(){}}}),hf=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){var l,c;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e=jn(),r=gu(),n=ti(),a;(function(f){f.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),f.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function d(p){const m=p;return m&&(m===f.None||m===f.Cancelled||r.boolean(m.isCancellationRequested)&&!!m.onCancellationRequested)}s(d,"is"),f.is=d})(a||(t.CancellationToken=a={}));var i=Object.freeze(function(f,d){const p=(0,e.default)().timer.setTimeout(f.bind(d),0);return{dispose(){p.dispose()}}}),o=(l=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},s(l,"MutableToken"),l),u=(c=class{get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=a.None}},s(c,"CancellationTokenSource"),c);t.CancellationTokenSource=u}}),gT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){var P,S,R,I,$,A,w,O,M,L,j,F,re,U,Q,pe,he,me,_e,Pe,ge,J,Be,ce,Ye;Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var e=gu(),r;(function(ye){ye.ParseError=-32700,ye.InvalidRequest=-32600,ye.MethodNotFound=-32601,ye.InvalidParams=-32602,ye.InternalError=-32603,ye.jsonrpcReservedErrorRangeStart=-32099,ye.serverErrorStart=-32099,ye.MessageWriteError=-32099,ye.MessageReadError=-32098,ye.PendingResponseRejected=-32097,ye.ConnectionInactive=-32096,ye.ServerNotInitialized=-32002,ye.UnknownErrorCode=-32001,ye.jsonrpcReservedErrorRangeEnd=-32e3,ye.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={}));var n=(P=class extends Error{constructor(x,Ue,Xt){super(Ue),this.code=e.number(x)?x:r.UnknownErrorCode,this.data=Xt,Object.setPrototypeOf(this,P.prototype)}toJson(){const x={code:this.code,message:this.message};return this.data!==void 0&&(x.data=this.data),x}},s(P,"ResponseError"),P);t.ResponseError=n;var a=(S=class{constructor(x){this.kind=x}static is(x){return x===S.auto||x===S.byName||x===S.byPosition}toString(){return this.kind}},s(S,"ParameterStructures"),S);t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var i=(R=class{constructor(x,Ue){this.method=x,this.numberOfParams=Ue}get parameterStructures(){return a.auto}},s(R,"AbstractMessageSignature"),R);t.AbstractMessageSignature=i;var o=(I=class extends i{constructor(x){super(x,0)}},s(I,"RequestType0"),I);t.RequestType0=o;var u=($=class extends i{constructor(x,Ue=a.auto){super(x,1),this._parameterStructures=Ue}get parameterStructures(){return this._parameterStructures}},s($,"RequestType"),$);t.RequestType=u;var l=(A=class extends i{constructor(x,Ue=a.auto){super(x,1),this._parameterStructures=Ue}get parameterStructures(){return this._parameterStructures}},s(A,"RequestType1"),A);t.RequestType1=l;var c=(w=class extends i{constructor(x){super(x,2)}},s(w,"RequestType2"),w);t.RequestType2=c;var f=(O=class extends i{constructor(x){super(x,3)}},s(O,"RequestType3"),O);t.RequestType3=f;var d=(M=class extends i{constructor(x){super(x,4)}},s(M,"RequestType4"),M);t.RequestType4=d;var p=(L=class extends i{constructor(x){super(x,5)}},s(L,"RequestType5"),L);t.RequestType5=p;var m=(j=class extends i{constructor(x){super(x,6)}},s(j,"RequestType6"),j);t.RequestType6=m;var g=(F=class extends i{constructor(x){super(x,7)}},s(F,"RequestType7"),F);t.RequestType7=g;var v=(re=class extends i{constructor(x){super(x,8)}},s(re,"RequestType8"),re);t.RequestType8=v;var E=(U=class extends i{constructor(x){super(x,9)}},s(U,"RequestType9"),U);t.RequestType9=E;var T=(Q=class extends i{constructor(x,Ue=a.auto){super(x,1),this._parameterStructures=Ue}get parameterStructures(){return this._parameterStructures}},s(Q,"NotificationType"),Q);t.NotificationType=T;var b=(pe=class extends i{constructor(x){super(x,0)}},s(pe,"NotificationType0"),pe);t.NotificationType0=b;var C=(he=class extends i{constructor(x,Ue=a.auto){super(x,1),this._parameterStructures=Ue}get parameterStructures(){return this._parameterStructures}},s(he,"NotificationType1"),he);t.NotificationType1=C;var k=(me=class extends i{constructor(x){super(x,2)}},s(me,"NotificationType2"),me);t.NotificationType2=k;var B=(_e=class extends i{constructor(x){super(x,3)}},s(_e,"NotificationType3"),_e);t.NotificationType3=B;var te=(Pe=class extends i{constructor(x){super(x,4)}},s(Pe,"NotificationType4"),Pe);t.NotificationType4=te;var X=(ge=class extends i{constructor(x){super(x,5)}},s(ge,"NotificationType5"),ge);t.NotificationType5=X;var de=(J=class extends i{constructor(x){super(x,6)}},s(J,"NotificationType6"),J);t.NotificationType6=de;var Ee=(Be=class extends i{constructor(x){super(x,7)}},s(Be,"NotificationType7"),Be);t.NotificationType7=Ee;var Ie=(ce=class extends i{constructor(x){super(x,8)}},s(ce,"NotificationType8"),ce);t.NotificationType8=Ie;var oe=(Ye=class extends i{constructor(x){super(x,9)}},s(Ye,"NotificationType9"),Ye);t.NotificationType9=oe;var tt;(function(ye){function x(Nt){const ve=Nt;return ve&&e.string(ve.method)&&(e.string(ve.id)||e.number(ve.id))}s(x,"isRequest"),ye.isRequest=x;function Ue(Nt){const ve=Nt;return ve&&e.string(ve.method)&&Nt.id===void 0}s(Ue,"isNotification"),ye.isNotification=Ue;function Xt(Nt){const ve=Nt;return ve&&(ve.result!==void 0||!!ve.error)&&(e.string(ve.id)||e.number(ve.id)||ve.id===null)}s(Xt,"isResponse"),ye.isResponse=Xt})(tt||(t.Message=tt={}))}}),yT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var i,o;var e;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0;var r;(function(u){u.None=0,u.First=1,u.AsOld=u.First,u.Last=2,u.AsNew=u.Last})(r||(t.Touch=r={}));var n=(i=class{constructor(){this[e]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var l;return(l=this._head)==null?void 0:l.value}get last(){var l;return(l=this._tail)==null?void 0:l.value}has(l){return this._map.has(l)}get(l,c=r.None){const f=this._map.get(l);if(f)return c!==r.None&&this.touch(f,c),f.value}set(l,c,f=r.None){let d=this._map.get(l);if(d)d.value=c,f!==r.None&&this.touch(d,f);else{switch(d={key:l,value:c,next:void 0,previous:void 0},f){case r.None:this.addItemLast(d);break;case r.First:this.addItemFirst(d);break;case r.Last:this.addItemLast(d);break;default:this.addItemLast(d);break}this._map.set(l,d),this._size++}return this}delete(l){return!!this.remove(l)}remove(l){const c=this._map.get(l);if(c)return this._map.delete(l),this.removeItem(c),this._size--,c.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const l=this._head;return this._map.delete(l.key),this.removeItem(l),this._size--,l.value}forEach(l,c){const f=this._state;let d=this._head;for(;d;){if(c?l.bind(c)(d.value,d.key,this):l(d.value,d.key,this),this._state!==f)throw new Error("LinkedMap got modified during iteration.");d=d.next}}keys(){const l=this._state;let c=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(c){const d={value:c.key,done:!1};return c=c.next,d}else return{value:void 0,done:!0}},"next")};return f}values(){const l=this._state;let c=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(c){const d={value:c.value,done:!1};return c=c.next,d}else return{value:void 0,done:!0}},"next")};return f}entries(){const l=this._state;let c=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(c){const d={value:[c.key,c.value],done:!1};return c=c.next,d}else return{value:void 0,done:!0}},"next")};return f}[(e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(l){if(l>=this.size)return;if(l===0){this.clear();return}let c=this._head,f=this.size;for(;c&&f>l;)this._map.delete(c.key),c=c.next,f--;this._head=c,this._size=f,c&&(c.previous=void 0),this._state++}addItemFirst(l){if(!this._head&&!this._tail)this._tail=l;else if(this._head)l.next=this._head,this._head.previous=l;else throw new Error("Invalid list");this._head=l,this._state++}addItemLast(l){if(!this._head&&!this._tail)this._head=l;else if(this._tail)l.previous=this._tail,this._tail.next=l;else throw new Error("Invalid list");this._tail=l,this._state++}removeItem(l){if(l===this._head&&l===this._tail)this._head=void 0,this._tail=void 0;else if(l===this._head){if(!l.next)throw new Error("Invalid list");l.next.previous=void 0,this._head=l.next}else if(l===this._tail){if(!l.previous)throw new Error("Invalid list");l.previous.next=void 0,this._tail=l.previous}else{const c=l.next,f=l.previous;if(!c||!f)throw new Error("Invalid list");c.previous=f,f.next=c}l.next=void 0,l.previous=void 0,this._state++}touch(l,c){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(c!==r.First&&c!==r.Last)){if(c===r.First){if(l===this._head)return;const f=l.next,d=l.previous;l===this._tail?(d.next=void 0,this._tail=d):(f.previous=d,d.next=f),l.previous=void 0,l.next=this._head,this._head.previous=l,this._head=l,this._state++}else if(c===r.Last){if(l===this._tail)return;const f=l.next,d=l.previous;l===this._head?(f.previous=void 0,this._head=f):(f.previous=d,d.next=f),l.next=void 0,l.previous=this._tail,this._tail.next=l,this._tail=l,this._state++}}}toJSON(){const l=[];return this.forEach((c,f)=>{l.push([f,c])}),l}fromJSON(l){this.clear();for(const[c,f]of l)this.set(c,f)}},s(i,"LinkedMap"),i);t.LinkedMap=n;var a=(o=class extends n{constructor(l,c=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,c),1)}get limit(){return this._limit}set limit(l){this._limit=l,this.checkTrim()}get ratio(){return this._ratio}set ratio(l){this._ratio=Math.min(Math.max(0,l),1),this.checkTrim()}get(l,c=r.AsNew){return super.get(l,c)}peek(l){return super.get(l,r.None)}set(l,c){return super.set(l,c,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},s(o,"LRUCache"),o);t.LRUCache=a}}),AN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;var e;(function(r){function n(a){return{dispose:a}}s(n,"create"),r.create=n})(e||(t.Disposable=e={}))}}),EN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){var u,l,c,f;Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e=hf(),r;(function(d){d.Continue=0,d.Cancelled=1})(r||(r={}));var n=(u=class{constructor(){this.buffers=new Map}enableCancellation(p){if(p.id===null)return;const m=new SharedArrayBuffer(4),g=new Int32Array(m,0,1);g[0]=r.Continue,this.buffers.set(p.id,m),p.$cancellationData=m}async sendCancellation(p,m){const g=this.buffers.get(m);if(g===void 0)return;const v=new Int32Array(g,0,1);Atomics.store(v,0,r.Cancelled)}cleanup(p){this.buffers.delete(p)}dispose(){this.buffers.clear()}},s(u,"SharedArraySenderStrategy"),u);t.SharedArraySenderStrategy=n;var a=(l=class{constructor(p){this.data=new Int32Array(p,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s(l,"SharedArrayBufferCancellationToken"),l),i=(c=class{constructor(p){this.token=new a(p)}cancel(){}dispose(){}},s(c,"SharedArrayBufferCancellationTokenSource"),c),o=(f=class{constructor(){this.kind="request"}createCancellationTokenSource(p){const m=p.$cancellationData;return m===void 0?new e.CancellationTokenSource:new i(m)}},s(f,"SharedArrayReceiverStrategy"),f);t.SharedArrayReceiverStrategy=o}}),vT=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var e=jn(),r=(n=class{constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((o,u)=>{this._waiting.push({thunk:i,resolve:o,reject:u}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,e.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const o=i.thunk();o instanceof Promise?o.then(u=>{this._active--,i.resolve(u),this.runNext()},u=>{this._active--,i.reject(u),this.runNext()}):(this._active--,i.resolve(o),this.runNext())}catch(o){this._active--,i.reject(o),this.runNext()}}},s(n,"Semaphore"),n);t.Semaphore=r}}),_N=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){var c,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e=jn(),r=gu(),n=ti(),a=vT(),i;(function(d){function p(m){let g=m;return g&&r.func(g.listen)&&r.func(g.dispose)&&r.func(g.onError)&&r.func(g.onClose)&&r.func(g.onPartialMessage)}s(p,"is"),d.is=p})(i||(t.MessageReader=i={}));var o=(c=class{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p){this.errorEmitter.fire(this.asError(p))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(p){this.partialMessageEmitter.fire(p)}asError(p){return p instanceof Error?p:new Error(`Reader received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}},s(c,"AbstractMessageReader"),c);t.AbstractMessageReader=o;var u;(function(d){function p(m){let g,v;const E=new Map;let T;const b=new Map;if(m===void 0||typeof m=="string")g=m??"utf-8";else{if(g=m.charset??"utf-8",m.contentDecoder!==void 0&&(v=m.contentDecoder,E.set(v.name,v)),m.contentDecoders!==void 0)for(const C of m.contentDecoders)E.set(C.name,C);if(m.contentTypeDecoder!==void 0&&(T=m.contentTypeDecoder,b.set(T.name,T)),m.contentTypeDecoders!==void 0)for(const C of m.contentTypeDecoders)b.set(C.name,C)}return T===void 0&&(T=(0,e.default)().applicationJson.decoder,b.set(T.name,T)),{charset:g,contentDecoder:v,contentDecoders:E,contentTypeDecoder:T,contentTypeDecoders:b}}s(p,"fromOptions"),d.fromOptions=p})(u||(u={}));var l=(f=class extends o{constructor(p,m){super(),this.readable=p,this.options=u.fromOptions(m),this.buffer=(0,e.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(p){this._partialMessageTimeout=p}get partialMessageTimeout(){return this._partialMessageTimeout}listen(p){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=p;const m=this.readable.onData(g=>{this.onData(g)});return this.readable.onError(g=>this.fireError(g)),this.readable.onClose(()=>this.fireClose()),m}onData(p){try{for(this.buffer.append(p);;){if(this.nextMessageLength===-1){const g=this.buffer.tryReadHeaders(!0);if(!g)return;const v=g.get("content-length");if(!v){this.fireError(new Error(`Header must provide a Content-Length property.
6
+ ${JSON.stringify(Object.fromEntries(g))}`));return}const E=parseInt(v);if(isNaN(E)){this.fireError(new Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=E}const m=this.buffer.tryReadBody(this.nextMessageLength);if(m===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const g=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(m):m,v=await this.options.contentTypeDecoder.decode(g,this.options);this.callback(v)}).catch(g=>{this.fireError(g)})}}catch(m){this.fireError(m)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,e.default)().timer.setTimeout((p,m)=>{this.partialMessageTimer=void 0,p===this.messageToken&&(this.firePartialMessage({messageToken:p,waitingTime:m}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},s(f,"ReadableStreamMessageReader"),f);t.ReadableStreamMessageReader=l}}),CN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){var d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var e=jn(),r=gu(),n=vT(),a=ti(),i="Content-Length: ",o=`\r
7
+ `,u;(function(m){function g(v){let E=v;return E&&r.func(E.dispose)&&r.func(E.onClose)&&r.func(E.onError)&&r.func(E.write)}s(g,"is"),m.is=g})(u||(t.MessageWriter=u={}));var l=(d=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(g,v,E){this.errorEmitter.fire([this.asError(g),v,E])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(g){return g instanceof Error?g:new Error(`Writer received error. Reason: ${r.string(g.message)?g.message:"unknown"}`)}},s(d,"AbstractMessageWriter"),d);t.AbstractMessageWriter=l;var c;(function(m){function g(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,e.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,e.default)().applicationJson.encoder}}s(g,"fromOptions"),m.fromOptions=g})(c||(c={}));var f=(p=class extends l{constructor(g,v){super(),this.writable=g,this.options=c.fromOptions(v),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(E=>this.fireError(E)),this.writable.onClose(()=>this.fireClose())}async write(g){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(g,this.options).then(E=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(E):E).then(E=>{const T=[];return T.push(i,E.byteLength.toString(),o),T.push(o),this.doWrite(g,T,E)},E=>{throw this.fireError(E),E}))}async doWrite(g,v,E){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(E)}catch(T){return this.handleError(T,g),Promise.reject(T)}}handleError(g,v){this.errorCount++,this.fireError(g,v,this.errorCount)}end(){this.writable.end()}},s(p,"WriteableStreamMessageWriter"),p);t.WriteableStreamMessageWriter=f}}),SN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var e=13,r=10,n=`\r
8
+ `,a=(i=class{constructor(u="utf-8"){this._encoding=u,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(u){const l=typeof u=="string"?this.fromString(u,this._encoding):u;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(u=!1){if(this._chunks.length===0)return;let l=0,c=0,f=0,d=0;e:for(;c<this._chunks.length;){const v=this._chunks[c];for(f=0;f<v.length;){switch(v[f]){case e:switch(l){case 0:l=1;break;case 2:l=3;break;default:l=0}break;case r:switch(l){case 1:l=2;break;case 3:l=4,f++;break e;default:l=0}break;default:l=0}f++}d+=v.byteLength,c++}if(l!==4)return;const p=this._read(d+f),m=new Map,g=this.toString(p,"ascii").split(n);if(g.length<2)return m;for(let v=0;v<g.length-2;v++){const E=g[v],T=E.indexOf(":");if(T===-1)throw new Error(`Message header must separate key and value using ':'
9
+ ${E}`);const b=E.substr(0,T),C=E.substr(T+1).trim();m.set(u?b.toLowerCase():b,C)}return m}tryReadBody(u){if(!(this._totalLength<u))return this._read(u)}get numberOfBytes(){return this._totalLength}_read(u){if(u===0)return this.emptyBuffer();if(u>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===u){const d=this._chunks[0];return this._chunks.shift(),this._totalLength-=u,this.asNative(d)}if(this._chunks[0].byteLength>u){const d=this._chunks[0],p=this.asNative(d,u);return this._chunks[0]=d.slice(u),this._totalLength-=u,p}const l=this.allocNative(u);let c=0,f=0;for(;u>0;){const d=this._chunks[f];if(d.byteLength>u){const p=d.slice(0,u);l.set(p,c),c+=u,this._chunks[f]=d.slice(u),this._totalLength-=u,u-=u}else l.set(d,c),c+=d.byteLength,this._chunks.shift(),this._totalLength-=d.byteLength,u-=d.byteLength}return l}},s(i,"AbstractMessageBuffer"),i);t.AbstractMessageBuffer=a}}),bN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){var P,S;Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var e=jn(),r=gu(),n=gT(),a=yT(),i=ti(),o=hf(),u;(function(R){R.type=new n.NotificationType("$/cancelRequest")})(u||(u={}));var l;(function(R){function I($){return typeof $=="string"||typeof $=="number"}s(I,"is"),R.is=I})(l||(t.ProgressToken=l={}));var c;(function(R){R.type=new n.NotificationType("$/progress")})(c||(c={}));var f=(P=class{constructor(){}},s(P,"ProgressType"),P);t.ProgressType=f;var d;(function(R){function I($){return r.func($)}s(I,"is"),R.is=I})(d||(d={})),t.NullLogger=Object.freeze({error:s(()=>{},"error"),warn:s(()=>{},"warn"),info:s(()=>{},"info"),log:s(()=>{},"log")});var p;(function(R){R[R.Off=0]="Off",R[R.Messages=1]="Messages",R[R.Compact=2]="Compact",R[R.Verbose=3]="Verbose"})(p||(t.Trace=p={}));var m;(function(R){R.Off="off",R.Messages="messages",R.Compact="compact",R.Verbose="verbose"})(m||(t.TraceValues=m={})),function(R){function I(A){if(!r.string(A))return R.Off;switch(A=A.toLowerCase(),A){case"off":return R.Off;case"messages":return R.Messages;case"compact":return R.Compact;case"verbose":return R.Verbose;default:return R.Off}}s(I,"fromString"),R.fromString=I;function $(A){switch(A){case R.Off:return"off";case R.Messages:return"messages";case R.Compact:return"compact";case R.Verbose:return"verbose";default:return"off"}}s($,"toString"),R.toString=$}(p||(t.Trace=p={}));var g;(function(R){R.Text="text",R.JSON="json"})(g||(t.TraceFormat=g={})),function(R){function I($){return r.string($)?($=$.toLowerCase(),$==="json"?R.JSON:R.Text):R.Text}s(I,"fromString"),R.fromString=I}(g||(t.TraceFormat=g={}));var v;(function(R){R.type=new n.NotificationType("$/setTrace")})(v||(t.SetTraceNotification=v={}));var E;(function(R){R.type=new n.NotificationType("$/logTrace")})(E||(t.LogTraceNotification=E={}));var T;(function(R){R[R.Closed=1]="Closed",R[R.Disposed=2]="Disposed",R[R.AlreadyListening=3]="AlreadyListening"})(T||(t.ConnectionErrors=T={}));var b=(S=class extends Error{constructor(I,$){super($),this.code=I,Object.setPrototypeOf(this,S.prototype)}},s(S,"ConnectionError"),S);t.ConnectionError=b;var C;(function(R){function I($){const A=$;return A&&r.func(A.cancelUndispatched)}s(I,"is"),R.is=I})(C||(t.ConnectionStrategy=C={}));var k;(function(R){function I($){const A=$;return A&&(A.kind===void 0||A.kind==="id")&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(k||(t.IdCancellationReceiverStrategy=k={}));var B;(function(R){function I($){const A=$;return A&&A.kind==="request"&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}s(I,"is"),R.is=I})(B||(t.RequestCancellationReceiverStrategy=B={}));var te;(function(R){R.Message=Object.freeze({createCancellationTokenSource($){return new o.CancellationTokenSource}});function I($){return k.is($)||B.is($)}s(I,"is"),R.is=I})(te||(t.CancellationReceiverStrategy=te={}));var X;(function(R){R.Message=Object.freeze({sendCancellation($,A){return $.sendNotification(u.type,{id:A})},cleanup($){}});function I($){const A=$;return A&&r.func(A.sendCancellation)&&r.func(A.cleanup)}s(I,"is"),R.is=I})(X||(t.CancellationSenderStrategy=X={}));var de;(function(R){R.Message=Object.freeze({receiver:te.Message,sender:X.Message});function I($){const A=$;return A&&te.is(A.receiver)&&X.is(A.sender)}s(I,"is"),R.is=I})(de||(t.CancellationStrategy=de={}));var Ee;(function(R){function I($){const A=$;return A&&r.func(A.handleMessage)}s(I,"is"),R.is=I})(Ee||(t.MessageStrategy=Ee={}));var Ie;(function(R){function I($){const A=$;return A&&(de.is(A.cancellationStrategy)||C.is(A.connectionStrategy)||Ee.is(A.messageStrategy))}s(I,"is"),R.is=I})(Ie||(t.ConnectionOptions=Ie={}));var oe;(function(R){R[R.New=1]="New",R[R.Listening=2]="Listening",R[R.Closed=3]="Closed",R[R.Disposed=4]="Disposed"})(oe||(oe={}));function tt(R,I,$,A){const w=$!==void 0?$:t.NullLogger;let O=0,M=0,L=0;const j="2.0";let F;const re=new Map;let U;const Q=new Map,pe=new Map;let he,me=new a.LinkedMap,_e=new Map,Pe=new Set,ge=new Map,J=p.Off,Be=g.Text,ce,Ye=oe.New;const ye=new i.Emitter,x=new i.Emitter,Ue=new i.Emitter,Xt=new i.Emitter,Nt=new i.Emitter,ve=A&&A.cancellationStrategy?A.cancellationStrategy:de.Message;function oa(y){if(y===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}s(oa,"createRequestQueueKey");function di(y){return y===null?"res-unknown-"+(++L).toString():"res-"+y.toString()}s(di,"createResponseQueueKey");function pi(){return"not-"+(++M).toString()}s(pi,"createNotificationQueueKey");function hi(y,N){n.Message.isRequest(N)?y.set(oa(N.id),N):n.Message.isResponse(N)?y.set(di(N.id),N):y.set(pi(),N)}s(hi,"addMessageToQueue");function mi(y){}s(mi,"cancelUndispatched");function la(){return Ye===oe.Listening}s(la,"isListening");function ua(){return Ye===oe.Closed}s(ua,"isClosed");function Jt(){return Ye===oe.Disposed}s(Jt,"isDisposed");function ca(){(Ye===oe.New||Ye===oe.Listening)&&(Ye=oe.Closed,x.fire(void 0))}s(ca,"closeHandler");function gi(y){ye.fire([y,void 0,void 0])}s(gi,"readErrorHandler");function yi(y){ye.fire(y)}s(yi,"writeErrorHandler"),R.onClose(ca),R.onError(gi),I.onClose(ca),I.onError(yi);function fa(){he||me.size===0||(he=(0,e.default)().timer.setImmediate(()=>{he=void 0,vi()}))}s(fa,"triggerMessageQueue");function da(y){n.Message.isRequest(y)?Ti(y):n.Message.isNotification(y)?$i(y):n.Message.isResponse(y)?Ri(y):Ai(y)}s(da,"handleMessage");function vi(){if(me.size===0)return;const y=me.shift();try{const N=A==null?void 0:A.messageStrategy;Ee.is(N)?N.handleMessage(y,da):da(y)}finally{fa()}}s(vi,"processMessageQueue");const Mu=s(y=>{try{if(n.Message.isNotification(y)&&y.method===u.type.method){const N=y.params.id,D=oa(N),G=me.get(D);if(n.Message.isRequest(G)){const fe=A==null?void 0:A.connectionStrategy,Te=fe&&fe.cancelUndispatched?fe.cancelUndispatched(G,mi):void 0;if(Te&&(Te.error!==void 0||Te.result!==void 0)){me.delete(D),ge.delete(N),Te.id=G.id,Gr(Te,y.method,Date.now()),I.write(Te).catch(()=>w.error("Sending response for canceled message failed."));return}}const Ce=ge.get(N);if(Ce!==void 0){Ce.cancel(),nn(y);return}else Pe.add(N)}hi(me,y)}finally{fa()}},"callback");function Ti(y){if(Jt())return;function N(ne,Le,le){const Ke={jsonrpc:j,id:y.id};ne instanceof n.ResponseError?Ke.error=ne.toJson():Ke.result=ne===void 0?null:ne,Gr(Ke,Le,le),I.write(Ke).catch(()=>w.error("Sending response failed."))}s(N,"reply");function D(ne,Le,le){const Ke={jsonrpc:j,id:y.id,error:ne.toJson()};Gr(Ke,Le,le),I.write(Ke).catch(()=>w.error("Sending response failed."))}s(D,"replyError");function G(ne,Le,le){ne===void 0&&(ne=null);const Ke={jsonrpc:j,id:y.id,result:ne};Gr(Ke,Le,le),I.write(Ke).catch(()=>w.error("Sending response failed."))}s(G,"replySuccess"),Ci(y);const Ce=re.get(y.method);let fe,Te;Ce&&(fe=Ce.type,Te=Ce.handler);const Ge=Date.now();if(Te||F){const ne=y.id??String(Date.now()),Le=k.is(ve.receiver)?ve.receiver.createCancellationTokenSource(ne):ve.receiver.createCancellationTokenSource(y);y.id!==null&&Pe.has(y.id)&&Le.cancel(),y.id!==null&&ge.set(ne,Le);try{let le;if(Te)if(y.params===void 0){if(fe!==void 0&&fe.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines ${fe.numberOfParams} params but received none.`),y.method,Ge);return}le=Te(Le.token)}else if(Array.isArray(y.params)){if(fe!==void 0&&fe.parameterStructures===n.ParameterStructures.byName){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,Ge);return}le=Te(...y.params,Le.token)}else{if(fe!==void 0&&fe.parameterStructures===n.ParameterStructures.byPosition){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,Ge);return}le=Te(y.params,Le.token)}else F&&(le=F(y.method,y.params,Le.token));const Ke=le;le?Ke.then?Ke.then(rt=>{ge.delete(ne),N(rt,y.method,Ge)},rt=>{ge.delete(ne),rt instanceof n.ResponseError?D(rt,y.method,Ge):rt&&r.string(rt.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${rt.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}):(ge.delete(ne),N(le,y.method,Ge)):(ge.delete(ne),G(le,y.method,Ge))}catch(le){ge.delete(ne),le instanceof n.ResponseError?N(le,y.method,Ge):le&&r.string(le.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${le.message}`),y.method,Ge):D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,Ge)}}else D(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,Ge)}s(Ti,"handleRequest");function Ri(y){if(!Jt())if(y.id===null)y.error?w.error(`Received response message without id: Error is:
10
+ ${JSON.stringify(y.error,void 0,4)}`):w.error("Received response message without id. No further error information provided.");else{const N=y.id,D=_e.get(N);if(Si(y,D),D!==void 0){_e.delete(N);try{if(y.error){const G=y.error;D.reject(new n.ResponseError(G.code,G.message,G.data))}else if(y.result!==void 0)D.resolve(y.result);else throw new Error("Should never happen.")}catch(G){G.message?w.error(`Response handler '${D.method}' failed with message: ${G.message}`):w.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}s(Ri,"handleResponse");function $i(y){if(Jt())return;let N,D;if(y.method===u.type.method){const G=y.params.id;Pe.delete(G),nn(y);return}else{const G=Q.get(y.method);G&&(D=G.handler,N=G.type)}if(D||U)try{if(nn(y),D)if(y.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&w.error(`Notification ${y.method} defines ${N.numberOfParams} params but received none.`),D();else if(Array.isArray(y.params)){const G=y.params;y.method===c.type.method&&G.length===2&&l.is(G[0])?D({token:G[0],value:G[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&w.error(`Notification ${y.method} defines parameters by name but received parameters by position`),N.numberOfParams!==y.params.length&&w.error(`Notification ${y.method} defines ${N.numberOfParams} params but received ${G.length} arguments`)),D(...G))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&w.error(`Notification ${y.method} defines parameters by position but received parameters by name`),D(y.params);else U&&U(y.method,y.params)}catch(G){G.message?w.error(`Notification handler '${y.method}' failed with message: ${G.message}`):w.error(`Notification handler '${y.method}' failed unexpectedly.`)}else Ue.fire(y)}s($i,"handleNotification");function Ai(y){if(!y){w.error("Received empty message.");return}w.error(`Received message which is neither a response nor a notification message:
11
+ ${JSON.stringify(y,null,4)}`);const N=y;if(r.string(N.id)||r.number(N.id)){const D=N.id,G=_e.get(D);G&&G.reject(new Error("The received response has neither a result nor an error property."))}}s(Ai,"handleInvalidMessage");function kt(y){if(y!=null)switch(J){case p.Verbose:return JSON.stringify(y,null,4);case p.Compact:return JSON.stringify(y);default:return}}s(kt,"stringifyTrace");function Ei(y){if(!(J===p.Off||!ce))if(Be===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
12
+
13
+ `),ce.log(`Sending request '${y.method} - (${y.id})'.`,N)}else Zt("send-request",y)}s(Ei,"traceSendingRequest");function _i(y){if(!(J===p.Off||!ce))if(Be===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)}
14
+
15
+ `:N=`No parameters provided.
16
+
17
+ `),ce.log(`Sending notification '${y.method}'.`,N)}else Zt("send-notification",y)}s(_i,"traceSendingNotification");function Gr(y,N,D){if(!(J===p.Off||!ce))if(Be===g.Text){let G;(J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?G=`Error data: ${kt(y.error.data)}
18
+
19
+ `:y.result?G=`Result: ${kt(y.result)}
20
+
21
+ `:y.error===void 0&&(G=`No result returned.
22
+
23
+ `)),ce.log(`Sending response '${N} - (${y.id})'. Processing request took ${Date.now()-D}ms`,G)}else Zt("send-response",y)}s(Gr,"traceSendingResponse");function Ci(y){if(!(J===p.Off||!ce))if(Be===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
24
+
25
+ `),ce.log(`Received request '${y.method} - (${y.id})'.`,N)}else Zt("receive-request",y)}s(Ci,"traceReceivedRequest");function nn(y){if(!(J===p.Off||!ce||y.method===E.type.method))if(Be===g.Text){let N;(J===p.Verbose||J===p.Compact)&&(y.params?N=`Params: ${kt(y.params)}
26
+
27
+ `:N=`No parameters provided.
28
+
29
+ `),ce.log(`Received notification '${y.method}'.`,N)}else Zt("receive-notification",y)}s(nn,"traceReceivedNotification");function Si(y,N){if(!(J===p.Off||!ce))if(Be===g.Text){let D;if((J===p.Verbose||J===p.Compact)&&(y.error&&y.error.data?D=`Error data: ${kt(y.error.data)}
30
+
31
+ `:y.result?D=`Result: ${kt(y.result)}
32
+
33
+ `:y.error===void 0&&(D=`No result returned.
34
+
35
+ `)),N){const G=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";ce.log(`Received response '${N.method} - (${y.id})' in ${Date.now()-N.timerStart}ms.${G}`,D)}else ce.log(`Received response ${y.id} without active response promise.`,D)}else Zt("receive-response",y)}s(Si,"traceReceivedResponse");function Zt(y,N){if(!ce||J===p.Off)return;const D={isLSPMessage:!0,type:y,message:N,timestamp:Date.now()};ce.log(D)}s(Zt,"logLSPMessage");function yr(){if(ua())throw new b(T.Closed,"Connection is closed.");if(Jt())throw new b(T.Disposed,"Connection is disposed.")}s(yr,"throwIfClosedOrDisposed");function bi(){if(la())throw new b(T.AlreadyListening,"Connection is already listening")}s(bi,"throwIfListening");function wi(){if(!la())throw new Error("Call listen() first.")}s(wi,"throwIfNotListening");function h(y){return y===void 0?null:y}s(h,"undefinedToNull");function se(y){if(y!==null)return y}s(se,"nullToUndefined");function Ne(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}s(Ne,"isNamedParam");function H(y,N){switch(y){case n.ParameterStructures.auto:return Ne(N)?se(N):[h(N)];case n.ParameterStructures.byName:if(!Ne(N))throw new Error("Received parameters by name but param is not an object literal.");return se(N);case n.ParameterStructures.byPosition:return[h(N)];default:throw new Error(`Unknown parameter structure ${y.toString()}`)}}s(H,"computeSingleParam");function Oe(y,N){let D;const G=y.numberOfParams;switch(G){case 0:D=void 0;break;case 1:D=H(y.parameterStructures,N[0]);break;default:D=[];for(let Ce=0;Ce<N.length&&Ce<G;Ce++)D.push(h(N[Ce]));if(N.length<G)for(let Ce=N.length;Ce<G;Ce++)D.push(null);break}return D}s(Oe,"computeMessageParams");const pa={sendNotification:s((y,...N)=>{yr();let D,G;if(r.string(y)){D=y;const fe=N[0];let Te=0,Ge=n.ParameterStructures.auto;n.ParameterStructures.is(fe)&&(Te=1,Ge=fe);let ne=N.length;const Le=ne-Te;switch(Le){case 0:G=void 0;break;case 1:G=H(Ge,N[Te]);break;default:if(Ge===n.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' notification parameter structure.`);G=N.slice(Te,ne).map(le=>h(le));break}}else{const fe=N;D=y.method,G=Oe(y,fe)}const Ce={jsonrpc:j,method:D,params:G};return _i(Ce),I.write(Ce).catch(fe=>{throw w.error("Sending notification failed."),fe})},"sendNotification"),onNotification:s((y,N)=>{yr();let D;return r.func(y)?U=y:N&&(r.string(y)?(D=y,Q.set(y,{type:void 0,handler:N})):(D=y.method,Q.set(y.method,{type:y,handler:N}))),{dispose:s(()=>{D!==void 0?Q.delete(D):U=void 0},"dispose")}},"onNotification"),onProgress:s((y,N,D)=>{if(pe.has(N))throw new Error(`Progress handler for token ${N} already registered`);return pe.set(N,D),{dispose:s(()=>{pe.delete(N)},"dispose")}},"onProgress"),sendProgress:s((y,N,D)=>pa.sendNotification(c.type,{token:N,value:D}),"sendProgress"),onUnhandledProgress:Xt.event,sendRequest:s((y,...N)=>{yr(),wi();let D,G,Ce;if(r.string(y)){D=y;const ne=N[0],Le=N[N.length-1];let le=0,Ke=n.ParameterStructures.auto;n.ParameterStructures.is(ne)&&(le=1,Ke=ne);let rt=N.length;o.CancellationToken.is(Le)&&(rt=rt-1,Ce=Le);const Qt=rt-le;switch(Qt){case 0:G=void 0;break;case 1:G=H(Ke,N[le]);break;default:if(Ke===n.ParameterStructures.byName)throw new Error(`Received ${Qt} parameters for 'by Name' request parameter structure.`);G=N.slice(le,rt).map(hN=>h(hN));break}}else{const ne=N;D=y.method,G=Oe(y,ne);const Le=y.numberOfParams;Ce=o.CancellationToken.is(ne[Le])?ne[Le]:void 0}const fe=O++;let Te;Ce&&(Te=Ce.onCancellationRequested(()=>{const ne=ve.sender.sendCancellation(pa,fe);return ne===void 0?(w.log(`Received no promise from cancellation strategy when cancelling id ${fe}`),Promise.resolve()):ne.catch(()=>{w.log(`Sending cancellation messages for id ${fe} failed`)})}));const Ge={jsonrpc:j,id:fe,method:D,params:G};return Ei(Ge),typeof ve.sender.enableCancellation=="function"&&ve.sender.enableCancellation(Ge),new Promise(async(ne,Le)=>{const le=s(Qt=>{ne(Qt),ve.sender.cleanup(fe),Te==null||Te.dispose()},"resolveWithCleanup"),Ke=s(Qt=>{Le(Qt),ve.sender.cleanup(fe),Te==null||Te.dispose()},"rejectWithCleanup"),rt={method:D,timerStart:Date.now(),resolve:le,reject:Ke};try{await I.write(Ge),_e.set(fe,rt)}catch(Qt){throw w.error("Sending request failed."),rt.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,Qt.message?Qt.message:"Unknown reason")),Qt}})},"sendRequest"),onRequest:s((y,N)=>{yr();let D=null;return d.is(y)?(D=void 0,F=y):r.string(y)?(D=null,N!==void 0&&(D=y,re.set(y,{handler:N,type:void 0}))):N!==void 0&&(D=y.method,re.set(y.method,{type:y,handler:N})),{dispose:s(()=>{D!==null&&(D!==void 0?re.delete(D):F=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>_e.size>0,"hasPendingResponse"),trace:s(async(y,N,D)=>{let G=!1,Ce=g.Text;D!==void 0&&(r.boolean(D)?G=D:(G=D.sendNotification||!1,Ce=D.traceFormat||g.Text)),J=y,Be=Ce,J===p.Off?ce=void 0:ce=N,G&&!ua()&&!Jt()&&await pa.sendNotification(v.type,{value:p.toString(y)})},"trace"),onError:ye.event,onClose:x.event,onUnhandledNotification:Ue.event,onDispose:Nt.event,end:s(()=>{I.end()},"end"),dispose:s(()=>{if(Jt())return;Ye=oe.Disposed,Nt.fire(void 0);const y=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of _e.values())N.reject(y);_e=new Map,ge=new Map,Pe=new Set,me=new a.LinkedMap,r.func(I.dispose)&&I.dispose(),r.func(R.dispose)&&R.dispose()},"dispose"),listen:s(()=>{yr(),bi(),Ye=oe.Listening,R.listen(Mu)},"listen"),inspect:s(()=>{(0,e.default)().console.log("inspect")},"inspect")};return pa.onNotification(E.type,y=>{if(J===p.Off||!ce)return;const N=J===p.Verbose||J===p.Compact;ce.log(y.message,N?y.verbose:void 0)}),pa.onNotification(c.type,y=>{const N=pe.get(y.token);N?N(y.value):Xt.fire(y)}),pa}s(tt,"createMessageConnection"),t.createMessageConnection=tt}}),qp=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;var e=gT();Object.defineProperty(t,"Message",{enumerable:!0,get:s(function(){return e.Message},"get")}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:s(function(){return e.RequestType},"get")}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:s(function(){return e.RequestType0},"get")}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:s(function(){return e.RequestType1},"get")}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:s(function(){return e.RequestType2},"get")}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:s(function(){return e.RequestType3},"get")}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:s(function(){return e.RequestType4},"get")}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:s(function(){return e.RequestType5},"get")}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:s(function(){return e.RequestType6},"get")}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:s(function(){return e.RequestType7},"get")}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:s(function(){return e.RequestType8},"get")}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:s(function(){return e.RequestType9},"get")}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:s(function(){return e.ResponseError},"get")}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:s(function(){return e.ErrorCodes},"get")}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:s(function(){return e.NotificationType},"get")}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:s(function(){return e.NotificationType0},"get")}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:s(function(){return e.NotificationType1},"get")}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:s(function(){return e.NotificationType2},"get")}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:s(function(){return e.NotificationType3},"get")}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:s(function(){return e.NotificationType4},"get")}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:s(function(){return e.NotificationType5},"get")}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:s(function(){return e.NotificationType6},"get")}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:s(function(){return e.NotificationType7},"get")}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:s(function(){return e.NotificationType8},"get")}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:s(function(){return e.NotificationType9},"get")}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:s(function(){return e.ParameterStructures},"get")});var r=yT();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:s(function(){return r.LinkedMap},"get")}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:s(function(){return r.LRUCache},"get")}),Object.defineProperty(t,"Touch",{enumerable:!0,get:s(function(){return r.Touch},"get")});var n=AN();Object.defineProperty(t,"Disposable",{enumerable:!0,get:s(function(){return n.Disposable},"get")});var a=ti();Object.defineProperty(t,"Event",{enumerable:!0,get:s(function(){return a.Event},"get")}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:s(function(){return a.Emitter},"get")});var i=hf();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:s(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:s(function(){return i.CancellationToken},"get")});var o=EN();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:s(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:s(function(){return o.SharedArrayReceiverStrategy},"get")});var u=_N();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:s(function(){return u.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:s(function(){return u.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return u.ReadableStreamMessageReader},"get")});var l=CN();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:s(function(){return l.MessageWriter},"get")}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:s(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:s(function(){return l.WriteableStreamMessageWriter},"get")});var c=SN();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return c.AbstractMessageBuffer},"get")});var f=bN();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:s(function(){return f.ConnectionStrategy},"get")}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:s(function(){return f.ConnectionOptions},"get")}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:s(function(){return f.NullLogger},"get")}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:s(function(){return f.createMessageConnection},"get")}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:s(function(){return f.ProgressToken},"get")}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:s(function(){return f.ProgressType},"get")}),Object.defineProperty(t,"Trace",{enumerable:!0,get:s(function(){return f.Trace},"get")}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:s(function(){return f.TraceValues},"get")}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:s(function(){return f.TraceFormat},"get")}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:s(function(){return f.SetTraceNotification},"get")}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:s(function(){return f.LogTraceNotification},"get")}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:s(function(){return f.ConnectionErrors},"get")}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:s(function(){return f.ConnectionError},"get")}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:s(function(){return f.CancellationReceiverStrategy},"get")}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:s(function(){return f.CancellationSenderStrategy},"get")}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:s(function(){return f.CancellationStrategy},"get")}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:s(function(){return f.MessageStrategy},"get")});var d=jn();t.RAL=d.default}}),wN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){var l,c,f;Object.defineProperty(t,"__esModule",{value:!0});var e=qp(),r=(l=class extends e.AbstractMessageBuffer{constructor(p="utf-8"){super(p),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return l.emptyBuffer}fromString(p,m){return new TextEncoder().encode(p)}toString(p,m){return m==="ascii"?this.asciiDecoder.decode(p):new TextDecoder(m).decode(p)}asNative(p,m){return m===void 0?p:p.slice(0,m)}allocNative(p){return new Uint8Array(p)}},s(l,"MessageBuffer"),l);r.emptyBuffer=new Uint8Array(0);var n=(c=class{constructor(p){this.socket=p,this._onData=new e.Emitter,this._messageListener=m=>{m.data.arrayBuffer().then(v=>{this._onData.fire(new Uint8Array(v))},()=>{(0,e.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}onData(p){return this._onData.event(p)}},s(c,"ReadableStreamWrapper"),c),a=(f=class{constructor(p){this.socket=p}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}write(p,m){if(typeof p=="string"){if(m!==void 0&&m!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${m}`);this.socket.send(p)}else this.socket.send(p);return Promise.resolve()}end(){this.socket.close()}},s(f,"WritableStreamWrapper"),f),i=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:s(d=>new r(d),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:s((d,p)=>{if(p.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${p.charset}`);return Promise.resolve(i.encode(JSON.stringify(d,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:s((d,p)=>{if(!(d instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(p.charset).decode(d)))},"decode")})}),stream:Object.freeze({asReadableStream:s(d=>new n(d),"asReadableStream"),asWritableStream:s(d=>new a(d),"asWritableStream")}),console,timer:Object.freeze({setTimeout(d,p,...m){const g=setTimeout(d,p,...m);return{dispose:s(()=>clearTimeout(g),"dispose")}},setImmediate(d,...p){const m=setTimeout(d,0,...p);return{dispose:s(()=>clearTimeout(m),"dispose")}},setInterval(d,p,...m){const g=setInterval(d,p,...m);return{dispose:s(()=>clearInterval(g),"dispose")}}})});function u(){return o}s(u,"RIL"),function(d){function p(){e.RAL.install(o)}s(p,"install"),d.install=p}(u||(u={})),t.default=u}}),ri=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var l,c;var e=t&&t.__createBinding||(Object.create?function(f,d,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(d,p);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:s(function(){return d[p]},"get")}),Object.defineProperty(f,m,g)}:function(f,d,p,m){m===void 0&&(m=p),f[m]=d[p]}),r=t&&t.__exportStar||function(f,d){for(var p in f)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&e(d,f,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;var n=wN();n.default.install();var a=qp();r(qp(),t);var i=(l=class extends a.AbstractMessageReader{constructor(d){super(),this._onData=new a.Emitter,this._messageListener=p=>{this._onData.fire(p.data)},d.addEventListener("error",p=>this.fireError(p)),d.onmessage=this._messageListener}listen(d){return this._onData.event(d)}},s(l,"BrowserMessageReader"),l);t.BrowserMessageReader=i;var o=(c=class extends a.AbstractMessageWriter{constructor(d){super(),this.port=d,this.errorCount=0,d.addEventListener("error",p=>this.fireError(p))}write(d){try{return this.port.postMessage(d),Promise.resolve()}catch(p){return this.handleError(p,d),Promise.reject(p)}}handleError(d,p){this.errorCount++,this.fireError(d,p,this.errorCount)}end(){}},s(c,"BrowserMessageWriter"),c);t.BrowserMessageWriter=o;function u(f,d,p,m){return p===void 0&&(p=a.NullLogger),a.ConnectionStrategy.is(m)&&(m={connectionStrategy:m}),(0,a.createMessageConnection)(f,d,p,m)}s(u,"createMessageConnection"),t.createMessageConnection=u}}),Cy=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=ri()}}),Me=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){var l,c,f,d,p;Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var e=ri(),r;(function(m){m.clientToServer="clientToServer",m.serverToClient="serverToClient",m.both="both"})(r||(t.MessageDirection=r={}));var n=(l=class{constructor(g){this.method=g}},s(l,"RegistrationType"),l);t.RegistrationType=n;var a=(c=class extends e.RequestType0{constructor(g){super(g)}},s(c,"ProtocolRequestType0"),c);t.ProtocolRequestType0=a;var i=(f=class extends e.RequestType{constructor(g){super(g,e.ParameterStructures.byName)}},s(f,"ProtocolRequestType"),f);t.ProtocolRequestType=i;var o=(d=class extends e.NotificationType0{constructor(g){super(g)}},s(d,"ProtocolNotificationType0"),d);t.ProtocolNotificationType0=o;var u=(p=class extends e.NotificationType{constructor(g){super(g,e.ParameterStructures.byName)}},s(p,"ProtocolNotificationType"),p);t.ProtocolNotificationType=u}}),zh=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(f){return f===!0||f===!1}s(e,"boolean"),t.boolean=e;function r(f){return typeof f=="string"||f instanceof String}s(r,"string"),t.string=r;function n(f){return typeof f=="number"||f instanceof Number}s(n,"number"),t.number=n;function a(f){return f instanceof Error}s(a,"error"),t.error=a;function i(f){return typeof f=="function"}s(i,"func"),t.func=i;function o(f){return Array.isArray(f)}s(o,"array"),t.array=o;function u(f){return o(f)&&f.every(d=>r(d))}s(u,"stringArray"),t.stringArray=u;function l(f,d){return Array.isArray(f)&&f.every(d)}s(l,"typedArray"),t.typedArray=l;function c(f){return f!==null&&typeof f=="object"}s(c,"objectLiteral"),t.objectLiteral=c}}),IN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ImplementationRequest=r={}))}}),NN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.TypeDefinitionRequest=r={}))}}),kN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;var e=Me(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(r||(t.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolNotificationType(a.method)})(n||(t.DidChangeWorkspaceFoldersNotification=n={}))}}),PN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;var e=Me(),r;(function(n){n.method="workspace/configuration",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ConfigurationRequest=r={}))}}),ON=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(n||(t.ColorPresentationRequest=n={}))}}),LN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.FoldingRangeRefreshRequest=n={}))}}),DN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.DeclarationRequest=r={}))}}),MN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.SelectionRangeRequest=r={}))}}),xN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var e=ri(),r=Me(),n;(function(o){o.type=new e.ProgressType;function u(l){return l===o.type}s(u,"is"),o.is=u})(n||(t.WorkDoneProgress=n={}));var a;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var i;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(i||(t.WorkDoneProgressCancelNotification=i={}))}}),FN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.CallHierarchyPrepareRequest=r={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.CallHierarchyIncomingCallsRequest=n={}));var a;(function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.CallHierarchyOutgoingCallsRequest=a={}))}}),GN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;var e=Me(),r;(function(l){l.Relative="relative"})(r||(t.TokenFormat=r={}));var n;(function(l){l.method="textDocument/semanticTokens",l.type=new e.RegistrationType(l.method)})(n||(t.SemanticTokensRegistrationType=n={}));var a;(function(l){l.method="textDocument/semanticTokens/full",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(a||(t.SemanticTokensRequest=a={}));var i;(function(l){l.method="textDocument/semanticTokens/full/delta",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(i||(t.SemanticTokensDeltaRequest=i={}));var o;(function(l){l.method="textDocument/semanticTokens/range",l.messageDirection=e.MessageDirection.clientToServer,l.type=new e.ProtocolRequestType(l.method),l.registrationMethod=n.method})(o||(t.SemanticTokensRangeRequest=o={}));var u;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=e.MessageDirection.serverToClient,l.type=new e.ProtocolRequestType0(l.method)})(u||(t.SemanticTokensRefreshRequest=u={}))}}),jN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;var e=Me(),r;(function(n){n.method="window/showDocument",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ShowDocumentRequest=r={}))}}),UN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.LinkedEditingRangeRequest=r={}))}}),zN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;var e=Me(),r;(function(c){c.file="file",c.folder="folder"})(r||(t.FileOperationPatternKind=r={}));var n;(function(c){c.method="workspace/willCreateFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolRequestType(c.method)})(n||(t.WillCreateFilesRequest=n={}));var a;(function(c){c.method="workspace/didCreateFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolNotificationType(c.method)})(a||(t.DidCreateFilesNotification=a={}));var i;(function(c){c.method="workspace/willRenameFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolRequestType(c.method)})(i||(t.WillRenameFilesRequest=i={}));var o;(function(c){c.method="workspace/didRenameFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolNotificationType(c.method)})(o||(t.DidRenameFilesNotification=o={}));var u;(function(c){c.method="workspace/didDeleteFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolNotificationType(c.method)})(u||(t.DidDeleteFilesNotification=u={}));var l;(function(c){c.method="workspace/willDeleteFiles",c.messageDirection=e.MessageDirection.clientToServer,c.type=new e.ProtocolRequestType(c.method)})(l||(t.WillDeleteFilesRequest=l={}))}}),BN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;var e=Me(),r;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(r||(t.UniquenessLevel=r={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(t.MonikerKind=n={}));var a;(function(i){i.method="textDocument/moniker",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.MonikerRequest=a={}))}}),KN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.TypeHierarchyPrepareRequest=r={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.TypeHierarchySupertypesRequest=n={}));var a;(function(i){i.method="typeHierarchy/subtypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.TypeHierarchySubtypesRequest=a={}))}}),qN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;var e=Me(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.InlineValueRefreshRequest=n={}))}}),WN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;var e=Me(),r;(function(i){i.method="textDocument/inlayHint",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.InlayHintRequest=r={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.InlayHintResolveRequest=n={}));var a;(function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=e.MessageDirection.serverToClient,i.type=new e.ProtocolRequestType0(i.method)})(a||(t.InlayHintRefreshRequest=a={}))}}),VN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var e=ri(),r=zh(),n=Me(),a;(function(c){function f(d){const p=d;return p&&r.boolean(p.retriggerRequest)}s(f,"is"),c.is=f})(a||(t.DiagnosticServerCancellationData=a={}));var i;(function(c){c.Full="full",c.Unchanged="unchanged"})(i||(t.DocumentDiagnosticReportKind=i={}));var o;(function(c){c.method="textDocument/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new e.ProgressType})(o||(t.DocumentDiagnosticRequest=o={}));var u;(function(c){c.method="workspace/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new e.ProgressType})(u||(t.WorkspaceDiagnosticRequest=u={}));var l;(function(c){c.method="workspace/diagnostic/refresh",c.messageDirection=n.MessageDirection.serverToClient,c.type=new n.ProtocolRequestType0(c.method)})(l||(t.DiagnosticRefreshRequest=l={}))}}),HN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var e=(mu(),Uh(pf)),r=zh(),n=Me(),a;(function(g){g.Markup=1,g.Code=2;function v(E){return E===1||E===2}s(v,"is"),g.is=v})(a||(t.NotebookCellKind=a={}));var i;(function(g){function v(b,C){const k={executionOrder:b};return(C===!0||C===!1)&&(k.success=C),k}s(v,"create"),g.create=v;function E(b){const C=b;return r.objectLiteral(C)&&e.uinteger.is(C.executionOrder)&&(C.success===void 0||r.boolean(C.success))}s(E,"is"),g.is=E;function T(b,C){return b===C?!0:b==null||C===null||C===void 0?!1:b.executionOrder===C.executionOrder&&b.success===C.success}s(T,"equals"),g.equals=T})(i||(t.ExecutionSummary=i={}));var o;(function(g){function v(C,k){return{kind:C,document:k}}s(v,"create"),g.create=v;function E(C){const k=C;return r.objectLiteral(k)&&a.is(k.kind)&&e.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}s(E,"is"),g.is=E;function T(C,k){const B=new Set;return C.document!==k.document&&B.add("document"),C.kind!==k.kind&&B.add("kind"),C.executionSummary!==k.executionSummary&&B.add("executionSummary"),(C.metadata!==void 0||k.metadata!==void 0)&&!b(C.metadata,k.metadata)&&B.add("metadata"),(C.executionSummary!==void 0||k.executionSummary!==void 0)&&!i.equals(C.executionSummary,k.executionSummary)&&B.add("executionSummary"),B}s(T,"diff"),g.diff=T;function b(C,k){if(C===k)return!0;if(C==null||k===null||k===void 0||typeof C!=typeof k||typeof C!="object")return!1;const B=Array.isArray(C),te=Array.isArray(k);if(B!==te)return!1;if(B&&te){if(C.length!==k.length)return!1;for(let X=0;X<C.length;X++)if(!b(C[X],k[X]))return!1}if(r.objectLiteral(C)&&r.objectLiteral(k)){const X=Object.keys(C),de=Object.keys(k);if(X.length!==de.length||(X.sort(),de.sort(),!b(X,de)))return!1;for(let Ee=0;Ee<X.length;Ee++){const Ie=X[Ee];if(!b(C[Ie],k[Ie]))return!1}}return!0}s(b,"equalsMetadata")})(o||(t.NotebookCell=o={}));var u;(function(g){function v(T,b,C,k){return{uri:T,notebookType:b,version:C,cells:k}}s(v,"create"),g.create=v;function E(T){const b=T;return r.objectLiteral(b)&&r.string(b.uri)&&e.integer.is(b.version)&&r.typedArray(b.cells,o.is)}s(E,"is"),g.is=E})(u||(t.NotebookDocument=u={}));var l;(function(g){g.method="notebookDocument/sync",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.RegistrationType(g.method)})(l||(t.NotebookDocumentSyncRegistrationType=l={}));var c;(function(g){g.method="notebookDocument/didOpen",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(c||(t.DidOpenNotebookDocumentNotification=c={}));var f;(function(g){function v(T){const b=T;return r.objectLiteral(b)&&e.uinteger.is(b.start)&&e.uinteger.is(b.deleteCount)&&(b.cells===void 0||r.typedArray(b.cells,o.is))}s(v,"is"),g.is=v;function E(T,b,C){const k={start:T,deleteCount:b};return C!==void 0&&(k.cells=C),k}s(E,"create"),g.create=E})(f||(t.NotebookCellArrayChange=f={}));var d;(function(g){g.method="notebookDocument/didChange",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(d||(t.DidChangeNotebookDocumentNotification=d={}));var p;(function(g){g.method="notebookDocument/didSave",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(p||(t.DidSaveNotebookDocumentNotification=p={}));var m;(function(g){g.method="notebookDocument/didClose",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(m||(t.DidCloseNotebookDocumentNotification=m={}))}}),YN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;var e=Me(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.InlineCompletionRequest=r={}))}}),XN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=Me(),r=(mu(),Uh(pf)),n=zh(),a=IN();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:s(function(){return a.ImplementationRequest},"get")});var i=NN();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:s(function(){return i.TypeDefinitionRequest},"get")});var o=kN();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:s(function(){return o.WorkspaceFoldersRequest},"get")}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:s(function(){return o.DidChangeWorkspaceFoldersNotification},"get")});var u=PN();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:s(function(){return u.ConfigurationRequest},"get")});var l=ON();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:s(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:s(function(){return l.ColorPresentationRequest},"get")});var c=LN();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:s(function(){return c.FoldingRangeRequest},"get")}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:s(function(){return c.FoldingRangeRefreshRequest},"get")});var f=DN();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:s(function(){return f.DeclarationRequest},"get")});var d=MN();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:s(function(){return d.SelectionRangeRequest},"get")});var p=xN();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:s(function(){return p.WorkDoneProgress},"get")}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:s(function(){return p.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:s(function(){return p.WorkDoneProgressCancelNotification},"get")});var m=FN();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return m.CallHierarchyPrepareRequest},"get")});var g=GN();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:s(function(){return g.TokenFormat},"get")}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRequest},"get")}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRangeRequest},"get")}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:s(function(){return g.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:s(function(){return g.SemanticTokensRegistrationType},"get")});var v=jN();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:s(function(){return v.ShowDocumentRequest},"get")});var E=UN();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:s(function(){return E.LinkedEditingRangeRequest},"get")});var T=zN();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:s(function(){return T.FileOperationPatternKind},"get")}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:s(function(){return T.DidCreateFilesNotification},"get")}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:s(function(){return T.WillCreateFilesRequest},"get")}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:s(function(){return T.DidRenameFilesNotification},"get")}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:s(function(){return T.WillRenameFilesRequest},"get")}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:s(function(){return T.DidDeleteFilesNotification},"get")}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:s(function(){return T.WillDeleteFilesRequest},"get")});var b=BN();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:s(function(){return b.UniquenessLevel},"get")}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:s(function(){return b.MonikerKind},"get")}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:s(function(){return b.MonikerRequest},"get")});var C=KN();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:s(function(){return C.TypeHierarchySupertypesRequest},"get")});var k=qN();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:s(function(){return k.InlineValueRequest},"get")}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:s(function(){return k.InlineValueRefreshRequest},"get")});var B=WN();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:s(function(){return B.InlayHintRequest},"get")}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:s(function(){return B.InlayHintResolveRequest},"get")}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:s(function(){return B.InlayHintRefreshRequest},"get")});var te=VN();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:s(function(){return te.DiagnosticServerCancellationData},"get")}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:s(function(){return te.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:s(function(){return te.DocumentDiagnosticRequest},"get")}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:s(function(){return te.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:s(function(){return te.DiagnosticRefreshRequest},"get")});var X=HN();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:s(function(){return X.NotebookCellKind},"get")}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:s(function(){return X.ExecutionSummary},"get")}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:s(function(){return X.NotebookCell},"get")}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:s(function(){return X.NotebookDocument},"get")}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:s(function(){return X.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:s(function(){return X.NotebookCellArrayChange},"get")}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:s(function(){return X.DidCloseNotebookDocumentNotification},"get")});var de=YN();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:s(function(){return de.InlineCompletionRequest},"get")});var Ee;(function(h){function se(Ne){const H=Ne;return n.string(H)||n.string(H.language)||n.string(H.scheme)||n.string(H.pattern)}s(se,"is"),h.is=se})(Ee||(t.TextDocumentFilter=Ee={}));var Ie;(function(h){function se(Ne){const H=Ne;return n.objectLiteral(H)&&(n.string(H.notebookType)||n.string(H.scheme)||n.string(H.pattern))}s(se,"is"),h.is=se})(Ie||(t.NotebookDocumentFilter=Ie={}));var oe;(function(h){function se(Ne){const H=Ne;return n.objectLiteral(H)&&(n.string(H.notebook)||Ie.is(H.notebook))&&(H.language===void 0||n.string(H.language))}s(se,"is"),h.is=se})(oe||(t.NotebookCellTextDocumentFilter=oe={}));var tt;(function(h){function se(Ne){if(!Array.isArray(Ne))return!1;for(let H of Ne)if(!n.string(H)&&!Ee.is(H)&&!oe.is(H))return!1;return!0}s(se,"is"),h.is=se})(tt||(t.DocumentSelector=tt={}));var P;(function(h){h.method="client/registerCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(P||(t.RegistrationRequest=P={}));var S;(function(h){h.method="client/unregisterCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(S||(t.UnregistrationRequest=S={}));var R;(function(h){h.Create="create",h.Rename="rename",h.Delete="delete"})(R||(t.ResourceOperationKind=R={}));var I;(function(h){h.Abort="abort",h.Transactional="transactional",h.TextOnlyTransactional="textOnlyTransactional",h.Undo="undo"})(I||(t.FailureHandlingKind=I={}));var $;(function(h){h.UTF8="utf-8",h.UTF16="utf-16",h.UTF32="utf-32"})($||(t.PositionEncodingKind=$={}));var A;(function(h){function se(Ne){const H=Ne;return H&&n.string(H.id)&&H.id.length>0}s(se,"hasId"),h.hasId=se})(A||(t.StaticRegistrationOptions=A={}));var w;(function(h){function se(Ne){const H=Ne;return H&&(H.documentSelector===null||tt.is(H.documentSelector))}s(se,"is"),h.is=se})(w||(t.TextDocumentRegistrationOptions=w={}));var O;(function(h){function se(H){const Oe=H;return n.objectLiteral(Oe)&&(Oe.workDoneProgress===void 0||n.boolean(Oe.workDoneProgress))}s(se,"is"),h.is=se;function Ne(H){const Oe=H;return Oe&&n.boolean(Oe.workDoneProgress)}s(Ne,"hasWorkDoneProgress"),h.hasWorkDoneProgress=Ne})(O||(t.WorkDoneProgressOptions=O={}));var M;(function(h){h.method="initialize",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(M||(t.InitializeRequest=M={}));var L;(function(h){h.unknownProtocolVersion=1})(L||(t.InitializeErrorCodes=L={}));var j;(function(h){h.method="initialized",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(j||(t.InitializedNotification=j={}));var F;(function(h){h.method="shutdown",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType0(h.method)})(F||(t.ShutdownRequest=F={}));var re;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(re||(t.ExitNotification=re={}));var U;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(U||(t.DidChangeConfigurationNotification=U={}));var Q;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Q||(t.MessageType=Q={}));var pe;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(pe||(t.ShowMessageNotification=pe={}));var he;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(he||(t.ShowMessageRequest=he={}));var me;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(me||(t.LogMessageNotification=me={}));var _e;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(_e||(t.TelemetryEventNotification=_e={}));var Pe;(function(h){h.None=0,h.Full=1,h.Incremental=2})(Pe||(t.TextDocumentSyncKind=Pe={}));var ge;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(ge||(t.DidOpenTextDocumentNotification=ge={}));var J;(function(h){function se(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range!==void 0&&(Oe.rangeLength===void 0||typeof Oe.rangeLength=="number")}s(se,"isIncremental"),h.isIncremental=se;function Ne(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range===void 0&&Oe.rangeLength===void 0}s(Ne,"isFull"),h.isFull=Ne})(J||(t.TextDocumentContentChangeEvent=J={}));var Be;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Be||(t.DidChangeTextDocumentNotification=Be={}));var ce;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(ce||(t.DidCloseTextDocumentNotification=ce={}));var Ye;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ye||(t.DidSaveTextDocumentNotification=Ye={}));var ye;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(ye||(t.TextDocumentSaveReason=ye={}));var x;(function(h){h.method="textDocument/willSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(x||(t.WillSaveTextDocumentNotification=x={}));var Ue;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ue||(t.WillSaveTextDocumentWaitUntilRequest=Ue={}));var Xt;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Xt||(t.DidChangeWatchedFilesNotification=Xt={}));var Nt;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(Nt||(t.FileChangeType=Nt={}));var ve;(function(h){function se(Ne){const H=Ne;return n.objectLiteral(H)&&(r.URI.is(H.baseUri)||r.WorkspaceFolder.is(H.baseUri))&&n.string(H.pattern)}s(se,"is"),h.is=se})(ve||(t.RelativePattern=ve={}));var oa;(function(h){h.Create=1,h.Change=2,h.Delete=4})(oa||(t.WatchKind=oa={}));var di;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(di||(t.PublishDiagnosticsNotification=di={}));var pi;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(pi||(t.CompletionTriggerKind=pi={}));var hi;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(hi||(t.CompletionRequest=hi={}));var mi;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(mi||(t.CompletionResolveRequest=mi={}));var la;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(la||(t.HoverRequest=la={}));var ua;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(ua||(t.SignatureHelpTriggerKind=ua={}));var Jt;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Jt||(t.SignatureHelpRequest=Jt={}));var ca;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ca||(t.DefinitionRequest=ca={}));var gi;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(gi||(t.ReferencesRequest=gi={}));var yi;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(yi||(t.DocumentHighlightRequest=yi={}));var fa;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(fa||(t.DocumentSymbolRequest=fa={}));var da;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(da||(t.CodeActionRequest=da={}));var vi;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(vi||(t.CodeActionResolveRequest=vi={}));var Mu;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Mu||(t.WorkspaceSymbolRequest=Mu={}));var Ti;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ti||(t.WorkspaceSymbolResolveRequest=Ti={}));var Ri;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ri||(t.CodeLensRequest=Ri={}));var $i;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})($i||(t.CodeLensResolveRequest=$i={}));var Ai;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(Ai||(t.CodeLensRefreshRequest=Ai={}));var kt;(function(h){h.method="textDocument/documentLink",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(kt||(t.DocumentLinkRequest=kt={}));var Ei;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ei||(t.DocumentLinkResolveRequest=Ei={}));var _i;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(_i||(t.DocumentFormattingRequest=_i={}));var Gr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Gr||(t.DocumentRangeFormattingRequest=Gr={}));var Ci;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ci||(t.DocumentRangesFormattingRequest=Ci={}));var nn;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(nn||(t.DocumentOnTypeFormattingRequest=nn={}));var Si;(function(h){h.Identifier=1})(Si||(t.PrepareSupportDefaultBehavior=Si={}));var Zt;(function(h){h.method="textDocument/rename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zt||(t.RenameRequest=Zt={}));var yr;(function(h){h.method="textDocument/prepareRename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(yr||(t.PrepareRenameRequest=yr={}));var bi;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(bi||(t.ExecuteCommandRequest=bi={}));var wi;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(wi||(t.ApplyWorkspaceEditRequest=wi={}))}}),JN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var e=ri();function r(n,a,i,o){return e.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,e.createMessageConnection)(n,a,i,o)}s(r,"createProtocolConnection"),t.createProtocolConnection=r}}),ZN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:s(function(){return o[u]},"get")}),Object.defineProperty(i,l,c)}:function(i,o,u,l){l===void 0&&(l=u),i[l]=o[u]}),r=t&&t.__exportStar||function(i,o){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,i,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(ri(),t),r((mu(),Uh(pf)),t),r(Me(),t),r(XN(),t);var n=JN();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:s(function(){return n.createProtocolConnection},"get")});var a;(function(i){i.lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))}}),QN=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,o,u,l){l===void 0&&(l=u);var c=Object.getOwnPropertyDescriptor(o,u);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:s(function(){return o[u]},"get")}),Object.defineProperty(i,l,c)}:function(i,o,u,l){l===void 0&&(l=u),i[l]=o[u]}),r=t&&t.__exportStar||function(i,o){for(var u in i)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,i,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=Cy();r(Cy(),t),r(ZN(),t);function a(i,o,u,l){return(0,n.createMessageConnection)(i,o,u,l)}s(a,"createProtocolConnection"),t.createProtocolConnection=a}}),TT={};Zr(TT,{AbstractAstReflection:()=>qh,AbstractCstNode:()=>Vg,AbstractLangiumParser:()=>Yg,AbstractParserErrorMessageProvider:()=>oI,AbstractThreadedAsyncParser:()=>bj,AstUtils:()=>Wh,BiMap:()=>lf,Cancellation:()=>$e,CompositeCstNodeImpl:()=>cd,ContextCache:()=>yd,CstNodeBuilder:()=>aI,CstUtils:()=>Bh,DEFAULT_TOKENIZE_OPTIONS:()=>py,DONE_RESULT:()=>nt,DatatypeSymbol:()=>nf,DefaultAstNodeDescriptionProvider:()=>xI,DefaultAstNodeLocator:()=>GI,DefaultAsyncParser:()=>nN,DefaultCommentProvider:()=>rN,DefaultConfigurationProvider:()=>jI,DefaultDocumentBuilder:()=>UI,DefaultDocumentValidator:()=>MI,DefaultHydrator:()=>iN,DefaultIndexManager:()=>zI,DefaultJsonSerializer:()=>PI,DefaultLangiumDocumentFactory:()=>EI,DefaultLangiumDocuments:()=>_I,DefaultLangiumProfiler:()=>Pj,DefaultLexer:()=>hy,DefaultLexerErrorMessageProvider:()=>KI,DefaultLinker:()=>CI,DefaultNameProvider:()=>SI,DefaultReferenceDescriptionProvider:()=>FI,DefaultReferences:()=>bI,DefaultScopeComputation:()=>wI,DefaultScopeProvider:()=>kI,DefaultServiceRegistry:()=>OI,DefaultTokenBuilder:()=>pd,DefaultValueConverter:()=>ry,DefaultWorkspaceLock:()=>aN,DefaultWorkspaceManager:()=>BI,Deferred:()=>Or,Disposable:()=>Ln,DisposableCache:()=>gd,DocumentCache:()=>NI,DocumentState:()=>Z,DocumentValidator:()=>Ot,EMPTY_SCOPE:()=>Ej,EMPTY_STREAM:()=>Ua,EmptyFileSystem:()=>Gt,EmptyFileSystemProvider:()=>lN,ErrorWithLocation:()=>Ef,GrammarAST:()=>AT,GrammarUtils:()=>Am,IndentationAwareLexer:()=>Ij,IndentationAwareTokenBuilder:()=>oN,JSDocDocumentationProvider:()=>tN,LangiumCompletionParser:()=>lI,LangiumParser:()=>sI,LangiumParserErrorMessageProvider:()=>Xg,LeafCstNodeImpl:()=>rf,LexingMode:()=>Pn,MapScope:()=>Aj,Module:()=>Sh,MultiMap:()=>Lr,MultiMapScope:()=>II,OperationCancelled:()=>or,ParserWorker:()=>wj,ProfilingTask:()=>cN,Reduction:()=>ps,RefResolving:()=>hn,RegExpUtils:()=>_m,RootCstNodeImpl:()=>Hg,SimpleCache:()=>ly,StreamImpl:()=>sr,StreamScope:()=>Ah,TextDocument:()=>sf,TreeStreamImpl:()=>za,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,VALIDATE_EACH_NODE:()=>DI,ValidationCategory:()=>uf,ValidationRegistry:()=>LI,ValueConverter:()=>ar,WorkspaceCache:()=>uy,assertCondition:()=>Em,assertUnreachable:()=>Qr,createCompletionParser:()=>Qg,createDefaultCoreModule:()=>St,createDefaultSharedCoreModule:()=>bt,createGrammarConfig:()=>zm,createLangiumParser:()=>ey,createParser:()=>fd,delayNextTick:()=>hd,diagnosticData:()=>kn,eagerLoad:()=>$y,getDiagnosticRange:()=>fy,indentationBuilderDefaultOptions:()=>wh,inject:()=>ke,interruptAndCheck:()=>He,isAstNode:()=>ze,isAstNodeDescription:()=>Kh,isAstNodeWithComment:()=>cy,isCompositeCstNode:()=>Cr,isIMultiModeLexerDefinition:()=>Rd,isJSDoc:()=>gy,isLeafCstNode:()=>Un,isLinkingError:()=>yn,isMultiReference:()=>lr,isNamed:()=>oy,isOperationCancelled:()=>sa,isReference:()=>at,isRootCstNode:()=>mf,isTokenTypeArray:()=>Td,isTokenTypeDictionary:()=>cf,loadGrammarFromJson:()=>wt,parseJSDoc:()=>my,prepareLangiumParser:()=>ty,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>md,stream:()=>ue,toDiagnosticData:()=>dy,toDiagnosticSeverity:()=>fs});var Bh={};Zr(Bh,{DefaultNameRegexp:()=>ym,RangeComparison:()=>ir,compareRange:()=>mm,findCommentNode:()=>vm,findDeclarationNodeAtOffset:()=>UT,findLeafNodeAtOffset:()=>Af,findLeafNodeBeforeOffset:()=>Tm,flattenCst:()=>jT,getDatatypeNode:()=>GT,getInteriorNodes:()=>KT,getNextNode:()=>zT,getPreviousNode:()=>$m,getStartlineNode:()=>BT,inRange:()=>gm,isChildNode:()=>hm,isCommentNode:()=>jc,streamCst:()=>Wa,toDocumentSegment:()=>Va,tokenToRange:()=>hs});function ze(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}s(ze,"isAstNode");function at(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}s(at,"isReference");function lr(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}s(lr,"isMultiReference");function Kh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}s(Kh,"isAstNodeDescription");function yn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}s(yn,"isLinkingError");var Is,qh=(Is=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var a;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(a=r.properties[e.property])==null?void 0:a.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return ze(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const a=n[r];if(a!==void 0)return a;{const i=this.types[e],o=i?i.superTypes.some(u=>this.isSubtype(u,r)):!1;return n[r]=o,o}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),a=[];for(const i of n)this.isSubtype(i,e)&&a.push(i);return this.allSubtypes[e]=a,a}}},s(Is,"AbstractAstReflection"),Is);function Cr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}s(Cr,"isCompositeCstNode");function Un(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}s(Un,"isLeafCstNode");function mf(t){return Cr(t)&&typeof t.fullText=="string"}s(mf,"isRootCstNode");var Tt,sr=(Tt=class{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(a=>[e?e(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(e){return new Tt(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return nt})}join(e=","){const r=this.iterator();let n="",a,i=!1;do a=r.next(),a.done||(i&&(n+=e),n+=RT(a.value)),i=!0;while(!a.done);return n}indexOf(e,r=0){const n=this.iterator();let a=0,i=n.next();for(;!i.done;){if(a>=r&&i.value===e)return a;i=n.next(),a++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;)e(a.value,n),a=r.next(),n++}map(e){return new Tt(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?nt:{done:!1,value:e(a)}})}filter(e){return new Tt(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return nt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let a=r,i=n.next();for(;!i.done;)a===void 0?a=i.value:a=e(a,i.value),i=n.next();return a}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const a=e.next();if(a.done)return n;const i=this.recursiveReduce(e,r,n);return i===void 0?a.value:r(i,a.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(e(a.value))return n;a=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new Tt(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const i=r.iterator.next();if(i.done)r.iterator=void 0;else return i}const{done:n,value:a}=this.nextFn(r.this);if(!n){const i=e(a);if(ds(i))r.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(r.iterator);return nt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new Tt(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}const{done:a,value:i}=r.nextFn(n.this);if(!a)if(ds(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}while(n.iterator);return nt})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new Tt(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new Tt(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?nt:this.nextFn(r.state)))}distinct(e){return new Tt(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const a=e?e(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return nt})}exclude(e,r){const n=new Set;for(const a of e){const i=r?r(a):a;n.add(i)}return this.filter(a=>{const i=r?r(a):a;return!n.has(i)})}},s(Tt,"StreamImpl"),Tt);function RT(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}s(RT,"toString");function ds(t){return!!t&&typeof t[Symbol.iterator]=="function"}s(ds,"isIterable");var Ua=new sr(()=>{},()=>nt),nt=Object.freeze({done:!0,value:void 0});function ue(...t){if(t.length===1){const e=t[0];if(e instanceof sr)return e;if(ds(e))return new sr(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new sr(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:nt)}return t.length>1?new sr(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];ds(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return nt}):Ua}s(ue,"stream");var Ns,za=(Ns=class extends sr{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),a=>{for(a.pruned&&(a.iterators.pop(),a.pruned=!1);a.iterators.length>0;){const o=a.iterators[a.iterators.length-1].next();if(o.done)a.iterators.pop();else return a.iterators.push(r(o.value)[Symbol.iterator]()),o}return nt})}iterator(){const e={state:this.startFn(),next:s(()=>this.nextFn(e.state),"next"),prune:s(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},s(Ns,"TreeStreamImpl"),Ns),ps;(function(t){function e(i){return i.reduce((o,u)=>o+u,0)}s(e,"sum"),t.sum=e;function r(i){return i.reduce((o,u)=>o*u,0)}s(r,"product"),t.product=r;function n(i){return i.reduce((o,u)=>Math.min(o,u))}s(n,"min"),t.min=n;function a(i){return i.reduce((o,u)=>Math.max(o,u))}s(a,"max"),t.max=a})(ps||(ps={}));var Wh={};Zr(Wh,{assignMandatoryProperties:()=>Vh,copyAstNode:()=>Sc,findRootNode:()=>xa,getContainerOfType:()=>zn,getDocument:()=>Bt,getReferenceNodes:()=>_c,hasContainerOfType:()=>$T,linkContentToContainer:()=>Ba,streamAllContents:()=>Dr,streamAst:()=>Kt,streamContents:()=>yu,streamReferences:()=>Ka});function Ba(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,i)=>{ze(a)&&(a.$container=t,a.$containerProperty=r,a.$containerIndex=i,e.deep&&Ba(a,e))}):ze(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&Ba(n,e)))}s(Ba,"linkContentToContainer");function zn(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}s(zn,"getContainerOfType");function $T(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}s($T,"hasContainerOfType");function Bt(t){const r=xa(t).$document;if(!r)throw new Error("AST node has no document.");return r}s(Bt,"getDocument");function xa(t){for(;t.$container;)t=t.$container;return t}s(xa,"findRootNode");function _c(t){return at(t)?t.ref?[t.ref]:[]:lr(t)?t.items.map(e=>e.ref):[]}s(_c,"getReferenceNodes");function yu(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new sr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const a=n.keys[n.keyIndex];if(!a.startsWith("$")){const i=t[a];if(ze(i)){if(n.keyIndex++,Cc(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;n.arrayIndex<i.length;){const o=n.arrayIndex++,u=i[o];if(ze(u)&&Cc(u,r))return{done:!1,value:u}}n.arrayIndex=0}}n.keyIndex++}return nt})}s(yu,"streamContents");function Dr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new za(t,r=>yu(r,e))}s(Dr,"streamAllContents");function Kt(t,e){if(t){if(e!=null&&e.range&&!Cc(t,e.range))return new za(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new za(t,r=>yu(r,e),{includeRoot:!0})}s(Kt,"streamAst");function Cc(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?gm(r,e):!1}s(Cc,"isAstNodeInRange");function Ka(t){return new sr(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(at(n)||lr(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const a=e.arrayIndex++,i=n[a];if(at(i)||lr(n))return{done:!1,value:{reference:i,container:t,property:r,index:a}}}e.arrayIndex=0}}e.keyIndex++}return nt})}s(Ka,"streamReferences");function Vh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const a of Object.values(r.properties))a.defaultValue!==void 0&&n[a.name]===void 0&&(n[a.name]=Hh(a.defaultValue))}s(Vh,"assignMandatoryProperties");function Hh(t){return Array.isArray(t)?[...t.map(Hh)]:t}s(Hh,"copyDefaultValue");function Sc(t,e,r){const n={$type:t.$type};r&&(r.set(t,n),r.set(n,t));for(const[a,i]of Object.entries(t))if(!a.startsWith("$"))if(ze(i))n[a]=Sc(i,e,r);else if(at(i))n[a]=e(n,a,i.$refNode,i.$refText,i);else if(Array.isArray(i)){const o=[];for(const u of i)ze(u)?o.push(Sc(u,e,r)):at(u)?o.push(e(n,a,u.$refNode,u.$refText,u)):o.push(u);n[a]=o}else n[a]=i;return Ba(n,{deep:!0}),n}s(Sc,"copyAstNode");var AT={};Zr(AT,{AbstractElement:()=>dt,AbstractParserRule:()=>Ji,AbstractRule:()=>Ia,AbstractType:()=>vt,Action:()=>zr,Alternatives:()=>Zi,ArrayLiteral:()=>bc,ArrayType:()=>wc,Assignment:()=>Br,BooleanLiteral:()=>Ic,CharacterRange:()=>Kr,Condition:()=>qr,Conjunction:()=>Qi,CrossReference:()=>Wr,Disjunction:()=>es,EndOfFile:()=>Nc,Grammar:()=>Ar,GrammarImport:()=>kc,Group:()=>vn,InferredType:()=>Pc,InfixRule:()=>nr,InfixRuleOperatorList:()=>ts,InfixRuleOperators:()=>Oc,Interface:()=>Na,Keyword:()=>ka,LangiumGrammarAstReflection:()=>pm,LangiumGrammarTerminals:()=>ek,NamedArgument:()=>Pa,NegatedToken:()=>Tn,Negation:()=>Lc,NumberLiteral:()=>Dc,Parameter:()=>Oa,ParameterReference:()=>Mc,ParserRule:()=>jt,ReferenceType:()=>rs,RegexToken:()=>Rn,ReturnType:()=>xc,RuleCall:()=>$n,SimpleType:()=>La,StringLiteral:()=>Fc,TerminalAlternatives:()=>An,TerminalElement:()=>pt,TerminalGroup:()=>En,TerminalRule:()=>Er,TerminalRuleCall:()=>_n,Type:()=>ns,TypeAttribute:()=>Cn,TypeDefinition:()=>Sn,UnionType:()=>Gc,UnorderedGroup:()=>as,UntilToken:()=>bn,ValueLiteral:()=>wn,Wildcard:()=>Da,isAbstractElement:()=>gf,isAbstractParserRule:()=>Bn,isAbstractRule:()=>ET,isAbstractType:()=>_T,isAction:()=>Vr,isAlternatives:()=>yf,isArrayLiteral:()=>CT,isArrayType:()=>Yh,isAssignment:()=>Sr,isBooleanLiteral:()=>Xh,isCharacterRange:()=>Jh,isCondition:()=>ST,isConjunction:()=>Zh,isCrossReference:()=>Kn,isDisjunction:()=>Qh,isEndOfFile:()=>em,isGrammar:()=>bT,isGrammarImport:()=>wT,isGroup:()=>qn,isInferredType:()=>vu,isInfixRule:()=>qa,isInfixRuleOperatorList:()=>IT,isInfixRuleOperators:()=>NT,isInterface:()=>tm,isKeyword:()=>br,isNamedArgument:()=>kT,isNegatedToken:()=>rm,isNegation:()=>nm,isNumberLiteral:()=>PT,isParameter:()=>OT,isParameterReference:()=>am,isParserRule:()=>ot,isReferenceType:()=>im,isRegexToken:()=>sm,isReturnType:()=>om,isRuleCall:()=>wr,isSimpleType:()=>vf,isStringLiteral:()=>LT,isTerminalAlternatives:()=>lm,isTerminalElement:()=>DT,isTerminalGroup:()=>um,isTerminalRule:()=>xt,isTerminalRuleCall:()=>Tf,isType:()=>Rf,isTypeAttribute:()=>MT,isTypeDefinition:()=>xT,isUnionType:()=>cm,isUnorderedGroup:()=>$f,isUntilToken:()=>fm,isValueLiteral:()=>FT,isWildcard:()=>dm,reflection:()=>K});var ek={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},dt={$type:"AbstractElement",cardinality:"cardinality"};function gf(t){return K.isInstance(t,dt.$type)}s(gf,"isAbstractElement");var Ji={$type:"AbstractParserRule"};function Bn(t){return K.isInstance(t,Ji.$type)}s(Bn,"isAbstractParserRule");var Ia={$type:"AbstractRule"};function ET(t){return K.isInstance(t,Ia.$type)}s(ET,"isAbstractRule");var vt={$type:"AbstractType"};function _T(t){return K.isInstance(t,vt.$type)}s(_T,"isAbstractType");var zr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Vr(t){return K.isInstance(t,zr.$type)}s(Vr,"isAction");var Zi={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function yf(t){return K.isInstance(t,Zi.$type)}s(yf,"isAlternatives");var bc={$type:"ArrayLiteral",elements:"elements"};function CT(t){return K.isInstance(t,bc.$type)}s(CT,"isArrayLiteral");var wc={$type:"ArrayType",elementType:"elementType"};function Yh(t){return K.isInstance(t,wc.$type)}s(Yh,"isArrayType");var Br={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return K.isInstance(t,Br.$type)}s(Sr,"isAssignment");var Ic={$type:"BooleanLiteral",true:"true"};function Xh(t){return K.isInstance(t,Ic.$type)}s(Xh,"isBooleanLiteral");var Kr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Jh(t){return K.isInstance(t,Kr.$type)}s(Jh,"isCharacterRange");var qr={$type:"Condition"};function ST(t){return K.isInstance(t,qr.$type)}s(ST,"isCondition");var Qi={$type:"Conjunction",left:"left",right:"right"};function Zh(t){return K.isInstance(t,Qi.$type)}s(Zh,"isConjunction");var Wr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Kn(t){return K.isInstance(t,Wr.$type)}s(Kn,"isCrossReference");var es={$type:"Disjunction",left:"left",right:"right"};function Qh(t){return K.isInstance(t,es.$type)}s(Qh,"isDisjunction");var Nc={$type:"EndOfFile",cardinality:"cardinality"};function em(t){return K.isInstance(t,Nc.$type)}s(em,"isEndOfFile");var Ar={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function bT(t){return K.isInstance(t,Ar.$type)}s(bT,"isGrammar");var kc={$type:"GrammarImport",path:"path"};function wT(t){return K.isInstance(t,kc.$type)}s(wT,"isGrammarImport");var vn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function qn(t){return K.isInstance(t,vn.$type)}s(qn,"isGroup");var Pc={$type:"InferredType",name:"name"};function vu(t){return K.isInstance(t,Pc.$type)}s(vu,"isInferredType");var nr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function qa(t){return K.isInstance(t,nr.$type)}s(qa,"isInfixRule");var ts={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function IT(t){return K.isInstance(t,ts.$type)}s(IT,"isInfixRuleOperatorList");var Oc={$type:"InfixRuleOperators",precedences:"precedences"};function NT(t){return K.isInstance(t,Oc.$type)}s(NT,"isInfixRuleOperators");var Na={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function tm(t){return K.isInstance(t,Na.$type)}s(tm,"isInterface");var ka={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return K.isInstance(t,ka.$type)}s(br,"isKeyword");var Pa={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function kT(t){return K.isInstance(t,Pa.$type)}s(kT,"isNamedArgument");var Tn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function rm(t){return K.isInstance(t,Tn.$type)}s(rm,"isNegatedToken");var Lc={$type:"Negation",value:"value"};function nm(t){return K.isInstance(t,Lc.$type)}s(nm,"isNegation");var Dc={$type:"NumberLiteral",value:"value"};function PT(t){return K.isInstance(t,Dc.$type)}s(PT,"isNumberLiteral");var Oa={$type:"Parameter",name:"name"};function OT(t){return K.isInstance(t,Oa.$type)}s(OT,"isParameter");var Mc={$type:"ParameterReference",parameter:"parameter"};function am(t){return K.isInstance(t,Mc.$type)}s(am,"isParameterReference");var jt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function ot(t){return K.isInstance(t,jt.$type)}s(ot,"isParserRule");var rs={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function im(t){return K.isInstance(t,rs.$type)}s(im,"isReferenceType");var Rn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function sm(t){return K.isInstance(t,Rn.$type)}s(sm,"isRegexToken");var xc={$type:"ReturnType",name:"name"};function om(t){return K.isInstance(t,xc.$type)}s(om,"isReturnType");var $n={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return K.isInstance(t,$n.$type)}s(wr,"isRuleCall");var La={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function vf(t){return K.isInstance(t,La.$type)}s(vf,"isSimpleType");var Fc={$type:"StringLiteral",value:"value"};function LT(t){return K.isInstance(t,Fc.$type)}s(LT,"isStringLiteral");var An={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function lm(t){return K.isInstance(t,An.$type)}s(lm,"isTerminalAlternatives");var pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function DT(t){return K.isInstance(t,pt.$type)}s(DT,"isTerminalElement");var En={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function um(t){return K.isInstance(t,En.$type)}s(um,"isTerminalGroup");var Er={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function xt(t){return K.isInstance(t,Er.$type)}s(xt,"isTerminalRule");var _n={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Tf(t){return K.isInstance(t,_n.$type)}s(Tf,"isTerminalRuleCall");var ns={$type:"Type",name:"name",type:"type"};function Rf(t){return K.isInstance(t,ns.$type)}s(Rf,"isType");var Cn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function MT(t){return K.isInstance(t,Cn.$type)}s(MT,"isTypeAttribute");var Sn={$type:"TypeDefinition"};function xT(t){return K.isInstance(t,Sn.$type)}s(xT,"isTypeDefinition");var Gc={$type:"UnionType",types:"types"};function cm(t){return K.isInstance(t,Gc.$type)}s(cm,"isUnionType");var as={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function $f(t){return K.isInstance(t,as.$type)}s($f,"isUnorderedGroup");var bn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function fm(t){return K.isInstance(t,bn.$type)}s(fm,"isUntilToken");var wn={$type:"ValueLiteral"};function FT(t){return K.isInstance(t,wn.$type)}s(FT,"isValueLiteral");var Da={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function dm(t){return K.isInstance(t,Da.$type)}s(dm,"isWildcard");var ks,pm=(ks=class extends qh{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ji.$type,properties:{},superTypes:[Ia.$type,vt.$type]},AbstractRule:{name:Ia.$type,properties:{},superTypes:[]},AbstractType:{name:vt.$type,properties:{},superTypes:[]},Action:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},feature:{name:zr.feature},inferredType:{name:zr.inferredType},operator:{name:zr.operator},type:{name:zr.type,referenceType:vt.$type}},superTypes:[dt.$type]},Alternatives:{name:Zi.$type,properties:{cardinality:{name:Zi.cardinality},elements:{name:Zi.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:bc.$type,properties:{elements:{name:bc.elements,defaultValue:[]}},superTypes:[wn.$type]},ArrayType:{name:wc.$type,properties:{elementType:{name:wc.elementType}},superTypes:[Sn.$type]},Assignment:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},feature:{name:Br.feature},operator:{name:Br.operator},predicate:{name:Br.predicate},terminal:{name:Br.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:Ic.$type,properties:{true:{name:Ic.true,defaultValue:!1}},superTypes:[qr.$type,wn.$type]},CharacterRange:{name:Kr.$type,properties:{cardinality:{name:Kr.cardinality},left:{name:Kr.left},lookahead:{name:Kr.lookahead},parenthesized:{name:Kr.parenthesized,defaultValue:!1},right:{name:Kr.right}},superTypes:[pt.$type]},Condition:{name:qr.$type,properties:{},superTypes:[]},Conjunction:{name:Qi.$type,properties:{left:{name:Qi.left},right:{name:Qi.right}},superTypes:[qr.$type]},CrossReference:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},deprecatedSyntax:{name:Wr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Wr.isMulti,defaultValue:!1},terminal:{name:Wr.terminal},type:{name:Wr.type,referenceType:vt.$type}},superTypes:[dt.$type]},Disjunction:{name:es.$type,properties:{left:{name:es.left},right:{name:es.right}},superTypes:[qr.$type]},EndOfFile:{name:Nc.$type,properties:{cardinality:{name:Nc.cardinality}},superTypes:[dt.$type]},Grammar:{name:Ar.$type,properties:{imports:{name:Ar.imports,defaultValue:[]},interfaces:{name:Ar.interfaces,defaultValue:[]},isDeclared:{name:Ar.isDeclared,defaultValue:!1},name:{name:Ar.name},rules:{name:Ar.rules,defaultValue:[]},types:{name:Ar.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:kc.$type,properties:{path:{name:kc.path}},superTypes:[]},Group:{name:vn.$type,properties:{cardinality:{name:vn.cardinality},elements:{name:vn.elements,defaultValue:[]},guardCondition:{name:vn.guardCondition},predicate:{name:vn.predicate}},superTypes:[dt.$type]},InferredType:{name:Pc.$type,properties:{name:{name:Pc.name}},superTypes:[vt.$type]},InfixRule:{name:nr.$type,properties:{call:{name:nr.call},dataType:{name:nr.dataType},inferredType:{name:nr.inferredType},name:{name:nr.name},operators:{name:nr.operators},parameters:{name:nr.parameters,defaultValue:[]},returnType:{name:nr.returnType,referenceType:vt.$type}},superTypes:[Ji.$type]},InfixRuleOperatorList:{name:ts.$type,properties:{associativity:{name:ts.associativity},operators:{name:ts.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Oc.$type,properties:{precedences:{name:Oc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Na.$type,properties:{attributes:{name:Na.attributes,defaultValue:[]},name:{name:Na.name},superTypes:{name:Na.superTypes,defaultValue:[],referenceType:vt.$type}},superTypes:[vt.$type]},Keyword:{name:ka.$type,properties:{cardinality:{name:ka.cardinality},predicate:{name:ka.predicate},value:{name:ka.value}},superTypes:[dt.$type]},NamedArgument:{name:Pa.$type,properties:{calledByName:{name:Pa.calledByName,defaultValue:!1},parameter:{name:Pa.parameter,referenceType:Oa.$type},value:{name:Pa.value}},superTypes:[]},NegatedToken:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1},terminal:{name:Tn.terminal}},superTypes:[pt.$type]},Negation:{name:Lc.$type,properties:{value:{name:Lc.value}},superTypes:[qr.$type]},NumberLiteral:{name:Dc.$type,properties:{value:{name:Dc.value}},superTypes:[wn.$type]},Parameter:{name:Oa.$type,properties:{name:{name:Oa.name}},superTypes:[]},ParameterReference:{name:Mc.$type,properties:{parameter:{name:Mc.parameter,referenceType:Oa.$type}},superTypes:[qr.$type]},ParserRule:{name:jt.$type,properties:{dataType:{name:jt.dataType},definition:{name:jt.definition},entry:{name:jt.entry,defaultValue:!1},fragment:{name:jt.fragment,defaultValue:!1},inferredType:{name:jt.inferredType},name:{name:jt.name},parameters:{name:jt.parameters,defaultValue:[]},returnType:{name:jt.returnType,referenceType:vt.$type}},superTypes:[Ji.$type]},ReferenceType:{name:rs.$type,properties:{isMulti:{name:rs.isMulti,defaultValue:!1},referenceType:{name:rs.referenceType}},superTypes:[Sn.$type]},RegexToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},regex:{name:Rn.regex}},superTypes:[pt.$type]},ReturnType:{name:xc.$type,properties:{name:{name:xc.name}},superTypes:[]},RuleCall:{name:$n.$type,properties:{arguments:{name:$n.arguments,defaultValue:[]},cardinality:{name:$n.cardinality},predicate:{name:$n.predicate},rule:{name:$n.rule,referenceType:Ia.$type}},superTypes:[dt.$type]},SimpleType:{name:La.$type,properties:{primitiveType:{name:La.primitiveType},stringType:{name:La.stringType},typeRef:{name:La.typeRef,referenceType:vt.$type}},superTypes:[Sn.$type]},StringLiteral:{name:Fc.$type,properties:{value:{name:Fc.value}},superTypes:[wn.$type]},TerminalAlternatives:{name:An.$type,properties:{cardinality:{name:An.cardinality},elements:{name:An.elements,defaultValue:[]},lookahead:{name:An.lookahead},parenthesized:{name:An.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:En.$type,properties:{cardinality:{name:En.cardinality},elements:{name:En.elements,defaultValue:[]},lookahead:{name:En.lookahead},parenthesized:{name:En.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:Er.$type,properties:{definition:{name:Er.definition},fragment:{name:Er.fragment,defaultValue:!1},hidden:{name:Er.hidden,defaultValue:!1},name:{name:Er.name},type:{name:Er.type}},superTypes:[Ia.$type]},TerminalRuleCall:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},lookahead:{name:_n.lookahead},parenthesized:{name:_n.parenthesized,defaultValue:!1},rule:{name:_n.rule,referenceType:Er.$type}},superTypes:[pt.$type]},Type:{name:ns.$type,properties:{name:{name:ns.name},type:{name:ns.type}},superTypes:[vt.$type]},TypeAttribute:{name:Cn.$type,properties:{defaultValue:{name:Cn.defaultValue},isOptional:{name:Cn.isOptional,defaultValue:!1},name:{name:Cn.name},type:{name:Cn.type}},superTypes:[]},TypeDefinition:{name:Sn.$type,properties:{},superTypes:[]},UnionType:{name:Gc.$type,properties:{types:{name:Gc.types,defaultValue:[]}},superTypes:[Sn.$type]},UnorderedGroup:{name:as.$type,properties:{cardinality:{name:as.cardinality},elements:{name:as.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:bn.$type,properties:{cardinality:{name:bn.cardinality},lookahead:{name:bn.lookahead},parenthesized:{name:bn.parenthesized,defaultValue:!1},terminal:{name:bn.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:wn.$type,properties:{},superTypes:[]},Wildcard:{name:Da.$type,properties:{cardinality:{name:Da.cardinality},lookahead:{name:Da.lookahead},parenthesized:{name:Da.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}},s(ks,"LangiumGrammarAstReflection"),ks),K=new pm;function GT(t){let e=t,r=!1;for(;e;){const n=zn(e.grammarSource,ot);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}s(GT,"getDatatypeNode");function Wa(t){return new za(t,e=>Cr(e)?e.content:[],{includeRoot:!0})}s(Wa,"streamCst");function jT(t){return Wa(t).filter(Un)}s(jT,"flattenCst");function hm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}s(hm,"isChildNode");function hs(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}s(hs,"tokenToRange");function Va(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}s(Va,"toDocumentSegment");var ir;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(ir||(ir={}));function mm(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return ir.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return ir.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?ir.Inside:r?ir.OverlapBack:n?ir.OverlapFront:ir.Outside}s(mm,"compareRange");function gm(t,e){return mm(t,e)>ir.After}s(gm,"inRange");var ym=/^[\w\p{L}]$/u;function UT(t,e,r=ym){if(t){if(e>0){const n=e-t.offset,a=t.text.charAt(n);r.test(a)||e--}return Af(t,e)}}s(UT,"findDeclarationNodeAtOffset");function vm(t,e){if(t){const r=$m(t,!0);if(r&&jc(r,e))return r;if(mf(t)){const n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const i=t.content[a];if(jc(i,e))return i}}}}s(vm,"findCommentNode");function jc(t,e){return Un(t)&&e.includes(t.tokenType.name)}s(jc,"isCommentNode");function Af(t,e){if(Un(t))return t;if(Cr(t)){const r=Rm(t,e,!1);if(r)return Af(r,e)}}s(Af,"findLeafNodeAtOffset");function Tm(t,e){if(Un(t))return t;if(Cr(t)){const r=Rm(t,e,!0);if(r)return Tm(r,e)}}s(Tm,"findLeafNodeBeforeOffset");function Rm(t,e,r){let n=0,a=t.content.length-1,i;for(;n<=a;){const o=Math.floor((n+a)/2),u=t.content[o];if(u.offset<=e&&u.end>e)return u;u.end<=e?(i=r?u:void 0,n=o+1):a=o-1}return i}s(Rm,"binarySearch");function $m(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const a=r.content[n];if(e||!a.hidden)return a}t=r}}s($m,"getPreviousNode");function zT(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);const a=r.content.length-1;for(;n<a;){n++;const i=r.content[n];if(e||!i.hidden)return i}t=r}}s(zT,"getNextNode");function BT(t){if(t.range.start.character===0)return t;const e=t.range.start.line;let r=t,n;for(;t.container;){const a=t.container,i=n??a.content.indexOf(t);if(i===0?(t=a,n=void 0):(n=i-1,t=a.content[n]),t.range.start.line!==e)break;r=t}return r}s(BT,"getStartlineNode");function KT(t,e){const r=qT(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}s(KT,"getInteriorNodes");function qT(t,e){const r=Wp(t),n=Wp(e);let a;for(let i=0;i<r.length&&i<n.length;i++){const o=r[i],u=n[i];if(o.parent===u.parent)a={parent:o.parent,a:o.index,b:u.index};else break}return a}s(qT,"getCommonParent");function Wp(t){const e=[];for(;t.container;){const r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}s(Wp,"getParentChain");var Am={};Zr(Am,{findAssignment:()=>Dm,findNameAssignment:()=>Nf,findNodeForKeyword:()=>Lm,findNodeForProperty:()=>bf,findNodesForKeyword:()=>QT,findNodesForKeywordInternal:()=>If,findNodesForProperty:()=>Om,getActionAtElement:()=>xm,getActionType:()=>Gm,getAllReachableRules:()=>Sf,getAllRulesUsedForCrossReferences:()=>ZT,getCrossReferenceTerminal:()=>km,getEntryRule:()=>wm,getExplicitRuleType:()=>Ru,getHiddenRules:()=>Im,getRuleType:()=>jm,getRuleTypeName:()=>aR,getTypeName:()=>Mn,isArrayCardinality:()=>tR,isArrayOperator:()=>rR,isCommentTerminal:()=>Pm,isDataType:()=>nR,isDataTypeRule:()=>Tu,isOptionalCardinality:()=>eR,terminalRegex:()=>$u});var Ps,Ef=(Ps=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}},s(Ps,"ErrorWithLocation"),Ps);function Qr(t,e="Error: Got unexpected value."){throw new Error(e)}s(Qr,"assertUnreachable");function Em(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}s(Em,"assertCondition");var _m={};Zr(_m,{NEWLINE_REGEXP:()=>HT,escapeRegExp:()=>ni,getTerminalParts:()=>XT,isMultilineComment:()=>Cm,isWhitespace:()=>Cf,partialMatches:()=>Sm,partialRegExp:()=>bm,whitespaceCharacters:()=>JT});function W(t){return t.charCodeAt(0)}s(W,"cc");function lc(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}s(lc,"insertToSet");function Aa(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}s(Aa,"addFlag");function fn(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}s(fn,"ASSERT_EXISTS");function WT(){throw Error("Internal Error - Should never get here!")}s(WT,"ASSERT_NEVER_REACH_HERE");function Vp(t){return t.type==="Character"}s(Vp,"isCharacter");var Uc=[];for(let t=W("0");t<=W("9");t++)Uc.push(t);var zc=[W("_")].concat(Uc);for(let t=W("a");t<=W("z");t++)zc.push(t);for(let t=W("A");t<=W("Z");t++)zc.push(t);var Sy=[W(" "),W("\f"),W(`
36
+ `),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],tk=/[0-9a-fA-F]/,xu=/[0-9]/,rk=/[1-9]/,Os,VT=(Os=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Aa(n,"global");break;case"i":Aa(n,"ignoreCase");break;case"m":Aa(n,"multiLine");break;case"u":Aa(n,"unicode");break;case"y":Aa(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}fn(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return WT()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const a=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:a,atMost:a};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:a,atMost:i}):r={atLeast:a,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;fn(r);break}if(!(e===!0&&r===void 0)&&fn(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),fn(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
37
+ `),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=Uc;break;case"D":e=Uc,r=!0;break;case"s":e=Sy;break;case"S":e=Sy,r=!0;break;case"w":e=zc;break;case"W":e=zc,r=!0;break}if(fn(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
38
+ `);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(fn(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
39
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:W(e)}}}characterClass(){const e=[];let r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){const n=this.classAtom();if(n.type,Vp(n)&&this.isRangeDash()){this.consumeChar("-");const a=this.classAtom();if(a.type,Vp(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else lc(n.value,e),e.push(W("-")),lc(a.value,e)}else lc(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
40
+ `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:W("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}const r=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(rk.test(e)===!1)throw Error("Expecting a positive integer");for(;xu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(xu.test(e)===!1)throw Error("Expecting an integer");for(;xu.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
41
+ `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:W(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return xu.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
42
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return!1}}isQuantifier(){const e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
43
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let a=0;a<e;a++){const i=this.popChar();if(tk.test(i)===!1)throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},s(Os,"RegExpParser"),Os),Ls,_f=(Ls=class{visitChildren(e){for(const r in e){const n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(a=>{this.visit(a)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},s(Ls,"BaseRegExpVisitor"),Ls),HT=/\r?\n/gm,YT=new VT,Ds,nk=(Ds=class extends _f{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const r=String.fromCharCode(e.value);if(!this.multiline&&r===`
44
+ `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=ni(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){const r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`
45
+ `.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},s(Ds,"TerminalRegExpVisitor"),Ds),In=new nk;function XT(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;const e=YT.pattern(t),r=[];for(const n of e.value.value)In.reset(t),In.visit(n),r.push({start:In.startRegexp,end:In.endRegex});return r}catch{return[]}}s(XT,"getTerminalParts");function Cm(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),In.reset(t),In.visit(YT.pattern(t)),In.multiline}catch{return!1}}s(Cm,"isMultilineComment");var JT=`\f
46
+ \r \v              \u2028\u2029   \uFEFF`.split("");function Cf(t){const e=typeof t=="string"?new RegExp(t):t;return JT.some(r=>e.test(r))}s(Cf,"isWhitespace");function ni(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(ni,"escapeRegExp");function Sm(t,e){const r=bm(t),n=e.match(r);return!!n&&n[0].length>0}s(Sm,"partialMatches");function bm(t){typeof t=="string"&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function a(){let i="",o;function u(c){i+=r.substr(n,c),n+=c}s(u,"appendRaw");function l(c){i+="(?:"+r.substr(n,c)+"|$)",n+=c}for(s(l,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":l(3);break;case"x":l(4);break;case"u":e.unicode?r[n+2]==="{"?l(r.indexOf("}",n)-n+1):l(6):l(2);break;case"p":case"P":e.unicode?l(r.indexOf("}",n)-n+1):l(2);break;case"k":l(r.indexOf(">",n)-n+1);break;default:l(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],l(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":u(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?u(o[0].length):l(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":o=n,n+=3,a(),i+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,a(),i+=r.substr(o,n-o);break;default:u(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else u(1),i+=a()+"|$)";break;case")":return++n,i;default:l(1);break}return i}return s(a,"process"),new RegExp(a(),t.flags)}s(bm,"partialRegExp");function wm(t){return t.rules.find(e=>ot(e)&&e.entry)}s(wm,"getEntryRule");function Im(t){return t.rules.filter(e=>xt(e)&&e.hidden)}s(Im,"getHiddenRules");function Sf(t,e){const r=new Set,n=wm(t);if(!n)return new Set(t.rules);const a=[n].concat(Im(t));for(const o of a)Nm(o,r,e);const i=new Set;for(const o of t.rules)(r.has(o.name)||xt(o)&&o.hidden)&&i.add(o);return i}s(Sf,"getAllReachableRules");function Nm(t,e,r){e.add(t.name),Dr(t).forEach(n=>{if(wr(n)||r&&Tf(n)){const a=n.rule.ref;a&&!e.has(a.name)&&Nm(a,e,r)}})}s(Nm,"ruleDfs");function ZT(t){const e=new Set;return Dr(t).forEach(r=>{Kn(r)&&(ot(r.type.ref)&&e.add(r.type.ref),vu(r.type.ref)&&ot(r.type.ref.$container)&&e.add(r.type.ref.$container))}),e}s(ZT,"getAllRulesUsedForCrossReferences");function km(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=Nf(t.type.ref);return e==null?void 0:e.terminal}}s(km,"getCrossReferenceTerminal");function Pm(t){return t.hidden&&!Cf($u(t))}s(Pm,"isCommentTerminal");function Om(t,e){return!t||!e?[]:wf(t,e,t.astNode,!0)}s(Om,"findNodesForProperty");function bf(t,e,r){if(!t||!e)return;const n=wf(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(bf,"findNodeForProperty");function wf(t,e,r,n){if(!n){const a=zn(t.grammarSource,Sr);if(a&&a.feature===e)return[t]}return Cr(t)&&t.astNode===r?t.content.flatMap(a=>wf(a,e,r,!1)):[]}s(wf,"findNodesForPropertyInternal");function QT(t,e){return t?If(t,e,t==null?void 0:t.astNode):[]}s(QT,"findNodesForKeyword");function Lm(t,e,r){if(!t)return;const n=If(t,e,t==null?void 0:t.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}s(Lm,"findNodeForKeyword");function If(t,e,r){if(t.astNode!==r)return[];if(br(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=Wa(t).iterator();let a;const i=[];do if(a=n.next(),!a.done){const o=a.value;o.astNode===r?br(o.grammarSource)&&o.grammarSource.value===e&&i.push(o):n.prune()}while(!a.done);return i}s(If,"findNodesForKeywordInternal");function Dm(t){var r;const e=t.astNode;for(;e===((r=t.container)==null?void 0:r.astNode);){const n=zn(t.grammarSource,Sr);if(n)return n;t=t.container}}s(Dm,"findAssignment");function Nf(t){let e=t;return vu(e)&&(Vr(e.$container)?e=e.$container.$container:Bn(e.$container)?e=e.$container:Qr(e.$container)),Mm(t,e,new Map)}s(Nf,"findNameAssignment");function Mm(t,e,r){var a;function n(i,o){let u;return zn(i,Sr)||(u=Mm(o,o,r)),r.set(t,u),u}if(s(n,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(const i of Dr(e)){if(Sr(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if(wr(i)&&ot(i.rule.ref))return n(i,i.rule.ref);if(vf(i)&&((a=i.typeRef)!=null&&a.ref))return n(i,i.typeRef.ref)}}s(Mm,"findNameAssignmentInternal");function xm(t){const e=t.$container;if(qn(e)){const r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){const i=r[a];if(Vr(i))return i;{const o=Dr(r[a]).find(Vr);if(o)return o}}}if(gf(e))return xm(e)}s(xm,"getActionAtElement");function eR(t,e){return t==="?"||t==="*"||qn(e)&&!!e.guardCondition}s(eR,"isOptionalCardinality");function tR(t){return t==="*"||t==="+"}s(tR,"isArrayCardinality");function rR(t){return t==="+="}s(rR,"isArrayOperator");function Tu(t){return Fm(t,new Set)}s(Tu,"isDataTypeRule");function Fm(t,e){if(e.has(t))return!0;e.add(t);for(const r of Dr(t))if(wr(r)){if(!r.rule.ref||ot(r.rule.ref)&&!Fm(r.rule.ref,e)||qa(r.rule.ref))return!1}else{if(Sr(r))return!1;if(Vr(r))return!1}return!!t.definition}s(Fm,"isDataTypeRuleInternal");function nR(t){return Bc(t.type,new Set)}s(nR,"isDataType");function Bc(t,e){if(e.has(t))return!0;if(e.add(t),Yh(t))return!1;if(im(t))return!1;if(cm(t))return t.types.every(r=>Bc(r,e));if(vf(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){const r=t.typeRef.ref;return Rf(r)?Bc(r.type,e):!1}else return!1}else return!1}s(Bc,"isDataTypeInternal");function Ru(t){if(!xt(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}s(Ru,"getExplicitRuleType");function Mn(t){if(Bn(t))return ot(t)&&Tu(t)?t.name:Ru(t)??t.name;if(tm(t)||Rf(t)||om(t))return t.name;if(Vr(t)){const e=Gm(t);if(e)return e}else if(vu(t))return t.name;throw new Error("Cannot get name of Unknown Type")}s(Mn,"getTypeName");function Gm(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return Mn(t.type.ref)}s(Gm,"getActionType");function aR(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":ot(t)&&Tu(t)?t.name:Ru(t)??t.name}s(aR,"getRuleTypeName");function jm(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":Ru(t)??t.name}s(jm,"getRuleType");function $u(t){const e={s:!1,i:!1,u:!1},r=Wn(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}s($u,"terminalRegex");var Um=/[\s\S]/.source;function Wn(t,e){var r;if(lm(t))return iR(t);if(um(t))return sR(t);if(Jh(t))return uR(t);if(Tf(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return ur(Wn(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(rm(t))return lR(t);if(fm(t))return oR(t);if(sm(t)){const n=t.regex.lastIndexOf("/"),a=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),ur(a,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(dm(t))return ur(Um,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(r=t==null?void 0:t.$cstNode)==null?void 0:r.text}`)}}}s(Wn,"abstractElementToRegex");function iR(t){return ur(t.elements.map(e=>Wn(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(iR,"terminalAlternativesToRegex");function sR(t){return ur(t.elements.map(e=>Wn(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(sR,"terminalGroupToRegex");function oR(t){return ur(`${Um}*?${Wn(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(oR,"untilTokenToRegex");function lR(t){return ur(`(?!${Wn(t.terminal)})${Um}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(lR,"negateTokenToRegex");function uR(t){return t.right?ur(`[${uc(t.left)}-${uc(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):ur(uc(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(uR,"characterRangeToRegex");function uc(t){return ni(t.value)}s(uc,"keywordToRegex");function ur(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}s(ur,"withCardinality");function zm(t){const e=[],r=t.Grammar;for(const n of r.rules)xt(n)&&Pm(n)&&Cm($u(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:ym}}s(zm,"createGrammarConfig");var ak=typeof global=="object"&&global&&global.Object===Object&&global,cR=ak,ik=typeof self=="object"&&self&&self.Object===Object&&self,sk=cR||ik||Function("return this")(),fr=sk,ok=fr.Symbol,Dt=ok,fR=Object.prototype,lk=fR.hasOwnProperty,uk=fR.toString,Ni=Dt?Dt.toStringTag:void 0;function dR(t){var e=lk.call(t,Ni),r=t[Ni];try{t[Ni]=void 0;var n=!0}catch{}var a=uk.call(t);return n&&(e?t[Ni]=r:delete t[Ni]),a}s(dR,"getRawTag");var ck=dR,fk=Object.prototype,dk=fk.toString;function pR(t){return dk.call(t)}s(pR,"objectToString");var pk=pR,hk="[object Null]",mk="[object Undefined]",by=Dt?Dt.toStringTag:void 0;function hR(t){return t==null?t===void 0?mk:hk:by&&by in Object(t)?ck(t):pk(t)}s(hR,"baseGetTag");var en=hR;function mR(t){return t!=null&&typeof t=="object"}s(mR,"isObjectLike");var Vt=mR,gk="[object Symbol]";function gR(t){return typeof t=="symbol"||Vt(t)&&en(t)==gk}s(gR,"isSymbol");var kf=gR;function yR(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}s(yR,"arrayMap");var Au=yR,yk=Array.isArray,ae=yk,vk=1/0,wy=Dt?Dt.prototype:void 0,Iy=wy?wy.toString:void 0;function Bm(t){if(typeof t=="string")return t;if(ae(t))return Au(t,Bm)+"";if(kf(t))return Iy?Iy.call(t):"";var e=t+"";return e=="0"&&1/t==-vk?"-0":e}s(Bm,"baseToString");var Tk=Bm,Rk=/\s/;function vR(t){for(var e=t.length;e--&&Rk.test(t.charAt(e)););return e}s(vR,"trimmedEndIndex");var $k=vR,Ak=/^\s+/;function TR(t){return t&&t.slice(0,$k(t)+1).replace(Ak,"")}s(TR,"baseTrim");var Ek=TR;function RR(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(RR,"isObject");var Mt=RR,Ny=0/0,_k=/^[-+]0x[0-9a-f]+$/i,Ck=/^0b[01]+$/i,Sk=/^0o[0-7]+$/i,bk=parseInt;function $R(t){if(typeof t=="number")return t;if(kf(t))return Ny;if(Mt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Mt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ek(t);var r=Ck.test(t);return r||Sk.test(t)?bk(t.slice(2),r?2:8):_k.test(t)?Ny:+t}s($R,"toNumber");var wk=$R,ky=1/0,Ik=17976931348623157e292;function AR(t){if(!t)return t===0?t:0;if(t=wk(t),t===ky||t===-ky){var e=t<0?-1:1;return e*Ik}return t===t?t:0}s(AR,"toFinite");var Nk=AR;function ER(t){var e=Nk(t),r=e%1;return e===e?r?e-r:e:0}s(ER,"toInteger");var Eu=ER;function _R(t){return t}s(_R,"identity");var Ha=_R,kk="[object AsyncFunction]",Pk="[object Function]",Ok="[object GeneratorFunction]",Lk="[object Proxy]";function CR(t){if(!Mt(t))return!1;var e=en(t);return e==Pk||e==Ok||e==kk||e==Lk}s(CR,"isFunction");var Mr=CR,Dk=fr["__core-js_shared__"],Ed=Dk,Py=function(){var t=/[^.]+$/.exec(Ed&&Ed.keys&&Ed.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function SR(t){return!!Py&&Py in t}s(SR,"isMasked");var Mk=SR,xk=Function.prototype,Fk=xk.toString;function bR(t){if(t!=null){try{return Fk.call(t)}catch{}try{return t+""}catch{}}return""}s(bR,"toSource");var Vn=bR,Gk=/[\\^$.*+?()[\]{}|]/g,jk=/^\[object .+?Constructor\]$/,Uk=Function.prototype,zk=Object.prototype,Bk=Uk.toString,Kk=zk.hasOwnProperty,qk=RegExp("^"+Bk.call(Kk).replace(Gk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wR(t){if(!Mt(t)||Mk(t))return!1;var e=Mr(t)?qk:jk;return e.test(Vn(t))}s(wR,"baseIsNative");var Wk=wR;function IR(t,e){return t==null?void 0:t[e]}s(IR,"getValue");var Vk=IR;function NR(t,e){var r=Vk(t,e);return Wk(r)?r:void 0}s(NR,"getNative");var Hn=NR,Hk=Hn(fr,"WeakMap"),Hp=Hk,Oy=Object.create,Yk=function(){function t(){}return s(t,"object"),function(e){if(!Mt(e))return{};if(Oy)return Oy(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Xk=Yk;function kR(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}s(kR,"apply");var Jk=kR;function PR(){}s(PR,"noop");var qe=PR;function OR(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}s(OR,"copyArray");var Zk=OR,Qk=800,eP=16,tP=Date.now;function LR(t){var e=0,r=0;return function(){var n=tP(),a=eP-(n-r);if(r=n,a>0){if(++e>=Qk)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}s(LR,"shortOut");var rP=LR;function DR(t){return function(){return t}}s(DR,"constant");var nP=DR,aP=function(){try{var t=Hn(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Kc=aP,iP=Kc?function(t,e){return Kc(t,"toString",{configurable:!0,enumerable:!1,value:nP(e),writable:!0})}:Ha,sP=iP,oP=rP(sP),lP=oP;function MR(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}s(MR,"arrayEach");var xR=MR;function FR(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}s(FR,"baseFindIndex");var GR=FR;function jR(t){return t!==t}s(jR,"baseIsNaN");var uP=jR;function UR(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}s(UR,"strictIndexOf");var cP=UR;function zR(t,e,r){return e===e?cP(t,e,r):GR(t,uP,r)}s(zR,"baseIndexOf");var Km=zR;function BR(t,e){var r=t==null?0:t.length;return!!r&&Km(t,e,0)>-1}s(BR,"arrayIncludes");var KR=BR,fP=9007199254740991,dP=/^(?:0|[1-9]\d*)$/;function qR(t,e){var r=typeof t;return e=e??fP,!!e&&(r=="number"||r!="symbol"&&dP.test(t))&&t>-1&&t%1==0&&t<e}s(qR,"isIndex");var Pf=qR;function WR(t,e,r){e=="__proto__"&&Kc?Kc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}s(WR,"baseAssignValue");var qm=WR;function VR(t,e){return t===e||t!==t&&e!==e}s(VR,"eq");var _u=VR,pP=Object.prototype,hP=pP.hasOwnProperty;function HR(t,e,r){var n=t[e];(!(hP.call(t,e)&&_u(n,r))||r===void 0&&!(e in t))&&qm(t,e,r)}s(HR,"assignValue");var Of=HR;function YR(t,e,r,n){var a=!r;r||(r={});for(var i=-1,o=e.length;++i<o;){var u=e[i],l=n?n(r[u],t[u],u,r,t):void 0;l===void 0&&(l=t[u]),a?qm(r,u,l):Of(r,u,l)}return r}s(YR,"copyObject");var Cu=YR,Ly=Math.max;function XR(t,e,r){return e=Ly(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=Ly(n.length-e,0),o=Array(i);++a<i;)o[a]=n[e+a];a=-1;for(var u=Array(e+1);++a<e;)u[a]=n[a];return u[e]=r(o),Jk(t,this,u)}}s(XR,"overRest");var mP=XR;function JR(t,e){return lP(mP(t,e,Ha),t+"")}s(JR,"baseRest");var Wm=JR,gP=9007199254740991;function ZR(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=gP}s(ZR,"isLength");var Vm=ZR;function QR(t){return t!=null&&Vm(t.length)&&!Mr(t)}s(QR,"isArrayLike");var dr=QR;function e$(t,e,r){if(!Mt(r))return!1;var n=typeof e;return(n=="number"?dr(r)&&Pf(e,r.length):n=="string"&&e in r)?_u(r[e],t):!1}s(e$,"isIterateeCall");var Lf=e$;function t$(t){return Wm(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,o&&Lf(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var u=r[n];u&&t(e,u,n,i)}return e})}s(t$,"createAssigner");var yP=t$,vP=Object.prototype;function r$(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||vP;return t===r}s(r$,"isPrototype");var Su=r$;function n$(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(n$,"baseTimes");var TP=n$,RP="[object Arguments]";function a$(t){return Vt(t)&&en(t)==RP}s(a$,"baseIsArguments");var Dy=a$,i$=Object.prototype,$P=i$.hasOwnProperty,AP=i$.propertyIsEnumerable,EP=Dy(function(){return arguments}())?Dy:function(t){return Vt(t)&&$P.call(t,"callee")&&!AP.call(t,"callee")},Df=EP;function s$(){return!1}s(s$,"stubFalse");var _P=s$,o$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,My=o$&&typeof module=="object"&&module&&!module.nodeType&&module,CP=My&&My.exports===o$,xy=CP?fr.Buffer:void 0,SP=xy?xy.isBuffer:void 0,bP=SP||_P,ms=bP,wP="[object Arguments]",IP="[object Array]",NP="[object Boolean]",kP="[object Date]",PP="[object Error]",OP="[object Function]",LP="[object Map]",DP="[object Number]",MP="[object Object]",xP="[object RegExp]",FP="[object Set]",GP="[object String]",jP="[object WeakMap]",UP="[object ArrayBuffer]",zP="[object DataView]",BP="[object Float32Array]",KP="[object Float64Array]",qP="[object Int8Array]",WP="[object Int16Array]",VP="[object Int32Array]",HP="[object Uint8Array]",YP="[object Uint8ClampedArray]",XP="[object Uint16Array]",JP="[object Uint32Array]",Se={};Se[BP]=Se[KP]=Se[qP]=Se[WP]=Se[VP]=Se[HP]=Se[YP]=Se[XP]=Se[JP]=!0;Se[wP]=Se[IP]=Se[UP]=Se[NP]=Se[zP]=Se[kP]=Se[PP]=Se[OP]=Se[LP]=Se[DP]=Se[MP]=Se[xP]=Se[FP]=Se[GP]=Se[jP]=!1;function l$(t){return Vt(t)&&Vm(t.length)&&!!Se[en(t)]}s(l$,"baseIsTypedArray");var ZP=l$;function u$(t){return function(e){return t(e)}}s(u$,"baseUnary");var bu=u$,c$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,is=c$&&typeof module=="object"&&module&&!module.nodeType&&module,QP=is&&is.exports===c$,_d=QP&&cR.process,e0=function(){try{var t=is&&is.require&&is.require("util").types;return t||_d&&_d.binding&&_d.binding("util")}catch{}}(),Hr=e0,Fy=Hr&&Hr.isTypedArray,t0=Fy?bu(Fy):ZP,Hm=t0,r0=Object.prototype,n0=r0.hasOwnProperty;function f$(t,e){var r=ae(t),n=!r&&Df(t),a=!r&&!n&&ms(t),i=!r&&!n&&!a&&Hm(t),o=r||n||a||i,u=o?TP(t.length,String):[],l=u.length;for(var c in t)(e||n0.call(t,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Pf(c,l)))&&u.push(c);return u}s(f$,"arrayLikeKeys");var d$=f$;function p$(t,e){return function(r){return t(e(r))}}s(p$,"overArg");var h$=p$,a0=h$(Object.keys,Object),i0=a0,s0=Object.prototype,o0=s0.hasOwnProperty;function m$(t){if(!Su(t))return i0(t);var e=[];for(var r in Object(t))o0.call(t,r)&&r!="constructor"&&e.push(r);return e}s(m$,"baseKeys");var g$=m$;function y$(t){return dr(t)?d$(t):g$(t)}s(y$,"keys");var $t=y$,l0=Object.prototype,u0=l0.hasOwnProperty,c0=yP(function(t,e){if(Su(e)||dr(e)){Cu(e,$t(e),t);return}for(var r in e)u0.call(e,r)&&Of(t,r,e[r])}),At=c0;function v$(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}s(v$,"nativeKeysIn");var f0=v$,d0=Object.prototype,p0=d0.hasOwnProperty;function T$(t){if(!Mt(t))return f0(t);var e=Su(t),r=[];for(var n in t)n=="constructor"&&(e||!p0.call(t,n))||r.push(n);return r}s(T$,"baseKeysIn");var h0=T$;function R$(t){return dr(t)?d$(t,!0):h0(t)}s(R$,"keysIn");var Mf=R$,m0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,g0=/^\w*$/;function $$(t,e){if(ae(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||kf(t)?!0:g0.test(t)||!m0.test(t)||e!=null&&t in Object(e)}s($$,"isKey");var Ym=$$,y0=Hn(Object,"create"),gs=y0;function A$(){this.__data__=gs?gs(null):{},this.size=0}s(A$,"hashClear");var v0=A$;function E$(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(E$,"hashDelete");var T0=E$,R0="__lodash_hash_undefined__",$0=Object.prototype,A0=$0.hasOwnProperty;function _$(t){var e=this.__data__;if(gs){var r=e[t];return r===R0?void 0:r}return A0.call(e,t)?e[t]:void 0}s(_$,"hashGet");var E0=_$,_0=Object.prototype,C0=_0.hasOwnProperty;function C$(t){var e=this.__data__;return gs?e[t]!==void 0:C0.call(e,t)}s(C$,"hashHas");var S0=C$,b0="__lodash_hash_undefined__";function S$(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gs&&e===void 0?b0:e,this}s(S$,"hashSet");var w0=S$;function Yn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Yn,"Hash");Yn.prototype.clear=v0;Yn.prototype.delete=T0;Yn.prototype.get=E0;Yn.prototype.has=S0;Yn.prototype.set=w0;var Gy=Yn;function b$(){this.__data__=[],this.size=0}s(b$,"listCacheClear");var I0=b$;function w$(t,e){for(var r=t.length;r--;)if(_u(t[r][0],e))return r;return-1}s(w$,"assocIndexOf");var xf=w$,N0=Array.prototype,k0=N0.splice;function I$(t){var e=this.__data__,r=xf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():k0.call(e,r,1),--this.size,!0}s(I$,"listCacheDelete");var P0=I$;function N$(t){var e=this.__data__,r=xf(e,t);return r<0?void 0:e[r][1]}s(N$,"listCacheGet");var O0=N$;function k$(t){return xf(this.__data__,t)>-1}s(k$,"listCacheHas");var L0=k$;function P$(t,e){var r=this.__data__,n=xf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(P$,"listCacheSet");var D0=P$;function Xn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Xn,"ListCache");Xn.prototype.clear=I0;Xn.prototype.delete=P0;Xn.prototype.get=O0;Xn.prototype.has=L0;Xn.prototype.set=D0;var Ff=Xn,M0=Hn(fr,"Map"),ys=M0;function O$(){this.size=0,this.__data__={hash:new Gy,map:new(ys||Ff),string:new Gy}}s(O$,"mapCacheClear");var x0=O$;function L$(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(L$,"isKeyable");var F0=L$;function D$(t,e){var r=t.__data__;return F0(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(D$,"getMapData");var Gf=D$;function M$(t){var e=Gf(this,t).delete(t);return this.size-=e?1:0,e}s(M$,"mapCacheDelete");var G0=M$;function x$(t){return Gf(this,t).get(t)}s(x$,"mapCacheGet");var j0=x$;function F$(t){return Gf(this,t).has(t)}s(F$,"mapCacheHas");var U0=F$;function G$(t,e){var r=Gf(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(G$,"mapCacheSet");var z0=G$;function Jn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(Jn,"MapCache");Jn.prototype.clear=x0;Jn.prototype.delete=G0;Jn.prototype.get=j0;Jn.prototype.has=U0;Jn.prototype.set=z0;var jf=Jn,B0="Expected a function";function Uf(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(B0);var r=s(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o},"memoized");return r.cache=new(Uf.Cache||jf),r}s(Uf,"memoize");Uf.Cache=jf;var K0=Uf,q0=500;function j$(t){var e=K0(t,function(n){return r.size===q0&&r.clear(),n}),r=e.cache;return e}s(j$,"memoizeCapped");var W0=j$,V0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H0=/\\(\\)?/g,Y0=W0(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(V0,function(r,n,a,i){e.push(a?i.replace(H0,"$1"):n||r)}),e}),X0=Y0;function U$(t){return t==null?"":Tk(t)}s(U$,"toString");var J0=U$;function z$(t,e){return ae(t)?t:Ym(t,e)?[t]:X0(J0(t))}s(z$,"castPath");var zf=z$,Z0=1/0;function B$(t){if(typeof t=="string"||kf(t))return t;var e=t+"";return e=="0"&&1/t==-Z0?"-0":e}s(B$,"toKey");var wu=B$;function K$(t,e){e=zf(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[wu(e[r++])];return r&&r==n?t:void 0}s(K$,"baseGet");var Xm=K$;function q$(t,e,r){var n=t==null?void 0:Xm(t,e);return n===void 0?r:n}s(q$,"get");var Q0=q$;function W$(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}s(W$,"arrayPush");var Jm=W$,jy=Dt?Dt.isConcatSpreadable:void 0;function V$(t){return ae(t)||Df(t)||!!(jy&&t&&t[jy])}s(V$,"isFlattenable");var eO=V$;function Zm(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=eO),a||(a=[]);++i<o;){var u=t[i];e>0&&r(u)?e>1?Zm(u,e-1,r,n,a):Jm(a,u):n||(a[a.length]=u)}return a}s(Zm,"baseFlatten");var Qm=Zm;function H$(t){var e=t==null?0:t.length;return e?Qm(t,1):[]}s(H$,"flatten");var qt=H$,tO=h$(Object.getPrototypeOf,Object),Y$=tO;function X$(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++n<a;)i[n]=t[n+e];return i}s(X$,"baseSlice");var J$=X$;function Z$(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}s(Z$,"arrayReduce");var rO=Z$;function Q$(){this.__data__=new Ff,this.size=0}s(Q$,"stackClear");var nO=Q$;function eA(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(eA,"stackDelete");var aO=eA;function tA(t){return this.__data__.get(t)}s(tA,"stackGet");var iO=tA;function rA(t){return this.__data__.has(t)}s(rA,"stackHas");var sO=rA,oO=200;function nA(t,e){var r=this.__data__;if(r instanceof Ff){var n=r.__data__;if(!ys||n.length<oO-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new jf(n)}return r.set(t,e),this.size=r.size,this}s(nA,"stackSet");var lO=nA;function Zn(t){var e=this.__data__=new Ff(t);this.size=e.size}s(Zn,"Stack");Zn.prototype.clear=nO;Zn.prototype.delete=aO;Zn.prototype.get=iO;Zn.prototype.has=sO;Zn.prototype.set=lO;var ss=Zn;function aA(t,e){return t&&Cu(e,$t(e),t)}s(aA,"baseAssign");var uO=aA;function iA(t,e){return t&&Cu(e,Mf(e),t)}s(iA,"baseAssignIn");var cO=iA,sA=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uy=sA&&typeof module=="object"&&module&&!module.nodeType&&module,fO=Uy&&Uy.exports===sA,zy=fO?fr.Buffer:void 0,By=zy?zy.allocUnsafe:void 0;function oA(t,e){if(e)return t.slice();var r=t.length,n=By?By(r):new t.constructor(r);return t.copy(n),n}s(oA,"cloneBuffer");var dO=oA;function lA(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}s(lA,"arrayFilter");var eg=lA;function uA(){return[]}s(uA,"stubArray");var cA=uA,pO=Object.prototype,hO=pO.propertyIsEnumerable,Ky=Object.getOwnPropertySymbols,mO=Ky?function(t){return t==null?[]:(t=Object(t),eg(Ky(t),function(e){return hO.call(t,e)}))}:cA,tg=mO;function fA(t,e){return Cu(t,tg(t),e)}s(fA,"copySymbols");var gO=fA,yO=Object.getOwnPropertySymbols,vO=yO?function(t){for(var e=[];t;)Jm(e,tg(t)),t=Y$(t);return e}:cA,dA=vO;function pA(t,e){return Cu(t,dA(t),e)}s(pA,"copySymbolsIn");var TO=pA;function hA(t,e,r){var n=e(t);return ae(t)?n:Jm(n,r(t))}s(hA,"baseGetAllKeys");var mA=hA;function gA(t){return mA(t,$t,tg)}s(gA,"getAllKeys");var Yp=gA;function yA(t){return mA(t,Mf,dA)}s(yA,"getAllKeysIn");var vA=yA,RO=Hn(fr,"DataView"),Xp=RO,$O=Hn(fr,"Promise"),Jp=$O,AO=Hn(fr,"Set"),Fa=AO,qy="[object Map]",EO="[object Object]",Wy="[object Promise]",Vy="[object Set]",Hy="[object WeakMap]",Yy="[object DataView]",_O=Vn(Xp),CO=Vn(ys),SO=Vn(Jp),bO=Vn(Fa),wO=Vn(Hp),dn=en;(Xp&&dn(new Xp(new ArrayBuffer(1)))!=Yy||ys&&dn(new ys)!=qy||Jp&&dn(Jp.resolve())!=Wy||Fa&&dn(new Fa)!=Vy||Hp&&dn(new Hp)!=Hy)&&(dn=s(function(t){var e=en(t),r=e==EO?t.constructor:void 0,n=r?Vn(r):"";if(n)switch(n){case _O:return Yy;case CO:return qy;case SO:return Wy;case bO:return Vy;case wO:return Hy}return e},"getTag"));var Ya=dn,IO=Object.prototype,NO=IO.hasOwnProperty;function TA(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&NO.call(t,"index")&&(r.index=t.index,r.input=t.input),r}s(TA,"initCloneArray");var kO=TA,PO=fr.Uint8Array,qc=PO;function RA(t){var e=new t.constructor(t.byteLength);return new qc(e).set(new qc(t)),e}s(RA,"cloneArrayBuffer");var rg=RA;function $A(t,e){var r=e?rg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}s($A,"cloneDataView");var OO=$A,LO=/\w*$/;function AA(t){var e=new t.constructor(t.source,LO.exec(t));return e.lastIndex=t.lastIndex,e}s(AA,"cloneRegExp");var DO=AA,Xy=Dt?Dt.prototype:void 0,Jy=Xy?Xy.valueOf:void 0;function EA(t){return Jy?Object(Jy.call(t)):{}}s(EA,"cloneSymbol");var MO=EA;function _A(t,e){var r=e?rg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}s(_A,"cloneTypedArray");var xO=_A,FO="[object Boolean]",GO="[object Date]",jO="[object Map]",UO="[object Number]",zO="[object RegExp]",BO="[object Set]",KO="[object String]",qO="[object Symbol]",WO="[object ArrayBuffer]",VO="[object DataView]",HO="[object Float32Array]",YO="[object Float64Array]",XO="[object Int8Array]",JO="[object Int16Array]",ZO="[object Int32Array]",QO="[object Uint8Array]",eL="[object Uint8ClampedArray]",tL="[object Uint16Array]",rL="[object Uint32Array]";function CA(t,e,r){var n=t.constructor;switch(e){case WO:return rg(t);case FO:case GO:return new n(+t);case VO:return OO(t,r);case HO:case YO:case XO:case JO:case ZO:case QO:case eL:case tL:case rL:return xO(t,r);case jO:return new n;case UO:case KO:return new n(t);case zO:return DO(t);case BO:return new n;case qO:return MO(t)}}s(CA,"initCloneByTag");var nL=CA;function SA(t){return typeof t.constructor=="function"&&!Su(t)?Xk(Y$(t)):{}}s(SA,"initCloneObject");var aL=SA,iL="[object Map]";function bA(t){return Vt(t)&&Ya(t)==iL}s(bA,"baseIsMap");var sL=bA,Zy=Hr&&Hr.isMap,oL=Zy?bu(Zy):sL,lL=oL,uL="[object Set]";function wA(t){return Vt(t)&&Ya(t)==uL}s(wA,"baseIsSet");var cL=wA,Qy=Hr&&Hr.isSet,fL=Qy?bu(Qy):cL,dL=fL,pL=1,hL=2,mL=4,IA="[object Arguments]",gL="[object Array]",yL="[object Boolean]",vL="[object Date]",TL="[object Error]",NA="[object Function]",RL="[object GeneratorFunction]",$L="[object Map]",AL="[object Number]",kA="[object Object]",EL="[object RegExp]",_L="[object Set]",CL="[object String]",SL="[object Symbol]",bL="[object WeakMap]",wL="[object ArrayBuffer]",IL="[object DataView]",NL="[object Float32Array]",kL="[object Float64Array]",PL="[object Int8Array]",OL="[object Int16Array]",LL="[object Int32Array]",DL="[object Uint8Array]",ML="[object Uint8ClampedArray]",xL="[object Uint16Array]",FL="[object Uint32Array]",Re={};Re[IA]=Re[gL]=Re[wL]=Re[IL]=Re[yL]=Re[vL]=Re[NL]=Re[kL]=Re[PL]=Re[OL]=Re[LL]=Re[$L]=Re[AL]=Re[kA]=Re[EL]=Re[_L]=Re[CL]=Re[SL]=Re[DL]=Re[ML]=Re[xL]=Re[FL]=!0;Re[TL]=Re[NA]=Re[bL]=!1;function os(t,e,r,n,a,i){var o,u=e&pL,l=e&hL,c=e&mL;if(r&&(o=a?r(t,n,a,i):r(t)),o!==void 0)return o;if(!Mt(t))return t;var f=ae(t);if(f){if(o=kO(t),!u)return Zk(t,o)}else{var d=Ya(t),p=d==NA||d==RL;if(ms(t))return dO(t,u);if(d==kA||d==IA||p&&!a){if(o=l||p?{}:aL(t),!u)return l?TO(t,cO(o,t)):gO(t,uO(o,t))}else{if(!Re[d])return a?t:{};o=nL(t,d,u)}}i||(i=new ss);var m=i.get(t);if(m)return m;i.set(t,o),dL(t)?t.forEach(function(E){o.add(os(E,e,r,E,t,i))}):lL(t)&&t.forEach(function(E,T){o.set(T,os(E,e,r,T,t,i))});var g=c?l?vA:Yp:l?Mf:$t,v=f?void 0:g(t);return xR(v||t,function(E,T){v&&(T=E,E=t[T]),Of(o,T,os(E,e,r,T,t,i))}),o}s(os,"baseClone");var GL=os,jL=4;function PA(t){return GL(t,jL)}s(PA,"clone");var et=PA;function OA(t){for(var e=-1,r=t==null?0:t.length,n=0,a=[];++e<r;){var i=t[e];i&&(a[n++]=i)}return a}s(OA,"compact");var Iu=OA,UL="__lodash_hash_undefined__";function LA(t){return this.__data__.set(t,UL),this}s(LA,"setCacheAdd");var zL=LA;function DA(t){return this.__data__.has(t)}s(DA,"setCacheHas");var BL=DA;function vs(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new jf;++e<r;)this.add(t[e])}s(vs,"SetCache");vs.prototype.add=vs.prototype.push=zL;vs.prototype.has=BL;var ng=vs;function MA(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}s(MA,"arraySome");var xA=MA;function FA(t,e){return t.has(e)}s(FA,"cacheHas");var ag=FA,KL=1,qL=2;function GA(t,e,r,n,a,i){var o=r&KL,u=t.length,l=e.length;if(u!=l&&!(o&&l>u))return!1;var c=i.get(t),f=i.get(e);if(c&&f)return c==e&&f==t;var d=-1,p=!0,m=r&qL?new ng:void 0;for(i.set(t,e),i.set(e,t);++d<u;){var g=t[d],v=e[d];if(n)var E=o?n(v,g,d,e,t,i):n(g,v,d,t,e,i);if(E!==void 0){if(E)continue;p=!1;break}if(m){if(!xA(e,function(T,b){if(!ag(m,b)&&(g===T||a(g,T,r,n,i)))return m.push(b)})){p=!1;break}}else if(!(g===v||a(g,v,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}s(GA,"equalArrays");var jA=GA;function UA(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}s(UA,"mapToArray");var WL=UA;function zA(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}s(zA,"setToArray");var ig=zA,VL=1,HL=2,YL="[object Boolean]",XL="[object Date]",JL="[object Error]",ZL="[object Map]",QL="[object Number]",eD="[object RegExp]",tD="[object Set]",rD="[object String]",nD="[object Symbol]",aD="[object ArrayBuffer]",iD="[object DataView]",ev=Dt?Dt.prototype:void 0,Cd=ev?ev.valueOf:void 0;function BA(t,e,r,n,a,i,o){switch(r){case iD:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case aD:return!(t.byteLength!=e.byteLength||!i(new qc(t),new qc(e)));case YL:case XL:case QL:return _u(+t,+e);case JL:return t.name==e.name&&t.message==e.message;case eD:case rD:return t==e+"";case ZL:var u=WL;case tD:var l=n&VL;if(u||(u=ig),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;n|=HL,o.set(t,e);var f=jA(u(t),u(e),n,a,i,o);return o.delete(t),f;case nD:if(Cd)return Cd.call(t)==Cd.call(e)}return!1}s(BA,"equalByTag");var sD=BA,oD=1,lD=Object.prototype,uD=lD.hasOwnProperty;function KA(t,e,r,n,a,i){var o=r&oD,u=Yp(t),l=u.length,c=Yp(e),f=c.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=u[d];if(!(o?p in e:uD.call(e,p)))return!1}var m=i.get(t),g=i.get(e);if(m&&g)return m==e&&g==t;var v=!0;i.set(t,e),i.set(e,t);for(var E=o;++d<l;){p=u[d];var T=t[p],b=e[p];if(n)var C=o?n(b,T,p,e,t,i):n(T,b,p,t,e,i);if(!(C===void 0?T===b||a(T,b,r,n,i):C)){v=!1;break}E||(E=p=="constructor")}if(v&&!E){var k=t.constructor,B=e.constructor;k!=B&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof B=="function"&&B instanceof B)&&(v=!1)}return i.delete(t),i.delete(e),v}s(KA,"equalObjects");var cD=KA,fD=1,tv="[object Arguments]",rv="[object Array]",Fu="[object Object]",dD=Object.prototype,nv=dD.hasOwnProperty;function qA(t,e,r,n,a,i){var o=ae(t),u=ae(e),l=o?rv:Ya(t),c=u?rv:Ya(e);l=l==tv?Fu:l,c=c==tv?Fu:c;var f=l==Fu,d=c==Fu,p=l==c;if(p&&ms(t)){if(!ms(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new ss),o||Hm(t)?jA(t,e,r,n,a,i):sD(t,e,l,r,n,a,i);if(!(r&fD)){var m=f&&nv.call(t,"__wrapped__"),g=d&&nv.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,E=g?e.value():e;return i||(i=new ss),a(v,E,r,n,i)}}return p?(i||(i=new ss),cD(t,e,r,n,a,i)):!1}s(qA,"baseIsEqualDeep");var pD=qA;function sg(t,e,r,n,a){return t===e?!0:t==null||e==null||!Vt(t)&&!Vt(e)?t!==t&&e!==e:pD(t,e,r,n,sg,a)}s(sg,"baseIsEqual");var WA=sg,hD=1,mD=2;function VA(t,e,r,n){var a=r.length,i=a,o=!n;if(t==null)return!i;for(t=Object(t);a--;){var u=r[a];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<i;){u=r[a];var l=u[0],c=t[l],f=u[1];if(o&&u[2]){if(c===void 0&&!(l in t))return!1}else{var d=new ss;if(n)var p=n(c,f,l,t,e,d);if(!(p===void 0?WA(f,c,hD|mD,n,d):p))return!1}}return!0}s(VA,"baseIsMatch");var gD=VA;function HA(t){return t===t&&!Mt(t)}s(HA,"isStrictComparable");var YA=HA;function XA(t){for(var e=$t(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,YA(a)]}return e}s(XA,"getMatchData");var yD=XA;function JA(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}s(JA,"matchesStrictComparable");var ZA=JA;function QA(t){var e=yD(t);return e.length==1&&e[0][2]?ZA(e[0][0],e[0][1]):function(r){return r===t||gD(r,t,e)}}s(QA,"baseMatches");var vD=QA;function eE(t,e){return t!=null&&e in Object(t)}s(eE,"baseHasIn");var TD=eE;function tE(t,e,r){e=zf(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=wu(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&Vm(a)&&Pf(o,a)&&(ae(t)||Df(t)))}s(tE,"hasPath");var rE=tE;function nE(t,e){return t!=null&&rE(t,e,TD)}s(nE,"hasIn");var RD=nE,$D=1,AD=2;function aE(t,e){return Ym(t)&&YA(e)?ZA(wu(t),e):function(r){var n=Q0(r,t);return n===void 0&&n===e?RD(r,t):WA(e,n,$D|AD)}}s(aE,"baseMatchesProperty");var ED=aE;function iE(t){return function(e){return e==null?void 0:e[t]}}s(iE,"baseProperty");var _D=iE;function sE(t){return function(e){return Xm(e,t)}}s(sE,"basePropertyDeep");var CD=sE;function oE(t){return Ym(t)?_D(wu(t)):CD(t)}s(oE,"property");var SD=oE;function lE(t){return typeof t=="function"?t:t==null?Ha:typeof t=="object"?ae(t)?ED(t[0],t[1]):vD(t):SD(t)}s(lE,"baseIteratee");var pr=lE;function uE(t,e,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;){var o=t[a];e(n,o,r(o),t)}return n}s(uE,"arrayAggregator");var bD=uE;function cE(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),u=o.length;u--;){var l=o[t?u:++a];if(r(i[l],l,i)===!1)break}return e}}s(cE,"createBaseFor");var wD=cE,ID=wD(),ND=ID;function fE(t,e){return t&&ND(t,e,$t)}s(fE,"baseForOwn");var kD=fE;function dE(t,e){return function(r,n){if(r==null)return r;if(!dr(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}s(dE,"createBaseEach");var PD=dE,OD=PD(kD),Qn=OD;function pE(t,e,r,n){return Qn(t,function(a,i,o){e(n,a,r(a),o)}),n}s(pE,"baseAggregator");var LD=pE;function hE(t,e){return function(r,n){var a=ae(r)?bD:LD,i=e?e():{};return a(r,t,pr(n),i)}}s(hE,"createAggregator");var DD=hE,mE=Object.prototype,MD=mE.hasOwnProperty,xD=Wm(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&Lf(e[0],e[1],a)&&(n=1);++r<n;)for(var i=e[r],o=Mf(i),u=-1,l=o.length;++u<l;){var c=o[u],f=t[c];(f===void 0||_u(f,mE[c])&&!MD.call(t,c))&&(t[c]=i[c])}return t}),og=xD;function gE(t){return Vt(t)&&dr(t)}s(gE,"isArrayLikeObject");var av=gE;function yE(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}s(yE,"arrayIncludesWith");var vE=yE,FD=200;function TE(t,e,r,n){var a=-1,i=KR,o=!0,u=t.length,l=[],c=e.length;if(!u)return l;r&&(e=Au(e,bu(r))),n?(i=vE,o=!1):e.length>=FD&&(i=ag,o=!1,e=new ng(e));e:for(;++a<u;){var f=t[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var p=c;p--;)if(e[p]===d)continue e;l.push(f)}else i(e,d,n)||l.push(f)}return l}s(TE,"baseDifference");var GD=TE,jD=Wm(function(t,e){return av(t)?GD(t,Qm(e,1,av,!0)):[]}),Bf=jD;function RE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}s(RE,"last");var xn=RE;function $E(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Eu(e),J$(t,e<0?0:e,n)):[]}s($E,"drop");var Ze=$E;function AE(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Eu(e),e=n-e,J$(t,0,e<0?0:e)):[]}s(AE,"dropRight");var Ts=AE;function EE(t){return typeof t=="function"?t:Ha}s(EE,"castFunction");var UD=EE;function _E(t,e){var r=ae(t)?xR:Qn;return r(t,UD(e))}s(_E,"forEach");var V=_E;function CE(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}s(CE,"arrayEvery");var zD=CE;function SE(t,e){var r=!0;return Qn(t,function(n,a,i){return r=!!e(n,a,i),r}),r}s(SE,"baseEvery");var BD=SE;function bE(t,e,r){var n=ae(t)?zD:BD;return r&&Lf(t,e,r)&&(e=void 0),n(t,pr(e))}s(bE,"every");var Wt=bE;function wE(t,e){var r=[];return Qn(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}s(wE,"baseFilter");var IE=wE;function NE(t,e){var r=ae(t)?eg:IE;return r(t,pr(e))}s(NE,"filter");var Ft=NE;function kE(t){return function(e,r,n){var a=Object(e);if(!dr(e)){var i=pr(r);e=$t(e),r=s(function(u){return i(a[u],u,a)},"predicate")}var o=t(e,r,n);return o>-1?a[i?e[o]:o]:void 0}}s(kE,"createFind");var KD=kE,qD=Math.max;function PE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Eu(r);return a<0&&(a=qD(n+a,0)),GR(t,pr(e),a)}s(PE,"findIndex");var WD=PE,VD=KD(WD),Xa=VD;function OE(t){return t&&t.length?t[0]:void 0}s(OE,"head");var Ht=OE;function LE(t,e){var r=-1,n=dr(t)?Array(t.length):[];return Qn(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(LE,"baseMap");var HD=LE;function DE(t,e){var r=ae(t)?Au:HD;return r(t,pr(e))}s(DE,"map");var z=DE;function ME(t,e){return Qm(z(t,e),1)}s(ME,"flatMap");var Lt=ME,YD=Object.prototype,XD=YD.hasOwnProperty,JD=DD(function(t,e,r){XD.call(t,r)?t[r].push(e):qm(t,r,[e])}),ZD=JD,QD=Object.prototype,eM=QD.hasOwnProperty;function xE(t,e){return t!=null&&eM.call(t,e)}s(xE,"baseHas");var tM=xE;function FE(t,e){return t!=null&&rE(t,e,tM)}s(FE,"has");var q=FE,rM="[object String]";function GE(t){return typeof t=="string"||!ae(t)&&Vt(t)&&en(t)==rM}s(GE,"isString");var ht=GE;function jE(t,e){return Au(e,function(r){return t[r]})}s(jE,"baseValues");var nM=jE;function UE(t){return t==null?[]:nM(t,$t(t))}s(UE,"values");var We=UE,aM=Math.max;function zE(t,e,r,n){t=dr(t)?t:We(t),r=r&&!n?Eu(r):0;var a=t.length;return r<0&&(r=aM(a+r,0)),ht(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&Km(t,e,r)>-1}s(zE,"includes");var ft=zE,iM=Math.max;function BE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Eu(r);return a<0&&(a=iM(n+a,0)),Km(t,e,a)}s(BE,"indexOf");var iv=BE,sM="[object Map]",oM="[object Set]",lM=Object.prototype,uM=lM.hasOwnProperty;function KE(t){if(t==null)return!0;if(dr(t)&&(ae(t)||typeof t=="string"||typeof t.splice=="function"||ms(t)||Hm(t)||Df(t)))return!t.length;var e=Ya(t);if(e==sM||e==oM)return!t.size;if(Su(t))return!g$(t).length;for(var r in t)if(uM.call(t,r))return!1;return!0}s(KE,"isEmpty");var Ae=KE,cM="[object RegExp]";function qE(t){return Vt(t)&&en(t)==cM}s(qE,"baseIsRegExp");var fM=qE,sv=Hr&&Hr.isRegExp,dM=sv?bu(sv):fM,Ir=dM;function WE(t){return t===void 0}s(WE,"isUndefined");var Nr=WE,pM="Expected a function";function VE(t){if(typeof t!="function")throw new TypeError(pM);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}s(VE,"negate");var hM=VE;function HE(t,e,r,n){if(!Mt(t))return t;e=zf(e,t);for(var a=-1,i=e.length,o=i-1,u=t;u!=null&&++a<i;){var l=wu(e[a]),c=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(a!=o){var f=u[l];c=n?n(f,l,u):void 0,c===void 0&&(c=Mt(f)?f:Pf(e[a+1])?[]:{})}Of(u,l,c),u=u[l]}return t}s(HE,"baseSet");var mM=HE;function YE(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var o=e[n],u=Xm(t,o);r(u,o)&&mM(i,zf(o,t),u)}return i}s(YE,"basePickBy");var gM=YE;function XE(t,e){if(t==null)return{};var r=Au(vA(t),function(n){return[n]});return e=pr(e),gM(t,r,function(n,a){return e(n,a[0])})}s(XE,"pickBy");var Yt=XE;function JE(t,e,r,n,a){return a(t,function(i,o,u){r=n?(n=!1,i):e(r,i,o,u)}),r}s(JE,"baseReduce");var yM=JE;function ZE(t,e,r){var n=ae(t)?rO:yM,a=arguments.length<3;return n(t,pr(e),r,a,Qn)}s(ZE,"reduce");var Et=ZE;function QE(t,e){var r=ae(t)?eg:IE;return r(t,hM(pr(e)))}s(QE,"reject");var Kf=QE;function e_(t,e){var r;return Qn(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}s(e_,"baseSome");var vM=e_;function t_(t,e,r){var n=ae(t)?xA:vM;return r&&Lf(t,e,r)&&(e=void 0),n(t,pr(e))}s(t_,"some");var r_=t_,TM=1/0,RM=Fa&&1/ig(new Fa([,-0]))[1]==TM?function(t){return new Fa(t)}:qe,$M=RM,AM=200;function n_(t,e,r){var n=-1,a=KR,i=t.length,o=!0,u=[],l=u;if(r)o=!1,a=vE;else if(i>=AM){var c=e?null:$M(t);if(c)return ig(c);o=!1,a=ag,l=new ng}else l=e?[]:u;e:for(;++n<i;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;e&&l.push(d),u.push(f)}else a(l,d,r)||(l!==u&&l.push(d),u.push(f))}return u}s(n_,"baseUniq");var EM=n_;function a_(t){return t&&t.length?EM(t):[]}s(a_,"uniq");var lg=a_;function Wc(t){console&&console.error&&console.error(`Error: ${t}`)}s(Wc,"PRINT_ERROR");function ug(t){console&&console.warn&&console.warn(`Warning: ${t}`)}s(ug,"PRINT_WARNING");function cg(t){const e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}s(cg,"timer");function fg(t){function e(){}s(e,"FakeConstructor"),e.prototype=t;const r=new e;function n(){return typeof r.bar}return s(n,"fakeAccess"),n(),n(),t}s(fg,"toFastProperties");function i_(t){return s_(t)?t.LABEL:t.name}s(i_,"tokenLabel");function s_(t){return ht(t.LABEL)&&t.LABEL!==""}s(s_,"hasTokenLabel");var Ms,hr=(Ms=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),V(this.definition,r=>{r.accept(e)})}},s(Ms,"AbstractProduction"),Ms),xs,lt=(xs=class extends hr{constructor(e){super([]),this.idx=1,At(this,Yt(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},s(xs,"NonTerminal"),xs),Fs,ai=(Fs=class extends hr{constructor(e){super(e.definition),this.orgText="",At(this,Yt(e,r=>r!==void 0))}},s(Fs,"Rule"),Fs),Gs,mt=(Gs=class extends hr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,At(this,Yt(e,r=>r!==void 0))}},s(Gs,"Alternative"),Gs),js,Qe=(js=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(js,"Option"),js),Us,_t=(Us=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(Us,"RepetitionMandatory"),Us),zs,Ct=(zs=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(zs,"RepetitionMandatoryWithSeparator"),zs),Bs,xe=(Bs=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(Bs,"Repetition"),Bs),Ks,gt=(Ks=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(Ks,"RepetitionWithSeparator"),Ks),qs,yt=(qs=class extends hr{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,At(this,Yt(e,r=>r!==void 0))}},s(qs,"Alternation"),qs),Ws,we=(Ws=class{constructor(e){this.idx=1,At(this,Yt(e,r=>r!==void 0))}accept(e){e.visit(this)}},s(Ws,"Terminal"),Ws);function o_(t){return z(t,ls)}s(o_,"serializeGrammar");function ls(t){function e(r){return z(r,ls)}if(s(e,"convertDefinition"),t instanceof lt){const r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return ht(t.label)&&(r.label=t.label),r}else{if(t instanceof mt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Qe)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof _t)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ct)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:ls(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof gt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:ls(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof xe)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof yt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof we){const r={type:"Terminal",name:t.terminalType.name,label:i_(t.terminalType),idx:t.idx};ht(t.label)&&(r.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=Ir(n)?n.source:n),r}else{if(t instanceof ai)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}s(ls,"serializeProduction");var Vs,ii=(Vs=class{visit(e){const r=e;switch(r.constructor){case lt:return this.visitNonTerminal(r);case mt:return this.visitAlternative(r);case Qe:return this.visitOption(r);case _t:return this.visitRepetitionMandatory(r);case Ct:return this.visitRepetitionMandatoryWithSeparator(r);case gt:return this.visitRepetitionWithSeparator(r);case xe:return this.visitRepetition(r);case yt:return this.visitAlternation(r);case we:return this.visitTerminal(r);case ai:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},s(Vs,"GAstVisitor"),Vs);function l_(t){return t instanceof mt||t instanceof Qe||t instanceof xe||t instanceof _t||t instanceof Ct||t instanceof gt||t instanceof we||t instanceof ai}s(l_,"isSequenceProd");function Rs(t,e=[]){return t instanceof Qe||t instanceof xe||t instanceof gt?!0:t instanceof yt?r_(t.definition,n=>Rs(n,e)):t instanceof lt&&ft(e,t)?!1:t instanceof hr?(t instanceof lt&&e.push(t),Wt(t.definition,n=>Rs(n,e))):!1}s(Rs,"isOptionalProd");function u_(t){return t instanceof yt}s(u_,"isBranchingProd");function Ut(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof yt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof gt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Ut,"getProductionDslName");var Hs,qf=(Hs=class{walk(e,r=[]){V(e.definition,(n,a)=>{const i=Ze(e.definition,a+1);if(n instanceof lt)this.walkProdRef(n,i,r);else if(n instanceof we)this.walkTerminal(n,i,r);else if(n instanceof mt)this.walkFlat(n,i,r);else if(n instanceof Qe)this.walkOption(n,i,r);else if(n instanceof _t)this.walkAtLeastOne(n,i,r);else if(n instanceof Ct)this.walkAtLeastOneSep(n,i,r);else if(n instanceof gt)this.walkManySep(n,i,r);else if(n instanceof xe)this.walkMany(n,i,r);else if(n instanceof yt)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){const a=r.concat(n);this.walk(e,a)}walkOption(e,r,n){const a=r.concat(n);this.walk(e,a)}walkAtLeastOne(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkAtLeastOneSep(e,r,n){const a=Zp(e,r,n);this.walk(e,a)}walkMany(e,r,n){const a=[new Qe({definition:e.definition})].concat(r,n);this.walk(e,a)}walkManySep(e,r,n){const a=Zp(e,r,n);this.walk(e,a)}walkOr(e,r,n){const a=r.concat(n);V(e.definition,i=>{const o=new mt({definition:[i]});this.walk(o,a)})}},s(Hs,"RestWalker"),Hs);function Zp(t,e,r){return[new Qe({definition:[new we({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}s(Zp,"restForRepetitionWithSeparator");function si(t){if(t instanceof lt)return si(t.referencedRule);if(t instanceof we)return d_(t);if(l_(t))return c_(t);if(u_(t))return f_(t);throw Error("non exhaustive match")}s(si,"first");function c_(t){let e=[];const r=t.definition;let n=0,a=r.length>n,i,o=!0;for(;a&&o;)i=r[n],o=Rs(i),e=e.concat(si(i)),n=n+1,a=r.length>n;return lg(e)}s(c_,"firstForSequence");function f_(t){const e=z(t.definition,r=>si(r));return lg(qt(e))}s(f_,"firstForBranching");function d_(t){return[t.terminalType]}s(d_,"firstForTerminal");var p_="_~IN~_",Ys,_M=(Ys=class extends qf{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){const a=m_(e.referencedRule,e.idx)+this.topProd.name,i=r.concat(n),o=new mt({definition:i}),u=si(o);this.follows[a]=u}},s(Ys,"ResyncFollowsWalker"),Ys);function h_(t){const e={};return V(t,r=>{const n=new _M(r).startWalking();At(e,n)}),e}s(h_,"computeAllProdsFollows");function m_(t,e){return t.name+e+p_}s(m_,"buildBetweenProdsFollowPrefix");var cc={},CM=new VT;function Nu(t){const e=t.toString();if(cc.hasOwnProperty(e))return cc[e];{const r=CM.pattern(e);return cc[e]=r,r}}s(Nu,"getRegExpAst");function g_(){cc={}}s(g_,"clearRegExpParserCache");var y_="Complement Sets are not supported for first char optimization",Vc=`Unable to use "first char" lexer optimizations:
47
+ `;function v_(t,e=!1){try{const r=Nu(t);return Hc(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===y_)e&&ug(`${Vc} Unable to optimize: < ${t.toString()} >
48
+ Complement Sets cannot be automatically optimized.
49
+ This will disable the lexer's first char optimizations.
50
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`
51
+ This will disable the lexer's first char optimizations.
52
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Wc(`${Vc}
53
+ Failed parsing: < ${t.toString()} >
54
+ Using the @chevrotain/regexp-to-ast library
55
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}s(v_,"getOptimizedStartCodesIndices");function Hc(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a<t.value.length;a++)Hc(t.value[a],e,r);break;case"Alternative":const n=t.value;for(let a=0;a<n.length;a++){const i=n[a];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const o=i;switch(o.type){case"Character":Wi(o.value,e,r);break;case"Set":if(o.complement===!0)throw Error(y_);V(o.value,l=>{if(typeof l=="number")Wi(l,e,r);else{const c=l;if(r===!0)for(let f=c.from;f<=c.to;f++)Wi(f,e,r);else{for(let f=c.from;f<=c.to&&f<Hi;f++)Wi(f,e,r);if(c.to>=Hi){const f=c.from>=Hi?c.from:Hi,d=c.to,p=kr(f),m=kr(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":Hc(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}const u=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Yc(o)===!1||o.type!=="Group"&&u===!1)break}break;default:throw Error("non exhaustive match!")}return We(e)}s(Hc,"firstCharOptimizedIndices");function Wi(t,e,r){const n=kr(t);e[n]=n,r===!0&&T_(t,e)}s(Wi,"addOptimizedIdxToResult");function T_(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const a=kr(n.charCodeAt(0));e[a]=a}else{const a=r.toLowerCase();if(a!==r){const i=kr(a.charCodeAt(0));e[i]=i}}}s(T_,"handleIgnoreCase");function Qp(t,e){return Xa(t.value,r=>{if(typeof r=="number")return ft(e,r);{const n=r;return Xa(e,a=>n.from<=a&&a<=n.to)!==void 0}})}s(Qp,"findCode");function Yc(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ae(t.value)?Wt(t.value,Yc):Yc(t.value):!1}s(Yc,"isWholeOptional");var Xs,SM=(Xs=class extends _f{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){ft(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Qp(e,this.targetCharCodes)===void 0&&(this.found=!0):Qp(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},s(Xs,"CharCodeFinder"),Xs);function Wf(t,e){if(e instanceof RegExp){const r=Nu(e),n=new SM(t);return n.visit(r),n.found}else return Xa(e,r=>ft(t,r.charCodeAt(0)))!==void 0}s(Wf,"canMatchCharCode");var Fn="PATTERN",Vi="defaultMode",Gu="modes",R_=typeof new RegExp("(?:)").sticky=="boolean";function $_(t,e){e=og(e,{useSticky:R_,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
56
+ `],tracer:s((b,C)=>C(),"tracer")});const r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{z_()});let n;r("Reject Lexer.NA",()=>{n=Kf(t,b=>b[Fn]===st.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=z(n,b=>{const C=b[Fn];if(Ir(C)){const k=C.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!C.ignoreCase?k:k.length===2&&k[0]==="\\"&&!ft(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:e.useSticky?th(C):eh(C)}else{if(Mr(C))return a=!0,{exec:C};if(typeof C=="object")return a=!0,C;if(typeof C=="string"){if(C.length===1)return C;{const k=C.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),B=new RegExp(k);return e.useSticky?th(B):eh(B)}}else throw Error("non exhaustive match")}})});let o,u,l,c,f;r("misc mapping",()=>{o=z(n,b=>b.tokenTypeIdx),u=z(n,b=>{const C=b.GROUP;if(C!==st.SKIPPED){if(ht(C))return C;if(Nr(C))return!1;throw Error("non exhaustive match")}}),l=z(n,b=>{const C=b.LONGER_ALT;if(C)return ae(C)?z(C,B=>iv(n,B)):[iv(n,C)]}),c=z(n,b=>b.PUSH_MODE),f=z(n,b=>q(b,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{const b=hg(e.lineTerminatorCharacters);d=z(n,C=>!1),e.positionTracking!=="onlyOffset"&&(d=z(n,C=>q(C,"LINE_BREAKS")?!!C.LINE_BREAKS:pg(C,b)===!1&&Wf(b,C.PATTERN)))});let p,m,g,v;r("Misc Mapping #2",()=>{p=z(n,dg),m=z(i,j_),g=Et(n,(b,C)=>{const k=C.GROUP;return ht(k)&&k!==st.SKIPPED&&(b[k]=[]),b},{}),v=z(i,(b,C)=>({pattern:i[C],longerAlt:l[C],canLineTerminator:d[C],isCustom:p[C],short:m[C],group:u[C],push:c[C],pop:f[C],tokenTypeIdx:o[C],tokenType:n[C]}))});let E=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=Et(n,(b,C,k)=>{if(typeof C.PATTERN=="string"){const B=C.PATTERN.charCodeAt(0),te=kr(B);fc(b,te,v[k])}else if(ae(C.START_CHARS_HINT)){let B;V(C.START_CHARS_HINT,te=>{const X=typeof te=="string"?te.charCodeAt(0):te,de=kr(X);B!==de&&(B=de,fc(b,de,v[k]))})}else if(Ir(C.PATTERN))if(C.PATTERN.unicode)E=!1,e.ensureOptimizations&&Wc(`${Vc} Unable to analyze < ${C.PATTERN.toString()} > pattern.
57
+ The regexp unicode flag is not currently supported by the regexp-to-ast library.
58
+ This will disable the lexer's first char optimizations.
59
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const B=v_(C.PATTERN,e.ensureOptimizations);Ae(B)&&(E=!1),V(B,te=>{fc(b,te,v[k])})}else e.ensureOptimizations&&Wc(`${Vc} TokenType: <${C.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
60
+ This will disable the lexer's first char optimizations.
61
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),E=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:v,charCodeToPatternIdxToConfig:T,hasCustom:a,canBeOptimized:E}}s($_,"analyzeTokenTypes");function A_(t,e){let r=[];const n=__(t);r=r.concat(n.errors);const a=C_(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(E_(i)),r=r.concat(k_(i)),r=r.concat(P_(i,e)),r=r.concat(O_(i)),r}s(A_,"validatePatterns");function E_(t){let e=[];const r=Ft(t,n=>Ir(n[Fn]));return e=e.concat(S_(r)),e=e.concat(w_(r)),e=e.concat(I_(r)),e=e.concat(N_(r)),e=e.concat(b_(r)),e}s(E_,"validateRegExpPattern");function __(t){const e=Ft(t,a=>!q(a,Fn)),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Fe.MISSING_PATTERN,tokenTypes:[a]})),n=Bf(t,e);return{errors:r,valid:n}}s(__,"findMissingPatterns");function C_(t){const e=Ft(t,a=>{const i=a[Fn];return!Ir(i)&&!Mr(i)&&!q(i,"exec")&&!ht(i)}),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Fe.INVALID_PATTERN,tokenTypes:[a]})),n=Bf(t,e);return{errors:r,valid:n}}s(C_,"findInvalidPatterns");var bM=/[^\\][$]/;function S_(t){const a=class a extends _f{constructor(){super(...arguments),this.found=!1}visitEndAnchor(o){this.found=!0}};s(a,"EndAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const u=Nu(o),l=new e;return l.visit(u),l.found}catch{return bM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error:
62
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
63
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(S_,"findEndOfInputAnchor");function b_(t){const e=Ft(t,n=>n.PATTERN.test(""));return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Fe.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}s(b_,"findEmptyMatchRegExps");var wM=/[^\\[][\^]|^\^/;function w_(t){const a=class a extends _f{constructor(){super(...arguments),this.found=!1}visitStartAnchor(o){this.found=!0}};s(a,"StartAnchorFinder");let e=a;const r=Ft(t,i=>{const o=i.PATTERN;try{const u=Nu(o),l=new e;return l.visit(u),l.found}catch{return wM.test(o.source)}});return z(r,i=>({message:`Unexpected RegExp Anchor Error:
64
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
65
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Fe.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}s(w_,"findStartOfInputAnchor");function I_(t){const e=Ft(t,n=>{const a=n[Fn];return a instanceof RegExp&&(a.multiline||a.global)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Fe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}s(I_,"findUnsupportedFlags");function N_(t){const e=[];let r=z(t,i=>Et(t,(o,u)=>(i.PATTERN.source===u.PATTERN.source&&!ft(e,u)&&u.PATTERN!==st.NA&&(e.push(u),o.push(u)),o),[]));r=Iu(r);const n=Ft(r,i=>i.length>1);return z(n,i=>{const o=z(i,l=>l.name);return{message:`The same RegExp pattern ->${Ht(i).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Fe.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}s(N_,"findDuplicatePatterns");function k_(t){const e=Ft(t,n=>{if(!q(n,"GROUP"))return!1;const a=n.GROUP;return a!==st.SKIPPED&&a!==st.NA&&!ht(a)});return z(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}s(k_,"findInvalidGroupType");function P_(t,e){const r=Ft(t,a=>a.PUSH_MODE!==void 0&&!ft(e,a.PUSH_MODE));return z(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Fe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}s(P_,"findModesThatDoNotExist");function O_(t){const e=[],r=Et(t,(n,a,i)=>{const o=a.PATTERN;return o===st.NA||(ht(o)?n.push({str:o,idx:i,tokenType:a}):Ir(o)&&D_(o)&&n.push({str:o.source,idx:i,tokenType:a})),n},[]);return V(t,(n,a)=>{V(r,({str:i,idx:o,tokenType:u})=>{if(a<o&&L_(i,n.PATTERN)){const l=`Token: ->${u.name}<- can never be matched.
66
+ Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
67
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:Fe.UNREACHABLE_PATTERN,tokenTypes:[n,u]})}})}),e}s(O_,"findUnreachablePatterns");function L_(t,e){if(Ir(e)){if(M_(e))return!1;const r=e.exec(t);return r!==null&&r.index===0}else{if(Mr(e))return e(t,0,[],{});if(q(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}s(L_,"tryToMatchStrToPattern");function D_(t){return Xa([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}s(D_,"noMetaChar");function M_(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}s(M_,"usesLookAheadOrBehind");function eh(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}s(eh,"addStartOfInput");function th(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}s(th,"addStickyFlag");function x_(t,e,r){const n=[];return q(t,Vi)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Vi+`> property in its definition
68
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),q(t,Gu)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Gu+`> property in its definition
69
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),q(t,Gu)&&q(t,Vi)&&!q(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Vi}: <${t.defaultMode}>which does not exist
70
+ `,type:Fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),q(t,Gu)&&V(t.modes,(a,i)=>{V(a,(o,u)=>{if(Nr(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${u}>
71
+ `,type:Fe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(q(o,"LONGER_ALT")){const l=ae(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];V(l,c=>{!Nr(c)&&!ft(a,c)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${c.name}> on token <${o.name}> outside of mode <${i}>
72
+ `,type:Fe.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}s(x_,"performRuntimeChecks");function F_(t,e,r){const n=[];let a=!1;const i=Iu(qt(We(t.modes))),o=Kf(i,l=>l[Fn]===st.NA),u=hg(r);return e&&V(o,l=>{const c=pg(l,u);if(c!==!1){const d={message:U_(l,c),type:c.issue,tokenType:l};n.push(d)}else q(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(a=!0):Wf(u,l.PATTERN)&&(a=!0)}),e&&!a&&n.push({message:`Warning: No LINE_BREAKS Found.
73
+ This Lexer has been defined to track line and column information,
74
+ But none of the Token Types can be identified as matching a line terminator.
75
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
76
+ for details.`,type:Fe.NO_LINE_BREAKS_FLAGS}),n}s(F_,"performWarningRuntimeChecks");function G_(t){const e={},r=$t(t);return V(r,n=>{const a=t[n];if(ae(a))e[n]=[];else throw Error("non exhaustive match")}),e}s(G_,"cloneEmptyGroups");function dg(t){const e=t.PATTERN;if(Ir(e))return!1;if(Mr(e))return!0;if(q(e,"exec"))return!0;if(ht(e))return!1;throw Error("non exhaustive match")}s(dg,"isCustomPattern");function j_(t){return ht(t)&&t.length===1?t.charCodeAt(0):!1}s(j_,"isShortPattern");var IM={test:s(function(t){const e=t.length;for(let r=this.lastIndex;r<e;r++){const n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function pg(t,e){if(q(t,"LINE_BREAKS"))return!1;if(Ir(t.PATTERN)){try{Wf(e,t.PATTERN)}catch(r){return{issue:Fe.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(ht(t.PATTERN))return!1;if(dg(t))return{issue:Fe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}s(pg,"checkLineBreaksIssues");function U_(t,e){if(e.issue===Fe.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
77
+ The problem is in the <${t.name}> Token Type
78
+ Root cause: ${e.errMsg}.
79
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Fe.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
80
+ The problem is in the <${t.name}> Token Type
81
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}s(U_,"buildLineBreakIssueMessage");function hg(t){return z(t,r=>ht(r)?r.charCodeAt(0):r)}s(hg,"getCharCodes");function fc(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}s(fc,"addToMapOfArrays");var Hi=256,dc=[];function kr(t){return t<Hi?t:dc[t]}s(kr,"charCodeToOptimizedIndex");function z_(){if(Ae(dc)){dc=new Array(65536);for(let t=0;t<65536;t++)dc[t]=t>255?255+~~(t/255):t}}s(z_,"initCharCodeToOptimizedIndexMap");function oi(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}s(oi,"tokenStructuredMatcher");function $s(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}s($s,"tokenStructuredMatcherNoCategories");var ov=1,B_={};function li(t){const e=K_(t);q_(e),V_(e),W_(e),V(e,r=>{r.isParent=r.categoryMatches.length>0})}s(li,"augmentTokenTypes");function K_(t){let e=et(t),r=t,n=!0;for(;n;){r=Iu(qt(z(r,i=>i.CATEGORIES)));const a=Bf(r,e);e=e.concat(a),Ae(a)?n=!1:r=a}return e}s(K_,"expandCategories");function q_(t){V(t,e=>{gg(e)||(B_[ov]=e,e.tokenTypeIdx=ov++),rh(e)&&!ae(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),rh(e)||(e.CATEGORIES=[]),H_(e)||(e.categoryMatches=[]),Y_(e)||(e.categoryMatchesMap={})})}s(q_,"assignTokenDefaultProps");function W_(t){V(t,e=>{e.categoryMatches=[],V(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(B_[n].tokenTypeIdx)})})}s(W_,"assignCategoriesTokensProp");function V_(t){V(t,e=>{mg([],e)})}s(V_,"assignCategoriesMapProp");function mg(t,e){V(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),V(e.CATEGORIES,r=>{const n=t.concat(e);ft(n,r)||mg(n,r)})}s(mg,"singleAssignCategoriesToksMap");function gg(t){return q(t,"tokenTypeIdx")}s(gg,"hasShortKeyProperty");function rh(t){return q(t,"CATEGORIES")}s(rh,"hasCategoriesProperty");function H_(t){return q(t,"categoryMatches")}s(H_,"hasExtendingTokensTypesProperty");function Y_(t){return q(t,"categoryMatchesMap")}s(Y_,"hasExtendingTokensTypesMapProperty");function X_(t){return q(t,"tokenTypeIdx")}s(X_,"isTokenType");var nh={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,a,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}},Fe;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Fe||(Fe={}));var Yi={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
82
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:nh,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Yi);var Js,st=(Js=class{constructor(e,r=Yi){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(a,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${o}--> <${a}>`);const{time:u,value:l}=cg(i),c=u>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&c(`${o}<-- <${a}> time: ${u}ms`),this.traceInitIndent--,l}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
83
+ a boolean 2nd argument is no longer supported`);this.config=At({},Yi,r);const n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let a,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Yi.lineTerminatorsPattern)this.config.lineTerminatorsPattern=IM;else if(this.config.lineTerminatorCharacters===Yi.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
84
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ae(e)?a={modes:{defaultMode:et(e)},defaultMode:Vi}:(i=!1,a=et(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(x_(a,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(F_(a,this.trackStartLines,this.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},V(a.modes,(u,l)=>{a.modes[l]=Kf(u,c=>Nr(c))});const o=$t(a.modes);if(V(a.modes,(u,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(A_(u,o))}),Ae(this.lexerDefinitionErrors)){li(u);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=$_(u,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=c.charCodeToPatternIdxToConfig,this.emptyGroups=At({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=c.canBeOptimized}})}),this.defaultMode=a.defaultMode,!Ae(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=z(this.lexerDefinitionErrors,c=>c.message).join(`-----------------------
85
+ `);throw new Error(`Errors detected in definition of Lexer:
86
+ `+l)}V(this.lexerDefinitionWarning,u=>{ug(u.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(R_?(this.chopInput=Ha,this.match=this.matchWithTest):(this.updateLastIndex=qe,this.match=this.matchWithExec),i&&(this.handleModes=qe),this.trackStartLines===!1&&(this.computeNewColumn=Ha),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=qe),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const u=Et(this.canModeBeOptimized,(l,c,f)=>(c===!1&&l.push(f),l),[]);if(r.ensureOptimizations&&!Ae(u))throw Error(`Lexer Modes: < ${u.join(", ")} > cannot be optimized.
87
+ Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
88
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{g_()}),this.TRACE_INIT("toFastProperties",()=>{fg(this)})})}tokenize(e,r=this.defaultMode){if(!Ae(this.lexerDefinitionErrors)){const a=z(this.lexerDefinitionErrors,i=>i.message).join(`-----------------------
89
+ `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
90
+ `+a)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,a,i,o,u,l,c,f,d,p,m,g,v,E,T;const b=e,C=b.length;let k=0,B=0;const te=this.hasCustom?0:Math.floor(e.length/10),X=new Array(te),de=[];let Ee=this.trackStartLines?1:void 0,Ie=this.trackStartLines?1:void 0;const oe=G_(this.emptyGroups),tt=this.trackStartLines,P=this.config.lineTerminatorsPattern;let S=0,R=[],I=[];const $=[],A=[];Object.freeze(A);let w;function O(){return R}s(O,"getPossiblePatternsSlow");function M(U){const Q=kr(U),pe=I[Q];return pe===void 0?A:pe}s(M,"getPossiblePatternsOptimized");const L=s(U=>{if($.length===1&&U.tokenType.PUSH_MODE===void 0){const Q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(U);de.push({offset:U.startOffset,line:U.startLine,column:U.startColumn,length:U.image.length,message:Q})}else{$.pop();const Q=xn($);R=this.patternIdxToConfig[Q],I=this.charCodeToPatternIdxToConfig[Q],S=R.length;const pe=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;I&&pe?w=M:w=O}},"pop_mode");function j(U){$.push(U),I=this.charCodeToPatternIdxToConfig[U],R=this.patternIdxToConfig[U],S=R.length,S=R.length;const Q=this.canModeBeOptimized[U]&&this.config.safeMode===!1;I&&Q?w=M:w=O}s(j,"push_mode"),j.call(this,r);let F;const re=this.config.recoveryEnabled;for(;k<C;){l=null;const U=b.charCodeAt(k),Q=w(U),pe=Q.length;for(n=0;n<pe;n++){F=Q[n];const he=F.pattern;c=null;const me=F.short;if(me!==!1?U===me&&(l=he):F.isCustom===!0?(T=he.exec(b,k,X,oe),T!==null?(l=T[0],T.payload!==void 0&&(c=T.payload)):l=null):(this.updateLastIndex(he,k),l=this.match(he,e,k)),l!==null){if(u=F.longerAlt,u!==void 0){const _e=u.length;for(i=0;i<_e;i++){const Pe=R[u[i]],ge=Pe.pattern;if(f=null,Pe.isCustom===!0?(T=ge.exec(b,k,X,oe),T!==null?(o=T[0],T.payload!==void 0&&(f=T.payload)):o=null):(this.updateLastIndex(ge,k),o=this.match(ge,e,k)),o&&o.length>l.length){l=o,c=f,F=Pe;break}}}break}}if(l!==null){if(d=l.length,p=F.group,p!==void 0&&(m=F.tokenTypeIdx,g=this.createTokenInstance(l,k,m,F.tokenType,Ee,Ie,d),this.handlePayload(g,c),p===!1?B=this.addToken(X,B,g):oe[p].push(g)),e=this.chopInput(e,d),k=k+d,Ie=this.computeNewColumn(Ie,d),tt===!0&&F.canLineTerminator===!0){let he=0,me,_e;P.lastIndex=0;do me=P.test(l),me===!0&&(_e=P.lastIndex-1,he++);while(me===!0);he!==0&&(Ee=Ee+he,Ie=d-_e,this.updateTokenEndLineColumnLocation(g,p,_e,he,Ee,Ie,d))}this.handleModes(F,L,j,g)}else{const he=k,me=Ee,_e=Ie;let Pe=re===!1;for(;Pe===!1&&k<C;)for(e=this.chopInput(e,1),k++,a=0;a<S;a++){const ge=R[a],J=ge.pattern,Be=ge.short;if(Be!==!1?b.charCodeAt(k)===Be&&(Pe=!0):ge.isCustom===!0?Pe=J.exec(b,k,X,oe)!==null:(this.updateLastIndex(J,k),Pe=J.exec(e)!==null),Pe===!0)break}if(v=k-he,Ie=this.computeNewColumn(Ie,v),E=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(b,he,v,me,_e,xn($)),de.push({offset:he,line:me,column:_e,length:v,message:E}),re===!1)break}}return this.hasCustom||(X.length=B),{tokens:X,groups:oe,errors:de}}handleModes(e,r,n,a){if(e.pop===!0){const i=e.push;r(a),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}chopInput(e,r){return e.substring(r)}updateLastIndex(e,r){e.lastIndex=r}updateTokenEndLineColumnLocation(e,r,n,a,i,o,u){let l,c;r!==void 0&&(l=n===u-1,c=l?-1:0,a===1&&l===!0||(e.endLine=i+c,e.endColumn=o-1+-c))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,a){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:a}}createStartOnlyToken(e,r,n,a,i,o){return{image:e,startOffset:r,startLine:i,startColumn:o,tokenTypeIdx:n,tokenType:a}}createFullToken(e,r,n,a,i,o,u){return{image:e,startOffset:r,endOffset:r+u-1,startLine:i,endLine:i,startColumn:o,endColumn:o+u-1,tokenTypeIdx:n,tokenType:a}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}matchWithTest(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchWithExec(e,r){const n=e.exec(r);return n!==null?n[0]:null}},s(Js,"Lexer"),Js);st.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";st.NA=/NOT_APPLICABLE/;function On(t){return yg(t)?t.LABEL:t.name}s(On,"tokenLabel");function yg(t){return ht(t.LABEL)&&t.LABEL!==""}s(yg,"hasTokenLabel");var NM="parent",lv="categories",uv="label",cv="group",fv="push_mode",dv="pop_mode",pv="longer_alt",hv="line_breaks",mv="start_chars_hint";function Ga(t){return J_(t)}s(Ga,"createToken");function J_(t){const e=t.pattern,r={};if(r.name=t.name,Nr(e)||(r.PATTERN=e),q(t,NM))throw`The parent property is no longer supported.
91
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return q(t,lv)&&(r.CATEGORIES=t[lv]),li([r]),q(t,uv)&&(r.LABEL=t[uv]),q(t,cv)&&(r.GROUP=t[cv]),q(t,dv)&&(r.POP_MODE=t[dv]),q(t,fv)&&(r.PUSH_MODE=t[fv]),q(t,pv)&&(r.LONGER_ALT=t[pv]),q(t,hv)&&(r.LINE_BREAKS=t[hv]),q(t,mv)&&(r.START_CHARS_HINT=t[mv]),r}s(J_,"createTokenInternal");var Yr=Ga({name:"EOF",pattern:st.NA});li([Yr]);function ku(t,e,r,n,a,i,o,u){return{image:e,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:o,endColumn:u,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}s(ku,"createTokenInstance");function vg(t,e){return oi(t,e)}s(vg,"tokenMatcher");var Ma={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${yg(t)?`--> ${On(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",u=`
92
+ but found: '`+Ht(e).image+"'";if(n)return i+n+u;{const l=Et(t,(p,m)=>p.concat(m),[]),c=z(l,p=>`[${z(p,m=>On(m)).join(", ")}]`),d=`one of these possible Token sequences:
93
+ ${z(c,(p,m)=>` ${m+1}. ${p}`).join(`
94
+ `)}`;return i+d+u}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const a="Expecting: ",o=`
95
+ but found: '`+Ht(e).image+"'";if(r)return a+r+o;{const l=`expecting at least one iteration which starts with one of these possible Token sequences::
96
+ <${z(t,c=>`[${z(c,f=>On(f)).join(",")}]`).join(" ,")}>`;return a+l+o}}};Object.freeze(Ma);var kM={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
97
+ inside top level rule: ->`+t.name+"<-"}},Nn={buildDuplicateFoundError(t,e){function r(f){return f instanceof we?f.terminalType.name:f instanceof lt?f.nonTerminalName:""}s(r,"getExtraProductionArgument");const n=t.name,a=Ht(e),i=a.idx,o=Ut(a),u=r(a),l=i>0;let c=`->${o}${l?i:""}<- ${u?`with argument: ->${u}<-`:""}
98
+ appears more than once (${e.length} times) in the top level rule: ->${n}<-.
99
+ For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
100
+ `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,`
101
+ `),c},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
102
+ The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
103
+ To resolve this make sure each Terminal and Non-Terminal names are unique
104
+ This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
105
+ and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=z(t.prefixPath,a=>On(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
106
+ in <OR${r}> inside <${t.topLevelRule.name}> Rule,
107
+ <${e}> may appears as a prefix path in all these alternatives.
108
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
109
+ For Further details.`},buildAlternationAmbiguityError(t){const e=z(t.prefixPath,a=>On(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
110
+ <${e}> may appears as a prefix path in all these alternatives.
111
+ `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
112
+ For Further details.`,n},buildEmptyRepetitionError(t){let e=Ut(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
113
+ This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
114
+ Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
115
+ <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
116
+ has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,r=z(t.leftRecursionPath,i=>i.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
117
+ rule: <${e}> can be invoked from itself (directly or indirectly)
118
+ without consuming any Tokens. The grammar path that causes this is:
119
+ ${n}
120
+ To fix this refactor your grammar to remove the left recursion.
121
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof ai?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function Z_(t,e){const r=new PM(t,e);return r.resolveRefs(),r.errors}s(Z_,"resolveGrammar");var Zs,PM=(Zs=class extends ii{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){V(We(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{const n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:ut.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},s(Zs,"GastRefResolverVisitor"),Zs),Qs,OM=(Qs=class extends qf{constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=et(this.path.ruleStack).reverse(),this.occurrenceStack=et(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const a=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,a)}}updateExpectedNext(){Ae(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},s(Qs,"AbstractNextPossibleTokensWalker"),Qs),eo,LM=(eo=class extends OM{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const a=r.concat(n),i=new mt({definition:a});this.possibleTokTypes=si(i),this.found=!0}}},s(eo,"NextAfterTokenWalker"),eo),to,Vf=(to=class extends qf{constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},s(to,"AbstractNextTerminalAfterProductionWalker"),to),ro,DM=(ro=class extends Vf{walkMany(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkMany(e,r,n)}},s(ro,"NextTerminalAfterManyWalker"),ro),no,gv=(no=class extends Vf{walkManySep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkManySep(e,r,n)}},s(no,"NextTerminalAfterManySepWalker"),no),ao,MM=(ao=class extends Vf{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOne(e,r,n)}},s(ao,"NextTerminalAfterAtLeastOneWalker"),ao),io,yv=(io=class extends Vf{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){const a=Ht(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof we&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOneSep(e,r,n)}},s(io,"NextTerminalAfterAtLeastOneSepWalker"),io);function Xc(t,e,r=[]){r=et(r);let n=[],a=0;function i(u){return u.concat(Ze(t,a+1))}s(i,"remainingPathWith");function o(u){const l=Xc(i(u),e,r);return n.concat(l)}for(s(o,"getAlternativesForProd");r.length<e&&a<t.length;){const u=t[a];if(u instanceof mt)return o(u.definition);if(u instanceof lt)return o(u.definition);if(u instanceof Qe)n=o(u.definition);else if(u instanceof _t){const l=u.definition.concat([new xe({definition:u.definition})]);return o(l)}else if(u instanceof Ct){const l=[new mt({definition:u.definition}),new xe({definition:[new we({terminalType:u.separator})].concat(u.definition)})];return o(l)}else if(u instanceof gt){const l=u.definition.concat([new xe({definition:[new we({terminalType:u.separator})].concat(u.definition)})]);n=o(l)}else if(u instanceof xe){const l=u.definition.concat([new xe({definition:u.definition})]);n=o(l)}else{if(u instanceof yt)return V(u.definition,l=>{Ae(l.definition)===!1&&(n=o(l.definition))}),n;if(u instanceof we)r.push(u.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:Ze(t,a)}),n}s(Xc,"possiblePathsFrom");function Tg(t,e,r,n){const a="EXIT_NONE_TERMINAL",i=[a],o="EXIT_ALTERNATIVE";let u=!1;const l=e.length,c=l-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Ae(d);){const p=d.pop();if(p===o){u&&xn(d).idx<=c&&d.pop();continue}const m=p.def,g=p.idx,v=p.ruleStack,E=p.occurrenceStack;if(Ae(m))continue;const T=m[0];if(T===a){const b={idx:g,def:Ze(m),ruleStack:Ts(v),occurrenceStack:Ts(E)};d.push(b)}else if(T instanceof we)if(g<l-1){const b=g+1,C=e[b];if(r(C,T.terminalType)){const k={idx:b,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(k)}}else if(g===l-1)f.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:v,occurrenceStack:E}),u=!0;else throw Error("non exhaustive match");else if(T instanceof lt){const b=et(v);b.push(T.nonTerminalName);const C=et(E);C.push(T.idx);const k={idx:g,def:T.definition.concat(i,Ze(m)),ruleStack:b,occurrenceStack:C};d.push(k)}else if(T instanceof Qe){const b={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(b),d.push(o);const C={idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(C)}else if(T instanceof _t){const b=new xe({definition:T.definition,idx:T.idx}),C=T.definition.concat([b],Ze(m)),k={idx:g,def:C,ruleStack:v,occurrenceStack:E};d.push(k)}else if(T instanceof Ct){const b=new we({terminalType:T.separator}),C=new xe({definition:[b].concat(T.definition),idx:T.idx}),k=T.definition.concat([C],Ze(m)),B={idx:g,def:k,ruleStack:v,occurrenceStack:E};d.push(B)}else if(T instanceof gt){const b={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(b),d.push(o);const C=new we({terminalType:T.separator}),k=new xe({definition:[C].concat(T.definition),idx:T.idx}),B=T.definition.concat([k],Ze(m)),te={idx:g,def:B,ruleStack:v,occurrenceStack:E};d.push(te)}else if(T instanceof xe){const b={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(b),d.push(o);const C=new xe({definition:T.definition,idx:T.idx}),k=T.definition.concat([C],Ze(m)),B={idx:g,def:k,ruleStack:v,occurrenceStack:E};d.push(B)}else if(T instanceof yt)for(let b=T.definition.length-1;b>=0;b--){const C=T.definition[b],k={idx:g,def:C.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(k),d.push(o)}else if(T instanceof mt)d.push({idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E});else if(T instanceof ai)d.push(Q_(T,g,v,E));else throw Error("non exhaustive match")}return f}s(Tg,"nextPossibleTokensAfter");function Q_(t,e,r,n){const a=et(r);a.push(t.name);const i=et(n);return i.push(1),{idx:e,def:t.definition,ruleStack:a,occurrenceStack:i}}s(Q_,"expandTopLevelRule");var De;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(De||(De={}));function Hf(t){if(t instanceof Qe||t==="Option")return De.OPTION;if(t instanceof xe||t==="Repetition")return De.REPETITION;if(t instanceof _t||t==="RepetitionMandatory")return De.REPETITION_MANDATORY;if(t instanceof Ct||t==="RepetitionMandatoryWithSeparator")return De.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof gt||t==="RepetitionWithSeparator")return De.REPETITION_WITH_SEPARATOR;if(t instanceof yt||t==="Alternation")return De.ALTERNATION;throw Error("non exhaustive match")}s(Hf,"getProdType");function ah(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=Hf(n);return i===De.ALTERNATION?Pu(e,r,a):Ou(e,r,i,a)}s(ah,"getLookaheadPaths");function eC(t,e,r,n,a,i){const o=Pu(t,e,r),u=$g(o)?$s:oi;return i(o,n,u,a)}s(eC,"buildLookaheadFuncForOr");function tC(t,e,r,n,a,i){const o=Ou(t,e,a,r),u=$g(o)?$s:oi;return i(o[0],u,n)}s(tC,"buildLookaheadFuncForOptionalProd");function rC(t,e,r,n){const a=t.length,i=Wt(t,o=>Wt(o,u=>u.length===1));if(e)return function(o){const u=z(o,l=>l.GATE);for(let l=0;l<a;l++){const c=t[l],f=c.length,d=u[l];if(!(d!==void 0&&d.call(this)===!1))e:for(let p=0;p<f;p++){const m=c[p],g=m.length;for(let v=0;v<g;v++){const E=this.LA(v+1);if(r(E,m[v])===!1)continue e}return l}}};if(i&&!n){const o=z(t,l=>qt(l)),u=Et(o,(l,c,f)=>(V(c,d=>{q(l,d.tokenTypeIdx)||(l[d.tokenTypeIdx]=f),V(d.categoryMatches,p=>{q(l,p)||(l[p]=f)})}),l),{});return function(){const l=this.LA(1);return u[l.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){const u=t[o],l=u.length;e:for(let c=0;c<l;c++){const f=u[c],d=f.length;for(let p=0;p<d;p++){const m=this.LA(p+1);if(r(m,f[p])===!1)continue e}return o}}}}s(rC,"buildAlternativesLookAheadFunc");function nC(t,e,r){const n=Wt(t,i=>i.length===1),a=t.length;if(n&&!r){const i=qt(t);if(i.length===1&&Ae(i[0].categoryMatches)){const u=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===u}}else{const o=Et(i,(u,l,c)=>(u[l.tokenTypeIdx]=!0,V(l.categoryMatches,f=>{u[f]=!0}),u),[]);return function(){const u=this.LA(1);return o[u.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<a;i++){const o=t[i],u=o.length;for(let l=0;l<u;l++){const c=this.LA(l+1);if(e(c,o[l])===!1)continue e}return!0}return!1}}s(nC,"buildSingleAlternativeLookaheadFunction");var so,xM=(so=class extends qf{constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,a){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(a),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,De.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,De.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,De.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,De.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},s(so,"RestDefinitionFinderWalker"),so),oo,aC=(oo=class extends ii{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,De.OPTION)}visitRepetition(e){this.checkIsTarget(e,De.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,De.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,De.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,De.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,De.ALTERNATION)}},s(oo,"InsideDefinitionFinderVisitor"),oo);function ih(t){const e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}s(ih,"initializeArrayOfArrays");function pc(t){let e=[""];for(let r=0;r<t.length;r++){const n=t[r],a=[];for(let i=0;i<e.length;i++){const o=e[i];a.push(o+"_"+n.tokenTypeIdx);for(let u=0;u<n.categoryMatches.length;u++){const l="_"+n.categoryMatches[u];a.push(o+l)}}e=a}return e}s(pc,"pathToHashKeys");function iC(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;const a=t[n];for(let i=0;i<e.length;i++){const o=e[i];if(a[o]===!0)return!1}}return!0}s(iC,"isUniquePrefixHash");function Rg(t,e){const r=z(t,o=>Xc([o],1)),n=ih(r.length),a=z(r,o=>{const u={};return V(o,l=>{const c=pc(l.partialPath);V(c,f=>{u[f]=!0})}),u});let i=r;for(let o=1;o<=e;o++){const u=i;i=ih(u.length);for(let l=0;l<u.length;l++){const c=u[l];for(let f=0;f<c.length;f++){const d=c[f].partialPath,p=c[f].suffixDef,m=pc(d);if(iC(a,m,l)||Ae(p)||d.length===e){const v=n[l];if(Jc(v,d)===!1){v.push(d);for(let E=0;E<m.length;E++){const T=m[E];a[l][T]=!0}}}else{const v=Xc(p,o+1,d);i[l]=i[l].concat(v),V(v,E=>{const T=pc(E.partialPath);V(T,b=>{a[l][b]=!0})})}}}}return n}s(Rg,"lookAheadSequenceFromAlternatives");function Pu(t,e,r,n){const a=new aC(t,De.ALTERNATION,n);return e.accept(a),Rg(a.result,r)}s(Pu,"getLookaheadPathsForOr");function Ou(t,e,r,n){const a=new aC(t,r);e.accept(a);const i=a.result,u=new xM(e,t,r).startWalking(),l=new mt({definition:i}),c=new mt({definition:u});return Rg([l,c],n)}s(Ou,"getLookaheadPathsForOptionalProd");function Jc(t,e){e:for(let r=0;r<t.length;r++){const n=t[r];if(n.length===e.length){for(let a=0;a<n.length;a++){const i=e[a],o=n[a];if((i===o||o.categoryMatchesMap[i.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}s(Jc,"containsPath");function sC(t,e){return t.length<e.length&&Wt(t,(r,n)=>{const a=e[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}s(sC,"isStrictPrefixOfPath");function $g(t){return Wt(t,e=>Wt(e,r=>Wt(r,n=>Ae(n.categoryMatches))))}s($g,"areTokenCategoriesNotUsed");function oC(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return z(e,r=>Object.assign({type:ut.CUSTOM_LOOKAHEAD_VALIDATION},r))}s(oC,"validateLookahead");function lC(t,e,r,n){const a=Lt(t,l=>uC(l,r)),i=TC(t,e,r),o=Lt(t,l=>mC(l,r)),u=Lt(t,l=>fC(l,t,n,r));return a.concat(i,o,u)}s(lC,"validateGrammar");function uC(t,e){const r=new FM;t.accept(r);const n=r.allProductions,a=ZD(n,cC),i=Yt(a,u=>u.length>1);return z(We(i),u=>{const l=Ht(u),c=e.buildDuplicateFoundError(t,u),f=Ut(l),d={message:c,type:ut.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:l.idx},p=Ag(l);return p&&(d.parameter=p),d})}s(uC,"validateDuplicateProductions");function cC(t){return`${Ut(t)}_#_${t.idx}_#_${Ag(t)}`}s(cC,"identifyProductionForDuplicates");function Ag(t){return t instanceof we?t.terminalType.name:t instanceof lt?t.nonTerminalName:""}s(Ag,"getExtraProductionArgument");var lo,FM=(lo=class extends ii{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},s(lo,"OccurrenceValidationCollector"),lo);function fC(t,e,r,n){const a=[];if(Et(e,(o,u)=>u.name===t.name?o+1:o,0)>1){const o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:o,type:ut.DUPLICATE_RULE_NAME,ruleName:t.name})}return a}s(fC,"validateRuleDoesNotAlreadyExist");function dC(t,e,r){const n=[];let a;return ft(e,t)||(a=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:ut.INVALID_RULE_OVERRIDE,ruleName:t})),n}s(dC,"validateRuleIsOverridden");function Eg(t,e,r,n=[]){const a=[],i=us(e.definition);if(Ae(i))return[];{const o=t.name;ft(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:ut.LEFT_RECURSION,ruleName:o});const l=Bf(i,n.concat([t])),c=Lt(l,f=>{const d=et(n);return d.push(f),Eg(t,f,r,d)});return a.concat(c)}}s(Eg,"validateNoLeftRecursion");function us(t){let e=[];if(Ae(t))return e;const r=Ht(t);if(r instanceof lt)e.push(r.referencedRule);else if(r instanceof mt||r instanceof Qe||r instanceof _t||r instanceof Ct||r instanceof gt||r instanceof xe)e=e.concat(us(r.definition));else if(r instanceof yt)e=qt(z(r.definition,i=>us(i.definition)));else if(!(r instanceof we))throw Error("non exhaustive match");const n=Rs(r),a=t.length>1;if(n&&a){const i=Ze(t);return e.concat(us(i))}else return e}s(us,"getFirstNoneTerminal");var uo,_g=(uo=class extends ii{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},s(uo,"OrCollector"),uo);function pC(t,e){const r=new _g;t.accept(r);const n=r.alternations;return Lt(n,i=>{const o=Ts(i.definition);return Lt(o,(u,l)=>{const c=Tg([u],[],oi,1);return Ae(c)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:l}),type:ut.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:l+1}]:[]})})}s(pC,"validateEmptyOrAlternative");function hC(t,e,r){const n=new _g;t.accept(n);let a=n.alternations;return a=Kf(a,o=>o.ignoreAmbiguities===!0),Lt(a,o=>{const u=o.idx,l=o.maxLookahead||e,c=Pu(u,t,l,o),f=yC(c,o,t,r),d=vC(c,o,t,r);return f.concat(d)})}s(hC,"validateAmbiguousAlternationAlternatives");var co,GM=(co=class extends ii{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},s(co,"RepetitionCollector"),co);function mC(t,e){const r=new _g;t.accept(r);const n=r.alternations;return Lt(n,i=>i.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:ut.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}]:[])}s(mC,"validateTooManyAlts");function gC(t,e,r){const n=[];return V(t,a=>{const i=new GM;a.accept(i);const o=i.allProductions;V(o,u=>{const l=Hf(u),c=u.maxLookahead||e,f=u.idx,p=Ou(f,a,l,c)[0];if(Ae(qt(p))){const m=r.buildEmptyRepetitionError({topLevelRule:a,repetition:u});n.push({message:m,type:ut.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}s(gC,"validateSomeNonEmptyLookaheadPath");function yC(t,e,r,n){const a=[],i=Et(t,(u,l,c)=>(e.definition[c].ignoreAmbiguities===!0||V(l,f=>{const d=[c];V(t,(p,m)=>{c!==m&&Jc(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!Jc(a,f)&&(a.push(f),u.push({alts:d,path:f}))}),u),[]);return z(i,u=>{const l=z(u.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:u.path}),type:ut.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:u.alts}})}s(yC,"checkAlternativesAmbiguities");function vC(t,e,r,n){const a=Et(t,(o,u,l)=>{const c=z(u,f=>({idx:l,path:f}));return o.concat(c)},[]);return Iu(Lt(a,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const l=o.idx,c=o.path,f=Ft(a,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<l&&sC(p.path,c));return z(f,p=>{const m=[p.idx+1,l+1],g=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:m,prefixPath:p.path}),type:ut.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})}))}s(vC,"checkPrefixAlternativesAmbiguities");function TC(t,e,r){const n=[],a=z(e,i=>i.name);return V(t,i=>{const o=i.name;if(ft(a,o)){const u=r.buildNamespaceConflictError(i);n.push({message:u,type:ut.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}s(TC,"checkTerminalAndNoneTerminalsNameSpace");function RC(t){const e=og(t,{errMsgProvider:kM}),r={};return V(t.rules,n=>{r[n.name]=n}),Z_(r,e.errMsgProvider)}s(RC,"resolveGrammar");function $C(t){return t=og(t,{errMsgProvider:Nn}),lC(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}s($C,"validateGrammar");var AC="MismatchedTokenException",EC="NoViableAltException",_C="EarlyExitException",CC="NotAllInputParsedException",SC=[AC,EC,_C,CC];Object.freeze(SC);function As(t){return ft(SC,t.name)}s(As,"isRecognitionException");var fo,Yf=(fo=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},s(fo,"RecognitionException"),fo),po,bC=(po=class extends Yf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=AC}},s(po,"MismatchedTokenException"),po),ho,jM=(ho=class extends Yf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=EC}},s(ho,"NoViableAltException"),ho),mo,UM=(mo=class extends Yf{constructor(e,r){super(e,r),this.name=CC}},s(mo,"NotAllInputParsedException"),mo),go,zM=(go=class extends Yf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=_C}},s(go,"EarlyExitException"),go),Sd={},wC="InRuleRecoveryException",yo,BM=(yo=class extends Error{constructor(e){super(e),this.name=wC}},s(yo,"InRuleRecoveryException"),yo),vo,KM=(vo=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=q(e,"recoveryEnabled")?e.recoveryEnabled:Pr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=IC)}getTokenToInsert(e){const r=ku(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,a){const i=this.findReSyncTokenType(),o=this.exportLexerState(),u=[];let l=!1;const c=this.LA(1);let f=this.LA(1);const d=s(()=>{const p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:c,previous:p,ruleName:this.getCurrRuleFullName()}),g=new bC(m,c,this.LA(0));g.resyncedTokens=Ts(u),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(f,a)){d();return}else if(n.call(this)){d(),e.apply(this,r);return}else this.tokenMatcher(f,i)?l=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,u));this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){const n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new BM("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ae(r))return!1;const n=this.LA(1);return Xa(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return ft(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let r=this.LA(1),n=2;for(;;){const a=Xa(e,i=>vg(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Sd;const e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return z(e,(n,a)=>a===0?Sd:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[a],inRule:this.shortRuleNameToFullName(e[a-1])})}flattenFollowSet(){const e=z(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return qt(e)}getFollowSetFromFollowKey(e){if(e===Sd)return[Yr];const r=e.ruleName+e.idxInCallingRule+p_+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Yr)||r.push(e),r}reSyncTo(e){const r=[];let n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return Ts(r)}attemptInRepetitionRecovery(e,r,n,a,i,o,u){}getCurrentGrammarPath(e,r){const n=this.getHumanReadableRuleStack(),a=et(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:a,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return z(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},s(vo,"Recoverable"),vo);function IC(t,e,r,n,a,i,o){const u=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[u];if(l===void 0){const p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];l=new i(m,a).startWalking(),this.firstAfterRepMap[u]=l}let c=l.token,f=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&c===void 0&&(c=Yr,f=1),!(c===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,f,o)&&this.tryInRepetitionRecovery(t,e,r,c)}s(IC,"attemptInRepetitionRecovery");var qM=4,tn=8,NC=1<<tn,kC=2<<tn,sh=3<<tn,oh=4<<tn,lh=5<<tn,hc=6<<tn;function mc(t,e,r){return r|e|t}s(mc,"getKeyForAutomaticLookahead");var To,Cg=(To=class{constructor(e){var r;this.maxLookahead=(r=e==null?void 0:e.maxLookahead)!==null&&r!==void 0?r:Pr.maxLookahead}validate(e){const r=this.validateNoLeftRecursion(e.rules);if(Ae(r)){const n=this.validateEmptyOrAlternatives(e.rules),a=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...a,...i]}return r}validateNoLeftRecursion(e){return Lt(e,r=>Eg(r,r,Nn))}validateEmptyOrAlternatives(e){return Lt(e,r=>pC(r,Nn))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>hC(n,r,Nn))}validateSomeNonEmptyLookaheadPath(e,r){return gC(e,r,Nn)}buildLookaheadForAlternation(e){return eC(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,rC)}buildLookaheadForOptional(e){return tC(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Hf(e.prodType),nC)}},s(To,"LLkLookaheadStrategy"),To),Ro,WM=(Ro=class{initLooksAhead(e){this.dynamicTokensEnabled=q(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Pr.dynamicTokensEnabled,this.maxLookahead=q(e,"maxLookahead")?e.maxLookahead:Pr.maxLookahead,this.lookaheadStrategy=q(e,"lookaheadStrategy")?e.lookaheadStrategy:new Cg({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){V(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{const{alternation:n,repetition:a,option:i,repetitionMandatory:o,repetitionMandatoryWithSeparator:u,repetitionWithSeparator:l}=PC(r);V(n,c=>{const f=c.idx===0?"":c.idx;this.TRACE_INIT(`${Ut(c)}${f}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:r,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=mc(this.fullRuleNameToShort[r.name],NC,c.idx);this.setLaFuncCache(p,d)})}),V(a,c=>{this.computeLookaheadFunc(r,c.idx,sh,"Repetition",c.maxLookahead,Ut(c))}),V(i,c=>{this.computeLookaheadFunc(r,c.idx,kC,"Option",c.maxLookahead,Ut(c))}),V(o,c=>{this.computeLookaheadFunc(r,c.idx,oh,"RepetitionMandatory",c.maxLookahead,Ut(c))}),V(u,c=>{this.computeLookaheadFunc(r,c.idx,hc,"RepetitionMandatoryWithSeparator",c.maxLookahead,Ut(c))}),V(l,c=>{this.computeLookaheadFunc(r,c.idx,lh,"RepetitionWithSeparator",c.maxLookahead,Ut(c))})})})}computeLookaheadFunc(e,r,n,a,i,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{const u=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),l=mc(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,u)})}getKeyForAutomaticLookahead(e,r){const n=this.getLastExplicitRuleShortName();return mc(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},s(Ro,"LooksAhead"),Ro),$o,VM=($o=class extends ii{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},s($o,"DslMethodsCollectorVisitor"),$o),ju=new VM;function PC(t){ju.reset(),t.accept(ju);const e=ju.dslMethods;return ju.reset(),e}s(PC,"collectMethods");function uh(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}s(uh,"setNodeLocationOnlyOffset");function ch(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}s(ch,"setNodeLocationFull");function OC(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}s(OC,"addTerminalToCst");function LC(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}s(LC,"addNoneTerminalToCst");var HM="name";function Sg(t,e){Object.defineProperty(t,HM,{enumerable:!1,configurable:!0,writable:!1,value:e})}s(Sg,"defineNameProp");function DC(t,e){const r=$t(t),n=r.length;for(let a=0;a<n;a++){const i=r[a],o=t[i],u=o.length;for(let l=0;l<u;l++){const c=o[l];c.tokenTypeIdx===void 0&&this[c.name](c.children,e)}}}s(DC,"defaultVisit");function MC(t,e){const r=s(function(){},"derivedConstructor");Sg(r,t+"BaseSemantics");const n={visit:s(function(a,i){if(ae(a)&&(a=a[0]),!Nr(a))return this[a.name](a.children,i)},"visit"),validateVisitor:s(function(){const a=FC(this,e);if(!Ae(a)){const i=z(a,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
122
+ ${i.join(`
123
+
124
+ `).replace(/\n/g,`
125
+ `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}s(MC,"createBaseSemanticVisitorConstructor");function xC(t,e,r){const n=s(function(){},"derivedConstructor");Sg(n,t+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return V(e,i=>{a[i]=DC}),n.prototype=a,n.prototype.constructor=n,n}s(xC,"createBaseVisitorConstructorWithDefaults");var fh;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(fh||(fh={}));function FC(t,e){return GC(t,e)}s(FC,"validateVisitor");function GC(t,e){const r=Ft(e,a=>Mr(t[a])===!1),n=z(r,a=>({msg:`Missing visitor method: <${a}> on ${t.constructor.name} CST Visitor.`,type:fh.MISSING_METHOD,methodName:a}));return Iu(n)}s(GC,"validateMissingCstMethods");var Ao,YM=(Ao=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=q(e,"nodeLocationTracking")?e.nodeLocationTracking:Pr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=qe,this.cstFinallyStateUpdate=qe,this.cstPostTerminal=qe,this.cstPostNonTerminal=qe,this.cstPostRule=qe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ch,this.setNodeLocationFromNode=ch,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=uh,this.setNodeLocationFromNode=uh,this.cstPostRule=qe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=qe,this.setNodeLocationFromNode=qe,this.cstPostRule=qe,this.setInitialNodeLocation=qe;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];OC(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];LC(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Nr(this.baseCstVisitorConstructor)){const e=MC(this.className,$t(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Nr(this.baseCstVisitorWithDefaultsConstructor)){const e=xC(this.className,$t(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},s(Ao,"TreeBuilder"),Ao),Eo,XM=(Eo=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Zc}LA(e){const r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Zc:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},s(Eo,"LexerAdapter"),Eo),_o,JM=(_o=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=Qc){if(ft(this.definedRulesNames,e)){const o={message:Nn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ut.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);const a=this.defineRule(e,r,n);return this[e]=a,a}OVERRIDE_RULE(e,r,n=Qc){const a=dC(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(a);const i=this.defineRule(e,r,n);return this[e]=i,i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,r),!0}catch(a){if(As(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return o_(We(this.gastProductionsCache))}},s(_o,"RecognizerApi"),_o),Co,ZM=(Co=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$s,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
126
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
127
+ For Further details.`);if(ae(e)){if(Ae(e))throw Error(`A Token Vocabulary cannot be empty.
128
+ Note that the first argument for the parser constructor
129
+ is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
130
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
131
+ For Further details.`)}if(ae(e))this.tokensMap=Et(e,(i,o)=>(i[o.name]=o,i),{});else if(q(e,"modes")&&Wt(qt(We(e.modes)),X_)){const i=qt(We(e.modes)),o=lg(i);this.tokensMap=Et(o,(u,l)=>(u[l.name]=l,u),{})}else if(Mt(e))this.tokensMap=et(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Yr;const n=q(e,"modes")?qt(We(e.modes)):We(e),a=Wt(n,i=>Ae(i.categoryMatches));this.tokenMatcher=a?$s:oi,li(We(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
132
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const a=q(n,"resyncEnabled")?n.resyncEnabled:Qc.resyncEnabled,i=q(n,"recoveryValueFunc")?n.recoveryValueFunc:Qc.recoveryValueFunc,o=this.ruleShortNameIdx<<qM+tn;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let u;return this.outputCst===!0?u=s(function(...f){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f);const d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):u=s(function(...f){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),r.apply(this,f)}catch(d){return this.invokeRuleCatch(d,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(u,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){const a=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(As(e)){const o=e;if(i){const u=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(u))if(o.resyncedTokens=this.reSyncTo(u),this.outputCst){const l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return n(e);else{if(this.outputCst){const l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,o.partialCstResult=l}throw o}}else{if(a)return this.moveToTerminatedState(),n(e);throw o}}else throw e}optionInternal(e,r){const n=this.getKeyForAutomaticLookahead(kC,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof e!="function"){i=e.DEF;const o=e.GATE;if(o!==void 0){const u=a;a=s(()=>o.call(this)&&u.call(this),"lookAheadFunc")}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){const n=this.getKeyForAutomaticLookahead(oh,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const o=r.GATE;if(o!==void 0){const u=a;a=s(()=>o.call(this)&&u.call(this),"lookAheadFunc")}}else i=r;if(a.call(this)===!0){let o=this.doSingleRepetition(i);for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],a,oh,e,MM)}atLeastOneSepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(hc,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const u=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,u,a,yv],u,hc,e,yv)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){const n=this.getKeyForAutomaticLookahead(sh,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const u=r.GATE;if(u!==void 0){const l=a;a=s(()=>u.call(this)&&l.call(this),"lookaheadFunction")}}else i=r;let o=!0;for(;a.call(this)===!0&&o===!0;)o=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],a,sh,e,DM,o)}manySepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(lh,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const u=s(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,u,a,gv],u,lh,e,gv)}}repetitionSepSecondInternal(e,r,n,a,i){for(;n();)this.CONSUME(r),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,a,i],n,hc,e,i)}doSingleRepetition(e){const r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){const n=this.getKeyForAutomaticLookahead(NC,r),a=ae(e)?e:e.DEF,o=this.getLaFuncFromCache(n).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new UM(r,e))}}subruleInternal(e,r,n){let a;try{const i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,a=e.apply(this,i),this.cstPostNonTerminal(a,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),a}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,r,n){throw As(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let a;try{const i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),a=i):this.consumeInternalError(e,i,n)}catch(i){a=this.consumeInternalRecovery(e,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,a),a}consumeInternalError(e,r,n){let a;const i=this.LA(0);throw n!==void 0&&n.ERR_MSG?a=n.ERR_MSG:a=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new bC(a,r,i))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const a=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,a)}catch(i){throw i.name===wC?n:i}}else throw n}saveRecogState(){const e=this.errors,r=et(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Yr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},s(Co,"RecognizerEngine"),Co),So,QM=(So=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:Pr.errorMessageProvider}SAVE_ERROR(e){if(As(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:et(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return et(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){const a=this.getCurrRuleFullName(),i=this.getGAstProductions()[a],u=Ou(e,i,r,this.maxLookahead)[0],l=[];for(let f=1;f<=this.maxLookahead;f++)l.push(this.LA(f));const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:u,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new zM(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=Pu(e,a,this.maxLookahead),o=[];for(let c=1;c<=this.maxLookahead;c++)o.push(this.LA(c));const u=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:o,previous:u,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new jM(l,this.LA(1),u))}},s(So,"ErrorHandler"),So),bo,ex=(bo=class{initContentAssist(){}computeContentAssist(e,r){const n=this.gastProductionsCache[e];if(Nr(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Tg([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const r=Ht(e.ruleStack),a=this.getGAstProductions()[r];return new LM(a,e).startWalking()}},s(bo,"ContentAssist"),bo),Xf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Xf);var vv=!0,Tv=Math.pow(2,tn)-1,jC=Ga({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});li([jC]);var UC=ku(jC,`This IToken indicates the Parser is in Recording Phase
133
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(UC);var tx={name:`This CSTNode indicates the Parser is in Recording Phase
134
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},wo,rx=(wo=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const r=e>0?e:"";this[`CONSUME${r}`]=function(n,a){return this.consumeInternalRecord(n,e,a)},this[`SUBRULE${r}`]=function(n,a){return this.subruleInternalRecord(n,e,a)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let r=0;r<10;r++){const n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return Zc}topLevelRuleRecord(e,r){try{const n=new ai({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
135
+ This error was thrown during the "grammar recording phase" For more info see:
136
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(e,r){return Ea.call(this,Qe,e,r)}atLeastOneInternalRecord(e,r){Ea.call(this,_t,r,e)}atLeastOneSepFirstInternalRecord(e,r){Ea.call(this,Ct,r,e,vv)}manyInternalRecord(e,r){Ea.call(this,xe,r,e)}manySepFirstInternalRecord(e,r){Ea.call(this,gt,r,e,vv)}orInternalRecord(e,r){return zC.call(this,e,r)}subruleInternalRecord(e,r,n){if(Es(r),!e||q(e,"ruleName")===!1){const u=new Error(`<SUBRULE${dh(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
137
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw u.KNOWN_RECORDER_ERROR=!0,u}const a=xn(this.recordingProdStack),i=e.ruleName,o=new lt({idx:r,nonTerminalName:i,label:n==null?void 0:n.LABEL,referencedRule:void 0});return a.definition.push(o),this.outputCst?tx:Xf}consumeInternalRecord(e,r,n){if(Es(r),!gg(e)){const o=new Error(`<CONSUME${dh(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
138
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const a=xn(this.recordingProdStack),i=new we({idx:r,terminalType:e,label:n==null?void 0:n.LABEL});return a.definition.push(i),UC}},s(wo,"GastRecorder"),wo);function Ea(t,e,r,n=!1){Es(r);const a=xn(this.recordingProdStack),i=Mr(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),q(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),i.call(this),a.definition.push(o),this.recordingProdStack.pop(),Xf}s(Ea,"recordProd");function zC(t,e){Es(e);const r=xn(this.recordingProdStack),n=ae(t)===!1,a=n===!1?t:t.DEF,i=new yt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);const o=r_(a,u=>Mr(u.GATE));return i.hasPredicates=o,r.definition.push(i),V(a,u=>{const l=new mt({definition:[]});i.definition.push(l),q(u,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=u.IGNORE_AMBIGUITIES:q(u,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),u.ALT.call(this),this.recordingProdStack.pop()}),Xf}s(zC,"recordOrProd");function dh(t){return t===0?"":`${t}`}s(dh,"getIdxSuffix");function Es(t){if(t<0||t>Tv){const e=new Error(`Invalid DSL Method idx value: <${t}>
139
+ Idx value must be a none negative value smaller than ${Tv+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}s(Es,"assertMethodIdxIsValid");var Io,nx=(Io=class{initPerformanceTracer(e){if(q(e,"traceInitPerf")){const r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Pr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);const{time:a,value:i}=cg(r),o=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&o(`${n}<-- <${e}> time: ${a}ms`),this.traceInitIndent--,i}else return r()}},s(Io,"PerformanceTracer"),Io);function BC(t,e){e.forEach(r=>{const n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;const i=Object.getOwnPropertyDescriptor(n,a);i&&(i.get||i.set)?Object.defineProperty(t.prototype,a,i):t.prototype[a]=r.prototype[a]})})}s(BC,"applyMixins");var Zc=ku(Yr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Zc);var Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ma,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Qc=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),ut;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ut||(ut={}));function ph(t=void 0){return function(){return t}}s(ph,"EMPTY_ALT");var Qa,bg=(Qa=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{fg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),V(this.definedRulesNames,a=>{const o=this[a].originalGrammarAction;let u;this.TRACE_INIT(`${a} Rule`,()=>{u=this.topLevelRuleRecord(a,o)}),this.gastProductionsCache[a]=u})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=RC({rules:We(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ae(n)&&this.skipValidations===!1){const a=$C({rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),errMsgProvider:Nn,grammarName:r}),i=oC({lookaheadStrategy:this.lookaheadStrategy,rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),Ae(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=h_(We(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,i;(i=(a=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(a,{rules:We(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(We(this.gastProductionsCache))})),!Qa.DEFER_DEFINITION_ERRORS_HANDLING&&!Ae(this.definitionErrors))throw e=z(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected:
140
+ ${e.join(`
141
+ -------------------------------
142
+ `)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),q(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
143
+ Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
144
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
145
+ For further details.`);this.skipValidations=q(r,"skipValidations")?r.skipValidations:Pr.skipValidations}},s(Qa,"Parser"),Qa);bg.DEFER_DEFINITION_ERRORS_HANDLING=!1;BC(bg,[KM,WM,YM,XM,ZM,JM,QM,ex,rx,nx]);var No,ax=(No=class extends bg{constructor(e,r=Pr){const n=et(r);n.outputCst=!1,super(e,n)}},s(No,"EmbeddedActionsParser"),No);function KC(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}s(KC,"arrayMap");var qC=KC;function WC(){this.__data__=[],this.size=0}s(WC,"listCacheClear");var ix=WC;function VC(t,e){return t===e||t!==t&&e!==e}s(VC,"eq");var HC=VC;function YC(t,e){for(var r=t.length;r--;)if(HC(t[r][0],e))return r;return-1}s(YC,"assocIndexOf");var Jf=YC,sx=Array.prototype,ox=sx.splice;function XC(t){var e=this.__data__,r=Jf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ox.call(e,r,1),--this.size,!0}s(XC,"listCacheDelete");var lx=XC;function JC(t){var e=this.__data__,r=Jf(e,t);return r<0?void 0:e[r][1]}s(JC,"listCacheGet");var ux=JC;function ZC(t){return Jf(this.__data__,t)>-1}s(ZC,"listCacheHas");var cx=ZC;function QC(t,e){var r=this.__data__,n=Jf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(QC,"listCacheSet");var fx=QC;function ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(ea,"ListCache");ea.prototype.clear=ix;ea.prototype.delete=lx;ea.prototype.get=ux;ea.prototype.has=cx;ea.prototype.set=fx;var Zf=ea;function eS(){this.__data__=new Zf,this.size=0}s(eS,"stackClear");var dx=eS;function tS(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(tS,"stackDelete");var px=tS;function rS(t){return this.__data__.get(t)}s(rS,"stackGet");var hx=rS;function nS(t){return this.__data__.has(t)}s(nS,"stackHas");var mx=nS,gx=typeof global=="object"&&global&&global.Object===Object&&global,aS=gx,yx=typeof self=="object"&&self&&self.Object===Object&&self,vx=aS||yx||Function("return this")(),xr=vx,Tx=xr.Symbol,cr=Tx,iS=Object.prototype,Rx=iS.hasOwnProperty,$x=iS.toString,ki=cr?cr.toStringTag:void 0;function sS(t){var e=Rx.call(t,ki),r=t[ki];try{t[ki]=void 0;var n=!0}catch{}var a=$x.call(t);return n&&(e?t[ki]=r:delete t[ki]),a}s(sS,"getRawTag");var Ax=sS,Ex=Object.prototype,_x=Ex.toString;function oS(t){return _x.call(t)}s(oS,"objectToString");var Cx=oS,Sx="[object Null]",bx="[object Undefined]",Rv=cr?cr.toStringTag:void 0;function lS(t){return t==null?t===void 0?bx:Sx:Rv&&Rv in Object(t)?Ax(t):Cx(t)}s(lS,"baseGetTag");var ui=lS;function uS(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(uS,"isObject");var wg=uS,wx="[object AsyncFunction]",Ix="[object Function]",Nx="[object GeneratorFunction]",kx="[object Proxy]";function cS(t){if(!wg(t))return!1;var e=ui(t);return e==Ix||e==Nx||e==wx||e==kx}s(cS,"isFunction");var fS=cS,Px=xr["__core-js_shared__"],bd=Px,$v=function(){var t=/[^.]+$/.exec(bd&&bd.keys&&bd.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function dS(t){return!!$v&&$v in t}s(dS,"isMasked");var Ox=dS,Lx=Function.prototype,Dx=Lx.toString;function pS(t){if(t!=null){try{return Dx.call(t)}catch{}try{return t+""}catch{}}return""}s(pS,"toSource");var ta=pS,Mx=/[\\^$.*+?()[\]{}|]/g,xx=/^\[object .+?Constructor\]$/,Fx=Function.prototype,Gx=Object.prototype,jx=Fx.toString,Ux=Gx.hasOwnProperty,zx=RegExp("^"+jx.call(Ux).replace(Mx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hS(t){if(!wg(t)||Ox(t))return!1;var e=fS(t)?zx:xx;return e.test(ta(t))}s(hS,"baseIsNative");var Bx=hS;function mS(t,e){return t==null?void 0:t[e]}s(mS,"getValue");var Kx=mS;function gS(t,e){var r=Kx(t,e);return Bx(r)?r:void 0}s(gS,"getNative");var ci=gS,qx=ci(xr,"Map"),_s=qx,Wx=ci(Object,"create"),Cs=Wx;function yS(){this.__data__=Cs?Cs(null):{},this.size=0}s(yS,"hashClear");var Vx=yS;function vS(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(vS,"hashDelete");var Hx=vS,Yx="__lodash_hash_undefined__",Xx=Object.prototype,Jx=Xx.hasOwnProperty;function TS(t){var e=this.__data__;if(Cs){var r=e[t];return r===Yx?void 0:r}return Jx.call(e,t)?e[t]:void 0}s(TS,"hashGet");var Zx=TS,Qx=Object.prototype,e1=Qx.hasOwnProperty;function RS(t){var e=this.__data__;return Cs?e[t]!==void 0:e1.call(e,t)}s(RS,"hashHas");var t1=RS,r1="__lodash_hash_undefined__";function $S(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Cs&&e===void 0?r1:e,this}s($S,"hashSet");var n1=$S;function ra(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(ra,"Hash");ra.prototype.clear=Vx;ra.prototype.delete=Hx;ra.prototype.get=Zx;ra.prototype.has=t1;ra.prototype.set=n1;var Av=ra;function AS(){this.size=0,this.__data__={hash:new Av,map:new(_s||Zf),string:new Av}}s(AS,"mapCacheClear");var a1=AS;function ES(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}s(ES,"isKeyable");var i1=ES;function _S(t,e){var r=t.__data__;return i1(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(_S,"getMapData");var Qf=_S;function CS(t){var e=Qf(this,t).delete(t);return this.size-=e?1:0,e}s(CS,"mapCacheDelete");var s1=CS;function SS(t){return Qf(this,t).get(t)}s(SS,"mapCacheGet");var o1=SS;function bS(t){return Qf(this,t).has(t)}s(bS,"mapCacheHas");var l1=bS;function wS(t,e){var r=Qf(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(wS,"mapCacheSet");var u1=wS;function na(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s(na,"MapCache");na.prototype.clear=a1;na.prototype.delete=s1;na.prototype.get=o1;na.prototype.has=l1;na.prototype.set=u1;var ed=na,c1=200;function IS(t,e){var r=this.__data__;if(r instanceof Zf){var n=r.__data__;if(!_s||n.length<c1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ed(n)}return r.set(t,e),this.size=r.size,this}s(IS,"stackSet");var f1=IS;function aa(t){var e=this.__data__=new Zf(t);this.size=e.size}s(aa,"Stack");aa.prototype.clear=dx;aa.prototype.delete=px;aa.prototype.get=hx;aa.prototype.has=mx;aa.prototype.set=f1;var gc=aa,d1="__lodash_hash_undefined__";function NS(t){return this.__data__.set(t,d1),this}s(NS,"setCacheAdd");var p1=NS;function kS(t){return this.__data__.has(t)}s(kS,"setCacheHas");var h1=kS;function Ss(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new ed;++e<r;)this.add(t[e])}s(Ss,"SetCache");Ss.prototype.add=Ss.prototype.push=p1;Ss.prototype.has=h1;var PS=Ss;function OS(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}s(OS,"arraySome");var m1=OS;function LS(t,e){return t.has(e)}s(LS,"cacheHas");var DS=LS,g1=1,y1=2;function MS(t,e,r,n,a,i){var o=r&g1,u=t.length,l=e.length;if(u!=l&&!(o&&l>u))return!1;var c=i.get(t),f=i.get(e);if(c&&f)return c==e&&f==t;var d=-1,p=!0,m=r&y1?new PS:void 0;for(i.set(t,e),i.set(e,t);++d<u;){var g=t[d],v=e[d];if(n)var E=o?n(v,g,d,e,t,i):n(g,v,d,t,e,i);if(E!==void 0){if(E)continue;p=!1;break}if(m){if(!m1(e,function(T,b){if(!DS(m,b)&&(g===T||a(g,T,r,n,i)))return m.push(b)})){p=!1;break}}else if(!(g===v||a(g,v,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}s(MS,"equalArrays");var xS=MS,v1=xr.Uint8Array,Ev=v1;function FS(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}s(FS,"mapToArray");var T1=FS;function GS(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}s(GS,"setToArray");var Ig=GS,R1=1,$1=2,A1="[object Boolean]",E1="[object Date]",_1="[object Error]",C1="[object Map]",S1="[object Number]",b1="[object RegExp]",w1="[object Set]",I1="[object String]",N1="[object Symbol]",k1="[object ArrayBuffer]",P1="[object DataView]",_v=cr?cr.prototype:void 0,wd=_v?_v.valueOf:void 0;function jS(t,e,r,n,a,i,o){switch(r){case P1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case k1:return!(t.byteLength!=e.byteLength||!i(new Ev(t),new Ev(e)));case A1:case E1:case S1:return HC(+t,+e);case _1:return t.name==e.name&&t.message==e.message;case b1:case I1:return t==e+"";case C1:var u=T1;case w1:var l=n&R1;if(u||(u=Ig),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;n|=$1,o.set(t,e);var f=xS(u(t),u(e),n,a,i,o);return o.delete(t),f;case N1:if(wd)return wd.call(t)==wd.call(e)}return!1}s(jS,"equalByTag");var O1=jS;function US(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}s(US,"arrayPush");var zS=US,L1=Array.isArray,ct=L1;function BS(t,e,r){var n=e(t);return ct(t)?n:zS(n,r(t))}s(BS,"baseGetAllKeys");var D1=BS;function KS(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var o=t[r];e(o,r,t)&&(i[a++]=o)}return i}s(KS,"arrayFilter");var qS=KS;function WS(){return[]}s(WS,"stubArray");var M1=WS,x1=Object.prototype,F1=x1.propertyIsEnumerable,Cv=Object.getOwnPropertySymbols,G1=Cv?function(t){return t==null?[]:(t=Object(t),qS(Cv(t),function(e){return F1.call(t,e)}))}:M1,j1=G1;function VS(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(VS,"baseTimes");var U1=VS;function HS(t){return t!=null&&typeof t=="object"}s(HS,"isObjectLike");var Ja=HS,z1="[object Arguments]";function YS(t){return Ja(t)&&ui(t)==z1}s(YS,"baseIsArguments");var Sv=YS,XS=Object.prototype,B1=XS.hasOwnProperty,K1=XS.propertyIsEnumerable,q1=Sv(function(){return arguments}())?Sv:function(t){return Ja(t)&&B1.call(t,"callee")&&!K1.call(t,"callee")},td=q1;function JS(){return!1}s(JS,"stubFalse");var W1=JS,ZS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bv=ZS&&typeof module=="object"&&module&&!module.nodeType&&module,V1=bv&&bv.exports===ZS,wv=V1?xr.Buffer:void 0,H1=wv?wv.isBuffer:void 0,Y1=H1||W1,ef=Y1,X1=9007199254740991,J1=/^(?:0|[1-9]\d*)$/;function QS(t,e){var r=typeof t;return e=e??X1,!!e&&(r=="number"||r!="symbol"&&J1.test(t))&&t>-1&&t%1==0&&t<e}s(QS,"isIndex");var eb=QS,Z1=9007199254740991;function tb(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Z1}s(tb,"isLength");var Ng=tb,Q1="[object Arguments]",eF="[object Array]",tF="[object Boolean]",rF="[object Date]",nF="[object Error]",aF="[object Function]",iF="[object Map]",sF="[object Number]",oF="[object Object]",lF="[object RegExp]",uF="[object Set]",cF="[object String]",fF="[object WeakMap]",dF="[object ArrayBuffer]",pF="[object DataView]",hF="[object Float32Array]",mF="[object Float64Array]",gF="[object Int8Array]",yF="[object Int16Array]",vF="[object Int32Array]",TF="[object Uint8Array]",RF="[object Uint8ClampedArray]",$F="[object Uint16Array]",AF="[object Uint32Array]",be={};be[hF]=be[mF]=be[gF]=be[yF]=be[vF]=be[TF]=be[RF]=be[$F]=be[AF]=!0;be[Q1]=be[eF]=be[dF]=be[tF]=be[pF]=be[rF]=be[nF]=be[aF]=be[iF]=be[sF]=be[oF]=be[lF]=be[uF]=be[cF]=be[fF]=!1;function rb(t){return Ja(t)&&Ng(t.length)&&!!be[ui(t)]}s(rb,"baseIsTypedArray");var EF=rb;function nb(t){return function(e){return t(e)}}s(nb,"baseUnary");var _F=nb,ab=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cs=ab&&typeof module=="object"&&module&&!module.nodeType&&module,CF=cs&&cs.exports===ab,Id=CF&&aS.process,SF=function(){try{var t=cs&&cs.require&&cs.require("util").types;return t||Id&&Id.binding&&Id.binding("util")}catch{}}(),Iv=SF,Nv=Iv&&Iv.isTypedArray,bF=Nv?_F(Nv):EF,kg=bF,wF=Object.prototype,IF=wF.hasOwnProperty;function ib(t,e){var r=ct(t),n=!r&&td(t),a=!r&&!n&&ef(t),i=!r&&!n&&!a&&kg(t),o=r||n||a||i,u=o?U1(t.length,String):[],l=u.length;for(var c in t)(e||IF.call(t,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||eb(c,l)))&&u.push(c);return u}s(ib,"arrayLikeKeys");var NF=ib,kF=Object.prototype;function sb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||kF;return t===r}s(sb,"isPrototype");var ob=sb;function lb(t,e){return function(r){return t(e(r))}}s(lb,"overArg");var PF=lb,OF=PF(Object.keys,Object),LF=OF,DF=Object.prototype,MF=DF.hasOwnProperty;function ub(t){if(!ob(t))return LF(t);var e=[];for(var r in Object(t))MF.call(t,r)&&r!="constructor"&&e.push(r);return e}s(ub,"baseKeys");var cb=ub;function fb(t){return t!=null&&Ng(t.length)&&!fS(t)}s(fb,"isArrayLike");var rd=fb;function db(t){return rd(t)?NF(t):cb(t)}s(db,"keys");var Pg=db;function pb(t){return D1(t,Pg,j1)}s(pb,"getAllKeys");var kv=pb,xF=1,FF=Object.prototype,GF=FF.hasOwnProperty;function hb(t,e,r,n,a,i){var o=r&xF,u=kv(t),l=u.length,c=kv(e),f=c.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=u[d];if(!(o?p in e:GF.call(e,p)))return!1}var m=i.get(t),g=i.get(e);if(m&&g)return m==e&&g==t;var v=!0;i.set(t,e),i.set(e,t);for(var E=o;++d<l;){p=u[d];var T=t[p],b=e[p];if(n)var C=o?n(b,T,p,e,t,i):n(T,b,p,t,e,i);if(!(C===void 0?T===b||a(T,b,r,n,i):C)){v=!1;break}E||(E=p=="constructor")}if(v&&!E){var k=t.constructor,B=e.constructor;k!=B&&"constructor"in t&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof B=="function"&&B instanceof B)&&(v=!1)}return i.delete(t),i.delete(e),v}s(hb,"equalObjects");var jF=hb,UF=ci(xr,"DataView"),hh=UF,zF=ci(xr,"Promise"),mh=zF,BF=ci(xr,"Set"),ja=BF,KF=ci(xr,"WeakMap"),gh=KF,Pv="[object Map]",qF="[object Object]",Ov="[object Promise]",Lv="[object Set]",Dv="[object WeakMap]",Mv="[object DataView]",WF=ta(hh),VF=ta(_s),HF=ta(mh),YF=ta(ja),XF=ta(gh),pn=ui;(hh&&pn(new hh(new ArrayBuffer(1)))!=Mv||_s&&pn(new _s)!=Pv||mh&&pn(mh.resolve())!=Ov||ja&&pn(new ja)!=Lv||gh&&pn(new gh)!=Dv)&&(pn=s(function(t){var e=ui(t),r=e==qF?t.constructor:void 0,n=r?ta(r):"";if(n)switch(n){case WF:return Mv;case VF:return Pv;case HF:return Ov;case YF:return Lv;case XF:return Dv}return e},"getTag"));var yh=pn,JF=1,xv="[object Arguments]",Fv="[object Array]",Uu="[object Object]",ZF=Object.prototype,Gv=ZF.hasOwnProperty;function mb(t,e,r,n,a,i){var o=ct(t),u=ct(e),l=o?Fv:yh(t),c=u?Fv:yh(e);l=l==xv?Uu:l,c=c==xv?Uu:c;var f=l==Uu,d=c==Uu,p=l==c;if(p&&ef(t)){if(!ef(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new gc),o||kg(t)?xS(t,e,r,n,a,i):O1(t,e,l,r,n,a,i);if(!(r&JF)){var m=f&&Gv.call(t,"__wrapped__"),g=d&&Gv.call(e,"__wrapped__");if(m||g){var v=m?t.value():t,E=g?e.value():e;return i||(i=new gc),a(v,E,r,n,i)}}return p?(i||(i=new gc),jF(t,e,r,n,a,i)):!1}s(mb,"baseIsEqualDeep");var QF=mb;function Og(t,e,r,n,a){return t===e?!0:t==null||e==null||!Ja(t)&&!Ja(e)?t!==t&&e!==e:QF(t,e,r,n,Og,a)}s(Og,"baseIsEqual");var gb=Og,eG=1,tG=2;function yb(t,e,r,n){var a=r.length,i=a,o=!n;if(t==null)return!i;for(t=Object(t);a--;){var u=r[a];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<i;){u=r[a];var l=u[0],c=t[l],f=u[1];if(o&&u[2]){if(c===void 0&&!(l in t))return!1}else{var d=new gc;if(n)var p=n(c,f,l,t,e,d);if(!(p===void 0?gb(f,c,eG|tG,n,d):p))return!1}}return!0}s(yb,"baseIsMatch");var rG=yb;function vb(t){return t===t&&!wg(t)}s(vb,"isStrictComparable");var Tb=vb;function Rb(t){for(var e=Pg(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,Tb(a)]}return e}s(Rb,"getMatchData");var nG=Rb;function $b(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}s($b,"matchesStrictComparable");var Ab=$b;function Eb(t){var e=nG(t);return e.length==1&&e[0][2]?Ab(e[0][0],e[0][1]):function(r){return r===t||rG(r,t,e)}}s(Eb,"baseMatches");var aG=Eb,iG="[object Symbol]";function _b(t){return typeof t=="symbol"||Ja(t)&&ui(t)==iG}s(_b,"isSymbol");var nd=_b,sG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oG=/^\w*$/;function Cb(t,e){if(ct(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||nd(t)?!0:oG.test(t)||!sG.test(t)||e!=null&&t in Object(e)}s(Cb,"isKey");var Lg=Cb,lG="Expected a function";function ad(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(lG);var r=s(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return r.cache=i.set(a,o)||i,o},"memoized");return r.cache=new(ad.Cache||ed),r}s(ad,"memoize");ad.Cache=ed;var uG=ad,cG=500;function Sb(t){var e=uG(t,function(n){return r.size===cG&&r.clear(),n}),r=e.cache;return e}s(Sb,"memoizeCapped");var fG=Sb,dG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pG=/\\(\\)?/g,hG=fG(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dG,function(r,n,a,i){e.push(a?i.replace(pG,"$1"):n||r)}),e}),mG=hG,gG=1/0,jv=cr?cr.prototype:void 0,Uv=jv?jv.toString:void 0;function Dg(t){if(typeof t=="string")return t;if(ct(t))return qC(t,Dg)+"";if(nd(t))return Uv?Uv.call(t):"";var e=t+"";return e=="0"&&1/t==-gG?"-0":e}s(Dg,"baseToString");var yG=Dg;function bb(t){return t==null?"":yG(t)}s(bb,"toString");var vG=bb;function wb(t,e){return ct(t)?t:Lg(t,e)?[t]:mG(vG(t))}s(wb,"castPath");var Ib=wb,TG=1/0;function Nb(t){if(typeof t=="string"||nd(t))return t;var e=t+"";return e=="0"&&1/t==-TG?"-0":e}s(Nb,"toKey");var id=Nb;function kb(t,e){e=Ib(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[id(e[r++])];return r&&r==n?t:void 0}s(kb,"baseGet");var Pb=kb;function Ob(t,e,r){var n=t==null?void 0:Pb(t,e);return n===void 0?r:n}s(Ob,"get");var RG=Ob;function Lb(t,e){return t!=null&&e in Object(t)}s(Lb,"baseHasIn");var $G=Lb;function Db(t,e,r){e=Ib(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=id(e[n]);if(!(i=t!=null&&r(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&Ng(a)&&eb(o,a)&&(ct(t)||td(t)))}s(Db,"hasPath");var AG=Db;function Mb(t,e){return t!=null&&AG(t,e,$G)}s(Mb,"hasIn");var EG=Mb,_G=1,CG=2;function xb(t,e){return Lg(t)&&Tb(e)?Ab(id(t),e):function(r){var n=RG(r,t);return n===void 0&&n===e?EG(r,t):gb(e,n,_G|CG)}}s(xb,"baseMatchesProperty");var SG=xb;function Fb(t){return t}s(Fb,"identity");var Mg=Fb;function Gb(t){return function(e){return e==null?void 0:e[t]}}s(Gb,"baseProperty");var bG=Gb;function jb(t){return function(e){return Pb(e,t)}}s(jb,"basePropertyDeep");var wG=jb;function Ub(t){return Lg(t)?bG(id(t)):wG(t)}s(Ub,"property");var IG=Ub;function zb(t){return typeof t=="function"?t:t==null?Mg:typeof t=="object"?ct(t)?SG(t[0],t[1]):aG(t):IG(t)}s(zb,"baseIteratee");var sd=zb;function Bb(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),u=o.length;u--;){var l=o[t?u:++a];if(r(i[l],l,i)===!1)break}return e}}s(Bb,"createBaseFor");var NG=Bb,kG=NG(),PG=kG;function Kb(t,e){return t&&PG(t,e,Pg)}s(Kb,"baseForOwn");var OG=Kb;function qb(t,e){return function(r,n){if(r==null)return r;if(!rd(r))return t(r,n);for(var a=r.length,i=e?a:-1,o=Object(r);(e?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}s(qb,"createBaseEach");var LG=qb,DG=LG(OG),od=DG;function Wb(t,e){var r=-1,n=rd(t)?Array(t.length):[];return od(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(Wb,"baseMap");var MG=Wb;function Vb(t,e){var r=ct(t)?qC:MG;return r(t,sd(e))}s(Vb,"map");var _r=Vb;function Hb(t,e){var r=[];return od(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}s(Hb,"baseFilter");var xG=Hb;function Yb(t,e){var r=ct(t)?qS:xG;return r(t,sd(e))}s(Yb,"filter");var FG=Yb;function Gn(t,e,r){return`${t.name}_${e}_${r}`}s(Gn,"buildATNKey");var Xr=1,GG=2,Xb=4,Jb=5,Lu=7,jG=8,UG=9,zG=10,BG=11,Zb=12,ko,xg=(ko=class{constructor(e){this.target=e}isEpsilon(){return!1}},s(ko,"AbstractTransition"),ko),Po,Fg=(Po=class extends xg{constructor(e,r){super(e),this.tokenType=r}},s(Po,"AtomTransition"),Po),Oo,Qb=(Oo=class extends xg{constructor(e){super(e)}isEpsilon(){return!0}},s(Oo,"EpsilonTransition"),Oo),Lo,Gg=(Lo=class extends xg{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}},s(Lo,"RuleTransition"),Lo);function ew(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};tw(e,t);const r=t.length;for(let n=0;n<r;n++){const a=t[n],i=rn(e,a,a);i!==void 0&&dw(e,a,i)}return e}s(ew,"createATN");function tw(t,e){const r=e.length;for(let n=0;n<r;n++){const a=e[n],i=Ve(t,a,void 0,{type:GG}),o=Ve(t,a,void 0,{type:Lu});i.stop=o,t.ruleToStartState.set(a,i),t.ruleToStopState.set(a,o)}}s(tw,"createRuleStartAndStopATNStates");function jg(t,e,r){return r instanceof we?ld(t,e,r.terminalType,r):r instanceof lt?fw(t,e,r):r instanceof yt?sw(t,e,r):r instanceof Qe?ow(t,e,r):r instanceof xe?rw(t,e,r):r instanceof gt?nw(t,e,r):r instanceof _t?aw(t,e,r):r instanceof Ct?iw(t,e,r):rn(t,e,r)}s(jg,"atom");function rw(t,e,r){const n=Ve(t,e,r,{type:Jb});Fr(t,n);const a=ia(t,e,n,r,rn(t,e,r));return zg(t,e,r,a)}s(rw,"repetition");function nw(t,e,r){const n=Ve(t,e,r,{type:Jb});Fr(t,n);const a=ia(t,e,n,r,rn(t,e,r)),i=ld(t,e,r.separator,r);return zg(t,e,r,a,i)}s(nw,"repetitionSep");function aw(t,e,r){const n=Ve(t,e,r,{type:Xb});Fr(t,n);const a=ia(t,e,n,r,rn(t,e,r));return Ug(t,e,r,a)}s(aw,"repetitionMandatory");function iw(t,e,r){const n=Ve(t,e,r,{type:Xb});Fr(t,n);const a=ia(t,e,n,r,rn(t,e,r)),i=ld(t,e,r.separator,r);return Ug(t,e,r,a,i)}s(iw,"repetitionMandatorySep");function sw(t,e,r){const n=Ve(t,e,r,{type:Xr});Fr(t,n);const a=_r(r.definition,o=>jg(t,e,o));return ia(t,e,n,r,...a)}s(sw,"alternation");function ow(t,e,r){const n=Ve(t,e,r,{type:Xr});Fr(t,n);const a=ia(t,e,n,r,rn(t,e,r));return lw(t,e,r,a)}s(ow,"option");function rn(t,e,r){const n=FG(_r(r.definition,a=>jg(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:cw(t,n)}s(rn,"block");function Ug(t,e,r,n,a){const i=n.left,o=n.right,u=Ve(t,e,r,{type:BG});Fr(t,u);const l=Ve(t,e,r,{type:Zb});return i.loopback=u,l.loopback=u,t.decisionMap[Gn(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=u,je(o,u),a===void 0?(je(u,i),je(u,l)):(je(u,l),je(u,a.left),je(a.right,i)),{left:i,right:l}}s(Ug,"plus");function zg(t,e,r,n,a){const i=n.left,o=n.right,u=Ve(t,e,r,{type:zG});Fr(t,u);const l=Ve(t,e,r,{type:Zb}),c=Ve(t,e,r,{type:UG});return u.loopback=c,l.loopback=c,je(u,i),je(u,l),je(o,c),a!==void 0?(je(c,l),je(c,a.left),je(a.right,i)):je(c,u),t.decisionMap[Gn(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=u,{left:u,right:l}}s(zg,"star");function lw(t,e,r,n){const a=n.left,i=n.right;return je(a,i),t.decisionMap[Gn(e,"Option",r.idx)]=a,n}s(lw,"optional");function Fr(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}s(Fr,"defineDecisionState");function ia(t,e,r,n,...a){const i=Ve(t,e,n,{type:jG,start:r});r.end=i;for(const u of a)u!==void 0?(je(r,u.left),je(u.right,i)):je(r,i);const o={left:r,right:i};return t.decisionMap[Gn(e,uw(n),n.idx)]=r,o}s(ia,"makeAlts");function uw(t){if(t instanceof yt)return"Alternation";if(t instanceof Qe)return"Option";if(t instanceof xe)return"Repetition";if(t instanceof gt)return"RepetitionWithSeparator";if(t instanceof _t)return"RepetitionMandatory";if(t instanceof Ct)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}s(uw,"getProdType");function cw(t,e){const r=e.length;for(let i=0;i<r-1;i++){const o=e[i];let u;o.left.transitions.length===1&&(u=o.left.transitions[0]);const l=u instanceof Gg,c=u,f=e[i+1].left;o.left.type===Xr&&o.right.type===Xr&&u!==void 0&&(l&&c.followState===o.right||u.target===o.right)?(l?c.followState=f:u.target=f,pw(t,o.right)):je(o.right,f)}const n=e[0],a=e[r-1];return{left:n.left,right:a.right}}s(cw,"makeBlock");function ld(t,e,r,n){const a=Ve(t,e,n,{type:Xr}),i=Ve(t,e,n,{type:Xr});return ud(a,new Fg(i,r)),{left:a,right:i}}s(ld,"tokenRef");function fw(t,e,r){const n=r.referencedRule,a=t.ruleToStartState.get(n),i=Ve(t,e,r,{type:Xr}),o=Ve(t,e,r,{type:Xr}),u=new Gg(a,n,o);return ud(i,u),{left:i,right:o}}s(fw,"ruleRef");function dw(t,e,r){const n=t.ruleToStartState.get(e);je(n,r.left);const a=t.ruleToStopState.get(e);return je(r.right,a),{left:n,right:a}}s(dw,"buildRuleHandle");function je(t,e){const r=new Qb(e);ud(t,r)}s(je,"epsilon");function Ve(t,e,r,n){const a=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(a),a}s(Ve,"newState");function ud(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}s(ud,"addTransition");function pw(t,e){t.states.splice(t.states.indexOf(e),1)}s(pw,"removeState");var tf={},Do,vh=(Do=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const r=Bg(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return _r(this.configs,e=>e.alt)}get key(){let e="";for(const r in this.map)e+=r+":";return e}},s(Do,"ATNConfigSet"),Do);function Bg(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}s(Bg,"getATNConfigKey");function hw(t,e,r){for(var n=-1,a=t.length;++n<a;){var i=t[n],o=e(i);if(o!=null&&(u===void 0?o===o&&!nd(o):r(o,u)))var u=o,l=i}return l}s(hw,"baseExtremum");var KG=hw;function mw(t,e){return t<e}s(mw,"baseLt");var qG=mw;function gw(t){return t&&t.length?KG(t,Mg,qG):void 0}s(gw,"min");var WG=gw,zv=cr?cr.isConcatSpreadable:void 0;function yw(t){return ct(t)||td(t)||!!(zv&&t&&t[zv])}s(yw,"isFlattenable");var VG=yw;function Kg(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=VG),a||(a=[]);++i<o;){var u=t[i];e>0&&r(u)?e>1?Kg(u,e-1,r,n,a):zS(a,u):n||(a[a.length]=u)}return a}s(Kg,"baseFlatten");var vw=Kg;function Tw(t,e){return vw(_r(t,e),1)}s(Tw,"flatMap");var HG=Tw;function Rw(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}s(Rw,"baseFindIndex");var YG=Rw;function $w(t){return t!==t}s($w,"baseIsNaN");var XG=$w;function Aw(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}s(Aw,"strictIndexOf");var JG=Aw;function Ew(t,e,r){return e===e?JG(t,e,r):YG(t,XG,r)}s(Ew,"baseIndexOf");var ZG=Ew;function _w(t,e){var r=t==null?0:t.length;return!!r&&ZG(t,e,0)>-1}s(_w,"arrayIncludes");var QG=_w;function Cw(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}s(Cw,"arrayIncludesWith");var ej=Cw;function Sw(){}s(Sw,"noop");var tj=Sw,rj=1/0,nj=ja&&1/Ig(new ja([,-0]))[1]==rj?function(t){return new ja(t)}:tj,aj=nj,ij=200;function bw(t,e,r){var n=-1,a=QG,i=t.length,o=!0,u=[],l=u;if(r)o=!1,a=ej;else if(i>=ij){var c=e?null:aj(t);if(c)return Ig(c);o=!1,a=DS,l=new PS}else l=e?[]:u;e:for(;++n<i;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=l.length;p--;)if(l[p]===d)continue e;e&&l.push(d),u.push(f)}else a(l,d,r)||(l!==u&&l.push(d),u.push(f))}return u}s(bw,"baseUniq");var sj=bw;function ww(t,e){return t&&t.length?sj(t,sd(e)):[]}s(ww,"uniqBy");var oj=ww;function Iw(t){var e=t==null?0:t.length;return e?vw(t,1):[]}s(Iw,"flatten");var lj=Iw;function Nw(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}s(Nw,"arrayEach");var uj=Nw;function kw(t){return typeof t=="function"?t:Mg}s(kw,"castFunction");var cj=kw;function Pw(t,e){var r=ct(t)?uj:od;return r(t,cj(e))}s(Pw,"forEach");var Nd=Pw,fj="[object Map]",dj="[object Set]",pj=Object.prototype,hj=pj.hasOwnProperty;function Ow(t){if(t==null)return!0;if(rd(t)&&(ct(t)||typeof t=="string"||typeof t.splice=="function"||ef(t)||kg(t)||td(t)))return!t.length;var e=yh(t);if(e==fj||e==dj)return!t.size;if(ob(t))return!cb(t).length;for(var r in t)if(hj.call(t,r))return!1;return!0}s(Ow,"isEmpty");var mj=Ow;function Lw(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}s(Lw,"arrayReduce");var gj=Lw;function Dw(t,e,r,n,a){return a(t,function(i,o,u){r=n?(n=!1,i):e(r,i,o,u)}),r}s(Dw,"baseReduce");var yj=Dw;function Mw(t,e,r){var n=ct(t)?gj:yj,a=arguments.length<3;return n(t,sd(e),r,a,od)}s(Mw,"reduce");var Bv=Mw;function xw(t,e){const r={};return n=>{const a=n.toString();let i=r[a];return i!==void 0||(i={atnStartState:t,decision:e,states:{}},r[a]=i),i}}s(xw,"createDFACache");var Mo,Fw=(Mo=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="";const r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},s(Mo,"PredicateSet"),Mo),Kv=new Fw,xo,vj=(xo=class extends Cg{constructor(e){var r;super(),this.logging=(r=e==null?void 0:e.logging)!==null&&r!==void 0?r:n=>console.log(n)}initialize(e){this.atn=ew(e.rules),this.dfas=Gw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:r,rule:n,hasPredicates:a,dynamicTokensEnabled:i}=e,o=this.dfas,u=this.logging,l=Gn(n,"Alternation",r),f=this.atn.decisionMap[l].decision,d=_r(ah({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>_r(p,m=>m[0]));if(Th(d,!1)&&!i){const p=Bv(d,(m,g,v)=>(Nd(g,E=>{E&&(m[E.tokenTypeIdx]=v,Nd(E.categoryMatches,T=>{m[T]=v}))}),m),{});return a?function(m){var g;const v=this.LA(1),E=p[v.tokenTypeIdx];if(m!==void 0&&E!==void 0){const T=(g=m[E])===null||g===void 0?void 0:g.GATE;if(T!==void 0&&T.call(this)===!1)return}return E}:function(){const m=this.LA(1);return p[m.tokenTypeIdx]}}else return a?function(p){const m=new Fw,g=p===void 0?0:p.length;for(let E=0;E<g;E++){const T=p==null?void 0:p[E].GATE;m.set(E,T===void 0||T.call(this))}const v=yc.call(this,o,f,m,u);return typeof v=="number"?v:void 0}:function(){const p=yc.call(this,o,f,Kv,u);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:r,rule:n,prodType:a,dynamicTokensEnabled:i}=e,o=this.dfas,u=this.logging,l=Gn(n,a,r),f=this.atn.decisionMap[l].decision,d=_r(ah({maxLookahead:1,occurrence:r,prodType:a,rule:n}),p=>_r(p,m=>m[0]));if(Th(d)&&d[0][0]&&!i){const p=d[0],m=lj(p);if(m.length===1&&mj(m[0].categoryMatches)){const v=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const g=Bv(m,(v,E)=>(E!==void 0&&(v[E.tokenTypeIdx]=!0,Nd(E.categoryMatches,T=>{v[T]=!0})),v),{});return function(){const v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){const p=yc.call(this,o,f,Kv,u);return typeof p=="object"?!1:p===0}}},s(xo,"LLStarLookaheadStrategy"),xo);function Th(t,e=!0){const r=new Set;for(const n of t){const a=new Set;for(const i of n){if(i===void 0){if(e)break;return!1}const o=[i.tokenTypeIdx].concat(i.categoryMatches);for(const u of o)if(r.has(u)){if(!a.has(u))return!1}else r.add(u),a.add(u)}}return!0}s(Th,"isLL1Sequence");function Gw(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=xw(t.decisionStates[n],n);return r}s(Gw,"initATNSimulator");function yc(t,e,r,n){const a=t[e](r);let i=a.start;if(i===void 0){const u=Xw(a.atnStartState);i=Wg(a,qg(u)),a.start=i}return jw.apply(this,[a,i,r,n])}s(yc,"adaptivePredict");function jw(t,e,r,n){let a=e,i=1;const o=[];let u=this.LA(i++);for(;;){let l=Ww(a,u);if(l===void 0&&(l=Uw.apply(this,[t,a,u,i,r,n])),l===tf)return qw(o,a,u);if(l.isAcceptState===!0)return l.prediction;a=l,o.push(u),u=this.LA(i++)}}s(jw,"performLookahead");function Uw(t,e,r,n,a,i){const o=Vw(e.configs,r,a);if(o.size===0)return Rh(t,e,r,tf),tf;let u=qg(o);const l=Yw(o,a);if(l!==void 0)u.isAcceptState=!0,u.prediction=l,u.configs.uniqueAlt=l;else if(eI(o)){const c=WG(o.alts);u.isAcceptState=!0,u.prediction=c,u.configs.uniqueAlt=c,zw.apply(this,[t,n,o.alts,i])}return u=Rh(t,e,r,u),u}s(Uw,"computeLookaheadTarget");function zw(t,e,r,n){const a=[];for(let c=1;c<=e;c++)a.push(this.LA(c).tokenType);const i=t.atnStartState,o=i.rule,u=i.production,l=Bw({topLevelRule:o,ambiguityIndices:r,production:u,prefixPath:a});n(l)}s(zw,"reportLookaheadAmbiguity");function Bw(t){const e=_r(t.prefixPath,a=>On(a)).join(", "),r=t.production.idx===0?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Kw(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
146
+ <${e}> may appears as a prefix path in all these alternatives.
147
+ `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
148
+ For Further details.`,n}s(Bw,"buildAmbiguityError");function Kw(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof yt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof gt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Kw,"getProductionDslName");function qw(t,e,r){const n=HG(e.configs.elements,i=>i.state.transitions),a=oj(n.filter(i=>i instanceof Fg).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:t}}s(qw,"buildAdaptivePredictError");function Ww(t,e){return t.edges[e.tokenTypeIdx]}s(Ww,"getExistingTargetState");function Vw(t,e,r){const n=new vh,a=[];for(const o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Lu){a.push(o);continue}const u=o.state.transitions.length;for(let l=0;l<u;l++){const c=o.state.transitions[l],f=Hw(c,e);f!==void 0&&n.add({state:f,alt:o.alt,stack:o.stack})}}let i;if(a.length===0&&n.size===1&&(i=n),i===void 0){i=new vh;for(const o of n.elements)bs(o,i)}if(a.length>0&&!Zw(i))for(const o of a)i.add(o);return i}s(Vw,"computeReachSet");function Hw(t,e){if(t instanceof Fg&&vg(e,t.tokenType))return t.target}s(Hw,"getReachableTarget");function Yw(t,e){let r;for(const n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}s(Yw,"getUniqueAlt");function qg(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}s(qg,"newDFAState");function Rh(t,e,r,n){return n=Wg(t,n),e.edges[r.tokenTypeIdx]=n,n}s(Rh,"addDFAEdge");function Wg(t,e){if(e===tf)return e;const r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}s(Wg,"addDFAState");function Xw(t){const e=new vh,r=t.transitions.length;for(let n=0;n<r;n++){const i={state:t.transitions[n].target,alt:n,stack:[]};bs(i,e)}return e}s(Xw,"computeStartState");function bs(t,e){const r=t.state;if(r.type===Lu){if(t.stack.length>0){const a=[...t.stack],o={state:a.pop(),alt:t.alt,stack:a};bs(o,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let a=0;a<n;a++){const i=r.transitions[a],o=Jw(t,i);o!==void 0&&bs(o,e)}}s(bs,"closure");function Jw(t,e){if(e instanceof Qb)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof Gg){const r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}s(Jw,"getEpsilonTarget");function Zw(t){for(const e of t.elements)if(e.state.type===Lu)return!0;return!1}s(Zw,"hasConfigInRuleStopState");function Qw(t){for(const e of t.elements)if(e.state.type!==Lu)return!1;return!0}s(Qw,"allConfigsInRuleStopStates");function eI(t){if(Qw(t))return!0;const e=tI(t.elements);return rI(e)&&!nI(e)}s(eI,"hasConflictTerminatingPrediction");function tI(t){const e=new Map;for(const r of t){const n=Bg(r,!1);let a=e.get(n);a===void 0&&(a={},e.set(n,a)),a[r.alt]=!0}return e}s(tI,"getConflictingAltSets");function rI(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}s(rI,"hasConflictingAltSet");function nI(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}s(nI,"hasStateAssociatedWithOneAlt");mu();var Fo,aI=(Fo=class{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new Hg(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const r=new cd;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){const n=new rf(e.startOffset,e.image.length,hs(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const r=e.container;if(r){const n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){const r=[];for(const i of e){const o=new rf(i.startOffset,i.image.length,hs(i),i.tokenType,!0);o.root=this.rootNode,r.push(o)}let n=this.current,a=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){const i=n.container.content.indexOf(n);if(i>0){n.container.content.splice(i,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}construct(e){const r=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=r;const n=this.nodeStack.pop();(n==null?void 0:n.content.length)===0&&this.removeNode(n)}},s(Fo,"CstNodeBuilder"),Fo),Go,Vg=(Go=class{get hidden(){return!1}get astNode(){var r,n;const e=typeof((r=this._astNode)==null?void 0:r.$type)=="string"?this._astNode:(n=this.container)==null?void 0:n.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},s(Go,"AbstractCstNode"),Go),jo,rf=(jo=class extends Vg{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,a,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=a,this._length=r,this._range=n}},s(jo,"LeafCstNodeImpl"),jo),Uo,cd=(Uo=class extends Vg{constructor(){super(...arguments),this.content=new Tj(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.end)??0}get range(){const e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){const{range:n}=e,{range:a}=r;this._rangeCache={start:n.start,end:a.end.line<n.start.line?n.start:a.end}}return this._rangeCache}else return{start:ie.create(0,0),end:ie.create(0,0)}}get firstNonHiddenNode(){for(const 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--){const r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},s(Uo,"CompositeCstNodeImpl"),Uo),ei,Tj=(ei=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,ei.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(const r of e)r.container=this.parent}},s(ei,"CstNodeContainer"),ei),zo,Hg=(zo=class extends cd{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},s(zo,"RootCstNodeImpl"),zo),nf=Symbol("Datatype");function vc(t){return t.$type===nf}s(vc,"isDataTypeNode");var qv="​",iI=s(t=>t.endsWith(qv)?t:t+qv,"withRuleSuffix"),Bo,Yg=(Bo=class{constructor(e){var a;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";(a=e.shared.profilers.LangiumProfiler)!=null&&a.isActive("parsing")?this.wrapper=new $j(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new uI(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}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()}},s(Bo,"AbstractLangiumParser"),Bo),Ko,sI=(Ko=class extends Yg{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new aI,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,r){const n=this.computeRuleType(e);let a;qa(e)&&(a=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(iI(e.name),this.startImplementation(n,a,r).bind(this));return this.allRules.set(e.name,i),ot(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const r=e.name,n=new Map;for(let a=0;a<e.operators.precedences.length;a++){const i=e.operators.precedences[a];for(const o of i.operators)n.set(o.value,{precedence:a,rightAssoc:i.associativity==="right"})}this.operatorPrecedence.set(r,n)}computeRuleType(e){return qa(e)?Mn(e):e.fragment?void 0:Tu(e)?nf:Mn(e)}parse(e,r={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const a=r.rule?this.allRules.get(r.rule):this.mainRule;if(!a)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");const i=this.doParse(a);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Ba(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let r=this.wrapper.rule(e);if(this.stack.length>0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(e,r,n){return a=>{const i=!this.isRecording()&&e!==void 0;if(i){const o={$type:e};this.stack.push(o),e===nf?o.value="":r!==void 0&&(o.$infixName=r)}return n(a),i?this.construct():void 0}}extractHiddenTokens(e){const r=this.lexerResult.hidden;if(!r.length)return[];const n=e.startOffset;for(let a=0;a<r.length;a++)if(r[a].startOffset>n)return r.splice(0,a);return r.splice(0,r.length)}consume(e,r,n){const a=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(a)){const i=this.extractHiddenTokens(a);this.nodeBuilder.addHiddenNodes(i);const o=this.nodeBuilder.buildLeafNode(a,n),{assignment:u,crossRef:l}=this.getAssignment(n),c=this.current;if(u){const f=br(n)?a.image:this.converter.convert(a.image,o);this.assign(u.operator,u.feature,f,o,l)}else if(vc(c)){let f=a.image;br(n)||(f=this.converter.convert(f,o).toString()),c.value+=f}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,a,i){let o;!this.isRecording()&&!n&&(o=this.nodeBuilder.buildCompositeNode(a));let u;try{u=this.wrapper.wrapSubrule(e,r,i)}finally{this.isRecording()||(u===void 0&&!n&&(u=this.construct()),u!==void 0&&o&&o.length>0&&this.performSubruleAssignment(u,a,o))}}performSubruleAssignment(e,r,n){const{assignment:a,crossRef:i}=this.getAssignment(r);if(a)this.assign(a.operator,a.feature,e,n,i);else if(!a){const o=this.current;if(vc(o))o.value+=e.toString();else if(typeof e=="object"&&e){const l=this.assignWithoutOverride(e,o);this.stack.pop(),this.stack.push(l)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);const i={$type:e};this.stack.push(i),this.assign(r.operator,r.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):vc(e)?this.converter.convert(e.value,e.$cstNode):(Vh(this.astReflection,e),e)}constructInfix(e,r){const n=e.parts;if(!Array.isArray(n)||n.length===0)return;const a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let i=0,o=-1;for(let v=0;v<a.length;v++){const E=a[v],T=r.get(E)??{precedence:1/0,rightAssoc:!1};T.precedence>o?(o=T.precedence,i=v):T.precedence===o&&(T.rightAssoc||(i=v))}const u=a.slice(0,i),l=a.slice(i+1),c=n.slice(0,i+1),f=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:u},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:f,operators:l},m=this.constructInfix(d,r),g=this.constructInfix(p,r);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:a[i],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){const r=zn(e,Sr);this.assignmentMap.set(e,{assignment:r,crossRef:r&&Kn(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,r,n,a,i){const o=this.current;let u;switch(i==="single"&&typeof n=="string"?u=this.linker.buildReference(o,r,a,n):i==="multi"&&typeof n=="string"?u=this.linker.buildMultiReference(o,r,a,n):u=n,e){case"=":{o[r]=u;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(u)}}assignWithoutOverride(e,r){for(const[a,i]of Object.entries(r)){const o=e[a];o===void 0?e[a]=i:Array.isArray(o)&&Array.isArray(i)&&(i.push(...o),e[a]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},s(Ko,"LangiumParser"),Ko),qo,oI=(qo=class{buildMismatchTokenMessage(e){return Ma.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Ma.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Ma.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Ma.buildEarlyExitMessage(e)}},s(qo,"AbstractParserErrorMessageProvider"),qo),Wo,Xg=(Wo=class extends oI{buildMismatchTokenMessage({expected:e,actual:r}){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 \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},s(Wo,"LangiumParserErrorMessageProvider"),Wo),Vo,lI=(Vo=class extends Yg{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.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,r){const n=this.wrapper.DEFINE_RULE(iI(e.name),this.startImplementation(r).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 r=>{const n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,a,i){this.before(a),this.wrapper.wrapSubrule(e,r,i),this.after(a)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},s(Vo,"LangiumCompletionParser"),Vo),Rj={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Xg},Ho,uI=(Ho=class extends ax{constructor(e,r){const n=r&&"maxLookahead"in r;super(e,{...Rj,lookaheadStrategy:n?new Cg({maxLookahead:r.maxLookahead}):new vj({logging:r.skipValidations?()=>{}:void 0}),...r})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r,n){return this.RULE(e,r,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r,void 0)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}rule(e){return e.call(this,{})}},s(Ho,"ChevrotainWrapper"),Ho),Yo,$j=(Yo=class extends uI{constructor(e,r,n){super(e,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,r,n){this.task.startSubTask(this.ruleName(r));try{return super.subrule(e,r,n)}finally{this.task.stopSubTask(this.ruleName(r))}}},s(Yo,"ProfilerWrapper"),Yo);function fd(t,e,r){return cI({parser:e,tokens:r,ruleNames:new Map},t),e}s(fd,"createParser");function cI(t,e){const r=Sf(e,!1),n=ue(e.rules).filter(ot).filter(i=>r.has(i));for(const i of n){const o={...t,consume:1,optional:1,subrule:1,many:1,or:1};t.parser.rule(i,Jr(o,i.definition))}const a=ue(e.rules).filter(qa).filter(i=>r.has(i));for(const i of a)t.parser.rule(i,fI(t,i))}s(cI,"buildRules");function fI(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(xt(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(m=>m.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},o={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},c={...i,$container:o};o.elements.push(l,c);const d=n.map(m=>t.tokens[m.value]).map((m,g)=>({ALT:s(()=>t.parser.consume(g,m,l),"ALT")}));let p;return m=>{p??(p=dd(t,r)),t.parser.subrule(0,p,!1,i,m),t.parser.many(0,{DEF:s(()=>{t.parser.alternatives(0,d),t.parser.subrule(1,p,!1,c,m)},"DEF")})}}s(fI,"buildInfixRule");function Jr(t,e,r=!1){let n;if(br(e))n=vI(t,e);else if(Vr(e))n=dI(t,e);else if(Sr(e))n=Jr(t,e.terminal);else if(Kn(e))n=Jg(t,e);else if(wr(e))n=pI(t,e);else if(yf(e))n=mI(t,e);else if($f(e))n=gI(t,e);else if(qn(e))n=yI(t,e);else if(em(e)){const a=t.consume++;n=s(()=>t.parser.consume(a,Yr,e),"method")}else throw new Ef(e.$cstNode,`Unexpected element type: ${e.$type}`);return Zg(t,r?void 0:ws(e),n,e.cardinality)}s(Jr,"buildElement");function dI(t,e){const r=Mn(e);return()=>t.parser.action(r,e)}s(dI,"buildAction");function pI(t,e){const r=e.rule.ref;if(Bn(r)){const n=t.subrule++,a=ot(r)&&r.fragment,i=e.arguments.length>0?hI(r,e.arguments):()=>({});let o;return u=>{o??(o=dd(t,r)),t.parser.subrule(n,o,a,e,i(u))}}else if(xt(r)){const n=t.consume++,a=af(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)Qr();else throw new Ef(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}s(pI,"buildRuleCall");function hI(t,e){if(e.some(n=>n.calledByName)){const n=e.map(a=>{var i,o;return{parameterName:(o=(i=a.parameter)==null?void 0:i.ref)==null?void 0:o.name,predicate:zt(a.value)}});return a=>{const i={};for(const{parameterName:o,predicate:u}of n)o&&(i[o]=u(a));return i}}else{const n=e.map(a=>zt(a.value));return a=>{const i={};for(let o=0;o<n.length;o++)if(o<t.parameters.length){const u=t.parameters[o].name,l=n[o];i[u]=l(a)}return i}}}s(hI,"buildRuleCallPredicate");function zt(t){if(Qh(t)){const e=zt(t.left),r=zt(t.right);return n=>e(n)||r(n)}else if(Zh(t)){const e=zt(t.left),r=zt(t.right);return n=>e(n)&&r(n)}else if(nm(t)){const e=zt(t.value);return r=>!e(r)}else if(am(t)){const e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(Xh(t)){const e=!!t.true;return()=>e}Qr()}s(zt,"buildPredicate");function mI(t,e){if(e.elements.length===1)return Jr(t,e.elements[0]);{const r=[];for(const a of e.elements){const i={ALT:Jr(t,a,!0)},o=ws(a);o&&(i.GATE=zt(o)),r.push(i)}const n=t.or++;return a=>t.parser.alternatives(n,r.map(i=>{const o={ALT:s(()=>i.ALT(a),"ALT")},u=i.GATE;return u&&(o.GATE=()=>u(a)),o}))}}s(mI,"buildAlternatives");function gI(t,e){if(e.elements.length===1)return Jr(t,e.elements[0]);const r=[];for(const u of e.elements){const l={ALT:Jr(t,u,!0)},c=ws(u);c&&(l.GATE=zt(c)),r.push(l)}const n=t.or++,a=s((u,l)=>{const c=l.getRuleStack().join("-");return`uGroup_${u}_${c}`},"idFunc"),i=s(u=>t.parser.alternatives(n,r.map((l,c)=>{const f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(l.ALT(u),!d.isRecording()){const m=a(n,d);d.unorderedGroups.get(m)||d.unorderedGroups.set(m,[]);const g=d.unorderedGroups.get(m);typeof(g==null?void 0:g[c])>"u"&&(g[c]=!0)}};const p=l.GATE;return p?f.GATE=()=>p(u):f.GATE=()=>{const m=d.unorderedGroups.get(a(n,d));return!(m!=null&&m[c])},f})),"alternatives"),o=Zg(t,ws(e),i,"*");return u=>{o(u),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}s(gI,"buildUnorderedGroup");function yI(t,e){const r=e.elements.map(n=>Jr(t,n));return n=>r.forEach(a=>a(n))}s(yI,"buildGroup");function ws(t){if(qn(t))return t.guardCondition}s(ws,"getGuardCondition");function Jg(t,e,r=e.terminal){if(r)if(wr(r)&&ot(r.rule.ref)){const n=r.rule.ref,a=t.subrule++;let i;return o=>{i??(i=dd(t,n)),t.parser.subrule(a,i,!1,e,o)}}else if(wr(r)&&xt(r.rule.ref)){const n=t.consume++,a=af(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(br(r)){const n=t.consume++,a=af(t,r.value);return()=>t.parser.consume(n,a,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=Nf(e.type.ref),a=n==null?void 0:n.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Mn(e.type.ref));return Jg(t,e,a)}}s(Jg,"buildCrossReference");function vI(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}s(vI,"buildKeyword");function Zg(t,e,r,n){const a=e&&zt(e);if(!n)if(a){const i=t.or++;return o=>t.parser.alternatives(i,[{ALT:s(()=>r(o),"ALT"),GATE:s(()=>a(o),"GATE")},{ALT:ph(),GATE:s(()=>!a(o),"GATE")}])}else return r;if(n==="*"){const i=t.many++;return o=>t.parser.many(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else if(n==="+"){const i=t.many++;if(a){const o=t.or++;return u=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(i,{DEF:s(()=>r(u),"DEF")}),"ALT"),GATE:s(()=>a(u),"GATE")},{ALT:ph(),GATE:s(()=>!a(u),"GATE")}])}else return o=>t.parser.atLeastOne(i,{DEF:s(()=>r(o),"DEF")})}else if(n==="?"){const i=t.optional++;return o=>t.parser.optional(i,{DEF:s(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else Qr()}s(Zg,"wrap");function dd(t,e){const r=TI(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}s(dd,"getRule");function TI(t,e){if(Bn(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,a=e.$type;for(;!ot(n);)(qn(n)||yf(n)||$f(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,t.ruleNames.set(e,a),a}}s(TI,"getRuleName");function af(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}s(af,"getToken");function Qg(t){const e=t.Grammar,r=t.parser.Lexer,n=new lI(t);return fd(e,n,r.definition),n.finalize(),n}s(Qg,"createCompletionParser");function ey(t){const e=ty(t);return e.finalize(),e}s(ey,"createLangiumParser");function ty(t){const e=t.Grammar,r=t.parser.Lexer,n=new sI(t);return fd(e,n,r.definition)}s(ty,"prepareLangiumParser");var Xo,pd=(Xo=class{constructor(){this.diagnostics=[]}buildTokens(e,r){const n=ue(Sf(e,!1)),a=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,a,r);return i.push(...a),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(xt).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){const r=$u(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,a={name:e.name,PATTERN:n};return typeof n=="function"&&(a.LINE_BREAKS=!0),e.hidden&&(a.GROUP=Cf(r)?st.SKIPPED:"hidden"),a}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const r=new RegExp(e,e.flags+"y");return(n,a)=>(r.lastIndex=a,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(Bn).flatMap(a=>Dr(a).filter(br)).distinct(a=>a.value).toArray().sort((a,i)=>i.value.length-a.value.length).map(a=>this.buildKeywordToken(a,r,!!(n!=null&&n.caseInsensitive)))}buildKeywordToken(e,r,n){const a=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:a,LONGER_ALT:this.findLongerAlt(e,r)};return typeof a=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,r){return r?new RegExp(ni(e.value),"i"):e.value}findLongerAlt(e,r){return r.reduce((n,a)=>{const i=a==null?void 0:a.PATTERN;return i!=null&&i.source&&Sm("^"+i.source+"$",e.value)&&n.push(a),n},[])}},s(Xo,"DefaultTokenBuilder"),Xo),Jo,ry=(Jo=class{convert(e,r){let n=r.grammarSource;if(Kn(n)&&(n=km(n)),wr(n)){const a=n.rule.ref;if(!a)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(a,e,r)}return e}runConverter(e,r,n){var a;switch(e.name.toUpperCase()){case"INT":return ar.convertInt(r);case"STRING":return ar.convertString(r);case"ID":return ar.convertID(r)}switch((a=jm(e))==null?void 0:a.toLowerCase()){case"number":return ar.convertNumber(r);case"boolean":return ar.convertBoolean(r);case"bigint":return ar.convertBigint(r);case"date":return ar.convertDate(r);default:return r}}},s(Jo,"DefaultValueConverter"),Jo),ar;(function(t){function e(c){let f="";for(let d=1;d<c.length-1;d++){const p=c.charAt(d);if(p==="\\"){const m=c.charAt(++d);f+=r(m)}else f+=p}return f}s(e,"convertString"),t.convertString=e;function r(c){switch(c){case"b":return"\b";case"f":return"\f";case"n":return`
149
+ `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return c}}s(r,"convertEscapeCharacter");function n(c){return c.charAt(0)==="^"?c.substring(1):c}s(n,"convertID"),t.convertID=n;function a(c){return parseInt(c)}s(a,"convertInt"),t.convertInt=a;function i(c){return BigInt(c)}s(i,"convertBigint"),t.convertBigint=i;function o(c){return new Date(c)}s(o,"convertDate"),t.convertDate=o;function u(c){return Number(c)}s(u,"convertNumber"),t.convertNumber=u;function l(c){return c.toLowerCase()==="true"}s(l,"convertBoolean"),t.convertBoolean=l})(ar||(ar={}));var $e={};df($e,jh(hf(),1));function hd(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}s(hd,"delayNextTick");var Tc=0,RI=10;function md(){return Tc=performance.now(),new $e.CancellationTokenSource}s(md,"startCancelableOperation");function ny(t){RI=t}s(ny,"setInterruptionPeriod");var or=Symbol("OperationCancelled");function sa(t){return t===or}s(sa,"isOperationCancelled");async function He(t){if(t===$e.CancellationToken.None)return;const e=performance.now();if(e-Tc>=RI&&(Tc=e,await hd(),Tc=performance.now()),t.isCancellationRequested)throw or}s(He,"interruptAndCheck");var Zo,Or=(Zo=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}},s(Zo,"Deferred"),Zo),Dn,Wv=(Dn=class{constructor(e,r,n,a){this._uri=e,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(const n of e)if(Dn.isIncremental(n)){const a=iy(n.range),i=this.offsetAt(a.start),o=this.offsetAt(a.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(o,this._content.length);const u=Math.max(a.start.line,0),l=Math.max(a.end.line,0);let c=this._lineOffsets;const f=$h(n.text,!1,i);if(l-u===f.length)for(let p=0,m=f.length;p<m;p++)c[p+u+1]=f[p];else f.length<1e4?c.splice(u+1,l-u,...f):this._lineOffsets=c=c.slice(0,u+1).concat(f,c.slice(l+1));const d=n.text.length-(o-i);if(d!==0)for(let p=u+1+f.length,m=c.length;p<m;p++)c[p]=c[p]+d}else if(Dn.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=$h(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const r=this.getLineOffsets();let n=0,a=r.length;if(a===0)return{line:0,character:e};for(;n<a;){const o=Math.floor((n+a)/2);r[o]>e?a=o:n=o+1}const i=n-1;return e=this.ensureBeforeEOL(e,r[i]),{line:i,character:e-r[i]}}offsetAt(e){const r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;const n=r[e.line];if(e.character<=0)return n;const a=e.line+1<r.length?r[e.line+1]:this._content.length,i=Math.min(n+e.character,a);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,r){for(;e>r&&ay(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},s(Dn,"FullTextDocument"),Dn),sf;(function(t){function e(a,i,o,u){return new Wv(a,i,o,u)}s(e,"create"),t.create=e;function r(a,i,o){if(a instanceof Wv)return a.update(i,o),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),t.update=r;function n(a,i){const o=a.getText(),u=of(i.map($I),(f,d)=>{const p=f.range.start.line-d.range.start.line;return p===0?f.range.start.character-d.range.start.character:p});let l=0;const c=[];for(const f of u){const d=a.offsetAt(f.range.start);if(d<l)throw new Error("Overlapping edit");d>l&&c.push(o.substring(l,d)),f.newText.length&&c.push(f.newText),l=a.offsetAt(f.range.end)}return c.push(o.substr(l)),c.join("")}s(n,"applyEdits"),t.applyEdits=n})(sf||(sf={}));function of(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);of(n,e),of(a,e);let i=0,o=0,u=0;for(;i<n.length&&o<a.length;)e(n[i],a[o])<=0?t[u++]=n[i++]:t[u++]=a[o++];for(;i<n.length;)t[u++]=n[i++];for(;o<a.length;)t[u++]=a[o++];return t}s(of,"mergeSort");function $h(t,e,r=0){const n=e?[r]:[];for(let a=0;a<t.length;a++){const i=t.charCodeAt(a);ay(i)&&(i===13&&a+1<t.length&&t.charCodeAt(a+1)===10&&a++,n.push(r+a+1))}return n}s($h,"computeLineOffsets");function ay(t){return t===13||t===10}s(ay,"isEOL");function iy(t){const e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}s(iy,"getWellformedRange");function $I(t){const e=iy(t.range);return e!==t.range?{newText:t.newText,range:e}:t}s($I,"getWellformedEdit");var AI;(()=>{var t={975:P=>{function S($){if(typeof $!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify($))}s(S,"e");function R($,A){for(var w,O="",M=0,L=-1,j=0,F=0;F<=$.length;++F){if(F<$.length)w=$.charCodeAt(F);else{if(w===47)break;w=47}if(w===47){if(!(L===F-1||j===1))if(L!==F-1&&j===2){if(O.length<2||M!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var re=O.lastIndexOf("/");if(re!==O.length-1){re===-1?(O="",M=0):M=(O=O.slice(0,re)).length-1-O.lastIndexOf("/"),L=F,j=0;continue}}else if(O.length===2||O.length===1){O="",M=0,L=F,j=0;continue}}A&&(O.length>0?O+="/..":O="..",M=2)}else O.length>0?O+="/"+$.slice(L+1,F):O=$.slice(L+1,F),M=F-L-1;L=F,j=0}else w===46&&j!==-1?++j:j=-1}return O}s(R,"r");var I={resolve:s(function(){for(var $,A="",w=!1,O=arguments.length-1;O>=-1&&!w;O--){var M;O>=0?M=arguments[O]:($===void 0&&($=process.cwd()),M=$),S(M),M.length!==0&&(A=M+"/"+A,w=M.charCodeAt(0)===47)}return A=R(A,!w),w?A.length>0?"/"+A:"/":A.length>0?A:"."},"resolve"),normalize:s(function($){if(S($),$.length===0)return".";var A=$.charCodeAt(0)===47,w=$.charCodeAt($.length-1)===47;return($=R($,!A)).length!==0||A||($="."),$.length>0&&w&&($+="/"),A?"/"+$:$},"normalize"),isAbsolute:s(function($){return S($),$.length>0&&$.charCodeAt(0)===47},"isAbsolute"),join:s(function(){if(arguments.length===0)return".";for(var $,A=0;A<arguments.length;++A){var w=arguments[A];S(w),w.length>0&&($===void 0?$=w:$+="/"+w)}return $===void 0?".":I.normalize($)},"join"),relative:s(function($,A){if(S($),S(A),$===A||($=I.resolve($))===(A=I.resolve(A)))return"";for(var w=1;w<$.length&&$.charCodeAt(w)===47;++w);for(var O=$.length,M=O-w,L=1;L<A.length&&A.charCodeAt(L)===47;++L);for(var j=A.length-L,F=M<j?M:j,re=-1,U=0;U<=F;++U){if(U===F){if(j>F){if(A.charCodeAt(L+U)===47)return A.slice(L+U+1);if(U===0)return A.slice(L+U)}else M>F&&($.charCodeAt(w+U)===47?re=U:U===0&&(re=0));break}var Q=$.charCodeAt(w+U);if(Q!==A.charCodeAt(L+U))break;Q===47&&(re=U)}var pe="";for(U=w+re+1;U<=O;++U)U!==O&&$.charCodeAt(U)!==47||(pe.length===0?pe+="..":pe+="/..");return pe.length>0?pe+A.slice(L+re):(L+=re,A.charCodeAt(L)===47&&++L,A.slice(L))},"relative"),_makeLong:s(function($){return $},"_makeLong"),dirname:s(function($){if(S($),$.length===0)return".";for(var A=$.charCodeAt(0),w=A===47,O=-1,M=!0,L=$.length-1;L>=1;--L)if((A=$.charCodeAt(L))===47){if(!M){O=L;break}}else M=!1;return O===-1?w?"/":".":w&&O===1?"//":$.slice(0,O)},"dirname"),basename:s(function($,A){if(A!==void 0&&typeof A!="string")throw new TypeError('"ext" argument must be a string');S($);var w,O=0,M=-1,L=!0;if(A!==void 0&&A.length>0&&A.length<=$.length){if(A.length===$.length&&A===$)return"";var j=A.length-1,F=-1;for(w=$.length-1;w>=0;--w){var re=$.charCodeAt(w);if(re===47){if(!L){O=w+1;break}}else F===-1&&(L=!1,F=w+1),j>=0&&(re===A.charCodeAt(j)?--j==-1&&(M=w):(j=-1,M=F))}return O===M?M=F:M===-1&&(M=$.length),$.slice(O,M)}for(w=$.length-1;w>=0;--w)if($.charCodeAt(w)===47){if(!L){O=w+1;break}}else M===-1&&(L=!1,M=w+1);return M===-1?"":$.slice(O,M)},"basename"),extname:s(function($){S($);for(var A=-1,w=0,O=-1,M=!0,L=0,j=$.length-1;j>=0;--j){var F=$.charCodeAt(j);if(F!==47)O===-1&&(M=!1,O=j+1),F===46?A===-1?A=j:L!==1&&(L=1):A!==-1&&(L=-1);else if(!M){w=j+1;break}}return A===-1||O===-1||L===0||L===1&&A===O-1&&A===w+1?"":$.slice(A,O)},"extname"),format:s(function($){if($===null||typeof $!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return function(A,w){var O=w.dir||w.root,M=w.base||(w.name||"")+(w.ext||"");return O?O===w.root?O+M:O+"/"+M:M}(0,$)},"format"),parse:s(function($){S($);var A={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return A;var w,O=$.charCodeAt(0),M=O===47;M?(A.root="/",w=1):w=0;for(var L=-1,j=0,F=-1,re=!0,U=$.length-1,Q=0;U>=w;--U)if((O=$.charCodeAt(U))!==47)F===-1&&(re=!1,F=U+1),O===46?L===-1?L=U:Q!==1&&(Q=1):L!==-1&&(Q=-1);else if(!re){j=U+1;break}return L===-1||F===-1||Q===0||Q===1&&L===F-1&&L===j+1?F!==-1&&(A.base=A.name=j===0&&M?$.slice(1,F):$.slice(j,F)):(j===0&&M?(A.name=$.slice(1,L),A.base=$.slice(1,F)):(A.name=$.slice(j,L),A.base=$.slice(j,F)),A.ext=$.slice(L,F)),j>0?A.dir=$.slice(0,j-1):M&&(A.dir="/"),A},"parse"),sep:"/",delimiter:":",win32:null,posix:null};I.posix=I,P.exports=I}},e={};function r(P){var S=e[P];if(S!==void 0)return S.exports;var R=e[P]={exports:{}};return t[P](R,R.exports,r),R.exports}s(r,"r"),r.d=(P,S)=>{for(var R in S)r.o(S,R)&&!r.o(P,R)&&Object.defineProperty(P,R,{enumerable:!0,get:S[R]})},r.o=(P,S)=>Object.prototype.hasOwnProperty.call(P,S),r.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:s(()=>p,"URI"),Utils:s(()=>Ie,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const i=/^\w[\w\d+.-]*$/,o=/^\//,u=/^\/\//;function l(P,S){if(!P.scheme&&S)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!i.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!o.test(P.path))throw new 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(u.test(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(l,"a");const c="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,oe=class oe{constructor(S,R,I,$,A,w=!1){jr(this,"scheme");jr(this,"authority");jr(this,"path");jr(this,"query");jr(this,"fragment");typeof S=="object"?(this.scheme=S.scheme||c,this.authority=S.authority||c,this.path=S.path||c,this.query=S.query||c,this.fragment=S.fragment||c):(this.scheme=function(O,M){return O||M?O:"file"}(S,w),this.authority=R||c,this.path=function(O,M){switch(O){case"https":case"http":case"file":M?M[0]!==f&&(M=f+M):M=f}return M}(this.scheme,I||c),this.query=$||c,this.fragment=A||c,l(this,w))}static isUri(S){return S instanceof oe||!!S&&typeof S.authority=="string"&&typeof S.fragment=="string"&&typeof S.path=="string"&&typeof S.query=="string"&&typeof S.scheme=="string"&&typeof S.fsPath=="string"&&typeof S.with=="function"&&typeof S.toString=="function"}get fsPath(){return b(this,!1)}with(S){if(!S)return this;let{scheme:R,authority:I,path:$,query:A,fragment:w}=S;return R===void 0?R=this.scheme:R===null&&(R=c),I===void 0?I=this.authority:I===null&&(I=c),$===void 0?$=this.path:$===null&&($=c),A===void 0?A=this.query:A===null&&(A=c),w===void 0?w=this.fragment:w===null&&(w=c),R===this.scheme&&I===this.authority&&$===this.path&&A===this.query&&w===this.fragment?this:new g(R,I,$,A,w)}static parse(S,R=!1){const I=d.exec(S);return I?new g(I[2]||c,te(I[4]||c),te(I[5]||c),te(I[7]||c),te(I[9]||c),R):new g(c,c,c,c,c)}static file(S){let R=c;if(a&&(S=S.replace(/\\/g,f)),S[0]===f&&S[1]===f){const I=S.indexOf(f,2);I===-1?(R=S.substring(2),S=f):(R=S.substring(2,I),S=S.substring(I)||f)}return new g("file",R,S,c,c)}static from(S){const R=new g(S.scheme,S.authority,S.path,S.query,S.fragment);return l(R,!0),R}toString(S=!1){return C(this,S)}toJSON(){return this}static revive(S){if(S){if(S instanceof oe)return S;{const R=new g(S);return R._formatted=S.external,R._fsPath=S._sep===m?S.fsPath:null,R}}return S}};s(oe,"l");let p=oe;const m=a?1:void 0,tt=class tt extends p{constructor(){super(...arguments);jr(this,"_formatted",null);jr(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(R=!1){return R?C(this,!0):(this._formatted||(this._formatted=C(this,!1)),this._formatted)}toJSON(){const R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=m),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}};s(tt,"d");let g=tt;const v={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 E(P,S,R){let I,$=-1;for(let A=0;A<P.length;A++){const w=P.charCodeAt(A);if(w>=97&&w<=122||w>=65&&w<=90||w>=48&&w<=57||w===45||w===46||w===95||w===126||S&&w===47||R&&w===91||R&&w===93||R&&w===58)$!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I!==void 0&&(I+=P.charAt(A));else{I===void 0&&(I=P.substr(0,A));const O=v[w];O!==void 0?($!==-1&&(I+=encodeURIComponent(P.substring($,A)),$=-1),I+=O):$===-1&&($=A)}}return $!==-1&&(I+=encodeURIComponent(P.substring($))),I!==void 0?I:P}s(E,"m");function T(P){let S;for(let R=0;R<P.length;R++){const I=P.charCodeAt(R);I===35||I===63?(S===void 0&&(S=P.substr(0,R)),S+=v[I]):S!==void 0&&(S+=P[R])}return S!==void 0?S:P}s(T,"y");function b(P,S){let R;return R=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?S?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(R=R.replace(/\//g,"\\")),R}s(b,"v");function C(P,S){const R=S?T:E;let I="",{scheme:$,authority:A,path:w,query:O,fragment:M}=P;if($&&(I+=$,I+=":"),(A||$==="file")&&(I+=f,I+=f),A){let L=A.indexOf("@");if(L!==-1){const j=A.substr(0,L);A=A.substr(L+1),L=j.lastIndexOf(":"),L===-1?I+=R(j,!1,!1):(I+=R(j.substr(0,L),!1,!1),I+=":",I+=R(j.substr(L+1),!1,!0)),I+="@"}A=A.toLowerCase(),L=A.lastIndexOf(":"),L===-1?I+=R(A,!1,!0):(I+=R(A.substr(0,L),!1,!0),I+=A.substr(L))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58){const L=w.charCodeAt(1);L>=65&&L<=90&&(w=`/${String.fromCharCode(L+32)}:${w.substr(3)}`)}else if(w.length>=2&&w.charCodeAt(1)===58){const L=w.charCodeAt(0);L>=65&&L<=90&&(w=`${String.fromCharCode(L+32)}:${w.substr(2)}`)}I+=R(w,!0,!1)}return O&&(I+="?",I+=R(O,!1,!1)),M&&(I+="#",I+=S?M:E(M,!1,!1)),I}s(C,"b");function k(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+k(P.substr(3)):P}}s(k,"C");const B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function te(P){return P.match(B)?P.replace(B,S=>k(S)):P}s(te,"w");var X=r(975);const de=X.posix||X,Ee="/";var Ie;(function(P){P.joinPath=function(S,...R){return S.with({path:de.join(S.path,...R)})},P.resolvePath=function(S,...R){let I=S.path,$=!1;I[0]!==Ee&&(I=Ee+I,$=!0);let A=de.resolve(I,...R);return $&&A[0]===Ee&&!S.authority&&(A=A.substring(1)),S.with({path:A})},P.dirname=function(S){if(S.path.length===0||S.path===Ee)return S;let R=de.dirname(S.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),S.with({path:R})},P.basename=function(S){return de.basename(S.path)},P.extname=function(S){return de.extname(S.path)}})(Ie||(Ie={})),AI=n})();var{URI:Rt,Utils:Pi}=AI,it;(function(t){t.basename=Pi.basename,t.dirname=Pi.dirname,t.extname=Pi.extname,t.joinPath=Pi.joinPath,t.resolvePath=Pi.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function r(o,u){return(o==null?void 0:o.toString())===(u==null?void 0:u.toString())}s(r,"equals"),t.equals=r;function n(o,u){const l=typeof o=="string"?Rt.parse(o).path:o.path,c=typeof u=="string"?Rt.parse(u).path:u.path,f=l.split("/").filter(v=>v.length>0),d=c.split("/").filter(v=>v.length>0);if(e){const v=/^[A-Z]:$/;if(f[0]&&v.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]&&v.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]!==d[0])return c.substring(1)}let p=0;for(;p<f.length&&f[p]===d[p];p++);const m="../".repeat(f.length-p),g=d.slice(p).join("/");return m+g}s(n,"relative"),t.relative=n;function a(o){return Rt.parse(o.toString()).toString()}s(a,"normalize"),t.normalize=a;function i(o,u){let l=typeof o=="string"?o:o.path,c=typeof u=="string"?u:u.path;return c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),c===l?!0:c.length<l.length||c.charAt(l.length)!=="/"?!1:c.startsWith(l)}s(i,"contains"),t.contains=i})(it||(it={}));var Qo,sy=(Qo=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return it.normalize(e)}clear(){this.root.children.clear()}insert(e,r){const n=this.getNode(this.normalizeUri(e),!0);n.element=r}delete(e){const r=this.getNode(this.normalizeUri(e),!1);r!=null&&r.parent&&r.parent.children.delete(r.name)}has(e){var r;return((r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element)!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){var r;return(r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element}findNode(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);if(n)return{name:n.name,uri:it.joinPath(Rt.parse(r),n.name).toString(),element:n.element}}findChildren(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);return n?Array.from(n.children.values()).map(a=>({name:a.name,uri:it.joinPath(Rt.parse(r),a.name).toString(),element:a.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const r=this.getNode(it.normalize(e),!1);return r?this.collectValues(r):[]}getNode(e,r){const n=e.split("/");e.charAt(e.length-1)==="/"&&n.pop();let a=this.root;for(const i of n){let o=a.children.get(i);if(!o)if(r)o={name:i,children:new Map,parent:a},a.children.set(i,o);else return;a=o}return a}collectValues(e){const r=[];e.element&&r.push(e.element);for(const n of e.children.values())r.push(...this.collectValues(n));return r}},s(Qo,"UriTrie"),Qo),Z;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(Z||(Z={}));var el,EI=(el=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=$e.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,r)}fromTextDocument(e,r,n){return r=r??Rt.parse(e.uri),$e.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return $e.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){const a=this.parse(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else if("$model"in r){const a={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(a,e)}else{const a=this.parse(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}async createAsync(e,r,n){if(typeof r=="string"){const a=await this.parseAsync(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else{const a=await this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}createLangiumDocument(e,r,n,a){let i;if(n)i={parseResult:e,uri:r,state:Z.Parsed,references:[],textDocument:n};else{const o=this.createTextDocumentGetter(r,a);i={parseResult:e,uri:r,state:Z.Parsed,references:[],get textDocument(){return o()}}}return e.value.$document=i,i}async update(e,r){var o,u;const n=(o=e.parseResult.value.$cstNode)==null?void 0:o.root.fullText,a=(u=this.textDocuments)==null?void 0:u.get(e.uri.toString()),i=a?a.getText():await this.fileSystemProvider.readFile(e.uri);if(a)Object.defineProperty(e,"textDocument",{value:a});else{const l=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:l})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,r),e.parseResult.value.$document=e),e.state=Z.Parsed,e}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){const n=this.serviceRegistry;let a;return()=>a??(a=sf.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},s(el,"DefaultLangiumDocumentFactory"),el),tl,_I=(tl=class{constructor(e){this.documentTrie=new sy,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ue(this.documentTrie.all())}addDocument(e){const r=e.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,e)}getDocument(e){const r=e.toString();return this.documentTrie.find(r)}getDocuments(e){const r=e.toString();return this.documentTrie.findAll(r)}async getOrCreateDocument(e,r){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(a=>(this.addDocument(a),a));{const a=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(a),a}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&this.documentBuilder().resetToState(n,Z.Changed),n}deleteDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&(n.state=Z.Changed,this.documentTrie.delete(r)),n}deleteDocuments(e){const r=e.toString(),n=this.documentTrie.findAll(r);for(const a of n)a.state=Z.Changed;return this.documentTrie.delete(r),n}},s(tl,"DefaultLangiumDocuments"),tl),hn=Symbol("RefResolving"),rl,CI=(rl=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,r=$e.CancellationToken.None){var n;if((n=this.profiler)!=null&&n.isActive("linking")){const a=this.profiler.createTask("linking",this.languageId);a.start();try{for(const i of Kt(e.parseResult.value))await He(r),Ka(i).forEach(o=>{const u=`${i.$type}:${o.property}`;a.startSubTask(u);try{this.doLink(o,e)}finally{a.stopSubTask(u)}})}finally{a.stop()}}else for(const a of Kt(e.parseResult.value))await He(r),Ka(a).forEach(i=>this.doLink(i,e))}doLink(e,r){const n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=hn;try{const a=this.getCandidate(e);if(yn(a))n._ref=a;else{n._nodeDescription=a;const i=this.loadAstNode(a);n._ref=i??this.createLinkingError(e,a)}}catch(a){console.error(`An error occurred while resolving reference to '${n.$refText}':`,a);const i=a.message??String(a);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${i}`}}r.references.push(n)}else if("_items"in n&&n._items===void 0){n._items=hn;try{const a=this.getCandidates(e),i=[];if(yn(a))n._linkingError=a;else for(const o of a){const u=this.loadAstNode(o);u&&i.push({ref:u,$nodeDescription:o})}n._items=i}catch(a){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${a}`},n._items=[]}r.references.push(n)}}unlink(e){for(const r of e.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const n=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(a=>`${a.documentUri}#${a.path}`).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,r,n,a){const i=this,o={$refNode:n,$refText:a,_ref:void 0,get ref(){if(ze(this._ref))return this._ref;if(Kh(this._nodeDescription)){const u=i.loadAstNode(this._nodeDescription);this._ref=u??i.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=hn;const u=xa(e).$document,l=i.getLinkedNode({reference:o,container:e,property:r});if(l.error&&u&&u.state<Z.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,u==null||u.references.push(this)}else this._ref===hn&&i.throwCyclicReferenceError(e,r,a);return ze(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return yn(this._ref)?this._ref:void 0}};return o}buildMultiReference(e,r,n,a){const i=this,o={$refNode:n,$refText:a,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=hn;const u=xa(e).$document,l=i.getCandidates({reference:o,container:e,property:r}),c=[];if(yn(l))this._linkingError=l;else for(const f of l){const d=i.loadAstNode(f);d&&c.push({ref:d,$nodeDescription:f})}this._items=c,u==null||u.references.push(this)}else this._items===hn&&i.throwCyclicReferenceError(e,r,a);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:o,container:e,property:r})}};return o}throwCyclicReferenceError(e,r,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${n}')`)}getLinkedNode(e){try{const r=this.getCandidate(e);if(yn(r))return{error:r};const n=this.loadAstNode(r);return n?{node:n,descr:r}:{descr:r,error:this.createLinkingError(e,r)}}catch(r){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,r);const n=r.message??String(r);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){const n=xa(e.container).$document;n&&n.state<Z.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);const a=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${a} named '${e.reference.$refText}'.`,targetDescription:r}}},s(rl,"DefaultLinker"),rl);function oy(t){return typeof t.name=="string"}s(oy,"isNamed");var nl,SI=(nl=class{getName(e){if(oy(e))return e.name}getNameNode(e){return bf(e.$cstNode,"name")}},s(nl,"DefaultNameProvider"),nl),al,bI=(al=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=Kt(e.Grammar).some(r=>Kn(r)&&r.isMulti)}findDeclarations(e){if(e){const r=Dm(e),n=e.astNode;if(r&&n){const a=n[r.feature];if(at(a)||lr(a))return _c(a);if(Array.isArray(a)){for(const i of a)if((at(i)||lr(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return _c(i)}}if(n){const a=this.nameProvider.getNameNode(n);if(a&&(a===e||hm(e,a)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(r.head());if(n){for(const a of Ka(n))if(lr(a.reference)&&a.reference.items.some(i=>i.ref===e))return a.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const r=this.documents.getDocument(e.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,e.sourcePath)}findDeclarationNodes(e){const r=this.findDeclarations(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a)??a.$cstNode;i&&n.push(i)}return n}findReferences(e,r){const n=[];r.includeDeclaration&&n.push(...this.getSelfReferences(e));let a=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(a=a.filter(i=>it.equals(i.sourceUri,r.documentUri))),n.push(...a),ue(n)}getSelfReferences(e){const r=this.getSelfNodes(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a);if(i){const o=Bt(a),u=this.nodeLocator.getAstNodePath(a);n.push({sourceUri:o.uri,sourcePath:u,targetUri:o.uri,targetPath:u,segment:Va(i),local:!0})}}return n}},s(al,"DefaultReferences"),al),il,Lr=(il=class{constructor(e){if(this.map=new Map,e)for(const[r,n]of e)this.add(r,n)}get size(){return ps.sum(ue(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{const n=this.map.get(e);if(n){const a=n.indexOf(r);if(a>=0)return n.length===1?this.map.delete(e):n.splice(a,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const r=this.map.get(e);return r?ue(r):Ua}has(e,r){if(r===void 0)return this.map.has(e);{const n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(a=>e(a,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ue(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return ue(this.map.keys())}values(){return ue(this.map.values()).flat()}entriesGroupedByKey(){return ue(this.map.entries())}},s(il,"MultiMap"),il),sl,lf=(sl=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}},s(sl,"BiMap"),sl),ol,wI=(ol=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,r=$e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)}async collectExportedSymbolsForNode(e,r,n=yu,a=$e.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,r);for(const o of n(e))await He(a),this.addExportedSymbol(o,i,r);return i}addExportedSymbol(e,r,n){const a=this.nameProvider.getName(e);a&&r.push(this.descriptions.createDescription(e,a,n))}async collectLocalSymbols(e,r=$e.CancellationToken.None){const n=e.parseResult.value,a=new Lr;for(const i of Dr(n))await He(r),this.addLocalSymbol(i,e,a);return a}addLocalSymbol(e,r,n){const a=e.$container;if(a){const i=this.nameProvider.getName(e);i&&n.add(a,this.descriptions.createDescription(e,i,r))}}},s(ol,"DefaultScopeComputation"),ol),ll,Ah=(ll=class{constructor(e,r,n){this.elements=e,this.outerScope=r,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(a=>a.name.toLowerCase()===r):this.elements.find(a=>a.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(a=>a.name.toLowerCase()===r):this.elements.filter(a=>a.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},s(ll,"StreamScope"),ll),ul,Aj=(ul=class{constructor(e,r,n){this.elements=new Map,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.set(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r),a=n?[n]:[];return(this.concatOuterScope||a.length>0)&&this.outerScope?ue(a).concat(this.outerScope.getElements(e)):ue(a)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s(ul,"MapScope"),ul),cl,II=(cl=class{constructor(e,r,n){this.elements=new Lr,this.caseInsensitive=(n==null?void 0:n.caseInsensitive)??!1,this.concatOuterScope=(n==null?void 0:n.concatOuterScope)??!0;for(const a of e){const i=this.caseInsensitive?a.name.toLowerCase():a.name;this.elements.add(i,a)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);return(this.concatOuterScope||n.length===0)&&this.outerScope?ue(n).concat(this.outerScope.getElements(e)):ue(n)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},s(cl,"MultiMapScope"),cl),Ej={getElement(){},getElements(){return Ua},getAllElements(){return Ua}},fl,gd=(fl=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},s(fl,"DisposableCache"),fl),dl,ly=(dl=class extends gd{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){const n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},s(dl,"SimpleCache"),dl),pl,yd=(pl=class extends gd{constructor(e){super(),this.cache=new Map,this.converter=e??(r=>r)}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();const a=this.cacheForContext(e);if(a.has(r))return a.get(r);if(n){const i=n();return a.set(r,i),i}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){const r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){const r=this.converter(e);let n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},s(pl,"ContextCache"),pl),hl,NI=(hl=class extends yd{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{for(const i of a)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{const i=n.concat(a);for(const o of i)this.clear(o)}))}},s(hl,"DocumentCache"),hl),ml,uy=(ml=class extends ly{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{a.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},s(ml,"WorkspaceCache"),ml),gl,kI=(gl=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new uy(e.shared)}getScope(e){const r=[],n=this.reflection.getReferenceType(e),a=Bt(e.container).localSymbols;if(a){let o=e.container;do a.has(o)&&r.push(a.getStream(o).filter(u=>this.reflection.isSubtype(u.type,n))),o=o.$container;while(o)}let i=this.getGlobalScope(n,e);for(let o=r.length-1;o>=0;o--)i=this.createScope(r[o],i);return i}createScope(e,r,n){return new Ah(ue(e),r,n)}createScopeForNodes(e,r,n){const a=ue(e).map(i=>{const o=this.nameProvider.getName(i);if(o)return this.descriptions.createDescription(i,o)}).nonNullable();return new Ah(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new II(this.indexManager.allElements(e)))}},s(gl,"DefaultScopeProvider"),gl);function cy(t){return typeof t.$comment=="string"}s(cy,"isAstNodeWithComment");function Eh(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}s(Eh,"isIntermediateReference");var yl,PI=(yl=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){const n=r??{},a=r==null?void 0:r.replacer,i=s((u,l)=>this.replacer(u,l,n),"defaultReplacer"),o=a?(u,l)=>a(u,l,i):i;try{return this.currentDocument=Bt(e),JSON.stringify(e,o,r==null?void 0:r.space)}finally{this.currentDocument=void 0}}deserialize(e,r){const n=r??{},a=JSON.parse(e);return this.linkNode(a,a,n),a}replacer(e,r,{refText:n,sourceText:a,textRegions:i,comments:o,uriConverter:u}){var l,c,f;if(!this.ignoreProperties.has(e))if(at(r)){const d=r.ref,p=n?r.$refText:void 0;if(d){const m=Bt(d);let g="";this.currentDocument&&this.currentDocument!==m&&(u?g=u(m.uri,d):g=m.uri.toString());const v=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${v}`,$refText:p}}else return{$error:((l=r.error)==null?void 0:l.message)??"Could not resolve reference",$refText:p}}else if(lr(r)){const d=n?r.$refText:void 0,p=[];for(const m of r.items){const g=m.ref,v=Bt(m.ref);let E="";this.currentDocument&&this.currentDocument!==v&&(u?E=u(v.uri,g):E=v.uri.toString());const T=this.astNodeLocator.getAstNodePath(g);p.push(`${E}#${T}`)}return{$refs:p,$refText:d}}else if(ze(r)){let d;if(i&&(d=this.addAstNodeRegionWithAssignmentsTo({...r}),(!e||r.$document)&&(d!=null&&d.$textRegion)&&(d.$textRegion.documentURI=(c=this.currentDocument)==null?void 0:c.uri.toString())),a&&!e&&(d??(d={...r}),d.$sourceText=(f=r.$cstNode)==null?void 0:f.text),o){d??(d={...r});const p=this.commentProvider.getComment(r);p&&(d.$comment=p.replace(/\r/g,""))}return d??r}else return r}addAstNodeRegionWithAssignmentsTo(e){const r=s(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){const n=e.$textRegion=r(e.$cstNode),a=n.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{const o=Om(e.$cstNode,i).map(r);o.length!==0&&(a[i]=o)}),e}}linkNode(e,r,n,a,i,o){for(const[l,c]of Object.entries(e))if(Array.isArray(c))for(let f=0;f<c.length;f++){const d=c[f];Eh(d)?c[f]=this.reviveReference(e,l,r,d,n):ze(d)&&this.linkNode(d,r,n,e,l,f)}else Eh(c)?e[l]=this.reviveReference(e,l,r,c,n):ze(c)&&this.linkNode(c,r,n,e,l);const u=e;u.$container=a,u.$containerProperty=i,u.$containerIndex=o}reviveReference(e,r,n,a,i){let o=a.$refText,u=a.$error,l;if(a.$ref){const c=this.getRefNode(n,a.$ref,i.uriConverter);if(ze(c))return o||(o=this.nameProvider.getName(c)),{$refText:o??"",ref:c};u=c}else if(a.$refs){const c=[];for(const f of a.$refs){const d=this.getRefNode(n,f,i.uriConverter);ze(d)&&c.push({ref:d})}if(c.length===0)l={$refText:o??"",items:c},u??(u="Could not resolve multi-reference");else return{$refText:o??"",items:c}}if(u)return l??(l={$refText:o??"",ref:void 0}),l.error={info:{container:e,property:r,reference:l},message:u},l}getRefNode(e,r,n){try{const a=r.indexOf("#");if(a===0){const l=this.astNodeLocator.getAstNode(e,r.substring(1));return l||"Could not resolve path: "+r}if(a<0){const l=n?n(r):Rt.parse(r),c=this.langiumDocuments.getDocument(l);return c?c.parseResult.value:"Could not find document for URI: "+r}const i=n?n(r.substring(0,a)):Rt.parse(r.substring(0,a)),o=this.langiumDocuments.getDocument(i);if(!o)return"Could not find document for URI: "+r;if(a===r.length-1)return o.parseResult.value;const u=this.astNodeLocator.getAstNode(o.parseResult.value,r.substring(a+1));return u||"Could not resolve URI: "+r}catch(a){return String(a)}}},s(yl,"DefaultJsonSerializer"),yl),vl,OI=(vl=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e==null?void 0:e.workspace.TextDocuments}register(e){const r=e.LanguageMetaData;for(const n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);if(r.fileNames)for(const n of r.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(r.languageId,e)}getServices(e){var o,u;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const r=(u=(o=this.textDocuments)==null?void 0:o.get(e))==null?void 0:u.languageId;if(r!==void 0){const l=this.languageIdMap.get(r);if(l)return l}const n=it.extname(e),a=it.basename(e),i=this.fileNameMap.get(a)??this.fileExtensionMap.get(n);if(!i)throw r?new Error(`The service registry contains no services for the extension '${n}' for language '${r}'.`):new Error(`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())}},s(vl,"DefaultServiceRegistry"),vl);function kn(t){return{code:t}}s(kn,"diagnosticData");var uf;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(uf||(uf={}));var Tl,LI=(Tl=class{constructor(e){this.entries=new Lr,this.knownCategories=new Set(uf.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[a,i]of Object.entries(e)){const o=i;if(Array.isArray(o))for(const u of o){const l={check:this.wrapValidationException(u,r),category:n};this.addEntry(a,l)}else if(typeof o=="function"){const u={check:this.wrapValidationException(o,r),category:n};this.addEntry(a,u)}else Qr()}}wrapValidationException(e,r){return async(n,a,i)=>{await this.handleException(()=>e.call(r,n,a,i),"An error occurred during validation",a,n)}}async handleException(e,r,n,a){try{await e()}catch(i){if(sa(i))throw i;console.error(`${r}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);const o=i instanceof Error?i.message:String(i);n("error",`${r}: ${o}`,{node:a})}}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=ue(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(a=>r.includes(a.category))),n.map(a=>a.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return async(a,i,o,u)=>{await this.handleException(()=>e.call(n,a,i,o,u),r,i,a)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},s(Tl,"ValidationRegistry"),Tl),DI=Object.freeze({validateNode:!0,validateChildren:!0}),Rl,MI=(Rl=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,r={},n=$e.CancellationToken.None){const a=e.parseResult,i=[];if(await He(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(a,i,r),r.stopAfterLexingErrors&&i.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===Ot.LexingError})||(this.processParsingErrors(a,i,r),r.stopAfterParsingErrors&&i.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===Ot.ParsingError}))||(this.processLinkingErrors(e,i,r),r.stopAfterLinkingErrors&&i.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===Ot.LinkingError}))))return i;try{i.push(...await this.validateAst(a.value,r,n))}catch(o){if(sa(o))throw o;console.error("An error occurred during validation:",o)}return await He(n),i}processLexingErrors(e,r,n){var i;const a=[...e.lexerErrors,...((i=e.lexerReport)==null?void 0:i.diagnostics)??[]];for(const o of a){const u=o.severity??"error",l={severity:fs(u),range:{start:{line:o.line-1,character:o.column-1},end:{line:o.line-1,character:o.column+o.length-1}},message:o.message,data:dy(u),source:this.getSource()};r.push(l)}}processParsingErrors(e,r,n){for(const a of e.parserErrors){let i;if(isNaN(a.token.startOffset)){if("previousToken"in a){const o=a.previousToken;if(isNaN(o.startOffset)){const u={line:0,character:0};i={start:u,end:u}}else{const u={line:o.endLine-1,character:o.endColumn};i={start:u,end:u}}}}else i=hs(a.token);if(i){const o={severity:fs("error"),range:i,message:a.message,data:kn(Ot.ParsingError),source:this.getSource()};r.push(o)}}}processLinkingErrors(e,r,n){var a;for(const i of e.references){const o=i.error;if(o){const u={node:o.info.container,range:(a=i.$refNode)==null?void 0:a.range,property:o.info.property,index:o.info.index,data:{code:Ot.LinkingError,containerType:o.info.container.$type,property:o.info.property,refText:o.info.reference.$refText}};r.push(this.toDiagnostic("error",o.message,u))}}}async validateAst(e,r,n=$e.CancellationToken.None){const a=[],i=s((o,u,l)=>{a.push(this.toDiagnostic(o,u,l))},"acceptor");return await this.validateAstBefore(e,r,i,n),await this.validateAstNodes(e,r,i,n),await this.validateAstAfter(e,r,i,n),a}async validateAstBefore(e,r,n,a=$e.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const o of i)await He(a),await o(e,n,r.categories??[],a)}async validateAstNodes(e,r,n,a=$e.CancellationToken.None){var i;if((i=this.profiler)!=null&&i.isActive("validating")){const o=this.profiler.createTask("validating",this.languageId);o.start();try{const u=Kt(e).iterator();for(const l of u){o.startSubTask(l.$type);const c=this.validateSingleNodeOptions(l,r);if(c.validateNode)try{const f=this.validationRegistry.getChecks(l.$type,r.categories);for(const d of f)await d(l,n,a)}finally{o.stopSubTask(l.$type)}c.validateChildren||u.prune()}}finally{o.stop()}}else{const o=Kt(e).iterator();for(const u of o){await He(a);const l=this.validateSingleNodeOptions(u,r);if(l.validateNode){const c=this.validationRegistry.getChecks(u.$type,r.categories);for(const f of c)await f(u,n,a)}l.validateChildren||o.prune()}}}validateSingleNodeOptions(e,r){return DI}async validateAstAfter(e,r,n,a=$e.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const o of i)await He(a),await o(e,n,r.categories??[],a)}toDiagnostic(e,r,n){return{message:r,range:fy(n),severity:fs(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},s(Rl,"DefaultDocumentValidator"),Rl);function fy(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=bf(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Lm(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}s(fy,"getDiagnosticRange");function fs(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}s(fs,"toDiagnosticSeverity");function dy(t){switch(t){case"error":return kn(Ot.LexingError);case"warning":return kn(Ot.LexingWarning);case"info":return kn(Ot.LexingInfo);case"hint":return kn(Ot.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}s(dy,"toDiagnosticData");var Ot;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Ot||(Ot={}));var $l,xI=($l=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){const a=n??Bt(e);r??(r=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let o;const u=s(()=>o??(o=Va(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return u()},selectionSegment:Va(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},s($l,"DefaultAstNodeDescriptionProvider"),$l),Al,FI=(Al=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=$e.CancellationToken.None){const n=[],a=e.parseResult.value;for(const i of Kt(a))await He(r),Ka(i).forEach(o=>{o.reference.error||n.push(...this.createInfoDescriptions(o))});return n}createInfoDescriptions(e){const r=e.reference;if(r.error||!r.$refNode)return[];let n=[];at(r)&&r.$nodeDescription?n=[r.$nodeDescription]:lr(r)&&(n=r.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));const a=Bt(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),o=[],u=Va(r.$refNode);for(const l of n)o.push({sourceUri:a,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:u,local:it.equals(l.documentUri,a)});return o}},s(Al,"DefaultReferenceDescriptionProvider"),Al),El,GI=(El=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((a,i)=>{if(!a||i.length===0)return a;const o=i.indexOf(this.indexSeparator);if(o>0){const u=i.substring(0,o),l=parseInt(i.substring(o+1)),c=a[u];return c==null?void 0:c[l]}return a[i]},e)}},s(El,"DefaultAstNodeLocator"),El),vd={};df(vd,jh(ti(),1));var _l,jI=(_l=class{constructor(e){this._ready=new Or,this.onConfigurationSectionUpdateEmitter=new vd.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r;this.workspaceConfig=((r=e.capabilities.workspace)==null?void 0:r.configuration)??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const r=this.serviceRegistry.all.map(a=>({section:this.toSectionName(a.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(r);r.forEach((a,i)=>{this.updateSectionConfiguration(a.section,n[i])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([r,n])=>{this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}async getConfiguration(e,r){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},s(_l,"DefaultConfigurationProvider"),_l),zu=jh(QN(),1),Ln;(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(Ln||(Ln={}));var Cl,UI=(Cl=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Lr,this.documentPhaseListeners=new Lr,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Z.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},n=$e.CancellationToken.None){var a;for(const i of e){const o=i.uri.toString();if(i.state===Z.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(i,Z.IndexedReferences);else if(typeof r.validation=="object"){const u=this.findMissingValidationCategories(i,r);u.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:u}},result:(a=this.buildState.get(o))==null?void 0:a.result}),i.state=Z.IndexedReferences)}}else this.buildState.delete(o)}this.currentState=Z.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,r,n)}async update(e,r,n=$e.CancellationToken.None){this.currentState=Z.Changed;const a=[];for(const l of r){const c=this.langiumDocuments.deleteDocuments(l);for(const f of c)a.push(f.uri),this.cleanUpDeleted(f)}const i=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(const l of i){let c=this.langiumDocuments.getDocument(l);c===void 0&&(c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),c.state=Z.Changed,this.langiumDocuments.addDocument(c)),this.resetToState(c,Z.Changed)}const o=ue(i).concat(a).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!o.has(l.uri.toString())&&this.shouldRelink(l,o)).forEach(l=>this.resetToState(l,Z.ComputedScopes)),await this.emitUpdate(i,a),await He(n);const u=this.sortDocuments(this.langiumDocuments.all.filter(l=>{var c;return l.state<Z.Validated||!((c=this.buildState.get(l.uri.toString()))!=null&&c.completed)||this.resultsAreIncomplete(l,this.updateBuildOptions)}).toArray());await this.buildDocuments(u,this.updateBuildOptions,n)}resultsAreIncomplete(e,r){return this.findMissingValidationCategories(e,r).length>=1}findMissingValidationCategories(e,r){var u,l;const n=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=(u=n==null?void 0:n.result)!=null&&u.validationChecks?new Set((l=n==null?void 0:n.result)==null?void 0:l.validationChecks):n!=null&&n.completed?a:new Set,o=r===void 0||r.validation===!0?a:typeof r.validation=="object"?r.validation.categories??a:[];return ue(o).filter(c=>!i.has(c)).toArray()}async findChangedUris(e){var n;if(this.langiumDocuments.getDocument(e)??((n=this.textDocuments)==null?void 0:n.get(e)))return[e];try{const a=await this.fileSystemProvider.stat(e);if(a.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(a))return[e]}catch{}return[]}async emitUpdate(e,r){await Promise.all(this.updateListeners.map(n=>n(e,r)))}sortDocuments(e){let r=0,n=e.length-1;for(;r<n;){for(;r<e.length&&this.hasTextDocument(e[r]);)r++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;r<n&&([e[r],e[n]]=[e[n],e[r]])}return e}hasTextDocument(e){var r;return!!((r=this.textDocuments)!=null&&r.get(e.uri))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),Ln.create(()=>{const r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}resetToState(e,r){switch(r){case Z.Changed:case Z.Parsed:this.indexManager.removeContent(e.uri);case Z.IndexedContent:e.localSymbols=void 0;case Z.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Z.Linked:this.indexManager.removeReferences(e.uri);case Z.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Z.Validated:}e.state>r&&(e.state=r)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Z.Changed}async buildDocuments(e,r,n){this.prepareBuild(e,r),await this.runCancelable(e,Z.Parsed,n,o=>this.langiumDocumentFactory.update(o,n)),await this.runCancelable(e,Z.IndexedContent,n,o=>this.indexManager.updateContent(o,n)),await this.runCancelable(e,Z.ComputedScopes,n,async o=>{const u=this.serviceRegistry.getServices(o.uri).references.ScopeComputation;o.localSymbols=await u.collectLocalSymbols(o,n)});const a=e.filter(o=>this.shouldLink(o));await this.runCancelable(a,Z.Linked,n,o=>this.serviceRegistry.getServices(o.uri).references.Linker.link(o,n)),await this.runCancelable(a,Z.IndexedReferences,n,o=>this.indexManager.updateReferences(o,n));const i=e.filter(o=>this.shouldValidate(o)?!0:(this.markAsCompleted(o),!1));await this.runCancelable(i,Z.Validated,n,async o=>{await this.validate(o,n),this.markAsCompleted(o)})}markAsCompleted(e){const r=this.buildState.get(e.uri.toString());r&&(r.completed=!0)}prepareBuild(e,r){for(const n of e){const a=n.uri.toString(),i=this.buildState.get(a);(!i||i.completed)&&this.buildState.set(a,{completed:!1,options:r,result:i==null?void 0:i.result})}}async runCancelable(e,r,n,a){for(const o of e)o.state<r&&(await He(n),await a(o),o.state=r,await this.notifyDocumentPhase(o,r,n));const i=e.filter(o=>o.state===r);await this.notifyBuildPhase(i,r,n),this.currentState=r}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),Ln.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Ln.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;return r&&"path"in r?a=r:n=r,n??(n=$e.CancellationToken.None),a?this.awaitDocumentState(e,a,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,r,n){const a=this.langiumDocuments.getDocument(r);if(a){if(a.state>=e)return Promise.resolve(r);if(n.isCancellationRequested)return Promise.reject(or);if(this.currentState>=e&&e>a.state)return Promise.reject(new zu.ResponseError(zu.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${Z[a.state]}, requiring ${Z[e]}, but workspace state is already ${Z[this.currentState]}. Returning undefined.`))}else return Promise.reject(new zu.ResponseError(zu.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((i,o)=>{const u=this.onDocumentPhase(e,c=>{it.equals(c.uri,r)&&(u.dispose(),l.dispose(),i(c.uri))}),l=n.onCancellationRequested(()=>{u.dispose(),l.dispose(),o(or)})})}awaitBuilderState(e,r){return this.currentState>=e?Promise.resolve():r.isCancellationRequested?Promise.reject(or):new Promise((n,a)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),o.dispose(),n()}),o=r.onCancellationRequested(()=>{i.dispose(),o.dispose(),a(or)})})}async notifyDocumentPhase(e,r,n){const i=this.documentPhaseListeners.get(r).slice();for(const o of i)try{await He(n),await o(e,n)}catch(u){if(!sa(u))throw u}}async notifyBuildPhase(e,r,n){if(e.length===0)return;const i=this.buildPhaseListeners.get(r).slice();for(const o of i)await He(n),await o(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,r){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e),i=typeof a.validation=="object"?{...a.validation}:{};i.categories=this.findMissingValidationCategories(e,a);const o=await n.validateDocument(e,i,r);e.diagnostics?e.diagnostics.push(...o):e.diagnostics=o;const u=this.buildState.get(e.uri.toString());u&&(u.result??(u.result={}),u.result.validationChecks?u.result.validationChecks=ue(u.result.validationChecks).concat(i.categories).distinct().toArray():u.result.validationChecks=[...i.categories])}getBuildOptions(e){var r;return((r=this.buildState.get(e.uri.toString()))==null?void 0:r.options)??{}}},s(Cl,"DefaultDocumentBuilder"),Cl),Sl,zI=(Sl=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new yd,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){const n=Bt(e).uri,a=[];return this.referenceIndex.forEach(i=>{i.forEach(o=>{it.equals(o.targetUri,n)&&o.targetPath===r&&a.push(o)})}),ue(a)}allElements(e,r){let n=ue(this.symbolIndex.keys());return r&&(n=n.filter(a=>!r||r.has(a))),n.map(a=>this.getFileDescriptions(a,e)).flat()}getFileDescriptions(e,r){return r?this.symbolByTypeIndex.get(e,r,()=>(this.symbolIndex.get(e)??[]).filter(i=>this.astReflection.isSubtype(i.type,r))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(e){const r=e.toString();this.referenceIndex.delete(r)}async updateContent(e,r=$e.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,r),i=e.uri.toString();this.symbolIndex.set(i,a),this.symbolByTypeIndex.clear(i)}async updateReferences(e,r=$e.CancellationToken.None){const a=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),a)}isAffected(e,r){const n=this.referenceIndex.get(e.uri.toString());return n?n.some(a=>!a.local&&r.has(a.targetUri.toString())):!1}},s(Sl,"DefaultIndexManager"),Sl),bl,BI=(bl=class{constructor(e){this.initialBuildOptions={},this._ready=new Or,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(r=>this.initializeWorkspace(this.folders??[],r))}async initializeWorkspace(e,r=$e.CancellationToken.None){const n=await this.performStartup(e);await He(r),await this.documentBuilder.build(n,this.initialBuildOptions,r)}async performStartup(e){const r=[],n=s(o=>{r.push(o),this.langiumDocuments.hasDocument(o.uri)||this.langiumDocuments.addDocument(o)},"collector");await this.loadAdditionalDocuments(e,n);const a=[];await Promise.all(e.map(o=>this.getRootFolder(o)).map(async o=>this.traverseFolder(o,a)));const i=ue(a).distinct(o=>o.toString()).filter(o=>!this.langiumDocuments.hasDocument(o));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),r}async loadWorkspaceDocuments(e,r){await Promise.all(e.map(async n=>{const a=await this.langiumDocuments.getOrCreateDocument(n);r(a)}))}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Rt.parse(e.uri)}async traverseFolder(e,r){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async a=>{this.shouldIncludeEntry(a)&&(a.isDirectory?await this.traverseFolder(a.uri,r):a.isFile&&r.push(a.uri))}))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}}async searchFolder(e){const r=[];return await this.traverseFolder(e,r),r}shouldIncludeEntry(e){const r=it.basename(e.uri);return r.startsWith(".")?!1:e.isDirectory?r!=="node_modules"&&r!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},s(bl,"DefaultWorkspaceManager"),bl),wl,KI=(wl=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return nh.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return nh.buildUnableToPopLexerModeMessage(e)}},s(wl,"DefaultLexerErrorMessageProvider"),wl),py={mode:"full"},Il,hy=(Il=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);const n=cf(r)?Object.values(r):r,a=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new st(n,{positionTracking:"full",skipValidations:a,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=py){var a,i;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:(i=(a=this.tokenBuilder).flushLexingReport)==null?void 0:i.call(a,e)}}toTokenTypeDictionary(e){if(cf(e))return e;const r=Rd(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}},s(Il,"DefaultLexer"),Il);function Td(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}s(Td,"isTokenTypeArray");function Rd(t){return t&&"modes"in t&&"defaultMode"in t}s(Rd,"isIMultiModeLexerDefinition");function cf(t){return!Td(t)&&!Rd(t)}s(cf,"isTokenTypeDictionary");mu();function my(t,e,r){let n,a;typeof t=="string"?(a=e,n=r):(a=t.range.start,n=e),a||(a=ie.create(0,0));const i=yy(t),o=$d(n),u=qI({lines:i,position:a,options:o});return HI({index:0,tokens:u,position:a})}s(my,"parseJSDoc");function gy(t,e){const r=$d(e),n=yy(t);if(n.length===0)return!1;const a=n[0],i=n[n.length-1],o=r.start,u=r.end;return!!(o!=null&&o.exec(a))&&!!(u!=null&&u.exec(i))}s(gy,"isJSDoc");function yy(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(HT)}s(yy,"getLines");var Vv=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,_j=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function qI(t){var a,i,o;const e=[];let r=t.position.line,n=t.position.character;for(let u=0;u<t.lines.length;u++){const l=u===0,c=u===t.lines.length-1;let f=t.lines[u],d=0;if(l&&t.options.start){const m=(a=t.options.start)==null?void 0:a.exec(f);m&&(d=m.index+m[0].length)}else{const m=(i=t.options.line)==null?void 0:i.exec(f);m&&(d=m.index+m[0].length)}if(c){const m=(o=t.options.end)==null?void 0:o.exec(f);m&&(f=f.substring(0,m.index))}if(f=f.substring(0,VI(f)),ff(f,d)>=f.length){if(e.length>0){const m=ie.create(r,n);e.push({type:"break",content:"",range:ee.create(m,m)})}}else{Vv.lastIndex=d;const m=Vv.exec(f);if(m){const g=m[0],v=m[1],E=ie.create(r,n+d),T=ie.create(r,n+d+g.length);e.push({type:"tag",content:v,range:ee.create(E,T)}),d+=g.length,d=ff(f,d)}if(d<f.length){const g=f.substring(d),v=Array.from(g.matchAll(_j));e.push(...WI(v,g,r,n+d))}}r++,n=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}s(qI,"tokenize");function WI(t,e,r,n){const a=[];if(t.length===0){const i=ie.create(r,n),o=ie.create(r,n+e.length);a.push({type:"text",content:e,range:ee.create(i,o)})}else{let i=0;for(const u of t){const l=u.index,c=e.substring(i,l);c.length>0&&a.push({type:"text",content:e.substring(i,l),range:ee.create(ie.create(r,i+n),ie.create(r,l+n))});let f=c.length+1;const d=u[1];if(a.push({type:"inline-tag",content:d,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+d.length+n))}),f+=d.length,u.length===4){f+=u[2].length;const p=u[3];a.push({type:"text",content:p,range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+p.length+n))})}else a.push({type:"text",content:"",range:ee.create(ie.create(r,i+f+n),ie.create(r,i+f+n))});i=l+u[0].length}const o=e.substring(i);o.length>0&&a.push({type:"text",content:o,range:ee.create(ie.create(r,i+n),ie.create(r,i+n+o.length))})}return a}s(WI,"buildInlineTokens");var Cj=/\S/,Sj=/\s*$/;function ff(t,e){const r=t.substring(e).match(Cj);return r?e+r.index:t.length}s(ff,"skipWhitespace");function VI(t){const e=t.match(Sj);if(e&&typeof e.index=="number")return e.index}s(VI,"lastCharacter");function HI(t){var i,o;const e=ie.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Hv([],ee.create(e,e));const r=[];for(;t.index<t.tokens.length;){const u=YI(t,r[r.length-1]);u&&r.push(u)}const n=((i=r[0])==null?void 0:i.range.start)??e,a=((o=r[r.length-1])==null?void 0:o.range.end)??e;return new Hv(r,ee.create(n,a))}s(HI,"parseJSDocComment");function YI(t,e){const r=t.tokens[t.index];if(r.type==="tag")return Ty(t,!1);if(r.type==="text"||r.type==="inline-tag")return vy(t);XI(r,e),t.index++}s(YI,"parseJSDocElement");function XI(t,e){if(e){const r=new eN("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}s(XI,"appendEmptyLine");function vy(t){let e=t.tokens[t.index];const r=e;let n=e;const a=[];for(;e&&e.type!=="break"&&e.type!=="tag";)a.push(JI(t)),n=e,e=t.tokens[t.index];return new _h(a,ee.create(r.range.start,n.range.end))}s(vy,"parseJSDocText");function JI(t){return t.tokens[t.index].type==="inline-tag"?Ty(t,!0):Ry(t)}s(JI,"parseJSDocInline");function Ty(t,e){const r=t.tokens[t.index++],n=r.content.substring(1),a=t.tokens[t.index];if((a==null?void 0:a.type)==="text")if(e){const i=Ry(t);return new kd(n,new _h([i],i.range),e,ee.create(r.range.start,i.range.end))}else{const i=vy(t);return new kd(n,i,e,ee.create(r.range.start,i.range.end))}else{const i=r.range;return new kd(n,new _h([],i),e,i)}}s(Ty,"parseJSDocTag");function Ry(t){const e=t.tokens[t.index++];return new eN(e.content,e.range)}s(Ry,"parseJSDocLine");function $d(t){if(!t)return $d({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:Rc(e,!0),end:Rc(r,!1),line:Rc(n,!0)}}s($d,"normalizeOptions");function Rc(t,e){if(typeof t=="string"||typeof t=="object"){const r=typeof t=="string"?ni(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}s(Rc,"normalizeOption");var Nl,Hv=(Nl=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const r of this.elements)if(e.length===0)e=r.toString();else{const n=r.toString();e+=Ch(e)+n}return e.trim()}toMarkdown(e){let r="";for(const n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{const a=n.toMarkdown(e);r+=Ch(r)+a}return r.trim()}},s(Nl,"JSDocCommentImpl"),Nl),kl,kd=(kl=class{constructor(e,r,n,a){this.name=e,this.content=r,this.inline=n,this.range=a}toString(){let e=`@${this.name}`;const r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}
150
+ ${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r;return((r=e==null?void 0:e.renderTag)==null?void 0:r.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const r=this.content.toMarkdown(e);if(this.inline){const i=ZI(this.name,r,e??{});if(typeof i=="string")return i}let n="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?n="*":(e==null?void 0:e.tag)==="bold"?n="**":(e==null?void 0:e.tag)==="bold-italic"&&(n="***");let a=`${n}@${this.name}${n}`;return this.content.inlines.length===1?a=`${a} — ${r}`:this.content.inlines.length>1&&(a=`${a}
151
+ ${r}`),this.inline?`{${a}}`:a}},s(kl,"JSDocTagImpl"),kl);function ZI(t,e,r){var n;if(t==="linkplain"||t==="linkcode"||t==="link"){const a=e.indexOf(" ");let i=e;if(a>0){const u=ff(e,a);i=e.substring(u),e=e.substring(0,a)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(i=`\`${i}\``),((n=r.renderLink)==null?void 0:n.call(r,e,i))??QI(e,i)}}s(ZI,"renderInlineTag");function QI(t,e){try{return Rt.parse(t,!0),`[${e}](${t})`}catch{return t}}s(QI,"renderLinkDefault");var Pl,_h=(Pl=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],a=this.inlines[r+1];e+=n.toString(),a&&a.range.start.line>n.range.start.line&&(e+=`
152
+ `)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){const a=this.inlines[n],i=this.inlines[n+1];r+=a.toMarkdown(e),i&&i.range.start.line>a.range.start.line&&(r+=`
153
+ `)}return r}},s(Pl,"JSDocTextImpl"),Pl),Ol,eN=(Ol=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}},s(Ol,"JSDocLineImpl"),Ol);function Ch(t){return t.endsWith(`
154
+ `)?`
155
+ `:`
156
+
157
+ `}s(Ch,"fillNewlines");var Ll,tN=(Ll=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const r=this.commentProvider.getComment(e);if(r&&gy(r))return my(r).toMarkdown({renderLink:s((a,i)=>this.documentationLinkRenderer(e,a,i),"renderLink"),renderTag:s(a=>this.documentationTagRenderer(e,a),"renderTag")})}documentationLinkRenderer(e,r,n){const a=this.findNameInLocalSymbols(e,r)??this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){const i=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,u=a.documentUri.with({fragment:`L${i},${o}`});return`[${n}](${u.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){const a=Bt(e).localSymbols;if(!a)return;let i=e;do{const u=a.getStream(i).find(l=>l.name===r);if(u)return u;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}},s(Ll,"JSDocDocumentationProvider"),Ll),Dl,rN=(Dl=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return cy(e)?e.$comment:(r=vm(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:r.text}},s(Dl,"DefaultCommentProvider"),Dl),Ml,nN=(Ml=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},s(Ml,"DefaultAsyncParser"),Ml),xl,bj=(xl=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}async parse(e,r){const n=await this.acquireParserWorker(r),a=new Or;let i;const o=r.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(u=>{const l=this.hydrator.hydrate(u);a.resolve(l)}).catch(u=>{a.reject(u)}).finally(()=>{o.dispose(),clearTimeout(i)}),a.promise}terminateWorker(e){e.terminate();const r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool)if(n.ready)return n.lock(),n;const r=new Or;return e.onCancellationRequested(()=>{const n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(or)}),this.queue.push(r),r.promise}},s(xl,"AbstractThreadedAsyncParser"),xl),Fl,wj=(Fl=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new vd.Emitter,this.deferred=new Or,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=a,r(i=>{const o=i;this.deferred.resolve(o),this.unlock()}),n(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(or),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Or,this.sendMessage(e),this.deferred.promise}},s(Fl,"ParserWorker"),Fl),Gl,aN=(Gl=class{constructor(){this.previousTokenSource=new $e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const r=md();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=$e.CancellationToken.None){const a=new Or,i={action:r,deferred:a,cancellationToken:n};return e.push(i),this.performNextOperation(),a.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:r,deferred:n,cancellationToken:a})=>{try{const i=await Promise.resolve().then(()=>r(a));n.resolve(i)}catch(i){sa(i)?n.resolve(void 0):n.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},s(Gl,"DefaultWorkspaceLock"),Gl),jl,iN=(jl=class{constructor(e){this.grammarElementIdMap=new lf,this.tokenTypeIdMap=new lf,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>({...r,message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const r=new Map,n=new Map;for(const a of Kt(e))r.set(a,{});if(e.$cstNode)for(const a of Wa(e.$cstNode))n.set(a,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const u of i)ze(u)?o.push(this.dehydrateAstNode(u,r)):at(u)?o.push(this.dehydrateReference(u,r)):o.push(u)}else ze(i)?n[a]=this.dehydrateAstNode(i,r):at(i)?n[a]=this.dehydrateReference(i,r):i!==void 0&&(n[a]=i);return n}dehydrateReference(e,r){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){const n=r.cstNodes.get(e);return mf(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Cr(e)?n.content=e.content.map(a=>this.dehydrateCstNode(a,r)):Un(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){const r=new Map,n=new Map;for(const i of Kt(e))r.set(i,{});let a;if(e.$cstNode)for(const i of Wa(e.$cstNode)){let o;"fullText"in i?(o=new Hg(i.fullText),a=o):"content"in i?o=new cd:"tokenType"in i&&(o=this.hydrateCstLeafNode(i)),o&&(n.set(i,o),o.root=a)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const o=[];n[a]=o;for(const u of i)ze(u)?o.push(this.setParent(this.hydrateAstNode(u,r),n)):at(u)?o.push(this.hydrateReference(u,n,a,r)):o.push(u)}else ze(i)?n[a]=this.setParent(this.hydrateAstNode(i,r),n):at(i)?n[a]=this.hydrateReference(i,n,a,r):i!==void 0&&(n[a]=i);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,a){return this.linker.buildReference(r,n,a.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){const a=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(a.grammarSource=this.getGrammarElement(e.grammarSource)),a.astNode=r.astNodes.get(e.astNode),Cr(a))for(const i of e.content){const o=this.hydrateCstNode(i,r,n++);a.content.push(o)}return a}hydrateCstLeafNode(e){const r=this.getTokenType(e.tokenType),n=e.offset,a=e.length,i=e.startLine,o=e.startColumn,u=e.endLine,l=e.endColumn,c=e.hidden;return new rf(n,a,{start:{line:i,character:o},end:{line:u,character:l}},r,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const r of Kt(this.grammar))gf(r)&&this.grammarElementIdMap.set(r,e++)}},s(jl,"DefaultHydrator"),jl);function St(t){return{documentation:{CommentProvider:s(e=>new rN(e),"CommentProvider"),DocumentationProvider:s(e=>new tN(e),"DocumentationProvider")},parser:{AsyncParser:s(e=>new nN(e),"AsyncParser"),GrammarConfig:s(e=>zm(e),"GrammarConfig"),LangiumParser:s(e=>ey(e),"LangiumParser"),CompletionParser:s(e=>Qg(e),"CompletionParser"),ValueConverter:s(()=>new ry,"ValueConverter"),TokenBuilder:s(()=>new pd,"TokenBuilder"),Lexer:s(e=>new hy(e),"Lexer"),ParserErrorMessageProvider:s(()=>new Xg,"ParserErrorMessageProvider"),LexerErrorMessageProvider:s(()=>new KI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:s(()=>new GI,"AstNodeLocator"),AstNodeDescriptionProvider:s(e=>new xI(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:s(e=>new FI(e),"ReferenceDescriptionProvider")},references:{Linker:s(e=>new CI(e),"Linker"),NameProvider:s(()=>new SI,"NameProvider"),ScopeProvider:s(e=>new kI(e),"ScopeProvider"),ScopeComputation:s(e=>new wI(e),"ScopeComputation"),References:s(e=>new bI(e),"References")},serializer:{Hydrator:s(e=>new iN(e),"Hydrator"),JsonSerializer:s(e=>new PI(e),"JsonSerializer")},validation:{DocumentValidator:s(e=>new MI(e),"DocumentValidator"),ValidationRegistry:s(e=>new LI(e),"ValidationRegistry")},shared:s(()=>t.shared,"shared")}}s(St,"createDefaultCoreModule");function bt(t){return{ServiceRegistry:s(e=>new OI(e),"ServiceRegistry"),workspace:{LangiumDocuments:s(e=>new _I(e),"LangiumDocuments"),LangiumDocumentFactory:s(e=>new EI(e),"LangiumDocumentFactory"),DocumentBuilder:s(e=>new UI(e),"DocumentBuilder"),IndexManager:s(e=>new zI(e),"IndexManager"),WorkspaceManager:s(e=>new BI(e),"WorkspaceManager"),FileSystemProvider:s(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:s(()=>new aN,"WorkspaceLock"),ConfigurationProvider:s(e=>new jI(e),"ConfigurationProvider")},profilers:{}}}s(bt,"createDefaultSharedCoreModule");var Sh;(function(t){t.merge=(e,r)=>Za(Za({},e),r)})(Sh||(Sh={}));function ke(t,e,r,n,a,i,o,u,l){const c=[t,e,r,n,a,i,o,u,l].reduce(Za,{});return Ay(c)}s(ke,"inject");var sN=Symbol("isProxy");function $y(t){if(t&&t[sN])for(const e of Object.values(t))$y(e);return t}s($y,"eagerLoad");function Ay(t,e){const r=new Proxy({},{deleteProperty:s(()=>!1,"deleteProperty"),set:s(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:s((n,a)=>a===sN?!0:bh(n,a,t,e||r),"get"),getOwnPropertyDescriptor:s((n,a)=>(bh(n,a,t,e||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:s((n,a)=>a in t,"has"),ownKeys:s(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r}s(Ay,"_inject");var Yv=Symbol();function bh(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===Yv)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){const a=r[e];t[e]=Yv;try{t[e]=typeof a=="function"?a(n):Ay(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}else return}s(bh,"_resolve");function Za(t,e){if(e){for(const[r,n]of Object.entries(e))if(n!=null)if(typeof n=="object"){const a=t[r];typeof a=="object"&&a!==null?t[r]=Za(a,n):t[r]=Za({},n)}else t[r]=n}return t}s(Za,"_merge");var wh={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},Pn;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(Pn||(Pn={}));var Ul,oN=(Ul=class extends pd{constructor(e=wh){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...wh,...e},this.indentTokenType=Ga({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Ga({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){const n=super.buildTokens(e,r);if(!Td(n))throw new Error("Invalid tokens built by default builder");const{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:o,ignoreIndentationDelimiters:u}=this.options;let l,c,f;const d=[];for(const p of n){for(const[m,g]of u)p.name===m?p.PUSH_MODE=Pn.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===i?l=p:p.name===a?c=p:p.name===o?f=p:d.push(p)}if(!l||!c||!f)throw new Error("Some indentation/whitespace tokens not found!");return u.length>0?{modes:{[Pn.REGULAR]:[l,c,...d,f],[Pn.IGNORE_INDENTATION]:[...d,f]},defaultMode:Pn.REGULAR}:[l,c,f,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,r){return r===0||`\r
158
+ `.includes(e[r-1])}matchWhitespace(e,r,n,a){this.whitespaceRegExp.lastIndex=r;const i=this.whitespaceRegExp.exec(e);return{currIndentLevel:(i==null?void 0:i[0].length)??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,r,n,a){const i=this.getLineNumber(r,a);return ku(e,n,a,a+n.length,i,i,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,a){if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:u}=this.matchWhitespace(e,r,n,a);return i<=o?null:(this.indentationStack.push(i),u)}dedentMatcher(e,r,n,a){var d,p;if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:u}=this.matchWhitespace(e,r,n,a);if(i>=o)return null;const l=this.indentationStack.lastIndexOf(i);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:((d=u==null?void 0:u[0])==null?void 0:d.length)??0,line:this.getLineNumber(e,r),column:1}),null;const c=this.indentationStack.length-l-1,f=((p=e.substring(0,r).match(/[\r\n]+$/))==null?void 0:p[0].length)??1;for(let m=0;m<c;m++){const g=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(f-1));n.push(g),this.indentationStack.pop()}return null}buildTerminalToken(e){const r=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i}=this.options;return r.name===n?this.indentTokenType:r.name===a?this.dedentTokenType:r.name===i?Ga({name:i,pattern:this.whitespaceRegExp,group:st.SKIPPED}):r}flushRemainingDedents(e){const r=[];for(;this.indentationStack.length>1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},s(Ul,"IndentationAwareTokenBuilder"),Ul),zl,Ij=(zl=class extends hy{constructor(e){if(super(e),e.parser.TokenBuilder instanceof oN)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=py){const n=super.tokenize(e),a=n.report;(r==null?void 0:r.mode)==="full"&&n.tokens.push(...a.remainingDedents),a.remainingDedents=[];const{indentTokenType:i,dedentTokenType:o}=this.indentationTokenBuilder,u=i.tokenTypeIdx,l=o.tokenTypeIdx,c=[],f=n.tokens.length-1;for(let d=0;d<f;d++){const p=n.tokens[d],m=n.tokens[d+1];if(p.tokenTypeIdx===u&&m.tokenTypeIdx===l){d++;continue}c.push(p)}return f>=0&&c.push(n.tokens[f]),n.tokens=c,n}},s(zl,"IndentationAwareLexer"),zl),Ey={};Zr(Ey,{AstUtils:()=>Wh,BiMap:()=>lf,Cancellation:()=>$e,ContextCache:()=>yd,CstUtils:()=>Bh,DONE_RESULT:()=>nt,Deferred:()=>Or,Disposable:()=>Ln,DisposableCache:()=>gd,DocumentCache:()=>NI,EMPTY_STREAM:()=>Ua,ErrorWithLocation:()=>Ef,GrammarUtils:()=>Am,MultiMap:()=>Lr,OperationCancelled:()=>or,Reduction:()=>ps,RegExpUtils:()=>_m,SimpleCache:()=>ly,StreamImpl:()=>sr,TreeStreamImpl:()=>za,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,WorkspaceCache:()=>uy,assertCondition:()=>Em,assertUnreachable:()=>Qr,delayNextTick:()=>hd,interruptAndCheck:()=>He,isOperationCancelled:()=>sa,loadGrammarFromJson:()=>wt,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>md,stream:()=>ue});df(Ey,vd);var Bl,lN=(Bl=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},s(Bl,"EmptyFileSystemProvider"),Bl),Gt={fileSystemProvider:s(()=>new lN,"fileSystemProvider")},Nj={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},kj={AstReflection:s(()=>new pm,"AstReflection")};function uN(){const t=ke(bt(Gt),kj),e=ke(St({shared:t}),Nj);return t.ServiceRegistry.register(e),e}s(uN,"createMinimalGrammarServices");function wt(t){const e=uN(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,Rt.parse(`memory:/${r.name??"grammar"}.langium`)),r}s(wt,"loadGrammarFromJson");df(TT,Ey);var Kl,Pj=(Kl=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Lr}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(e,r){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${r}'.`),new cN(n=>this.records.add(e,this.dumpRecord(e,n)),r)}dumpRecord(e,r){console.info(`Task ${e}.${r.identifier} executed in ${r.duration.toFixed(2)}ms and ended at ${r.date.toISOString()}`);const n=[];for(const o of r.entries.keys()){const u=r.entries.get(o),l=u.reduce((c,f)=>c+f);n.push({name:`${r.identifier}.${o}`,count:u.length,duration:l})}const a=r.duration-n.map(o=>o.duration).reduce((o,u)=>o+u,0);n.push({name:r.identifier,count:1,duration:a}),n.sort((o,u)=>u.duration-o.duration);function i(o){return Math.round(100*o)/100}return s(i,"Round"),console.table(n.map(o=>({Element:o.name,Count:o.count,"Self %":i(100*o.duration/r.duration),"Time (ms)":i(o.duration)}))),r}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(r=>e.some(n=>n===r[0])).flatMap(r=>r[1])}},s(Kl,"DefaultLangiumProfiler"),Kl),ql,cN=(ql=class{constructor(e,r){this.stack=[],this.entries=new Lr,this.addRecord=e,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);const e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){const r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(r.id!==e)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);const n=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);const a=n-r.content;this.entries.add(e,a)}},s(ql,"ProfilingTask"),ql),Ih;(t=>{t.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(Ih||(Ih={}));var Nh;(t=>{t.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(Nh||(Nh={}));var kh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(kh||(kh={}));var Ph;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ph||(Ph={}));var Oh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Oh||(Oh={}));var Lh;(t=>{t.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Lh||(Lh={}));var Dh;(t=>{t.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Dh||(Dh={}));var Mh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(Mh||(Mh={}));var xh;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(xh||(xh={}));var Fh;(t=>{t.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Fh||(Fh={}));({...Ih.Terminals,...Nh.Terminals,...kh.Terminals,...Ph.Terminals,...Oh.Terminals,...Lh.Terminals,...Dh.Terminals,...xh.Terminals,...Mh.Terminals,...Fh.Terminals});var Bu={$type:"Accelerator",name:"name",x:"x",y:"y"},Ku={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},Oi={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},Pd={$type:"Annotations",x:"x",y:"y"},Rr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function Oj(t){return It.isInstance(t,Rr.$type)}s(Oj,"isArchitecture");var qu={$type:"Axis",label:"label",name:"name"},$c={$type:"Branch",name:"name",order:"order"};function Lj(t){return It.isInstance(t,$c.$type)}s(Lj,"isBranch");var Xv={$type:"Checkout",branch:"branch"},Wu={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Od={$type:"ClassDefStatement",className:"className",styleText:"styleText"},_a={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function Dj(t){return It.isInstance(t,_a.$type)}s(Dj,"isCommit");var Vu={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},an={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Hu={$type:"Curve",entries:"entries",label:"label",name:"name"},Yu={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Jv={$type:"Decorator",strategy:"strategy"},ha={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},tr={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},ma={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},sn={$type:"EmFrame"},Li={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Zv={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},Ld={$type:"EmModelEntity",name:"name"};function Mj(t){return t==="rmo"||t==="readmodel"||t==="ui"||t==="cmd"||t==="command"||t==="evt"||t==="event"||t==="pcr"||t==="processor"}s(Mj,"isEmModelEntityType");var Xu={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},$r={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function xj(t){return It.isInstance(t,$r.$type)}s(xj,"isEmResetFrame");var Ur={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Dd={$type:"Entry",axis:"axis",value:"value"},vr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},Qv={$type:"Evolution",stages:"stages"},Ju={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Md={$type:"Evolve",component:"component",target:"target"},mn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function Fj(t){return It.isInstance(t,mn.$type)}s(Fj,"isGitGraph");var Di={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Xi={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function Gj(t){return It.isInstance(t,Xi.$type)}s(Gj,"isInfo");var Mi={$type:"Item",classSelector:"classSelector",name:"name"},xd={$type:"Junction",id:"id",in:"in"},xi={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Zu={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},on={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},Ca={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function jj(t){return It.isInstance(t,Ca.$type)}s(jj,"isMerge");var Qu={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Fd={$type:"Option",name:"name",value:"value"},Sa={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function Uj(t){return It.isInstance(t,Sa.$type)}s(Uj,"isPacket");var ba={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function zj(t){return It.isInstance(t,ba.$type)}s(zj,"isPacketBlock");var gn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function Bj(t){return It.isInstance(t,gn.$type)}s(Bj,"isPie");var Ac={$type:"PieSection",label:"label",value:"value"};function Kj(t){return It.isInstance(t,Ac.$type)}s(Kj,"isPieSection");var Gd={$type:"Pipeline",components:"components",parent:"parent"},ec={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},ln={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},jd={$type:"Section",classSelector:"classSelector",name:"name"},ga={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Ud={$type:"Size",height:"height",width:"width"},ya={$type:"Statement"},wa={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function qj(t){return It.isInstance(t,wa.$type)}s(qj,"isTreemap");var zd={$type:"TreemapRow",indent:"indent",item:"item"},Bd={$type:"TreeNode",indent:"indent",name:"name"},Fi={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Je={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function Wj(t){return It.isInstance(t,Je.$type)}s(Wj,"isWardley");var Wl,fN=(Wl=class extends qh{constructor(){super(...arguments),this.types={Accelerator:{name:Bu.$type,properties:{name:{name:Bu.name},x:{name:Bu.x},y:{name:Bu.y}},superTypes:[]},Anchor:{name:Ku.$type,properties:{evolution:{name:Ku.evolution},name:{name:Ku.name},visibility:{name:Ku.visibility}},superTypes:[]},Annotation:{name:Oi.$type,properties:{number:{name:Oi.number},text:{name:Oi.text},x:{name:Oi.x},y:{name:Oi.y}},superTypes:[]},Annotations:{name:Pd.$type,properties:{x:{name:Pd.x},y:{name:Pd.y}},superTypes:[]},Architecture:{name:Rr.$type,properties:{accDescr:{name:Rr.accDescr},accTitle:{name:Rr.accTitle},edges:{name:Rr.edges,defaultValue:[]},groups:{name:Rr.groups,defaultValue:[]},junctions:{name:Rr.junctions,defaultValue:[]},services:{name:Rr.services,defaultValue:[]},title:{name:Rr.title}},superTypes:[]},Axis:{name:qu.$type,properties:{label:{name:qu.label},name:{name:qu.name}},superTypes:[]},Branch:{name:$c.$type,properties:{name:{name:$c.name},order:{name:$c.order}},superTypes:[ya.$type]},Checkout:{name:Xv.$type,properties:{branch:{name:Xv.branch}},superTypes:[ya.$type]},CherryPicking:{name:Wu.$type,properties:{id:{name:Wu.id},parent:{name:Wu.parent},tags:{name:Wu.tags,defaultValue:[]}},superTypes:[ya.$type]},ClassDefStatement:{name:Od.$type,properties:{className:{name:Od.className},styleText:{name:Od.styleText}},superTypes:[]},Commit:{name:_a.$type,properties:{id:{name:_a.id},message:{name:_a.message},tags:{name:_a.tags,defaultValue:[]},type:{name:_a.type}},superTypes:[ya.$type]},Common:{name:Vu.$type,properties:{accDescr:{name:Vu.accDescr},accTitle:{name:Vu.accTitle},title:{name:Vu.title}},superTypes:[]},Component:{name:an.$type,properties:{decorator:{name:an.decorator},evolution:{name:an.evolution},inertia:{name:an.inertia,defaultValue:!1},label:{name:an.label},name:{name:an.name},visibility:{name:an.visibility}},superTypes:[]},Curve:{name:Hu.$type,properties:{entries:{name:Hu.entries,defaultValue:[]},label:{name:Hu.label},name:{name:Hu.name}},superTypes:[]},Deaccelerator:{name:Yu.$type,properties:{name:{name:Yu.name},x:{name:Yu.x},y:{name:Yu.y}},superTypes:[]},Decorator:{name:Jv.$type,properties:{strategy:{name:Jv.strategy}},superTypes:[]},Direction:{name:ha.$type,properties:{accDescr:{name:ha.accDescr},accTitle:{name:ha.accTitle},dir:{name:ha.dir},statements:{name:ha.statements,defaultValue:[]},title:{name:ha.title}},superTypes:[mn.$type]},Edge:{name:tr.$type,properties:{lhsDir:{name:tr.lhsDir},lhsGroup:{name:tr.lhsGroup,defaultValue:!1},lhsId:{name:tr.lhsId},lhsInto:{name:tr.lhsInto,defaultValue:!1},rhsDir:{name:tr.rhsDir},rhsGroup:{name:tr.rhsGroup,defaultValue:!1},rhsId:{name:tr.rhsId},rhsInto:{name:tr.rhsInto,defaultValue:!1},title:{name:tr.title}},superTypes:[]},EmDataEntity:{name:ma.$type,properties:{dataBlockValue:{name:ma.dataBlockValue},dataType:{name:ma.dataType},name:{name:ma.name}},superTypes:[]},EmFrame:{name:sn.$type,properties:{},superTypes:[]},EmGwt:{name:Li.$type,properties:{givenStatements:{name:Li.givenStatements,defaultValue:[]},sourceFrame:{name:Li.sourceFrame,referenceType:sn.$type},thenStatements:{name:Li.thenStatements,defaultValue:[]},whenStatements:{name:Li.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Zv.$type,properties:{entityIdentifier:{name:Zv.entityIdentifier,referenceType:Ld.$type}},superTypes:[]},EmModelEntity:{name:Ld.$type,properties:{name:{name:Ld.name}},superTypes:[]},EmNoteEntity:{name:Xu.$type,properties:{dataBlockValue:{name:Xu.dataBlockValue},dataType:{name:Xu.dataType},sourceFrame:{name:Xu.sourceFrame,referenceType:sn.$type}},superTypes:[]},EmResetFrame:{name:$r.$type,properties:{dataInlineValue:{name:$r.dataInlineValue},dataReference:{name:$r.dataReference,referenceType:ma.$type},dataType:{name:$r.dataType},entityIdentifier:{name:$r.entityIdentifier},modelEntityType:{name:$r.modelEntityType},name:{name:$r.name},sourceFrames:{name:$r.sourceFrames,defaultValue:[],referenceType:sn.$type}},superTypes:[sn.$type]},EmTimeFrame:{name:Ur.$type,properties:{dataInlineValue:{name:Ur.dataInlineValue},dataReference:{name:Ur.dataReference,referenceType:ma.$type},dataType:{name:Ur.dataType},entityIdentifier:{name:Ur.entityIdentifier},modelEntityType:{name:Ur.modelEntityType},name:{name:Ur.name},sourceFrames:{name:Ur.sourceFrames,defaultValue:[],referenceType:sn.$type}},superTypes:[sn.$type]},Entry:{name:Dd.$type,properties:{axis:{name:Dd.axis,referenceType:qu.$type},value:{name:Dd.value}},superTypes:[]},EventModel:{name:vr.$type,properties:{accDescr:{name:vr.accDescr},accTitle:{name:vr.accTitle},dataEntities:{name:vr.dataEntities,defaultValue:[]},frames:{name:vr.frames,defaultValue:[]},gwtEntities:{name:vr.gwtEntities,defaultValue:[]},modelEntities:{name:vr.modelEntities,defaultValue:[]},noteEntities:{name:vr.noteEntities,defaultValue:[]},title:{name:vr.title}},superTypes:[]},Evolution:{name:Qv.$type,properties:{stages:{name:Qv.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Ju.$type,properties:{boundary:{name:Ju.boundary},name:{name:Ju.name},secondName:{name:Ju.secondName}},superTypes:[]},Evolve:{name:Md.$type,properties:{component:{name:Md.component},target:{name:Md.target}},superTypes:[]},GitGraph:{name:mn.$type,properties:{accDescr:{name:mn.accDescr},accTitle:{name:mn.accTitle},statements:{name:mn.statements,defaultValue:[]},title:{name:mn.title}},superTypes:[]},Group:{name:Di.$type,properties:{icon:{name:Di.icon},id:{name:Di.id},in:{name:Di.in},title:{name:Di.title}},superTypes:[]},Info:{name:Xi.$type,properties:{accDescr:{name:Xi.accDescr},accTitle:{name:Xi.accTitle},title:{name:Xi.title}},superTypes:[]},Item:{name:Mi.$type,properties:{classSelector:{name:Mi.classSelector},name:{name:Mi.name}},superTypes:[]},Junction:{name:xd.$type,properties:{id:{name:xd.id},in:{name:xd.in}},superTypes:[]},Label:{name:xi.$type,properties:{negX:{name:xi.negX,defaultValue:!1},negY:{name:xi.negY,defaultValue:!1},offsetX:{name:xi.offsetX},offsetY:{name:xi.offsetY}},superTypes:[]},Leaf:{name:Zu.$type,properties:{classSelector:{name:Zu.classSelector},name:{name:Zu.name},value:{name:Zu.value}},superTypes:[Mi.$type]},Link:{name:on.$type,properties:{arrow:{name:on.arrow},from:{name:on.from},fromPort:{name:on.fromPort},linkLabel:{name:on.linkLabel},to:{name:on.to},toPort:{name:on.toPort}},superTypes:[]},Merge:{name:Ca.$type,properties:{branch:{name:Ca.branch},id:{name:Ca.id},tags:{name:Ca.tags,defaultValue:[]},type:{name:Ca.type}},superTypes:[ya.$type]},Note:{name:Qu.$type,properties:{evolution:{name:Qu.evolution},text:{name:Qu.text},visibility:{name:Qu.visibility}},superTypes:[]},Option:{name:Fd.$type,properties:{name:{name:Fd.name},value:{name:Fd.value,defaultValue:!1}},superTypes:[]},Packet:{name:Sa.$type,properties:{accDescr:{name:Sa.accDescr},accTitle:{name:Sa.accTitle},blocks:{name:Sa.blocks,defaultValue:[]},title:{name:Sa.title}},superTypes:[]},PacketBlock:{name:ba.$type,properties:{bits:{name:ba.bits},end:{name:ba.end},label:{name:ba.label},start:{name:ba.start}},superTypes:[]},Pie:{name:gn.$type,properties:{accDescr:{name:gn.accDescr},accTitle:{name:gn.accTitle},sections:{name:gn.sections,defaultValue:[]},showData:{name:gn.showData,defaultValue:!1},title:{name:gn.title}},superTypes:[]},PieSection:{name:Ac.$type,properties:{label:{name:Ac.label},value:{name:Ac.value}},superTypes:[]},Pipeline:{name:Gd.$type,properties:{components:{name:Gd.components,defaultValue:[]},parent:{name:Gd.parent}},superTypes:[]},PipelineComponent:{name:ec.$type,properties:{evolution:{name:ec.evolution},label:{name:ec.label},name:{name:ec.name}},superTypes:[]},Radar:{name:ln.$type,properties:{accDescr:{name:ln.accDescr},accTitle:{name:ln.accTitle},axes:{name:ln.axes,defaultValue:[]},curves:{name:ln.curves,defaultValue:[]},options:{name:ln.options,defaultValue:[]},title:{name:ln.title}},superTypes:[]},Section:{name:jd.$type,properties:{classSelector:{name:jd.classSelector},name:{name:jd.name}},superTypes:[Mi.$type]},Service:{name:ga.$type,properties:{icon:{name:ga.icon},iconText:{name:ga.iconText},id:{name:ga.id},in:{name:ga.in},title:{name:ga.title}},superTypes:[]},Size:{name:Ud.$type,properties:{height:{name:Ud.height},width:{name:Ud.width}},superTypes:[]},Statement:{name:ya.$type,properties:{},superTypes:[]},TreeNode:{name:Bd.$type,properties:{indent:{name:Bd.indent},name:{name:Bd.name}},superTypes:[]},TreeView:{name:Fi.$type,properties:{accDescr:{name:Fi.accDescr},accTitle:{name:Fi.accTitle},nodes:{name:Fi.nodes,defaultValue:[]},title:{name:Fi.title}},superTypes:[]},Treemap:{name:wa.$type,properties:{accDescr:{name:wa.accDescr},accTitle:{name:wa.accTitle},title:{name:wa.title},TreemapRows:{name:wa.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:zd.$type,properties:{indent:{name:zd.indent},item:{name:zd.item}},superTypes:[]},Wardley:{name:Je.$type,properties:{accDescr:{name:Je.accDescr},accelerators:{name:Je.accelerators,defaultValue:[]},accTitle:{name:Je.accTitle},anchors:{name:Je.anchors,defaultValue:[]},annotation:{name:Je.annotation,defaultValue:[]},annotations:{name:Je.annotations,defaultValue:[]},components:{name:Je.components,defaultValue:[]},deaccelerators:{name:Je.deaccelerators,defaultValue:[]},evolution:{name:Je.evolution},evolves:{name:Je.evolves,defaultValue:[]},links:{name:Je.links,defaultValue:[]},notes:{name:Je.notes,defaultValue:[]},pipelines:{name:Je.pipelines,defaultValue:[]},size:{name:Je.size},title:{name:Je.title}},superTypes:[]}}}},s(Wl,"MermaidAstReflection"),Wl),It=new fN,eT,Vj=s(()=>eT??(eT=wt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),tT,Hj=s(()=>tT??(tT=wt('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),rT,Yj=s(()=>rT??(rT=wt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),nT,Xj=s(()=>nT??(nT=wt(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),aT,Jj=s(()=>aT??(aT=wt(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),iT,Zj=s(()=>iT??(iT=wt(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),sT,Qj=s(()=>sT??(sT=wt(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),oT,eU=s(()=>oT??(oT=wt(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammarGrammar"),lT,tU=s(()=>lT??(lT=wt(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),uT,rU=s(()=>uT??(uT=wt(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),nU={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},aU={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},iU={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sU={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},oU={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},lU={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},uU={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cU={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fU={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dU={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mr={AstReflection:s(()=>new fN,"AstReflection")},pU={Grammar:s(()=>Vj(),"Grammar"),LanguageMetaData:s(()=>nU,"LanguageMetaData"),parser:{}},hU={Grammar:s(()=>Hj(),"Grammar"),LanguageMetaData:s(()=>aU,"LanguageMetaData"),parser:{}},mU={Grammar:s(()=>Yj(),"Grammar"),LanguageMetaData:s(()=>iU,"LanguageMetaData"),parser:{}},gU={Grammar:s(()=>Xj(),"Grammar"),LanguageMetaData:s(()=>sU,"LanguageMetaData"),parser:{}},yU={Grammar:s(()=>Jj(),"Grammar"),LanguageMetaData:s(()=>oU,"LanguageMetaData"),parser:{}},vU={Grammar:s(()=>Zj(),"Grammar"),LanguageMetaData:s(()=>lU,"LanguageMetaData"),parser:{}},TU={Grammar:s(()=>Qj(),"Grammar"),LanguageMetaData:s(()=>uU,"LanguageMetaData"),parser:{}},RU={Grammar:s(()=>eU(),"Grammar"),LanguageMetaData:s(()=>cU,"LanguageMetaData"),parser:{}},$U={Grammar:s(()=>tU(),"Grammar"),LanguageMetaData:s(()=>fU,"LanguageMetaData"),parser:{}},AU={Grammar:s(()=>rU(),"Grammar"),LanguageMetaData:s(()=>dU,"LanguageMetaData"),parser:{}},EU=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,_U=/accTitle[\t ]*:([^\n\r]*)/,CU=/title([\t ][^\n\r]*|)/,SU={ACC_DESCR:EU,ACC_TITLE:_U,TITLE:CU},Vl,fi=(Vl=class extends ry{runConverter(e,r,n){let a=this.runCommonConverter(e,r,n);return a===void 0&&(a=this.runCustomConverter(e,r,n)),a===void 0?super.runConverter(e,r,n):a}runCommonConverter(e,r,n){const a=SU[e.name];if(a===void 0)return;const i=a.exec(r);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
159
+ `)}}},s(Vl,"AbstractMermaidValueConverter"),Vl),Hl,Du=(Hl=class extends fi{runCustomConverter(e,r,n){}},s(Hl,"CommonValueConverter"),Hl),Yl,gr=(Yl=class extends pd{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){const a=super.buildKeywordTokens(e,r,n);return a.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),a}},s(Yl,"AbstractMermaidTokenBuilder"),Yl),Xl;Xl=class extends gr{},s(Xl,"CommonTokenBuilder");/*! Bundled license information:
160
+
161
+ lodash-es/lodash.js:
162
+ (**
163
+ * @license
164
+ * Lodash (Custom Build) <https://lodash.com/>
165
+ * Build: `lodash modularize exports="es" -o ./`
166
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
167
+ * Released under MIT license <https://lodash.com/license>
168
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
169
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
170
+ *)
171
+ */var Jl,bU=(Jl=class extends gr{constructor(){super(["radar-beta"])}},s(Jl,"RadarTokenBuilder"),Jl),wU={parser:{TokenBuilder:s(()=>new bU,"TokenBuilder"),ValueConverter:s(()=>new Du,"ValueConverter")}};function IU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),TU,wU);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}s(IU,"createRadarServices");var Zl,NU=(Zl=class extends gr{constructor(){super(["treemap"])}},s(Zl,"TreemapTokenBuilder"),Zl),kU=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Ql,PU=(Ql=class extends fi{runCustomConverter(e,r,n){if(e.name==="NUMBER2")return parseFloat(r.replace(/,/g,""));if(e.name==="SEPARATOR")return r.substring(1,r.length-1);if(e.name==="STRING2")return r.substring(1,r.length-1);if(e.name==="INDENTATION")return r.length;if(e.name==="ClassDef"){if(typeof r!="string")return r;const a=kU.exec(r);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},s(Ql,"TreemapValueConverter"),Ql);function dN(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}s(dN,"registerValidationChecks");var eu,OU=(eu=class{checkSingleRoot(e,r){let n;for(const a of e.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:a.indent===void 0?r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):n!==void 0&&n>=parseInt(a.indent,10)&&r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},s(eu,"TreemapValidator"),eu),LU={parser:{TokenBuilder:s(()=>new NU,"TokenBuilder"),ValueConverter:s(()=>new PU,"ValueConverter")},validation:{TreemapValidator:s(()=>new OU,"TreemapValidator")}};function DU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),RU,LU);return e.ServiceRegistry.register(r),dN(r),{shared:e,Treemap:r}}s(DU,"createTreemapServices");var tu,MU=(tu=class extends fi{runCustomConverter(e,r,n){switch(e.name.toUpperCase()){case"LINK_LABEL":return r.substring(1).trim();default:return}}},s(tu,"WardleyValueConverter"),tu),xU={parser:{ValueConverter:s(()=>new MU,"ValueConverter")}};function FU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),AU,xU);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}s(FU,"createWardleyServices");var ru,GU=(ru=class extends gr{constructor(){super(["gitGraph"])}},s(ru,"GitGraphTokenBuilder"),ru),jU={parser:{TokenBuilder:s(()=>new GU,"TokenBuilder"),ValueConverter:s(()=>new Du,"ValueConverter")}};function UU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),mU,jU);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}s(UU,"createGitGraphServices");var nu,zU=(nu=class extends gr{constructor(){super(["info","showInfo"])}},s(nu,"InfoTokenBuilder"),nu),BU={parser:{TokenBuilder:s(()=>new zU,"TokenBuilder"),ValueConverter:s(()=>new Du,"ValueConverter")}};function KU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),gU,BU);return e.ServiceRegistry.register(r),{shared:e,Info:r}}s(KU,"createInfoServices");var au,qU=(au=class extends gr{constructor(){super(["packet"])}},s(au,"PacketTokenBuilder"),au),WU={parser:{TokenBuilder:s(()=>new qU,"TokenBuilder"),ValueConverter:s(()=>new Du,"ValueConverter")}};function VU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),yU,WU);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}s(VU,"createPacketServices");var iu,HU=(iu=class extends gr{constructor(){super(["pie","showData"])}},s(iu,"PieTokenBuilder"),iu),su,YU=(su=class extends fi{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},s(su,"PieValueConverter"),su),XU={parser:{TokenBuilder:s(()=>new HU,"TokenBuilder"),ValueConverter:s(()=>new YU,"ValueConverter")}};function JU(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),vU,XU);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}s(JU,"createPieServices");var ou,ZU=(ou=class extends fi{runCustomConverter(e,r,n){if(e.name==="INDENTATION")return(r==null?void 0:r.length)||0;if(e.name==="STRING2")return r.substring(1,r.length-1)}},s(ou,"TreeViewValueConverter"),ou),lu,QU=(lu=class extends gr{constructor(){super(["treeView-beta"])}},s(lu,"TreeViewTokenBuilder"),lu),ez={parser:{TokenBuilder:s(()=>new QU,"TokenBuilder"),ValueConverter:s(()=>new ZU,"ValueConverter")}};function tz(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),$U,ez);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}s(tz,"createTreeViewServices");var uu,rz=(uu=class extends gr{constructor(){super(["architecture"])}},s(uu,"ArchitectureTokenBuilder"),uu),cu,nz=(cu=class extends fi{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let a=r.replace(/^\[|]$/g,"").trim();return(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1),a=a.replace(/\\"/g,'"').replace(/\\'/g,"'")),a.trim()}}},s(cu,"ArchitectureValueConverter"),cu),az={parser:{TokenBuilder:s(()=>new rz,"TokenBuilder"),ValueConverter:s(()=>new nz,"ValueConverter")}};function iz(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),pU,az);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(iz,"createArchitectureServices");var fu,sz=(fu=class extends gr{constructor(){super(["eventmodeling"])}},s(fu,"EventModelingTokenBuilder"),fu),cT=new Set(["cmd","command"]),fT=new Set(["evt","event"]),Kd=new Set(["rmo","readmodel"]),dT=new Set(["pcr","processor"]),pT=new Set(["ui"]);function pN(t){const e=t.validation.EventModelingValidator,r=t.validation.ValidationRegistry;if(r){const n={EmTimeFrame:e.checkSourceFrameTypes.bind(e),EmResetFrame:e.checkSourceFrameTypes.bind(e)};r.register(n,e)}}s(pN,"registerValidationChecks");var du,oz=(du=class{checkSourceFrameTypes(e,r){e.sourceFrames.length!==0&&(cT.has(e.modelEntityType)?this.validateSources(e,new Set([...pT,...dT]),"command","ui or processor",r):fT.has(e.modelEntityType)?this.validateSources(e,cT,"event","command",r):Kd.has(e.modelEntityType)?this.validateSources(e,fT,"read model","event",r):dT.has(e.modelEntityType)?this.validateSources(e,Kd,"processor","read model",r):pT.has(e.modelEntityType)&&this.validateSources(e,Kd,"ui","read model",r))}validateSources(e,r,n,a,i){for(const o of e.sourceFrames){const u=o.ref;u!==void 0&&!r.has(u.modelEntityType)&&i("error",`A ${n} can only receive input from a ${a}, not from '${u.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},s(du,"EventModelingValidator"),du),lz={parser:{TokenBuilder:s(()=>new sz,"TokenBuilder"),ValueConverter:s(()=>new Du,"ValueConverter")},validation:{EventModelingValidator:s(()=>new oz,"EventModelingValidator")}};function uz(t=Gt){const e=ke(bt(t),mr),r=ke(St({shared:e}),hU,lz);return e.ServiceRegistry.register(r),pN(r),{shared:e,EventModel:r}}s(uz,"createEventModelingServices");var Pt={},cz={info:s(async()=>{const{createInfoServices:t}=await er(()=>import("./info-J43DQDTF-51cd3390.js"),["assets/info-J43DQDTF-51cd3390.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Info.parser.LangiumParser;Pt.info=e},"info"),packet:s(async()=>{const{createPacketServices:t}=await er(()=>import("./packet-YPE3B663-f55b568a.js"),["assets/packet-YPE3B663-f55b568a.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Packet.parser.LangiumParser;Pt.packet=e},"packet"),pie:s(async()=>{const{createPieServices:t}=await er(()=>import("./pie-LRSECV5Y-88c1a5e6.js"),["assets/pie-LRSECV5Y-88c1a5e6.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Pie.parser.LangiumParser;Pt.pie=e},"pie"),treeView:s(async()=>{const{createTreeViewServices:t}=await er(()=>import("./treeView-BLDUP644-73ba1a83.js"),["assets/treeView-BLDUP644-73ba1a83.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().TreeView.parser.LangiumParser;Pt.treeView=e},"treeView"),architecture:s(async()=>{const{createArchitectureServices:t}=await er(()=>import("./architecture-7EHR7CIX-e08620e8.js"),["assets/architecture-7EHR7CIX-e08620e8.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Architecture.parser.LangiumParser;Pt.architecture=e},"architecture"),gitGraph:s(async()=>{const{createGitGraphServices:t}=await er(()=>import("./gitGraph-WXDBUCRP-037e225a.js"),["assets/gitGraph-WXDBUCRP-037e225a.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().GitGraph.parser.LangiumParser;Pt.gitGraph=e},"gitGraph"),eventmodeling:s(async()=>{const{createEventModelingServices:t}=await er(()=>import("./eventmodeling-FCH6USID-e6d9019e.js"),["assets/eventmodeling-FCH6USID-e6d9019e.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().EventModel.parser.LangiumParser;Pt.eventmodeling=e},"eventmodeling"),radar:s(async()=>{const{createRadarServices:t}=await er(()=>import("./radar-GUYGQ44K-6ede145d.js"),["assets/radar-GUYGQ44K-6ede145d.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Radar.parser.LangiumParser;Pt.radar=e},"radar"),treemap:s(async()=>{const{createTreemapServices:t}=await er(()=>import("./treemap-LRROVOQU-98e47821.js"),["assets/treemap-LRROVOQU-98e47821.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Treemap.parser.LangiumParser;Pt.treemap=e},"treemap"),wardley:s(async()=>{const{createWardleyServices:t}=await er(()=>import("./wardley-L42UT6IY-a27badb9.js"),["assets/wardley-L42UT6IY-a27badb9.js","assets/index-4abf3da0.js","assets/index-d674a6a4.css"]),e=t().Wardley.parser.LangiumParser;Pt.wardley=e},"wardley")};async function fz(t,e){const r=cz[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);Pt[t]||await r();const a=Pt[t].parse(e);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new dz(a);return a.value}s(fz,"parse");var pu,dz=(pu=class extends Error{constructor(e){const r=e.lexerErrors.map(a=>{const i=a.line!==void 0&&!isNaN(a.line)?a.line:"?",o=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${i}, column ${o}: ${a.message}`}).join(`
172
+ `),n=e.parserErrors.map(a=>{const i=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",o=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${i}, column ${o}: ${a.message}`}).join(`
173
+ `);super(`Parsing failed: ${r} ${n}`),this.result=e}},s(pu,"MermaidParseError"),pu);export{az as A,lz as E,jU as G,BU as I,WU as P,wU as R,ez as T,xU as W,VU as a,XU as b,KU as c,JU as d,tz as e,iz as f,UU as g,uz as h,IU as i,LU as j,DU as k,FU as l,xj as m,fz as p};