orbitchat 3.10.2 → 3.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/ChartRenderer-mEVQp4Nd.js +80 -0
- package/dist/assets/{MermaidRenderer-BPk_MuJJ.js → MermaidRenderer-DNbuWll0.js} +66 -66
- package/dist/assets/{MusicRenderer-BNMS85mG.js → MusicRenderer-DW6lysGY.js} +4 -4
- package/dist/assets/SVGRenderer-DAIMVJgr.js +6 -0
- package/dist/assets/{arc-BHwyCqLz.js → arc-1qRI0DXn.js} +1 -1
- package/dist/assets/architectureDiagram-3BPJPVTR-Cow01YMa.js +36 -0
- package/dist/assets/{blockDiagram-GPEHLZMM-D0D5HOcH.js → blockDiagram-GPEHLZMM-C5XzJyId.js} +4 -4
- package/dist/assets/c4Diagram-AAUBKEIU-Cmx-NXVO.js +10 -0
- package/dist/assets/channel-BPmzEReZ.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-W5xmIUUR.js → chunk-2J33WTMH-CUt5uiXo.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DKq33P57.js → chunk-4BX2VUAB-CJj_7pn2.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DaDI8NE3.js → chunk-55IACEB6-DVyyaDvO.js} +1 -1
- package/dist/assets/chunk-727SXJPM-CL3otgv0.js +206 -0
- package/dist/assets/chunk-AQP2D5EJ-C45-Gx0g.js +231 -0
- package/dist/assets/{chunk-FMBD7UC4-CWclT1f0.js → chunk-FMBD7UC4-MubvFkwu.js} +1 -1
- package/dist/assets/chunk-ND2GUHAM-BodP1saw.js +1 -0
- package/dist/assets/{chunk-QZHKN3VN-D0S54BW6.js → chunk-QZHKN3VN-CZzLds6P.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-DsBJVdDP.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DsBJVdDP.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-DEY7stpG.js +1 -0
- package/dist/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
- package/dist/assets/dagre-BM42HDAG-W9SEsE-N.js +4 -0
- package/dist/assets/diagram-2AECGRRQ-BlqzAN8a.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-BLp8AGzL.js +10 -0
- package/dist/assets/{diagram-KO2AKTUF-Bu2G80gC.js → diagram-KO2AKTUF-D05qxtNL.js} +2 -2
- package/dist/assets/diagram-LMA3HP47-CnQ23_X8.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-CA92e8BM.js +24 -0
- package/dist/assets/docx-preview-C0UevYcE.js +38 -0
- package/dist/assets/erDiagram-TEJ5UH35-DSF2yibf.js +85 -0
- package/dist/assets/{flowDiagram-I6XJVG4X-CwDXxjFX.js → flowDiagram-I6XJVG4X-DY5MD6ts.js} +5 -5
- package/dist/assets/ganttDiagram-6RSMTGT7-BgubAiWl.js +292 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-BmCo7lBu.js +106 -0
- package/dist/assets/graph-CAnANduQ.js +1 -0
- package/dist/assets/index--_ARL9JL.js +134 -0
- package/dist/assets/{index-mJaxTisw.js → index-CZz_ECqk.js} +3 -3
- package/dist/assets/index-Ch_hpXfy.css +1 -0
- package/dist/assets/index-Cz_DOmYk.js +361 -0
- package/dist/assets/infoDiagram-5YYISTIA-CPT2KkJP.js +2 -0
- package/dist/assets/isPrototype-DezZrpQP.js +1 -0
- package/dist/assets/ishikawaDiagram-YF4QCWOH-BKDzsZ93.js +70 -0
- package/dist/assets/journeyDiagram-JHISSGLW-CZBIRXVn.js +139 -0
- package/dist/assets/{kanban-definition-UN3LZRKU-B1RqdBrJ.js → kanban-definition-UN3LZRKU-Dg7Po601.js} +4 -4
- package/dist/assets/layout-DGIYPm2g.js +1 -0
- package/dist/assets/{linear-CB3-LqbC.js → linear-BGneeY6s.js} +1 -1
- package/dist/assets/mindmap-definition-RKZ34NQL-DDJH6RNg.js +96 -0
- package/dist/assets/papaparse.min-CdRM_ppG.js +15 -0
- package/dist/assets/{pieDiagram-4H26LBE5-DsS9okNl.js → pieDiagram-4H26LBE5-VmwJRM5q.js} +2 -2
- package/dist/assets/quadrantDiagram-W4KKPZXB-BApnkjpH.js +7 -0
- package/dist/assets/requirementDiagram-4Y6WPE33-B3wRcSqV.js +84 -0
- package/dist/assets/sankeyDiagram-5OEKKPKP-CMdvyTCy.js +40 -0
- package/dist/assets/sequenceDiagram-3UESZ5HK-Bez2saVY.js +162 -0
- package/dist/assets/stateDiagram-AJRCARHV-CnB2Ac4-.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-D_TnKrY9.js +1 -0
- package/dist/assets/{time-C80Ah3yu.js → time-DJ0lCX4i.js} +1 -1
- package/dist/assets/timeline-definition-PNZ67QCA-kNKpwGZ_.js +120 -0
- package/dist/assets/vendor-auth-CrXMNoGZ.js +5 -0
- package/dist/assets/vendor-markdown-CQ_RitqP.js +307 -0
- package/dist/assets/vendor-react-C3O77mRn.js +9 -0
- package/dist/assets/vendor-syntax-Bg-E9hW_.js +16 -0
- package/dist/assets/vennDiagram-CIIHVFJN-DiFbBKbD.js +34 -0
- package/dist/assets/{wardley-L42UT6IY-DeoMKeIP.js → wardley-L42UT6IY-BftqliwA.js} +8 -8
- package/dist/assets/wardleyDiagram-YWT4CUSO-CvoUjOCY.js +78 -0
- package/dist/assets/xychartDiagram-2RQKCTM6-eU0cm1JE.js +7 -0
- package/dist/index.html +6 -2
- package/package.json +8 -3
- package/dist/assets/ChartRenderer-CJhkQxr5.js +0 -80
- package/dist/assets/SVGRenderer-BKs8t04X.js +0 -6
- package/dist/assets/architectureDiagram-3BPJPVTR-DNVUHp8X.js +0 -36
- package/dist/assets/c4Diagram-AAUBKEIU-jxm4Q2dz.js +0 -10
- package/dist/assets/channel-C0UHqIVM.js +0 -1
- package/dist/assets/chunk-727SXJPM-oH6pbgmY.js +0 -206
- package/dist/assets/chunk-AQP2D5EJ-BOAt4UHd.js +0 -231
- package/dist/assets/chunk-ND2GUHAM-EN-M7UQl.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-DK9l-Nt9.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-DK9l-Nt9.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DIz5r1WY.js +0 -1
- package/dist/assets/cytoscape.esm-CUqq0XTU.js +0 -331
- package/dist/assets/dagre-BM42HDAG-B1YowwH4.js +0 -4
- package/dist/assets/diagram-2AECGRRQ-CcxjYTez.js +0 -43
- package/dist/assets/diagram-5GNKFQAL-doHPj552.js +0 -10
- package/dist/assets/diagram-LMA3HP47-Bd9mEx4B.js +0 -24
- package/dist/assets/diagram-OG6HWLK6-B1eNiFKb.js +0 -24
- package/dist/assets/docx-preview-C6iSKpeJ.js +0 -38
- package/dist/assets/erDiagram-TEJ5UH35-DKCJg-lZ.js +0 -85
- package/dist/assets/ganttDiagram-6RSMTGT7-DV6bMXjj.js +0 -292
- package/dist/assets/gitGraphDiagram-PVQCEYII-MHD7foEN.js +0 -106
- package/dist/assets/graph-BlwPajkw.js +0 -1
- package/dist/assets/index-BNgJuX90.css +0 -1
- package/dist/assets/index-DSYvHtCG.js +0 -134
- package/dist/assets/index-d44-iZXq.js +0 -694
- package/dist/assets/infoDiagram-5YYISTIA-D17zY9os.js +0 -2
- package/dist/assets/isPrototype-D0troCl1.js +0 -1
- package/dist/assets/ishikawaDiagram-YF4QCWOH-DvpJL7SF.js +0 -70
- package/dist/assets/journeyDiagram-JHISSGLW-DkU2K_ZT.js +0 -139
- package/dist/assets/layout-Boy8vhSP.js +0 -1
- package/dist/assets/mindmap-definition-RKZ34NQL-hYEikaKe.js +0 -96
- package/dist/assets/papaparse.min-B9gzx6n-.js +0 -15
- package/dist/assets/quadrantDiagram-W4KKPZXB-BJ1xlVso.js +0 -7
- package/dist/assets/requirementDiagram-4Y6WPE33-5B_D-bcw.js +0 -84
- package/dist/assets/sankeyDiagram-5OEKKPKP-BE6dcD0u.js +0 -40
- package/dist/assets/sequenceDiagram-3UESZ5HK-B_mdzMvI.js +0 -162
- package/dist/assets/stateDiagram-AJRCARHV-Du3Wh5YU.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-ZxCn0EBw.js +0 -1
- package/dist/assets/timeline-definition-PNZ67QCA-CTz1MSU2.js +0 -120
- package/dist/assets/vennDiagram-CIIHVFJN-lIVzPmZZ.js +0 -34
- package/dist/assets/wardleyDiagram-YWT4CUSO-aSA1lZV1.js +0 -78
- package/dist/assets/xychartDiagram-2RQKCTM6-DPH3go07.js +0 -7
|
@@ -1,12 +1,12 @@
|
|
|
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{_ as er}from"./index-d44-iZXq.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=[`
|
|
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{_ as er}from"./vendor-syntax-Bg-E9hW_.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
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===`
|
|
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
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.
|
|
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
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
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
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:
|
|
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
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
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
12
|
|
|
@@ -32,7 +32,7 @@ ${JSON.stringify(y,null,4)}`);const N=y;if(r.string(N.id)||r.number(N.id)){const
|
|
|
32
32
|
|
|
33
33
|
`:y.error===void 0&&(D=`No result returned.
|
|
34
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(`
|
|
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
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
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
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`
|
|
@@ -43,7 +43,7 @@ ${JSON.stringify(y,null,4)}`);const N=y;if(r.string(N.id)||r.number(N.id)){const
|
|
|
43
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
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
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:
|
|
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
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
48
|
Complement Sets cannot be automatically optimized.
|
|
49
49
|
This will disable the lexer's first char optimizations.
|
|
@@ -142,11 +142,11 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
|
|
|
142
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
143
|
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
144
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,
|
|
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
146
|
<${e}> may appears as a prefix path in all these alternatives.
|
|
147
147
|
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
148
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}
|
|
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
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
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
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+=`
|