@donartcha/openlag 0.1.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 (99) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +82 -0
  3. package/bin/openlag.js +2 -0
  4. package/dist/assets/arc-4YUHkXo3.js +1 -0
  5. package/dist/assets/architectureDiagram-3BPJPVTR-WeGmL7HM.js +36 -0
  6. package/dist/assets/blockDiagram-GPEHLZMM-CtV7ubAx.js +132 -0
  7. package/dist/assets/c4Diagram-AAUBKEIU-DqYDW5c3.js +10 -0
  8. package/dist/assets/channel-Tsel3-MK.js +1 -0
  9. package/dist/assets/chunk-2J33WTMH-BE8P9tjh.js +1 -0
  10. package/dist/assets/chunk-4BX2VUAB-Bi7oLGF5.js +1 -0
  11. package/dist/assets/chunk-55IACEB6-D9Xhxp_r.js +1 -0
  12. package/dist/assets/chunk-727SXJPM-Dz8jKE60.js +206 -0
  13. package/dist/assets/chunk-AQP2D5EJ-BzmM0IeH.js +231 -0
  14. package/dist/assets/chunk-FMBD7UC4-Cvl5dpcx.js +15 -0
  15. package/dist/assets/chunk-ND2GUHAM-Dz2efqnq.js +1 -0
  16. package/dist/assets/chunk-QZHKN3VN-CwblgSnQ.js +1 -0
  17. package/dist/assets/classDiagram-4FO5ZUOK-Bgm-_cW8.js +1 -0
  18. package/dist/assets/classDiagram-v2-Q7XG4LA2-Bgm-_cW8.js +1 -0
  19. package/dist/assets/cose-bilkent-S5V4N54A-h_A3nZUx.js +1 -0
  20. package/dist/assets/cytoscape.esm-D_LviqZs.js +331 -0
  21. package/dist/assets/dagre-BM42HDAG-CN_B2Doz.js +4 -0
  22. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  23. package/dist/assets/diagram-2AECGRRQ-C9TAFwjG.js +43 -0
  24. package/dist/assets/diagram-5GNKFQAL-BThljQLo.js +10 -0
  25. package/dist/assets/diagram-KO2AKTUF-bRPq25Se.js +3 -0
  26. package/dist/assets/diagram-LMA3HP47-BubLCIus.js +24 -0
  27. package/dist/assets/diagram-OG6HWLK6-CJpfhIsS.js +24 -0
  28. package/dist/assets/erDiagram-TEJ5UH35-6Xkza9wL.js +85 -0
  29. package/dist/assets/flowDiagram-I6XJVG4X-Bq_to3hX.js +162 -0
  30. package/dist/assets/ganttDiagram-6RSMTGT7-C3CmvYl7.js +292 -0
  31. package/dist/assets/gitGraphDiagram-PVQCEYII-C93LTfrl.js +106 -0
  32. package/dist/assets/graph-CAnANduQ.js +1 -0
  33. package/dist/assets/index-0RMQQ34p.css +1 -0
  34. package/dist/assets/index-ByxguSZe.js +729 -0
  35. package/dist/assets/infoDiagram-5YYISTIA-CMfuwygl.js +2 -0
  36. package/dist/assets/init-Gi6I4Gst.js +1 -0
  37. package/dist/assets/ishikawaDiagram-YF4QCWOH-CbJ5ojDF.js +70 -0
  38. package/dist/assets/journeyDiagram-JHISSGLW-C_Xz8YyT.js +139 -0
  39. package/dist/assets/kanban-definition-UN3LZRKU-GVv_iRMq.js +89 -0
  40. package/dist/assets/katex-DkKDou_j.js +257 -0
  41. package/dist/assets/layout-DGIYPm2g.js +1 -0
  42. package/dist/assets/linear-BNEtUH2J.js +1 -0
  43. package/dist/assets/mindmap-definition-RKZ34NQL-DIsL0XSF.js +96 -0
  44. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  45. package/dist/assets/pieDiagram-4H26LBE5-CSCTSOjk.js +30 -0
  46. package/dist/assets/quadrantDiagram-W4KKPZXB-CQQ9OaFY.js +7 -0
  47. package/dist/assets/requirementDiagram-4Y6WPE33-Cjn3la_S.js +84 -0
  48. package/dist/assets/sankeyDiagram-5OEKKPKP-DoVspvVc.js +40 -0
  49. package/dist/assets/sequenceDiagram-3UESZ5HK-UsoGmL4w.js +162 -0
  50. package/dist/assets/stateDiagram-AJRCARHV-DLmf7Dc8.js +1 -0
  51. package/dist/assets/stateDiagram-v2-BHNVJYJU-jkiDZ_3u.js +1 -0
  52. package/dist/assets/timeline-definition-PNZ67QCA-HfyRxZ8p.js +120 -0
  53. package/dist/assets/vennDiagram-CIIHVFJN-B6pM3L33.js +34 -0
  54. package/dist/assets/wardley-L42UT6IY-B-LdKtrI.js +173 -0
  55. package/dist/assets/wardleyDiagram-YWT4CUSO-BD45zhOu.js +78 -0
  56. package/dist/assets/xychartDiagram-2RQKCTM6-zsDMbUiS.js +7 -0
  57. package/dist/cli/openlag.js +1793 -0
  58. package/dist/index.html +14 -0
  59. package/index.html +13 -0
  60. package/package.json +84 -0
  61. package/scripts/cli/build.ts +34 -0
  62. package/scripts/cli/dev.ts +35 -0
  63. package/scripts/cli/generate.ts +92 -0
  64. package/scripts/cli/init.ts +427 -0
  65. package/scripts/cli/lint.ts +29 -0
  66. package/scripts/cli/openlag.ts +110 -0
  67. package/scripts/cli/vite-bin.ts +8 -0
  68. package/scripts/core/parser/diagnostic.ts +34 -0
  69. package/scripts/core/parser/normalizer.ts +27 -0
  70. package/scripts/core/parser/scanner.ts +30 -0
  71. package/scripts/core/parser/schemas.ts +23 -0
  72. package/scripts/core/parser/types.ts +30 -0
  73. package/scripts/core/parser.ts +127 -0
  74. package/scripts/generate-relations.ts +53 -0
  75. package/scripts/lint/lint-engine.ts +85 -0
  76. package/scripts/lint/lint-profiles.ts +49 -0
  77. package/scripts/lint/lint-rules.ts +174 -0
  78. package/scripts/lint/lint-types.ts +43 -0
  79. package/src/App.tsx +164 -0
  80. package/src/components/DocumentationView.tsx +905 -0
  81. package/src/components/GraphView.tsx +529 -0
  82. package/src/components/GuideView.tsx +535 -0
  83. package/src/components/ImpactView.tsx +365 -0
  84. package/src/components/MarkdownRenderer.tsx +120 -0
  85. package/src/components/OrphansView.tsx +360 -0
  86. package/src/components/SettingsView.tsx +146 -0
  87. package/src/core/generated/relation-definitions.ts +622 -0
  88. package/src/core/graph/GraphQueryLayer.ts +194 -0
  89. package/src/core/registry/ArtifactRegistry.ts +19 -0
  90. package/src/core/registry/RelationRegistry.ts +27 -0
  91. package/src/core/semantic/artifact-layers.ts +43 -0
  92. package/src/core/semantic/ownership-rules.ts +13 -0
  93. package/src/core/semantic/types.ts +11 -0
  94. package/src/index.css +121 -0
  95. package/src/lib/reportUtils.ts +59 -0
  96. package/src/main.tsx +10 -0
  97. package/src/store.ts +146 -0
  98. package/src/types.ts +77 -0
  99. package/vite.config.ts +31 -0
@@ -0,0 +1,173 @@
1
+ var DN=Object.defineProperty;var MN=(t,e,r)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>MN(t,typeof e!="symbol"?e+"":e,r);import{bk as er}from"./index-ByxguSZe.js";var xN=Object.create,hc=Object.defineProperty,FN=Object.getOwnPropertyDescriptor,Fh=Object.getOwnPropertyNames,GN=Object.getPrototypeOf,jN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),UN=(t,e)=>function(){return t&&(e=(0,t[Fh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Fh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Gh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fh(e))!jN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=FN(e,a))||n.enumerable});return t},ff=(t,e,r)=>(Gh(t,e,"default"),r),jh=(t,e,r)=>(r=t!=null?xN(GN(t)):{},Gh(hc(r,"default",{value:t,enumerable:!0}),t)),Uh=t=>Gh(hc({},"__esModule",{value:!0}),t),df={};Qr(df,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ep,CodeActionContext:()=>Ap,CodeActionKind:()=>$p,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>Qd,CodeLens:()=>_p,Color:()=>ru,ColorInformation:()=>Vd,ColorPresentation:()=>Hd,Command:()=>un,CompletionItem:()=>cp,CompletionItemKind:()=>np,CompletionItemLabelDetails:()=>lp,CompletionItemTag:()=>ip,CompletionList:()=>up,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>nu,DiagnosticSeverity:()=>Jd,DiagnosticTag:()=>Zd,DocumentHighlight:()=>mp,DocumentHighlightKind:()=>hp,DocumentLink:()=>Sp,DocumentSymbol:()=>Rp,DocumentUri:()=>Kd,EOL:()=>mT,FoldingRange:()=>Xd,FoldingRangeKind:()=>Yd,FormattingOptions:()=>Cp,Hover:()=>fp,InlayHint:()=>Dp,InlayHintKind:()=>su,InlayHintLabelPart:()=>ou,InlineCompletionContext:()=>Up,InlineCompletionItem:()=>xp,InlineCompletionList:()=>Fp,InlineCompletionTriggerKind:()=>Gp,InlineValueContext:()=>Lp,InlineValueEvaluatableExpression:()=>Op,InlineValueText:()=>kp,InlineValueVariableLookup:()=>Pp,InsertReplaceEdit:()=>sp,InsertTextFormat:()=>ap,InsertTextMode:()=>op,Location:()=>Cl,LocationLink:()=>Wd,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>iu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>dp,Position:()=>ie,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>jp,SelectionRange:()=>bp,SemanticTokenModifiers:()=>Ip,SemanticTokenTypes:()=>wp,SemanticTokens:()=>Np,SignatureInformation:()=>pp,StringValue:()=>Mp,SymbolInformation:()=>vp,SymbolKind:()=>gp,SymbolTag:()=>yp,TextDocument:()=>Bp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>ep,TextDocumentItem:()=>rp,TextEdit:()=>rr,URI:()=>tu,VersionedTextDocumentIdentifier:()=>tp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>au,WorkspaceFolder:()=>zp,WorkspaceSymbol:()=>Tp,integer:()=>qd,uinteger:()=>_l});var Kd,tu,qd,_l,ie,ee,Cl,Wd,ru,Vd,Hd,Yd,Xd,nu,Jd,Zd,Qd,Sl,un,rr,fn,Xe,Tr,bl,Ra,$a,Aa,au,hl,$d,hT,ep,tp,wl,rp,iu,Ea,np,ap,ip,sp,op,lp,cp,up,Il,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,$p,Nl,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,Lp,su,ou,Dp,Mp,xp,Fp,Gp,jp,Up,zp,mT,Bp,_y,_,mc=UN({"../../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})(Kd||(Kd={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(tu||(tu={})),(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})(qd||(qd={})),(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})(_l||(_l={})),(function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o})(ie||(ie={})),(function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o})(ee||(ee={})),(function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o})(Cl||(Cl={})),(function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;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})(Wd||(Wd={})),(function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;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})(ru||(ru={})),(function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&ru.is(l.color)}s(o,"is"),a.is=o})(Vd||(Vd={})),(function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;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})(Hd||(Hd={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(Yd||(Yd={})),(function(a){function i(c,l,u,f,d,p){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(c){const l=c;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})(Xd||(Xd={})),(function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o})(nu||(nu={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(Jd||(Jd={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Zd||(Zd={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i})(Qd||(Qd={})),(function(a){function i(c,l,u,f,d,p){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,nu.is))}s(o,"is"),a.is=o})(Sl||(Sl={})),(function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o})(un||(un={})),(function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l})(rr||(rr={})),(function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;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})(fn||(fn={})),(function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i})(Xe||(Xe={})),(function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l})(Tr||(Tr={})),(function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(bl||(bl={})),(function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;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})(Ra||(Ra={})),(function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;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})($a||($a={})),(function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;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})(Aa||(Aa={})),(function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i})(au||(au={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),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),$d=(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 c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}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 $d(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):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(wl.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 c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}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 c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new $d,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,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=$a.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o})(ep||(ep={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o})(tp||(tp={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o})(wl||(wl={})),(function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o})(rp||(rp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i})(iu||(iu={})),(function(a){function i(o){const c=o;return _.objectLiteral(o)&&iu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i})(Ea||(Ea={})),(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})(np||(np={})),(function(a){a.PlainText=1,a.Snippet=2})(ap||(ap={})),(function(a){a.Deprecated=1})(ip||(ip={})),(function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o})(sp||(sp={})),(function(a){a.asIs=1,a.adjustIndentation=2})(op||(op={})),(function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i})(lp||(lp={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(cp||(cp={})),(function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i})(up||(up={})),(function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o})(Il||(Il={})),(function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i})(fp||(fp={})),(function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i})(dp||(dp={})),(function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i})(pp||(pp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(hp||(hp={})),(function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i})(mp||(mp={})),(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})(gp||(gp={})),(function(a){a.Deprecated=1})(yp||(yp={})),(function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(vp||(vp={})),(function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i})(Tp||(Tp={})),(function(a){function i(c,l,u,f,d,p){let m={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(c){let l=c;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})(Rp||(Rp={})),(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"})($p||($p={})),(function(a){a.Invoked=1,a.Automatic=2})(Nl||(Nl={})),(function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.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||au.is(l.edit))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o})(_p||(_p={})),(function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o})(Sp||(Sp={})),(function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(bp||(bp={})),(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"})(wp||(wp={})),(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"})(Ip||(Ip={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i})(Np||(Np={})),(function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o})(kp||(kp={})),(function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(Op||(Op={})),(function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o})(Lp||(Lp={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(su||(su={})),(function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o})(ou||(ou={})),(function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,ou.is))&&(l.kind===void 0||su.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o})(Dp||(Dp={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(Mp||(Mp={})),(function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i})(xp||(xp={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(Fp||(Fp={})),(function(a){a.Invoked=0,a.Automatic=1})(Gp||(Gp={})),(function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i})(Up||(Up={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&tu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i})(zp||(zp={})),mT=[`
2
+ `,`\r
3
+ `,"\r"],(function(a){function i(u,f,d,p){return new _y(u,f,d,p)}s(i,"create"),a.create=i;function o(u){let f=u;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 c(u,f){let d=u.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=u.offsetAt(v.range.start),T=u.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(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const d=u.length/2|0,p=u.slice(0,d),m=u.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?u[E++]=p[g++]:u[E++]=m[v++];for(;g<p.length;)u[E++]=p[g++];for(;v<m.length;)u[E++]=m[v++];return u}s(l,"mergeSort")})(Bp||(Bp={})),_y=(n=class{constructor(i,o,c,l){this._uri=i,this._languageId=o,this._version=c,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),c=this.offsetAt(i.end);return this._content.substring(o,c)}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,c=!0;for(let l=0;l<o.length;l++){c&&(i.push(l),c=!1);let u=o.charAt(l);c=u==="\r"||u===`
4
+ `,u==="\r"&&l+1<o.length&&o.charAt(l+1)===`
5
+ `&&l++}c&&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(),c=0,l=o.length;if(l===0)return ie.create(0,i);for(;c<l;){let f=Math.floor((c+l)/2);o[f]>i?l=f:c=f+1}let u=c-1;return ie.create(u,i-o[u])}offsetAt(i){let o=this.getLineOffsets();if(i.line>=o.length)return this._content.length;if(i.line<0)return 0;let c=o[i.line],l=i.line+1<o.length?o[i.line+1]:this._content.length;return Math.max(Math.min(c+i.character,l),c)}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 c(T){return typeof T>"u"}s(c,"undefined"),a.undefined=c;function l(T){return T===!0||T===!1}s(l,"boolean"),a.boolean=l;function u(T){return i.call(T)==="[object String]"}s(u,"string"),a.string=u;function f(T){return i.call(T)==="[object Number]"}s(f,"number"),a.number=f;function d(T,w,C){return i.call(T)==="[object Number]"&&w<=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,w){return Array.isArray(T)&&T.every(w)}s(E,"typedArray"),a.typedArray=E})(_||(_={}))}}),zn=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}}),gc=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 c(l){return o(l)&&l.every(u=>r(u))}s(c,"stringArray"),t.stringArray=c}}),jo=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=zn(),r;(function(c){const l={dispose(){}};c.None=function(){return l}})(r||(t.Event=r={}));var n=(i=class{add(l,u=null,f){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(l),this._contexts.push(u),Array.isArray(f)&&f.push({dispose:s(()=>this.remove(l,u),"dispose")})}remove(l,u=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]===u){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 u=[],f=this._callbacks.slice(0),d=this._contexts.slice(0);for(let p=0,m=f.length;p<m;p++)try{u.push(f[p].apply(d[p],l))}catch(g){(0,e.default)().console.error(g)}return u}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,u,f)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(l,u);const d={dispose:s(()=>{this._callbacks&&(this._callbacks.remove(l,u),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(){}}}),pf=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){var l,u;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e=zn(),r=gc(),n=jo(),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),c=(u=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(u,"CancellationTokenSource"),u);t.CancellationTokenSource=c}}),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,b,O,M,L,j,F,te,U,Q,fe,de,pe,ye,Ne,he,J,Ue,le,He;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=gc(),r;(function(ve){ve.ParseError=-32700,ve.InvalidRequest=-32600,ve.MethodNotFound=-32601,ve.InvalidParams=-32602,ve.InternalError=-32603,ve.jsonrpcReservedErrorRangeStart=-32099,ve.serverErrorStart=-32099,ve.MessageWriteError=-32099,ve.MessageReadError=-32098,ve.PendingResponseRejected=-32097,ve.ConnectionInactive=-32096,ve.ServerNotInitialized=-32002,ve.UnknownErrorCode=-32001,ve.jsonrpcReservedErrorRangeEnd=-32e3,ve.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={}));var n=(P=class extends Error{constructor(x,ze,Xt){super(ze),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,ze){this.method=x,this.numberOfParams=ze}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 c=($=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s($,"RequestType"),$);t.RequestType=c;var l=(A=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(A,"RequestType1"),A);t.RequestType1=l;var u=(b=class extends i{constructor(x){super(x,2)}},s(b,"RequestType2"),b);t.RequestType2=u;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=(te=class extends i{constructor(x){super(x,8)}},s(te,"RequestType8"),te);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,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(Q,"NotificationType"),Q);t.NotificationType=T;var w=(fe=class extends i{constructor(x){super(x,0)}},s(fe,"NotificationType0"),fe);t.NotificationType0=w;var C=(de=class extends i{constructor(x,ze=a.auto){super(x,1),this._parameterStructures=ze}get parameterStructures(){return this._parameterStructures}},s(de,"NotificationType1"),de);t.NotificationType1=C;var k=(pe=class extends i{constructor(x){super(x,2)}},s(pe,"NotificationType2"),pe);t.NotificationType2=k;var B=(ye=class extends i{constructor(x){super(x,3)}},s(ye,"NotificationType3"),ye);t.NotificationType3=B;var re=(Ne=class extends i{constructor(x){super(x,4)}},s(Ne,"NotificationType4"),Ne);t.NotificationType4=re;var X=(he=class extends i{constructor(x){super(x,5)}},s(he,"NotificationType5"),he);t.NotificationType5=X;var ge=(J=class extends i{constructor(x){super(x,6)}},s(J,"NotificationType6"),J);t.NotificationType6=ge;var _e=(Ue=class extends i{constructor(x){super(x,7)}},s(Ue,"NotificationType7"),Ue);t.NotificationType7=_e;var Ie=(le=class extends i{constructor(x){super(x,8)}},s(le,"NotificationType8"),le);t.NotificationType8=Ie;var oe=(He=class extends i{constructor(x){super(x,9)}},s(He,"NotificationType9"),He);t.NotificationType9=oe;var tt;(function(ve){function x(Nt){const Te=Nt;return Te&&e.string(Te.method)&&(e.string(Te.id)||e.number(Te.id))}s(x,"isRequest"),ve.isRequest=x;function ze(Nt){const Te=Nt;return Te&&e.string(Te.method)&&Nt.id===void 0}s(ze,"isNotification"),ve.isNotification=ze;function Xt(Nt){const Te=Nt;return Te&&(Te.result!==void 0||!!Te.error)&&(e.string(Te.id)||e.number(Te.id)||Te.id===null)}s(Xt,"isResponse"),ve.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(c){c.None=0,c.First=1,c.AsOld=c.First,c.Last=2,c.AsNew=c.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,u=r.None){const f=this._map.get(l);if(f)return u!==r.None&&this.touch(f,u),f.value}set(l,u,f=r.None){let d=this._map.get(l);if(d)d.value=u,f!==r.None&&this.touch(d,f);else{switch(d={key:l,value:u,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 u=this._map.get(l);if(u)return this._map.delete(l),this.removeItem(u),this._size--,u.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,u){const f=this._state;let d=this._head;for(;d;){if(u?l.bind(u)(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 u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.key,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}values(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:u.value,done:!1};return u=u.next,d}else return{value:void 0,done:!0}},"next")};return f}entries(){const l=this._state;let u=this._head;const f={[Symbol.iterator]:()=>f,next:s(()=>{if(this._state!==l)throw new Error("LinkedMap got modified during iteration.");if(u){const d={value:[u.key,u.value],done:!1};return u=u.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 u=this._head,f=this.size;for(;u&&f>l;)this._map.delete(u.key),u=u.next,f--;this._head=u,this._size=f,u&&(u.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 u=l.next,f=l.previous;if(!u||!f)throw new Error("Invalid list");u.previous=f,f.next=u}l.next=void 0,l.previous=void 0,this._state++}touch(l,u){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(u!==r.First&&u!==r.Last)){if(u===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(u===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((u,f)=>{l.push([f,u])}),l}fromJSON(l){this.clear();for(const[u,f]of l)this.set(u,f)}},s(i,"LinkedMap"),i);t.LinkedMap=n;var a=(o=class extends n{constructor(l,u=1){super(),this._limit=l,this._ratio=Math.min(Math.max(0,u),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,u=r.AsNew){return super.get(l,u)}peek(l){return super.get(l,r.None)}set(l,u){return super.set(l,u,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}}),zN=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={}))}}),BN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){var c,l,u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e=pf(),r;(function(d){d.Continue=0,d.Cancelled=1})(r||(r={}));var n=(c=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(c,"SharedArraySenderStrategy"),c);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=(u=class{constructor(p){this.token=new a(p)}cancel(){}dispose(){}},s(u,"SharedArrayBufferCancellationTokenSource"),u),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=zn(),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,c)=>{this._waiting.push({thunk:i,resolve:o,reject:c}),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(c=>{this._active--,i.resolve(c),this.runNext()},c=>{this._active--,i.reject(c),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}}),KN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){var u,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e=zn(),r=gc(),n=jo(),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=(u=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(u,"AbstractMessageReader"),u);t.AbstractMessageReader=o;var c;(function(d){function p(m){let g,v;const E=new Map;let T;const w=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,w.set(T.name,T)),m.contentTypeDecoders!==void 0)for(const C of m.contentTypeDecoders)w.set(C.name,C)}return T===void 0&&(T=(0,e.default)().applicationJson.decoder,w.set(T.name,T)),{charset:g,contentDecoder:v,contentDecoders:E,contentTypeDecoder:T,contentTypeDecoders:w}}s(p,"fromOptions"),d.fromOptions=p})(c||(c={}));var l=(f=class extends o{constructor(p,m){super(),this.readable=p,this.options=c.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}}),qN=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=zn(),r=gc(),n=vT(),a=jo(),i="Content-Length: ",o=`\r
7
+ `,c;(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})(c||(t.MessageWriter=c={}));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 u;(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})(u||(u={}));var f=(p=class extends l{constructor(g,v){super(),this.writable=g,this.options=u.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}}),WN=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(c="utf-8"){this._encoding=c,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(c){const l=typeof c=="string"?this.fromString(c,this._encoding):c;this._chunks.push(l),this._totalLength+=l.byteLength}tryReadHeaders(c=!1){if(this._chunks.length===0)return;let l=0,u=0,f=0,d=0;e:for(;u<this._chunks.length;){const v=this._chunks[u];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,u++}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 w=E.substr(0,T),C=E.substr(T+1).trim();m.set(c?w.toLowerCase():w,C)}return m}tryReadBody(c){if(!(this._totalLength<c))return this._read(c)}get numberOfBytes(){return this._totalLength}_read(c){if(c===0)return this.emptyBuffer();if(c>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===c){const d=this._chunks[0];return this._chunks.shift(),this._totalLength-=c,this.asNative(d)}if(this._chunks[0].byteLength>c){const d=this._chunks[0],p=this.asNative(d,c);return this._chunks[0]=d.slice(c),this._totalLength-=c,p}const l=this.allocNative(c);let u=0,f=0;for(;c>0;){const d=this._chunks[f];if(d.byteLength>c){const p=d.slice(0,c);l.set(p,u),u+=c,this._chunks[f]=d.slice(c),this._totalLength-=c,c-=c}else l.set(d,u),u+=d.byteLength,this._chunks.shift(),this._totalLength-=d.byteLength,c-=d.byteLength}return l}},s(i,"AbstractMessageBuffer"),i);t.AbstractMessageBuffer=a}}),VN=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=zn(),r=gc(),n=gT(),a=yT(),i=jo(),o=pf(),c;(function(R){R.type=new n.NotificationType("$/cancelRequest")})(c||(c={}));var l;(function(R){function I($){return typeof $=="string"||typeof $=="number"}s(I,"is"),R.is=I})(l||(t.ProgressToken=l={}));var u;(function(R){R.type=new n.NotificationType("$/progress")})(u||(u={}));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 w=(S=class extends Error{constructor(I,$){super($),this.code=I,Object.setPrototypeOf(this,S.prototype)}},s(S,"ConnectionError"),S);t.ConnectionError=w;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 re;(function(R){R.Message=Object.freeze({createCancellationTokenSource($){return new o.CancellationTokenSource}});function I($){return k.is($)||B.is($)}s(I,"is"),R.is=I})(re||(t.CancellationReceiverStrategy=re={}));var X;(function(R){R.Message=Object.freeze({sendCancellation($,A){return $.sendNotification(c.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 ge;(function(R){R.Message=Object.freeze({receiver:re.Message,sender:X.Message});function I($){const A=$;return A&&re.is(A.receiver)&&X.is(A.sender)}s(I,"is"),R.is=I})(ge||(t.CancellationStrategy=ge={}));var _e;(function(R){function I($){const A=$;return A&&r.func(A.handleMessage)}s(I,"is"),R.is=I})(_e||(t.MessageStrategy=_e={}));var Ie;(function(R){function I($){const A=$;return A&&(ge.is(A.cancellationStrategy)||C.is(A.connectionStrategy)||_e.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 b=$!==void 0?$:t.NullLogger;let O=0,M=0,L=0;const j="2.0";let F;const te=new Map;let U;const Q=new Map,fe=new Map;let de,pe=new a.LinkedMap,ye=new Map,Ne=new Set,he=new Map,J=p.Off,Ue=g.Text,le,He=oe.New;const ve=new i.Emitter,x=new i.Emitter,ze=new i.Emitter,Xt=new i.Emitter,Nt=new i.Emitter,Te=A&&A.cancellationStrategy?A.cancellationStrategy:ge.Message;function ca(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(ca,"createRequestQueueKey");function Jo(y){return y===null?"res-unknown-"+(++L).toString():"res-"+y.toString()}s(Jo,"createResponseQueueKey");function Zo(){return"not-"+(++M).toString()}s(Zo,"createNotificationQueueKey");function Qo(y,N){n.Message.isRequest(N)?y.set(ca(N.id),N):n.Message.isResponse(N)?y.set(Jo(N.id),N):y.set(Zo(),N)}s(Qo,"addMessageToQueue");function el(y){}s(el,"cancelUndispatched");function ua(){return He===oe.Listening}s(ua,"isListening");function fa(){return He===oe.Closed}s(fa,"isClosed");function Jt(){return He===oe.Disposed}s(Jt,"isDisposed");function da(){(He===oe.New||He===oe.Listening)&&(He=oe.Closed,x.fire(void 0))}s(da,"closeHandler");function tl(y){ve.fire([y,void 0,void 0])}s(tl,"readErrorHandler");function rl(y){ve.fire(y)}s(rl,"writeErrorHandler"),R.onClose(da),R.onError(tl),I.onClose(da),I.onError(rl);function pa(){de||pe.size===0||(de=(0,e.default)().timer.setImmediate(()=>{de=void 0,nl()}))}s(pa,"triggerMessageQueue");function ha(y){n.Message.isRequest(y)?al(y):n.Message.isNotification(y)?sl(y):n.Message.isResponse(y)?il(y):ol(y)}s(ha,"handleMessage");function nl(){if(pe.size===0)return;const y=pe.shift();try{const N=A==null?void 0:A.messageStrategy;_e.is(N)?N.handleMessage(y,ha):ha(y)}finally{pa()}}s(nl,"processMessageQueue");const Mc=s(y=>{try{if(n.Message.isNotification(y)&&y.method===c.type.method){const N=y.params.id,D=ca(N),G=pe.get(D);if(n.Message.isRequest(G)){const me=A==null?void 0:A.connectionStrategy,Re=me&&me.cancelUndispatched?me.cancelUndispatched(G,el):void 0;if(Re&&(Re.error!==void 0||Re.result!==void 0)){pe.delete(D),he.delete(N),Re.id=G.id,Gr(Re,y.method,Date.now()),I.write(Re).catch(()=>b.error("Sending response for canceled message failed."));return}}const Ce=he.get(N);if(Ce!==void 0){Ce.cancel(),an(y);return}else Ne.add(N)}Qo(pe,y)}finally{pa()}},"callback");function al(y){if(Jt())return;function N(ne,Le,ce){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,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(N,"reply");function D(ne,Le,ce){const Ke={jsonrpc:j,id:y.id,error:ne.toJson()};Gr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(D,"replyError");function G(ne,Le,ce){ne===void 0&&(ne=null);const Ke={jsonrpc:j,id:y.id,result:ne};Gr(Ke,Le,ce),I.write(Ke).catch(()=>b.error("Sending response failed."))}s(G,"replySuccess"),ul(y);const Ce=te.get(y.method);let me,Re;Ce&&(me=Ce.type,Re=Ce.handler);const Ge=Date.now();if(Re||F){const ne=y.id??String(Date.now()),Le=k.is(Te.receiver)?Te.receiver.createCancellationTokenSource(ne):Te.receiver.createCancellationTokenSource(y);y.id!==null&&Ne.has(y.id)&&Le.cancel(),y.id!==null&&he.set(ne,Le);try{let ce;if(Re)if(y.params===void 0){if(me!==void 0&&me.numberOfParams!==0){D(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines ${me.numberOfParams} params but received none.`),y.method,Ge);return}ce=Re(Le.token)}else if(Array.isArray(y.params)){if(me!==void 0&&me.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}ce=Re(...y.params,Le.token)}else{if(me!==void 0&&me.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}ce=Re(y.params,Le.token)}else F&&(ce=F(y.method,y.params,Le.token));const Ke=ce;ce?Ke.then?Ke.then(rt=>{he.delete(ne),N(rt,y.method,Ge)},rt=>{he.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)}):(he.delete(ne),N(ce,y.method,Ge)):(he.delete(ne),G(ce,y.method,Ge))}catch(ce){he.delete(ne),ce instanceof n.ResponseError?N(ce,y.method,Ge):ce&&r.string(ce.message)?D(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ce.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(al,"handleRequest");function il(y){if(!Jt())if(y.id===null)y.error?b.error(`Received response message without id: Error is:
10
+ ${JSON.stringify(y.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const N=y.id,D=ye.get(N);if(fl(y,D),D!==void 0){ye.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?b.error(`Response handler '${D.method}' failed with message: ${G.message}`):b.error(`Response handler '${D.method}' failed unexpectedly.`)}}}}s(il,"handleResponse");function sl(y){if(Jt())return;let N,D;if(y.method===c.type.method){const G=y.params.id;Ne.delete(G),an(y);return}else{const G=Q.get(y.method);G&&(D=G.handler,N=G.type)}if(D||U)try{if(an(y),D)if(y.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received none.`),D();else if(Array.isArray(y.params)){const G=y.params;y.method===u.type.method&&G.length===2&&l.is(G[0])?D({token:G[0],value:G[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${y.method} defines parameters by name but received parameters by position`),N.numberOfParams!==y.params.length&&b.error(`Notification ${y.method} defines ${N.numberOfParams} params but received ${G.length} arguments`)),D(...G))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&b.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?b.error(`Notification handler '${y.method}' failed with message: ${G.message}`):b.error(`Notification handler '${y.method}' failed unexpectedly.`)}else ze.fire(y)}s(sl,"handleNotification");function ol(y){if(!y){b.error("Received empty message.");return}b.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=ye.get(D);G&&G.reject(new Error("The received response has neither a result nor an error property."))}}s(ol,"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 ll(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
12
+
13
+ `),le.log(`Sending request '${y.method} - (${y.id})'.`,N)}else Zt("send-request",y)}s(ll,"traceSendingRequest");function cl(y){if(!(J===p.Off||!le))if(Ue===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
+ `),le.log(`Sending notification '${y.method}'.`,N)}else Zt("send-notification",y)}s(cl,"traceSendingNotification");function Gr(y,N,D){if(!(J===p.Off||!le))if(Ue===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
+ `)),le.log(`Sending response '${N} - (${y.id})'. Processing request took ${Date.now()-D}ms`,G)}else Zt("send-response",y)}s(Gr,"traceSendingResponse");function ul(y){if(!(J===p.Off||!le))if(Ue===g.Text){let N;(J===p.Verbose||J===p.Compact)&&y.params&&(N=`Params: ${kt(y.params)}
24
+
25
+ `),le.log(`Received request '${y.method} - (${y.id})'.`,N)}else Zt("receive-request",y)}s(ul,"traceReceivedRequest");function an(y){if(!(J===p.Off||!le||y.method===E.type.method))if(Ue===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
+ `),le.log(`Received notification '${y.method}'.`,N)}else Zt("receive-notification",y)}s(an,"traceReceivedNotification");function fl(y,N){if(!(J===p.Off||!le))if(Ue===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}).`:"";le.log(`Received response '${N.method} - (${y.id})' in ${Date.now()-N.timerStart}ms.${G}`,D)}else le.log(`Received response ${y.id} without active response promise.`,D)}else Zt("receive-response",y)}s(fl,"traceReceivedResponse");function Zt(y,N){if(!le||J===p.Off)return;const D={isLSPMessage:!0,type:y,message:N,timestamp:Date.now()};le.log(D)}s(Zt,"logLSPMessage");function yr(){if(fa())throw new w(T.Closed,"Connection is closed.");if(Jt())throw new w(T.Disposed,"Connection is disposed.")}s(yr,"throwIfClosedOrDisposed");function dl(){if(ua())throw new w(T.AlreadyListening,"Connection is already listening")}s(dl,"throwIfListening");function pl(){if(!ua())throw new Error("Call listen() first.")}s(pl,"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 ke(y){return y!=null&&!Array.isArray(y)&&typeof y=="object"}s(ke,"isNamedParam");function H(y,N){switch(y){case n.ParameterStructures.auto:return ke(N)?se(N):[h(N)];case n.ParameterStructures.byName:if(!ke(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 ma={sendNotification:s((y,...N)=>{yr();let D,G;if(r.string(y)){D=y;const me=N[0];let Re=0,Ge=n.ParameterStructures.auto;n.ParameterStructures.is(me)&&(Re=1,Ge=me);let ne=N.length;const Le=ne-Re;switch(Le){case 0:G=void 0;break;case 1:G=H(Ge,N[Re]);break;default:if(Ge===n.ParameterStructures.byName)throw new Error(`Received ${Le} parameters for 'by Name' notification parameter structure.`);G=N.slice(Re,ne).map(ce=>h(ce));break}}else{const me=N;D=y.method,G=Oe(y,me)}const Ce={jsonrpc:j,method:D,params:G};return cl(Ce),I.write(Ce).catch(me=>{throw b.error("Sending notification failed."),me})},"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(fe.has(N))throw new Error(`Progress handler for token ${N} already registered`);return fe.set(N,D),{dispose:s(()=>{fe.delete(N)},"dispose")}},"onProgress"),sendProgress:s((y,N,D)=>ma.sendNotification(u.type,{token:N,value:D}),"sendProgress"),onUnhandledProgress:Xt.event,sendRequest:s((y,...N)=>{yr(),pl();let D,G,Ce;if(r.string(y)){D=y;const ne=N[0],Le=N[N.length-1];let ce=0,Ke=n.ParameterStructures.auto;n.ParameterStructures.is(ne)&&(ce=1,Ke=ne);let rt=N.length;o.CancellationToken.is(Le)&&(rt=rt-1,Ce=Le);const Qt=rt-ce;switch(Qt){case 0:G=void 0;break;case 1:G=H(Ke,N[ce]);break;default:if(Ke===n.ParameterStructures.byName)throw new Error(`Received ${Qt} parameters for 'by Name' request parameter structure.`);G=N.slice(ce,rt).map(LN=>h(LN));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 me=O++;let Re;Ce&&(Re=Ce.onCancellationRequested(()=>{const ne=Te.sender.sendCancellation(ma,me);return ne===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${me}`),Promise.resolve()):ne.catch(()=>{b.log(`Sending cancellation messages for id ${me} failed`)})}));const Ge={jsonrpc:j,id:me,method:D,params:G};return ll(Ge),typeof Te.sender.enableCancellation=="function"&&Te.sender.enableCancellation(Ge),new Promise(async(ne,Le)=>{const ce=s(Qt=>{ne(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"resolveWithCleanup"),Ke=s(Qt=>{Le(Qt),Te.sender.cleanup(me),Re==null||Re.dispose()},"rejectWithCleanup"),rt={method:D,timerStart:Date.now(),resolve:ce,reject:Ke};try{await I.write(Ge),ye.set(me,rt)}catch(Qt){throw b.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,te.set(y,{handler:N,type:void 0}))):N!==void 0&&(D=y.method,te.set(y.method,{type:y,handler:N})),{dispose:s(()=>{D!==null&&(D!==void 0?te.delete(D):F=void 0)},"dispose")}},"onRequest"),hasPendingResponse:s(()=>ye.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,Ue=Ce,J===p.Off?le=void 0:le=N,G&&!fa()&&!Jt()&&await ma.sendNotification(v.type,{value:p.toString(y)})},"trace"),onError:ve.event,onClose:x.event,onUnhandledNotification:ze.event,onDispose:Nt.event,end:s(()=>{I.end()},"end"),dispose:s(()=>{if(Jt())return;He=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 ye.values())N.reject(y);ye=new Map,he=new Map,Ne=new Set,pe=new a.LinkedMap,r.func(I.dispose)&&I.dispose(),r.func(R.dispose)&&R.dispose()},"dispose"),listen:s(()=>{yr(),dl(),He=oe.Listening,R.listen(Mc)},"listen"),inspect:s(()=>{(0,e.default)().console.log("inspect")},"inspect")};return ma.onNotification(E.type,y=>{if(J===p.Off||!le)return;const N=J===p.Verbose||J===p.Compact;le.log(y.message,N?y.verbose:void 0)}),ma.onNotification(u.type,y=>{const N=fe.get(y.token);N?N(y.value):Xt.fire(y)}),ma}s(tt,"createMessageConnection"),t.createMessageConnection=tt}}),Kp=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=zN();Object.defineProperty(t,"Disposable",{enumerable:!0,get:s(function(){return n.Disposable},"get")});var a=jo();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=pf();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=BN();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 c=KN();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:s(function(){return c.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:s(function(){return c.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:s(function(){return c.ReadableStreamMessageReader},"get")});var l=qN();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 u=WN();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:s(function(){return u.AbstractMessageBuffer},"get")});var f=VN();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=zn();t.RAL=d.default}}),HN=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){var l,u,f;Object.defineProperty(t,"__esModule",{value:!0});var e=Kp(),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=(u=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(u,"ReadableStreamWrapper"),u),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 c(){return o}s(c,"RIL"),(function(d){function p(){e.RAL.install(o)}s(p,"install"),d.install=p})(c||(c={})),t.default=c}}),Uo=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var l,u;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=HN();n.default.install();var a=Kp();r(Kp(),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=(u=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(u,"BrowserMessageWriter"),u);t.BrowserMessageWriter=o;function c(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(c,"createMessageConnection"),t.createMessageConnection=c}}),Cy=Y({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=Uo()}}),Me=Y({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){var l,u,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=Uo(),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=(u=class extends e.RequestType0{constructor(g){super(g)}},s(u,"ProtocolRequestType0"),u);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 c=(p=class extends e.NotificationType{constructor(g){super(g,e.ParameterStructures.byName)}},s(p,"ProtocolNotificationType"),p);t.ProtocolNotificationType=c}}),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 c(f){return o(f)&&f.every(d=>r(d))}s(c,"stringArray"),t.stringArray=c;function l(f,d){return Array.isArray(f)&&f.every(d)}s(l,"typedArray"),t.typedArray=l;function u(f){return f!==null&&typeof f=="object"}s(u,"objectLiteral"),t.objectLiteral=u}}),YN=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={}))}}),XN=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={}))}}),JN=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={}))}}),ZN=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={}))}}),QN=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={}))}}),ek=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={}))}}),tk=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={}))}}),rk=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={}))}}),nk=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=Uo(),r=Me(),n;(function(o){o.type=new e.ProgressType;function c(l){return l===o.type}s(c,"is"),o.is=c})(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={}))}}),ak=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={}))}}),ik=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 c;(function(l){l.method="workspace/semanticTokens/refresh",l.messageDirection=e.MessageDirection.serverToClient,l.type=new e.ProtocolRequestType0(l.method)})(c||(t.SemanticTokensRefreshRequest=c={}))}}),sk=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={}))}}),ok=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={}))}}),lk=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(u){u.file="file",u.folder="folder"})(r||(t.FileOperationPatternKind=r={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(n||(t.WillCreateFilesRequest=n={}));var a;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(a||(t.DidCreateFilesNotification=a={}));var i;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(i||(t.WillRenameFilesRequest=i={}));var o;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(o||(t.DidRenameFilesNotification=o={}));var c;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolNotificationType(u.method)})(c||(t.DidDeleteFilesNotification=c={}));var l;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method)})(l||(t.WillDeleteFilesRequest=l={}))}}),ck=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={}))}}),uk=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={}))}}),fk=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={}))}}),dk=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={}))}}),pk=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=Uo(),r=zh(),n=Me(),a;(function(u){function f(d){const p=d;return p&&r.boolean(p.retriggerRequest)}s(f,"is"),u.is=f})(a||(t.DiagnosticServerCancellationData=a={}));var i;(function(u){u.Full="full",u.Unchanged="unchanged"})(i||(t.DocumentDiagnosticReportKind=i={}));var o;(function(u){u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(o||(t.DocumentDiagnosticRequest=o={}));var c;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new e.ProgressType})(c||(t.WorkspaceDiagnosticRequest=c={}));var l;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)})(l||(t.DiagnosticRefreshRequest=l={}))}}),hk=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=(mc(),Uh(df)),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(w,C){const k={executionOrder:w};return(C===!0||C===!1)&&(k.success=C),k}s(v,"create"),g.create=v;function E(w){const C=w;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(w,C){return w===C?!0:w==null||C===null||C===void 0?!1:w.executionOrder===C.executionOrder&&w.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)&&!w(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 w(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),re=Array.isArray(k);if(B!==re)return!1;if(B&&re){if(C.length!==k.length)return!1;for(let X=0;X<C.length;X++)if(!w(C[X],k[X]))return!1}if(r.objectLiteral(C)&&r.objectLiteral(k)){const X=Object.keys(C),ge=Object.keys(k);if(X.length!==ge.length||(X.sort(),ge.sort(),!w(X,ge)))return!1;for(let _e=0;_e<X.length;_e++){const Ie=X[_e];if(!w(C[Ie],k[Ie]))return!1}}return!0}s(w,"equalsMetadata")})(o||(t.NotebookCell=o={}));var c;(function(g){function v(T,w,C,k){return{uri:T,notebookType:w,version:C,cells:k}}s(v,"create"),g.create=v;function E(T){const w=T;return r.objectLiteral(w)&&r.string(w.uri)&&e.integer.is(w.version)&&r.typedArray(w.cells,o.is)}s(E,"is"),g.is=E})(c||(t.NotebookDocument=c={}));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 u;(function(g){g.method="notebookDocument/didOpen",g.messageDirection=n.MessageDirection.clientToServer,g.type=new n.ProtocolNotificationType(g.method),g.registrationMethod=l.method})(u||(t.DidOpenNotebookDocumentNotification=u={}));var f;(function(g){function v(T){const w=T;return r.objectLiteral(w)&&e.uinteger.is(w.start)&&e.uinteger.is(w.deleteCount)&&(w.cells===void 0||r.typedArray(w.cells,o.is))}s(v,"is"),g.is=v;function E(T,w,C){const k={start:T,deleteCount:w};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={}))}}),mk=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={}))}}),gk=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=(mc(),Uh(df)),n=zh(),a=YN();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:s(function(){return a.ImplementationRequest},"get")});var i=XN();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:s(function(){return i.TypeDefinitionRequest},"get")});var o=JN();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 c=ZN();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:s(function(){return c.ConfigurationRequest},"get")});var l=QN();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 u=ek();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:s(function(){return u.FoldingRangeRequest},"get")}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:s(function(){return u.FoldingRangeRefreshRequest},"get")});var f=tk();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:s(function(){return f.DeclarationRequest},"get")});var d=rk();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:s(function(){return d.SelectionRangeRequest},"get")});var p=nk();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=ak();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=ik();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=sk();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:s(function(){return v.ShowDocumentRequest},"get")});var E=ok();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:s(function(){return E.LinkedEditingRangeRequest},"get")});var T=lk();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 w=ck();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:s(function(){return w.UniquenessLevel},"get")}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:s(function(){return w.MonikerKind},"get")}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:s(function(){return w.MonikerRequest},"get")});var C=uk();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=fk();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=dk();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 re=pk();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:s(function(){return re.DiagnosticServerCancellationData},"get")}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:s(function(){return re.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:s(function(){return re.DocumentDiagnosticRequest},"get")}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:s(function(){return re.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:s(function(){return re.DiagnosticRefreshRequest},"get")});var X=hk();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 ge=mk();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:s(function(){return ge.InlineCompletionRequest},"get")});var _e;(function(h){function se(ke){const H=ke;return n.string(H)||n.string(H.language)||n.string(H.scheme)||n.string(H.pattern)}s(se,"is"),h.is=se})(_e||(t.TextDocumentFilter=_e={}));var Ie;(function(h){function se(ke){const H=ke;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(ke){const H=ke;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(ke){if(!Array.isArray(ke))return!1;for(let H of ke)if(!n.string(H)&&!_e.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(ke){const H=ke;return H&&n.string(H.id)&&H.id.length>0}s(se,"hasId"),h.hasId=se})(A||(t.StaticRegistrationOptions=A={}));var b;(function(h){function se(ke){const H=ke;return H&&(H.documentSelector===null||tt.is(H.documentSelector))}s(se,"is"),h.is=se})(b||(t.TextDocumentRegistrationOptions=b={}));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 ke(H){const Oe=H;return Oe&&n.boolean(Oe.workDoneProgress)}s(ke,"hasWorkDoneProgress"),h.hasWorkDoneProgress=ke})(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 te;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(te||(t.ExitNotification=te={}));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 fe;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(fe||(t.ShowMessageNotification=fe={}));var de;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(de||(t.ShowMessageRequest=de={}));var pe;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(pe||(t.LogMessageNotification=pe={}));var ye;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(ye||(t.TelemetryEventNotification=ye={}));var Ne;(function(h){h.None=0,h.Full=1,h.Incremental=2})(Ne||(t.TextDocumentSyncKind=Ne={}));var he;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(he||(t.DidOpenTextDocumentNotification=he={}));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 ke(H){let Oe=H;return Oe!=null&&typeof Oe.text=="string"&&Oe.range===void 0&&Oe.rangeLength===void 0}s(ke,"isFull"),h.isFull=ke})(J||(t.TextDocumentContentChangeEvent=J={}));var Ue;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ue||(t.DidChangeTextDocumentNotification=Ue={}));var le;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(le||(t.DidCloseTextDocumentNotification=le={}));var He;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(He||(t.DidSaveTextDocumentNotification=He={}));var ve;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(ve||(t.TextDocumentSaveReason=ve={}));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 ze;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ze||(t.WillSaveTextDocumentWaitUntilRequest=ze={}));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 Te;(function(h){function se(ke){const H=ke;return n.objectLiteral(H)&&(r.URI.is(H.baseUri)||r.WorkspaceFolder.is(H.baseUri))&&n.string(H.pattern)}s(se,"is"),h.is=se})(Te||(t.RelativePattern=Te={}));var ca;(function(h){h.Create=1,h.Change=2,h.Delete=4})(ca||(t.WatchKind=ca={}));var Jo;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Jo||(t.PublishDiagnosticsNotification=Jo={}));var Zo;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(Zo||(t.CompletionTriggerKind=Zo={}));var Qo;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Qo||(t.CompletionRequest=Qo={}));var el;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(el||(t.CompletionResolveRequest=el={}));var ua;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ua||(t.HoverRequest=ua={}));var fa;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(fa||(t.SignatureHelpTriggerKind=fa={}));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 da;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(da||(t.DefinitionRequest=da={}));var tl;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(tl||(t.ReferencesRequest=tl={}));var rl;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rl||(t.DocumentHighlightRequest=rl={}));var pa;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(pa||(t.DocumentSymbolRequest=pa={}));var ha;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ha||(t.CodeActionRequest=ha={}));var nl;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(nl||(t.CodeActionResolveRequest=nl={}));var Mc;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Mc||(t.WorkspaceSymbolRequest=Mc={}));var al;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(al||(t.WorkspaceSymbolResolveRequest=al={}));var il;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(il||(t.CodeLensRequest=il={}));var sl;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(sl||(t.CodeLensResolveRequest=sl={}));var ol;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(ol||(t.CodeLensRefreshRequest=ol={}));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 ll;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ll||(t.DocumentLinkResolveRequest=ll={}));var cl;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(cl||(t.DocumentFormattingRequest=cl={}));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 ul;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ul||(t.DocumentRangesFormattingRequest=ul={}));var an;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(an||(t.DocumentOnTypeFormattingRequest=an={}));var fl;(function(h){h.Identifier=1})(fl||(t.PrepareSupportDefaultBehavior=fl={}));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 dl;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(dl||(t.ExecuteCommandRequest=dl={}));var pl;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(pl||(t.ApplyWorkspaceEditRequest=pl={}))}}),yk=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=Uo();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}}),vk=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,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}):(function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]})),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(Uo(),t),r((mc(),Uh(df)),t),r(Me(),t),r(gk(),t);var n=yk();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={}))}}),Tk=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,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(o,c);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:s(function(){return o[c]},"get")}),Object.defineProperty(i,l,u)}):(function(i,o,c,l){l===void 0&&(l=c),i[l]=o[c]})),r=t&&t.__exportStar||function(i,o){for(var c in i)c!=="default"&&!Object.prototype.hasOwnProperty.call(o,c)&&e(o,i,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=Cy();r(Cy(),t),r(vk(),t);function a(i,o,c,l){return(0,n.createMessageConnection)(i,o,c,l)}s(a,"createProtocolConnection"),t.createProtocolConnection=a}}),TT={};Qr(TT,{AbstractAstReflection:()=>qh,AbstractCstNode:()=>Vg,AbstractLangiumParser:()=>Yg,AbstractParserErrorMessageProvider:()=>oI,AbstractThreadedAsyncParser:()=>Bj,AstUtils:()=>Wh,BiMap:()=>of,Cancellation:()=>Ae,CompositeCstNodeImpl:()=>cd,ContextCache:()=>gd,CstNodeBuilder:()=>aI,CstUtils:()=>Bh,DEFAULT_TOKENIZE_OPTIONS:()=>py,DONE_RESULT:()=>nt,DatatypeSymbol:()=>rf,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:()=>Hj,DefaultLexer:()=>hy,DefaultLexerErrorMessageProvider:()=>KI,DefaultLinker:()=>CI,DefaultNameProvider:()=>SI,DefaultReferenceDescriptionProvider:()=>FI,DefaultReferences:()=>bI,DefaultScopeComputation:()=>wI,DefaultScopeProvider:()=>kI,DefaultServiceRegistry:()=>OI,DefaultTokenBuilder:()=>dd,DefaultValueConverter:()=>ry,DefaultWorkspaceLock:()=>aN,DefaultWorkspaceManager:()=>BI,Deferred:()=>Or,Disposable:()=>Dn,DisposableCache:()=>md,DocumentCache:()=>NI,DocumentState:()=>Z,DocumentValidator:()=>Ot,EMPTY_SCOPE:()=>Gj,EMPTY_STREAM:()=>wo,EmptyFileSystem:()=>Gt,EmptyFileSystemProvider:()=>lN,ErrorWithLocation:()=>Af,GrammarAST:()=>AT,GrammarUtils:()=>Am,IndentationAwareLexer:()=>qj,IndentationAwareTokenBuilder:()=>oN,JSDocDocumentationProvider:()=>tN,LangiumCompletionParser:()=>lI,LangiumParser:()=>sI,LangiumParserErrorMessageProvider:()=>Xg,LeafCstNodeImpl:()=>tf,LexingMode:()=>On,MapScope:()=>Fj,Module:()=>Ch,MultiMap:()=>Lr,MultiMapScope:()=>II,OperationCancelled:()=>or,ParserWorker:()=>Kj,ProfilingTask:()=>uN,Reduction:()=>Zl,RefResolving:()=>mn,RegExpUtils:()=>_m,RootCstNodeImpl:()=>Hg,SimpleCache:()=>ly,StreamImpl:()=>sr,StreamScope:()=>$h,TextDocument:()=>af,TreeStreamImpl:()=>Io,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,VALIDATE_EACH_NODE:()=>DI,ValidationCategory:()=>lf,ValidationRegistry:()=>LI,ValueConverter:()=>ar,WorkspaceCache:()=>cy,assertCondition:()=>Em,assertUnreachable:()=>en,createCompletionParser:()=>Qg,createDefaultCoreModule:()=>St,createDefaultSharedCoreModule:()=>bt,createGrammarConfig:()=>zm,createLangiumParser:()=>ey,createParser:()=>ud,delayNextTick:()=>pd,diagnosticData:()=>Pn,eagerLoad:()=>$y,getDiagnosticRange:()=>fy,indentationBuilderDefaultOptions:()=>bh,inject:()=>Pe,interruptAndCheck:()=>Ye,isAstNode:()=>Be,isAstNodeDescription:()=>Kh,isAstNodeWithComment:()=>uy,isCompositeCstNode:()=>Cr,isIMultiModeLexerDefinition:()=>Td,isJSDoc:()=>gy,isLeafCstNode:()=>Bn,isLinkingError:()=>vn,isMultiReference:()=>lr,isNamed:()=>oy,isOperationCancelled:()=>la,isReference:()=>at,isRootCstNode:()=>hf,isTokenTypeArray:()=>vd,isTokenTypeDictionary:()=>cf,loadGrammarFromJson:()=>wt,parseJSDoc:()=>my,prepareLangiumParser:()=>ty,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>hd,stream:()=>ue,toDiagnosticData:()=>dy,toDiagnosticSeverity:()=>Xl});var Bh={};Qr(Bh,{DefaultNameRegexp:()=>ym,RangeComparison:()=>ir,compareRange:()=>mm,findCommentNode:()=>vm,findDeclarationNodeAtOffset:()=>UT,findLeafNodeAtOffset:()=>$f,findLeafNodeBeforeOffset:()=>Tm,flattenCst:()=>jT,getDatatypeNode:()=>GT,getInteriorNodes:()=>KT,getNextNode:()=>zT,getPreviousNode:()=>$m,getStartlineNode:()=>BT,inRange:()=>gm,isChildNode:()=>hm,isCommentNode:()=>Gu,streamCst:()=>Oo,toDocumentSegment:()=>Lo,tokenToRange:()=>Ql});function Be(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}s(Be,"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 vn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}s(vn,"isLinkingError");var Ba,qh=(Ba=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 Be(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(c=>this.isSubtype(c,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(Ba,"AbstractAstReflection"),Ba);function Cr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}s(Cr,"isCompositeCstNode");function Bn(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}s(Bn,"isLeafCstNode");function hf(t){return Cr(t)&&typeof t.fullText=="string"}s(hf,"isRootCstNode");var ht,sr=(ht=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 ht(()=>({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 ht(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?nt:{done:!1,value:e(a)}})}filter(e){return new ht(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 ht(()=>({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(Jl(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 ht(()=>({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(Jl(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 ht(()=>{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 ht(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?nt:this.nextFn(r.state)))}distinct(e){return new ht(()=>({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(ht,"StreamImpl"),ht);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 Jl(t){return!!t&&typeof t[Symbol.iterator]=="function"}s(Jl,"isIterable");var wo=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(Jl(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++];Jl(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}):wo}s(ue,"stream");var Ka,Io=(Ka=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(Ka,"TreeStreamImpl"),Ka),Zl;(function(t){function e(i){return i.reduce((o,c)=>o+c,0)}s(e,"sum"),t.sum=e;function r(i){return i.reduce((o,c)=>o*c,0)}s(r,"product"),t.product=r;function n(i){return i.reduce((o,c)=>Math.min(o,c))}s(n,"min"),t.min=n;function a(i){return i.reduce((o,c)=>Math.max(o,c))}s(a,"max"),t.max=a})(Zl||(Zl={}));var Wh={};Qr(Wh,{assignMandatoryProperties:()=>Vh,copyAstNode:()=>Cu,findRootNode:()=>Ga,getContainerOfType:()=>Kn,getDocument:()=>Bt,getReferenceNodes:()=>Eu,hasContainerOfType:()=>$T,linkContentToContainer:()=>No,streamAllContents:()=>Dr,streamAst:()=>Kt,streamContents:()=>yc,streamReferences:()=>ko});function No(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,i)=>{Be(a)&&(a.$container=t,a.$containerProperty=r,a.$containerIndex=i,e.deep&&No(a,e))}):Be(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&No(n,e)))}s(No,"linkContentToContainer");function Kn(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}s(Kn,"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=Ga(t).$document;if(!r)throw new Error("AST node has no document.");return r}s(Bt,"getDocument");function Ga(t){for(;t.$container;)t=t.$container;return t}s(Ga,"findRootNode");function Eu(t){return at(t)?t.ref?[t.ref]:[]:lr(t)?t.items.map(e=>e.ref):[]}s(Eu,"getReferenceNodes");function yc(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(Be(i)){if(n.keyIndex++,_u(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;n.arrayIndex<i.length;){const o=n.arrayIndex++,c=i[o];if(Be(c)&&_u(c,r))return{done:!1,value:c}}n.arrayIndex=0}}n.keyIndex++}return nt})}s(yc,"streamContents");function Dr(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Io(t,r=>yc(r,e))}s(Dr,"streamAllContents");function Kt(t,e){if(t){if(e!=null&&e.range&&!_u(t,e.range))return new Io(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new Io(t,r=>yc(r,e),{includeRoot:!0})}s(Kt,"streamAst");function _u(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(_u,"isAstNodeInRange");function ko(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(ko,"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 Cu(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(Be(i))n[a]=Cu(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 c of i)Be(c)?o.push(Cu(c,e,r)):at(c)?o.push(e(n,a,c.$refNode,c.$refText,c)):o.push(c);n[a]=o}else n[a]=i;return No(n,{deep:!0}),n}s(Cu,"copyAstNode");var AT={};Qr(AT,{AbstractElement:()=>dt,AbstractParserRule:()=>Ml,AbstractRule:()=>ka,AbstractType:()=>Tt,Action:()=>zr,Alternatives:()=>xl,ArrayLiteral:()=>Su,ArrayType:()=>bu,Assignment:()=>Br,BooleanLiteral:()=>wu,CharacterRange:()=>Kr,Condition:()=>qr,Conjunction:()=>Fl,CrossReference:()=>Wr,Disjunction:()=>Gl,EndOfFile:()=>Iu,Grammar:()=>Ar,GrammarImport:()=>Nu,Group:()=>Tn,InferredType:()=>ku,InfixRule:()=>nr,InfixRuleOperatorList:()=>jl,InfixRuleOperators:()=>Pu,Interface:()=>Pa,Keyword:()=>Oa,LangiumGrammarAstReflection:()=>pm,LangiumGrammarTerminals:()=>Rk,NamedArgument:()=>La,NegatedToken:()=>Rn,Negation:()=>Ou,NumberLiteral:()=>Lu,Parameter:()=>Da,ParameterReference:()=>Du,ParserRule:()=>jt,ReferenceType:()=>Ul,RegexToken:()=>$n,ReturnType:()=>Mu,RuleCall:()=>An,SimpleType:()=>Ma,StringLiteral:()=>xu,TerminalAlternatives:()=>En,TerminalElement:()=>pt,TerminalGroup:()=>_n,TerminalRule:()=>Er,TerminalRuleCall:()=>Cn,Type:()=>zl,TypeAttribute:()=>Sn,TypeDefinition:()=>bn,UnionType:()=>Fu,UnorderedGroup:()=>Bl,UntilToken:()=>wn,ValueLiteral:()=>In,Wildcard:()=>xa,isAbstractElement:()=>mf,isAbstractParserRule:()=>qn,isAbstractRule:()=>ET,isAbstractType:()=>_T,isAction:()=>Hr,isAlternatives:()=>gf,isArrayLiteral:()=>CT,isArrayType:()=>Yh,isAssignment:()=>Sr,isBooleanLiteral:()=>Xh,isCharacterRange:()=>Jh,isCondition:()=>ST,isConjunction:()=>Zh,isCrossReference:()=>Wn,isDisjunction:()=>Qh,isEndOfFile:()=>em,isGrammar:()=>bT,isGrammarImport:()=>wT,isGroup:()=>Vn,isInferredType:()=>vc,isInfixRule:()=>Po,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:()=>yf,isStringLiteral:()=>LT,isTerminalAlternatives:()=>lm,isTerminalElement:()=>DT,isTerminalGroup:()=>cm,isTerminalRule:()=>xt,isTerminalRuleCall:()=>vf,isType:()=>Tf,isTypeAttribute:()=>MT,isTypeDefinition:()=>xT,isUnionType:()=>um,isUnorderedGroup:()=>Rf,isUntilToken:()=>fm,isValueLiteral:()=>FT,isWildcard:()=>dm,reflection:()=>K});var Rk={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 mf(t){return K.isInstance(t,dt.$type)}s(mf,"isAbstractElement");var Ml={$type:"AbstractParserRule"};function qn(t){return K.isInstance(t,Ml.$type)}s(qn,"isAbstractParserRule");var ka={$type:"AbstractRule"};function ET(t){return K.isInstance(t,ka.$type)}s(ET,"isAbstractRule");var Tt={$type:"AbstractType"};function _T(t){return K.isInstance(t,Tt.$type)}s(_T,"isAbstractType");var zr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Hr(t){return K.isInstance(t,zr.$type)}s(Hr,"isAction");var xl={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function gf(t){return K.isInstance(t,xl.$type)}s(gf,"isAlternatives");var Su={$type:"ArrayLiteral",elements:"elements"};function CT(t){return K.isInstance(t,Su.$type)}s(CT,"isArrayLiteral");var bu={$type:"ArrayType",elementType:"elementType"};function Yh(t){return K.isInstance(t,bu.$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 wu={$type:"BooleanLiteral",true:"true"};function Xh(t){return K.isInstance(t,wu.$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 Fl={$type:"Conjunction",left:"left",right:"right"};function Zh(t){return K.isInstance(t,Fl.$type)}s(Zh,"isConjunction");var Wr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Wn(t){return K.isInstance(t,Wr.$type)}s(Wn,"isCrossReference");var Gl={$type:"Disjunction",left:"left",right:"right"};function Qh(t){return K.isInstance(t,Gl.$type)}s(Qh,"isDisjunction");var Iu={$type:"EndOfFile",cardinality:"cardinality"};function em(t){return K.isInstance(t,Iu.$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 Nu={$type:"GrammarImport",path:"path"};function wT(t){return K.isInstance(t,Nu.$type)}s(wT,"isGrammarImport");var Tn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Vn(t){return K.isInstance(t,Tn.$type)}s(Vn,"isGroup");var ku={$type:"InferredType",name:"name"};function vc(t){return K.isInstance(t,ku.$type)}s(vc,"isInferredType");var nr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return K.isInstance(t,nr.$type)}s(Po,"isInfixRule");var jl={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function IT(t){return K.isInstance(t,jl.$type)}s(IT,"isInfixRuleOperatorList");var Pu={$type:"InfixRuleOperators",precedences:"precedences"};function NT(t){return K.isInstance(t,Pu.$type)}s(NT,"isInfixRuleOperators");var Pa={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function tm(t){return K.isInstance(t,Pa.$type)}s(tm,"isInterface");var Oa={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return K.isInstance(t,Oa.$type)}s(br,"isKeyword");var La={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function kT(t){return K.isInstance(t,La.$type)}s(kT,"isNamedArgument");var Rn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function rm(t){return K.isInstance(t,Rn.$type)}s(rm,"isNegatedToken");var Ou={$type:"Negation",value:"value"};function nm(t){return K.isInstance(t,Ou.$type)}s(nm,"isNegation");var Lu={$type:"NumberLiteral",value:"value"};function PT(t){return K.isInstance(t,Lu.$type)}s(PT,"isNumberLiteral");var Da={$type:"Parameter",name:"name"};function OT(t){return K.isInstance(t,Da.$type)}s(OT,"isParameter");var Du={$type:"ParameterReference",parameter:"parameter"};function am(t){return K.isInstance(t,Du.$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 Ul={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function im(t){return K.isInstance(t,Ul.$type)}s(im,"isReferenceType");var $n={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function sm(t){return K.isInstance(t,$n.$type)}s(sm,"isRegexToken");var Mu={$type:"ReturnType",name:"name"};function om(t){return K.isInstance(t,Mu.$type)}s(om,"isReturnType");var An={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return K.isInstance(t,An.$type)}s(wr,"isRuleCall");var Ma={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function yf(t){return K.isInstance(t,Ma.$type)}s(yf,"isSimpleType");var xu={$type:"StringLiteral",value:"value"};function LT(t){return K.isInstance(t,xu.$type)}s(LT,"isStringLiteral");var En={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function lm(t){return K.isInstance(t,En.$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 _n={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function cm(t){return K.isInstance(t,_n.$type)}s(cm,"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 Cn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function vf(t){return K.isInstance(t,Cn.$type)}s(vf,"isTerminalRuleCall");var zl={$type:"Type",name:"name",type:"type"};function Tf(t){return K.isInstance(t,zl.$type)}s(Tf,"isType");var Sn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function MT(t){return K.isInstance(t,Sn.$type)}s(MT,"isTypeAttribute");var bn={$type:"TypeDefinition"};function xT(t){return K.isInstance(t,bn.$type)}s(xT,"isTypeDefinition");var Fu={$type:"UnionType",types:"types"};function um(t){return K.isInstance(t,Fu.$type)}s(um,"isUnionType");var Bl={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Rf(t){return K.isInstance(t,Bl.$type)}s(Rf,"isUnorderedGroup");var wn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function fm(t){return K.isInstance(t,wn.$type)}s(fm,"isUntilToken");var In={$type:"ValueLiteral"};function FT(t){return K.isInstance(t,In.$type)}s(FT,"isValueLiteral");var xa={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function dm(t){return K.isInstance(t,xa.$type)}s(dm,"isWildcard");var qa,pm=(qa=class extends qh{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:Ml.$type,properties:{},superTypes:[ka.$type,Tt.$type]},AbstractRule:{name:ka.$type,properties:{},superTypes:[]},AbstractType:{name:Tt.$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:Tt.$type}},superTypes:[dt.$type]},Alternatives:{name:xl.$type,properties:{cardinality:{name:xl.cardinality},elements:{name:xl.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:Su.$type,properties:{elements:{name:Su.elements,defaultValue:[]}},superTypes:[In.$type]},ArrayType:{name:bu.$type,properties:{elementType:{name:bu.elementType}},superTypes:[bn.$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:wu.$type,properties:{true:{name:wu.true,defaultValue:!1}},superTypes:[qr.$type,In.$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:Fl.$type,properties:{left:{name:Fl.left},right:{name:Fl.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:Tt.$type}},superTypes:[dt.$type]},Disjunction:{name:Gl.$type,properties:{left:{name:Gl.left},right:{name:Gl.right}},superTypes:[qr.$type]},EndOfFile:{name:Iu.$type,properties:{cardinality:{name:Iu.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:Nu.$type,properties:{path:{name:Nu.path}},superTypes:[]},Group:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},elements:{name:Tn.elements,defaultValue:[]},guardCondition:{name:Tn.guardCondition},predicate:{name:Tn.predicate}},superTypes:[dt.$type]},InferredType:{name:ku.$type,properties:{name:{name:ku.name}},superTypes:[Tt.$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:Tt.$type}},superTypes:[Ml.$type]},InfixRuleOperatorList:{name:jl.$type,properties:{associativity:{name:jl.associativity},operators:{name:jl.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Pu.$type,properties:{precedences:{name:Pu.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Pa.$type,properties:{attributes:{name:Pa.attributes,defaultValue:[]},name:{name:Pa.name},superTypes:{name:Pa.superTypes,defaultValue:[],referenceType:Tt.$type}},superTypes:[Tt.$type]},Keyword:{name:Oa.$type,properties:{cardinality:{name:Oa.cardinality},predicate:{name:Oa.predicate},value:{name:Oa.value}},superTypes:[dt.$type]},NamedArgument:{name:La.$type,properties:{calledByName:{name:La.calledByName,defaultValue:!1},parameter:{name:La.parameter,referenceType:Da.$type},value:{name:La.value}},superTypes:[]},NegatedToken:{name:Rn.$type,properties:{cardinality:{name:Rn.cardinality},lookahead:{name:Rn.lookahead},parenthesized:{name:Rn.parenthesized,defaultValue:!1},terminal:{name:Rn.terminal}},superTypes:[pt.$type]},Negation:{name:Ou.$type,properties:{value:{name:Ou.value}},superTypes:[qr.$type]},NumberLiteral:{name:Lu.$type,properties:{value:{name:Lu.value}},superTypes:[In.$type]},Parameter:{name:Da.$type,properties:{name:{name:Da.name}},superTypes:[]},ParameterReference:{name:Du.$type,properties:{parameter:{name:Du.parameter,referenceType:Da.$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:Tt.$type}},superTypes:[Ml.$type]},ReferenceType:{name:Ul.$type,properties:{isMulti:{name:Ul.isMulti,defaultValue:!1},referenceType:{name:Ul.referenceType}},superTypes:[bn.$type]},RegexToken:{name:$n.$type,properties:{cardinality:{name:$n.cardinality},lookahead:{name:$n.lookahead},parenthesized:{name:$n.parenthesized,defaultValue:!1},regex:{name:$n.regex}},superTypes:[pt.$type]},ReturnType:{name:Mu.$type,properties:{name:{name:Mu.name}},superTypes:[]},RuleCall:{name:An.$type,properties:{arguments:{name:An.arguments,defaultValue:[]},cardinality:{name:An.cardinality},predicate:{name:An.predicate},rule:{name:An.rule,referenceType:ka.$type}},superTypes:[dt.$type]},SimpleType:{name:Ma.$type,properties:{primitiveType:{name:Ma.primitiveType},stringType:{name:Ma.stringType},typeRef:{name:Ma.typeRef,referenceType:Tt.$type}},superTypes:[bn.$type]},StringLiteral:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[In.$type]},TerminalAlternatives:{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]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},elements:{name:_n.elements,defaultValue:[]},lookahead:{name:_n.lookahead},parenthesized:{name:_n.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:[ka.$type]},TerminalRuleCall:{name:Cn.$type,properties:{cardinality:{name:Cn.cardinality},lookahead:{name:Cn.lookahead},parenthesized:{name:Cn.parenthesized,defaultValue:!1},rule:{name:Cn.rule,referenceType:Er.$type}},superTypes:[pt.$type]},Type:{name:zl.$type,properties:{name:{name:zl.name},type:{name:zl.type}},superTypes:[Tt.$type]},TypeAttribute:{name:Sn.$type,properties:{defaultValue:{name:Sn.defaultValue},isOptional:{name:Sn.isOptional,defaultValue:!1},name:{name:Sn.name},type:{name:Sn.type}},superTypes:[]},TypeDefinition:{name:bn.$type,properties:{},superTypes:[]},UnionType:{name:Fu.$type,properties:{types:{name:Fu.types,defaultValue:[]}},superTypes:[bn.$type]},UnorderedGroup:{name:Bl.$type,properties:{cardinality:{name:Bl.cardinality},elements:{name:Bl.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:wn.$type,properties:{cardinality:{name:wn.cardinality},lookahead:{name:wn.lookahead},parenthesized:{name:wn.parenthesized,defaultValue:!1},terminal:{name:wn.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:In.$type,properties:{},superTypes:[]},Wildcard:{name:xa.$type,properties:{cardinality:{name:xa.cardinality},lookahead:{name:xa.lookahead},parenthesized:{name:xa.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}},s(qa,"LangiumGrammarAstReflection"),qa),K=new pm;function GT(t){let e=t,r=!1;for(;e;){const n=Kn(e.grammarSource,ot);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}s(GT,"getDatatypeNode");function Oo(t){return new Io(t,e=>Cr(e)?e.content:[],{includeRoot:!0})}s(Oo,"streamCst");function jT(t){return Oo(t).filter(Bn)}s(jT,"flattenCst");function hm(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}s(hm,"isChildNode");function Ql(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}s(Ql,"tokenToRange");function Lo(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}s(Lo,"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 $f(t,e)}}s(UT,"findDeclarationNodeAtOffset");function vm(t,e){if(t){const r=$m(t,!0);if(r&&Gu(r,e))return r;if(hf(t)){const n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const i=t.content[a];if(Gu(i,e))return i}}}}s(vm,"findCommentNode");function Gu(t,e){return Bn(t)&&e.includes(t.tokenType.name)}s(Gu,"isCommentNode");function $f(t,e){if(Bn(t))return t;if(Cr(t)){const r=Rm(t,e,!1);if(r)return $f(r,e)}}s($f,"findLeafNodeAtOffset");function Tm(t,e){if(Bn(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),c=t.content[o];if(c.offset<=e&&c.end>e)return c;c.end<=e?(i=r?c: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=qp(t),n=qp(e);let a;for(let i=0;i<r.length&&i<n.length;i++){const o=r[i],c=n[i];if(o.parent===c.parent)a={parent:o.parent,a:o.index,b:c.index};else break}return a}s(qT,"getCommonParent");function qp(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(qp,"getParentChain");var Am={};Qr(Am,{findAssignment:()=>Dm,findNameAssignment:()=>If,findNodeForKeyword:()=>Lm,findNodeForProperty:()=>Sf,findNodesForKeyword:()=>QT,findNodesForKeywordInternal:()=>wf,findNodesForProperty:()=>Om,getActionAtElement:()=>xm,getActionType:()=>Gm,getAllReachableRules:()=>Cf,getAllRulesUsedForCrossReferences:()=>ZT,getCrossReferenceTerminal:()=>km,getEntryRule:()=>wm,getExplicitRuleType:()=>Rc,getHiddenRules:()=>Im,getRuleType:()=>jm,getRuleTypeName:()=>aR,getTypeName:()=>Fn,isArrayCardinality:()=>tR,isArrayOperator:()=>rR,isCommentTerminal:()=>Pm,isDataType:()=>nR,isDataTypeRule:()=>Tc,isOptionalCardinality:()=>eR,terminalRegex:()=>$c});var Wa,Af=(Wa=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}},s(Wa,"ErrorWithLocation"),Wa);function en(t,e="Error: Got unexpected value."){throw new Error(e)}s(en,"assertUnreachable");function Em(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}s(Em,"assertCondition");var _m={};Qr(_m,{NEWLINE_REGEXP:()=>HT,escapeRegExp:()=>zo,getTerminalParts:()=>XT,isMultilineComment:()=>Cm,isWhitespace:()=>_f,partialMatches:()=>Sm,partialRegExp:()=>bm,whitespaceCharacters:()=>JT});function W(t){return t.charCodeAt(0)}s(W,"cc");function lu(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}s(lu,"insertToSet");function _a(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}s(_a,"addFlag");function dn(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}s(dn,"ASSERT_EXISTS");function WT(){throw Error("Internal Error - Should never get here!")}s(WT,"ASSERT_NEVER_REACH_HERE");function Wp(t){return t.type==="Character"}s(Wp,"isCharacter");var ju=[];for(let t=W("0");t<=W("9");t++)ju.push(t);var Uu=[W("_")].concat(ju);for(let t=W("a");t<=W("z");t++)Uu.push(t);for(let t=W("A");t<=W("Z");t++)Uu.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")],$k=/[0-9a-fA-F]/,xc=/[0-9]/,Ak=/[1-9]/,Va,VT=(Va=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":_a(n,"global");break;case"i":_a(n,"ignoreCase");break;case"m":_a(n,"multiLine");break;case"u":_a(n,"unicode");break;case"y":_a(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}}dn(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;dn(r);break}if(!(e===!0&&r===void 0)&&dn(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()),dn(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=ju;break;case"D":e=ju,r=!0;break;case"s":e=Sy;break;case"S":e=Sy,r=!0;break;case"w":e=Uu;break;case"W":e=Uu,r=!0;break}if(dn(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(dn(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,Wp(n)&&this.isRangeDash()){this.consumeChar("-");const a=this.classAtom();if(a.type,Wp(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else lu(n.value,e),e.push(W("-")),lu(a.value,e)}else lu(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(Ak.test(e)===!1)throw Error("Expecting a positive integer");for(;xc.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(xc.test(e)===!1)throw Error("Expecting an integer");for(;xc.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 xc.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($k.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(Va,"RegExpParser"),Va),Ha,Ef=(Ha=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(Ha,"BaseRegExpVisitor"),Ha),HT=/\r?\n/gm,YT=new VT,Ya,Ek=(Ya=class extends Ef{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=zo(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(Ya,"TerminalRegExpVisitor"),Ya),Nn=new Ek;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)Nn.reset(t),Nn.visit(n),r.push({start:Nn.startRegexp,end:Nn.endRegex});return r}catch{return[]}}s(XT,"getTerminalParts");function Cm(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Nn.reset(t),Nn.visit(YT.pattern(t)),Nn.multiline}catch{return!1}}s(Cm,"isMultilineComment");var JT=`\f
46
+ \r \v              \u2028\u2029   \uFEFF`.split("");function _f(t){const e=typeof t=="string"?new RegExp(t):t;return JT.some(r=>e.test(r))}s(_f,"isWhitespace");function zo(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}s(zo,"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 c(u){i+=r.substr(n,u),n+=u}s(c,"appendRaw");function l(u){i+="(?:"+r.substr(n,u)+"|$)",n+=u}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"?":c(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?c(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:c(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else c(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 Cf(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(Cf,"getAllReachableRules");function Nm(t,e,r){e.add(t.name),Dr(t).forEach(n=>{if(wr(n)||r&&vf(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=>{Wn(r)&&(ot(r.type.ref)&&e.add(r.type.ref),vc(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=If(t.type.ref);return e==null?void 0:e.terminal}}s(km,"getCrossReferenceTerminal");function Pm(t){return t.hidden&&!_f($c(t))}s(Pm,"isCommentTerminal");function Om(t,e){return!t||!e?[]:bf(t,e,t.astNode,!0)}s(Om,"findNodesForProperty");function Sf(t,e,r){if(!t||!e)return;const n=bf(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(Sf,"findNodeForProperty");function bf(t,e,r,n){if(!n){const a=Kn(t.grammarSource,Sr);if(a&&a.feature===e)return[t]}return Cr(t)&&t.astNode===r?t.content.flatMap(a=>bf(a,e,r,!1)):[]}s(bf,"findNodesForPropertyInternal");function QT(t,e){return t?wf(t,e,t==null?void 0:t.astNode):[]}s(QT,"findNodesForKeyword");function Lm(t,e,r){if(!t)return;const n=wf(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 wf(t,e,r){if(t.astNode!==r)return[];if(br(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=Oo(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(wf,"findNodesForKeywordInternal");function Dm(t){var r;const e=t.astNode;for(;e===((r=t.container)==null?void 0:r.astNode);){const n=Kn(t.grammarSource,Sr);if(n)return n;t=t.container}}s(Dm,"findAssignment");function If(t){let e=t;return vc(e)&&(Hr(e.$container)?e=e.$container.$container:qn(e.$container)?e=e.$container:en(e.$container)),Mm(t,e,new Map)}s(If,"findNameAssignment");function Mm(t,e,r){var a;function n(i,o){let c;return Kn(i,Sr)||(c=Mm(o,o,r)),r.set(t,c),c}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(yf(i)&&((a=i.typeRef)!=null&&a.ref))return n(i,i.typeRef.ref)}}s(Mm,"findNameAssignmentInternal");function xm(t){const e=t.$container;if(Vn(e)){const r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){const i=r[a];if(Hr(i))return i;{const o=Dr(r[a]).find(Hr);if(o)return o}}}if(mf(e))return xm(e)}s(xm,"getActionAtElement");function eR(t,e){return t==="?"||t==="*"||Vn(e)&&!!e.guardCondition}s(eR,"isOptionalCardinality");function tR(t){return t==="*"||t==="+"}s(tR,"isArrayCardinality");function rR(t){return t==="+="}s(rR,"isArrayOperator");function Tc(t){return Fm(t,new Set)}s(Tc,"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)||Po(r.rule.ref))return!1}else{if(Sr(r))return!1;if(Hr(r))return!1}return!!t.definition}s(Fm,"isDataTypeRuleInternal");function nR(t){return zu(t.type,new Set)}s(nR,"isDataType");function zu(t,e){if(e.has(t))return!0;if(e.add(t),Yh(t))return!1;if(im(t))return!1;if(um(t))return t.types.every(r=>zu(r,e));if(yf(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 Tf(r)?zu(r.type,e):!1}else return!1}else return!1}s(zu,"isDataTypeInternal");function Rc(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(Rc,"getExplicitRuleType");function Fn(t){if(qn(t))return ot(t)&&Tc(t)?t.name:Rc(t)??t.name;if(tm(t)||Tf(t)||om(t))return t.name;if(Hr(t)){const e=Gm(t);if(e)return e}else if(vc(t))return t.name;throw new Error("Cannot get name of Unknown Type")}s(Fn,"getTypeName");function Gm(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return Fn(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)&&Tc(t)?t.name:Rc(t)??t.name}s(aR,"getRuleTypeName");function jm(t){var e;return xt(t)?((e=t.type)==null?void 0:e.name)??"string":Rc(t)??t.name}s(jm,"getRuleType");function $c(t){const e={s:!1,i:!1,u:!1},r=Hn(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}s($c,"terminalRegex");var Um=/[\s\S]/.source;function Hn(t,e){var r;if(lm(t))return iR(t);if(cm(t))return sR(t);if(Jh(t))return cR(t);if(vf(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return cr(Hn(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")),cr(a,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(dm(t))return cr(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(Hn,"abstractElementToRegex");function iR(t){return cr(t.elements.map(e=>Hn(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(iR,"terminalAlternativesToRegex");function sR(t){return cr(t.elements.map(e=>Hn(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(sR,"terminalGroupToRegex");function oR(t){return cr(`${Um}*?${Hn(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(oR,"untilTokenToRegex");function lR(t){return cr(`(?!${Hn(t.terminal)})${Um}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}s(lR,"negateTokenToRegex");function cR(t){return t.right?cr(`[${cu(t.left)}-${cu(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):cr(cu(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}s(cR,"characterRangeToRegex");function cu(t){return zo(t.value)}s(cu,"keywordToRegex");function cr(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}s(cr,"withCardinality");function zm(t){const e=[],r=t.Grammar;for(const n of r.rules)xt(n)&&Pm(n)&&Cm($c(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:ym}}s(zm,"createGrammarConfig");var _k=typeof global=="object"&&global&&global.Object===Object&&global,uR=_k,Ck=typeof self=="object"&&self&&self.Object===Object&&self,Sk=uR||Ck||Function("return this")(),fr=Sk,bk=fr.Symbol,Dt=bk,fR=Object.prototype,wk=fR.hasOwnProperty,Ik=fR.toString,ml=Dt?Dt.toStringTag:void 0;function dR(t){var e=wk.call(t,ml),r=t[ml];try{t[ml]=void 0;var n=!0}catch{}var a=Ik.call(t);return n&&(e?t[ml]=r:delete t[ml]),a}s(dR,"getRawTag");var Nk=dR,kk=Object.prototype,Pk=kk.toString;function pR(t){return Pk.call(t)}s(pR,"objectToString");var Ok=pR,Lk="[object Null]",Dk="[object Undefined]",by=Dt?Dt.toStringTag:void 0;function hR(t){return t==null?t===void 0?Dk:Lk:by&&by in Object(t)?Nk(t):Ok(t)}s(hR,"baseGetTag");var tn=hR;function mR(t){return t!=null&&typeof t=="object"}s(mR,"isObjectLike");var Vt=mR,Mk="[object Symbol]";function gR(t){return typeof t=="symbol"||Vt(t)&&tn(t)==Mk}s(gR,"isSymbol");var Nf=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 Ac=yR,xk=Array.isArray,ae=xk,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 Ac(t,Bm)+"";if(Nf(t))return Iy?Iy.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(Bm,"baseToString");var Fk=Bm,Gk=/\s/;function vR(t){for(var e=t.length;e--&&Gk.test(t.charAt(e)););return e}s(vR,"trimmedEndIndex");var jk=vR,Uk=/^\s+/;function TR(t){return t&&t.slice(0,jk(t)+1).replace(Uk,"")}s(TR,"baseTrim");var zk=TR;function RR(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(RR,"isObject");var Mt=RR,Ny=NaN,Bk=/^[-+]0x[0-9a-f]+$/i,Kk=/^0b[01]+$/i,qk=/^0o[0-7]+$/i,Wk=parseInt;function $R(t){if(typeof t=="number")return t;if(Nf(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=zk(t);var r=Kk.test(t);return r||qk.test(t)?Wk(t.slice(2),r?2:8):Bk.test(t)?Ny:+t}s($R,"toNumber");var Vk=$R,ky=1/0,Hk=17976931348623157e292;function AR(t){if(!t)return t===0?t:0;if(t=Vk(t),t===ky||t===-ky){var e=t<0?-1:1;return e*Hk}return t===t?t:0}s(AR,"toFinite");var Yk=AR;function ER(t){var e=Yk(t),r=e%1;return e===e?r?e-r:e:0}s(ER,"toInteger");var Ec=ER;function _R(t){return t}s(_R,"identity");var Do=_R,Xk="[object AsyncFunction]",Jk="[object Function]",Zk="[object GeneratorFunction]",Qk="[object Proxy]";function CR(t){if(!Mt(t))return!1;var e=tn(t);return e==Jk||e==Zk||e==Xk||e==Qk}s(CR,"isFunction");var Mr=CR,eP=fr["__core-js_shared__"],Ad=eP,Py=(function(){var t=/[^.]+$/.exec(Ad&&Ad.keys&&Ad.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function SR(t){return!!Py&&Py in t}s(SR,"isMasked");var tP=SR,rP=Function.prototype,nP=rP.toString;function bR(t){if(t!=null){try{return nP.call(t)}catch{}try{return t+""}catch{}}return""}s(bR,"toSource");var Yn=bR,aP=/[\\^$.*+?()[\]{}|]/g,iP=/^\[object .+?Constructor\]$/,sP=Function.prototype,oP=Object.prototype,lP=sP.toString,cP=oP.hasOwnProperty,uP=RegExp("^"+lP.call(cP).replace(aP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wR(t){if(!Mt(t)||tP(t))return!1;var e=Mr(t)?uP:iP;return e.test(Yn(t))}s(wR,"baseIsNative");var fP=wR;function IR(t,e){return t==null?void 0:t[e]}s(IR,"getValue");var dP=IR;function NR(t,e){var r=dP(t,e);return fP(r)?r:void 0}s(NR,"getNative");var Xn=NR,pP=Xn(fr,"WeakMap"),Vp=pP,Oy=Object.create,hP=(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}})(),mP=hP;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 gP=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 yP=OR,vP=800,TP=16,RP=Date.now;function LR(t){var e=0,r=0;return function(){var n=RP(),a=TP-(n-r);if(r=n,a>0){if(++e>=vP)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}s(LR,"shortOut");var $P=LR;function DR(t){return function(){return t}}s(DR,"constant");var AP=DR,EP=(function(){try{var t=Xn(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Bu=EP,_P=Bu?function(t,e){return Bu(t,"toString",{configurable:!0,enumerable:!1,value:AP(e),writable:!0})}:Do,CP=_P,SP=$P(CP),bP=SP;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 wP=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 IP=UR;function zR(t,e,r){return e===e?IP(t,e,r):GR(t,wP,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,NP=9007199254740991,kP=/^(?:0|[1-9]\d*)$/;function qR(t,e){var r=typeof t;return e=e??NP,!!e&&(r=="number"||r!="symbol"&&kP.test(t))&&t>-1&&t%1==0&&t<e}s(qR,"isIndex");var kf=qR;function WR(t,e,r){e=="__proto__"&&Bu?Bu(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 _c=VR,PP=Object.prototype,OP=PP.hasOwnProperty;function HR(t,e,r){var n=t[e];(!(OP.call(t,e)&&_c(n,r))||r===void 0&&!(e in t))&&qm(t,e,r)}s(HR,"assignValue");var Pf=HR;function YR(t,e,r,n){var a=!r;r||(r={});for(var i=-1,o=e.length;++i<o;){var c=e[i],l=n?n(r[c],t[c],c,r,t):void 0;l===void 0&&(l=t[c]),a?qm(r,c,l):Pf(r,c,l)}return r}s(YR,"copyObject");var Cc=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 c=Array(e+1);++a<e;)c[a]=n[a];return c[e]=r(o),gP(t,this,c)}}s(XR,"overRest");var LP=XR;function JR(t,e){return bP(LP(t,e,Do),t+"")}s(JR,"baseRest");var Wm=JR,DP=9007199254740991;function ZR(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=DP}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)&&kf(e,r.length):n=="string"&&e in r)?_c(r[e],t):!1}s(e$,"isIterateeCall");var Of=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&&Of(r[0],r[1],o)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var c=r[n];c&&t(e,c,n,i)}return e})}s(t$,"createAssigner");var MP=t$,xP=Object.prototype;function r$(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xP;return t===r}s(r$,"isPrototype");var Sc=r$;function n$(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(n$,"baseTimes");var FP=n$,GP="[object Arguments]";function a$(t){return Vt(t)&&tn(t)==GP}s(a$,"baseIsArguments");var Dy=a$,i$=Object.prototype,jP=i$.hasOwnProperty,UP=i$.propertyIsEnumerable,zP=Dy((function(){return arguments})())?Dy:function(t){return Vt(t)&&jP.call(t,"callee")&&!UP.call(t,"callee")},Lf=zP;function s$(){return!1}s(s$,"stubFalse");var BP=s$,o$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,My=o$&&typeof module=="object"&&module&&!module.nodeType&&module,KP=My&&My.exports===o$,xy=KP?fr.Buffer:void 0,qP=xy?xy.isBuffer:void 0,WP=qP||BP,ec=WP,VP="[object Arguments]",HP="[object Array]",YP="[object Boolean]",XP="[object Date]",JP="[object Error]",ZP="[object Function]",QP="[object Map]",e0="[object Number]",t0="[object Object]",r0="[object RegExp]",n0="[object Set]",a0="[object String]",i0="[object WeakMap]",s0="[object ArrayBuffer]",o0="[object DataView]",l0="[object Float32Array]",c0="[object Float64Array]",u0="[object Int8Array]",f0="[object Int16Array]",d0="[object Int32Array]",p0="[object Uint8Array]",h0="[object Uint8ClampedArray]",m0="[object Uint16Array]",g0="[object Uint32Array]",Se={};Se[l0]=Se[c0]=Se[u0]=Se[f0]=Se[d0]=Se[p0]=Se[h0]=Se[m0]=Se[g0]=!0;Se[VP]=Se[HP]=Se[s0]=Se[YP]=Se[o0]=Se[XP]=Se[JP]=Se[ZP]=Se[QP]=Se[e0]=Se[t0]=Se[r0]=Se[n0]=Se[a0]=Se[i0]=!1;function l$(t){return Vt(t)&&Vm(t.length)&&!!Se[tn(t)]}s(l$,"baseIsTypedArray");var y0=l$;function c$(t){return function(e){return t(e)}}s(c$,"baseUnary");var bc=c$,u$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kl=u$&&typeof module=="object"&&module&&!module.nodeType&&module,v0=Kl&&Kl.exports===u$,Ed=v0&&uR.process,T0=(function(){try{var t=Kl&&Kl.require&&Kl.require("util").types;return t||Ed&&Ed.binding&&Ed.binding("util")}catch{}})(),Yr=T0,Fy=Yr&&Yr.isTypedArray,R0=Fy?bc(Fy):y0,Hm=R0,$0=Object.prototype,A0=$0.hasOwnProperty;function f$(t,e){var r=ae(t),n=!r&&Lf(t),a=!r&&!n&&ec(t),i=!r&&!n&&!a&&Hm(t),o=r||n||a||i,c=o?FP(t.length,String):[],l=c.length;for(var u in t)(e||A0.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||kf(u,l)))&&c.push(u);return c}s(f$,"arrayLikeKeys");var d$=f$;function p$(t,e){return function(r){return t(e(r))}}s(p$,"overArg");var h$=p$,E0=h$(Object.keys,Object),_0=E0,C0=Object.prototype,S0=C0.hasOwnProperty;function m$(t){if(!Sc(t))return _0(t);var e=[];for(var r in Object(t))S0.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$,b0=Object.prototype,w0=b0.hasOwnProperty,I0=MP(function(t,e){if(Sc(e)||dr(e)){Cc(e,$t(e),t);return}for(var r in e)w0.call(e,r)&&Pf(t,r,e[r])}),At=I0;function v$(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}s(v$,"nativeKeysIn");var N0=v$,k0=Object.prototype,P0=k0.hasOwnProperty;function T$(t){if(!Mt(t))return N0(t);var e=Sc(t),r=[];for(var n in t)n=="constructor"&&(e||!P0.call(t,n))||r.push(n);return r}s(T$,"baseKeysIn");var O0=T$;function R$(t){return dr(t)?d$(t,!0):O0(t)}s(R$,"keysIn");var Df=R$,L0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D0=/^\w*$/;function $$(t,e){if(ae(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Nf(t)?!0:D0.test(t)||!L0.test(t)||e!=null&&t in Object(e)}s($$,"isKey");var Ym=$$,M0=Xn(Object,"create"),tc=M0;function A$(){this.__data__=tc?tc(null):{},this.size=0}s(A$,"hashClear");var x0=A$;function E$(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(E$,"hashDelete");var F0=E$,G0="__lodash_hash_undefined__",j0=Object.prototype,U0=j0.hasOwnProperty;function _$(t){var e=this.__data__;if(tc){var r=e[t];return r===G0?void 0:r}return U0.call(e,t)?e[t]:void 0}s(_$,"hashGet");var z0=_$,B0=Object.prototype,K0=B0.hasOwnProperty;function C$(t){var e=this.__data__;return tc?e[t]!==void 0:K0.call(e,t)}s(C$,"hashHas");var q0=C$,W0="__lodash_hash_undefined__";function S$(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=tc&&e===void 0?W0:e,this}s(S$,"hashSet");var V0=S$;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,"Hash");Jn.prototype.clear=x0;Jn.prototype.delete=F0;Jn.prototype.get=z0;Jn.prototype.has=q0;Jn.prototype.set=V0;var Gy=Jn;function b$(){this.__data__=[],this.size=0}s(b$,"listCacheClear");var H0=b$;function w$(t,e){for(var r=t.length;r--;)if(_c(t[r][0],e))return r;return-1}s(w$,"assocIndexOf");var Mf=w$,Y0=Array.prototype,X0=Y0.splice;function I$(t){var e=this.__data__,r=Mf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():X0.call(e,r,1),--this.size,!0}s(I$,"listCacheDelete");var J0=I$;function N$(t){var e=this.__data__,r=Mf(e,t);return r<0?void 0:e[r][1]}s(N$,"listCacheGet");var Z0=N$;function k$(t){return Mf(this.__data__,t)>-1}s(k$,"listCacheHas");var Q0=k$;function P$(t,e){var r=this.__data__,n=Mf(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}s(P$,"listCacheSet");var eO=P$;function Zn(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(Zn,"ListCache");Zn.prototype.clear=H0;Zn.prototype.delete=J0;Zn.prototype.get=Z0;Zn.prototype.has=Q0;Zn.prototype.set=eO;var xf=Zn,tO=Xn(fr,"Map"),rc=tO;function O$(){this.size=0,this.__data__={hash:new Gy,map:new(rc||xf),string:new Gy}}s(O$,"mapCacheClear");var rO=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 nO=L$;function D$(t,e){var r=t.__data__;return nO(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(D$,"getMapData");var Ff=D$;function M$(t){var e=Ff(this,t).delete(t);return this.size-=e?1:0,e}s(M$,"mapCacheDelete");var aO=M$;function x$(t){return Ff(this,t).get(t)}s(x$,"mapCacheGet");var iO=x$;function F$(t){return Ff(this,t).has(t)}s(F$,"mapCacheHas");var sO=F$;function G$(t,e){var r=Ff(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(G$,"mapCacheSet");var oO=G$;function Qn(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(Qn,"MapCache");Qn.prototype.clear=rO;Qn.prototype.delete=aO;Qn.prototype.get=iO;Qn.prototype.has=sO;Qn.prototype.set=oO;var Gf=Qn,lO="Expected a function";function jf(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(lO);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(jf.Cache||Gf),r}s(jf,"memoize");jf.Cache=Gf;var cO=jf,uO=500;function j$(t){var e=cO(t,function(n){return r.size===uO&&r.clear(),n}),r=e.cache;return e}s(j$,"memoizeCapped");var fO=j$,dO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pO=/\\(\\)?/g,hO=fO(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dO,function(r,n,a,i){e.push(a?i.replace(pO,"$1"):n||r)}),e}),mO=hO;function U$(t){return t==null?"":Fk(t)}s(U$,"toString");var gO=U$;function z$(t,e){return ae(t)?t:Ym(t,e)?[t]:mO(gO(t))}s(z$,"castPath");var Uf=z$;function B$(t){if(typeof t=="string"||Nf(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(B$,"toKey");var wc=B$;function K$(t,e){e=Uf(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[wc(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 yO=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)||Lf(t)||!!(jy&&t&&t[jy])}s(V$,"isFlattenable");var vO=V$;function Zm(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=vO),a||(a=[]);++i<o;){var c=t[i];e>0&&r(c)?e>1?Zm(c,e-1,r,n,a):Jm(a,c):n||(a[a.length]=c)}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 xf,this.size=0}s(Q$,"stackClear");var $O=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 EO=tA;function rA(t){return this.__data__.has(t)}s(rA,"stackHas");var _O=rA,CO=200;function nA(t,e){var r=this.__data__;if(r instanceof xf){var n=r.__data__;if(!rc||n.length<CO-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Gf(n)}return r.set(t,e),this.size=r.size,this}s(nA,"stackSet");var SO=nA;function ea(t){var e=this.__data__=new xf(t);this.size=e.size}s(ea,"Stack");ea.prototype.clear=$O;ea.prototype.delete=AO;ea.prototype.get=EO;ea.prototype.has=_O;ea.prototype.set=SO;var ql=ea;function aA(t,e){return t&&Cc(e,$t(e),t)}s(aA,"baseAssign");var bO=aA;function iA(t,e){return t&&Cc(e,Df(e),t)}s(iA,"baseAssignIn");var wO=iA,sA=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Uy=sA&&typeof module=="object"&&module&&!module.nodeType&&module,IO=Uy&&Uy.exports===sA,zy=IO?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 NO=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 cA(){return[]}s(cA,"stubArray");var uA=cA,kO=Object.prototype,PO=kO.propertyIsEnumerable,Ky=Object.getOwnPropertySymbols,OO=Ky?function(t){return t==null?[]:(t=Object(t),eg(Ky(t),function(e){return PO.call(t,e)}))}:uA,tg=OO;function fA(t,e){return Cc(t,tg(t),e)}s(fA,"copySymbols");var LO=fA,DO=Object.getOwnPropertySymbols,MO=DO?function(t){for(var e=[];t;)Jm(e,tg(t)),t=Y$(t);return e}:uA,dA=MO;function pA(t,e){return Cc(t,dA(t),e)}s(pA,"copySymbolsIn");var xO=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 Hp=gA;function yA(t){return mA(t,Df,dA)}s(yA,"getAllKeysIn");var vA=yA,FO=Xn(fr,"DataView"),Yp=FO,GO=Xn(fr,"Promise"),Xp=GO,jO=Xn(fr,"Set"),ja=jO,qy="[object Map]",UO="[object Object]",Wy="[object Promise]",Vy="[object Set]",Hy="[object WeakMap]",Yy="[object DataView]",zO=Yn(Yp),BO=Yn(rc),KO=Yn(Xp),qO=Yn(ja),WO=Yn(Vp),pn=tn;(Yp&&pn(new Yp(new ArrayBuffer(1)))!=Yy||rc&&pn(new rc)!=qy||Xp&&pn(Xp.resolve())!=Wy||ja&&pn(new ja)!=Vy||Vp&&pn(new Vp)!=Hy)&&(pn=s(function(t){var e=tn(t),r=e==UO?t.constructor:void 0,n=r?Yn(r):"";if(n)switch(n){case zO:return Yy;case BO:return qy;case KO:return Wy;case qO:return Vy;case WO:return Hy}return e},"getTag"));var Mo=pn,VO=Object.prototype,HO=VO.hasOwnProperty;function TA(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&HO.call(t,"index")&&(r.index=t.index,r.input=t.input),r}s(TA,"initCloneArray");var YO=TA,XO=fr.Uint8Array,Ku=XO;function RA(t){var e=new t.constructor(t.byteLength);return new Ku(e).set(new Ku(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 JO=$A,ZO=/\w*$/;function AA(t){var e=new t.constructor(t.source,ZO.exec(t));return e.lastIndex=t.lastIndex,e}s(AA,"cloneRegExp");var QO=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 eL=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 tL=_A,rL="[object Boolean]",nL="[object Date]",aL="[object Map]",iL="[object Number]",sL="[object RegExp]",oL="[object Set]",lL="[object String]",cL="[object Symbol]",uL="[object ArrayBuffer]",fL="[object DataView]",dL="[object Float32Array]",pL="[object Float64Array]",hL="[object Int8Array]",mL="[object Int16Array]",gL="[object Int32Array]",yL="[object Uint8Array]",vL="[object Uint8ClampedArray]",TL="[object Uint16Array]",RL="[object Uint32Array]";function CA(t,e,r){var n=t.constructor;switch(e){case uL:return rg(t);case rL:case nL:return new n(+t);case fL:return JO(t,r);case dL:case pL:case hL:case mL:case gL:case yL:case vL:case TL:case RL:return tL(t,r);case aL:return new n;case iL:case lL:return new n(t);case sL:return QO(t);case oL:return new n;case cL:return eL(t)}}s(CA,"initCloneByTag");var $L=CA;function SA(t){return typeof t.constructor=="function"&&!Sc(t)?mP(Y$(t)):{}}s(SA,"initCloneObject");var AL=SA,EL="[object Map]";function bA(t){return Vt(t)&&Mo(t)==EL}s(bA,"baseIsMap");var _L=bA,Zy=Yr&&Yr.isMap,CL=Zy?bc(Zy):_L,SL=CL,bL="[object Set]";function wA(t){return Vt(t)&&Mo(t)==bL}s(wA,"baseIsSet");var wL=wA,Qy=Yr&&Yr.isSet,IL=Qy?bc(Qy):wL,NL=IL,kL=1,PL=2,OL=4,IA="[object Arguments]",LL="[object Array]",DL="[object Boolean]",ML="[object Date]",xL="[object Error]",NA="[object Function]",FL="[object GeneratorFunction]",GL="[object Map]",jL="[object Number]",kA="[object Object]",UL="[object RegExp]",zL="[object Set]",BL="[object String]",KL="[object Symbol]",qL="[object WeakMap]",WL="[object ArrayBuffer]",VL="[object DataView]",HL="[object Float32Array]",YL="[object Float64Array]",XL="[object Int8Array]",JL="[object Int16Array]",ZL="[object Int32Array]",QL="[object Uint8Array]",eD="[object Uint8ClampedArray]",tD="[object Uint16Array]",rD="[object Uint32Array]",$e={};$e[IA]=$e[LL]=$e[WL]=$e[VL]=$e[DL]=$e[ML]=$e[HL]=$e[YL]=$e[XL]=$e[JL]=$e[ZL]=$e[GL]=$e[jL]=$e[kA]=$e[UL]=$e[zL]=$e[BL]=$e[KL]=$e[QL]=$e[eD]=$e[tD]=$e[rD]=!0;$e[xL]=$e[NA]=$e[qL]=!1;function Wl(t,e,r,n,a,i){var o,c=e&kL,l=e&PL,u=e&OL;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=YO(t),!c)return yP(t,o)}else{var d=Mo(t),p=d==NA||d==FL;if(ec(t))return NO(t,c);if(d==kA||d==IA||p&&!a){if(o=l||p?{}:AL(t),!c)return l?xO(t,wO(o,t)):LO(t,bO(o,t))}else{if(!$e[d])return a?t:{};o=$L(t,d,c)}}i||(i=new ql);var m=i.get(t);if(m)return m;i.set(t,o),NL(t)?t.forEach(function(E){o.add(Wl(E,e,r,E,t,i))}):SL(t)&&t.forEach(function(E,T){o.set(T,Wl(E,e,r,T,t,i))});var g=u?l?vA:Hp:l?Df:$t,v=f?void 0:g(t);return xR(v||t,function(E,T){v&&(T=E,E=t[T]),Pf(o,T,Wl(E,e,r,T,t,i))}),o}s(Wl,"baseClone");var nD=Wl,aD=4;function PA(t){return nD(t,aD)}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 Ic=OA,iD="__lodash_hash_undefined__";function LA(t){return this.__data__.set(t,iD),this}s(LA,"setCacheAdd");var sD=LA;function DA(t){return this.__data__.has(t)}s(DA,"setCacheHas");var oD=DA;function nc(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Gf;++e<r;)this.add(t[e])}s(nc,"SetCache");nc.prototype.add=nc.prototype.push=sD;nc.prototype.has=oD;var ng=nc;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,lD=1,cD=2;function GA(t,e,r,n,a,i){var o=r&lD,c=t.length,l=e.length;if(c!=l&&!(o&&l>c))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&cD?new ng:void 0;for(i.set(t,e),i.set(e,t);++d<c;){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,w){if(!ag(m,w)&&(g===T||a(g,T,r,n,i)))return m.push(w)})){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 uD=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,fD=1,dD=2,pD="[object Boolean]",hD="[object Date]",mD="[object Error]",gD="[object Map]",yD="[object Number]",vD="[object RegExp]",TD="[object Set]",RD="[object String]",$D="[object Symbol]",AD="[object ArrayBuffer]",ED="[object DataView]",ev=Dt?Dt.prototype:void 0,_d=ev?ev.valueOf:void 0;function BA(t,e,r,n,a,i,o){switch(r){case ED: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 Ku(t),new Ku(e)));case pD:case hD:case yD:return _c(+t,+e);case mD:return t.name==e.name&&t.message==e.message;case vD:case RD:return t==e+"";case gD:var c=uD;case TD:var l=n&fD;if(c||(c=ig),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;n|=dD,o.set(t,e);var f=jA(c(t),c(e),n,a,i,o);return o.delete(t),f;case $D:if(_d)return _d.call(t)==_d.call(e)}return!1}s(BA,"equalByTag");var _D=BA,CD=1,SD=Object.prototype,bD=SD.hasOwnProperty;function KA(t,e,r,n,a,i){var o=r&CD,c=Hp(t),l=c.length,u=Hp(e),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=c[d];if(!(o?p in e:bD.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=c[d];var T=t[p],w=e[p];if(n)var C=o?n(w,T,p,e,t,i):n(T,w,p,t,e,i);if(!(C===void 0?T===w||a(T,w,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 wD=KA,ID=1,tv="[object Arguments]",rv="[object Array]",Fc="[object Object]",ND=Object.prototype,nv=ND.hasOwnProperty;function qA(t,e,r,n,a,i){var o=ae(t),c=ae(e),l=o?rv:Mo(t),u=c?rv:Mo(e);l=l==tv?Fc:l,u=u==tv?Fc:u;var f=l==Fc,d=u==Fc,p=l==u;if(p&&ec(t)){if(!ec(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new ql),o||Hm(t)?jA(t,e,r,n,a,i):_D(t,e,l,r,n,a,i);if(!(r&ID)){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 ql),a(v,E,r,n,i)}}return p?(i||(i=new ql),wD(t,e,r,n,a,i)):!1}s(qA,"baseIsEqualDeep");var kD=qA;function sg(t,e,r,n,a){return t===e?!0:t==null||e==null||!Vt(t)&&!Vt(e)?t!==t&&e!==e:kD(t,e,r,n,sg,a)}s(sg,"baseIsEqual");var WA=sg,PD=1,OD=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 c=r[a];if(o&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){c=r[a];var l=c[0],u=t[l],f=c[1];if(o&&c[2]){if(u===void 0&&!(l in t))return!1}else{var d=new ql;if(n)var p=n(u,f,l,t,e,d);if(!(p===void 0?WA(f,u,PD|OD,n,d):p))return!1}}return!0}s(VA,"baseIsMatch");var LD=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 DD=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=DD(t);return e.length==1&&e[0][2]?ZA(e[0][0],e[0][1]):function(r){return r===t||LD(r,t,e)}}s(QA,"baseMatches");var MD=QA;function eE(t,e){return t!=null&&e in Object(t)}s(eE,"baseHasIn");var xD=eE;function tE(t,e,r){e=Uf(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=wc(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)&&kf(o,a)&&(ae(t)||Lf(t)))}s(tE,"hasPath");var rE=tE;function nE(t,e){return t!=null&&rE(t,e,xD)}s(nE,"hasIn");var FD=nE,GD=1,jD=2;function aE(t,e){return Ym(t)&&YA(e)?ZA(wc(t),e):function(r){var n=yO(r,t);return n===void 0&&n===e?FD(r,t):WA(e,n,GD|jD)}}s(aE,"baseMatchesProperty");var UD=aE;function iE(t){return function(e){return e==null?void 0:e[t]}}s(iE,"baseProperty");var zD=iE;function sE(t){return function(e){return Xm(e,t)}}s(sE,"basePropertyDeep");var BD=sE;function oE(t){return Ym(t)?zD(wc(t)):BD(t)}s(oE,"property");var KD=oE;function lE(t){return typeof t=="function"?t:t==null?Do:typeof t=="object"?ae(t)?UD(t[0],t[1]):MD(t):KD(t)}s(lE,"baseIteratee");var pr=lE;function cE(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(cE,"arrayAggregator");var qD=cE;function uE(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),c=o.length;c--;){var l=o[t?c:++a];if(r(i[l],l,i)===!1)break}return e}}s(uE,"createBaseFor");var WD=uE,VD=WD(),HD=VD;function fE(t,e){return t&&HD(t,e,$t)}s(fE,"baseForOwn");var YD=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 XD=dE,JD=XD(YD),ta=JD;function pE(t,e,r,n){return ta(t,function(a,i,o){e(n,a,r(a),o)}),n}s(pE,"baseAggregator");var ZD=pE;function hE(t,e){return function(r,n){var a=ae(r)?qD:ZD,i=e?e():{};return a(r,t,pr(n),i)}}s(hE,"createAggregator");var QD=hE,mE=Object.prototype,eM=mE.hasOwnProperty,tM=Wm(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&Of(e[0],e[1],a)&&(n=1);++r<n;)for(var i=e[r],o=Df(i),c=-1,l=o.length;++c<l;){var u=o[c],f=t[u];(f===void 0||_c(f,mE[u])&&!eM.call(t,u))&&(t[u]=i[u])}return t}),og=tM;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,rM=200;function TE(t,e,r,n){var a=-1,i=KR,o=!0,c=t.length,l=[],u=e.length;if(!c)return l;r&&(e=Ac(e,bc(r))),n?(i=vE,o=!1):e.length>=rM&&(i=ag,o=!1,e=new ng(e));e:for(;++a<c;){var f=t[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var p=u;p--;)if(e[p]===d)continue e;l.push(f)}else i(e,d,n)||l.push(f)}return l}s(TE,"baseDifference");var nM=TE,aM=Wm(function(t,e){return av(t)?nM(t,Qm(e,1,av,!0)):[]}),zf=aM;function RE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}s(RE,"last");var Gn=RE;function $E(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:Ec(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:Ec(e),e=n-e,J$(t,0,e<0?0:e)):[]}s(AE,"dropRight");var ac=AE;function EE(t){return typeof t=="function"?t:Do}s(EE,"castFunction");var iM=EE;function _E(t,e){var r=ae(t)?xR:ta;return r(t,iM(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 sM=CE;function SE(t,e){var r=!0;return ta(t,function(n,a,i){return r=!!e(n,a,i),r}),r}s(SE,"baseEvery");var oM=SE;function bE(t,e,r){var n=ae(t)?sM:oM;return r&&Of(t,e,r)&&(e=void 0),n(t,pr(e))}s(bE,"every");var Wt=bE;function wE(t,e){var r=[];return ta(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(c){return i(a[c],c,a)},"predicate")}var o=t(e,r,n);return o>-1?a[i?e[o]:o]:void 0}}s(kE,"createFind");var lM=kE,cM=Math.max;function PE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ec(r);return a<0&&(a=cM(n+a,0)),GR(t,pr(e),a)}s(PE,"findIndex");var uM=PE,fM=lM(uM),xo=fM;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 ta(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(LE,"baseMap");var dM=LE;function DE(t,e){var r=ae(t)?Ac:dM;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,pM=Object.prototype,hM=pM.hasOwnProperty,mM=QD(function(t,e,r){hM.call(t,r)?t[r].push(e):qm(t,r,[e])}),gM=mM,yM=Object.prototype,vM=yM.hasOwnProperty;function xE(t,e){return t!=null&&vM.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)&&tn(t)==RM}s(GE,"isString");var mt=GE;function jE(t,e){return Ac(e,function(r){return t[r]})}s(jE,"baseValues");var $M=jE;function UE(t){return t==null?[]:$M(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?Ec(r):0;var a=t.length;return r<0&&(r=AM(a+r,0)),mt(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&Km(t,e,r)>-1}s(zE,"includes");var ft=zE,EM=Math.max;function BE(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:Ec(r);return a<0&&(a=EM(n+a,0)),Km(t,e,a)}s(BE,"indexOf");var iv=BE,_M="[object Map]",CM="[object Set]",SM=Object.prototype,bM=SM.hasOwnProperty;function KE(t){if(t==null)return!0;if(dr(t)&&(ae(t)||typeof t=="string"||typeof t.splice=="function"||ec(t)||Hm(t)||Lf(t)))return!t.length;var e=Mo(t);if(e==_M||e==CM)return!t.size;if(Sc(t))return!g$(t).length;for(var r in t)if(bM.call(t,r))return!1;return!0}s(KE,"isEmpty");var Ee=KE,wM="[object RegExp]";function qE(t){return Vt(t)&&tn(t)==wM}s(qE,"baseIsRegExp");var IM=qE,sv=Yr&&Yr.isRegExp,NM=sv?bc(sv):IM,Ir=NM;function WE(t){return t===void 0}s(WE,"isUndefined");var Nr=WE,kM="Expected a function";function VE(t){if(typeof t!="function")throw new TypeError(kM);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 PM=VE;function HE(t,e,r,n){if(!Mt(t))return t;e=Uf(e,t);for(var a=-1,i=e.length,o=i-1,c=t;c!=null&&++a<i;){var l=wc(e[a]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(a!=o){var f=c[l];u=n?n(f,l,c):void 0,u===void 0&&(u=Mt(f)?f:kf(e[a+1])?[]:{})}Pf(c,l,u),c=c[l]}return t}s(HE,"baseSet");var OM=HE;function YE(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var o=e[n],c=Xm(t,o);r(c,o)&&OM(i,Uf(o,t),c)}return i}s(YE,"basePickBy");var LM=YE;function XE(t,e){if(t==null)return{};var r=Ac(vA(t),function(n){return[n]});return e=pr(e),LM(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,c){r=n?(n=!1,i):e(r,i,o,c)}),r}s(JE,"baseReduce");var DM=JE;function ZE(t,e,r){var n=ae(t)?RO:DM,a=arguments.length<3;return n(t,pr(e),r,a,ta)}s(ZE,"reduce");var Et=ZE;function QE(t,e){var r=ae(t)?eg:IE;return r(t,PM(pr(e)))}s(QE,"reject");var Bf=QE;function e_(t,e){var r;return ta(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}s(e_,"baseSome");var MM=e_;function t_(t,e,r){var n=ae(t)?xA:MM;return r&&Of(t,e,r)&&(e=void 0),n(t,pr(e))}s(t_,"some");var r_=t_,xM=1/0,FM=ja&&1/ig(new ja([,-0]))[1]==xM?function(t){return new ja(t)}:qe,GM=FM,jM=200;function n_(t,e,r){var n=-1,a=KR,i=t.length,o=!0,c=[],l=c;if(r)o=!1,a=vE;else if(i>=jM){var u=e?null:GM(t);if(u)return ig(u);o=!1,a=ag,l=new ng}else l=e?[]:c;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),c.push(f)}else a(l,d,r)||(l!==c&&l.push(d),c.push(f))}return c}s(n_,"baseUniq");var UM=n_;function a_(t){return t&&t.length?UM(t):[]}s(a_,"uniq");var lg=a_;function qu(t){console&&console.error&&console.error(`Error: ${t}`)}s(qu,"PRINT_ERROR");function cg(t){console&&console.warn&&console.warn(`Warning: ${t}`)}s(cg,"PRINT_WARNING");function ug(t){const e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}s(ug,"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 mt(t.LABEL)&&t.LABEL!==""}s(s_,"hasTokenLabel");var Xa,hr=(Xa=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(Xa,"AbstractProduction"),Xa),Ja,lt=(Ja=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(Ja,"NonTerminal"),Ja),Za,Bo=(Za=class extends hr{constructor(e){super(e.definition),this.orgText="",At(this,Yt(e,r=>r!==void 0))}},s(Za,"Rule"),Za),Qa,gt=(Qa=class extends hr{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,At(this,Yt(e,r=>r!==void 0))}},s(Qa,"Alternative"),Qa),ei,Qe=(ei=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ei,"Option"),ei),ti,_t=(ti=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ti,"RepetitionMandatory"),ti),ri,Ct=(ri=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ri,"RepetitionMandatoryWithSeparator"),ri),ni,xe=(ni=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ni,"Repetition"),ni),ai,yt=(ai=class extends hr{constructor(e){super(e.definition),this.idx=1,At(this,Yt(e,r=>r!==void 0))}},s(ai,"RepetitionWithSeparator"),ai),ii,vt=(ii=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(ii,"Alternation"),ii),si,we=(si=class{constructor(e){this.idx=1,At(this,Yt(e,r=>r!==void 0))}accept(e){e.visit(this)}},s(si,"Terminal"),si);function o_(t){return z(t,Vl)}s(o_,"serializeGrammar");function Vl(t){function e(r){return z(r,Vl)}if(s(e,"convertDefinition"),t instanceof lt){const r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return mt(t.label)&&(r.label=t.label),r}else{if(t instanceof gt)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:Vl(new we({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof yt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Vl(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 vt)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};mt(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 Bo)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}s(Vl,"serializeProduction");var oi,Ko=(oi=class{visit(e){const r=e;switch(r.constructor){case lt:return this.visitNonTerminal(r);case gt:return this.visitAlternative(r);case Qe:return this.visitOption(r);case _t:return this.visitRepetitionMandatory(r);case Ct:return this.visitRepetitionMandatoryWithSeparator(r);case yt:return this.visitRepetitionWithSeparator(r);case xe:return this.visitRepetition(r);case vt:return this.visitAlternation(r);case we:return this.visitTerminal(r);case Bo: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(oi,"GAstVisitor"),oi);function l_(t){return t instanceof gt||t instanceof Qe||t instanceof xe||t instanceof _t||t instanceof Ct||t instanceof yt||t instanceof we||t instanceof Bo}s(l_,"isSequenceProd");function ic(t,e=[]){return t instanceof Qe||t instanceof xe||t instanceof yt?!0:t instanceof vt?r_(t.definition,n=>ic(n,e)):t instanceof lt&&ft(e,t)?!1:t instanceof hr?(t instanceof lt&&e.push(t),Wt(t.definition,n=>ic(n,e))):!1}s(ic,"isOptionalProd");function c_(t){return t instanceof vt}s(c_,"isBranchingProd");function Ut(t){if(t instanceof lt)return"SUBRULE";if(t instanceof Qe)return"OPTION";if(t instanceof vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)return"MANY_SEP";if(t instanceof xe)return"MANY";if(t instanceof we)return"CONSUME";throw Error("non exhaustive match")}s(Ut,"getProductionDslName");var li,Kf=(li=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 gt)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 yt)this.walkManySep(n,i,r);else if(n instanceof xe)this.walkMany(n,i,r);else if(n instanceof vt)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=Jp(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=Jp(e,r,n);this.walk(e,a)}walkOr(e,r,n){const a=r.concat(n);V(e.definition,i=>{const o=new gt({definition:[i]});this.walk(o,a)})}},s(li,"RestWalker"),li);function Jp(t,e,r){return[new Qe({definition:[new we({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}s(Jp,"restForRepetitionWithSeparator");function qo(t){if(t instanceof lt)return qo(t.referencedRule);if(t instanceof we)return d_(t);if(l_(t))return u_(t);if(c_(t))return f_(t);throw Error("non exhaustive match")}s(qo,"first");function u_(t){let e=[];const r=t.definition;let n=0,a=r.length>n,i,o=!0;for(;a&&o;)i=r[n],o=ic(i),e=e.concat(qo(i)),n=n+1,a=r.length>n;return lg(e)}s(u_,"firstForSequence");function f_(t){const e=z(t.definition,r=>qo(r));return lg(qt(e))}s(f_,"firstForBranching");function d_(t){return[t.terminalType]}s(d_,"firstForTerminal");var p_="_~IN~_",ci,zM=(ci=class extends Kf{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 gt({definition:i}),c=qo(o);this.follows[a]=c}},s(ci,"ResyncFollowsWalker"),ci);function h_(t){const e={};return V(t,r=>{const n=new zM(r).startWalking();At(e,n)}),e}s(h_,"computeAllProdsFollows");function m_(t,e){return t.name+e+p_}s(m_,"buildBetweenProdsFollowPrefix");var uu={},BM=new VT;function Nc(t){const e=t.toString();if(uu.hasOwnProperty(e))return uu[e];{const r=BM.pattern(e);return uu[e]=r,r}}s(Nc,"getRegExpAst");function g_(){uu={}}s(g_,"clearRegExpParserCache");var y_="Complement Sets are not supported for first char optimization",Wu=`Unable to use "first char" lexer optimizations:
47
+ `;function v_(t,e=!1){try{const r=Nc(t);return Vu(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===y_)e&&cg(`${Wu} 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.`),qu(`${Wu}
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 Vu(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a<t.value.length;a++)Vu(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":kl(o.value,e,r);break;case"Set":if(o.complement===!0)throw Error(y_);V(o.value,l=>{if(typeof l=="number")kl(l,e,r);else{const u=l;if(r===!0)for(let f=u.from;f<=u.to;f++)kl(f,e,r);else{for(let f=u.from;f<=u.to&&f<Ol;f++)kl(f,e,r);if(u.to>=Ol){const f=u.from>=Ol?u.from:Ol,d=u.to,p=kr(f),m=kr(d);for(let g=p;g<=m;g++)e[g]=g}}}});break;case"Group":Vu(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}const c=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Hu(o)===!1||o.type!=="Group"&&c===!1)break}break;default:throw Error("non exhaustive match!")}return We(e)}s(Vu,"firstCharOptimizedIndices");function kl(t,e,r){const n=kr(t);e[n]=n,r===!0&&T_(t,e)}s(kl,"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 Zp(t,e){return xo(t.value,r=>{if(typeof r=="number")return ft(e,r);{const n=r;return xo(e,a=>n.from<=a&&a<=n.to)!==void 0}})}s(Zp,"findCode");function Hu(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?ae(t.value)?Wt(t.value,Hu):Hu(t.value):!1}s(Hu,"isWholeOptional");var ui,KM=(ui=class extends Ef{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?Zp(e,this.targetCharCodes)===void 0&&(this.found=!0):Zp(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},s(ui,"CharCodeFinder"),ui);function qf(t,e){if(e instanceof RegExp){const r=Nc(e),n=new KM(t);return n.visit(r),n.found}else return xo(e,r=>ft(t,r.charCodeAt(0)))!==void 0}s(qf,"canMatchCharCode");var jn="PATTERN",Pl="defaultMode",Gc="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((w,C)=>C(),"tracer")});const r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{z_()});let n;r("Reject Lexer.NA",()=>{n=Bf(t,w=>w[jn]===st.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=z(n,w=>{const C=w[jn];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?eh(C):Qp(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?eh(B):Qp(B)}}else throw Error("non exhaustive match")}})});let o,c,l,u,f;r("misc mapping",()=>{o=z(n,w=>w.tokenTypeIdx),c=z(n,w=>{const C=w.GROUP;if(C!==st.SKIPPED){if(mt(C))return C;if(Nr(C))return!1;throw Error("non exhaustive match")}}),l=z(n,w=>{const C=w.LONGER_ALT;if(C)return ae(C)?z(C,B=>iv(n,B)):[iv(n,C)]}),u=z(n,w=>w.PUSH_MODE),f=z(n,w=>q(w,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{const w=hg(e.lineTerminatorCharacters);d=z(n,C=>!1),e.positionTracking!=="onlyOffset"&&(d=z(n,C=>q(C,"LINE_BREAKS")?!!C.LINE_BREAKS:pg(C,w)===!1&&qf(w,C.PATTERN)))});let p,m,g,v;r("Misc Mapping #2",()=>{p=z(n,dg),m=z(i,j_),g=Et(n,(w,C)=>{const k=C.GROUP;return mt(k)&&k!==st.SKIPPED&&(w[k]=[]),w},{}),v=z(i,(w,C)=>({pattern:i[C],longerAlt:l[C],canLineTerminator:d[C],isCustom:p[C],short:m[C],group:c[C],push:u[C],pop:f[C],tokenTypeIdx:o[C],tokenType:n[C]}))});let E=!0,T=[];return e.safeMode||r("First Char Optimization",()=>{T=Et(n,(w,C,k)=>{if(typeof C.PATTERN=="string"){const B=C.PATTERN.charCodeAt(0),re=kr(B);fu(w,re,v[k])}else if(ae(C.START_CHARS_HINT)){let B;V(C.START_CHARS_HINT,re=>{const X=typeof re=="string"?re.charCodeAt(0):re,ge=kr(X);B!==ge&&(B=ge,fu(w,ge,v[k]))})}else if(Ir(C.PATTERN))if(C.PATTERN.unicode)E=!1,e.ensureOptimizations&&qu(`${Wu} 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);Ee(B)&&(E=!1),V(B,re=>{fu(w,re,v[k])})}else e.ensureOptimizations&&qu(`${Wu} 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 w},[])}),{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[jn]));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,jn)),r=z(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Fe.MISSING_PATTERN,tokenTypes:[a]})),n=zf(t,e);return{errors:r,valid:n}}s(__,"findMissingPatterns");function C_(t){const e=Ft(t,a=>{const i=a[jn];return!Ir(i)&&!Mr(i)&&!q(i,"exec")&&!mt(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=zf(t,e);return{errors:r,valid:n}}s(C_,"findInvalidPatterns");var qM=/[^\\][$]/;function S_(t){const a=class a extends Ef{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 c=Nc(o),l=new e;return l.visit(c),l.found}catch{return qM.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 Ef{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 c=Nc(o),l=new e;return l.visit(c),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[jn];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,c)=>(i.PATTERN.source===c.PATTERN.source&&!ft(e,c)&&c.PATTERN!==st.NA&&(e.push(c),o.push(c)),o),[]));r=Ic(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&&!mt(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||(mt(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:c})=>{if(a<o&&L_(i,n.PATTERN)){const l=`Token: ->${c.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,c]})}})}),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 xo([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}s(D_,"noMetaChar");function M_(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}s(M_,"usesLookAheadOrBehind");function Qp(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}s(Qp,"addStartOfInput");function eh(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}s(eh,"addStickyFlag");function x_(t,e,r){const n=[];return q(t,Pl)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Pl+`> property in its definition
68
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),q(t,Gc)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Gc+`> property in its definition
69
+ `,type:Fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),q(t,Gc)&&q(t,Pl)&&!q(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Pl}: <${t.defaultMode}>which does not exist
70
+ `,type:Fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),q(t,Gc)&&V(t.modes,(a,i)=>{V(a,(o,c)=>{if(Nr(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${c}>
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,u=>{!Nr(u)&&!ft(a,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.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=Ic(qt(We(t.modes))),o=Bf(i,l=>l[jn]===st.NA),c=hg(r);return e&&V(o,l=>{const u=pg(l,c);if(u!==!1){const d={message:U_(l,u),type:u.issue,tokenType:l};n.push(d)}else q(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(a=!0):qf(c,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(mt(e))return!1;throw Error("non exhaustive match")}s(dg,"isCustomPattern");function j_(t){return mt(t)&&t.length===1?t.charCodeAt(0):!1}s(j_,"isShortPattern");var VM={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{qf(e,t.PATTERN)}catch(r){return{issue:Fe.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(mt(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=>mt(r)?r.charCodeAt(0):r)}s(hg,"getCharCodes");function fu(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}s(fu,"addToMapOfArrays");var Ol=256,du=[];function kr(t){return t<Ol?t:du[t]}s(kr,"charCodeToOptimizedIndex");function z_(){if(Ee(du)){du=new Array(65536);for(let t=0;t<65536;t++)du[t]=t>255?255+~~(t/255):t}}s(z_,"initCharCodeToOptimizedIndexMap");function Wo(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}s(Wo,"tokenStructuredMatcher");function sc(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}s(sc,"tokenStructuredMatcherNoCategories");var ov=1,B_={};function Vo(t){const e=K_(t);q_(e),V_(e),W_(e),V(e,r=>{r.isParent=r.categoryMatches.length>0})}s(Vo,"augmentTokenTypes");function K_(t){let e=et(t),r=t,n=!0;for(;n;){r=Ic(qt(z(r,i=>i.CATEGORIES)));const a=zf(r,e);e=e.concat(a),Ee(a)?n=!1:r=a}return e}s(K_,"expandCategories");function q_(t){V(t,e=>{gg(e)||(B_[ov]=e,e.tokenTypeIdx=ov++),th(e)&&!ae(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),th(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 th(t){return q(t,"CATEGORIES")}s(th,"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 rh={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 Ll={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
82
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:rh,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ll);var fi,st=(fi=class{constructor(e,r=Ll){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:c,value:l}=ug(i),u=c>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${o}<-- <${a}> time: ${c}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({},Ll,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===Ll.lineTerminatorsPattern)this.config.lineTerminatorsPattern=VM;else if(this.config.lineTerminatorCharacters===Ll.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:Pl}:(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,(c,l)=>{a.modes[l]=Bf(c,u=>Nr(u))});const o=$t(a.modes);if(V(a.modes,(c,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_(c,o))}),Ee(this.lexerDefinitionErrors)){Vo(c);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=$_(c,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=At({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=a.defaultMode,!Ee(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=z(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
85
+ `);throw new Error(`Errors detected in definition of Lexer:
86
+ `+l)}V(this.lexerDefinitionWarning,c=>{cg(c.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(R_?(this.chopInput=Do,this.match=this.matchWithTest):(this.updateLastIndex=qe,this.match=this.matchWithExec),i&&(this.handleModes=qe),this.trackStartLines===!1&&(this.computeNewColumn=Do),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 c=Et(this.canModeBeOptimized,(l,u,f)=>(u===!1&&l.push(f),l),[]);if(r.ensureOptimizations&&!Ee(c))throw Error(`Lexer Modes: < ${c.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(!Ee(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,c,l,u,f,d,p,m,g,v,E,T;const w=e,C=w.length;let k=0,B=0;const re=this.hasCustom?0:Math.floor(e.length/10),X=new Array(re),ge=[];let _e=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 b;function O(){return R}s(O,"getPossiblePatternsSlow");function M(U){const Q=kr(U),fe=I[Q];return fe===void 0?A:fe}s(M,"getPossiblePatternsOptimized");const L=s(U=>{if($.length===1&&U.tokenType.PUSH_MODE===void 0){const Q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(U);ge.push({offset:U.startOffset,line:U.startLine,column:U.startColumn,length:U.image.length,message:Q})}else{$.pop();const Q=Gn($);R=this.patternIdxToConfig[Q],I=this.charCodeToPatternIdxToConfig[Q],S=R.length;const fe=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;I&&fe?b=M:b=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?b=M:b=O}s(j,"push_mode"),j.call(this,r);let F;const te=this.config.recoveryEnabled;for(;k<C;){l=null;const U=w.charCodeAt(k),Q=b(U),fe=Q.length;for(n=0;n<fe;n++){F=Q[n];const de=F.pattern;u=null;const pe=F.short;if(pe!==!1?U===pe&&(l=de):F.isCustom===!0?(T=de.exec(w,k,X,oe),T!==null?(l=T[0],T.payload!==void 0&&(u=T.payload)):l=null):(this.updateLastIndex(de,k),l=this.match(de,e,k)),l!==null){if(c=F.longerAlt,c!==void 0){const ye=c.length;for(i=0;i<ye;i++){const Ne=R[c[i]],he=Ne.pattern;if(f=null,Ne.isCustom===!0?(T=he.exec(w,k,X,oe),T!==null?(o=T[0],T.payload!==void 0&&(f=T.payload)):o=null):(this.updateLastIndex(he,k),o=this.match(he,e,k)),o&&o.length>l.length){l=o,u=f,F=Ne;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,_e,Ie,d),this.handlePayload(g,u),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 de=0,pe,ye;P.lastIndex=0;do pe=P.test(l),pe===!0&&(ye=P.lastIndex-1,de++);while(pe===!0);de!==0&&(_e=_e+de,Ie=d-ye,this.updateTokenEndLineColumnLocation(g,p,ye,de,_e,Ie,d))}this.handleModes(F,L,j,g)}else{const de=k,pe=_e,ye=Ie;let Ne=te===!1;for(;Ne===!1&&k<C;)for(e=this.chopInput(e,1),k++,a=0;a<S;a++){const he=R[a],J=he.pattern,Ue=he.short;if(Ue!==!1?w.charCodeAt(k)===Ue&&(Ne=!0):he.isCustom===!0?Ne=J.exec(w,k,X,oe)!==null:(this.updateLastIndex(J,k),Ne=J.exec(e)!==null),Ne===!0)break}if(v=k-de,Ie=this.computeNewColumn(Ie,v),E=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,de,v,pe,ye,Gn($)),ge.push({offset:de,line:pe,column:ye,length:v,message:E}),te===!1)break}}return this.hasCustom||(X.length=B),{tokens:X,groups:oe,errors:ge}}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,c){let l,u;r!==void 0&&(l=n===c-1,u=l?-1:0,a===1&&l===!0||(e.endLine=i+u,e.endColumn=o-1+-u))}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,c){return{image:e,startOffset:r,endOffset:r+c-1,startLine:i,endLine:i,startColumn:o,endColumn:o+c-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(fi,"Lexer"),fi);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 Ln(t){return yg(t)?t.LABEL:t.name}s(Ln,"tokenLabel");function yg(t){return mt(t.LABEL)&&t.LABEL!==""}s(yg,"hasTokenLabel");var HM="parent",lv="categories",cv="label",uv="group",fv="push_mode",dv="pop_mode",pv="longer_alt",hv="line_breaks",mv="start_chars_hint";function Ua(t){return J_(t)}s(Ua,"createToken");function J_(t){const e=t.pattern,r={};if(r.name=t.name,Nr(e)||(r.PATTERN=e),q(t,HM))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]),Vo([r]),q(t,cv)&&(r.LABEL=t[cv]),q(t,uv)&&(r.GROUP=t[uv]),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 Xr=Ua({name:"EOF",pattern:st.NA});Vo([Xr]);function kc(t,e,r,n,a,i,o,c){return{image:e,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:o,endColumn:c,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}s(kc,"createTokenInstance");function vg(t,e){return Wo(t,e)}s(vg,"tokenMatcher");var Fa={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${yg(t)?`--> ${Ln(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: ",c=`
92
+ but found: '`+Ht(e).image+"'";if(n)return i+n+c;{const l=Et(t,(p,m)=>p.concat(m),[]),u=z(l,p=>`[${z(p,m=>Ln(m)).join(", ")}]`),d=`one of these possible Token sequences:
93
+ ${z(u,(p,m)=>` ${m+1}. ${p}`).join(`
94
+ `)}`;return i+d+c}},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,u=>`[${z(u,f=>Ln(f)).join(",")}]`).join(" ,")}>`;return a+l+o}}};Object.freeze(Fa);var YM={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
97
+ inside top level rule: ->`+t.name+"<-"}},kn={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),c=r(a),l=i>0;let u=`->${o}${l?i:""}<- ${c?`with argument: ->${c}<-`:""}
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 u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,`
101
+ `),u},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=>Ln(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=>Ln(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 Bo?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 XM(t,e);return r.resolveRefs(),r.errors}s(Z_,"resolveGrammar");var di,XM=(di=class extends Ko{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:ct.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},s(di,"GastRefResolverVisitor"),di),pi,JM=(pi=class extends Kf{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(){Ee(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},s(pi,"AbstractNextPossibleTokensWalker"),pi),hi,ZM=(hi=class extends JM{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 gt({definition:a});this.possibleTokTypes=qo(i),this.found=!0}}},s(hi,"NextAfterTokenWalker"),hi),mi,Wf=(mi=class extends Kf{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(mi,"AbstractNextTerminalAfterProductionWalker"),mi),gi,QM=(gi=class extends Wf{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(gi,"NextTerminalAfterManyWalker"),gi),yi,gv=(yi=class extends Wf{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(yi,"NextTerminalAfterManySepWalker"),yi),vi,ex=(vi=class extends Wf{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(vi,"NextTerminalAfterAtLeastOneWalker"),vi),Ti,yv=(Ti=class extends Wf{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(Ti,"NextTerminalAfterAtLeastOneSepWalker"),Ti);function Yu(t,e,r=[]){r=et(r);let n=[],a=0;function i(c){return c.concat(Ze(t,a+1))}s(i,"remainingPathWith");function o(c){const l=Yu(i(c),e,r);return n.concat(l)}for(s(o,"getAlternativesForProd");r.length<e&&a<t.length;){const c=t[a];if(c instanceof gt)return o(c.definition);if(c instanceof lt)return o(c.definition);if(c instanceof Qe)n=o(c.definition);else if(c instanceof _t){const l=c.definition.concat([new xe({definition:c.definition})]);return o(l)}else if(c instanceof Ct){const l=[new gt({definition:c.definition}),new xe({definition:[new we({terminalType:c.separator})].concat(c.definition)})];return o(l)}else if(c instanceof yt){const l=c.definition.concat([new xe({definition:[new we({terminalType:c.separator})].concat(c.definition)})]);n=o(l)}else if(c instanceof xe){const l=c.definition.concat([new xe({definition:c.definition})]);n=o(l)}else{if(c instanceof vt)return V(c.definition,l=>{Ee(l.definition)===!1&&(n=o(l.definition))}),n;if(c instanceof we)r.push(c.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:Ze(t,a)}),n}s(Yu,"possiblePathsFrom");function Tg(t,e,r,n){const a="EXIT_NONE_TERMINAL",i=[a],o="EXIT_ALTERNATIVE";let c=!1;const l=e.length,u=l-n-1,f=[],d=[];for(d.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Ee(d);){const p=d.pop();if(p===o){c&&Gn(d).idx<=u&&d.pop();continue}const m=p.def,g=p.idx,v=p.ruleStack,E=p.occurrenceStack;if(Ee(m))continue;const T=m[0];if(T===a){const w={idx:g,def:Ze(m),ruleStack:ac(v),occurrenceStack:ac(E)};d.push(w)}else if(T instanceof we)if(g<l-1){const w=g+1,C=e[w];if(r(C,T.terminalType)){const k={idx:w,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}),c=!0;else throw Error("non exhaustive match");else if(T instanceof lt){const w=et(v);w.push(T.nonTerminalName);const C=et(E);C.push(T.idx);const k={idx:g,def:T.definition.concat(i,Ze(m)),ruleStack:w,occurrenceStack:C};d.push(k)}else if(T instanceof Qe){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),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 w=new xe({definition:T.definition,idx:T.idx}),C=T.definition.concat([w],Ze(m)),k={idx:g,def:C,ruleStack:v,occurrenceStack:E};d.push(k)}else if(T instanceof Ct){const w=new we({terminalType:T.separator}),C=new xe({definition:[w].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 yt){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),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)),re={idx:g,def:B,ruleStack:v,occurrenceStack:E};d.push(re)}else if(T instanceof xe){const w={idx:g,def:Ze(m),ruleStack:v,occurrenceStack:E};d.push(w),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 vt)for(let w=T.definition.length-1;w>=0;w--){const C=T.definition[w],k={idx:g,def:C.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E};d.push(k),d.push(o)}else if(T instanceof gt)d.push({idx:g,def:T.definition.concat(Ze(m)),ruleStack:v,occurrenceStack:E});else if(T instanceof Bo)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 Vf(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 yt||t==="RepetitionWithSeparator")return De.REPETITION_WITH_SEPARATOR;if(t instanceof vt||t==="Alternation")return De.ALTERNATION;throw Error("non exhaustive match")}s(Vf,"getProdType");function nh(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=Vf(n);return i===De.ALTERNATION?Pc(e,r,a):Oc(e,r,i,a)}s(nh,"getLookaheadPaths");function eC(t,e,r,n,a,i){const o=Pc(t,e,r),c=$g(o)?sc:Wo;return i(o,n,c,a)}s(eC,"buildLookaheadFuncForOr");function tC(t,e,r,n,a,i){const o=Oc(t,e,a,r),c=$g(o)?sc:Wo;return i(o[0],c,n)}s(tC,"buildLookaheadFuncForOptionalProd");function rC(t,e,r,n){const a=t.length,i=Wt(t,o=>Wt(o,c=>c.length===1));if(e)return function(o){const c=z(o,l=>l.GATE);for(let l=0;l<a;l++){const u=t[l],f=u.length,d=c[l];if(!(d!==void 0&&d.call(this)===!1))e:for(let p=0;p<f;p++){const m=u[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)),c=Et(o,(l,u,f)=>(V(u,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 c[l.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){const c=t[o],l=c.length;e:for(let u=0;u<l;u++){const f=c[u],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&&Ee(i[0].categoryMatches)){const c=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===c}}else{const o=Et(i,(c,l,u)=>(c[l.tokenTypeIdx]=!0,V(l.categoryMatches,f=>{c[f]=!0}),c),[]);return function(){const c=this.LA(1);return o[c.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<a;i++){const o=t[i],c=o.length;for(let l=0;l<c;l++){const u=this.LA(l+1);if(e(u,o[l])===!1)continue e}return!0}return!1}}s(nC,"buildSingleAlternativeLookaheadFunction");var Ri,tx=(Ri=class extends Kf{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(Ri,"RestDefinitionFinderWalker"),Ri),$i,aC=($i=class extends Ko{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($i,"InsideDefinitionFinderVisitor"),$i);function ah(t){const e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}s(ah,"initializeArrayOfArrays");function pu(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 c=0;c<n.categoryMatches.length;c++){const l="_"+n.categoryMatches[c];a.push(o+l)}}e=a}return e}s(pu,"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=>Yu([o],1)),n=ah(r.length),a=z(r,o=>{const c={};return V(o,l=>{const u=pu(l.partialPath);V(u,f=>{c[f]=!0})}),c});let i=r;for(let o=1;o<=e;o++){const c=i;i=ah(c.length);for(let l=0;l<c.length;l++){const u=c[l];for(let f=0;f<u.length;f++){const d=u[f].partialPath,p=u[f].suffixDef,m=pu(d);if(iC(a,m,l)||Ee(p)||d.length===e){const v=n[l];if(Xu(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=Yu(p,o+1,d);i[l]=i[l].concat(v),V(v,E=>{const T=pu(E.partialPath);V(T,w=>{a[l][w]=!0})})}}}}return n}s(Rg,"lookAheadSequenceFromAlternatives");function Pc(t,e,r,n){const a=new aC(t,De.ALTERNATION,n);return e.accept(a),Rg(a.result,r)}s(Pc,"getLookaheadPathsForOr");function Oc(t,e,r,n){const a=new aC(t,r);e.accept(a);const i=a.result,c=new tx(e,t,r).startWalking(),l=new gt({definition:i}),u=new gt({definition:c});return Rg([l,u],n)}s(Oc,"getLookaheadPathsForOptionalProd");function Xu(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(Xu,"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=>Ee(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:ct.CUSTOM_LOOKAHEAD_VALIDATION},r))}s(oC,"validateLookahead");function lC(t,e,r,n){const a=Lt(t,l=>cC(l,r)),i=TC(t,e,r),o=Lt(t,l=>mC(l,r)),c=Lt(t,l=>fC(l,t,n,r));return a.concat(i,o,c)}s(lC,"validateGrammar");function cC(t,e){const r=new rx;t.accept(r);const n=r.allProductions,a=gM(n,uC),i=Yt(a,c=>c.length>1);return z(We(i),c=>{const l=Ht(c),u=e.buildDuplicateFoundError(t,c),f=Ut(l),d={message:u,type:ct.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:f,occurrence:l.idx},p=Ag(l);return p&&(d.parameter=p),d})}s(cC,"validateDuplicateProductions");function uC(t){return`${Ut(t)}_#_${t.idx}_#_${Ag(t)}`}s(uC,"identifyProductionForDuplicates");function Ag(t){return t instanceof we?t.terminalType.name:t instanceof lt?t.nonTerminalName:""}s(Ag,"getExtraProductionArgument");var Ai,rx=(Ai=class extends Ko{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(Ai,"OccurrenceValidationCollector"),Ai);function fC(t,e,r,n){const a=[];if(Et(e,(o,c)=>c.name===t.name?o+1:o,0)>1){const o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:o,type:ct.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:ct.INVALID_RULE_OVERRIDE,ruleName:t})),n}s(dC,"validateRuleIsOverridden");function Eg(t,e,r,n=[]){const a=[],i=Hl(e.definition);if(Ee(i))return[];{const o=t.name;ft(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:ct.LEFT_RECURSION,ruleName:o});const l=zf(i,n.concat([t])),u=Lt(l,f=>{const d=et(n);return d.push(f),Eg(t,f,r,d)});return a.concat(u)}}s(Eg,"validateNoLeftRecursion");function Hl(t){let e=[];if(Ee(t))return e;const r=Ht(t);if(r instanceof lt)e.push(r.referencedRule);else if(r instanceof gt||r instanceof Qe||r instanceof _t||r instanceof Ct||r instanceof yt||r instanceof xe)e=e.concat(Hl(r.definition));else if(r instanceof vt)e=qt(z(r.definition,i=>Hl(i.definition)));else if(!(r instanceof we))throw Error("non exhaustive match");const n=ic(r),a=t.length>1;if(n&&a){const i=Ze(t);return e.concat(Hl(i))}else return e}s(Hl,"getFirstNoneTerminal");var Ei,_g=(Ei=class extends Ko{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},s(Ei,"OrCollector"),Ei);function pC(t,e){const r=new _g;t.accept(r);const n=r.alternations;return Lt(n,i=>{const o=ac(i.definition);return Lt(o,(c,l)=>{const u=Tg([c],[],Wo,1);return Ee(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:l}),type:ct.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=Bf(a,o=>o.ignoreAmbiguities===!0),Lt(a,o=>{const c=o.idx,l=o.maxLookahead||e,u=Pc(c,t,l,o),f=yC(u,o,t,r),d=vC(u,o,t,r);return f.concat(d)})}s(hC,"validateAmbiguousAlternationAlternatives");var _i,nx=(_i=class extends Ko{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(_i,"RepetitionCollector"),_i);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:ct.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 nx;a.accept(i);const o=i.allProductions;V(o,c=>{const l=Vf(c),u=c.maxLookahead||e,f=c.idx,p=Oc(f,a,l,u)[0];if(Ee(qt(p))){const m=r.buildEmptyRepetitionError({topLevelRule:a,repetition:c});n.push({message:m,type:ct.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}s(gC,"validateSomeNonEmptyLookaheadPath");function yC(t,e,r,n){const a=[],i=Et(t,(c,l,u)=>(e.definition[u].ignoreAmbiguities===!0||V(l,f=>{const d=[u];V(t,(p,m)=>{u!==m&&Xu(p,f)&&e.definition[m].ignoreAmbiguities!==!0&&d.push(m)}),d.length>1&&!Xu(a,f)&&(a.push(f),c.push({alts:d,path:f}))}),c),[]);return z(i,c=>{const l=z(c.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:c.path}),type:ct.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:c.alts}})}s(yC,"checkAlternativesAmbiguities");function vC(t,e,r,n){const a=Et(t,(o,c,l)=>{const u=z(c,f=>({idx:l,path:f}));return o.concat(u)},[]);return Ic(Lt(a,o=>{if(e.definition[o.idx].ignoreAmbiguities===!0)return[];const l=o.idx,u=o.path,f=Ft(a,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<l&&sC(p.path,u));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:ct.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 c=r.buildNamespaceConflictError(i);n.push({message:c,type:ct.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}s(TC,"checkTerminalAndNoneTerminalsNameSpace");function RC(t){const e=og(t,{errMsgProvider:YM}),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:kn}),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 oc(t){return ft(SC,t.name)}s(oc,"isRecognitionException");var Ci,Hf=(Ci=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(Ci,"RecognitionException"),Ci),Si,bC=(Si=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=AC}},s(Si,"MismatchedTokenException"),Si),bi,ax=(bi=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=EC}},s(bi,"NoViableAltException"),bi),wi,ix=(wi=class extends Hf{constructor(e,r){super(e,r),this.name=CC}},s(wi,"NotAllInputParsedException"),wi),Ii,sx=(Ii=class extends Hf{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=_C}},s(Ii,"EarlyExitException"),Ii),Cd={},wC="InRuleRecoveryException",Ni,ox=(Ni=class extends Error{constructor(e){super(e),this.name=wC}},s(Ni,"InRuleRecoveryException"),Ni),ki,lx=(ki=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=kc(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(),c=[];let l=!1;const u=this.LA(1);let f=this.LA(1);const d=s(()=>{const p=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:u,previous:p,ruleName:this.getCurrRuleFullName()}),g=new bC(m,u,this.LA(0));g.resyncedTokens=ac(c),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,c));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 ox("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ee(r))return!1;const n=this.LA(1);return xo(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=xo(e,i=>vg(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Cd;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?Cd:{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===Cd)return[Xr];const r=e.ruleName+e.idxInCallingRule+p_+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,Xr)||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 ac(r)}attemptInRepetitionRecovery(e,r,n,a,i,o,c){}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(ki,"Recoverable"),ki);function IC(t,e,r,n,a,i,o){const c=this.getKeyForAutomaticLookahead(n,a);let l=this.firstAfterRepMap[c];if(l===void 0){const p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];l=new i(m,a).startWalking(),this.firstAfterRepMap[c]=l}let u=l.token,f=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&u===void 0&&(u=Xr,f=1),!(u===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,f,o)&&this.tryInRepetitionRecovery(t,e,r,u)}s(IC,"attemptInRepetitionRecovery");var cx=4,rn=8,NC=1<<rn,kC=2<<rn,ih=3<<rn,sh=4<<rn,oh=5<<rn,hu=6<<rn;function mu(t,e,r){return r|e|t}s(mu,"getKeyForAutomaticLookahead");var Pi,Cg=(Pi=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(Ee(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,kn))}validateEmptyOrAlternatives(e){return Lt(e,r=>pC(r,kn))}validateAmbiguousAlternationAlternatives(e,r){return Lt(e,n=>hC(n,r,kn))}validateSomeNonEmptyLookaheadPath(e,r){return gC(e,r,kn)}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,Vf(e.prodType),nC)}},s(Pi,"LLkLookaheadStrategy"),Pi),Oi,ux=(Oi=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:c,repetitionWithSeparator:l}=PC(r);V(n,u=>{const f=u.idx===0?"":u.idx;this.TRACE_INIT(`${Ut(u)}${f}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=mu(this.fullRuleNameToShort[r.name],NC,u.idx);this.setLaFuncCache(p,d)})}),V(a,u=>{this.computeLookaheadFunc(r,u.idx,ih,"Repetition",u.maxLookahead,Ut(u))}),V(i,u=>{this.computeLookaheadFunc(r,u.idx,kC,"Option",u.maxLookahead,Ut(u))}),V(o,u=>{this.computeLookaheadFunc(r,u.idx,sh,"RepetitionMandatory",u.maxLookahead,Ut(u))}),V(c,u=>{this.computeLookaheadFunc(r,u.idx,hu,"RepetitionMandatoryWithSeparator",u.maxLookahead,Ut(u))}),V(l,u=>{this.computeLookaheadFunc(r,u.idx,oh,"RepetitionWithSeparator",u.maxLookahead,Ut(u))})})})}computeLookaheadFunc(e,r,n,a,i,o){this.TRACE_INIT(`${o}${r===0?"":r}`,()=>{const c=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),l=mu(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(l,c)})}getKeyForAutomaticLookahead(e,r){const n=this.getLastExplicitRuleShortName();return mu(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},s(Oi,"LooksAhead"),Oi),Li,fx=(Li=class extends Ko{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(Li,"DslMethodsCollectorVisitor"),Li),jc=new fx;function PC(t){jc.reset(),t.accept(jc);const e=jc.dslMethods;return jc.reset(),e}s(PC,"collectMethods");function lh(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}s(lh,"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 dx="name";function Sg(t,e){Object.defineProperty(t,dx,{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],c=o.length;for(let l=0;l<c;l++){const u=o[l];u.tokenTypeIdx===void 0&&this[u.name](u.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(!Ee(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 uh;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(uh||(uh={}));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:uh.MISSING_METHOD,methodName:a}));return Ic(n)}s(GC,"validateMissingCstMethods");var Di,px=(Di=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=lh,this.setNodeLocationFromNode=lh,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(Di,"TreeBuilder"),Di),Mi,hx=(Mi=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)):Ju}LA(e){const r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Ju: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(Mi,"LexerAdapter"),Mi),xi,mx=(xi=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=Zu){if(ft(this.definedRulesNames,e)){const o={message:kn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ct.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=Zu){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(oc(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return o_(We(this.gastProductionsCache))}},s(xi,"RecognizerApi"),xi),Fi,gx=(Fi=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=sc,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(Ee(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,(c,l)=>(c[l.name]=l,c),{})}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=Xr;const n=q(e,"modes")?qt(We(e.modes)):We(e),a=Wt(n,i=>Ee(i.categoryMatches));this.tokenMatcher=a?sc:Wo,Vo(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:Zu.resyncEnabled,i=q(n,"recoveryValueFunc")?n.recoveryValueFunc:Zu.recoveryValueFunc,o=this.ruleShortNameIdx<<cx+rn;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let c;return this.outputCst===!0?c=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"):c=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(c,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){const a=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(oc(e)){const o=e;if(i){const c=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(c))if(o.resyncedTokens=this.reSyncTo(c),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 c=a;a=s(()=>o.call(this)&&c.call(this),"lookAheadFunc")}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){const n=this.getKeyForAutomaticLookahead(sh,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 c=a;a=s(()=>o.call(this)&&c.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,sh,e,ex)}atLeastOneSepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(hu,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 c=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,c,a,yv],c,hu,e,yv)}else throw this.raiseEarlyExitException(e,De.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){const n=this.getKeyForAutomaticLookahead(ih,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 c=r.GATE;if(c!==void 0){const l=a;a=s(()=>c.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,ih,e,QM,o)}manySepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(oh,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 c=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,c,a,gv],c,oh,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,hu,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 ix(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 oc(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),Xr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},s(Fi,"RecognizerEngine"),Fi),Gi,yx=(Gi=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:Pr.errorMessageProvider}SAVE_ERROR(e){if(oc(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],c=Oc(e,i,r,this.maxLookahead)[0],l=[];for(let f=1;f<=this.maxLookahead;f++)l.push(this.LA(f));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:c,actual:l,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new sx(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=Pc(e,a,this.maxLookahead),o=[];for(let u=1;u<=this.maxLookahead;u++)o.push(this.LA(u));const c=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:o,previous:c,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ax(l,this.LA(1),c))}},s(Gi,"ErrorHandler"),Gi),ji,vx=(ji=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 ZM(a,e).startWalking()}},s(ji,"ContentAssist"),ji),Yf={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Yf);var vv=!0,Tv=Math.pow(2,rn)-1,jC=Ua({name:"RECORDING_PHASE_TOKEN",pattern:st.NA});Vo([jC]);var UC=kc(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:{}},Ui,Rx=(Ui=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 Ju}topLevelRuleRecord(e,r){try{const n=new Bo({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 Ca.call(this,Qe,e,r)}atLeastOneInternalRecord(e,r){Ca.call(this,_t,r,e)}atLeastOneSepFirstInternalRecord(e,r){Ca.call(this,Ct,r,e,vv)}manyInternalRecord(e,r){Ca.call(this,xe,r,e)}manySepFirstInternalRecord(e,r){Ca.call(this,yt,r,e,vv)}orInternalRecord(e,r){return zC.call(this,e,r)}subruleInternalRecord(e,r,n){if(lc(r),!e||q(e,"ruleName")===!1){const c=new Error(`<SUBRULE${fh(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
137
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw c.KNOWN_RECORDER_ERROR=!0,c}const a=Gn(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:Yf}consumeInternalRecord(e,r,n){if(lc(r),!gg(e)){const o=new Error(`<CONSUME${fh(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=Gn(this.recordingProdStack),i=new we({idx:r,terminalType:e,label:n==null?void 0:n.LABEL});return a.definition.push(i),UC}},s(Ui,"GastRecorder"),Ui);function Ca(t,e,r,n=!1){lc(r);const a=Gn(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(),Yf}s(Ca,"recordProd");function zC(t,e){lc(e);const r=Gn(this.recordingProdStack),n=ae(t)===!1,a=n===!1?t:t.DEF,i=new vt({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);const o=r_(a,c=>Mr(c.GATE));return i.hasPredicates=o,r.definition.push(i),V(a,c=>{const l=new gt({definition:[]});i.definition.push(l),q(c,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=c.IGNORE_AMBIGUITIES:q(c,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),c.ALT.call(this),this.recordingProdStack.pop()}),Yf}s(zC,"recordOrProd");function fh(t){return t===0?"":`${t}`}s(fh,"getIdxSuffix");function lc(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(lc,"assertMethodIdxIsValid");var zi,$x=(zi=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}=ug(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(zi,"PerformanceTracer"),zi);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 Ju=kc(Xr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ju);var Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Fa,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Zu=Object.freeze({recoveryValueFunc:s(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),ct;(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"})(ct||(ct={}));function dh(t=void 0){return function(){return t}}s(dh,"EMPTY_ALT");var Mn,bg=(Mn=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 c;this.TRACE_INIT(`${a} Rule`,()=>{c=this.topLevelRuleRecord(a,o)}),this.gastProductionsCache[a]=c})}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(Ee(n)&&this.skipValidations===!1){const a=$C({rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),errMsgProvider:kn,grammarName:r}),i=oC({lookaheadStrategy:this.lookaheadStrategy,rules:We(this.gastProductionsCache),tokenTypes:We(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),Ee(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))})),!Mn.DEFER_DEFINITION_ERRORS_HANDLING&&!Ee(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(Mn,"Parser"),Mn);bg.DEFER_DEFINITION_ERRORS_HANDLING=!1;BC(bg,[lx,ux,px,hx,gx,mx,yx,vx,Rx,$x]);var Bi,Ax=(Bi=class extends bg{constructor(e,r=Pr){const n=et(r);n.outputCst=!1,super(e,n)}},s(Bi,"EmbeddedActionsParser"),Bi);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 Ex=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 Xf=YC,_x=Array.prototype,Cx=_x.splice;function XC(t){var e=this.__data__,r=Xf(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Cx.call(e,r,1),--this.size,!0}s(XC,"listCacheDelete");var Sx=XC;function JC(t){var e=this.__data__,r=Xf(e,t);return r<0?void 0:e[r][1]}s(JC,"listCacheGet");var bx=JC;function ZC(t){return Xf(this.__data__,t)>-1}s(ZC,"listCacheHas");var wx=ZC;function QC(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(QC,"listCacheSet");var Ix=QC;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,"ListCache");ra.prototype.clear=Ex;ra.prototype.delete=Sx;ra.prototype.get=bx;ra.prototype.has=wx;ra.prototype.set=Ix;var Jf=ra;function eS(){this.__data__=new Jf,this.size=0}s(eS,"stackClear");var Nx=eS;function tS(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}s(tS,"stackDelete");var kx=tS;function rS(t){return this.__data__.get(t)}s(rS,"stackGet");var Px=rS;function nS(t){return this.__data__.has(t)}s(nS,"stackHas");var Ox=nS,Lx=typeof global=="object"&&global&&global.Object===Object&&global,aS=Lx,Dx=typeof self=="object"&&self&&self.Object===Object&&self,Mx=aS||Dx||Function("return this")(),xr=Mx,xx=xr.Symbol,ur=xx,iS=Object.prototype,Fx=iS.hasOwnProperty,Gx=iS.toString,gl=ur?ur.toStringTag:void 0;function sS(t){var e=Fx.call(t,gl),r=t[gl];try{t[gl]=void 0;var n=!0}catch{}var a=Gx.call(t);return n&&(e?t[gl]=r:delete t[gl]),a}s(sS,"getRawTag");var jx=sS,Ux=Object.prototype,zx=Ux.toString;function oS(t){return zx.call(t)}s(oS,"objectToString");var Bx=oS,Kx="[object Null]",qx="[object Undefined]",Rv=ur?ur.toStringTag:void 0;function lS(t){return t==null?t===void 0?qx:Kx:Rv&&Rv in Object(t)?jx(t):Bx(t)}s(lS,"baseGetTag");var Ho=lS;function cS(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}s(cS,"isObject");var wg=cS,Wx="[object AsyncFunction]",Vx="[object Function]",Hx="[object GeneratorFunction]",Yx="[object Proxy]";function uS(t){if(!wg(t))return!1;var e=Ho(t);return e==Vx||e==Hx||e==Wx||e==Yx}s(uS,"isFunction");var fS=uS,Xx=xr["__core-js_shared__"],Sd=Xx,$v=(function(){var t=/[^.]+$/.exec(Sd&&Sd.keys&&Sd.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function dS(t){return!!$v&&$v in t}s(dS,"isMasked");var Jx=dS,Zx=Function.prototype,Qx=Zx.toString;function pS(t){if(t!=null){try{return Qx.call(t)}catch{}try{return t+""}catch{}}return""}s(pS,"toSource");var na=pS,e1=/[\\^$.*+?()[\]{}|]/g,t1=/^\[object .+?Constructor\]$/,r1=Function.prototype,n1=Object.prototype,a1=r1.toString,i1=n1.hasOwnProperty,s1=RegExp("^"+a1.call(i1).replace(e1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hS(t){if(!wg(t)||Jx(t))return!1;var e=fS(t)?s1:t1;return e.test(na(t))}s(hS,"baseIsNative");var o1=hS;function mS(t,e){return t==null?void 0:t[e]}s(mS,"getValue");var l1=mS;function gS(t,e){var r=l1(t,e);return o1(r)?r:void 0}s(gS,"getNative");var Yo=gS,c1=Yo(xr,"Map"),cc=c1,u1=Yo(Object,"create"),uc=u1;function yS(){this.__data__=uc?uc(null):{},this.size=0}s(yS,"hashClear");var f1=yS;function vS(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}s(vS,"hashDelete");var d1=vS,p1="__lodash_hash_undefined__",h1=Object.prototype,m1=h1.hasOwnProperty;function TS(t){var e=this.__data__;if(uc){var r=e[t];return r===p1?void 0:r}return m1.call(e,t)?e[t]:void 0}s(TS,"hashGet");var g1=TS,y1=Object.prototype,v1=y1.hasOwnProperty;function RS(t){var e=this.__data__;return uc?e[t]!==void 0:v1.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]=uc&&e===void 0?R1:e,this}s($S,"hashSet");var $1=$S;function aa(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(aa,"Hash");aa.prototype.clear=f1;aa.prototype.delete=d1;aa.prototype.get=g1;aa.prototype.has=T1;aa.prototype.set=$1;var Av=aa;function AS(){this.size=0,this.__data__={hash:new Av,map:new(cc||Jf),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 E1=ES;function _S(t,e){var r=t.__data__;return E1(e)?r[typeof e=="string"?"string":"hash"]:r.map}s(_S,"getMapData");var Zf=_S;function CS(t){var e=Zf(this,t).delete(t);return this.size-=e?1:0,e}s(CS,"mapCacheDelete");var _1=CS;function SS(t){return Zf(this,t).get(t)}s(SS,"mapCacheGet");var C1=SS;function bS(t){return Zf(this,t).has(t)}s(bS,"mapCacheHas");var S1=bS;function wS(t,e){var r=Zf(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}s(wS,"mapCacheSet");var b1=wS;function ia(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(ia,"MapCache");ia.prototype.clear=A1;ia.prototype.delete=_1;ia.prototype.get=C1;ia.prototype.has=S1;ia.prototype.set=b1;var Qf=ia,w1=200;function IS(t,e){var r=this.__data__;if(r instanceof Jf){var n=r.__data__;if(!cc||n.length<w1-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Qf(n)}return r.set(t,e),this.size=r.size,this}s(IS,"stackSet");var I1=IS;function sa(t){var e=this.__data__=new Jf(t);this.size=e.size}s(sa,"Stack");sa.prototype.clear=Nx;sa.prototype.delete=kx;sa.prototype.get=Px;sa.prototype.has=Ox;sa.prototype.set=I1;var gu=sa,N1="__lodash_hash_undefined__";function NS(t){return this.__data__.set(t,N1),this}s(NS,"setCacheAdd");var k1=NS;function kS(t){return this.__data__.has(t)}s(kS,"setCacheHas");var P1=kS;function fc(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new Qf;++e<r;)this.add(t[e])}s(fc,"SetCache");fc.prototype.add=fc.prototype.push=k1;fc.prototype.has=P1;var PS=fc;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 O1=OS;function LS(t,e){return t.has(e)}s(LS,"cacheHas");var DS=LS,L1=1,D1=2;function MS(t,e,r,n,a,i){var o=r&L1,c=t.length,l=e.length;if(c!=l&&!(o&&l>c))return!1;var u=i.get(t),f=i.get(e);if(u&&f)return u==e&&f==t;var d=-1,p=!0,m=r&D1?new PS:void 0;for(i.set(t,e),i.set(e,t);++d<c;){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(!O1(e,function(T,w){if(!DS(m,w)&&(g===T||a(g,T,r,n,i)))return m.push(w)})){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,M1=xr.Uint8Array,Ev=M1;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 x1=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,F1=1,G1=2,j1="[object Boolean]",U1="[object Date]",z1="[object Error]",B1="[object Map]",K1="[object Number]",q1="[object RegExp]",W1="[object Set]",V1="[object String]",H1="[object Symbol]",Y1="[object ArrayBuffer]",X1="[object DataView]",_v=ur?ur.prototype:void 0,bd=_v?_v.valueOf:void 0;function jS(t,e,r,n,a,i,o){switch(r){case X1:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Y1:return!(t.byteLength!=e.byteLength||!i(new Ev(t),new Ev(e)));case j1:case U1:case K1:return HC(+t,+e);case z1:return t.name==e.name&&t.message==e.message;case q1:case V1:return t==e+"";case B1:var c=x1;case W1:var l=n&F1;if(c||(c=Ig),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;n|=G1,o.set(t,e);var f=xS(c(t),c(e),n,a,i,o);return o.delete(t),f;case H1:if(bd)return bd.call(t)==bd.call(e)}return!1}s(jS,"equalByTag");var J1=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,Z1=Array.isArray,ut=Z1;function BS(t,e,r){var n=e(t);return ut(t)?n:zS(n,r(t))}s(BS,"baseGetAllKeys");var Q1=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 eF=WS,tF=Object.prototype,rF=tF.propertyIsEnumerable,Cv=Object.getOwnPropertySymbols,nF=Cv?function(t){return t==null?[]:(t=Object(t),qS(Cv(t),function(e){return rF.call(t,e)}))}:eF,aF=nF;function VS(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}s(VS,"baseTimes");var iF=VS;function HS(t){return t!=null&&typeof t=="object"}s(HS,"isObjectLike");var Fo=HS,sF="[object Arguments]";function YS(t){return Fo(t)&&Ho(t)==sF}s(YS,"baseIsArguments");var Sv=YS,XS=Object.prototype,oF=XS.hasOwnProperty,lF=XS.propertyIsEnumerable,cF=Sv((function(){return arguments})())?Sv:function(t){return Fo(t)&&oF.call(t,"callee")&&!lF.call(t,"callee")},ed=cF;function JS(){return!1}s(JS,"stubFalse");var uF=JS,ZS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bv=ZS&&typeof module=="object"&&module&&!module.nodeType&&module,fF=bv&&bv.exports===ZS,wv=fF?xr.Buffer:void 0,dF=wv?wv.isBuffer:void 0,pF=dF||uF,Qu=pF,hF=9007199254740991,mF=/^(?:0|[1-9]\d*)$/;function QS(t,e){var r=typeof t;return e=e??hF,!!e&&(r=="number"||r!="symbol"&&mF.test(t))&&t>-1&&t%1==0&&t<e}s(QS,"isIndex");var eb=QS,gF=9007199254740991;function tb(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=gF}s(tb,"isLength");var Ng=tb,yF="[object Arguments]",vF="[object Array]",TF="[object Boolean]",RF="[object Date]",$F="[object Error]",AF="[object Function]",EF="[object Map]",_F="[object Number]",CF="[object Object]",SF="[object RegExp]",bF="[object Set]",wF="[object String]",IF="[object WeakMap]",NF="[object ArrayBuffer]",kF="[object DataView]",PF="[object Float32Array]",OF="[object Float64Array]",LF="[object Int8Array]",DF="[object Int16Array]",MF="[object Int32Array]",xF="[object Uint8Array]",FF="[object Uint8ClampedArray]",GF="[object Uint16Array]",jF="[object Uint32Array]",be={};be[PF]=be[OF]=be[LF]=be[DF]=be[MF]=be[xF]=be[FF]=be[GF]=be[jF]=!0;be[yF]=be[vF]=be[NF]=be[TF]=be[kF]=be[RF]=be[$F]=be[AF]=be[EF]=be[_F]=be[CF]=be[SF]=be[bF]=be[wF]=be[IF]=!1;function rb(t){return Fo(t)&&Ng(t.length)&&!!be[Ho(t)]}s(rb,"baseIsTypedArray");var UF=rb;function nb(t){return function(e){return t(e)}}s(nb,"baseUnary");var zF=nb,ab=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yl=ab&&typeof module=="object"&&module&&!module.nodeType&&module,BF=Yl&&Yl.exports===ab,wd=BF&&aS.process,KF=(function(){try{var t=Yl&&Yl.require&&Yl.require("util").types;return t||wd&&wd.binding&&wd.binding("util")}catch{}})(),Iv=KF,Nv=Iv&&Iv.isTypedArray,qF=Nv?zF(Nv):UF,kg=qF,WF=Object.prototype,VF=WF.hasOwnProperty;function ib(t,e){var r=ut(t),n=!r&&ed(t),a=!r&&!n&&Qu(t),i=!r&&!n&&!a&&kg(t),o=r||n||a||i,c=o?iF(t.length,String):[],l=c.length;for(var u in t)(e||VF.call(t,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||eb(u,l)))&&c.push(u);return c}s(ib,"arrayLikeKeys");var HF=ib,YF=Object.prototype;function sb(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||YF;return t===r}s(sb,"isPrototype");var ob=sb;function lb(t,e){return function(r){return t(e(r))}}s(lb,"overArg");var XF=lb,JF=XF(Object.keys,Object),ZF=JF,QF=Object.prototype,eG=QF.hasOwnProperty;function cb(t){if(!ob(t))return ZF(t);var e=[];for(var r in Object(t))eG.call(t,r)&&r!="constructor"&&e.push(r);return e}s(cb,"baseKeys");var ub=cb;function fb(t){return t!=null&&Ng(t.length)&&!fS(t)}s(fb,"isArrayLike");var td=fb;function db(t){return td(t)?HF(t):ub(t)}s(db,"keys");var Pg=db;function pb(t){return Q1(t,Pg,aF)}s(pb,"getAllKeys");var kv=pb,tG=1,rG=Object.prototype,nG=rG.hasOwnProperty;function hb(t,e,r,n,a,i){var o=r&tG,c=kv(t),l=c.length,u=kv(e),f=u.length;if(l!=f&&!o)return!1;for(var d=l;d--;){var p=c[d];if(!(o?p in e:nG.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=c[d];var T=t[p],w=e[p];if(n)var C=o?n(w,T,p,e,t,i):n(T,w,p,t,e,i);if(!(C===void 0?T===w||a(T,w,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 aG=hb,iG=Yo(xr,"DataView"),ph=iG,sG=Yo(xr,"Promise"),hh=sG,oG=Yo(xr,"Set"),za=oG,lG=Yo(xr,"WeakMap"),mh=lG,Pv="[object Map]",cG="[object Object]",Ov="[object Promise]",Lv="[object Set]",Dv="[object WeakMap]",Mv="[object DataView]",uG=na(ph),fG=na(cc),dG=na(hh),pG=na(za),hG=na(mh),hn=Ho;(ph&&hn(new ph(new ArrayBuffer(1)))!=Mv||cc&&hn(new cc)!=Pv||hh&&hn(hh.resolve())!=Ov||za&&hn(new za)!=Lv||mh&&hn(new mh)!=Dv)&&(hn=s(function(t){var e=Ho(t),r=e==cG?t.constructor:void 0,n=r?na(r):"";if(n)switch(n){case uG:return Mv;case fG:return Pv;case dG:return Ov;case pG:return Lv;case hG:return Dv}return e},"getTag"));var gh=hn,mG=1,xv="[object Arguments]",Fv="[object Array]",Uc="[object Object]",gG=Object.prototype,Gv=gG.hasOwnProperty;function mb(t,e,r,n,a,i){var o=ut(t),c=ut(e),l=o?Fv:gh(t),u=c?Fv:gh(e);l=l==xv?Uc:l,u=u==xv?Uc:u;var f=l==Uc,d=u==Uc,p=l==u;if(p&&Qu(t)){if(!Qu(e))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new gu),o||kg(t)?xS(t,e,r,n,a,i):J1(t,e,l,r,n,a,i);if(!(r&mG)){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 gu),a(v,E,r,n,i)}}return p?(i||(i=new gu),aG(t,e,r,n,a,i)):!1}s(mb,"baseIsEqualDeep");var yG=mb;function Og(t,e,r,n,a){return t===e?!0:t==null||e==null||!Fo(t)&&!Fo(e)?t!==t&&e!==e:yG(t,e,r,n,Og,a)}s(Og,"baseIsEqual");var gb=Og,vG=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 c=r[a];if(o&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<i;){c=r[a];var l=c[0],u=t[l],f=c[1];if(o&&c[2]){if(u===void 0&&!(l in t))return!1}else{var d=new gu;if(n)var p=n(u,f,l,t,e,d);if(!(p===void 0?gb(f,u,vG|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 $G=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=$G(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,EG="[object Symbol]";function _b(t){return typeof t=="symbol"||Fo(t)&&Ho(t)==EG}s(_b,"isSymbol");var rd=_b,_G=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CG=/^\w*$/;function Cb(t,e){if(ut(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||rd(t)?!0:CG.test(t)||!_G.test(t)||e!=null&&t in Object(e)}s(Cb,"isKey");var Lg=Cb,SG="Expected a function";function nd(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(SG);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(nd.Cache||Qf),r}s(nd,"memoize");nd.Cache=Qf;var bG=nd,wG=500;function Sb(t){var e=bG(t,function(n){return r.size===wG&&r.clear(),n}),r=e.cache;return e}s(Sb,"memoizeCapped");var IG=Sb,NG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kG=/\\(\\)?/g,PG=IG(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NG,function(r,n,a,i){e.push(a?i.replace(kG,"$1"):n||r)}),e}),OG=PG,jv=ur?ur.prototype:void 0,Uv=jv?jv.toString:void 0;function Dg(t){if(typeof t=="string")return t;if(ut(t))return qC(t,Dg)+"";if(rd(t))return Uv?Uv.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(Dg,"baseToString");var LG=Dg;function bb(t){return t==null?"":LG(t)}s(bb,"toString");var DG=bb;function wb(t,e){return ut(t)?t:Lg(t,e)?[t]:OG(DG(t))}s(wb,"castPath");var Ib=wb;function Nb(t){if(typeof t=="string"||rd(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}s(Nb,"toKey");var ad=Nb;function kb(t,e){e=Ib(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ad(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 MG=Ob;function Lb(t,e){return t!=null&&e in Object(t)}s(Lb,"baseHasIn");var xG=Lb;function Db(t,e,r){e=Ib(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var o=ad(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)&&(ut(t)||ed(t)))}s(Db,"hasPath");var FG=Db;function Mb(t,e){return t!=null&&FG(t,e,xG)}s(Mb,"hasIn");var GG=Mb,jG=1,UG=2;function xb(t,e){return Lg(t)&&Tb(e)?Ab(ad(t),e):function(r){var n=MG(r,t);return n===void 0&&n===e?GG(r,t):gb(e,n,jG|UG)}}s(xb,"baseMatchesProperty");var zG=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 KG=jb;function Ub(t){return Lg(t)?BG(ad(t)):KG(t)}s(Ub,"property");var qG=Ub;function zb(t){return typeof t=="function"?t:t==null?Mg:typeof t=="object"?ut(t)?zG(t[0],t[1]):AG(t):qG(t)}s(zb,"baseIteratee");var id=zb;function Bb(t){return function(e,r,n){for(var a=-1,i=Object(e),o=n(e),c=o.length;c--;){var l=o[t?c:++a];if(r(i[l],l,i)===!1)break}return e}}s(Bb,"createBaseFor");var WG=Bb,VG=WG(),HG=VG;function Kb(t,e){return t&&HG(t,e,Pg)}s(Kb,"baseForOwn");var YG=Kb;function qb(t,e){return function(r,n){if(r==null)return r;if(!td(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 XG=qb,JG=XG(YG),sd=JG;function Wb(t,e){var r=-1,n=td(t)?Array(t.length):[];return sd(t,function(a,i,o){n[++r]=e(a,i,o)}),n}s(Wb,"baseMap");var ZG=Wb;function Vb(t,e){var r=ut(t)?qC:ZG;return r(t,id(e))}s(Vb,"map");var _r=Vb;function Hb(t,e){var r=[];return sd(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}s(Hb,"baseFilter");var QG=Hb;function Yb(t,e){var r=ut(t)?qS:QG;return r(t,id(e))}s(Yb,"filter");var ej=Yb;function Un(t,e,r){return`${t.name}_${e}_${r}`}s(Un,"buildATNKey");var Jr=1,tj=2,Xb=4,Jb=5,Lc=7,rj=8,nj=9,aj=10,ij=11,Zb=12,Ki,xg=(Ki=class{constructor(e){this.target=e}isEpsilon(){return!1}},s(Ki,"AbstractTransition"),Ki),qi,Fg=(qi=class extends xg{constructor(e,r){super(e),this.tokenType=r}},s(qi,"AtomTransition"),qi),Wi,Qb=(Wi=class extends xg{constructor(e){super(e)}isEpsilon(){return!0}},s(Wi,"EpsilonTransition"),Wi),Vi,Gg=(Vi=class extends xg{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}},s(Vi,"RuleTransition"),Vi);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=nn(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:tj}),o=Ve(t,a,void 0,{type:Lc});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?od(t,e,r.terminalType,r):r instanceof lt?fw(t,e,r):r instanceof vt?sw(t,e,r):r instanceof Qe?ow(t,e,r):r instanceof xe?rw(t,e,r):r instanceof yt?nw(t,e,r):r instanceof _t?aw(t,e,r):r instanceof Ct?iw(t,e,r):nn(t,e,r)}s(jg,"atom");function rw(t,e,r){const n=Ve(t,e,r,{type:Jb});Fr(t,n);const a=oa(t,e,n,r,nn(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=oa(t,e,n,r,nn(t,e,r)),i=od(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=oa(t,e,n,r,nn(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=oa(t,e,n,r,nn(t,e,r)),i=od(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:Jr});Fr(t,n);const a=_r(r.definition,o=>jg(t,e,o));return oa(t,e,n,r,...a)}s(sw,"alternation");function ow(t,e,r){const n=Ve(t,e,r,{type:Jr});Fr(t,n);const a=oa(t,e,n,r,nn(t,e,r));return lw(t,e,r,a)}s(ow,"option");function nn(t,e,r){const n=ej(_r(r.definition,a=>jg(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:uw(t,n)}s(nn,"block");function Ug(t,e,r,n,a){const i=n.left,o=n.right,c=Ve(t,e,r,{type:ij});Fr(t,c);const l=Ve(t,e,r,{type:Zb});return i.loopback=c,l.loopback=c,t.decisionMap[Un(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=c,je(o,c),a===void 0?(je(c,i),je(c,l)):(je(c,l),je(c,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,c=Ve(t,e,r,{type:aj});Fr(t,c);const l=Ve(t,e,r,{type:Zb}),u=Ve(t,e,r,{type:nj});return c.loopback=u,l.loopback=u,je(c,i),je(c,l),je(o,u),a!==void 0?(je(u,l),je(u,a.left),je(a.right,i)):je(u,c),t.decisionMap[Un(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=c,{left:c,right:l}}s(zg,"star");function lw(t,e,r,n){const a=n.left,i=n.right;return je(a,i),t.decisionMap[Un(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 oa(t,e,r,n,...a){const i=Ve(t,e,n,{type:rj,start:r});r.end=i;for(const c of a)c!==void 0?(je(r,c.left),je(c.right,i)):je(r,i);const o={left:r,right:i};return t.decisionMap[Un(e,cw(n),n.idx)]=r,o}s(oa,"makeAlts");function cw(t){if(t instanceof vt)return"Alternation";if(t instanceof Qe)return"Option";if(t instanceof xe)return"Repetition";if(t instanceof yt)return"RepetitionWithSeparator";if(t instanceof _t)return"RepetitionMandatory";if(t instanceof Ct)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}s(cw,"getProdType");function uw(t,e){const r=e.length;for(let i=0;i<r-1;i++){const o=e[i];let c;o.left.transitions.length===1&&(c=o.left.transitions[0]);const l=c instanceof Gg,u=c,f=e[i+1].left;o.left.type===Jr&&o.right.type===Jr&&c!==void 0&&(l&&u.followState===o.right||c.target===o.right)?(l?u.followState=f:c.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(uw,"makeBlock");function od(t,e,r,n){const a=Ve(t,e,n,{type:Jr}),i=Ve(t,e,n,{type:Jr});return ld(a,new Fg(i,r)),{left:a,right:i}}s(od,"tokenRef");function fw(t,e,r){const n=r.referencedRule,a=t.ruleToStartState.get(n),i=Ve(t,e,r,{type:Jr}),o=Ve(t,e,r,{type:Jr}),c=new Gg(a,n,o);return ld(i,c),{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);ld(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 ld(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}s(ld,"addTransition");function pw(t,e){t.states.splice(t.states.indexOf(e),1)}s(pw,"removeState");var ef={},Hi,yh=(Hi=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(Hi,"ATNConfigSet"),Hi);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&&(c===void 0?o===o&&!rd(o):r(o,c)))var c=o,l=i}return l}s(hw,"baseExtremum");var sj=hw;function mw(t,e){return t<e}s(mw,"baseLt");var oj=mw;function gw(t){return t&&t.length?sj(t,Mg,oj):void 0}s(gw,"min");var lj=gw,zv=ur?ur.isConcatSpreadable:void 0;function yw(t){return ut(t)||ed(t)||!!(zv&&t&&t[zv])}s(yw,"isFlattenable");var cj=yw;function Kg(t,e,r,n,a){var i=-1,o=t.length;for(r||(r=cj),a||(a=[]);++i<o;){var c=t[i];e>0&&r(c)?e>1?Kg(c,e-1,r,n,a):zS(a,c):n||(a[a.length]=c)}return a}s(Kg,"baseFlatten");var vw=Kg;function Tw(t,e){return vw(_r(t,e),1)}s(Tw,"flatMap");var uj=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 fj=Rw;function $w(t){return t!==t}s($w,"baseIsNaN");var dj=$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 pj=Aw;function Ew(t,e,r){return e===e?pj(t,e,r):fj(t,dj,r)}s(Ew,"baseIndexOf");var hj=Ew;function _w(t,e){var r=t==null?0:t.length;return!!r&&hj(t,e,0)>-1}s(_w,"arrayIncludes");var mj=_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 gj=Cw;function Sw(){}s(Sw,"noop");var yj=Sw,vj=1/0,Tj=za&&1/Ig(new za([,-0]))[1]==vj?function(t){return new za(t)}:yj,Rj=Tj,$j=200;function bw(t,e,r){var n=-1,a=mj,i=t.length,o=!0,c=[],l=c;if(r)o=!1,a=gj;else if(i>=$j){var u=e?null:Rj(t);if(u)return Ig(u);o=!1,a=DS,l=new PS}else l=e?[]:c;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),c.push(f)}else a(l,d,r)||(l!==c&&l.push(d),c.push(f))}return c}s(bw,"baseUniq");var Aj=bw;function ww(t,e){return t&&t.length?Aj(t,id(e)):[]}s(ww,"uniqBy");var Ej=ww;function Iw(t){var e=t==null?0:t.length;return e?vw(t,1):[]}s(Iw,"flatten");var _j=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 Cj=Nw;function kw(t){return typeof t=="function"?t:Mg}s(kw,"castFunction");var Sj=kw;function Pw(t,e){var r=ut(t)?Cj:sd;return r(t,Sj(e))}s(Pw,"forEach");var Id=Pw,bj="[object Map]",wj="[object Set]",Ij=Object.prototype,Nj=Ij.hasOwnProperty;function Ow(t){if(t==null)return!0;if(td(t)&&(ut(t)||typeof t=="string"||typeof t.splice=="function"||Qu(t)||kg(t)||ed(t)))return!t.length;var e=gh(t);if(e==bj||e==wj)return!t.size;if(ob(t))return!ub(t).length;for(var r in t)if(Nj.call(t,r))return!1;return!0}s(Ow,"isEmpty");var kj=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 Pj=Lw;function Dw(t,e,r,n,a){return a(t,function(i,o,c){r=n?(n=!1,i):e(r,i,o,c)}),r}s(Dw,"baseReduce");var Oj=Dw;function Mw(t,e,r){var n=ut(t)?Pj:Oj,a=arguments.length<3;return n(t,id(e),r,a,sd)}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 Yi,Fw=(Yi=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(Yi,"PredicateSet"),Yi),Kv=new Fw,Xi,Lj=(Xi=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,c=this.logging,l=Un(n,"Alternation",r),f=this.atn.decisionMap[l].decision,d=_r(nh({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>_r(p,m=>m[0]));if(vh(d,!1)&&!i){const p=Bv(d,(m,g,v)=>(Id(g,E=>{E&&(m[E.tokenTypeIdx]=v,Id(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=yu.call(this,o,f,m,c);return typeof v=="number"?v:void 0}:function(){const p=yu.call(this,o,f,Kv,c);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:r,rule:n,prodType:a,dynamicTokensEnabled:i}=e,o=this.dfas,c=this.logging,l=Un(n,a,r),f=this.atn.decisionMap[l].decision,d=_r(nh({maxLookahead:1,occurrence:r,prodType:a,rule:n}),p=>_r(p,m=>m[0]));if(vh(d)&&d[0][0]&&!i){const p=d[0],m=_j(p);if(m.length===1&&kj(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,Id(E.categoryMatches,T=>{v[T]=!0})),v),{});return function(){const v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){const p=yu.call(this,o,f,Kv,c);return typeof p=="object"?!1:p===0}}},s(Xi,"LLStarLookaheadStrategy"),Xi);function vh(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 c of o)if(r.has(c)){if(!a.has(c))return!1}else r.add(c),a.add(c)}}return!0}s(vh,"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 yu(t,e,r,n){const a=t[e](r);let i=a.start;if(i===void 0){const c=Xw(a.atnStartState);i=Wg(a,qg(c)),a.start=i}return jw.apply(this,[a,i,r,n])}s(yu,"adaptivePredict");function jw(t,e,r,n){let a=e,i=1;const o=[];let c=this.LA(i++);for(;;){let l=Ww(a,c);if(l===void 0&&(l=Uw.apply(this,[t,a,c,i,r,n])),l===ef)return qw(o,a,c);if(l.isAcceptState===!0)return l.prediction;a=l,o.push(c),c=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 Th(t,e,r,ef),ef;let c=qg(o);const l=Yw(o,a);if(l!==void 0)c.isAcceptState=!0,c.prediction=l,c.configs.uniqueAlt=l;else if(eI(o)){const u=lj(o.alts);c.isAcceptState=!0,c.prediction=u,c.configs.uniqueAlt=u,zw.apply(this,[t,n,o.alts,i])}return c=Th(t,e,r,c),c}s(Uw,"computeLookaheadTarget");function zw(t,e,r,n){const a=[];for(let u=1;u<=e;u++)a.push(this.LA(u).tokenType);const i=t.atnStartState,o=i.rule,c=i.production,l=Bw({topLevelRule:o,ambiguityIndices:r,production:c,prefixPath:a});n(l)}s(zw,"reportLookaheadAmbiguity");function Bw(t){const e=_r(t.prefixPath,a=>Ln(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 vt)return"OR";if(t instanceof _t)return"AT_LEAST_ONE";if(t instanceof Ct)return"AT_LEAST_ONE_SEP";if(t instanceof yt)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=uj(e.configs.elements,i=>i.state.transitions),a=Ej(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 yh,a=[];for(const o of t.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Lc){a.push(o);continue}const c=o.state.transitions.length;for(let l=0;l<c;l++){const u=o.state.transitions[l],f=Hw(u,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 yh;for(const o of n.elements)dc(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 Th(t,e,r,n){return n=Wg(t,n),e.edges[r.tokenTypeIdx]=n,n}s(Th,"addDFAEdge");function Wg(t,e){if(e===ef)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 yh,r=t.transitions.length;for(let n=0;n<r;n++){const i={state:t.transitions[n].target,alt:n,stack:[]};dc(i,e)}return e}s(Xw,"computeStartState");function dc(t,e){const r=t.state;if(r.type===Lc){if(t.stack.length>0){const a=[...t.stack],o={state:a.pop(),alt:t.alt,stack:a};dc(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&&dc(o,e)}}s(dc,"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===Lc)return!0;return!1}s(Zw,"hasConfigInRuleStopState");function Qw(t){for(const e of t.elements)if(e.state.type!==Lc)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");mc();var Ji,aI=(Ji=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 tf(e.startOffset,e.image.length,Ql(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 tf(i.startOffset,i.image.length,Ql(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(Ji,"CstNodeBuilder"),Ji),Zi,Vg=(Zi=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(Zi,"AbstractCstNode"),Zi),Qi,tf=(Qi=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(Qi,"LeafCstNodeImpl"),Qi),es,cd=(es=class extends Vg{constructor(){super(...arguments),this.content=new Dj(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(es,"CompositeCstNodeImpl"),es),xn,Dj=(xn=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,xn.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(xn,"CstNodeContainer"),xn),ts,Hg=(ts=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(ts,"RootCstNodeImpl"),ts),rf=Symbol("Datatype");function vu(t){return t.$type===rf}s(vu,"isDataTypeNode");var qv="​",iI=s(t=>t.endsWith(qv)?t:t+qv,"withRuleSuffix"),rs,Yg=(rs=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 xj(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new cI(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(rs,"AbstractLangiumParser"),rs),ns,sI=(ns=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;Po(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 Po(e)?Fn(e):e.fragment?void 0:Tc(e)?rf:Fn(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,No(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===rf?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:c,crossRef:l}=this.getAssignment(n),u=this.current;if(c){const f=br(n)?a.image:this.converter.convert(a.image,o);this.assign(c.operator,c.feature,f,o,l)}else if(vu(u)){let f=a.image;br(n)||(f=this.converter.convert(f,o).toString()),u.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 c;try{c=this.wrapper.wrapSubrule(e,r,i)}finally{this.isRecording()||(c===void 0&&!n&&(c=this.construct()),c!==void 0&&o&&o.length>0&&this.performSubruleAssignment(c,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(vu(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)):vu(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 c=a.slice(0,i),l=a.slice(i+1),u=n.slice(0,i+1),f=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:c},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=Kn(e,Sr);this.assignmentMap.set(e,{assignment:r,crossRef:r&&Wn(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 c;switch(i==="single"&&typeof n=="string"?c=this.linker.buildReference(o,r,a,n):i==="multi"&&typeof n=="string"?c=this.linker.buildMultiReference(o,r,a,n):c=n,e){case"=":{o[r]=c;break}case"?=":{o[r]=!0;break}case"+=":Array.isArray(o[r])||(o[r]=[]),o[r].push(c)}}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(ns,"LangiumParser"),ns),as,oI=(as=class{buildMismatchTokenMessage(e){return Fa.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Fa.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Fa.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Fa.buildEarlyExitMessage(e)}},s(as,"AbstractParserErrorMessageProvider"),as),is,Xg=(is=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(is,"LangiumParserErrorMessageProvider"),is),ss,lI=(ss=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(ss,"LangiumCompletionParser"),ss),Mj={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Xg},os,cI=(os=class extends Ax{constructor(e,r){const n=r&&"maxLookahead"in r;super(e,{...Mj,lookaheadStrategy:n?new Cg({maxLookahead:r.maxLookahead}):new Lj({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(os,"ChevrotainWrapper"),os),ls,xj=(ls=class extends cI{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(ls,"ProfilerWrapper"),ls);function ud(t,e,r){return uI({parser:e,tokens:r,ruleNames:new Map},t),e}s(ud,"createParser");function uI(t,e){const r=Cf(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,Zr(o,i.definition))}const a=ue(e.rules).filter(Po).filter(i=>r.has(i));for(const i of a)t.parser.rule(i,fI(t,i))}s(uI,"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}},u={...i,$container:o};o.elements.push(l,u);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=fd(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,u,m)},"DEF")})}}s(fI,"buildInfixRule");function Zr(t,e,r=!1){let n;if(br(e))n=vI(t,e);else if(Hr(e))n=dI(t,e);else if(Sr(e))n=Zr(t,e.terminal);else if(Wn(e))n=Jg(t,e);else if(wr(e))n=pI(t,e);else if(gf(e))n=mI(t,e);else if(Rf(e))n=gI(t,e);else if(Vn(e))n=yI(t,e);else if(em(e)){const a=t.consume++;n=s(()=>t.parser.consume(a,Xr,e),"method")}else throw new Af(e.$cstNode,`Unexpected element type: ${e.$type}`);return Zg(t,r?void 0:pc(e),n,e.cardinality)}s(Zr,"buildElement");function dI(t,e){const r=Fn(e);return()=>t.parser.action(r,e)}s(dI,"buildAction");function pI(t,e){const r=e.rule.ref;if(qn(r)){const n=t.subrule++,a=ot(r)&&r.fragment,i=e.arguments.length>0?hI(r,e.arguments):()=>({});let o;return c=>{o??(o=fd(t,r)),t.parser.subrule(n,o,a,e,i(c))}}else if(xt(r)){const n=t.consume++,a=nf(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)en();else throw new Af(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:c}of n)o&&(i[o]=c(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 c=t.parameters[o].name,l=n[o];i[c]=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}en()}s(zt,"buildPredicate");function mI(t,e){if(e.elements.length===1)return Zr(t,e.elements[0]);{const r=[];for(const a of e.elements){const i={ALT:Zr(t,a,!0)},o=pc(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")},c=i.GATE;return c&&(o.GATE=()=>c(a)),o}))}}s(mI,"buildAlternatives");function gI(t,e){if(e.elements.length===1)return Zr(t,e.elements[0]);const r=[];for(const c of e.elements){const l={ALT:Zr(t,c,!0)},u=pc(c);u&&(l.GATE=zt(u)),r.push(l)}const n=t.or++,a=s((c,l)=>{const u=l.getRuleStack().join("-");return`uGroup_${c}_${u}`},"idFunc"),i=s(c=>t.parser.alternatives(n,r.map((l,u)=>{const f={ALT:s(()=>!0,"ALT")},d=t.parser;f.ALT=()=>{if(l.ALT(c),!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[u])>"u"&&(g[u]=!0)}};const p=l.GATE;return p?f.GATE=()=>p(c):f.GATE=()=>{const m=d.unorderedGroups.get(a(n,d));return!(m!=null&&m[u])},f})),"alternatives"),o=Zg(t,pc(e),i,"*");return c=>{o(c),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}s(gI,"buildUnorderedGroup");function yI(t,e){const r=e.elements.map(n=>Zr(t,n));return n=>r.forEach(a=>a(n))}s(yI,"buildGroup");function pc(t){if(Vn(t))return t.guardCondition}s(pc,"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=fd(t,n)),t.parser.subrule(a,i,!1,e,o)}}else if(wr(r)&&xt(r.rule.ref)){const n=t.consume++,a=nf(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(br(r)){const n=t.consume++,a=nf(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=If(e.type.ref),a=n==null?void 0:n.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Fn(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:dh(),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 c=>t.parser.alternatives(o,[{ALT:s(()=>t.parser.atLeastOne(i,{DEF:s(()=>r(c),"DEF")}),"ALT"),GATE:s(()=>a(c),"GATE")},{ALT:dh(),GATE:s(()=>!a(c),"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 en()}s(Zg,"wrap");function fd(t,e){const r=TI(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}s(fd,"getRule");function TI(t,e){if(qn(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);)(Vn(n)||gf(n)||Rf(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 nf(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}s(nf,"getToken");function Qg(t){const e=t.Grammar,r=t.parser.Lexer,n=new lI(t);return ud(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 ud(e,n,r.definition)}s(ty,"prepareLangiumParser");var cs,dd=(cs=class{constructor(){this.diagnostics=[]}buildTokens(e,r){const n=ue(Cf(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=$c(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=_f(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(qn).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(zo(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(cs,"DefaultTokenBuilder"),cs),us,ry=(us=class{convert(e,r){let n=r.grammarSource;if(Wn(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(us,"DefaultValueConverter"),us),ar;(function(t){function e(u){let f="";for(let d=1;d<u.length-1;d++){const p=u.charAt(d);if(p==="\\"){const m=u.charAt(++d);f+=r(m)}else f+=p}return f}s(e,"convertString"),t.convertString=e;function r(u){switch(u){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 u}}s(r,"convertEscapeCharacter");function n(u){return u.charAt(0)==="^"?u.substring(1):u}s(n,"convertID"),t.convertID=n;function a(u){return parseInt(u)}s(a,"convertInt"),t.convertInt=a;function i(u){return BigInt(u)}s(i,"convertBigint"),t.convertBigint=i;function o(u){return new Date(u)}s(o,"convertDate"),t.convertDate=o;function c(u){return Number(u)}s(c,"convertNumber"),t.convertNumber=c;function l(u){return u.toLowerCase()==="true"}s(l,"convertBoolean"),t.convertBoolean=l})(ar||(ar={}));var Ae={};ff(Ae,jh(pf()));function pd(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}s(pd,"delayNextTick");var Tu=0,RI=10;function hd(){return Tu=performance.now(),new Ae.CancellationTokenSource}s(hd,"startCancelableOperation");function ny(t){RI=t}s(ny,"setInterruptionPeriod");var or=Symbol("OperationCancelled");function la(t){return t===or}s(la,"isOperationCancelled");async function Ye(t){if(t===Ae.CancellationToken.None)return;const e=performance.now();if(e-Tu>=RI&&(Tu=e,await pd(),Tu=performance.now()),t.isCancellationRequested)throw or}s(Ye,"interruptAndCheck");var fs,Or=(fs=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}},s(fs,"Deferred"),fs),Vr,Wv=(Vr=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(Vr.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 c=Math.max(a.start.line,0),l=Math.max(a.end.line,0);let u=this._lineOffsets;const f=Rh(n.text,!1,i);if(l-c===f.length)for(let p=0,m=f.length;p<m;p++)u[p+c+1]=f[p];else f.length<1e4?u.splice(c+1,l-c,...f):this._lineOffsets=u=u.slice(0,c+1).concat(f,u.slice(l+1));const d=n.text.length-(o-i);if(d!==0)for(let p=c+1+f.length,m=u.length;p<m;p++)u[p]=u[p]+d}else if(Vr.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=Rh(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(Vr,"FullTextDocument"),Vr),af;(function(t){function e(a,i,o,c){return new Wv(a,i,o,c)}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(),c=sf(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 u=[];for(const f of c){const d=a.offsetAt(f.range.start);if(d<l)throw new Error("Overlapping edit");d>l&&u.push(o.substring(l,d)),f.newText.length&&u.push(f.newText),l=a.offsetAt(f.range.end)}return u.push(o.substr(l)),u.join("")}s(n,"applyEdits"),t.applyEdits=n})(af||(af={}));function sf(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);sf(n,e),sf(a,e);let i=0,o=0,c=0;for(;i<n.length&&o<a.length;)e(n[i],a[o])<=0?t[c++]=n[i++]:t[c++]=a[o++];for(;i<n.length;)t[c++]=n[i++];for(;o<a.length;)t[c++]=a[o++];return t}s(sf,"mergeSort");function Rh(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(Rh,"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 b,O="",M=0,L=-1,j=0,F=0;F<=$.length;++F){if(F<$.length)b=$.charCodeAt(F);else{if(b===47)break;b=47}if(b===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 te=O.lastIndexOf("/");if(te!==O.length-1){te===-1?(O="",M=0):M=(O=O.slice(0,te)).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 b===46&&j!==-1?++j:j=-1}return O}s(R,"r");var I={resolve:s(function(){for(var $,A="",b=!1,O=arguments.length-1;O>=-1&&!b;O--){var M;O>=0?M=arguments[O]:($===void 0&&($=process.cwd()),M=$),S(M),M.length!==0&&(A=M+"/"+A,b=M.charCodeAt(0)===47)}return A=R(A,!b),b?A.length>0?"/"+A:"/":A.length>0?A:"."},"resolve"),normalize:s(function($){if(S($),$.length===0)return".";var A=$.charCodeAt(0)===47,b=$.charCodeAt($.length-1)===47;return($=R($,!A)).length!==0||A||($="."),$.length>0&&b&&($+="/"),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 b=arguments[A];S(b),b.length>0&&($===void 0?$=b:$+="/"+b)}return $===void 0?".":I.normalize($)},"join"),relative:s(function($,A){if(S($),S(A),$===A||($=I.resolve($))===(A=I.resolve(A)))return"";for(var b=1;b<$.length&&$.charCodeAt(b)===47;++b);for(var O=$.length,M=O-b,L=1;L<A.length&&A.charCodeAt(L)===47;++L);for(var j=A.length-L,F=M<j?M:j,te=-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(b+U)===47?te=U:U===0&&(te=0));break}var Q=$.charCodeAt(b+U);if(Q!==A.charCodeAt(L+U))break;Q===47&&(te=U)}var fe="";for(U=b+te+1;U<=O;++U)U!==O&&$.charCodeAt(U)!==47||(fe.length===0?fe+="..":fe+="/..");return fe.length>0?fe+A.slice(L+te):(L+=te,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),b=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?b?"/":".":b&&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 b,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(b=$.length-1;b>=0;--b){var te=$.charCodeAt(b);if(te===47){if(!L){O=b+1;break}}else F===-1&&(L=!1,F=b+1),j>=0&&(te===A.charCodeAt(j)?--j==-1&&(M=b):(j=-1,M=F))}return O===M?M=F:M===-1&&(M=$.length),$.slice(O,M)}for(b=$.length-1;b>=0;--b)if($.charCodeAt(b)===47){if(!L){O=b+1;break}}else M===-1&&(L=!1,M=b+1);return M===-1?"":$.slice(O,M)},"basename"),extname:s(function($){S($);for(var A=-1,b=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){b=j+1;break}}return A===-1||O===-1||L===0||L===1&&A===O-1&&A===b+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,b){var O=b.dir||b.root,M=b.base||(b.name||"")+(b.ext||"");return O?O===b.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 b,O=$.charCodeAt(0),M=O===47;M?(A.root="/",b=1):b=0;for(var L=-1,j=0,F=-1,te=!0,U=$.length-1,Q=0;U>=b;--U)if((O=$.charCodeAt(U))!==47)F===-1&&(te=!1,F=U+1),O===46?L===-1?L=U:Q!==1&&(Q=1):L!==-1&&(Q=-1);else if(!te){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=/^\//,c=/^\/\//;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(c.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 u="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,oe=class oe{constructor(S,R,I,$,A,b=!1){jr(this,"scheme");jr(this,"authority");jr(this,"path");jr(this,"query");jr(this,"fragment");typeof S=="object"?(this.scheme=S.scheme||u,this.authority=S.authority||u,this.path=S.path||u,this.query=S.query||u,this.fragment=S.fragment||u):(this.scheme=(function(O,M){return O||M?O:"file"})(S,b),this.authority=R||u,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||u),this.query=$||u,this.fragment=A||u,l(this,b))}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 w(this,!1)}with(S){if(!S)return this;let{scheme:R,authority:I,path:$,query:A,fragment:b}=S;return R===void 0?R=this.scheme:R===null&&(R=u),I===void 0?I=this.authority:I===null&&(I=u),$===void 0?$=this.path:$===null&&($=u),A===void 0?A=this.query:A===null&&(A=u),b===void 0?b=this.fragment:b===null&&(b=u),R===this.scheme&&I===this.authority&&$===this.path&&A===this.query&&b===this.fragment?this:new g(R,I,$,A,b)}static parse(S,R=!1){const I=d.exec(S);return I?new g(I[2]||u,re(I[4]||u),re(I[5]||u),re(I[7]||u),re(I[9]||u),R):new g(u,u,u,u,u)}static file(S){let R=u;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,u,u)}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=w(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 b=P.charCodeAt(A);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||S&&b===47||R&&b===91||R&&b===93||R&&b===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[b];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 w(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(w,"v");function C(P,S){const R=S?T:E;let I="",{scheme:$,authority:A,path:b,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(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){const L=b.charCodeAt(1);L>=65&&L<=90&&(b=`/${String.fromCharCode(L+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){const L=b.charCodeAt(0);L>=65&&L<=90&&(b=`${String.fromCharCode(L+32)}:${b.substr(2)}`)}I+=R(b,!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 re(P){return P.match(B)?P.replace(B,(S=>k(S))):P}s(re,"w");var X=r(975);const ge=X.posix||X,_e="/";var Ie;(function(P){P.joinPath=function(S,...R){return S.with({path:ge.join(S.path,...R)})},P.resolvePath=function(S,...R){let I=S.path,$=!1;I[0]!==_e&&(I=_e+I,$=!0);let A=ge.resolve(I,...R);return $&&A[0]===_e&&!S.authority&&(A=A.substring(1)),S.with({path:A})},P.dirname=function(S){if(S.path.length===0||S.path===_e)return S;let R=ge.dirname(S.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),S.with({path:R})},P.basename=function(S){return ge.basename(S.path)},P.extname=function(S){return ge.extname(S.path)}})(Ie||(Ie={})),AI=n})();var{URI:Rt,Utils:yl}=AI,it;(function(t){t.basename=yl.basename,t.dirname=yl.dirname,t.extname=yl.extname,t.joinPath=yl.joinPath,t.resolvePath=yl.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function r(o,c){return(o==null?void 0:o.toString())===(c==null?void 0:c.toString())}s(r,"equals"),t.equals=r;function n(o,c){const l=typeof o=="string"?Rt.parse(o).path:o.path,u=typeof c=="string"?Rt.parse(c).path:c.path,f=l.split("/").filter(v=>v.length>0),d=u.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 u.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,c){let l=typeof o=="string"?o:o.path,u=typeof c=="string"?c:c.path;return u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),l.charAt(l.length-1)==="/"&&(l=l.slice(0,-1)),u===l?!0:u.length<l.length||u.charAt(l.length)!=="/"?!1:u.startsWith(l)}s(i,"contains"),t.contains=i})(it||(it={}));var ds,sy=(ds=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(ds,"UriTrie"),ds),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 ps,EI=(ps=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,r=Ae.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),Ae.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return Ae.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,c;const n=(o=e.parseResult.value.$cstNode)==null?void 0:o.root.fullText,a=(c=this.textDocuments)==null?void 0:c.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=af.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r??""))}},s(ps,"DefaultLangiumDocumentFactory"),ps),hs,_I=(hs=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(hs,"DefaultLangiumDocuments"),hs),mn=Symbol("RefResolving"),ms,CI=(ms=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=Ae.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 Ye(r),ko(i).forEach(o=>{const c=`${i.$type}:${o.property}`;a.startSubTask(c);try{this.doLink(o,e)}finally{a.stopSubTask(c)}})}finally{a.stop()}}else for(const a of Kt(e.parseResult.value))await Ye(r),ko(a).forEach(i=>this.doLink(i,e))}doLink(e,r){const n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=mn;try{const a=this.getCandidate(e);if(vn(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=mn;try{const a=this.getCandidates(e),i=[];if(vn(a))n._linkingError=a;else for(const o of a){const c=this.loadAstNode(o);c&&i.push({ref:c,$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(Be(this._ref))return this._ref;if(Kh(this._nodeDescription)){const c=i.loadAstNode(this._nodeDescription);this._ref=c??i.createLinkingError({reference:o,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=mn;const c=Ga(e).$document,l=i.getLinkedNode({reference:o,container:e,property:r});if(l.error&&c&&c.state<Z.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,c==null||c.references.push(this)}else this._ref===mn&&i.throwCyclicReferenceError(e,r,a);return Be(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return vn(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=mn;const c=Ga(e).$document,l=i.getCandidates({reference:o,container:e,property:r}),u=[];if(vn(l))this._linkingError=l;else for(const f of l){const d=i.loadAstNode(f);d&&u.push({ref:d,$nodeDescription:f})}this._items=u,c==null||c.references.push(this)}else this._items===mn&&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(vn(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=Ga(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(ms,"DefaultLinker"),ms);function oy(t){return typeof t.name=="string"}s(oy,"isNamed");var gs,SI=(gs=class{getName(e){if(oy(e))return e.name}getNameNode(e){return Sf(e.$cstNode,"name")}},s(gs,"DefaultNameProvider"),gs),ys,bI=(ys=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=>Wn(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 Eu(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 Eu(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 ko(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),c=this.nodeLocator.getAstNodePath(a);n.push({sourceUri:o.uri,sourcePath:c,targetUri:o.uri,targetPath:c,segment:Lo(i),local:!0})}}return n}},s(ys,"DefaultReferences"),ys),vs,Lr=(vs=class{constructor(e){if(this.map=new Map,e)for(const[r,n]of e)this.add(r,n)}get size(){return Zl.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):wo}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(vs,"MultiMap"),vs),Ts,of=(Ts=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(Ts,"BiMap"),Ts),Rs,wI=(Rs=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,r=Ae.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)}async collectExportedSymbolsForNode(e,r,n=yc,a=Ae.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,r);for(const o of n(e))await Ye(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=Ae.CancellationToken.None){const n=e.parseResult.value,a=new Lr;for(const i of Dr(n))await Ye(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(Rs,"DefaultScopeComputation"),Rs),$s,$h=($s=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($s,"StreamScope"),$s),As,Fj=(As=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(As,"MapScope"),As),Es,II=(Es=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(Es,"MultiMapScope"),Es),Gj={getElement(){},getElements(){return wo},getAllElements(){return wo}},_s,md=(_s=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(_s,"DisposableCache"),_s),Cs,ly=(Cs=class extends md{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(Cs,"SimpleCache"),Cs),Ss,gd=(Ss=class extends md{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(Ss,"ContextCache"),Ss),bs,NI=(bs=class extends gd{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(bs,"DocumentCache"),bs),ws,cy=(ws=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(ws,"WorkspaceCache"),ws),Is,kI=(Is=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 cy(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(c=>this.reflection.isSubtype(c.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 $h(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 $h(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new II(this.indexManager.allElements(e)))}},s(Is,"DefaultScopeProvider"),Is);function uy(t){return typeof t.$comment=="string"}s(uy,"isAstNodeWithComment");function Ah(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}s(Ah,"isIntermediateReference");var Ns,PI=(Ns=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((c,l)=>this.replacer(c,l,n),"defaultReplacer"),o=a?(c,l)=>a(c,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:c}){var l,u,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&&(c?g=c(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&&(c?E=c(v.uri,g):E=v.uri.toString());const T=this.astNodeLocator.getAstNodePath(g);p.push(`${E}#${T}`)}return{$refs:p,$refText:d}}else if(Be(r)){let d;if(i&&(d=this.addAstNodeRegionWithAssignmentsTo({...r}),(!e||r.$document)&&(d!=null&&d.$textRegion)&&(d.$textRegion.documentURI=(u=this.currentDocument)==null?void 0:u.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,u]of Object.entries(e))if(Array.isArray(u))for(let f=0;f<u.length;f++){const d=u[f];Ah(d)?u[f]=this.reviveReference(e,l,r,d,n):Be(d)&&this.linkNode(d,r,n,e,l,f)}else Ah(u)?e[l]=this.reviveReference(e,l,r,u,n):Be(u)&&this.linkNode(u,r,n,e,l);const c=e;c.$container=a,c.$containerProperty=i,c.$containerIndex=o}reviveReference(e,r,n,a,i){let o=a.$refText,c=a.$error,l;if(a.$ref){const u=this.getRefNode(n,a.$ref,i.uriConverter);if(Be(u))return o||(o=this.nameProvider.getName(u)),{$refText:o??"",ref:u};c=u}else if(a.$refs){const u=[];for(const f of a.$refs){const d=this.getRefNode(n,f,i.uriConverter);Be(d)&&u.push({ref:d})}if(u.length===0)l={$refText:o??"",items:u},c??(c="Could not resolve multi-reference");else return{$refText:o??"",items:u}}if(c)return l??(l={$refText:o??"",ref:void 0}),l.error={info:{container:e,property:r,reference:l},message:c},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),u=this.langiumDocuments.getDocument(l);return u?u.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 c=this.astNodeLocator.getAstNode(o.parseResult.value,r.substring(a+1));return c||"Could not resolve URI: "+r}catch(a){return String(a)}}},s(Ns,"DefaultJsonSerializer"),Ns),ks,OI=(ks=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,c;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const r=(c=(o=this.textDocuments)==null?void 0:o.get(e))==null?void 0:c.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(ks,"DefaultServiceRegistry"),ks);function Pn(t){return{code:t}}s(Pn,"diagnosticData");var lf;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(lf||(lf={}));var Ps,LI=(Ps=class{constructor(e){this.entries=new Lr,this.knownCategories=new Set(lf.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 c of o){const l={check:this.wrapValidationException(c,r),category:n};this.addEntry(a,l)}else if(typeof o=="function"){const c={check:this.wrapValidationException(o,r),category:n};this.addEntry(a,c)}else en()}}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(la(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,c)=>{await this.handleException(()=>e.call(n,a,i,o,c),r,i,a)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},s(Ps,"ValidationRegistry"),Ps),DI=Object.freeze({validateNode:!0,validateChildren:!0}),Os,MI=(Os=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=Ae.CancellationToken.None){const a=e.parseResult,i=[];if(await Ye(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(a,i,r),r.stopAfterLexingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LexingError})||(this.processParsingErrors(a,i,r),r.stopAfterParsingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.ParsingError}))||(this.processLinkingErrors(e,i,r),r.stopAfterLinkingErrors&&i.some(o=>{var c;return((c=o.data)==null?void 0:c.code)===Ot.LinkingError}))))return i;try{i.push(...await this.validateAst(a.value,r,n))}catch(o){if(la(o))throw o;console.error("An error occurred during validation:",o)}return await Ye(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 c=o.severity??"error",l={severity:Xl(c),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(c),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 c={line:0,character:0};i={start:c,end:c}}else{const c={line:o.endLine-1,character:o.endColumn};i={start:c,end:c}}}}else i=Ql(a.token);if(i){const o={severity:Xl("error"),range:i,message:a.message,data:Pn(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 c={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,c))}}}async validateAst(e,r,n=Ae.CancellationToken.None){const a=[],i=s((o,c,l)=>{a.push(this.toDiagnostic(o,c,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=Ae.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}async validateAstNodes(e,r,n,a=Ae.CancellationToken.None){var i;if((i=this.profiler)!=null&&i.isActive("validating")){const o=this.profiler.createTask("validating",this.languageId);o.start();try{const c=Kt(e).iterator();for(const l of c){o.startSubTask(l.$type);const u=this.validateSingleNodeOptions(l,r);if(u.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)}u.validateChildren||c.prune()}}finally{o.stop()}}else{const o=Kt(e).iterator();for(const c of o){await Ye(a);const l=this.validateSingleNodeOptions(c,r);if(l.validateNode){const u=this.validationRegistry.getChecks(c.$type,r.categories);for(const f of u)await f(c,n,a)}l.validateChildren||o.prune()}}}validateSingleNodeOptions(e,r){return DI}async validateAstAfter(e,r,n,a=Ae.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const o of i)await Ye(a),await o(e,n,r.categories??[],a)}toDiagnostic(e,r,n){return{message:r,range:fy(n),severity:Xl(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(Os,"DefaultDocumentValidator"),Os);function fy(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=Sf(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 Xl(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(Xl,"toDiagnosticSeverity");function dy(t){switch(t){case"error":return Pn(Ot.LexingError);case"warning":return Pn(Ot.LexingWarning);case"info":return Pn(Ot.LexingInfo);case"hint":return Pn(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 Ls,xI=(Ls=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 c=s(()=>o??(o=Lo(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return c()},selectionSegment:Lo(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},s(Ls,"DefaultAstNodeDescriptionProvider"),Ls),Ds,FI=(Ds=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,r=Ae.CancellationToken.None){const n=[],a=e.parseResult.value;for(const i of Kt(a))await Ye(r),ko(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=[],c=Lo(r.$refNode);for(const l of n)o.push({sourceUri:a,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:c,local:it.equals(l.documentUri,a)});return o}},s(Ds,"DefaultReferenceDescriptionProvider"),Ds),Ms,GI=(Ms=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 c=i.substring(0,o),l=parseInt(i.substring(o+1)),u=a[c];return u==null?void 0:u[l]}return a[i]},e)}},s(Ms,"DefaultAstNodeLocator"),Ms),yd={};ff(yd,jh(jo()));var xs,jI=(xs=class{constructor(e){this._ready=new Or,this.onConfigurationSectionUpdateEmitter=new yd.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(xs,"DefaultConfigurationProvider"),xs),zc=jh(Tk()),Dn;(function(t){function e(r){return{dispose:s(async()=>await r(),"dispose")}}s(e,"create"),t.create=e})(Dn||(Dn={}));var Fs,UI=(Fs=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=Ae.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 c=this.findMissingValidationCategories(i,r);c.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:c}},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=Ae.CancellationToken.None){this.currentState=Z.Changed;const a=[];for(const l of r){const u=this.langiumDocuments.deleteDocuments(l);for(const f of u)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 u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=Z.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,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 Ye(n);const c=this.sortDocuments(this.langiumDocuments.all.filter(l=>{var u;return l.state<Z.Validated||!((u=this.buildState.get(l.uri.toString()))!=null&&u.completed)||this.resultsAreIncomplete(l,this.updateBuildOptions)}).toArray());await this.buildDocuments(c,this.updateBuildOptions,n)}resultsAreIncomplete(e,r){return this.findMissingValidationCategories(e,r).length>=1}findMissingValidationCategories(e,r){var c,l;const n=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=(c=n==null?void 0:n.result)!=null&&c.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(u=>!i.has(u)).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),Dn.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 c=this.serviceRegistry.getServices(o.uri).references.ScopeComputation;o.localSymbols=await c.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 Ye(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),Dn.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),Dn.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;return r&&"path"in r?a=r:n=r,n??(n=Ae.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 zc.ResponseError(zc.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 zc.ResponseError(zc.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((i,o)=>{const c=this.onDocumentPhase(e,u=>{it.equals(u.uri,r)&&(c.dispose(),l.dispose(),i(u.uri))}),l=n.onCancellationRequested(()=>{c.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 Ye(n),await o(e,n)}catch(c){if(!la(c))throw c}}async notifyBuildPhase(e,r,n){if(e.length===0)return;const i=this.buildPhaseListeners.get(r).slice();for(const o of i)await Ye(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 c=this.buildState.get(e.uri.toString());c&&(c.result??(c.result={}),c.result.validationChecks?c.result.validationChecks=ue(c.result.validationChecks).concat(i.categories).distinct().toArray():c.result.validationChecks=[...i.categories])}getBuildOptions(e){var r;return((r=this.buildState.get(e.uri.toString()))==null?void 0:r.options)??{}}},s(Fs,"DefaultDocumentBuilder"),Fs),Gs,zI=(Gs=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new gd,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=Ae.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=Ae.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(Gs,"DefaultIndexManager"),Gs),js,BI=(js=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=Ae.CancellationToken.None){const n=await this.performStartup(e);await Ye(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(js,"DefaultWorkspaceManager"),js),Us,KI=(Us=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return rh.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return rh.buildUnableToPopLexerModeMessage(e)}},s(Us,"DefaultLexerErrorMessageProvider"),Us),py={mode:"full"},zs,hy=(zs=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=Td(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}},s(zs,"DefaultLexer"),zs);function vd(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}s(vd,"isTokenTypeArray");function Td(t){return t&&"modes"in t&&"defaultMode"in t}s(Td,"isIMultiModeLexerDefinition");function cf(t){return!vd(t)&&!Td(t)}s(cf,"isTokenTypeDictionary");mc();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=Rd(n),c=qI({lines:i,position:a,options:o});return HI({index:0,tokens:c,position:a})}s(my,"parseJSDoc");function gy(t,e){const r=Rd(e),n=yy(t);if(n.length===0)return!1;const a=n[0],i=n[n.length-1],o=r.start,c=r.end;return!!(o!=null&&o.exec(a))&&!!(c!=null&&c.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,jj=/\{(@[\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 c=0;c<t.lines.length;c++){const l=c===0,u=c===t.lines.length-1;let f=t.lines[c],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(u){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)),uf(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=uf(f,d)}if(d<f.length){const g=f.substring(d),v=Array.from(g.matchAll(jj));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 c of t){const l=c.index,u=e.substring(i,l);u.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=u.length+1;const d=c[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,c.length===4){f+=c[2].length;const p=c[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+c[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 Uj=/\S/,zj=/\s*$/;function uf(t,e){const r=t.substring(e).match(Uj);return r?e+r.index:t.length}s(uf,"skipWhitespace");function VI(t){const e=t.match(zj);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 c=YI(t,r[r.length-1]);c&&r.push(c)}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 Eh(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 Nd(n,new Eh([i],i.range),e,ee.create(r.range.start,i.range.end))}else{const i=vy(t);return new Nd(n,i,e,ee.create(r.range.start,i.range.end))}else{const i=r.range;return new Nd(n,new Eh([],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 Rd(t){if(!t)return Rd({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:Ru(e,!0),end:Ru(r,!1),line:Ru(n,!0)}}s(Rd,"normalizeOptions");function Ru(t,e){if(typeof t=="string"||typeof t=="object"){const r=typeof t=="string"?zo(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}s(Ru,"normalizeOption");var Bs,Hv=(Bs=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+=_h(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+=_h(r)+a}return r.trim()}},s(Bs,"JSDocCommentImpl"),Bs),Ks,Nd=(Ks=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(Ks,"JSDocTagImpl"),Ks);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 c=uf(e,a);i=e.substring(c),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 qs,Eh=(qs=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(qs,"JSDocTextImpl"),qs),Ws,eN=(Ws=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}},s(Ws,"JSDocLineImpl"),Ws);function _h(t){return t.endsWith(`
154
+ `)?`
155
+ `:`
156
+
157
+ `}s(_h,"fillNewlines");var Vs,tN=(Vs=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,c=a.documentUri.with({fragment:`L${i},${o}`});return`[${n}](${c.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){const a=Bt(e).localSymbols;if(!a)return;let i=e;do{const c=a.getStream(i).find(l=>l.name===r);if(c)return c;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}},s(Vs,"JSDocDocumentationProvider"),Vs),Hs,rN=(Hs=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return uy(e)?e.$comment:(r=vm(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:r.text}},s(Hs,"DefaultCommentProvider"),Hs),Ys,nN=(Ys=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},s(Ys,"DefaultAsyncParser"),Ys),Xs,Bj=(Xs=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(c=>{const l=this.hydrator.hydrate(c);a.resolve(l)}).catch(c=>{a.reject(c)}).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(Xs,"AbstractThreadedAsyncParser"),Xs),Js,Kj=(Js=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new yd.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(Js,"ParserWorker"),Js),Zs,aN=(Zs=class{constructor(){this.previousTokenSource=new Ae.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const r=hd();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=Ae.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){la(i)?n.resolve(void 0):n.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},s(Zs,"DefaultWorkspaceLock"),Zs),Qs,iN=(Qs=class{constructor(e){this.grammarElementIdMap=new of,this.tokenTypeIdMap=new of,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 Oo(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 c of i)Be(c)?o.push(this.dehydrateAstNode(c,r)):at(c)?o.push(this.dehydrateReference(c,r)):o.push(c)}else Be(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 hf(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)):Bn(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 Oo(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 c of i)Be(c)?o.push(this.setParent(this.hydrateAstNode(c,r),n)):at(c)?o.push(this.hydrateReference(c,n,a,r)):o.push(c)}else Be(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,c=e.endLine,l=e.endColumn,u=e.hidden;return new tf(n,a,{start:{line:i,character:o},end:{line:c,character:l}},r,u)}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))mf(r)&&this.grammarElementIdMap.set(r,e++)}},s(Qs,"DefaultHydrator"),Qs);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 dd,"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 Ch;(function(t){t.merge=(e,r)=>Go(Go({},e),r)})(Ch||(Ch={}));function Pe(t,e,r,n,a,i,o,c,l){const u=[t,e,r,n,a,i,o,c,l].reduce(Go,{});return Ay(u)}s(Pe,"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:Sh(n,a,t,e||r),"get"),getOwnPropertyDescriptor:s((n,a)=>(Sh(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 Sh(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(Sh,"_resolve");function Go(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]=Go(a,n):t[r]=Go({},n)}else t[r]=n}return t}s(Go,"_merge");var bh={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},On;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(On||(On={}));var eo,oN=(eo=class extends dd{constructor(e=bh){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...bh,...e},this.indentTokenType=Ua({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Ua({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){const n=super.buildTokens(e,r);if(!vd(n))throw new Error("Invalid tokens built by default builder");const{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:o,ignoreIndentationDelimiters:c}=this.options;let l,u,f;const d=[];for(const p of n){for(const[m,g]of c)p.name===m?p.PUSH_MODE=On.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===i?l=p:p.name===a?u=p:p.name===o?f=p:d.push(p)}if(!l||!u||!f)throw new Error("Some indentation/whitespace tokens not found!");return c.length>0?{modes:{[On.REGULAR]:[l,u,...d,f],[On.IGNORE_INDENTATION]:[...d,f]},defaultMode:On.REGULAR}:[l,u,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 kc(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:c}=this.matchWhitespace(e,r,n,a);return i<=o?null:(this.indentationStack.push(i),c)}dedentMatcher(e,r,n,a){var d,p;if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:o,match:c}=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=c==null?void 0:c[0])==null?void 0:d.length)??0,line:this.getLineNumber(e,r),column:1}),null;const u=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<u;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?Ua({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(eo,"IndentationAwareTokenBuilder"),eo),to,qj=(to=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,c=i.tokenTypeIdx,l=o.tokenTypeIdx,u=[],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===c&&m.tokenTypeIdx===l){d++;continue}u.push(p)}return f>=0&&u.push(n.tokens[f]),n.tokens=u,n}},s(to,"IndentationAwareLexer"),to),Ey={};Qr(Ey,{AstUtils:()=>Wh,BiMap:()=>of,Cancellation:()=>Ae,ContextCache:()=>gd,CstUtils:()=>Bh,DONE_RESULT:()=>nt,Deferred:()=>Or,Disposable:()=>Dn,DisposableCache:()=>md,DocumentCache:()=>NI,EMPTY_STREAM:()=>wo,ErrorWithLocation:()=>Af,GrammarUtils:()=>Am,MultiMap:()=>Lr,OperationCancelled:()=>or,Reduction:()=>Zl,RegExpUtils:()=>_m,SimpleCache:()=>ly,StreamImpl:()=>sr,TreeStreamImpl:()=>Io,URI:()=>Rt,UriTrie:()=>sy,UriUtils:()=>it,WorkspaceCache:()=>cy,assertCondition:()=>Em,assertUnreachable:()=>en,delayNextTick:()=>pd,interruptAndCheck:()=>Ye,isOperationCancelled:()=>la,loadGrammarFromJson:()=>wt,setInterruptionPeriod:()=>ny,startCancelableOperation:()=>hd,stream:()=>ue});ff(Ey,yd);var ro,lN=(ro=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(ro,"EmptyFileSystemProvider"),ro),Gt={fileSystemProvider:s(()=>new lN,"fileSystemProvider")},Wj={Grammar:s(()=>{},"Grammar"),LanguageMetaData:s(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Vj={AstReflection:s(()=>new pm,"AstReflection")};function cN(){const t=Pe(bt(Gt),Vj),e=Pe(St({shared:t}),Wj);return t.ServiceRegistry.register(e),e}s(cN,"createMinimalGrammarServices");function wt(t){const e=cN(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,Rt.parse(`memory:/${r.name??"grammar"}.langium`)),r}s(wt,"loadGrammarFromJson");ff(TT,Ey);var no,Hj=(no=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 uN(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 c=r.entries.get(o),l=c.reduce((u,f)=>u+f);n.push({name:`${r.identifier}.${o}`,count:c.length,duration:l})}const a=r.duration-n.map(o=>o.duration).reduce((o,c)=>o+c,0);n.push({name:r.identifier,count:1,duration:a}),n.sort((o,c)=>c.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(no,"DefaultLangiumProfiler"),no),ao,uN=(ao=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(ao,"ProfilingTask"),ao),wh;(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 ]+)\]/}})(wh||(wh={}));var Ih;(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]*/}})(Ih||(Ih={}));var Nh;(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])?/}})(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]*|)/,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]*/}})(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]*|)/,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]*/}})(Ph||(Ph={}));var Oh;(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]*/}})(Oh||(Oh={}));var Lh;(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]*/}})(Lh||(Lh={}));var Dh;(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:/"[^"]*"|'[^']*'/}})(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]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Mh||(Mh={}));var xh;(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]*/}})(xh||(xh={}));({...wh.Terminals,...Ih.Terminals,...Nh.Terminals,...kh.Terminals,...Ph.Terminals,...Oh.Terminals,...Lh.Terminals,...Mh.Terminals,...Dh.Terminals,...xh.Terminals});var Bc={$type:"Accelerator",name:"name",x:"x",y:"y"},Kc={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},vl={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},kd={$type:"Annotations",x:"x",y:"y"},Rr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function Yj(t){return It.isInstance(t,Rr.$type)}s(Yj,"isArchitecture");var qc={$type:"Axis",label:"label",name:"name"},$u={$type:"Branch",name:"name",order:"order"};function Xj(t){return It.isInstance(t,$u.$type)}s(Xj,"isBranch");var Xv={$type:"Checkout",branch:"branch"},Wc={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Pd={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Sa={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function Jj(t){return It.isInstance(t,Sa.$type)}s(Jj,"isCommit");var Vc={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},sn={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Hc={$type:"Curve",entries:"entries",label:"label",name:"name"},Yc={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Jv={$type:"Decorator",strategy:"strategy"},ga={$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"},ya={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},on={$type:"EmFrame"},Tl={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Zv={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},Od={$type:"EmModelEntity",name:"name"};function Zj(t){return t==="rmo"||t==="readmodel"||t==="ui"||t==="cmd"||t==="command"||t==="evt"||t==="event"||t==="pcr"||t==="processor"}s(Zj,"isEmModelEntityType");var Xc={$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 Qj(t){return It.isInstance(t,$r.$type)}s(Qj,"isEmResetFrame");var Ur={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Ld={$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"},Jc={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Dd={$type:"Evolve",component:"component",target:"target"},gn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function eU(t){return It.isInstance(t,gn.$type)}s(eU,"isGitGraph");var Rl={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Dl={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function tU(t){return It.isInstance(t,Dl.$type)}s(tU,"isInfo");var $l={$type:"Item",classSelector:"classSelector",name:"name"},Md={$type:"Junction",id:"id",in:"in"},Al={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},Zc={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},ln={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},ba={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function rU(t){return It.isInstance(t,ba.$type)}s(rU,"isMerge");var Qc={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},xd={$type:"Option",name:"name",value:"value"},wa={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function nU(t){return It.isInstance(t,wa.$type)}s(nU,"isPacket");var Ia={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function aU(t){return It.isInstance(t,Ia.$type)}s(aU,"isPacketBlock");var yn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function iU(t){return It.isInstance(t,yn.$type)}s(iU,"isPie");var Au={$type:"PieSection",label:"label",value:"value"};function sU(t){return It.isInstance(t,Au.$type)}s(sU,"isPieSection");var Fd={$type:"Pipeline",components:"components",parent:"parent"},eu={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},cn={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Gd={$type:"Section",classSelector:"classSelector",name:"name"},va={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},jd={$type:"Size",height:"height",width:"width"},Ta={$type:"Statement"},Na={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function oU(t){return It.isInstance(t,Na.$type)}s(oU,"isTreemap");var Ud={$type:"TreemapRow",indent:"indent",item:"item"},zd={$type:"TreeNode",indent:"indent",name:"name"},El={$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 lU(t){return It.isInstance(t,Je.$type)}s(lU,"isWardley");var io,fN=(io=class extends qh{constructor(){super(...arguments),this.types={Accelerator:{name:Bc.$type,properties:{name:{name:Bc.name},x:{name:Bc.x},y:{name:Bc.y}},superTypes:[]},Anchor:{name:Kc.$type,properties:{evolution:{name:Kc.evolution},name:{name:Kc.name},visibility:{name:Kc.visibility}},superTypes:[]},Annotation:{name:vl.$type,properties:{number:{name:vl.number},text:{name:vl.text},x:{name:vl.x},y:{name:vl.y}},superTypes:[]},Annotations:{name:kd.$type,properties:{x:{name:kd.x},y:{name:kd.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:qc.$type,properties:{label:{name:qc.label},name:{name:qc.name}},superTypes:[]},Branch:{name:$u.$type,properties:{name:{name:$u.name},order:{name:$u.order}},superTypes:[Ta.$type]},Checkout:{name:Xv.$type,properties:{branch:{name:Xv.branch}},superTypes:[Ta.$type]},CherryPicking:{name:Wc.$type,properties:{id:{name:Wc.id},parent:{name:Wc.parent},tags:{name:Wc.tags,defaultValue:[]}},superTypes:[Ta.$type]},ClassDefStatement:{name:Pd.$type,properties:{className:{name:Pd.className},styleText:{name:Pd.styleText}},superTypes:[]},Commit:{name:Sa.$type,properties:{id:{name:Sa.id},message:{name:Sa.message},tags:{name:Sa.tags,defaultValue:[]},type:{name:Sa.type}},superTypes:[Ta.$type]},Common:{name:Vc.$type,properties:{accDescr:{name:Vc.accDescr},accTitle:{name:Vc.accTitle},title:{name:Vc.title}},superTypes:[]},Component:{name:sn.$type,properties:{decorator:{name:sn.decorator},evolution:{name:sn.evolution},inertia:{name:sn.inertia,defaultValue:!1},label:{name:sn.label},name:{name:sn.name},visibility:{name:sn.visibility}},superTypes:[]},Curve:{name:Hc.$type,properties:{entries:{name:Hc.entries,defaultValue:[]},label:{name:Hc.label},name:{name:Hc.name}},superTypes:[]},Deaccelerator:{name:Yc.$type,properties:{name:{name:Yc.name},x:{name:Yc.x},y:{name:Yc.y}},superTypes:[]},Decorator:{name:Jv.$type,properties:{strategy:{name:Jv.strategy}},superTypes:[]},Direction:{name:ga.$type,properties:{accDescr:{name:ga.accDescr},accTitle:{name:ga.accTitle},dir:{name:ga.dir},statements:{name:ga.statements,defaultValue:[]},title:{name:ga.title}},superTypes:[gn.$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:ya.$type,properties:{dataBlockValue:{name:ya.dataBlockValue},dataType:{name:ya.dataType},name:{name:ya.name}},superTypes:[]},EmFrame:{name:on.$type,properties:{},superTypes:[]},EmGwt:{name:Tl.$type,properties:{givenStatements:{name:Tl.givenStatements,defaultValue:[]},sourceFrame:{name:Tl.sourceFrame,referenceType:on.$type},thenStatements:{name:Tl.thenStatements,defaultValue:[]},whenStatements:{name:Tl.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Zv.$type,properties:{entityIdentifier:{name:Zv.entityIdentifier,referenceType:Od.$type}},superTypes:[]},EmModelEntity:{name:Od.$type,properties:{name:{name:Od.name}},superTypes:[]},EmNoteEntity:{name:Xc.$type,properties:{dataBlockValue:{name:Xc.dataBlockValue},dataType:{name:Xc.dataType},sourceFrame:{name:Xc.sourceFrame,referenceType:on.$type}},superTypes:[]},EmResetFrame:{name:$r.$type,properties:{dataInlineValue:{name:$r.dataInlineValue},dataReference:{name:$r.dataReference,referenceType:ya.$type},dataType:{name:$r.dataType},entityIdentifier:{name:$r.entityIdentifier},modelEntityType:{name:$r.modelEntityType},name:{name:$r.name},sourceFrames:{name:$r.sourceFrames,defaultValue:[],referenceType:on.$type}},superTypes:[on.$type]},EmTimeFrame:{name:Ur.$type,properties:{dataInlineValue:{name:Ur.dataInlineValue},dataReference:{name:Ur.dataReference,referenceType:ya.$type},dataType:{name:Ur.dataType},entityIdentifier:{name:Ur.entityIdentifier},modelEntityType:{name:Ur.modelEntityType},name:{name:Ur.name},sourceFrames:{name:Ur.sourceFrames,defaultValue:[],referenceType:on.$type}},superTypes:[on.$type]},Entry:{name:Ld.$type,properties:{axis:{name:Ld.axis,referenceType:qc.$type},value:{name:Ld.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:Jc.$type,properties:{boundary:{name:Jc.boundary},name:{name:Jc.name},secondName:{name:Jc.secondName}},superTypes:[]},Evolve:{name:Dd.$type,properties:{component:{name:Dd.component},target:{name:Dd.target}},superTypes:[]},GitGraph:{name:gn.$type,properties:{accDescr:{name:gn.accDescr},accTitle:{name:gn.accTitle},statements:{name:gn.statements,defaultValue:[]},title:{name:gn.title}},superTypes:[]},Group:{name:Rl.$type,properties:{icon:{name:Rl.icon},id:{name:Rl.id},in:{name:Rl.in},title:{name:Rl.title}},superTypes:[]},Info:{name:Dl.$type,properties:{accDescr:{name:Dl.accDescr},accTitle:{name:Dl.accTitle},title:{name:Dl.title}},superTypes:[]},Item:{name:$l.$type,properties:{classSelector:{name:$l.classSelector},name:{name:$l.name}},superTypes:[]},Junction:{name:Md.$type,properties:{id:{name:Md.id},in:{name:Md.in}},superTypes:[]},Label:{name:Al.$type,properties:{negX:{name:Al.negX,defaultValue:!1},negY:{name:Al.negY,defaultValue:!1},offsetX:{name:Al.offsetX},offsetY:{name:Al.offsetY}},superTypes:[]},Leaf:{name:Zc.$type,properties:{classSelector:{name:Zc.classSelector},name:{name:Zc.name},value:{name:Zc.value}},superTypes:[$l.$type]},Link:{name:ln.$type,properties:{arrow:{name:ln.arrow},from:{name:ln.from},fromPort:{name:ln.fromPort},linkLabel:{name:ln.linkLabel},to:{name:ln.to},toPort:{name:ln.toPort}},superTypes:[]},Merge:{name:ba.$type,properties:{branch:{name:ba.branch},id:{name:ba.id},tags:{name:ba.tags,defaultValue:[]},type:{name:ba.type}},superTypes:[Ta.$type]},Note:{name:Qc.$type,properties:{evolution:{name:Qc.evolution},text:{name:Qc.text},visibility:{name:Qc.visibility}},superTypes:[]},Option:{name:xd.$type,properties:{name:{name:xd.name},value:{name:xd.value,defaultValue:!1}},superTypes:[]},Packet:{name:wa.$type,properties:{accDescr:{name:wa.accDescr},accTitle:{name:wa.accTitle},blocks:{name:wa.blocks,defaultValue:[]},title:{name:wa.title}},superTypes:[]},PacketBlock:{name:Ia.$type,properties:{bits:{name:Ia.bits},end:{name:Ia.end},label:{name:Ia.label},start:{name:Ia.start}},superTypes:[]},Pie:{name:yn.$type,properties:{accDescr:{name:yn.accDescr},accTitle:{name:yn.accTitle},sections:{name:yn.sections,defaultValue:[]},showData:{name:yn.showData,defaultValue:!1},title:{name:yn.title}},superTypes:[]},PieSection:{name:Au.$type,properties:{label:{name:Au.label},value:{name:Au.value}},superTypes:[]},Pipeline:{name:Fd.$type,properties:{components:{name:Fd.components,defaultValue:[]},parent:{name:Fd.parent}},superTypes:[]},PipelineComponent:{name:eu.$type,properties:{evolution:{name:eu.evolution},label:{name:eu.label},name:{name:eu.name}},superTypes:[]},Radar:{name:cn.$type,properties:{accDescr:{name:cn.accDescr},accTitle:{name:cn.accTitle},axes:{name:cn.axes,defaultValue:[]},curves:{name:cn.curves,defaultValue:[]},options:{name:cn.options,defaultValue:[]},title:{name:cn.title}},superTypes:[]},Section:{name:Gd.$type,properties:{classSelector:{name:Gd.classSelector},name:{name:Gd.name}},superTypes:[$l.$type]},Service:{name:va.$type,properties:{icon:{name:va.icon},iconText:{name:va.iconText},id:{name:va.id},in:{name:va.in},title:{name:va.title}},superTypes:[]},Size:{name:jd.$type,properties:{height:{name:jd.height},width:{name:jd.width}},superTypes:[]},Statement:{name:Ta.$type,properties:{},superTypes:[]},TreeNode:{name:zd.$type,properties:{indent:{name:zd.indent},name:{name:zd.name}},superTypes:[]},TreeView:{name:El.$type,properties:{accDescr:{name:El.accDescr},accTitle:{name:El.accTitle},nodes:{name:El.nodes,defaultValue:[]},title:{name:El.title}},superTypes:[]},Treemap:{name:Na.$type,properties:{accDescr:{name:Na.accDescr},accTitle:{name:Na.accTitle},title:{name:Na.title},TreemapRows:{name:Na.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Ud.$type,properties:{indent:{name:Ud.indent},item:{name:Ud.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(io,"MermaidAstReflection"),io),It=new fN,eT,cU=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,uU=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,fU=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,dU=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,pU=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,hU=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,mU=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,gU=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,yU=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"),cT,vU=s(()=>cT??(cT=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"),TU={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},RU={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$U={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},AU={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},EU={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},_U={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},CU={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},SU={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bU={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},wU={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},mr={AstReflection:s(()=>new fN,"AstReflection")},IU={Grammar:s(()=>cU(),"Grammar"),LanguageMetaData:s(()=>TU,"LanguageMetaData"),parser:{}},NU={Grammar:s(()=>uU(),"Grammar"),LanguageMetaData:s(()=>RU,"LanguageMetaData"),parser:{}},kU={Grammar:s(()=>fU(),"Grammar"),LanguageMetaData:s(()=>$U,"LanguageMetaData"),parser:{}},PU={Grammar:s(()=>dU(),"Grammar"),LanguageMetaData:s(()=>AU,"LanguageMetaData"),parser:{}},OU={Grammar:s(()=>pU(),"Grammar"),LanguageMetaData:s(()=>EU,"LanguageMetaData"),parser:{}},LU={Grammar:s(()=>hU(),"Grammar"),LanguageMetaData:s(()=>_U,"LanguageMetaData"),parser:{}},DU={Grammar:s(()=>mU(),"Grammar"),LanguageMetaData:s(()=>CU,"LanguageMetaData"),parser:{}},MU={Grammar:s(()=>gU(),"Grammar"),LanguageMetaData:s(()=>SU,"LanguageMetaData"),parser:{}},xU={Grammar:s(()=>yU(),"Grammar"),LanguageMetaData:s(()=>bU,"LanguageMetaData"),parser:{}},FU={Grammar:s(()=>vU(),"Grammar"),LanguageMetaData:s(()=>wU,"LanguageMetaData"),parser:{}},GU=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,jU=/accTitle[\t ]*:([^\n\r]*)/,UU=/title([\t ][^\n\r]*|)/,zU={ACC_DESCR:GU,ACC_TITLE:jU,TITLE:UU},so,Xo=(so=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=zU[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(so,"AbstractMermaidValueConverter"),so),oo,Dc=(oo=class extends Xo{runCustomConverter(e,r,n){}},s(oo,"CommonValueConverter"),oo),lo,gr=(lo=class extends dd{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(lo,"AbstractMermaidTokenBuilder"),lo),co;co=class extends gr{},s(co,"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 uo,BU=(uo=class extends gr{constructor(){super(["radar-beta"])}},s(uo,"RadarTokenBuilder"),uo),dN={parser:{TokenBuilder:s(()=>new BU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function pN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),DU,dN);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}s(pN,"createRadarServices");var fo,KU=(fo=class extends gr{constructor(){super(["treemap"])}},s(fo,"TreemapTokenBuilder"),fo),qU=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,po,WU=(po=class extends Xo{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=qU.exec(r);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},s(po,"TreemapValueConverter"),po);function hN(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}s(hN,"registerValidationChecks");var ho,VU=(ho=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(ho,"TreemapValidator"),ho),mN={parser:{TokenBuilder:s(()=>new KU,"TokenBuilder"),ValueConverter:s(()=>new WU,"ValueConverter")},validation:{TreemapValidator:s(()=>new VU,"TreemapValidator")}};function gN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),MU,mN);return e.ServiceRegistry.register(r),hN(r),{shared:e,Treemap:r}}s(gN,"createTreemapServices");var mo,HU=(mo=class extends Xo{runCustomConverter(e,r,n){switch(e.name.toUpperCase()){case"LINK_LABEL":return r.substring(1).trim();default:return}}},s(mo,"WardleyValueConverter"),mo),yN={parser:{ValueConverter:s(()=>new HU,"ValueConverter")}};function vN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),FU,yN);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}s(vN,"createWardleyServices");var go,YU=(go=class extends gr{constructor(){super(["gitGraph"])}},s(go,"GitGraphTokenBuilder"),go),TN={parser:{TokenBuilder:s(()=>new YU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function RN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),kU,TN);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}s(RN,"createGitGraphServices");var yo,XU=(yo=class extends gr{constructor(){super(["info","showInfo"])}},s(yo,"InfoTokenBuilder"),yo),$N={parser:{TokenBuilder:s(()=>new XU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function AN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),PU,$N);return e.ServiceRegistry.register(r),{shared:e,Info:r}}s(AN,"createInfoServices");var vo,JU=(vo=class extends gr{constructor(){super(["packet"])}},s(vo,"PacketTokenBuilder"),vo),EN={parser:{TokenBuilder:s(()=>new JU,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")}};function _N(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),OU,EN);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}s(_N,"createPacketServices");var To,ZU=(To=class extends gr{constructor(){super(["pie","showData"])}},s(To,"PieTokenBuilder"),To),Ro,QU=(Ro=class extends Xo{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},s(Ro,"PieValueConverter"),Ro),CN={parser:{TokenBuilder:s(()=>new ZU,"TokenBuilder"),ValueConverter:s(()=>new QU,"ValueConverter")}};function SN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),LU,CN);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}s(SN,"createPieServices");var $o,ez=($o=class extends Xo{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($o,"TreeViewValueConverter"),$o),Ao,tz=(Ao=class extends gr{constructor(){super(["treeView-beta"])}},s(Ao,"TreeViewTokenBuilder"),Ao),bN={parser:{TokenBuilder:s(()=>new tz,"TokenBuilder"),ValueConverter:s(()=>new ez,"ValueConverter")}};function wN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),xU,bN);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}s(wN,"createTreeViewServices");var Eo,rz=(Eo=class extends gr{constructor(){super(["architecture"])}},s(Eo,"ArchitectureTokenBuilder"),Eo),_o,nz=(_o=class extends Xo{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(_o,"ArchitectureValueConverter"),_o),IN={parser:{TokenBuilder:s(()=>new rz,"TokenBuilder"),ValueConverter:s(()=>new nz,"ValueConverter")}};function NN(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),IU,IN);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}s(NN,"createArchitectureServices");var Co,az=(Co=class extends gr{constructor(){super(["eventmodeling"])}},s(Co,"EventModelingTokenBuilder"),Co),uT=new Set(["cmd","command"]),fT=new Set(["evt","event"]),Bd=new Set(["rmo","readmodel"]),dT=new Set(["pcr","processor"]),pT=new Set(["ui"]);function kN(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(kN,"registerValidationChecks");var So,iz=(So=class{checkSourceFrameTypes(e,r){e.sourceFrames.length!==0&&(uT.has(e.modelEntityType)?this.validateSources(e,new Set([...pT,...dT]),"command","ui or processor",r):fT.has(e.modelEntityType)?this.validateSources(e,uT,"event","command",r):Bd.has(e.modelEntityType)?this.validateSources(e,fT,"read model","event",r):dT.has(e.modelEntityType)?this.validateSources(e,Bd,"processor","read model",r):pT.has(e.modelEntityType)&&this.validateSources(e,Bd,"ui","read model",r))}validateSources(e,r,n,a,i){for(const o of e.sourceFrames){const c=o.ref;c!==void 0&&!r.has(c.modelEntityType)&&i("error",`A ${n} can only receive input from a ${a}, not from '${c.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},s(So,"EventModelingValidator"),So),PN={parser:{TokenBuilder:s(()=>new az,"TokenBuilder"),ValueConverter:s(()=>new Dc,"ValueConverter")},validation:{EventModelingValidator:s(()=>new iz,"EventModelingValidator")}};function ON(t=Gt){const e=Pe(bt(t),mr),r=Pe(St({shared:e}),NU,PN);return e.ServiceRegistry.register(r),kN(r),{shared:e,EventModel:r}}s(ON,"createEventModelingServices");var Pt={},sz={info:s(async()=>{const{createInfoServices:t}=await er(async()=>{const{createInfoServices:r}=await Promise.resolve().then(()=>cz);return{createInfoServices:r}},void 0),e=t().Info.parser.LangiumParser;Pt.info=e},"info"),packet:s(async()=>{const{createPacketServices:t}=await er(async()=>{const{createPacketServices:r}=await Promise.resolve().then(()=>uz);return{createPacketServices:r}},void 0),e=t().Packet.parser.LangiumParser;Pt.packet=e},"packet"),pie:s(async()=>{const{createPieServices:t}=await er(async()=>{const{createPieServices:r}=await Promise.resolve().then(()=>fz);return{createPieServices:r}},void 0),e=t().Pie.parser.LangiumParser;Pt.pie=e},"pie"),treeView:s(async()=>{const{createTreeViewServices:t}=await er(async()=>{const{createTreeViewServices:r}=await Promise.resolve().then(()=>dz);return{createTreeViewServices:r}},void 0),e=t().TreeView.parser.LangiumParser;Pt.treeView=e},"treeView"),architecture:s(async()=>{const{createArchitectureServices:t}=await er(async()=>{const{createArchitectureServices:r}=await Promise.resolve().then(()=>pz);return{createArchitectureServices:r}},void 0),e=t().Architecture.parser.LangiumParser;Pt.architecture=e},"architecture"),gitGraph:s(async()=>{const{createGitGraphServices:t}=await er(async()=>{const{createGitGraphServices:r}=await Promise.resolve().then(()=>hz);return{createGitGraphServices:r}},void 0),e=t().GitGraph.parser.LangiumParser;Pt.gitGraph=e},"gitGraph"),eventmodeling:s(async()=>{const{createEventModelingServices:t}=await er(async()=>{const{createEventModelingServices:r}=await Promise.resolve().then(()=>mz);return{createEventModelingServices:r}},void 0),e=t().EventModel.parser.LangiumParser;Pt.eventmodeling=e},"eventmodeling"),radar:s(async()=>{const{createRadarServices:t}=await er(async()=>{const{createRadarServices:r}=await Promise.resolve().then(()=>gz);return{createRadarServices:r}},void 0),e=t().Radar.parser.LangiumParser;Pt.radar=e},"radar"),treemap:s(async()=>{const{createTreemapServices:t}=await er(async()=>{const{createTreemapServices:r}=await Promise.resolve().then(()=>yz);return{createTreemapServices:r}},void 0),e=t().Treemap.parser.LangiumParser;Pt.treemap=e},"treemap"),wardley:s(async()=>{const{createWardleyServices:t}=await er(async()=>{const{createWardleyServices:r}=await Promise.resolve().then(()=>vz);return{createWardleyServices:r}},void 0),e=t().Wardley.parser.LangiumParser;Pt.wardley=e},"wardley")};async function oz(t,e){const r=sz[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 lz(a);return a.value}s(oz,"parse");var bo,lz=(bo=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(bo,"MermaidParseError"),bo);const cz=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:$N,createInfoServices:AN},Symbol.toStringTag,{value:"Module"})),uz=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:EN,createPacketServices:_N},Symbol.toStringTag,{value:"Module"})),fz=Object.freeze(Object.defineProperty({__proto__:null,PieModule:CN,createPieServices:SN},Symbol.toStringTag,{value:"Module"})),dz=Object.freeze(Object.defineProperty({__proto__:null,TreeViewModule:bN,createTreeViewServices:wN},Symbol.toStringTag,{value:"Module"})),pz=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:IN,createArchitectureServices:NN},Symbol.toStringTag,{value:"Module"})),hz=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:TN,createGitGraphServices:RN},Symbol.toStringTag,{value:"Module"})),mz=Object.freeze(Object.defineProperty({__proto__:null,EventModelingModule:PN,createEventModelingServices:ON},Symbol.toStringTag,{value:"Module"})),gz=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:dN,createRadarServices:pN},Symbol.toStringTag,{value:"Module"})),yz=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:mN,createTreemapServices:gN},Symbol.toStringTag,{value:"Module"})),vz=Object.freeze(Object.defineProperty({__proto__:null,WardleyModule:yN,createWardleyServices:vN},Symbol.toStringTag,{value:"Module"}));export{Qj as i,oz as p};