4010.345323a70bda079c0242.js 428 KB

1
  1. (self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[4010,5606],{83173:(e,t,n)=>{"use strict";n.d(t,{z:()=>g,H:()=>m});function r(e){return e.charCodeAt(0)}function i(e,t){if(Array.isArray(e)){e.forEach((function(e){t.push(e)}))}else{t.push(e)}}function s(e,t){if(e[t]===true){throw"duplicate flag "+t}const n=e[t];e[t]=true}function a(e){if(e===undefined){throw Error("Internal Error - Should never get here!")}return true}function o(){throw Error("Internal Error - Should never get here!")}function c(e){return e["type"]==="Character"}const l=[];for(let y=r("0");y<=r("9");y++){l.push(y)}const u=[r("_")].concat(l);for(let y=r("a");y<=r("z");y++){u.push(y)}for(let y=r("A");y<=r("Z");y++){u.push(y)}const f=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r(" "),r("\u2028"),r("\u2029"),r(" "),r(" "),r(" "),r("\ufeff")];const d=/[0-9a-fA-F]/;const p=/[0-9]/;const h=/[1-9]/;class m{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 t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:false,ignoreCase:false,multiLine:false,unicode:false,sticky:false};while(this.isRegExpFlag()){switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky");break}}if(this.idx!==this.input.length){throw Error("Redundant input: "+this.input.substring(this.idx))}return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[];const t=this.idx;e.push(this.alternative());while(this.peekChar()==="|"){this.consumeChar("|");e.push(this.alternative())}return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[];const t=this.idx;while(this.isTerm()){e.push(this.term())}return{type:"Alternative",value:e,loc:this.loc(t)}}term(){if(this.isAssertion()){return this.assertion()}else{return 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 t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}a(t);const n=this.disjunction();this.consumeChar(")");return{type:t,value:n,loc:this.loc(e)}}return o()}quantifier(e=false){let t=undefined;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:Infinity};break;case"+":t={atLeast:1,atMost:Infinity};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;if(this.isDigit()){e=this.integerIncludingZero();t={atLeast:n,atMost:e}}else{t={atLeast:n,atMost:Infinity}}this.consumeChar("}");break}if(e===true&&t===undefined){return undefined}a(t);break}if(e===true&&t===undefined){return undefined}if(a(t)){if(this.peekChar(0)==="?"){this.consumeChar("?");t.greedy=false}else{t.greedy=true}t.type="Quantifier";t.loc=this.loc(n);return t}}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===undefined&&this.isPatternCharacter()){e=this.patternCharacter()}if(a(e)){e.loc=this.loc(t);if(this.isQuantifier()){e.quantifier=this.quantifier()}return e}return o()}dotAll(){this.consumeChar(".");return{type:"Set",complement:true,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){this.consumeChar("\\");switch(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(){const e=this.positiveInteger();return{type:"GroupBackReference",value:e}}characterClassEscape(){let e;let t=false;switch(this.popChar()){case"d":e=l;break;case"D":e=l;t=true;break;case"s":e=f;break;case"S":e=f;t=true;break;case"w":e=u;break;case"W":e=u;t=true;break}if(a(e)){return{type:"Set",value:e,complement:t}}return o()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r("\f");break;case"n":e=r("\n");break;case"r":e=r("\r");break;case"t":e=r("\t");break;case"v":e=r("\v");break}if(a(e)){return{type:"Character",value:e}}return o()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===false){throw Error("Invalid ")}const t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}}nulCharacterAtom(){this.consumeChar("0");return{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){this.consumeChar("x");return this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){this.consumeChar("u");return this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:r(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:r(e)}}}characterClass(){const e=[];let t=false;this.consumeChar("[");if(this.peekChar(0)==="^"){this.consumeChar("^");t=true}while(this.isClassAtom()){const t=this.classAtom();const n=t.type==="Character";if(c(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();const s=n.type==="Character";if(c(n)){if(n.value<t.value){throw Error("Range out of order in character class")}e.push({from:t.value,to:n.value})}else{i(t.value,e);e.push(r("-"));i(n.value,e)}}else{i(t.value,e)}}this.consumeChar("]");return{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){this.consumeChar("\\");switch(this.peekChar()){case"b":this.consumeChar("b");return{type:"Character",value:r("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=true;this.consumeChar("(");switch(this.peekChar(0)){case"?":this.consumeChar("?");this.consumeChar(":");e=false;break;default:this.groupIdx++;break}const t=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:t};if(e){n["idx"]=this.groupIdx}return n}positiveInteger(){let e=this.popChar();if(h.test(e)===false){throw Error("Expecting a positive integer")}while(p.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(p.test(e)===false){throw Error("Expecting an integer")}while(p.test(this.peekChar(0))){e+=this.popChar()}return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:r(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return true;default:return false}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return p.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter()){return true}switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return true;default:return false}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return true;case"\\":switch(this.peekChar(1)){case"b":case"B":return true;default:return false}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return false}}isQuantifier(){const e=this.saveState();try{return this.quantifier(true)!==undefined}catch(t){return false}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return false;default:return true}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(d.test(e)===false){throw Error("Expecting a HexDecimal digits")}t+=e}const n=parseInt(t,16);return{type:"Character",value:n}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);this.consumeChar(undefined);return e}consumeChar(e){if(e!==undefined&&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}}}class g{visitChildren(e){for(const t in e){const n=e[t];if(e.hasOwnProperty(t)){if(n.type!==undefined){this.visit(n)}else if(Array.isArray(n)){n.forEach((e=>{this.visit(e)}),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){}}},69619:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}};var c={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function l(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.d$,c);t.ServiceRegistry.register(n);return{shared:t,GitGraph:n}}(0,r.K2)(l,"createGitGraphServices")},88451:(e,t,n)=>{"use strict";n.d(t,{d:()=>p});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}};var c=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/;var l=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,n){if(e.name==="NUMBER2"){return parseFloat(t.replace(/,/g,""))}else if(e.name==="SEPARATOR"){return t.substring(1,t.length-1)}else if(e.name==="STRING2"){return t.substring(1,t.length-1)}else if(e.name==="INDENTATION"){return t.length}else if(e.name==="ClassDef"){if(typeof t!=="string"){return t}const e=c.exec(t);if(e){return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}return void 0}};function u(e){const t=e.validation.TreemapValidator;const n=e.validation.ValidationRegistry;if(n){const e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}(0,r.K2)(u,"registerValidationChecks");var f=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let n;for(const r of e.TreemapRows){if(!r.item){continue}if(n===void 0&&r.indent===void 0){n=0}else if(r.indent===void 0){t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"})}else if(n!==void 0&&n>=parseInt(r.indent,10)){t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"})}}}};var d={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new l),"ValueConverter")},validation:{TreemapValidator:(0,r.K2)((()=>new f),"TreemapValidator")}};function p(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.XE,d);t.ServiceRegistry.register(n);u(n);return{shared:t,Treemap:n}}(0,r.K2)(p,"createTreemapServices")},57818:(e,t,n)=>{"use strict";n.d(t,{v:()=>l});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}};var c={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function l(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.FZ,c);t.ServiceRegistry.register(n);return{shared:t,Info:n}}(0,r.K2)(l,"createInfoServices")},79457:(e,t,n)=>{"use strict";n.d(t,{f:()=>u});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}};var c=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if(e.name!=="PIE_SECTION_LABEL"){return void 0}return t.replace(/"/g,"").trim()}};var l={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new c),"ValueConverter")}};function u(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.D_,l);t.ServiceRegistry.register(n);return{shared:t,Pie:n}}(0,r.K2)(u,"createPieServices")},58735:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}};var c={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function l(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.p5,c);t.ServiceRegistry.register(n);return{shared:t,Packet:n}}(0,r.K2)(l,"createPacketServices")},99246:(e,t,n)=>{"use strict";n.d(t,{mR:()=>He,dg:()=>We,wV:()=>Oe,Tm:()=>Ve,d$:()=>_e,FZ:()=>Me,sr:()=>Pe,p5:()=>Fe,D_:()=>Ue,Bg:()=>Ge,XE:()=>qe,K2:()=>g});var r=n(64032);var i=n(60180);var s=n(41281);var a=n(85684);var o=n(6052);var c=n(14247);const l={Grammar:()=>undefined,LanguageMetaData:()=>({caseInsensitive:false,fileExtensions:[".langium"],languageId:"langium"})};const u={AstReflection:()=>new a.QX};function f(){const e=(0,s.WQ)((0,i.u)(o.D),u);const t=(0,s.WQ)((0,i.t)({shared:e}),l);e.ServiceRegistry.register(t);return t}function d(e){const t=f();const n=t.serializer.JsonSerializer.deserialize(e);t.shared.workspace.LangiumDocumentFactory.fromModel(n,c.r.parse(`memory:/${n.name??"grammar"}.langium`));return n}var p=n(14480);var h=n(25355);var m=Object.defineProperty;var g=(e,t)=>m(e,"name",{value:t,configurable:true});var y;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[[\w ]+\]/}})(y||(y={}));var T;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(T||(T={}));var R;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(R||(R={}));var v;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(v||(v={}));var A;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(A||(A={}));var $;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})($||($={}));var E;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(E||(E={}));var k={...y.Terminals,...T.Terminals,...R.Terminals,...v.Terminals,...A.Terminals,...$.Terminals,...E.Terminals};var C={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function S(e){return de.isInstance(e,C.$type)}g(S,"isArchitecture");var x={$type:"Axis",label:"label",name:"name"};var w={$type:"Branch",name:"name",order:"order"};function N(e){return de.isInstance(e,w.$type)}g(N,"isBranch");var I={$type:"Checkout",branch:"branch"};var b={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"};var D={$type:"ClassDefStatement",className:"className",styleText:"styleText"};var L={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function P(e){return de.isInstance(e,L.$type)}g(P,"isCommit");var O={$type:"Curve",entries:"entries",label:"label",name:"name"};var _={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"};var M={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"};var F={$type:"Entry",axis:"axis",value:"value"};var U={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function G(e){return de.isInstance(e,U.$type)}g(G,"isGitGraph");var q={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"};var z={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function j(e){return de.isInstance(e,z.$type)}g(j,"isInfo");var K={$type:"Item",classSelector:"classSelector",name:"name"};var B={$type:"Junction",id:"id",in:"in"};var W={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"};var V={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function H(e){return de.isInstance(e,V.$type)}g(H,"isMerge");var Y={$type:"Option",name:"name",value:"value"};var X={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function Q(e){return de.isInstance(e,X.$type)}g(Q,"isPacket");var Z={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function J(e){return de.isInstance(e,Z.$type)}g(J,"isPacketBlock");var ee={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function te(e){return de.isInstance(e,ee.$type)}g(te,"isPie");var ne={$type:"PieSection",label:"label",value:"value"};function re(e){return de.isInstance(e,ne.$type)}g(re,"isPieSection");var ie={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"};var se={$type:"Section",classSelector:"classSelector",name:"name"};var ae={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"};var oe={$type:"Statement"};var ce={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function le(e){return de.isInstance(e,ce.$type)}g(le,"isTreemap");var ue={$type:"TreemapRow",indent:"indent",item:"item"};var fe=class extends r.kD{constructor(){super(...arguments);this.types={Architecture:{name:C.$type,properties:{accDescr:{name:C.accDescr},accTitle:{name:C.accTitle},edges:{name:C.edges,defaultValue:[]},groups:{name:C.groups,defaultValue:[]},junctions:{name:C.junctions,defaultValue:[]},services:{name:C.services,defaultValue:[]},title:{name:C.title}},superTypes:[]},Axis:{name:x.$type,properties:{label:{name:x.label},name:{name:x.name}},superTypes:[]},Branch:{name:w.$type,properties:{name:{name:w.name},order:{name:w.order}},superTypes:[oe.$type]},Checkout:{name:I.$type,properties:{branch:{name:I.branch}},superTypes:[oe.$type]},CherryPicking:{name:b.$type,properties:{id:{name:b.id},parent:{name:b.parent},tags:{name:b.tags,defaultValue:[]}},superTypes:[oe.$type]},ClassDefStatement:{name:D.$type,properties:{className:{name:D.className},styleText:{name:D.styleText}},superTypes:[]},Commit:{name:L.$type,properties:{id:{name:L.id},message:{name:L.message},tags:{name:L.tags,defaultValue:[]},type:{name:L.type}},superTypes:[oe.$type]},Curve:{name:O.$type,properties:{entries:{name:O.entries,defaultValue:[]},label:{name:O.label},name:{name:O.name}},superTypes:[]},Direction:{name:_.$type,properties:{accDescr:{name:_.accDescr},accTitle:{name:_.accTitle},dir:{name:_.dir},statements:{name:_.statements,defaultValue:[]},title:{name:_.title}},superTypes:[U.$type]},Edge:{name:M.$type,properties:{lhsDir:{name:M.lhsDir},lhsGroup:{name:M.lhsGroup,defaultValue:false},lhsId:{name:M.lhsId},lhsInto:{name:M.lhsInto,defaultValue:false},rhsDir:{name:M.rhsDir},rhsGroup:{name:M.rhsGroup,defaultValue:false},rhsId:{name:M.rhsId},rhsInto:{name:M.rhsInto,defaultValue:false},title:{name:M.title}},superTypes:[]},Entry:{name:F.$type,properties:{axis:{name:F.axis,referenceType:x.$type},value:{name:F.value}},superTypes:[]},GitGraph:{name:U.$type,properties:{accDescr:{name:U.accDescr},accTitle:{name:U.accTitle},statements:{name:U.statements,defaultValue:[]},title:{name:U.title}},superTypes:[]},Group:{name:q.$type,properties:{icon:{name:q.icon},id:{name:q.id},in:{name:q.in},title:{name:q.title}},superTypes:[]},Info:{name:z.$type,properties:{accDescr:{name:z.accDescr},accTitle:{name:z.accTitle},title:{name:z.title}},superTypes:[]},Item:{name:K.$type,properties:{classSelector:{name:K.classSelector},name:{name:K.name}},superTypes:[]},Junction:{name:B.$type,properties:{id:{name:B.id},in:{name:B.in}},superTypes:[]},Leaf:{name:W.$type,properties:{classSelector:{name:W.classSelector},name:{name:W.name},value:{name:W.value}},superTypes:[K.$type]},Merge:{name:V.$type,properties:{branch:{name:V.branch},id:{name:V.id},tags:{name:V.tags,defaultValue:[]},type:{name:V.type}},superTypes:[oe.$type]},Option:{name:Y.$type,properties:{name:{name:Y.name},value:{name:Y.value,defaultValue:false}},superTypes:[]},Packet:{name:X.$type,properties:{accDescr:{name:X.accDescr},accTitle:{name:X.accTitle},blocks:{name:X.blocks,defaultValue:[]},title:{name:X.title}},superTypes:[]},PacketBlock:{name:Z.$type,properties:{bits:{name:Z.bits},end:{name:Z.end},label:{name:Z.label},start:{name:Z.start}},superTypes:[]},Pie:{name:ee.$type,properties:{accDescr:{name:ee.accDescr},accTitle:{name:ee.accTitle},sections:{name:ee.sections,defaultValue:[]},showData:{name:ee.showData,defaultValue:false},title:{name:ee.title}},superTypes:[]},PieSection:{name:ne.$type,properties:{label:{name:ne.label},value:{name:ne.value}},superTypes:[]},Radar:{name:ie.$type,properties:{accDescr:{name:ie.accDescr},accTitle:{name:ie.accTitle},axes:{name:ie.axes,defaultValue:[]},curves:{name:ie.curves,defaultValue:[]},options:{name:ie.options,defaultValue:[]},title:{name:ie.title}},superTypes:[]},Section:{name:se.$type,properties:{classSelector:{name:se.classSelector},name:{name:se.name}},superTypes:[K.$type]},Service:{name:ae.$type,properties:{icon:{name:ae.icon},iconText:{name:ae.iconText},id:{name:ae.id},in:{name:ae.in},title:{name:ae.title}},superTypes:[]},Statement:{name:oe.$type,properties:{},superTypes:[]},Treemap:{name:ce.$type,properties:{accDescr:{name:ce.accDescr},accTitle:{name:ce.accTitle},title:{name:ce.title},TreemapRows:{name:ce.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:ue.$type,properties:{indent:{name:ue.indent},item:{name:ue.item}},superTypes:[]}}}static{g(this,"MermaidAstReflection")}};var de=new fe;var pe;var he=g((()=>pe??(pe=d(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`))),"ArchitectureGrammarGrammar");var me;var ge=g((()=>me??(me=d(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`))),"GitGraphGrammarGrammar");var ye;var Te=g((()=>ye??(ye=d(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`))),"InfoGrammarGrammar");var Re;var ve=g((()=>Re??(Re=d(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`))),"PacketGrammarGrammar");var Ae;var $e=g((()=>Ae??(Ae=d(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`))),"PieGrammarGrammar");var Ee;var ke=g((()=>Ee??(Ee=d(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`))),"RadarGrammarGrammar");var Ce;var Se=g((()=>Ce??(Ce=d(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`))),"TreemapGrammarGrammar");var xe={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var we={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var Ne={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var Ie={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var be={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var De={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var Le={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:false,mode:"production"};var Pe={AstReflection:g((()=>new fe),"AstReflection")};var Oe={Grammar:g((()=>he()),"Grammar"),LanguageMetaData:g((()=>xe),"LanguageMetaData"),parser:{}};var _e={Grammar:g((()=>ge()),"Grammar"),LanguageMetaData:g((()=>we),"LanguageMetaData"),parser:{}};var Me={Grammar:g((()=>Te()),"Grammar"),LanguageMetaData:g((()=>Ne),"LanguageMetaData"),parser:{}};var Fe={Grammar:g((()=>ve()),"Grammar"),LanguageMetaData:g((()=>Ie),"LanguageMetaData"),parser:{}};var Ue={Grammar:g((()=>$e()),"Grammar"),LanguageMetaData:g((()=>be),"LanguageMetaData"),parser:{}};var Ge={Grammar:g((()=>ke()),"Grammar"),LanguageMetaData:g((()=>De),"LanguageMetaData"),parser:{}};var qe={Grammar:g((()=>Se()),"Grammar"),LanguageMetaData:g((()=>Le),"LanguageMetaData"),parser:{}};var ze=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/;var je=/accTitle[\t ]*:([^\n\r]*)/;var Ke=/title([\t ][^\n\r]*|)/;var Be={ACC_DESCR:ze,ACC_TITLE:je,TITLE:Ke};var We=class extends p.d{static{g(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);if(r===void 0){r=this.runCustomConverter(e,t,n)}if(r===void 0){return super.runConverter(e,t,n)}return r}runCommonConverter(e,t,n){const r=Be[e.name];if(r===void 0){return void 0}const i=r.exec(t);if(i===null){return void 0}if(i[1]!==void 0){return i[1].trim().replace(/[\t ]{2,}/gm," ")}if(i[2]!==void 0){return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n")}return void 0}};var Ve=class extends We{static{g(this,"CommonValueConverter")}runCustomConverter(e,t,n){return void 0}};var He=class extends h.Q{static{g(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);r.forEach((e=>{if(this.keywords.has(e.name)&&e.PATTERN!==void 0){e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}}));return r}};var Ye=class extends He{static{g(this,"CommonTokenBuilder")}}},66788:(e,t,n)=>{"use strict";n.d(t,{f:()=>l});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}};var c={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function l(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.Bg,c);t.ServiceRegistry.register(n);return{shared:t,Radar:n}}(0,r.K2)(l,"createRadarServices")},93804:(e,t,n)=>{"use strict";n.d(t,{S:()=>u});var r=n(99246);var i=n(6052);var s=n(41281);var a=n(60180);var o=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}};var c=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){if(e.name==="ARCH_ICON"){return t.replace(/[()]/g,"").trim()}else if(e.name==="ARCH_TEXT_ICON"){return t.replace(/["()]/g,"")}else if(e.name==="ARCH_TITLE"){return t.replace(/[[\]]/g,"").trim()}return void 0}};var l={parser:{TokenBuilder:(0,r.K2)((()=>new o),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new c),"ValueConverter")}};function u(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr);const n=(0,s.WQ)((0,a.t)({shared:t}),r.wV,l);t.ServiceRegistry.register(n);return{shared:t,Architecture:n}}(0,r.K2)(u,"createArchitectureServices")},24010:(e,t,n)=>{"use strict";n.d(t,{qg:()=>p});var r=n(69619);var i=n(57818);var s=n(58735);var a=n(79457);var o=n(93804);var c=n(66788);var l=n(88451);var u=n(99246);var f={};var d={info:(0,u.K2)((async()=>{const{createInfoServices:e}=await n.e(3411).then(n.bind(n,3411));const t=e().Info.parser.LangiumParser;f.info=t}),"info"),packet:(0,u.K2)((async()=>{const{createPacketServices:e}=await n.e(9322).then(n.bind(n,49322));const t=e().Packet.parser.LangiumParser;f.packet=t}),"packet"),pie:(0,u.K2)((async()=>{const{createPieServices:e}=await n.e(50).then(n.bind(n,30050));const t=e().Pie.parser.LangiumParser;f.pie=t}),"pie"),architecture:(0,u.K2)((async()=>{const{createArchitectureServices:e}=await n.e(2310).then(n.bind(n,2310));const t=e().Architecture.parser.LangiumParser;f.architecture=t}),"architecture"),gitGraph:(0,u.K2)((async()=>{const{createGitGraphServices:e}=await n.e(3378).then(n.bind(n,3378));const t=e().GitGraph.parser.LangiumParser;f.gitGraph=t}),"gitGraph"),radar:(0,u.K2)((async()=>{const{createRadarServices:e}=await n.e(18).then(n.bind(n,40018));const t=e().Radar.parser.LangiumParser;f.radar=t}),"radar"),treemap:(0,u.K2)((async()=>{const{createTreemapServices:e}=await n.e(6053).then(n.bind(n,76053));const t=e().Treemap.parser.LangiumParser;f.treemap=t}),"treemap")};async function p(e,t){const n=d[e];if(!n){throw new Error(`Unknown diagram type: ${e}`)}if(!f[e]){await n()}const r=f[e];const i=r.parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0){throw new h(i)}return i.value}(0,u.K2)(p,"parse");var h=class extends Error{constructor(e){const t=e.lexerErrors.map((e=>e.message)).join("\n");const n=e.parserErrors.map((e=>e.message)).join("\n");super(`Parsing failed: ${t} ${n}`);this.result=e}static{(0,u.K2)(this,"MermaidParseError")}}},50450:(e,t,n)=>{"use strict";n.d(t,{ak:()=>J,mT:()=>Fs,LT:()=>ar,jr:()=>qs,T6:()=>Qi,JG:()=>Bn,wL:()=>B,c$:()=>H,Y2:()=>Q,$P:()=>Y,Cy:()=>X,Pp:()=>Z,BK:()=>ee,PW:()=>zn,my:()=>lr,jk:()=>Gr,Sk:()=>Wn,G:()=>cr});var r=n(69769);var i=n(44882);var s=n(74650);var a=n(8937);var o=n(2850);var c=n(97134);function l(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}r();r();if(true)return e;(0,eval)(e)}function u(e,t,n){var r=-1,i=e.length;if(t<0){t=-t>i?0:i+t}n=n>i?i:n;if(n<0){n+=i}i=t>n?0:n-t>>>0;t>>>=0;var s=Array(i);while(++r<i){s[r]=e[r+t]}return s}const f=u;var d=n(29914);function p(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,d.A)(t);return f(e,t<0?0:t,r)}const h=p;var m=n(86378);var g=n(16542);var y=n(376);var T=n(56280);var R=n(21585);var v=n(690);var A=n(37947);var $=Object.prototype;var E=$.hasOwnProperty;var k=(0,T.A)((function(e,t){if((0,v.A)(t)||(0,R.A)(t)){(0,y.A)(t,(0,A.A)(t),e);return}for(var n in t){if(E.call(t,n)){(0,g.A)(e,n,t[n])}}}));const C=k;var S=n(98519);var x=n(1121);var w=n(44835);var N=n(37138);function I(e,t){if(e==null){return{}}var n=(0,S.A)((0,N.A)(e),(function(e){return[e]}));t=(0,x.A)(t);return(0,w.A)(e,n,(function(e,n){return t(e,n[0])}))}const b=I;var D=n(64128);var L=n(53315);var P="[object RegExp]";function O(e){return(0,L.A)(e)&&(0,D.A)(e)==P}const _=O;var M=n(26132);var F=n(89986);var U=F.A&&F.A.isRegExp;var G=U?(0,M.A)(U):_;const q=G;function z(e){if(j(e)){return e.LABEL}else{return e.name}}function j(e){return(0,m.A)(e.LABEL)&&e.LABEL!==""}class K{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this);(0,r.A)(this.definition,(t=>{t.accept(e)}))}}class B extends K{constructor(e){super([]);this.idx=1;C(this,b(e,(e=>e!==undefined)))}set definition(e){}get definition(){if(this.referencedRule!==undefined){return this.referencedRule.definition}return[]}accept(e){e.visit(this)}}class W extends K{constructor(e){super(e.definition);this.orgText="";C(this,b(e,(e=>e!==undefined)))}}class V extends K{constructor(e){super(e.definition);this.ignoreAmbiguities=false;C(this,b(e,(e=>e!==undefined)))}}class H extends K{constructor(e){super(e.definition);this.idx=1;C(this,b(e,(e=>e!==undefined)))}}class Y extends K{constructor(e){super(e.definition);this.idx=1;C(this,b(e,(e=>e!==undefined)))}}class X extends K{constructor(e){super(e.definition);this.idx=1;C(this,b(e,(e=>e!==undefined)))}}class Q extends K{constructor(e){super(e.definition);this.idx=1;C(this,b(e,(e=>e!==undefined)))}}class Z extends K{constructor(e){super(e.definition);this.idx=1;C(this,b(e,(e=>e!==undefined)))}}class J extends K{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition);this.idx=1;this.ignoreAmbiguities=false;this.hasPredicates=false;C(this,b(e,(e=>e!==undefined)))}}class ee{constructor(e){this.idx=1;C(this,b(e,(e=>e!==undefined)))}accept(e){e.visit(this)}}function te(e){return(0,a.A)(e,ne)}function ne(e){function t(e){return(0,a.A)(e,ne)}if(e instanceof B){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if((0,m.A)(e.label)){t.label=e.label}return t}else if(e instanceof V){return{type:"Alternative",definition:t(e.definition)}}else if(e instanceof H){return{type:"Option",idx:e.idx,definition:t(e.definition)}}else if(e instanceof Y){return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)}}else if(e instanceof X){return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:ne(new ee({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Z){return{type:"RepetitionWithSeparator",idx:e.idx,separator:ne(new ee({terminalType:e.separator})),definition:t(e.definition)}}else if(e instanceof Q){return{type:"Repetition",idx:e.idx,definition:t(e.definition)}}else if(e instanceof J){return{type:"Alternation",idx:e.idx,definition:t(e.definition)}}else if(e instanceof ee){const t={type:"Terminal",name:e.terminalType.name,label:z(e.terminalType),idx:e.idx};if((0,m.A)(e.label)){t.terminalLabel=e.label}const n=e.terminalType.PATTERN;if(e.terminalType.PATTERN){t.pattern=q(n)?n.source:n}return t}else if(e instanceof W){return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)}}else{throw Error("non exhaustive match")}}class re{visit(e){const t=e;switch(t.constructor){case B:return this.visitNonTerminal(t);case V:return this.visitAlternative(t);case H:return this.visitOption(t);case Y:return this.visitRepetitionMandatory(t);case X:return this.visitRepetitionMandatoryWithSeparator(t);case Z:return this.visitRepetitionWithSeparator(t);case Q:return this.visitRepetition(t);case J:return this.visitAlternation(t);case ee:return this.visitTerminal(t);case W:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var ie=n(95345);var se=n(15912);function ae(e,t){var n;(0,se.A)(e,(function(e,r,i){n=t(e,r,i);return!n}));return!!n}const oe=ae;var ce=n(39990);var le=n(31943);function ue(e,t,n){var r=(0,ce.A)(e)?ie.A:oe;if(n&&(0,le.A)(e,t,n)){t=undefined}return r(e,(0,x.A)(t,3))}const fe=ue;var de=n(54949);var pe=Math.max;function he(e,t,n,r){e=(0,R.A)(e)?e:(0,i.A)(e);n=n&&!r?(0,d.A)(n):0;var s=e.length;if(n<0){n=pe(s+n,0)}return(0,m.A)(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&(0,de.A)(e,t,n)>-1}const me=he;function ge(e,t){var n=-1,r=e==null?0:e.length;while(++n<r){if(!t(e[n],n,e)){return false}}return true}const ye=ge;function Te(e,t){var n=true;(0,se.A)(e,(function(e,r,i){n=!!t(e,r,i);return n}));return n}const Re=Te;function ve(e,t,n){var r=(0,ce.A)(e)?ye:Re;if(n&&(0,le.A)(e,t,n)){t=undefined}return r(e,(0,x.A)(t,3))}const Ae=ve;function $e(e){return e instanceof V||e instanceof H||e instanceof Q||e instanceof Y||e instanceof X||e instanceof Z||e instanceof ee||e instanceof W}function Ee(e,t=[]){const n=e instanceof H||e instanceof Q||e instanceof Z;if(n){return true}if(e instanceof J){return fe(e.definition,(e=>Ee(e,t)))}else if(e instanceof B&&me(t,e)){return false}else if(e instanceof K){if(e instanceof B){t.push(e)}return Ae(e.definition,(e=>Ee(e,t)))}else{return false}}function ke(e){return e instanceof J}function Ce(e){if(e instanceof B){return"SUBRULE"}else if(e instanceof H){return"OPTION"}else if(e instanceof J){return"OR"}else if(e instanceof Y){return"AT_LEAST_ONE"}else if(e instanceof X){return"AT_LEAST_ONE_SEP"}else if(e instanceof Z){return"MANY_SEP"}else if(e instanceof Q){return"MANY"}else if(e instanceof ee){return"CONSUME"}else{throw Error("non exhaustive match")}}class Se{walk(e,t=[]){(0,r.A)(e.definition,((n,r)=>{const i=h(e.definition,r+1);if(n instanceof B){this.walkProdRef(n,i,t)}else if(n instanceof ee){this.walkTerminal(n,i,t)}else if(n instanceof V){this.walkFlat(n,i,t)}else if(n instanceof H){this.walkOption(n,i,t)}else if(n instanceof Y){this.walkAtLeastOne(n,i,t)}else if(n instanceof X){this.walkAtLeastOneSep(n,i,t)}else if(n instanceof Z){this.walkManySep(n,i,t)}else if(n instanceof Q){this.walkMany(n,i,t)}else if(n instanceof J){this.walkOr(n,i,t)}else{throw Error("non exhaustive match")}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new H({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=xe(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new H({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=xe(e,t,n);this.walk(e,r)}walkOr(e,t,n){const i=t.concat(n);(0,r.A)(e.definition,(e=>{const t=new V({definition:[e]});this.walk(t,i)}))}}function xe(e,t,n){const r=[new H({definition:[new ee({terminalType:e.separator})].concat(e.definition)})];const i=r.concat(t,n);return i}var we=n(19363);function Ne(e){return e&&e.length?(0,we.A)(e):[]}const Ie=Ne;var be=n(74033);function De(e){if(e instanceof B){return De(e.referencedRule)}else if(e instanceof ee){return Oe(e)}else if($e(e)){return Le(e)}else if(ke(e)){return Pe(e)}else{throw Error("non exhaustive match")}}function Le(e){let t=[];const n=e.definition;let r=0;let i=n.length>r;let s;let a=true;while(i&&a){s=n[r];a=Ee(s);t=t.concat(De(s));r=r+1;i=n.length>r}return Ie(t)}function Pe(e){const t=(0,a.A)(e.definition,(e=>De(e)));return Ie((0,be.A)(t))}function Oe(e){return[e.terminalType]}const _e="_~IN~_";class Me extends Se{constructor(e){super();this.topProd=e;this.follows={}}startWalking(){this.walk(this.topProd);return this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=Ue(e.referencedRule,e.idx)+this.topProd.name;const i=t.concat(n);const s=new V({definition:i});const a=De(s);this.follows[r]=a}}function Fe(e){const t={};(0,r.A)(e,(e=>{const n=new Me(e).startWalking();C(t,n)}));return t}function Ue(e,t){return e.name+t+_e}function Ge(e){const t=e.terminalType.name;return t+e.idx+IN}var qe=n(89523);var ze=n(83173);var je=n(38693);var Ke=n(89191);var Be=n(64725);var We="Expected a function";function Ve(e){if(typeof e!="function"){throw new TypeError(We)}return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}const He=Ve;function Ye(e,t){var n=(0,ce.A)(e)?Ke.A:Be.A;return n(e,He((0,x.A)(t,3)))}const Xe=Ye;var Qe=n(58807);var Ze=Math.max;function Je(e,t,n){var r=e==null?0:e.length;if(!r){return-1}var i=n==null?0:(0,d.A)(n);if(i<0){i=Ze(r+i,0)}return(0,de.A)(e,t,i)}const et=Je;var tt=n(65339);var nt=n(97133);var rt=n(63344);var it=n(43212);var st=n(7348);var at=n(4832);var ot=200;function ct(e,t,n,r){var i=-1,s=it.A,a=true,o=e.length,c=[],l=t.length;if(!o){return c}if(n){t=(0,S.A)(t,(0,M.A)(n))}if(r){s=st.A;a=false}else if(t.length>=ot){s=at.A;a=false;t=new rt.A(t)}e:while(++i<o){var u=e[i],f=n==null?u:n(u);u=r||u!==0?u:0;if(a&&f===f){var d=l;while(d--){if(t[d]===f){continue e}}c.push(u)}else if(!s(t,f,r)){c.push(u)}}return c}const lt=ct;var ut=n(62040);var ft=n(55881);var dt=n(10654);var pt=(0,ft.A)((function(e,t){return(0,dt.A)(e)?lt(e,(0,ut.A)(t,1,dt.A,true)):[]}));const ht=pt;function mt(e){var t=-1,n=e==null?0:e.length,r=0,i=[];while(++t<n){var s=e[t];if(s){i[r++]=s}}return i}const gt=mt;function yt(e){return e&&e.length?e[0]:undefined}const Tt=yt;var Rt=n(85075);function vt(e){if(console&&console.error){console.error(`Error: ${e}`)}}function At(e){if(console&&console.warn){console.warn(`Warning: ${e}`)}}let $t={};const Et=new ze.H;function kt(e){const t=e.toString();if($t.hasOwnProperty(t)){return $t[t]}else{const e=Et.pattern(t);$t[t]=e;return e}}function Ct(){$t={}}const St="Complement Sets are not supported for first char optimization";const xt='Unable to use "first char" lexer optimizations:\n';function wt(e,t=false){try{const t=kt(e);const n=Nt(t.value,{},t.flags.ignoreCase);return n}catch(n){if(n.message===St){if(t){At(`${xt}`+`\tUnable to optimize: < ${e.toString()} >\n`+"\tComplement Sets cannot be automatically optimized.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.")}}else{let n="";if(t){n="\n\tThis will disable the lexer's first char optimizations.\n"+"\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."}vt(`${xt}\n`+`\tFailed parsing: < ${e.toString()} >\n`+`\tUsing the @chevrotain/regexp-to-ast library\n`+"\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues"+n)}}return[]}function Nt(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r<e.value.length;r++){Nt(e.value[r],t,n)}break;case"Alternative":const i=e.value;for(let e=0;e<i.length;e++){const s=i[e];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const a=s;switch(a.type){case"Character":It(a.value,t,n);break;case"Set":if(a.complement===true){throw Error(St)}(0,r.A)(a.value,(e=>{if(typeof e==="number"){It(e,t,n)}else{const r=e;if(n===true){for(let e=r.from;e<=r.to;e++){It(e,t,n)}}else{for(let e=r.from;e<=r.to&&e<Rn;e++){It(e,t,n)}if(r.to>=Rn){const e=r.from>=Rn?r.from:Rn;const n=r.to;const i=An(e);const s=An(n);for(let r=i;r<=s;r++){t[r]=r}}}}}));break;case"Group":Nt(a.value,t,n);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==undefined&&a.quantifier.atLeast===0;if(a.type==="Group"&&Lt(a)===false||a.type!=="Group"&&o===false){break}}break;default:throw Error("non exhaustive match!")}return(0,i.A)(t)}function It(e,t,n){const r=An(e);t[r]=r;if(n===true){bt(e,t)}}function bt(e,t){const n=String.fromCharCode(e);const r=n.toUpperCase();if(r!==n){const e=An(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=An(e.charCodeAt(0));t[n]=n}}}function Dt(e,t){return(0,Rt.A)(e.value,(e=>{if(typeof e==="number"){return me(t,e)}else{const n=e;return(0,Rt.A)(t,(e=>n.from<=e&&e<=n.to))!==undefined}}))}function Lt(e){const t=e.quantifier;if(t&&t.atLeast===0){return true}if(!e.value){return false}return(0,ce.A)(e.value)?Ae(e.value,Lt):Lt(e.value)}class Pt extends ze.z{constructor(e){super();this.targetCharCodes=e;this.found=false}visitChildren(e){if(this.found===true){return}switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}visitCharacter(e){if(me(this.targetCharCodes,e.value)){this.found=true}}visitSet(e){if(e.complement){if(Dt(e,this.targetCharCodes)===undefined){this.found=true}}else{if(Dt(e,this.targetCharCodes)!==undefined){this.found=true}}}}function Ot(e,t){if(t instanceof RegExp){const n=kt(t);const r=new Pt(e);r.visit(n);return r.found}else{return(0,Rt.A)(t,(t=>me(e,t.charCodeAt(0))))!==undefined}}const _t="PATTERN";const Mt="defaultMode";const Ft="modes";let Ut=typeof new RegExp("(?:)").sticky==="boolean";function Gt(){Ut=false}function qt(){Ut=true}function zt(e,t){t=(0,je.A)(t,{useSticky:Ut,debug:false,safeMode:false,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()});const n=t.tracer;n("initCharCodeToOptimizedIndexMap",(()=>{$n()}));let i;n("Reject Lexer.NA",(()=>{i=Xe(e,(e=>e[_t]===Bn.NA))}));let c=false;let l;n("Transform Patterns",(()=>{c=false;l=(0,a.A)(i,(e=>{const n=e[_t];if(q(n)){const e=n.source;if(e.length===1&&e!=="^"&&e!=="$"&&e!=="."&&!n.ignoreCase){return e}else if(e.length===2&&e[0]==="\\"&&!me(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])){return e[1]}else{return t.useSticky?cn(n):on(n)}}else if((0,Qe.A)(n)){c=true;return{exec:n}}else if(typeof n==="object"){c=true;return n}else if(typeof n==="string"){if(n.length===1){return n}else{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");const r=new RegExp(e);return t.useSticky?cn(r):on(r)}}else{throw Error("non exhaustive match")}}))}));let u;let f;let d;let p;let h;n("misc mapping",(()=>{u=(0,a.A)(i,(e=>e.tokenTypeIdx));f=(0,a.A)(i,(e=>{const t=e.GROUP;if(t===Bn.SKIPPED){return undefined}else if((0,m.A)(t)){return t}else if((0,qe.A)(t)){return false}else{throw Error("non exhaustive match")}}));d=(0,a.A)(i,(e=>{const t=e.LONGER_ALT;if(t){const e=(0,ce.A)(t)?(0,a.A)(t,(e=>et(i,e))):[et(i,t)];return e}}));p=(0,a.A)(i,(e=>e.PUSH_MODE));h=(0,a.A)(i,(e=>(0,o.A)(e,"POP_MODE")))}));let g;n("Line Terminator Handling",(()=>{const e=yn(t.lineTerminatorCharacters);g=(0,a.A)(i,(e=>false));if(t.positionTracking!=="onlyOffset"){g=(0,a.A)(i,(t=>{if((0,o.A)(t,"LINE_BREAKS")){return!!t.LINE_BREAKS}else{return mn(t,e)===false&&Ot(e,t.PATTERN)}}))}}));let y;let T;let R;let v;n("Misc Mapping #2",(()=>{y=(0,a.A)(i,dn);T=(0,a.A)(l,pn);R=(0,tt.A)(i,((e,t)=>{const n=t.GROUP;if((0,m.A)(n)&&!(n===Bn.SKIPPED)){e[n]=[]}return e}),{});v=(0,a.A)(l,((e,t)=>({pattern:l[t],longerAlt:d[t],canLineTerminator:g[t],isCustom:y[t],short:T[t],group:f[t],push:p[t],pop:h[t],tokenTypeIdx:u[t],tokenType:i[t]})))}));let A=true;let $=[];if(!t.safeMode){n("First Char Optimization",(()=>{$=(0,tt.A)(i,((e,n,i)=>{if(typeof n.PATTERN==="string"){const t=n.PATTERN.charCodeAt(0);const r=An(t);Tn(e,r,v[i])}else if((0,ce.A)(n.START_CHARS_HINT)){let t;(0,r.A)(n.START_CHARS_HINT,(n=>{const r=typeof n==="string"?n.charCodeAt(0):n;const s=An(r);if(t!==s){t=s;Tn(e,s,v[i])}}))}else if(q(n.PATTERN)){if(n.PATTERN.unicode){A=false;if(t.ensureOptimizations){vt(`${xt}`+`\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n`+"\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n"+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE")}}else{const a=wt(n.PATTERN,t.ensureOptimizations);if((0,s.A)(a)){A=false}(0,r.A)(a,(t=>{Tn(e,t,v[i])}))}}else{if(t.ensureOptimizations){vt(`${xt}`+`\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n`+"\tThis will disable the lexer's first char optimizations.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE")}A=false}return e}),[])}))}return{emptyGroups:R,patternIdxToConfig:v,charCodeToPatternIdxToConfig:$,hasCustom:c,canBeOptimized:A}}function jt(e,t){let n=[];const r=Bt(e);n=n.concat(r.errors);const i=Wt(r.valid);const s=i.valid;n=n.concat(i.errors);n=n.concat(Kt(s));n=n.concat(en(s));n=n.concat(tn(s,t));n=n.concat(nn(s));return n}function Kt(e){let t=[];const n=(0,nt.A)(e,(e=>q(e[_t])));t=t.concat(Ht(n));t=t.concat(Qt(n));t=t.concat(Zt(n));t=t.concat(Jt(n));t=t.concat(Yt(n));return t}function Bt(e){const t=(0,nt.A)(e,(e=>!(0,o.A)(e,_t)));const n=(0,a.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:jn.MISSING_PATTERN,tokenTypes:[e]})));const r=ht(e,t);return{errors:n,valid:r}}function Wt(e){const t=(0,nt.A)(e,(e=>{const t=e[_t];return!q(t)&&!(0,Qe.A)(t)&&!(0,o.A)(t,"exec")&&!(0,m.A)(t)}));const n=(0,a.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a"+" Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:jn.INVALID_PATTERN,tokenTypes:[e]})));const r=ht(e,t);return{errors:n,valid:r}}const Vt=/[^\\][$]/;function Ht(e){class t extends ze.z{constructor(){super(...arguments);this.found=false}visitEndAnchor(e){this.found=true}}const n=(0,nt.A)(e,(e=>{const n=e.PATTERN;try{const e=kt(n);const r=new t;r.visit(e);return r.found}catch(r){return Vt.test(n.source)}}));const r=(0,a.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n"+"\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:jn.EOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Yt(e){const t=(0,nt.A)(e,(e=>{const t=e.PATTERN;return t.test("")}));const n=(0,a.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:jn.EMPTY_MATCH_PATTERN,tokenTypes:[e]})));return n}const Xt=/[^\\[][\^]|^\^/;function Qt(e){class t extends ze.z{constructor(){super(...arguments);this.found=false}visitStartAnchor(e){this.found=true}}const n=(0,nt.A)(e,(e=>{const n=e.PATTERN;try{const e=kt(n);const r=new t;r.visit(e);return r.found}catch(r){return Xt.test(n.source)}}));const r=(0,a.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n"+"\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS"+"\tfor details.",type:jn.SOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}function Zt(e){const t=(0,nt.A)(e,(e=>{const t=e[_t];return t instanceof RegExp&&(t.multiline||t.global)}));const n=(0,a.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:jn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})));return n}function Jt(e){const t=[];let n=(0,a.A)(e,(n=>(0,tt.A)(e,((e,r)=>{if(n.PATTERN.source===r.PATTERN.source&&!me(t,r)&&r.PATTERN!==Bn.NA){t.push(r);e.push(r);return e}return e}),[])));n=gt(n);const r=(0,nt.A)(n,(e=>e.length>1));const i=(0,a.A)(r,(e=>{const t=(0,a.A)(e,(e=>e.name));const n=Tt(e).PATTERN;return{message:`The same RegExp pattern ->${n}<-`+`has been used in all of the following Token Types: ${t.join(", ")} <-`,type:jn.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}function en(e){const t=(0,nt.A)(e,(e=>{if(!(0,o.A)(e,"GROUP")){return false}const t=e.GROUP;return t!==Bn.SKIPPED&&t!==Bn.NA&&!(0,m.A)(t)}));const n=(0,a.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:jn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})));return n}function tn(e,t){const n=(0,nt.A)(e,(e=>e.PUSH_MODE!==undefined&&!me(t,e.PUSH_MODE)));const r=(0,a.A)(n,(e=>{const t=`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-`+`which does not exist`;return{message:t,type:jn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function nn(e){const t=[];const n=(0,tt.A)(e,((e,t,n)=>{const r=t.PATTERN;if(r===Bn.NA){return e}if((0,m.A)(r)){e.push({str:r,idx:n,tokenType:t})}else if(q(r)&&sn(r)){e.push({str:r.source,idx:n,tokenType:t})}return e}),[]);(0,r.A)(e,((e,i)=>{(0,r.A)(n,(({str:n,idx:r,tokenType:s})=>{if(i<r&&rn(n,e.PATTERN)){const n=`Token: ->${s.name}<- can never be matched.\n`+`Because it appears AFTER the Token Type ->${e.name}<-`+`in the lexer's definition.\n`+`See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:jn.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))}));return t}function rn(e,t){if(q(t)){if(an(t)){return false}const n=t.exec(e);return n!==null&&n.index===0}else if((0,Qe.A)(t)){return t(e,0,[],{})}else if((0,o.A)(t,"exec")){return t.exec(e,0,[],{})}else if(typeof t==="string"){return t===e}else{throw Error("non exhaustive match")}}function sn(e){const t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Rt.A)(t,(t=>e.source.indexOf(t)!==-1))===undefined}function an(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function on(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function cn(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function ln(e,t,n){const i=[];if(!(0,o.A)(e,Mt)){i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Mt+"> property in its definition\n",type:jn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE})}if(!(0,o.A)(e,Ft)){i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ft+"> property in its definition\n",type:jn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY})}if((0,o.A)(e,Ft)&&(0,o.A)(e,Mt)&&!(0,o.A)(e.modes,e.defaultMode)){i.push({message:`A MultiMode Lexer cannot be initialized with a ${Mt}: <${e.defaultMode}>`+`which does not exist\n`,type:jn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST})}if((0,o.A)(e,Ft)){(0,r.A)(e.modes,((e,t)=>{(0,r.A)(e,((n,s)=>{if((0,qe.A)(n)){i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:`+`<${t}> at index: <${s}>\n`,type:jn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}else if((0,o.A)(n,"LONGER_ALT")){const s=(0,ce.A)(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT];(0,r.A)(s,(r=>{if(!(0,qe.A)(r)&&!me(e,r)){i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${r.name}> on token <${n.name}> outside of mode <${t}>\n`,type:jn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}}))}}))}))}return i}function un(e,t,n){const s=[];let a=false;const c=gt((0,be.A)((0,i.A)(e.modes)));const l=Xe(c,(e=>e[_t]===Bn.NA));const u=yn(n);if(t){(0,r.A)(l,(e=>{const t=mn(e,u);if(t!==false){const n=gn(e,t);const r={message:n,type:t.issue,tokenType:e};s.push(r)}else{if((0,o.A)(e,"LINE_BREAKS")){if(e.LINE_BREAKS===true){a=true}}else{if(Ot(u,e.PATTERN)){a=true}}}}))}if(t&&!a){s.push({message:"Warning: No LINE_BREAKS Found.\n"+"\tThis Lexer has been defined to track line and column information,\n"+"\tBut none of the Token Types can be identified as matching a line terminator.\n"+"\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n"+"\tfor details.",type:jn.NO_LINE_BREAKS_FLAGS})}return s}function fn(e){const t={};const n=(0,A.A)(e);(0,r.A)(n,(n=>{const r=e[n];if((0,ce.A)(r)){t[n]=[]}else{throw Error("non exhaustive match")}}));return t}function dn(e){const t=e.PATTERN;if(q(t)){return false}else if((0,Qe.A)(t)){return true}else if((0,o.A)(t,"exec")){return true}else if((0,m.A)(t)){return false}else{throw Error("non exhaustive match")}}function pn(e){if((0,m.A)(e)&&e.length===1){return e.charCodeAt(0)}else{return false}}const hn={test:function(e){const t=e.length;for(let n=this.lastIndex;n<t;n++){const t=e.charCodeAt(n);if(t===10){this.lastIndex=n+1;return true}else if(t===13){if(e.charCodeAt(n+1)===10){this.lastIndex=n+2}else{this.lastIndex=n+1}return true}}return false},lastIndex:0};function mn(e,t){if((0,o.A)(e,"LINE_BREAKS")){return false}else{if(q(e.PATTERN)){try{Ot(t,e.PATTERN)}catch(n){return{issue:jn.IDENTIFY_TERMINATOR,errMsg:n.message}}return false}else if((0,m.A)(e.PATTERN)){return false}else if(dn(e)){return{issue:jn.CUSTOM_LINE_BREAK}}else{throw Error("non exhaustive match")}}}function gn(e,t){if(t.issue===jn.IDENTIFY_TERMINATOR){return"Warning: unable to identify line terminator usage in pattern.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+`\t Root cause: ${t.errMsg}.\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR"}else if(t.issue===jn.CUSTOM_LINE_BREAK){return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n"+`\tThe problem is in the <${e.name}> Token Type\n`+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK"}else{throw Error("non exhaustive match")}}function yn(e){const t=(0,a.A)(e,(e=>{if((0,m.A)(e)){return e.charCodeAt(0)}else{return e}}));return t}function Tn(e,t,n){if(e[t]===undefined){e[t]=[n]}else{e[t].push(n)}}const Rn=256;let vn=[];function An(e){return e<Rn?e:vn[e]}function $n(){if((0,s.A)(vn)){vn=new Array(65536);for(let e=0;e<65536;e++){vn[e]=e>255?255+~~(e/255):e}}}var En=n(63077);var kn=n(42111);var Cn=n(80359);function Sn(e){const t=(new Date).getTime();const n=e();const r=(new Date).getTime();const i=r-t;return{time:i,value:n}}function xn(e,t){const n=e.tokenTypeIdx;if(n===t.tokenTypeIdx){return true}else{return t.isParent===true&&t.categoryMatchesMap[n]===true}}function wn(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}let Nn=1;const In={};function bn(e){const t=Dn(e);Ln(t);On(t);Pn(t);(0,r.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function Dn(e){let t=(0,c.A)(e);let n=e;let r=true;while(r){n=gt((0,be.A)((0,a.A)(n,(e=>e.CATEGORIES))));const e=ht(n,t);t=t.concat(e);if((0,s.A)(e)){r=false}else{n=e}}return t}function Ln(e){(0,r.A)(e,(e=>{if(!Mn(e)){In[Nn]=e;e.tokenTypeIdx=Nn++}if(Fn(e)&&!(0,ce.A)(e.CATEGORIES)){e.CATEGORIES=[e.CATEGORIES]}if(!Fn(e)){e.CATEGORIES=[]}if(!Un(e)){e.categoryMatches=[]}if(!Gn(e)){e.categoryMatchesMap={}}}))}function Pn(e){(0,r.A)(e,(e=>{e.categoryMatches=[];(0,r.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(In[n].tokenTypeIdx)}))}))}function On(e){(0,r.A)(e,(e=>{_n([],e)}))}function _n(e,t){(0,r.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=true}));(0,r.A)(t.CATEGORIES,(n=>{const r=e.concat(t);if(!me(r,n)){_n(r,n)}}))}function Mn(e){return(0,o.A)(e,"tokenTypeIdx")}function Fn(e){return(0,o.A)(e,"CATEGORIES")}function Un(e){return(0,o.A)(e,"categoryMatches")}function Gn(e){return(0,o.A)(e,"categoryMatchesMap")}function qn(e){return(0,o.A)(e,"tokenTypeIdx")}const zn={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t},`+` skipped ${n} characters.`}};var jn;(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN";e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN";e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND";e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND";e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND";e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND";e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST";e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE";e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY";e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST";e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED";e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND";e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN";e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS";e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN";e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR";e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK";e[e["MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"]=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(jn||(jn={}));const Kn={deferDefinitionErrorsHandling:false,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:false,safeMode:false,errorMessageProvider:zn,traceInitPerf:false,skipValidations:false,recoveryEnabled:true};Object.freeze(Kn);class Bn{constructor(e,t=Kn){this.lexerDefinition=e;this.lexerDefinitionErrors=[];this.lexerDefinitionWarning=[];this.patternIdxToConfig={};this.charCodeToPatternIdxToConfig={};this.modes=[];this.emptyGroups={};this.trackStartLines=true;this.trackEndLines=true;this.hasCustom=false;this.canModeBeOptimized={};this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Sn(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}};if(typeof t==="boolean"){throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\n"+"a boolean 2nd argument is no longer supported")}this.config=C({},Kn,t);const n=this.config.traceInitPerf;if(n===true){this.traceInitMaxIdent=Infinity;this.traceInitPerf=true}else if(typeof n==="number"){this.traceInitMaxIdent=n;this.traceInitPerf=true}this.traceInitIndent=-1;this.TRACE_INIT("Lexer Constructor",(()=>{let n;let i=true;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===Kn.lineTerminatorsPattern){this.config.lineTerminatorsPattern=hn}else{if(this.config.lineTerminatorCharacters===Kn.lineTerminatorCharacters){throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n"+"\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS")}}if(t.safeMode&&t.ensureOptimizations){throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.')}this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking);this.trackEndLines=/full/i.test(this.config.positionTracking);if((0,ce.A)(e)){n={modes:{defaultMode:(0,c.A)(e)},defaultMode:Mt}}else{i=false;n=(0,c.A)(e)}}));if(this.config.skipValidations===false){this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ln(n,this.trackStartLines,this.config.lineTerminatorCharacters))}));this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(un(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))}n.modes=n.modes?n.modes:{};(0,r.A)(n.modes,((e,t)=>{n.modes[t]=Xe(e,(e=>(0,qe.A)(e)))}));const o=(0,A.A)(n.modes);(0,r.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{this.modes.push(n);if(this.config.skipValidations===false){this.TRACE_INIT(`validatePatterns`,(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jt(e,o))}))}if((0,s.A)(this.lexerDefinitionErrors)){bn(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,(()=>{r=zt(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}));this.patternIdxToConfig[n]=r.patternIdxToConfig;this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig;this.emptyGroups=C({},this.emptyGroups,r.emptyGroups);this.hasCustom=r.hasCustom||this.hasCustom;this.canModeBeOptimized[n]=r.canBeOptimized}}))}));this.defaultMode=n.defaultMode;if(!(0,s.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,a.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}(0,r.A)(this.lexerDefinitionWarning,(e=>{At(e.message)}));this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(Ut){this.chopInput=En.A;this.match=this.matchWithTest}else{this.updateLastIndex=kn.A;this.match=this.matchWithExec}if(i){this.handleModes=kn.A}if(this.trackStartLines===false){this.computeNewColumn=En.A}if(this.trackEndLines===false){this.updateTokenEndLineColumnLocation=kn.A}if(/full/i.test(this.config.positionTracking)){this.createTokenInstance=this.createFullToken}else if(/onlyStart/i.test(this.config.positionTracking)){this.createTokenInstance=this.createStartOnlyToken}else if(/onlyOffset/i.test(this.config.positionTracking)){this.createTokenInstance=this.createOffsetOnlyToken}else{throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`)}if(this.hasCustom){this.addToken=this.addTokenUsingPush;this.handlePayload=this.handlePayloadWithCustom}else{this.addToken=this.addTokenUsingMemberAccess;this.handlePayload=this.handlePayloadNoCustom}}));this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,tt.A)(this.canModeBeOptimized,((e,t,n)=>{if(t===false){e.push(n)}return e}),[]);if(t.ensureOptimizations&&!(0,s.A)(e)){throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n`+'\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n'+"\t Or inspect the console log for details on how to resolve these issues.")}}));this.TRACE_INIT("clearRegExpParserCache",(()=>{Ct()}));this.TRACE_INIT("toFastProperties",(()=>{l(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,s.A)(this.lexerDefinitionErrors)){const e=(0,a.A)(this.lexerDefinitionErrors,(e=>e.message));const t=e.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,c,l,u,f,d,p,h,m,g,y;const T=e;const R=T.length;let v=0;let A=0;const $=this.hasCustom?0:Math.floor(e.length/10);const E=new Array($);const k=[];let C=this.trackStartLines?1:undefined;let S=this.trackStartLines?1:undefined;const x=fn(this.emptyGroups);const w=this.trackStartLines;const N=this.config.lineTerminatorsPattern;let I=0;let b=[];let D=[];const L=[];const P=[];Object.freeze(P);let O;function _(){return b}function M(e){const t=An(e);const n=D[t];if(n===undefined){return P}else{return n}}const F=e=>{if(L.length===1&&e.tokenType.PUSH_MODE===undefined){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);k.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{L.pop();const e=(0,Cn.A)(L);b=this.patternIdxToConfig[e];D=this.charCodeToPatternIdxToConfig[e];I=b.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(D&&t){O=M}else{O=_}}};function U(e){L.push(e);D=this.charCodeToPatternIdxToConfig[e];b=this.patternIdxToConfig[e];I=b.length;I=b.length;const t=this.canModeBeOptimized[e]&&this.config.safeMode===false;if(D&&t){O=M}else{O=_}}U.call(this,t);let G;const q=this.config.recoveryEnabled;while(v<R){o=null;const t=T.charCodeAt(v);const m=O(t);const $=m.length;for(n=0;n<$;n++){G=m[n];const r=G.pattern;c=null;const u=G.short;if(u!==false){if(t===u){o=r}}else if(G.isCustom===true){y=r.exec(T,v,E,x);if(y!==null){o=y[0];if(y.payload!==undefined){c=y.payload}}else{o=null}}else{this.updateLastIndex(r,v);o=this.match(r,e,v)}if(o!==null){a=G.longerAlt;if(a!==undefined){const t=a.length;for(i=0;i<t;i++){const t=b[a[i]];const n=t.pattern;l=null;if(t.isCustom===true){y=n.exec(T,v,E,x);if(y!==null){s=y[0];if(y.payload!==undefined){l=y.payload}}else{s=null}}else{this.updateLastIndex(n,v);s=this.match(n,e,v)}if(s&&s.length>o.length){o=s;c=l;G=t;break}}}break}}if(o!==null){u=o.length;f=G.group;if(f!==undefined){d=G.tokenTypeIdx;p=this.createTokenInstance(o,v,d,G.tokenType,C,S,u);this.handlePayload(p,c);if(f===false){A=this.addToken(E,A,p)}else{x[f].push(p)}}e=this.chopInput(e,u);v=v+u;S=this.computeNewColumn(S,u);if(w===true&&G.canLineTerminator===true){let e=0;let t;let n;N.lastIndex=0;do{t=N.test(o);if(t===true){n=N.lastIndex-1;e++}}while(t===true);if(e!==0){C=C+e;S=u-n;this.updateTokenEndLineColumnLocation(p,f,n,e,C,S,u)}}this.handleModes(G,F,U,p)}else{const t=v;const n=C;const i=S;let s=q===false;while(s===false&&v<R){e=this.chopInput(e,1);v++;for(r=0;r<I;r++){const t=b[r];const n=t.pattern;const i=t.short;if(i!==false){if(T.charCodeAt(v)===i){s=true}}else if(t.isCustom===true){s=n.exec(T,v,E,x)!==null}else{this.updateLastIndex(n,v);s=n.exec(e)!==null}if(s===true){break}}}h=v-t;S=this.computeNewColumn(S,h);g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(T,t,h,n,i,(0,Cn.A)(L));k.push({offset:t,line:n,column:i,length:h,message:g});if(q===false){break}}}if(!this.hasCustom){E.length=A}return{tokens:E,groups:x,errors:k}}handleModes(e,t,n,r){if(e.pop===true){const i=e.push;t(r);if(i!==undefined){n.call(this,i)}}else if(e.push!==undefined){n.call(this,e.push)}}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,n,r,i,s,a){let o,c;if(t!==undefined){o=n===a-1;c=o?-1:0;if(!(r===1&&o===true)){e.endLine=i+c;e.endColumn=s-1+-c}}}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,s,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:i,endLine:i,startColumn:s,endColumn:s+a-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){e.push(n);return t}addTokenUsingMemberAccess(e,t,n){e[t]=n;t++;return t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){if(t!==null){e.payload=t}}matchWithTest(e,t,n){const r=e.test(t);if(r===true){return t.substring(n,e.lastIndex)}return null}matchWithExec(e,t){const n=e.exec(t);return n!==null?n[0]:null}}Bn.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will "+"be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";Bn.NA=/NOT_APPLICABLE/;function Wn(e){if(Hn(e)){return e.LABEL}else{return e.name}}function Vn(e){return e.name}function Hn(e){return(0,m.A)(e.LABEL)&&e.LABEL!==""}const Yn="parent";const Xn="categories";const Qn="label";const Zn="group";const Jn="push_mode";const er="pop_mode";const tr="longer_alt";const nr="line_breaks";const rr="start_chars_hint";function ir(e){return sr(e)}function sr(e){const t=e.pattern;const n={};n.name=e.name;if(!(0,qe.A)(t)){n.PATTERN=t}if((0,o.A)(e,Yn)){throw"The parent property is no longer supported.\n"+"See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details."}if((0,o.A)(e,Xn)){n.CATEGORIES=e[Xn]}bn([n]);if((0,o.A)(e,Qn)){n.LABEL=e[Qn]}if((0,o.A)(e,Zn)){n.GROUP=e[Zn]}if((0,o.A)(e,er)){n.POP_MODE=e[er]}if((0,o.A)(e,Jn)){n.PUSH_MODE=e[Jn]}if((0,o.A)(e,tr)){n.LONGER_ALT=e[tr]}if((0,o.A)(e,nr)){n.LINE_BREAKS=e[nr]}if((0,o.A)(e,rr)){n.START_CHARS_HINT=e[rr]}return n}const ar=ir({name:"EOF",pattern:Bn.NA});bn([ar]);function or(e,t,n,r,i,s,a,o){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:a,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function cr(e,t){return xn(e,t)}const lr={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){const i=Hn(e);const s=i?`--\x3e ${Wn(e)} <--`:`token of type --\x3e ${e.name} <--`;const a=`Expecting ${s} but found --\x3e '${t.image}' <--`;return a},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ";const o=Tt(t).image;const c="\nbut found: '"+o+"'";if(r){return s+r+c}else{const t=(0,tt.A)(e,((e,t)=>e.concat(t)),[]);const n=(0,a.A)(t,(e=>`[${(0,a.A)(e,(e=>Wn(e))).join(", ")}]`));const r=(0,a.A)(n,((e,t)=>` ${t+1}. ${e}`));const i=`one of these possible Token sequences:\n${r.join("\n")}`;return s+i+c}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ";const s=Tt(t).image;const o="\nbut found: '"+s+"'";if(n){return i+n+o}else{const t=(0,a.A)(e,(e=>`[${(0,a.A)(e,(e=>Wn(e))).join(",")}]`));const n=`expecting at least one iteration which starts with one of these possible Token sequences::\n `+`<${t.join(" ,")}>`;return i+n+o}}};Object.freeze(lr);const ur={buildRuleNotFoundError(e,t){const n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\n"+"inside top level rule: ->"+e.name+"<-";return n}};const fr={buildDuplicateFoundError(e,t){function n(e){if(e instanceof ee){return e.terminalType.name}else if(e instanceof B){return e.nonTerminalName}else{return""}}const r=e.name;const i=Tt(t);const s=i.idx;const a=Ce(i);const o=n(i);const c=s>0;let l=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;l=l.replace(/[ \t]+/g," ");l=l.replace(/\s\s+/g,"\n");return l},buildNamespaceConflictError(e){const t=`Namespace conflict found in grammar.\n`+`The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\n`+`To resolve this make sure each Terminal and Non-Terminal names are unique\n`+`This is easy to accomplish by using the convention that Terminal names start with an uppercase letter\n`+`and Non-Terminal names start with a lower case letter.`;return t},buildAlternationPrefixAmbiguityError(e){const t=(0,a.A)(e.prefixPath,(e=>Wn(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;const r=`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\n`+`in <OR${n}> inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\n`+`For Further details.`;return r},buildAlternationAmbiguityError(e){const t=(0,a.A)(e.prefixPath,(e=>Wn(e))).join(", ");const n=e.alternation.idx===0?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r},buildEmptyRepetitionError(e){let t=Ce(e.repetition);if(e.repetition.idx!==0){t+=e.repetition.idx}const n=`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\n`+`This could lead to an infinite loop.`;return n},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){const t=`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}>`+` in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n`+`Only the last alternative may be an empty alternative.`;return t},buildTooManyAlternativesError(e){const t=`An Alternation cannot have more than 256 alternatives:\n`+`<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`;return t},buildLeftRecursionError(e){const t=e.topLevelRule.name;const n=(0,a.A)(e.leftRecursionPath,(e=>e.name));const r=`${t} --\x3e ${n.concat([t]).join(" --\x3e ")}`;const i=`Left Recursion found in grammar.\n`+`rule: <${t}> can be invoked from itself (directly or indirectly)\n`+`without consuming any Tokens. The grammar path that causes this is: \n ${r}\n`+` To fix this refactor your grammar to remove the left recursion.\n`+`see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;return i},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;if(e.topLevelRule instanceof W){t=e.topLevelRule.name}else{t=e.topLevelRule}const n=`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;return n}};function dr(e,t){const n=new pr(e,t);n.resolveRefs();return n.errors}class pr extends re{constructor(e,t){super();this.nameToTopRule=e;this.errMsgProvider=t;this.errors=[]}resolveRefs(){(0,r.A)((0,i.A)(this.nameToTopRule),(e=>{this.currTopLevel=e;e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(!t){const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Ms.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}else{e.referencedRule=t}}}var hr=n(57852);var mr=n(48657);function gr(e,t,n,r){var i=-1,s=e==null?0:e.length;while(++i<s){var a=e[i];t(r,a,n(a),e)}return r}const yr=gr;function Tr(e,t,n,r){(0,se.A)(e,(function(e,i,s){t(r,e,n(e),s)}));return r}const Rr=Tr;function vr(e,t){return function(n,r){var i=(0,ce.A)(n)?yr:Rr,s=t?t():{};return i(n,e,(0,x.A)(r,2),s)}}const Ar=vr;var $r=Object.prototype;var Er=$r.hasOwnProperty;var kr=Ar((function(e,t,n){if(Er.call(e,n)){e[n].push(t)}else{(0,mr.A)(e,n,[t])}}));const Cr=kr;function Sr(e,t,n){var r=e==null?0:e.length;if(!r){return[]}t=n||t===undefined?1:(0,d.A)(t);t=r-t;return f(e,0,t<0?0:t)}const xr=Sr;class wr extends Se{constructor(e,t){super();this.topProd=e;this.path=t;this.possibleTokTypes=[];this.nextProductionName="";this.nextProductionOccurrence=0;this.found=false;this.isAtEndOfPath=false}startWalking(){this.found=false;if(this.path.ruleStack[0]!==this.topProd.name){throw Error("The path does not start with the walker's top Rule!")}this.ruleStack=(0,c.A)(this.path.ruleStack).reverse();this.occurrenceStack=(0,c.A)(this.path.occurrenceStack).reverse();this.ruleStack.pop();this.occurrenceStack.pop();this.updateExpectedNext();this.walk(this.topProd);return this.possibleTokTypes}walk(e,t=[]){if(!this.found){super.walk(e,t)}}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext();this.walk(e.referencedRule,r)}}updateExpectedNext(){if((0,s.A)(this.ruleStack)){this.nextProductionName="";this.nextProductionOccurrence=0;this.isAtEndOfPath=true}else{this.nextProductionName=this.ruleStack.pop();this.nextProductionOccurrence=this.occurrenceStack.pop()}}}class Nr extends wr{constructor(e,t){super(e,t);this.path=t;this.nextTerminalName="";this.nextTerminalOccurrence=0;this.nextTerminalName=this.path.lastTok.name;this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n);const r=new V({definition:e});this.possibleTokTypes=De(r);this.found=true}}}class Ir extends Se{constructor(e,t){super();this.topRule=e;this.occurrence=t;this.result={token:undefined,occurrence:undefined,isEndOfRule:undefined}}startWalking(){this.walk(this.topRule);return this.result}}class br extends Ir{walkMany(e,t,n){if(e.idx===this.occurrence){const e=Tt(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof ee){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkMany(e,t,n)}}}class Dr extends Ir{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=Tt(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof ee){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkManySep(e,t,n)}}}class Lr extends Ir{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=Tt(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof ee){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOne(e,t,n)}}}class Pr extends Ir{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=Tt(t.concat(n));this.result.isEndOfRule=e===undefined;if(e instanceof ee){this.result.token=e.terminalType;this.result.occurrence=e.idx}}else{super.walkAtLeastOneSep(e,t,n)}}}function Or(e,t,n=[]){n=(0,c.A)(n);let i=[];let a=0;function o(t){return t.concat(h(e,a+1))}function l(e){const r=Or(o(e),t,n);return i.concat(r)}while(n.length<t&&a<e.length){const t=e[a];if(t instanceof V){return l(t.definition)}else if(t instanceof B){return l(t.definition)}else if(t instanceof H){i=l(t.definition)}else if(t instanceof Y){const e=t.definition.concat([new Q({definition:t.definition})]);return l(e)}else if(t instanceof X){const e=[new V({definition:t.definition}),new Q({definition:[new ee({terminalType:t.separator})].concat(t.definition)})];return l(e)}else if(t instanceof Z){const e=t.definition.concat([new Q({definition:[new ee({terminalType:t.separator})].concat(t.definition)})]);i=l(e)}else if(t instanceof Q){const e=t.definition.concat([new Q({definition:t.definition})]);i=l(e)}else if(t instanceof J){(0,r.A)(t.definition,(e=>{if((0,s.A)(e.definition)===false){i=l(e.definition)}}));return i}else if(t instanceof ee){n.push(t.terminalType)}else{throw Error("non exhaustive match")}a++}i.push({partialPath:n,suffixDef:h(e,a)});return i}function _r(e,t,n,r){const i="EXIT_NONE_TERMINAL";const a=[i];const o="EXIT_ALTERNATIVE";let l=false;const u=t.length;const f=u-r-1;const d=[];const p=[];p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!(0,s.A)(p)){const e=p.pop();if(e===o){if(l&&(0,Cn.A)(p).idx<=f){p.pop()}continue}const r=e.def;const m=e.idx;const g=e.ruleStack;const y=e.occurrenceStack;if((0,s.A)(r)){continue}const T=r[0];if(T===i){const e={idx:m,def:h(r),ruleStack:xr(g),occurrenceStack:xr(y)};p.push(e)}else if(T instanceof ee){if(m<u-1){const e=m+1;const i=t[e];if(n(i,T.terminalType)){const t={idx:e,def:h(r),ruleStack:g,occurrenceStack:y};p.push(t)}}else if(m===u-1){d.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:g,occurrenceStack:y});l=true}else{throw Error("non exhaustive match")}}else if(T instanceof B){const e=(0,c.A)(g);e.push(T.nonTerminalName);const t=(0,c.A)(y);t.push(T.idx);const n={idx:m,def:T.definition.concat(a,h(r)),ruleStack:e,occurrenceStack:t};p.push(n)}else if(T instanceof H){const e={idx:m,def:h(r),ruleStack:g,occurrenceStack:y};p.push(e);p.push(o);const t={idx:m,def:T.definition.concat(h(r)),ruleStack:g,occurrenceStack:y};p.push(t)}else if(T instanceof Y){const e=new Q({definition:T.definition,idx:T.idx});const t=T.definition.concat([e],h(r));const n={idx:m,def:t,ruleStack:g,occurrenceStack:y};p.push(n)}else if(T instanceof X){const e=new ee({terminalType:T.separator});const t=new Q({definition:[e].concat(T.definition),idx:T.idx});const n=T.definition.concat([t],h(r));const i={idx:m,def:n,ruleStack:g,occurrenceStack:y};p.push(i)}else if(T instanceof Z){const e={idx:m,def:h(r),ruleStack:g,occurrenceStack:y};p.push(e);p.push(o);const t=new ee({terminalType:T.separator});const n=new Q({definition:[t].concat(T.definition),idx:T.idx});const i=T.definition.concat([n],h(r));const s={idx:m,def:i,ruleStack:g,occurrenceStack:y};p.push(s)}else if(T instanceof Q){const e={idx:m,def:h(r),ruleStack:g,occurrenceStack:y};p.push(e);p.push(o);const t=new Q({definition:T.definition,idx:T.idx});const n=T.definition.concat([t],h(r));const i={idx:m,def:n,ruleStack:g,occurrenceStack:y};p.push(i)}else if(T instanceof J){for(let e=T.definition.length-1;e>=0;e--){const t=T.definition[e];const n={idx:m,def:t.definition.concat(h(r)),ruleStack:g,occurrenceStack:y};p.push(n);p.push(o)}}else if(T instanceof V){p.push({idx:m,def:T.definition.concat(h(r)),ruleStack:g,occurrenceStack:y})}else if(T instanceof W){p.push(Mr(T,m,g,y))}else{throw Error("non exhaustive match")}}return d}function Mr(e,t,n,r){const i=(0,c.A)(n);i.push(e.name);const s=(0,c.A)(r);s.push(1);return{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Fr;(function(e){e[e["OPTION"]=0]="OPTION";e[e["REPETITION"]=1]="REPETITION";e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY";e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR";e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR";e[e["ALTERNATION"]=5]="ALTERNATION"})(Fr||(Fr={}));function Ur(e){if(e instanceof H||e==="Option"){return Fr.OPTION}else if(e instanceof Q||e==="Repetition"){return Fr.REPETITION}else if(e instanceof Y||e==="RepetitionMandatory"){return Fr.REPETITION_MANDATORY}else if(e instanceof X||e==="RepetitionMandatoryWithSeparator"){return Fr.REPETITION_MANDATORY_WITH_SEPARATOR}else if(e instanceof Z||e==="RepetitionWithSeparator"){return Fr.REPETITION_WITH_SEPARATOR}else if(e instanceof J||e==="Alternation"){return Fr.ALTERNATION}else{throw Error("non exhaustive match")}}function Gr(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e;const s=Ur(r);if(s===Fr.ALTERNATION){return Qr(t,n,i)}else{return Zr(t,n,s,i)}}function qr(e,t,n,r,i,s){const a=Qr(e,t,n);const o=ti(a)?wn:xn;return s(a,r,o,i)}function zr(e,t,n,r,i,s){const a=Zr(e,t,i,n);const o=ti(a)?wn:xn;return s(a[0],o,r)}function jr(e,t,n,i){const s=e.length;const c=Ae(e,(e=>Ae(e,(e=>e.length===1))));if(t){return function(t){const r=(0,a.A)(t,(e=>e.GATE));for(let i=0;i<s;i++){const t=e[i];const s=t.length;const a=r[i];if(a!==undefined&&a.call(this)===false){continue}e:for(let e=0;e<s;e++){const r=t[e];const s=r.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(n(t,r[e])===false){continue e}}return i}}return undefined}}else if(c&&!i){const t=(0,a.A)(e,(e=>(0,be.A)(e)));const n=(0,tt.A)(t,((e,t,n)=>{(0,r.A)(t,(t=>{if(!(0,o.A)(e,t.tokenTypeIdx)){e[t.tokenTypeIdx]=n}(0,r.A)(t.categoryMatches,(t=>{if(!(0,o.A)(e,t)){e[t]=n}}))}));return e}),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}else{return function(){for(let t=0;t<s;t++){const r=e[t];const i=r.length;e:for(let e=0;e<i;e++){const i=r[e];const s=i.length;for(let e=0;e<s;e++){const t=this.LA(e+1);if(n(t,i[e])===false){continue e}}return t}}return undefined}}}function Kr(e,t,n){const i=Ae(e,(e=>e.length===1));const a=e.length;if(i&&!n){const t=(0,be.A)(e);if(t.length===1&&(0,s.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,tt.A)(t,((e,t,n)=>{e[t.tokenTypeIdx]=true;(0,r.A)(t.categoryMatches,(t=>{e[t]=true}));return e}),[]);return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}else{return function(){e:for(let n=0;n<a;n++){const r=e[n];const i=r.length;for(let e=0;e<i;e++){const n=this.LA(e+1);if(t(n,r[e])===false){continue e}}return true}return false}}}class Br extends Se{constructor(e,t,n){super();this.topProd=e;this.targetOccurrence=t;this.targetProdType=n}startWalking(){this.walk(this.topProd);return this.restDef}checkIsTarget(e,t,n,r){if(e.idx===this.targetOccurrence&&this.targetProdType===t){this.restDef=n.concat(r);return true}return false}walkOption(e,t,n){if(!this.checkIsTarget(e,Fr.OPTION,t,n)){super.walkOption(e,t,n)}}walkAtLeastOne(e,t,n){if(!this.checkIsTarget(e,Fr.REPETITION_MANDATORY,t,n)){super.walkOption(e,t,n)}}walkAtLeastOneSep(e,t,n){if(!this.checkIsTarget(e,Fr.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}walkMany(e,t,n){if(!this.checkIsTarget(e,Fr.REPETITION,t,n)){super.walkOption(e,t,n)}}walkManySep(e,t,n){if(!this.checkIsTarget(e,Fr.REPETITION_WITH_SEPARATOR,t,n)){super.walkOption(e,t,n)}}}class Wr extends re{constructor(e,t,n){super();this.targetOccurrence=e;this.targetProdType=t;this.targetRef=n;this.result=[]}checkIsTarget(e,t){if(e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===undefined||e===this.targetRef)){this.result=e.definition}}visitOption(e){this.checkIsTarget(e,Fr.OPTION)}visitRepetition(e){this.checkIsTarget(e,Fr.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Fr.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Fr.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Fr.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Fr.ALTERNATION)}}function Vr(e){const t=new Array(e);for(let n=0;n<e;n++){t[n]=[]}return t}function Hr(e){let t=[""];for(let n=0;n<e.length;n++){const r=e[n];const i=[];for(let e=0;e<t.length;e++){const n=t[e];i.push(n+"_"+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){const t="_"+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function Yr(e,t,n){for(let r=0;r<e.length;r++){if(r===n){continue}const i=e[r];for(let e=0;e<t.length;e++){const n=t[e];if(i[n]===true){return false}}}return true}function Xr(e,t){const n=(0,a.A)(e,(e=>Or([e],1)));const i=Vr(n.length);const o=(0,a.A)(n,(e=>{const t={};(0,r.A)(e,(e=>{const n=Hr(e.partialPath);(0,r.A)(n,(e=>{t[e]=true}))}));return t}));let c=n;for(let a=1;a<=t;a++){const e=c;c=Vr(e.length);for(let n=0;n<e.length;n++){const l=e[n];for(let e=0;e<l.length;e++){const u=l[e].partialPath;const f=l[e].suffixDef;const d=Hr(u);const p=Yr(o,d,n);if(p||(0,s.A)(f)||u.length===t){const e=i[n];if(Jr(e,u)===false){e.push(u);for(let e=0;e<d.length;e++){const t=d[e];o[n][t]=true}}}else{const e=Or(f,a+1,u);c[n]=c[n].concat(e);(0,r.A)(e,(e=>{const t=Hr(e.partialPath);(0,r.A)(t,(e=>{o[n][e]=true}))}))}}}}return i}function Qr(e,t,n,r){const i=new Wr(e,Fr.ALTERNATION,r);t.accept(i);return Xr(i.result,n)}function Zr(e,t,n,r){const i=new Wr(e,n);t.accept(i);const s=i.result;const a=new Br(t,e,n);const o=a.startWalking();const c=new V({definition:s});const l=new V({definition:o});return Xr([c,l],r)}function Jr(e,t){e:for(let n=0;n<e.length;n++){const r=e[n];if(r.length!==t.length){continue}for(let e=0;e<r.length;e++){const n=t[e];const i=r[e];const s=n===i||i.categoryMatchesMap[n.tokenTypeIdx]!==undefined;if(s===false){continue e}}return true}return false}function ei(e,t){return e.length<t.length&&Ae(e,((e,n)=>{const r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function ti(e){return Ae(e,(e=>Ae(e,(e=>Ae(e,(e=>(0,s.A)(e.categoryMatches)))))))}function ni(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,a.A)(t,(e=>Object.assign({type:Ms.CUSTOM_LOOKAHEAD_VALIDATION},e)))}function ri(e,t,n,r){const i=(0,hr.A)(e,(e=>ii(e,n)));const s=vi(e,t,n);const a=(0,hr.A)(e,(e=>gi(e,n)));const o=(0,hr.A)(e,(t=>ci(t,e,r,n)));return i.concat(s,a,o)}function ii(e,t){const n=new oi;e.accept(n);const r=n.allProductions;const s=Cr(r,si);const o=b(s,(e=>e.length>1));const c=(0,a.A)((0,i.A)(o),(n=>{const r=Tt(n);const i=t.buildDuplicateFoundError(e,n);const s=Ce(r);const a={message:i,type:Ms.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx};const o=ai(r);if(o){a.parameter=o}return a}));return c}function si(e){return`${Ce(e)}_#_${e.idx}_#_${ai(e)}`}function ai(e){if(e instanceof ee){return e.terminalType.name}else if(e instanceof B){return e.nonTerminalName}else{return""}}class oi extends re{constructor(){super(...arguments);this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function ci(e,t,n,r){const i=[];const s=(0,tt.A)(t,((t,n)=>{if(n.name===e.name){return t+1}return t}),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Ms.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function li(e,t,n){const r=[];let i;if(!me(t,e)){i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-`+`as it is not defined in any of the super grammars `;r.push({message:i,type:Ms.INVALID_RULE_OVERRIDE,ruleName:e})}return r}function ui(e,t,n,r=[]){const i=[];const a=fi(t.definition);if((0,s.A)(a)){return[]}else{const t=e.name;const s=me(a,e);if(s){i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Ms.LEFT_RECURSION,ruleName:t})}const o=ht(a,r.concat([e]));const l=(0,hr.A)(o,(t=>{const i=(0,c.A)(r);i.push(t);return ui(e,t,n,i)}));return i.concat(l)}}function fi(e){let t=[];if((0,s.A)(e)){return t}const n=Tt(e);if(n instanceof B){t.push(n.referencedRule)}else if(n instanceof V||n instanceof H||n instanceof Y||n instanceof X||n instanceof Z||n instanceof Q){t=t.concat(fi(n.definition))}else if(n instanceof J){t=(0,be.A)((0,a.A)(n.definition,(e=>fi(e.definition))))}else if(n instanceof ee){}else{throw Error("non exhaustive match")}const r=Ee(n);const i=e.length>1;if(r&&i){const n=h(e);return t.concat(fi(n))}else{return t}}class di extends re{constructor(){super(...arguments);this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function pi(e,t){const n=new di;e.accept(n);const r=n.alternations;const i=(0,hr.A)(r,(n=>{const r=xr(n.definition);return(0,hr.A)(r,((r,i)=>{const a=_r([r],[],xn,1);if((0,s.A)(a)){return[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Ms.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]}else{return[]}}))}));return i}function hi(e,t,n){const r=new di;e.accept(r);let i=r.alternations;i=Xe(i,(e=>e.ignoreAmbiguities===true));const s=(0,hr.A)(i,(r=>{const i=r.idx;const s=r.maxLookahead||t;const a=Qr(i,e,s,r);const o=Ti(a,r,e,n);const c=Ri(a,r,e,n);return o.concat(c)}));return s}class mi extends re{constructor(){super(...arguments);this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function gi(e,t){const n=new di;e.accept(n);const r=n.alternations;const i=(0,hr.A)(r,(n=>{if(n.definition.length>255){return[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Ms.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]}else{return[]}}));return i}function yi(e,t,n){const i=[];(0,r.A)(e,(e=>{const a=new mi;e.accept(a);const o=a.allProductions;(0,r.A)(o,(r=>{const a=Ur(r);const o=r.maxLookahead||t;const c=r.idx;const l=Zr(c,e,a,o);const u=l[0];if((0,s.A)((0,be.A)(u))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:r});i.push({message:t,type:Ms.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))}));return i}function Ti(e,t,n,i){const s=[];const o=(0,tt.A)(e,((n,i,a)=>{if(t.definition[a].ignoreAmbiguities===true){return n}(0,r.A)(i,(i=>{const o=[a];(0,r.A)(e,((e,n)=>{if(a!==n&&Jr(e,i)&&t.definition[n].ignoreAmbiguities!==true){o.push(n)}}));if(o.length>1&&!Jr(s,i)){s.push(i);n.push({alts:o,path:i})}}));return n}),[]);const c=(0,a.A)(o,(e=>{const r=(0,a.A)(e.alts,(e=>e+1));const s=i.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path});return{message:s,type:Ms.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}));return c}function Ri(e,t,n,r){const i=(0,tt.A)(e,((e,t,n)=>{const r=(0,a.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);const s=gt((0,hr.A)(i,(e=>{const s=t.definition[e.idx];if(s.ignoreAmbiguities===true){return[]}const o=e.idx;const c=e.path;const l=(0,nt.A)(i,(e=>t.definition[e.idx].ignoreAmbiguities!==true&&e.idx<o&&ei(e.path,c)));const u=(0,a.A)(l,(e=>{const i=[e.idx+1,o+1];const s=t.idx===0?"":t.idx;const a=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:a,type:Ms.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));return u})));return s}function vi(e,t,n){const i=[];const s=(0,a.A)(t,(e=>e.name));(0,r.A)(e,(e=>{const t=e.name;if(me(s,t)){const r=n.buildNamespaceConflictError(e);i.push({message:r,type:Ms.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}));return i}function Ai(e){const t=(0,je.A)(e,{errMsgProvider:ur});const n={};(0,r.A)(e.rules,(e=>{n[e.name]=e}));return dr(n,t.errMsgProvider)}function $i(e){e=(0,je.A)(e,{errMsgProvider:fr});return ri(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}const Ei="MismatchedTokenException";const ki="NoViableAltException";const Ci="EarlyExitException";const Si="NotAllInputParsedException";const xi=[Ei,ki,Ci,Si];Object.freeze(xi);function wi(e){return me(xi,e.name)}class Ni extends Error{constructor(e,t){super(e);this.token=t;this.resyncedTokens=[];Object.setPrototypeOf(this,new.target.prototype);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}class Ii extends Ni{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Ei}}class bi extends Ni{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=ki}}class Di extends Ni{constructor(e,t){super(e,t);this.name=Si}}class Li extends Ni{constructor(e,t,n){super(e,t);this.previousToken=n;this.name=Ci}}const Pi={};const Oi="InRuleRecoveryException";class _i extends Error{constructor(e){super(e);this.name=Oi}}class Mi{initRecoverable(e){this.firstAfterRepMap={};this.resyncFollows={};this.recoveryEnabled=(0,o.A)(e,"recoveryEnabled")?e.recoveryEnabled:Os.recoveryEnabled;if(this.recoveryEnabled){this.attemptInRepetitionRecovery=Fi}}getTokenToInsert(e){const t=or(e,"",NaN,NaN,NaN,NaN,NaN,NaN);t.isInsertedInRecovery=true;return t}canTokenTypeBeInsertedInRecovery(e){return true}canTokenTypeBeDeletedInRecovery(e){return true}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType();const s=this.exportLexerState();const a=[];let o=false;const c=this.LA(1);let l=this.LA(1);const u=()=>{const e=this.LA(0);const t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()});const n=new Ii(t,c,this.LA(0));n.resyncedTokens=xr(a);this.SAVE_ERROR(n)};while(!o){if(this.tokenMatcher(l,r)){u();return}else if(n.call(this)){u();e.apply(this,t);return}else if(this.tokenMatcher(l,i)){o=true}else{l=this.SKIP_TOKEN();this.addToResyncTokens(l,a)}}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){if(n===false){return false}if(this.tokenMatcher(this.LA(1),e)){return false}if(this.isBackTracking()){return false}if(this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))){return false}return true}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);const r=this.getNextPossibleTokenTypes(n);return r}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){const t=this.getTokenToInsert(e);return t}if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();this.consumeToken();return e}throw new _i("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)){return false}if((0,s.A)(t)){return false}const n=this.LA(1);const r=(0,Rt.A)(t,(e=>this.tokenMatcher(n,e)))!==undefined;return r}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e)){return false}const t=this.tokenMatcher(this.LA(2),e);return t}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey();const n=this.getFollowSetFromFollowKey(t);return me(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1);let n=2;while(true){const r=(0,Rt.A)(e,(e=>{const n=cr(t,e);return n}));if(r!==undefined){return r}t=this.LA(n);n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1){return Pi}const e=this.getLastExplicitRuleShortName();const t=this.getLastExplicitRuleOccurrenceIndex();const n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK;const t=this.RULE_OCCURRENCE_STACK;return(0,a.A)(e,((n,r)=>{if(r===0){return Pi}return{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}}))}flattenFollowSet(){const e=(0,a.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,be.A)(e)}getFollowSetFromFollowKey(e){if(e===Pi){return[ar]}const t=e.ruleName+e.idxInCallingRule+_e+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){if(!this.tokenMatcher(e,ar)){t.push(e)}return t}reSyncTo(e){const t=[];let n=this.LA(1);while(this.tokenMatcher(n,e)===false){n=this.SKIP_TOKEN();this.addToResyncTokens(n,t)}return xr(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){const n=this.getHumanReadableRuleStack();const r=(0,c.A)(this.RULE_OCCURRENCE_STACK);const i={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return i}getHumanReadableRuleStack(){return(0,a.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}}function Fi(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===undefined){const e=this.getCurrRuleFullName();const t=this.getGAstProductions()[e];const n=new s(t,i);c=n.startWalking();this.firstAfterRepMap[o]=c}let l=c.token;let u=c.occurrence;const f=c.isEndOfRule;if(this.RULE_STACK.length===1&&f&&l===undefined){l=ar;u=1}if(l===undefined||u===undefined){return}if(this.shouldInRepetitionRecoveryBeTried(l,u,a)){this.tryInRepetitionRecovery(e,t,n,l)}}const Ui=4;const Gi=8;const qi=12;const zi=8;const ji=1<<Gi;const Ki=2<<Gi;const Bi=3<<Gi;const Wi=4<<Gi;const Vi=5<<Gi;const Hi=6<<Gi;function Yi(e,t,n){return n|t|e}const Xi=32-zi;class Qi{constructor(e){var t;this.maxLookahead=(t=e===null||e===void 0?void 0:e.maxLookahead)!==null&&t!==void 0?t:Os.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,s.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules);const r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead);const i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);const s=[...t,...n,...r,...i];return s}return t}validateNoLeftRecursion(e){return(0,hr.A)(e,(e=>ui(e,e,fr)))}validateEmptyOrAlternatives(e){return(0,hr.A)(e,(e=>pi(e,fr)))}validateAmbiguousAlternationAlternatives(e,t){return(0,hr.A)(e,(e=>hi(e,t,fr)))}validateSomeNonEmptyLookaheadPath(e,t){return yi(e,t,fr)}buildLookaheadForAlternation(e){return qr(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,jr)}buildLookaheadForOptional(e){return zr(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Ur(e.prodType),Kr)}}class Zi{initLooksAhead(e){this.dynamicTokensEnabled=(0,o.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Os.dynamicTokensEnabled;this.maxLookahead=(0,o.A)(e,"maxLookahead")?e.maxLookahead:Os.maxLookahead;this.lookaheadStrategy=(0,o.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new Qi({maxLookahead:this.maxLookahead});this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,r.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=ts(e);(0,r.A)(t,(t=>{const n=t.idx===0?"":t.idx;this.TRACE_INIT(`${Ce(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled});const r=Yi(this.fullRuleNameToShort[e.name],ji,t.idx);this.setLaFuncCache(r,n)}))}));(0,r.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,Bi,"Repetition",t.maxLookahead,Ce(t))}));(0,r.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,Ki,"Option",t.maxLookahead,Ce(t))}));(0,r.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,Wi,"RepetitionMandatory",t.maxLookahead,Ce(t))}));(0,r.A)(a,(t=>{this.computeLookaheadFunc(e,t.idx,Hi,"RepetitionMandatoryWithSeparator",t.maxLookahead,Ce(t))}));(0,r.A)(o,(t=>{this.computeLookaheadFunc(e,t.idx,Vi,"RepetitionWithSeparator",t.maxLookahead,Ce(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${t===0?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r});const a=Yi(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){const n=this.getLastExplicitRuleShortName();return Yi(n,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class Ji extends re{constructor(){super(...arguments);this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const es=new Ji;function ts(e){es.reset();e.accept(es);const t=es.dslMethods;es.reset();return t}function ns(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.endOffset=t.endOffset}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset}}function rs(e,t){if(isNaN(e.startOffset)===true){e.startOffset=t.startOffset;e.startColumn=t.startColumn;e.startLine=t.startLine;e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}else if(e.endOffset<t.endOffset===true){e.endOffset=t.endOffset;e.endColumn=t.endColumn;e.endLine=t.endLine}}function is(e,t,n){if(e.children[n]===undefined){e.children[n]=[t]}else{e.children[n].push(t)}}function ss(e,t,n){if(e.children[t]===undefined){e.children[t]=[n]}else{e.children[t].push(n)}}const as="name";function os(e,t){Object.defineProperty(e,as,{enumerable:false,configurable:true,writable:false,value:t})}function cs(e,t){const n=(0,A.A)(e);const r=n.length;for(let i=0;i<r;i++){const r=n[i];const s=e[r];const a=s.length;for(let e=0;e<a;e++){const n=s[e];if(n.tokenTypeIdx===undefined){this[n.name](n.children,t)}}}}function ls(e,t){const n=function(){};os(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,ce.A)(e)){e=e[0]}if((0,qe.A)(e)){return undefined}return this[e.name](e.children,t)},validateVisitor:function(){const e=ds(this,t);if(!(0,s.A)(e)){const t=(0,a.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t`+`${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};n.prototype=r;n.prototype.constructor=n;n._RULE_NAMES=t;return n}function us(e,t,n){const i=function(){};os(i,e+"BaseSemanticsWithDefaults");const s=Object.create(n.prototype);(0,r.A)(t,(e=>{s[e]=cs}));i.prototype=s;i.prototype.constructor=i;return i}var fs;(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD";e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(fs||(fs={}));function ds(e,t){const n=ps(e,t);return n}function ps(e,t){const n=(0,nt.A)(t,(t=>(0,Qe.A)(e[t])===false));const r=(0,a.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:fs.MISSING_METHOD,methodName:t})));return gt(r)}class hs{initTreeBuilder(e){this.CST_STACK=[];this.outputCst=e.outputCst;this.nodeLocationTracking=(0,o.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Os.nodeLocationTracking;if(!this.outputCst){this.cstInvocationStateUpdate=kn.A;this.cstFinallyStateUpdate=kn.A;this.cstPostTerminal=kn.A;this.cstPostNonTerminal=kn.A;this.cstPostRule=kn.A}else{if(/full/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=rs;this.setNodeLocationFromNode=rs;this.cstPostRule=kn.A;this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery}else{this.setNodeLocationFromToken=kn.A;this.setNodeLocationFromNode=kn.A;this.cstPostRule=this.cstPostRuleFull;this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular}}else if(/onlyOffset/i.test(this.nodeLocationTracking)){if(this.recoveryEnabled){this.setNodeLocationFromToken=ns;this.setNodeLocationFromNode=ns;this.cstPostRule=kn.A;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery}else{this.setNodeLocationFromToken=kn.A;this.setNodeLocationFromNode=kn.A;this.cstPostRule=this.cstPostRuleOnlyOffset;this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular}}else if(/none/i.test(this.nodeLocationTracking)){this.setNodeLocationFromToken=kn.A;this.setNodeLocationFromNode=kn.A;this.cstPostRule=kn.A;this.setInitialNodeLocation=kn.A}else{throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}}}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t);this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset;n.endLine=t.endLine;n.endColumn=t.endColumn}else{n.startOffset=NaN;n.startLine=NaN;n.startColumn=NaN}}cstPostRuleOnlyOffset(e){const t=this.LA(0);const n=e.location;if(n.startOffset<=t.startOffset===true){n.endOffset=t.endOffset}else{n.startOffset=NaN}}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];is(n,t,e);this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];ss(n,t,e);this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,qe.A)(this.baseCstVisitorConstructor)){const e=ls(this.className,(0,A.A)(this.gastProductionsCache));this.baseCstVisitorConstructor=e;return e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,qe.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=us(this.className,(0,A.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());this.baseCstVisitorWithDefaultsConstructor=e;return e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class ms{initLexerAdapter(){this.tokVector=[];this.tokVectorLength=0;this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==true){throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`)}this.reset();this.tokVector=e;this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){if(this.currIdx<=this.tokVector.length-2){this.consumeToken();return this.LA(1)}else{return Ps}}LA(e){const t=this.currIdx+e;if(t<0||this.tokVectorLength<=t){return Ps}else{return this.tokVector[t]}}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class gs{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=_s){if(me(this.definedRulesNames,e)){const t=fr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className});const n={message:t,type:Ms.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);this[e]=r;return r}OVERRIDE_RULE(e,t,n=_s){const r=li(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);this[e]=i;return i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{e.apply(this,t);return true}catch(r){if(wi(r)){return false}else{throw r}}finally{this.reloadRecogState(n);this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return te((0,i.A)(this.gastProductionsCache))}}var ys=n(85356);class Ts{initRecognizerEngine(e,t){this.className=this.constructor.name;this.shortRuleNameToFull={};this.fullRuleNameToShort={};this.ruleShortNameIdx=256;this.tokenMatcher=wn;this.subruleIdx=0;this.definedRulesNames=[];this.tokensMap={};this.isBackTrackingStack=[];this.RULE_STACK=[];this.RULE_OCCURRENCE_STACK=[];this.gastProductionsCache={};if((0,o.A)(t,"serializedGrammar")){throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n"+"\tFor Further details.")}if((0,ce.A)(e)){if((0,s.A)(e)){throw Error("A Token Vocabulary cannot be empty.\n"+"\tNote that the first argument for the parser constructor\n"+"\tis no longer a Token vector (since v4.0).")}if(typeof e[0].startOffset==="number"){throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n"+"\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n"+"\tFor Further details.")}}if((0,ce.A)(e)){this.tokensMap=(0,tt.A)(e,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,o.A)(e,"modes")&&Ae((0,be.A)((0,i.A)(e.modes)),qn)){const t=(0,be.A)((0,i.A)(e.modes));const n=Ie(t);this.tokensMap=(0,tt.A)(n,((e,t)=>{e[t.name]=t;return e}),{})}else if((0,ys.A)(e)){this.tokensMap=(0,c.A)(e)}else{throw new Error("<tokensDictionary> argument must be An Array of Token constructors,"+" A dictionary of Token constructors or an IMultiModeLexerDefinition")}this.tokensMap["EOF"]=ar;const n=(0,o.A)(e,"modes")?(0,be.A)((0,i.A)(e.modes)):(0,i.A)(e);const r=Ae(n,(e=>(0,s.A)(e.categoryMatches)));this.tokenMatcher=r?wn:xn;bn((0,i.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone){throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\n`+`Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`)}const r=(0,o.A)(n,"resyncEnabled")?n.resyncEnabled:_s.resyncEnabled;const i=(0,o.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:_s.recoveryValueFunc;const s=this.ruleShortNameIdx<<Ui+Gi;this.ruleShortNameIdx++;this.shortRuleNameToFull[s]=e;this.fullRuleNameToShort[e]=s;let a;if(this.outputCst===true){a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);t.apply(this,a);const n=this.CST_STACK[this.CST_STACK.length-1];this.cstPostRule(n);return n}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}else{a=function n(...a){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx);return t.apply(this,a)}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}}const c=Object.assign(a,{ruleName:e,originalGrammarAction:t});return c}invokeRuleCatch(e,t,n){const r=this.RULE_STACK.length===1;const i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(wi(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){t.resyncedTokens=this.reSyncTo(r);if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;return e}else{return n(e)}}else{if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=true;t.partialCstResult=e}throw t}}else if(r){this.moveToTerminatedState();return n(e)}else{throw t}}else{throw e}}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(Ki,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof e!=="function"){i=e.DEF;const t=e.GATE;if(t!==undefined){const e=r;r=()=>t.call(this)&&e.call(this)}}else{i=e}if(r.call(this)===true){return i.call(this)}return undefined}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(Wi,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}if(r.call(this)===true){let e=this.doSingleRepetition(i);while(r.call(this)===true&&e===true){e=this.doSingleRepetition(i)}}else{throw this.raiseEarlyExitException(e,Fr.REPETITION_MANDATORY,t.ERR_MSG)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,Wi,e,Lr)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Hi,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Pr],t,Hi,e,Pr)}else{throw this.raiseEarlyExitException(e,Fr.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(Bi,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n);let i;if(typeof t!=="function"){i=t.DEF;const e=t.GATE;if(e!==undefined){const t=r;r=()=>e.call(this)&&t.call(this)}}else{i=t}let s=true;while(r.call(this)===true&&s===true){s=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,Bi,e,br,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Vi,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF;const i=t.SEP;const s=this.getLaFuncFromCache(n);if(s.call(this)===true){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===true){this.CONSUME(i);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Dr],t,Vi,e,Dr)}}repetitionSepSecondInternal(e,t,n,r,i){while(n()){this.CONSUME(t);r.call(this)}this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Hi,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);const n=this.getLexerPosition();return n>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(ji,t);const r=(0,ce.A)(e)?e:e.DEF;const i=this.getLaFuncFromCache(n);const s=i.call(this,r);if(s!==undefined){const e=r[s];return e.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK.pop();this.RULE_OCCURRENCE_STACK.pop();this.cstFinallyStateUpdate();if(this.RULE_STACK.length===0&&this.isAtEndOfInput()===false){const e=this.LA(1);const t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Di(t,e))}}subruleInternal(e,t,n){let r;try{const i=n!==undefined?n.ARGS:undefined;this.subruleIdx=t;r=e.apply(this,i);this.cstPostNonTerminal(r,n!==undefined&&n.LABEL!==undefined?n.LABEL:e.ruleName);return r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){if(wi(e)&&e.partialCstResult!==undefined){this.cstPostNonTerminal(e.partialCstResult,t!==undefined&&t.LABEL!==undefined?t.LABEL:n);delete e.partialCstResult}throw e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);if(this.tokenMatcher(t,e)===true){this.consumeToken();r=t}else{this.consumeInternalError(e,t,n)}}catch(i){r=this.consumeInternalRecovery(e,t,i)}this.cstPostTerminal(n!==undefined&&n.LABEL!==undefined?n.LABEL:e.name,r);return r}consumeInternalError(e,t,n){let r;const i=this.LA(0);if(n!==undefined&&n.ERR_MSG){r=n.ERR_MSG}else{r=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()})}throw this.SAVE_ERROR(new Ii(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){if(r.name===Oi){throw n}else{throw r}}}else{throw n}}saveRecogState(){const e=this.errors;const t=(0,c.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors;this.importLexerState(e.lexerState);this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n);this.RULE_STACK.push(e);this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),ar)}reset(){this.resetLexerState();this.subruleIdx=0;this.isBackTrackingStack=[];this.errors=[];this.RULE_STACK=[];this.CST_STACK=[];this.RULE_OCCURRENCE_STACK=[]}}class Rs{initErrorHandler(e){this._errors=[];this.errorMessageProvider=(0,o.A)(e,"errorMessageProvider")?e.errorMessageProvider:Os.errorMessageProvider}SAVE_ERROR(e){if(wi(e)){e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,c.A)(this.RULE_OCCURRENCE_STACK)};this._errors.push(e);return e}else{throw Error("Trying to save an Error which is not a RecognitionException")}}get errors(){return(0,c.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName();const i=this.getGAstProductions()[r];const s=Zr(e,i,t,this.maxLookahead);const a=s[0];const o=[];for(let l=1;l<=this.maxLookahead;l++){o.push(this.LA(l))}const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Li(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName();const r=this.getGAstProductions()[n];const i=Qr(e,r,this.maxLookahead);const s=[];for(let c=1;c<=this.maxLookahead;c++){s.push(this.LA(c))}const a=this.LA(0);const o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new bi(o,this.LA(1),a))}}class vs{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,qe.A)(n)){throw Error(`Rule ->${e}<- does not exist in this grammar.`)}return _r([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Tt(e.ruleStack);const n=this.getGAstProductions();const r=n[t];const i=new Nr(r,e).startWalking();return i}}const As={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(As);const $s=true;const Es=Math.pow(2,Gi)-1;const ks=ir({name:"RECORDING_PHASE_TOKEN",pattern:Bn.NA});bn([ks]);const Cs=or(ks,"This IToken indicates the Parser is in Recording Phase\n\t"+""+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Cs);const Ss={name:"This CSTNode indicates the Parser is in Recording Phase\n\t"+"See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};class xs{initGastRecorder(e){this.recordingProdStack=[];this.RECORDING_PHASE=false}enableRecording(){this.RECORDING_PHASE=true;this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)};this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)};this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)};this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)};this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)};this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)};this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)};this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this[`consume`]=function(e,t,n){return this.consumeInternalRecord(t,e,n)};this[`subrule`]=function(e,t,n){return this.subruleInternalRecord(t,e,n)};this[`option`]=function(e,t){return this.optionInternalRecord(t,e)};this[`or`]=function(e,t){return this.orInternalRecord(t,e)};this[`many`]=function(e,t){this.manyInternalRecord(e,t)};this[`atLeastOne`]=function(e,t){this.atLeastOneInternalRecord(e,t)};this.ACTION=this.ACTION_RECORD;this.BACKTRACK=this.BACKTRACK_RECORD;this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=false;this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`];delete e[`SUBRULE${n}`];delete e[`OPTION${n}`];delete e[`OR${n}`];delete e[`MANY${n}`];delete e[`MANY_SEP${n}`];delete e[`AT_LEAST_ONE${n}`];delete e[`AT_LEAST_ONE_SEP${n}`]}delete e[`consume`];delete e[`subrule`];delete e[`option`];delete e[`or`];delete e[`many`];delete e[`atLeastOne`];delete e.ACTION;delete e.BACKTRACK;delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>true}LA_RECORD(e){return Ps}topLevelRuleRecord(e,t){try{const n=new W({definition:[],name:e});n.name=e;this.recordingProdStack.push(n);t.call(this);this.recordingProdStack.pop();return n}catch(n){if(n.KNOWN_RECORDER_ERROR!==true){try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\t'+"https://chevrotain.io/docs/guide/internals.html#grammar-recording"}catch(r){throw n}}throw n}}optionInternalRecord(e,t){return ws.call(this,H,e,t)}atLeastOneInternalRecord(e,t){ws.call(this,Y,t,e)}atLeastOneSepFirstInternalRecord(e,t){ws.call(this,X,t,e,$s)}manyInternalRecord(e,t){ws.call(this,Q,t,e)}manySepFirstInternalRecord(e,t){ws.call(this,Z,t,e,$s)}orInternalRecord(e,t){return Ns.call(this,e,t)}subruleInternalRecord(e,t,n){bs(t);if(!e||(0,o.A)(e,"ruleName")===false){const n=new Error(`<SUBRULE${Is(t)}> argument is invalid`+` expecting a Parser method reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,Cn.A)(this.recordingProdStack);const i=e.ruleName;const s=new B({idx:t,nonTerminalName:i,label:n===null||n===void 0?void 0:n.LABEL,referencedRule:undefined});r.definition.push(s);return this.outputCst?Ss:As}consumeInternalRecord(e,t,n){bs(t);if(!Mn(e)){const n=new Error(`<CONSUME${Is(t)}> argument is invalid`+` expecting a TokenType reference but got: <${JSON.stringify(e)}>`+`\n inside top level rule: <${this.recordingProdStack[0].name}>`);n.KNOWN_RECORDER_ERROR=true;throw n}const r=(0,Cn.A)(this.recordingProdStack);const i=new ee({idx:t,terminalType:e,label:n===null||n===void 0?void 0:n.LABEL});r.definition.push(i);return Cs}}function ws(e,t,n,r=false){bs(n);const i=(0,Cn.A)(this.recordingProdStack);const s=(0,Qe.A)(t)?t:t.DEF;const a=new e({definition:[],idx:n});if(r){a.separator=t.SEP}if((0,o.A)(t,"MAX_LOOKAHEAD")){a.maxLookahead=t.MAX_LOOKAHEAD}this.recordingProdStack.push(a);s.call(this);i.definition.push(a);this.recordingProdStack.pop();return As}function Ns(e,t){bs(t);const n=(0,Cn.A)(this.recordingProdStack);const i=(0,ce.A)(e)===false;const s=i===false?e:e.DEF;const a=new J({definition:[],idx:t,ignoreAmbiguities:i&&e.IGNORE_AMBIGUITIES===true});if((0,o.A)(e,"MAX_LOOKAHEAD")){a.maxLookahead=e.MAX_LOOKAHEAD}const c=fe(s,(e=>(0,Qe.A)(e.GATE)));a.hasPredicates=c;n.definition.push(a);(0,r.A)(s,(e=>{const t=new V({definition:[]});a.definition.push(t);if((0,o.A)(e,"IGNORE_AMBIGUITIES")){t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES}else if((0,o.A)(e,"GATE")){t.ignoreAmbiguities=true}this.recordingProdStack.push(t);e.ALT.call(this);this.recordingProdStack.pop()}));return As}function Is(e){return e===0?"":`${e}`}function bs(e){if(e<0||e>Es){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\t`+`Idx value must be a none negative value smaller than ${Es+1}`);t.KNOWN_RECORDER_ERROR=true;throw t}}class Ds{initPerformanceTracer(e){if((0,o.A)(e,"traceInitPerf")){const t=e.traceInitPerf;const n=typeof t==="number";this.traceInitMaxIdent=n?t:Infinity;this.traceInitPerf=n?t>0:t}else{this.traceInitMaxIdent=0;this.traceInitPerf=Os.traceInitPerf}this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===true){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent){console.log(`${n}--\x3e <${e}>`)}const{time:r,value:i}=Sn(t);const s=r>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent){s(`${n}<-- <${e}> time: ${r}ms`)}this.traceInitIndent--;return i}else{return t()}}}function Ls(e,t){t.forEach((t=>{const n=t.prototype;Object.getOwnPropertyNames(n).forEach((r=>{if(r==="constructor"){return}const i=Object.getOwnPropertyDescriptor(n,r);if(i&&(i.get||i.set)){Object.defineProperty(e.prototype,r,i)}else{e.prototype[r]=t.prototype[r]}}))}))}const Ps=or(ar,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ps);const Os=Object.freeze({recoveryEnabled:false,maxLookahead:3,dynamicTokensEnabled:false,outputCst:true,errorMessageProvider:lr,nodeLocationTracking:"none",traceInitPerf:false,skipValidations:false});const _s=Object.freeze({recoveryValueFunc:()=>undefined,resyncEnabled:true});var Ms;(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME";e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME";e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE";e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS";e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF";e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION";e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT";e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS";e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE";e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME";e[e["NO_NON_EMPTY_LOOKAHEAD"]=10]="NO_NON_EMPTY_LOOKAHEAD";e[e["AMBIGUOUS_PREFIX_ALTS"]=11]="AMBIGUOUS_PREFIX_ALTS";e[e["TOO_MANY_ALTS"]=12]="TOO_MANY_ALTS";e[e["CUSTOM_LOOKAHEAD_VALIDATION"]=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(Ms||(Ms={}));function Fs(e=undefined){return function(){return e}}class Us{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated."+"\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=true;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{l(this)}));this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording();(0,r.A)(this.definedRulesNames,(e=>{const t=this[e];const n=t["originalGrammarAction"];let r;this.TRACE_INIT(`${e} Rule`,(()=>{r=this.topLevelRuleRecord(e,n)}));this.gastProductionsCache[e]=r}))}finally{this.disableRecording()}}));let n=[];this.TRACE_INIT("Grammar Resolving",(()=>{n=Ai({rules:(0,i.A)(this.gastProductionsCache)});this.definitionErrors=this.definitionErrors.concat(n)}));this.TRACE_INIT("Grammar Validations",(()=>{if((0,s.A)(n)&&this.skipValidations===false){const e=$i({rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),errMsgProvider:fr,grammarName:t});const n=ni({lookaheadStrategy:this.lookaheadStrategy,rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(e,n)}}));if((0,s.A)(this.definitionErrors)){if(this.recoveryEnabled){this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=Fe((0,i.A)(this.gastProductionsCache));this.resyncFollows=e}))}this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)===null||t===void 0?void 0:t.call(e,{rules:(0,i.A)(this.gastProductionsCache)});this.preComputeLookaheadFunctions((0,i.A)(this.gastProductionsCache))}))}if(!Us.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,s.A)(this.definitionErrors)){e=(0,a.A)(this.definitionErrors,(e=>e.message));throw new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}}))}constructor(e,t){this.definitionErrors=[];this.selfAnalysisDone=false;const n=this;n.initErrorHandler(t);n.initLexerAdapter();n.initLooksAhead(t);n.initRecognizerEngine(e,t);n.initRecoverable(t);n.initTreeBuilder(t);n.initContentAssist();n.initGastRecorder(t);n.initPerformanceTracer(t);if((0,o.A)(t,"ignoredIssues")){throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\t"+"Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\t"+"See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\t"+"For further details.")}this.skipValidations=(0,o.A)(t,"skipValidations")?t.skipValidations:Os.skipValidations}}Us.DEFER_DEFINITION_ERRORS_HANDLING=false;Ls(Us,[Mi,Zi,hs,ms,Ts,gs,Rs,vs,xs,Ds]);class Gs extends Us{constructor(e,t=Os){const n=(0,c.A)(t);n.outputCst=true;super(e,n)}}class qs extends Us{constructor(e,t=Os){const n=(0,c.A)(t);n.outputCst=false;super(e,n)}}function zs(e){const t=new js;const n=values(e);return map(n,(e=>t.visitRule(e)))}class js extends(null&&GAstVisitor){visitRule(e){const t=this.visitEach(e.definition);const n=groupBy(t,(e=>e.propertyName));const r=map(n,((e,t)=>{const n=!some(e,(e=>!e.canBeNull));let r=e[0].type;if(e.length>1){r=map(e,(e=>e.type))}return{name:t,type:r,optional:n}}));return{name:e.name,properties:r}}visitAlternative(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitOption(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetition(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitRepetitionMandatory(e){return this.visitEach(e.definition)}visitRepetitionMandatoryWithSeparator(e){return this.visitEach(e.definition).concat({propertyName:e.separator.name,canBeNull:true,type:Ks(e.separator)})}visitRepetitionWithSeparator(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true}).concat({propertyName:e.separator.name,canBeNull:true,type:Ks(e.separator)})}visitAlternation(e){return this.visitEachAndOverrideWith(e.definition,{canBeNull:true})}visitTerminal(e){return[{propertyName:e.label||e.terminalType.name,canBeNull:false,type:Ks(e)}]}visitNonTerminal(e){return[{propertyName:e.label||e.nonTerminalName,canBeNull:false,type:Ks(e)}]}visitEachAndOverrideWith(e,t){return map(this.visitEach(e),(e=>assign({},e,t)))}visitEach(e){return flatten(map(e,(e=>this.visit(e))))}}function Ks(e){if(e instanceof NonTerminal){return{kind:"rule",name:e.referencedRule.name}}return{kind:"token"}}const Bs={includeVisitorInterface:true,visitorInterfaceName:"ICstNodeVisitor"};function Ws(e,t){const n=Object.assign(Object.assign({},Bs),t);const r=buildModel(e);return genDts(r,n)}function Vs(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API."+"\n\t It performs no action other than printing this message."+"\n\t Please avoid using it as it will be completely removed in the future")}class Hs{constructor(){throw new Error("The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.\t\n"+"See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0")}}},60180:(e,t,n)=>{"use strict";n.d(t,{t:()=>Ir,u:()=>br});var r=n(5730);var i=n(70977);var s=n(65811);var a=n(85684);function o(e){const t=[];const n=e.Grammar;for(const r of n.rules){if((0,a.rE)(r)&&(0,i.eb)(r)&&(0,s.lU)((0,i.S)(r))){t.push(r.name)}}return{multilineCommentRules:t,nameRegexp:r.El}}var c=n(50450);var l=n(8937);var u=n(97133);function f(e,t,n){return`${e.name}_${t}_${n}`}const d=0;const p=1;const h=2;const m=4;const g=5;const y=6;const T=7;const R=8;const v=9;const A=10;const $=11;const E=12;class k{constructor(e){this.target=e}isEpsilon(){return false}}class C extends k{constructor(e,t){super(e);this.tokenType=t}}class S extends k{constructor(e){super(e)}isEpsilon(){return true}}class x extends k{constructor(e,t,n){super(e);this.rule=t;this.followState=n}isEpsilon(){return true}}function w(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};N(t,e);const n=e.length;for(let r=0;r<n;r++){const n=e[r];const i=M(t,n,n);if(i===undefined){continue}V(t,n,i)}return t}function N(e,t){const n=t.length;for(let r=0;r<n;r++){const n=t[r];const i=Y(e,n,undefined,{type:h});const s=Y(e,n,undefined,{type:T});i.stop=s;e.ruleToStartState.set(n,i);e.ruleToStopState.set(n,s)}}function I(e,t,n){if(n instanceof c.BK){return B(e,t,n.terminalType,n)}else if(n instanceof c.wL){return W(e,t,n)}else if(n instanceof c.ak){return O(e,t,n)}else if(n instanceof c.c$){return _(e,t,n)}else if(n instanceof c.Y2){return b(e,t,n)}else if(n instanceof c.Pp){return D(e,t,n)}else if(n instanceof c.$P){return L(e,t,n)}else if(n instanceof c.Cy){return P(e,t,n)}else{return M(e,t,n)}}function b(e,t,n){const r=Y(e,t,n,{type:g});q(e,r);const i=z(e,t,r,n,M(e,t,n));return U(e,t,n,i)}function D(e,t,n){const r=Y(e,t,n,{type:g});q(e,r);const i=z(e,t,r,n,M(e,t,n));const s=B(e,t,n.separator,n);return U(e,t,n,i,s)}function L(e,t,n){const r=Y(e,t,n,{type:m});q(e,r);const i=z(e,t,r,n,M(e,t,n));return F(e,t,n,i)}function P(e,t,n){const r=Y(e,t,n,{type:m});q(e,r);const i=z(e,t,r,n,M(e,t,n));const s=B(e,t,n.separator,n);return F(e,t,n,i,s)}function O(e,t,n){const r=Y(e,t,n,{type:p});q(e,r);const i=(0,l.A)(n.definition,(n=>I(e,t,n)));const s=z(e,t,r,n,...i);return s}function _(e,t,n){const r=Y(e,t,n,{type:p});q(e,r);const i=z(e,t,r,n,M(e,t,n));return G(e,t,n,i)}function M(e,t,n){const r=(0,u.A)((0,l.A)(n.definition,(n=>I(e,t,n))),(e=>e!==undefined));if(r.length===1){return r[0]}else if(r.length===0){return undefined}else{return K(e,r)}}function F(e,t,n,r,i){const s=r.left;const a=r.right;const o=Y(e,t,n,{type:$});q(e,o);const c=Y(e,t,n,{type:E});s.loopback=o;c.loopback=o;e.decisionMap[f(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o;H(a,o);if(i===undefined){H(o,s);H(o,c)}else{H(o,c);H(o,i.left);H(i.right,s)}return{left:s,right:c}}function U(e,t,n,r,i){const s=r.left;const a=r.right;const o=Y(e,t,n,{type:A});q(e,o);const c=Y(e,t,n,{type:E});const l=Y(e,t,n,{type:v});o.loopback=l;c.loopback=l;H(o,s);H(o,c);H(a,l);if(i!==undefined){H(l,c);H(l,i.left);H(i.right,s)}else{H(l,o)}e.decisionMap[f(t,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o;return{left:o,right:c}}function G(e,t,n,r){const i=r.left;const s=r.right;H(i,s);e.decisionMap[f(t,"Option",n.idx)]=i;return r}function q(e,t){e.decisionStates.push(t);t.decision=e.decisionStates.length-1;return t.decision}function z(e,t,n,r,...i){const s=Y(e,t,r,{type:R,start:n});n.end=s;for(const o of i){if(o!==undefined){H(n,o.left);H(o.right,s)}else{H(n,s)}}const a={left:n,right:s};e.decisionMap[f(t,j(r),r.idx)]=n;return a}function j(e){if(e instanceof c.ak){return"Alternation"}else if(e instanceof c.c$){return"Option"}else if(e instanceof c.Y2){return"Repetition"}else if(e instanceof c.Pp){return"RepetitionWithSeparator"}else if(e instanceof c.$P){return"RepetitionMandatory"}else if(e instanceof c.Cy){return"RepetitionMandatoryWithSeparator"}else{throw new Error("Invalid production type encountered")}}function K(e,t){const n=t.length;for(let s=0;s<n-1;s++){const n=t[s];let r;if(n.left.transitions.length===1){r=n.left.transitions[0]}const i=r instanceof x;const a=r;const o=t[s+1].left;if(n.left.type===p&&n.right.type===p&&r!==undefined&&(i&&a.followState===n.right||r.target===n.right)){if(i){a.followState=o}else{r.target=o}Q(e,n.right)}else{H(n.right,o)}}const r=t[0];const i=t[n-1];return{left:r.left,right:i.right}}function B(e,t,n,r){const i=Y(e,t,r,{type:p});const s=Y(e,t,r,{type:p});X(i,new C(s,n));return{left:i,right:s}}function W(e,t,n){const r=n.referencedRule;const i=e.ruleToStartState.get(r);const s=Y(e,t,n,{type:p});const a=Y(e,t,n,{type:p});const o=new x(i,r,a);X(s,o);return{left:s,right:a}}function V(e,t,n){const r=e.ruleToStartState.get(t);H(r,n.left);const i=e.ruleToStopState.get(t);H(n.right,i);const s={left:r,right:i};return s}function H(e,t){const n=new S(t);X(e,n)}function Y(e,t,n,r){const i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:false,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);e.states.push(i);return i}function X(e,t){if(e.transitions.length===0){e.epsilonOnlyTransitions=t.isEpsilon()}e.transitions.push(t)}function Q(e,t){e.states.splice(e.states.indexOf(t),1)}const Z={};class J{constructor(){this.map={};this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=ee(e);if(!(t in this.map)){this.map[t]=this.configs.length;this.configs.push(e)}}get elements(){return this.configs}get alts(){return(0,l.A)(this.configs,(e=>e.alt))}get key(){let e="";for(const t in this.map){e+=t+":"}return e}}function ee(e,t=true){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var te=n(963);var ne=n(57852);var re=n(1121);var ie=n(19363);function se(e,t){return e&&e.length?(0,ie.A)(e,(0,re.A)(t,2)):[]}const ae=se;var oe=n(74033);var ce=n(69769);var le=n(74650);var ue=n(65339);function fe(e,t){const n={};return r=>{const i=r.toString();let s=n[i];if(s!==undefined){return s}else{s={atnStartState:e,decision:t,states:{}};n[i]=s;return s}}}class de{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;n<t;n++){e+=this.predicates[n]===true?"1":"0"}return e}}const pe=new de;class he extends c.T6{constructor(e){var t;super();this.logging=(t=e===null||e===void 0?void 0:e.logging)!==null&&t!==void 0?t:e=>console.log(e)}initialize(e){this.atn=w(e.rules);this.dfas=ge(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=f(n,"Alternation",t);const u=this.atn.decisionMap[o];const d=u.decision;const p=(0,l.A)((0,c.jk)({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:n}),(e=>(0,l.A)(e,(e=>e[0]))));if(me(p,false)&&!i){const e=(0,ue.A)(p,((e,t,n)=>{(0,ce.A)(t,(t=>{if(t){e[t.tokenTypeIdx]=n;(0,ce.A)(t.categoryMatches,(t=>{e[t]=n}))}}));return e}),{});if(r){return function(t){var n;const r=this.LA(1);const i=e[r.tokenTypeIdx];if(t!==undefined&&i!==undefined){const e=(n=t[i])===null||n===void 0?void 0:n.GATE;if(e!==undefined&&e.call(this)===false){return undefined}}return i}}else{return function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}}else if(r){return function(e){const t=new de;const n=e===undefined?0:e.length;for(let i=0;i<n;i++){const n=e===null||e===void 0?void 0:e[i].GATE;t.set(i,n===undefined||n.call(this))}const r=ye.call(this,s,d,t,a);return typeof r==="number"?r:undefined}}else{return function(){const e=ye.call(this,s,d,pe,a);return typeof e==="number"?e:undefined}}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e;const s=this.dfas;const a=this.logging;const o=f(n,r,t);const u=this.atn.decisionMap[o];const d=u.decision;const p=(0,l.A)((0,c.jk)({maxLookahead:1,occurrence:t,prodType:r,rule:n}),(e=>(0,l.A)(e,(e=>e[0]))));if(me(p)&&p[0][0]&&!i){const e=p[0];const t=(0,oe.A)(e);if(t.length===1&&(0,le.A)(t[0].categoryMatches)){const e=t[0];const n=e.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===n}}else{const e=(0,ue.A)(t,((e,t)=>{if(t!==undefined){e[t.tokenTypeIdx]=true;(0,ce.A)(t.categoryMatches,(t=>{e[t]=true}))}return e}),{});return function(){const t=this.LA(1);return e[t.tokenTypeIdx]===true}}}return function(){const e=ye.call(this,s,d,pe,a);return typeof e==="object"?false:e===0}}}function me(e,t=true){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(i===undefined){if(t){break}else{return false}}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r){if(n.has(t)){if(!e.has(t)){return false}}else{n.add(t);e.add(t)}}}}return true}function ge(e){const t=e.decisionStates.length;const n=Array(t);for(let r=0;r<t;r++){n[r]=fe(e.decisionStates[r],r)}return n}function ye(e,t,n,r){const i=e[t](n);let s=i.start;if(s===undefined){const e=be(i.atnStartState);s=Ie(i,we(e));i.start=s}const a=Te.apply(this,[i,s,n,r]);return a}function Te(e,t,n,r){let i=t;let s=1;const a=[];let o=this.LA(s++);while(true){let t=ke(i,o);if(t===undefined){t=Re.apply(this,[e,i,o,s,n,r])}if(t===Z){return Ee(a,i,o)}if(t.isAcceptState===true){return t.prediction}i=t;a.push(o);o=this.LA(s++)}}function Re(e,t,n,r,i,s){const a=Ce(t.configs,n,i);if(a.size===0){Ne(e,t,n,Z);return Z}let o=we(a);const c=xe(a,i);if(c!==undefined){o.isAcceptState=true;o.prediction=c;o.configs.uniqueAlt=c}else if(_e(a)){const t=(0,te.A)(a.alts);o.isAcceptState=true;o.prediction=t;o.configs.uniqueAlt=t;ve.apply(this,[e,r,a.alts,s])}o=Ne(e,t,n,o);return o}function ve(e,t,n,r){const i=[];for(let l=1;l<=t;l++){i.push(this.LA(l).tokenType)}const s=e.atnStartState;const a=s.rule;const o=s.production;const c=Ae({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function Ae(e){const t=(0,l.A)(e.prefixPath,(e=>(0,c.Sk)(e))).join(", ");const n=e.production.idx===0?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${$e(e.production)}${n}>`+` inside <${e.topLevelRule.name}> Rule,\n`+`<${t}> may appears as a prefix path in all these alternatives.\n`;r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\n`+`For Further details.`;return r}function $e(e){if(e instanceof c.wL){return"SUBRULE"}else if(e instanceof c.c$){return"OPTION"}else if(e instanceof c.ak){return"OR"}else if(e instanceof c.$P){return"AT_LEAST_ONE"}else if(e instanceof c.Cy){return"AT_LEAST_ONE_SEP"}else if(e instanceof c.Pp){return"MANY_SEP"}else if(e instanceof c.Y2){return"MANY"}else if(e instanceof c.BK){return"CONSUME"}else{throw Error("non exhaustive match")}}function Ee(e,t,n){const r=(0,ne.A)(t.configs.elements,(e=>e.state.transitions));const i=ae(r.filter((e=>e instanceof C)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx));return{actualToken:n,possibleTokenTypes:i,tokenPath:e}}function ke(e,t){return e.edges[t.tokenTypeIdx]}function Ce(e,t,n){const r=new J;const i=[];for(const a of e.elements){if(n.is(a.alt)===false){continue}if(a.state.type===T){i.push(a);continue}const e=a.state.transitions.length;for(let n=0;n<e;n++){const e=a.state.transitions[n];const i=Se(e,t);if(i!==undefined){r.add({state:i,alt:a.alt,stack:a.stack})}}}let s;if(i.length===0&&r.size===1){s=r}if(s===undefined){s=new J;for(const e of r.elements){De(e,s)}}if(i.length>0&&!Pe(s)){for(const e of i){s.add(e)}}return s}function Se(e,t){if(e instanceof C&&(0,c.G)(t,e.tokenType)){return e.target}return undefined}function xe(e,t){let n;for(const r of e.elements){if(t.is(r.alt)===true){if(n===undefined){n=r.alt}else if(n!==r.alt){return undefined}}}return n}function we(e){return{configs:e,edges:{},isAcceptState:false,prediction:-1}}function Ne(e,t,n,r){r=Ie(e,r);t.edges[n.tokenTypeIdx]=r;return r}function Ie(e,t){if(t===Z){return t}const n=t.configs.key;const r=e.states[n];if(r!==undefined){return r}t.configs.finalize();e.states[n]=t;return t}function be(e){const t=new J;const n=e.transitions.length;for(let r=0;r<n;r++){const n=e.transitions[r].target;const i={state:n,alt:r,stack:[]};De(i,t)}return t}function De(e,t){const n=e.state;if(n.type===T){if(e.stack.length>0){const n=[...e.stack];const r=n.pop();const i={state:r,alt:e.alt,stack:n};De(i,t)}else{t.add(e)}return}if(!n.epsilonOnlyTransitions){t.add(e)}const r=n.transitions.length;for(let i=0;i<r;i++){const r=n.transitions[i];const s=Le(e,r);if(s!==undefined){De(s,t)}}}function Le(e,t){if(t instanceof S){return{state:t.target,alt:e.alt,stack:e.stack}}else if(t instanceof x){const n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}return undefined}function Pe(e){for(const t of e.elements){if(t.state.type===T){return true}}return false}function Oe(e){for(const t of e.elements){if(t.state.type!==T){return false}}return true}function _e(e){if(Oe(e)){return true}const t=Me(e.elements);const n=Fe(t)&&!Ue(t);return n}function Me(e){const t=new Map;for(const n of e){const e=ee(n,false);let r=t.get(e);if(r===undefined){r={};t.set(e,r)}r[n.alt]=true}return t}function Fe(e){for(const t of Array.from(e.values())){if(Object.keys(t).length>1){return true}}return false}function Ue(e){for(const t of Array.from(e.values())){if(Object.keys(t).length===1){return true}}return false}var Ge=n(63752);var qe=n(57806);class ze{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){this.rootNode=new Ve(e);this.rootNode.root=this.rootNode;this.nodeStack=[this.rootNode];return this.rootNode}buildCompositeNode(e){const t=new Be;t.grammarSource=e;t.root=this.rootNode;this.current.content.push(t);this.nodeStack.push(t);return t}buildLeafNode(e,t){const n=new Ke(e.startOffset,e.image.length,(0,r.wf)(e),e.tokenType,!t);n.grammarSource=t;n.root=this.rootNode;this.current.content.push(n);return n}removeNode(e){const t=e.container;if(t){const n=t.content.indexOf(e);if(n>=0){t.content.splice(n,1)}}}addHiddenNodes(e){const t=[];for(const s of e){const e=new Ke(s.startOffset,s.image.length,(0,r.wf)(s),s.tokenType,true);e.root=this.rootNode;t.push(e)}let n=this.current;let i=false;if(n.content.length>0){n.content.push(...t);return}while(n.container){const e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t);i=true;break}n=n.container}if(!i){this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;if(typeof e.$type==="string"&&!e.$infixName){this.current.astNode=e}e.$cstNode=t;const n=this.nodeStack.pop();if(n?.content.length===0){this.removeNode(n)}}}class je{get hidden(){return false}get astNode(){const e=typeof this._astNode?.$type==="string"?this._astNode:this.container?.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)}}class Ke extends je{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=false){super();this._hidden=i;this._offset=e;this._tokenType=r;this._length=t;this._range=n}}class Be extends je{constructor(){super(...arguments);this.content=new We(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode;const t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===undefined){const{range:n}=e;const{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}else{return{start:qe.Position.create(0,0),end:qe.Position.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 t=this.content[e];if(!t.hidden){return t}}return this.content[this.content.length-1]}}class We extends Array{constructor(e){super();this.parent=e;Object.setPrototypeOf(this,We.prototype)}push(...e){this.addParents(e);return super.push(...e)}unshift(...e){this.addParents(e);return super.unshift(...e)}splice(e,t,...n){this.addParents(n);return super.splice(e,t,...n)}addParents(e){for(const t of e){t.container=this.parent}}}class Ve extends Be{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super();this._text="";this._text=e??""}}const He=Symbol("Datatype");function Ye(e){return e.$type===He}const Xe="​";const Qe=e=>e.endsWith(Xe)?e:e+Xe;class Ze{constructor(e){this._unorderedGroups=new Map;this.allRules=new Map;this.lexer=e.parser.Lexer;const t=this.lexer.definition;const n=e.LanguageMetaData.mode==="production";if(e.shared.profilers.LangiumProfiler?.isActive("parsing")){this.wrapper=new st(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId))}else{this.wrapper=new it(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class Je extends Ze{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e);this.nodeBuilder=new ze;this.stack=[];this.assignmentMap=new Map;this.operatorPrecedence=new Map;this.linker=e.references.Linker;this.converter=e.parser.ValueConverter;this.astReflection=e.shared.AstReflection}rule(e,t){const n=this.computeRuleType(e);let r=undefined;if((0,a.NT)(e)){r=e.name;this.registerPrecedenceMap(e)}const i=this.wrapper.DEFINE_RULE(Qe(e.name),this.startImplementation(n,r,t).bind(this));this.allRules.set(e.name,i);if((0,a.s7)(e)&&e.entry){this.mainRule=i}return i}registerPrecedenceMap(e){const t=e.name;const n=new Map;for(let r=0;r<e.operators.precedences.length;r++){const t=e.operators.precedences[r];for(const e of t.operators){n.set(e.value,{precedence:r,rightAssoc:t.associativity==="right"})}}this.operatorPrecedence.set(t,n)}computeRuleType(e){if((0,a.NT)(e)){return(0,i.Uz)(e)}else if(e.fragment){return undefined}else if((0,i.Xq)(e)){return He}else{return(0,i.Uz)(e)}}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r){throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.")}const i=this.doParse(r);this.nodeBuilder.addHiddenNodes(n.hidden);this.unorderedGroups.clear();this.lexerResult=undefined;(0,Ge.SD)(i,{deep:true});return{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0){t=this.construct()}if(t===undefined){throw new Error("No result from parser")}else if(this.stack.length>0){throw new Error("Parser stack is not empty after parsing")}return t}startImplementation(e,t,n){return r=>{const i=!this.isRecording()&&e!==undefined;if(i){const n={$type:e};this.stack.push(n);if(e===He){n.value=""}else if(t!==undefined){n.$infixName=t}}n(r);return i?this.construct():undefined}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length){return[]}const n=e.startOffset;for(let r=0;r<t.length;r++){const e=t[r];if(e.startOffset>n){return t.splice(0,r)}}return t.splice(0,t.length)}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(r,n);const{assignment:i,crossRef:s}=this.getAssignment(n);const o=this.current;if(i){const e=(0,a.wb)(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,s)}else if(Ye(o)){let e=r.image;if(!(0,a.wb)(n)){e=this.converter.convert(e,t).toString()}o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==="number"&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let s;if(!this.isRecording()&&!n){s=this.nodeBuilder.buildCompositeNode(r)}let a;try{a=this.wrapper.wrapSubrule(e,t,i)}finally{if(!this.isRecording()){if(a===undefined&&!n){a=this.construct()}if(a!==undefined&&s&&s.length>0){this.performSubruleAssignment(a,r,s)}}}}performSubruleAssignment(e,t,n){const{assignment:r,crossRef:i}=this.getAssignment(t);if(r){this.assign(r.operator,r.feature,e,n,i)}else if(!r){const t=this.current;if(Ye(t)){t.value+=e.toString()}else if(typeof e==="object"&&e){const n=this.assignWithoutOverride(e,t);const r=n;this.stack.pop();this.stack.push(r)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct();this.nodeBuilder.removeNode(n.$cstNode);const r=this.nodeBuilder.buildCompositeNode(t);r.content.push(n.$cstNode);const i={$type:e};this.stack.push(i);this.assign(t.operator,t.feature,n,n.$cstNode)}else{n.$type=e}}}construct(){if(this.isRecording()){return undefined}const e=this.stack.pop();this.nodeBuilder.construct(e);if("$infixName"in e){return this.constructInfix(e,this.operatorPrecedence.get(e.$infixName))}else if(Ye(e)){return this.converter.convert(e.value,e.$cstNode)}else{(0,Ge.OP)(this.astReflection,e)}return e}constructInfix(e,t){const n=e.parts;if(!Array.isArray(n)||n.length===0){return undefined}const r=e.operators;if(!Array.isArray(r)||n.length<2){return n[0]}let i=0;let s=-1;for(let h=0;h<r.length;h++){const e=r[h];const n=t.get(e)??{precedence:Infinity,rightAssoc:false};if(n.precedence>s){s=n.precedence;i=h}else if(n.precedence===s){if(!n.rightAssoc){i=h}}}const a=r.slice(0,i);const o=r.slice(i+1);const c=n.slice(0,i+1);const l=n.slice(i+1);const u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:a};const f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:o};const d=this.constructInfix(u,t);const p=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:d,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=(0,Ge.XG)(e,a.wh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&(0,a._c)(t.terminal)?t.terminal.isMulti?"multi":"single":undefined})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;if(i==="single"&&typeof n==="string"){a=this.linker.buildReference(s,t,r,n)}else if(i==="multi"&&typeof n==="string"){a=this.linker.buildMultiReference(s,t,r,n)}else{a=n}switch(e){case"=":{s[t]=a;break}case"?=":{s[t]=true;break}case"+=":{if(!Array.isArray(s[t])){s[t]=[]}s[t].push(a)}}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const t=e[r];if(t===undefined){e[r]=i}else if(Array.isArray(t)&&Array.isArray(i)){i.push(...t);e[r]=i}}const n=e.$cstNode;if(n){n.astNode=undefined;e.$cstNode=undefined}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class et{buildMismatchTokenMessage(e){return c.my.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return c.my.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return c.my.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return c.my.buildEarlyExitMessage(e)}}class tt extends et{buildMismatchTokenMessage({expected:e,actual:t}){const n=e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`;return`Expecting ${n} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class nt extends Ze{constructor(){super(...arguments);this.tokens=[];this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}action(){}construct(){return undefined}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});this.tokens=t.tokens;this.wrapper.input=[...this.tokens];this.mainRule.call(this.wrapper,{});this.unorderedGroups.clear();return{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(Qe(e.name),this.startImplementation(t).bind(this));this.allRules.set(e.name,n);if(e.entry){this.mainRule=n}return n}resetState(){this.elementStack=[];this.lastElementStack=[];this.nextTokenIndex=0;this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;this.stackSize=e;return e}resetStackSize(e){this.removeUnexpectedElements();this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t);if(!this.isRecording()){this.lastElementStack=[...this.elementStack,n];this.nextTokenIndex=this.currIdx+1}}subrule(e,t,n,r,i){this.before(r);this.wrapper.wrapSubrule(e,t,i);this.after(r)}before(e){if(!this.isRecording()){this.elementStack.push(e)}}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);if(t>=0){this.elementStack.splice(t)}}}get currIdx(){return this.wrapper.currIdx}}const rt={recoveryEnabled:true,nodeLocationTracking:"full",skipValidations:true,errorMessageProvider:new tt};class it extends c.jr{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,{...rt,lookaheadStrategy:n?new c.T6({maxLookahead:t.maxLookahead}):new he({logging:t.skipValidations?()=>{}:undefined}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,undefined)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}}class st extends it{constructor(e,t,n){super(e,t);this.task=n}rule(e){this.task.start();this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e));this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}}var at=n(73101);var ot=n(64386);function ct(e,t,n){const r={parser:t,tokens:n,ruleNames:new Map};lt(r,e);return t}function lt(e,t){const n=(0,i.YV)(t,false);const r=(0,ot.Td)(t.rules).filter(a.s7).filter((e=>n.has(e)));for(const i of r){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,ft(t,i.definition))}const s=(0,ot.Td)(t.rules).filter(a.NT).filter((e=>n.has(e)));for(const i of s){e.parser.rule(i,ut(e,i))}}function ut(e,t){const n=t.call.rule.ref;if(!n){throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText)}if((0,a.rE)(n)){throw new Error("Cannot use terminal rule in infix expression")}const r=t.operators.precedences.flatMap((e=>e.operators));const i={$type:"Group",elements:[]};const s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call};const o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,o);const c={$type:"Alternatives",elements:r};const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:c};const u={...s,$container:o};o.elements.push(l,u);const f=r.map((t=>e.tokens[t.value]));const d=f.map(((t,n)=>({ALT:()=>e.parser.consume(n,t,l)})));let p;return t=>{p??(p=Et(e,n));e.parser.subrule(0,p,false,s,t);e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,d);e.parser.subrule(1,p,false,u,t)}})}}function ft(e,t,n=false){let r;if((0,a.wb)(t)){r=At(e,t)}else if((0,a.ve)(t)){r=dt(e,t)}else if((0,a.wh)(t)){r=ft(e,t.terminal)}else if((0,a._c)(t)){r=vt(e,t)}else if((0,a.$g)(t)){r=pt(e,t)}else if((0,a.jp)(t)){r=gt(e,t)}else if((0,a.cY)(t)){r=yt(e,t)}else if((0,a.IZ)(t)){r=Tt(e,t)}else if((0,a.FO)(t)){const n=e.consume++;r=()=>e.parser.consume(n,c.LT,t)}else{throw new at.WB(t.$cstNode,`Unexpected element type: ${t.$type}`)}return $t(e,n?undefined:Rt(t),r,t.cardinality)}function dt(e,t){const n=(0,i.Uz)(t);return()=>e.parser.action(n,t)}function pt(e,t){const n=t.rule.ref;if((0,a.cM)(n)){const r=e.subrule++;const i=(0,a.s7)(n)&&n.fragment;const s=t.arguments.length>0?ht(n,t.arguments):()=>({});let o;return a=>{o??(o=Et(e,n));e.parser.subrule(r,o,i,t,s(a))}}else if((0,a.rE)(n)){const r=e.consume++;const i=Ct(e,n.name);return()=>e.parser.consume(r,i,t)}else if(!n){throw new at.WB(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}else{(0,at.dr)(n)}}function ht(e,t){const n=t.some((e=>e.calledByName));if(n){const e=t.map((e=>({parameterName:e.parameter?.ref?.name,predicate:mt(e.value)})));return t=>{const n={};for(const{parameterName:r,predicate:i}of e){if(r){n[r]=i(t)}}return n}}else{const n=t.map((e=>mt(e.value)));return t=>{const r={};for(let i=0;i<n.length;i++){if(i<e.parameters.length){const s=e.parameters[i].name;const a=n[i];r[s]=a(t)}}return r}}}function mt(e){if((0,a.RP)(e)){const t=mt(e.left);const n=mt(e.right);return e=>t(e)||n(e)}else if((0,a.Tu)(e)){const t=mt(e.left);const n=mt(e.right);return e=>t(e)&&n(e)}else if((0,a.Ct)(e)){const t=mt(e.value);return e=>!t(e)}else if((0,a.TF)(e)){const t=e.parameter.ref.name;return e=>e!==undefined&&e[t]===true}else if((0,a.Cz)(e)){const t=Boolean(e.true);return()=>t}(0,at.dr)(e)}function gt(e,t){if(t.elements.length===1){return ft(e,t.elements[0])}else{const n=[];for(const i of t.elements){const t={ALT:ft(e,i,true)};const r=Rt(i);if(r){t.GATE=mt(r)}n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)};const r=e.GATE;if(r){n.GATE=()=>r(t)}return n})))}}function yt(e,t){if(t.elements.length===1){return ft(e,t.elements[0])}const n=[];for(const o of t.elements){const t={ALT:ft(e,o,true)};const r=Rt(o);if(r){t.GATE=mt(r)}n.push(t)}const r=e.or++;const i=(e,t)=>{const n=t.getRuleStack().join("-");return`uGroup_${e}_${n}`};const s=t=>e.parser.alternatives(r,n.map(((n,s)=>{const a={ALT:()=>true};const o=e.parser;a.ALT=()=>{n.ALT(t);if(!o.isRecording()){const e=i(r,o);if(!o.unorderedGroups.get(e)){o.unorderedGroups.set(e,[])}const t=o.unorderedGroups.get(e);if(typeof t?.[s]==="undefined"){t[s]=true}}};const c=n.GATE;if(c){a.GATE=()=>c(t)}else{a.GATE=()=>{const e=o.unorderedGroups.get(i(r,o));const t=!e?.[s];return t}}return a})));const a=$t(e,Rt(t),s,"*");return t=>{a(t);if(!e.parser.isRecording()){e.parser.unorderedGroups.delete(i(r,e.parser))}}}function Tt(e,t){const n=t.elements.map((t=>ft(e,t)));return e=>n.forEach((t=>t(e)))}function Rt(e){if((0,a.IZ)(e)){return e.guardCondition}return undefined}function vt(e,t,n=t.terminal){if(!n){if(!t.type.ref){throw new Error("Could not resolve reference to type: "+t.type.$refText)}const n=(0,i.U5)(t.type.ref);const r=n?.terminal;if(!r){throw new Error("Could not find name assignment for type: "+(0,i.Uz)(t.type.ref))}return vt(e,t,r)}else if((0,a.$g)(n)&&(0,a.s7)(n.rule.ref)){const r=n.rule.ref;const i=e.subrule++;let s;return n=>{s??(s=Et(e,r));e.parser.subrule(i,s,false,t,n)}}else if((0,a.$g)(n)&&(0,a.rE)(n.rule.ref)){const r=e.consume++;const i=Ct(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if((0,a.wb)(n)){const r=e.consume++;const i=Ct(e,n.value);return()=>e.parser.consume(r,i,t)}else{throw new Error("Could not build cross reference parser")}}function At(e,t){const n=e.consume++;const r=e.tokens[t.value];if(!r){throw new Error("Could not find token for keyword: "+t.value)}return()=>e.parser.consume(n,r,t)}function $t(e,t,n,r){const i=t&&mt(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,c.mT)(),GATE:()=>!i(r)}])}else{return n}}if(r==="*"){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else if(r==="+"){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:(0,c.mT)(),GATE:()=>!i(s)}])}else{return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}}else if(r==="?"){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):undefined})}else{(0,at.dr)(r)}}function Et(e,t){const n=kt(e,t);const r=e.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function kt(e,t){if((0,a.cM)(t)){return t.name}else if(e.ruleNames.has(t)){return e.ruleNames.get(t)}else{let n=t;let r=n.$container;let i=t.$type;while(!(0,a.s7)(r)){if((0,a.IZ)(r)||(0,a.jp)(r)||(0,a.cY)(r)){const e=r.elements.indexOf(n);i=e.toString()+":"+i}n=r;r=r.$container}const s=r;i=s.name+":"+i;e.ruleNames.set(t,i);return i}}function Ct(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function St(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new nt(e);ct(t,r,n.definition);r.finalize();return r}function xt(e){const t=wt(e);t.finalize();return t}function wt(e){const t=e.Grammar;const n=e.parser.Lexer;const r=new Je(e);return ct(t,r,n.definition)}var Nt=n(25355);var It=n(14480);var bt=n(59850);var Dt=n(64032);function Lt(){return new Promise((e=>{if(typeof setImmediate==="undefined"){setTimeout(e,0)}else{setImmediate(e)}}))}let Pt=0;let Ot=10;function _t(){Pt=performance.now();return new bt.CancellationTokenSource}function Mt(e){Ot=e}const Ft=Symbol("OperationCancelled");function Ut(e){return e===Ft}async function Gt(e){if(e===bt.CancellationToken.None){return}const t=performance.now();if(t-Pt>=Ot){Pt=t;await Lt();Pt=performance.now()}if(e.isCancellationRequested){throw Ft}}class qt{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{e(t);return this};this.reject=e=>{t(e);return this}}))}}class zt{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start);const n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e){if(zt.isIncremental(n)){const e=Vt(n.range);const t=this.offsetAt(e.start);const r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0);const s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Bt(n.text,false,t);if(s-i===o.length){for(let e=0,t=o.length;e<t;e++){a[e+i+1]=o[e]}}else{if(o.length<1e4){a.splice(i+1,s-i,...o)}else{this._lineOffsets=a=a.slice(0,i+1).concat(o,a.slice(s+1))}}const c=n.text.length-(r-t);if(c!==0){for(let e=i+1+o.length,t=a.length;e<t;e++){a[e]=a[e]+c}}}else if(zt.isFull(n)){this._content=n.text;this._lineOffsets=undefined}else{throw new Error("Unknown change event received")}}this._version=t}getLineOffsets(){if(this._lineOffsets===undefined){this._lineOffsets=Bt(this._content,true)}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return{line:0,character:e}}while(n<r){const i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}const i=n-1;e=this.ensureBeforeEOL(e,t[i]);return{line:i,character:e-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}const n=t[e.line];if(e.character<=0){return n}const r=e.line+1<t.length?t[e.line+1]:this._content.length;const i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){while(e>t&&Wt(this._content.charCodeAt(e-1))){e--}return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range!==undefined&&(t.rangeLength===undefined||typeof t.rangeLength==="number")}static isFull(e){const t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range===undefined&&t.rangeLength===undefined}}var jt;(function(e){function t(e,t,n,r){return new zt(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof zt){e.update(t,n);return e}else{throw new Error("TextDocument.update: document must be created by TextDocument.create")}}e.update=n;function r(e,t){const n=e.getText();const r=Kt(t.map(Ht),((e,t)=>{const n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let i=0;const s=[];for(const a of r){const t=e.offsetAt(a.range.start);if(t<i){throw new Error("Overlapping edit")}else if(t>i){s.push(n.substring(i,t))}if(a.newText.length){s.push(a.newText)}i=e.offsetAt(a.range.end)}s.push(n.substr(i));return s.join("")}e.applyEdits=r})(jt||(jt={}));function Kt(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const i=e.slice(n);Kt(r,t);Kt(i,t);let s=0;let a=0;let o=0;while(s<r.length&&a<i.length){const n=t(r[s],i[a]);if(n<=0){e[o++]=r[s++]}else{e[o++]=i[a++]}}while(s<r.length){e[o++]=r[s++]}while(a<i.length){e[o++]=i[a++]}return e}function Bt(e,t,n=0){const r=t?[n]:[];for(let i=0;i<e.length;i++){const t=e.charCodeAt(i);if(Wt(t)){if(t===13&&i+1<e.length&&e.charCodeAt(i+1)===10){i++}r.push(n+i+1)}}return r}function Wt(e){return e===13||e===10}function Vt(e){const t=e.start;const n=e.end;if(t.line>n.line||t.line===n.line&&t.character>n.character){return{start:n,end:t}}return e}function Ht(e){const t=Vt(e.range);if(t!==e.range){return{newText:e.newText,range:t}}return e}var Yt=n(14247);var Xt=n(65606);var Qt;(function(e){e.basename=Yt.A.basename;e.dirname=Yt.A.dirname;e.extname=Yt.A.extname;e.joinPath=Yt.A.joinPath;e.resolvePath=Yt.A.resolvePath;const t=typeof Xt==="object"&&Xt?.platform==="win32";function n(e,t){return e?.toString()===t?.toString()}e.equals=n;function r(e,n){const r=typeof e==="string"?Yt.r.parse(e).path:e.path;const i=typeof n==="string"?Yt.r.parse(n).path:n.path;const s=r.split("/").filter((e=>e.length>0));const a=i.split("/").filter((e=>e.length>0));if(t){const e=/^[A-Z]:$/;if(s[0]&&e.test(s[0])){s[0]=s[0].toLowerCase()}if(a[0]&&e.test(a[0])){a[0]=a[0].toLowerCase()}if(s[0]!==a[0]){return i.substring(1)}}let o=0;for(;o<s.length;o++){if(s[o]!==a[o]){break}}const c="../".repeat(s.length-o);const l=a.slice(o).join("/");return c+l}e.relative=r;function i(e){return Yt.r.parse(e.toString()).toString()}e.normalize=i;function s(e,t){let n=typeof e==="string"?e:e.path;let r=typeof t==="string"?t:t.path;if(r.charAt(r.length-1)==="/"){r=r.slice(0,-1)}if(n.charAt(n.length-1)==="/"){n=n.slice(0,-1)}if(r===n){return true}if(r.length<n.length){return false}if(r.charAt(n.length)!=="/"){return false}return r.startsWith(n)}e.contains=s})(Qt||(Qt={}));class Zt{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return Qt.normalize(e)}clear(){this.root.children.clear()}insert(e,t){const n=this.getNode(this.normalizeUri(e),true);n.element=t}delete(e){const t=this.getNode(this.normalizeUri(e),false);if(t?.parent){t.parent.children.delete(t.name)}}has(e){return this.getNode(this.normalizeUri(e),false)?.element!==undefined}hasNode(e){return this.getNode(this.normalizeUri(e),false)!==undefined}find(e){return this.getNode(this.normalizeUri(e),false)?.element}findNode(e){const t=this.normalizeUri(e);const n=this.getNode(t,false);if(!n){return undefined}return{name:n.name,uri:Qt.joinPath(Yt.r.parse(t),n.name).toString(),element:n.element}}findChildren(e){const t=this.normalizeUri(e);const n=this.getNode(t,false);if(!n){return[]}return Array.from(n.children.values()).map((e=>({name:e.name,uri:Qt.joinPath(Yt.r.parse(t),e.name).toString(),element:e.element})))}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(Qt.normalize(e),false);if(!t){return[]}return this.collectValues(t)}getNode(e,t){const n=e.split("/");if(e.charAt(e.length-1)==="/"){n.pop()}let r=this.root;for(const i of n){let e=r.children.get(i);if(!e){if(t){e={name:i,children:new Map,parent:r};r.children.set(i,e)}else{return undefined}}r=e}return r}collectValues(e){const t=[];if(e.element){t.push(e.element)}for(const n of e.children.values()){t.push(...this.collectValues(n))}return t}}var Jt;(function(e){e[e["Changed"]=0]="Changed";e[e["Parsed"]=1]="Parsed";e[e["IndexedContent"]=2]="IndexedContent";e[e["ComputedScopes"]=3]="ComputedScopes";e[e["Linked"]=4]="Linked";e[e["IndexedReferences"]=5]="IndexedReferences";e[e["Validated"]=6]="Validated"})(Jt||(Jt={}));class en{constructor(e){this.serviceRegistry=e.ServiceRegistry;this.textDocuments=e.workspace.TextDocuments;this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=bt.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){t=t??Yt.r.parse(e.uri);if(bt.CancellationToken.is(n)){return this.createAsync(t,e,n)}else{return this.create(t,e,n)}}fromString(e,t,n){if(bt.CancellationToken.is(n)){return this.createAsync(t,e,n)}else{return this.create(t,e,n)}}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==="string"){const r=this.parse(e,t,n);return this.createLangiumDocument(r,e,undefined,t)}else if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{const r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==="string"){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,undefined,t)}else{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n){i={parseResult:e,uri:t,state:Jt.Parsed,references:[],textDocument:n}}else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Jt.Parsed,references:[],get textDocument(){return n()}}}e.value.$document=i;return i}async update(e,t){const n=e.parseResult.value.$cstNode?.root.fullText;const r=this.textDocuments?.get(e.uri.toString());const i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r){Object.defineProperty(e,"textDocument",{value:r})}else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}if(n!==i){e.parseResult=await this.parseAsync(e.uri,i,t);e.parseResult.value.$document=e}e.state=Jt.Parsed;return e}parse(e,t,n){const r=this.serviceRegistry.getServices(e);return r.parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){const r=this.serviceRegistry.getServices(e);return r.parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r=undefined;return()=>r??(r=jt.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??""))}}class tn{constructor(e){this.documentTrie=new Zt;this.services=e;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory;this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return(0,ot.Td)(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t)){throw new Error(`A document with the URI '${t}' is already present.`)}this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);if(n){return n}n=await this.langiumDocumentFactory.fromUri(e,t);this.addDocument(n);return n}createDocument(e,t,n){if(n){return this.langiumDocumentFactory.fromString(t,e,n).then((e=>{this.addDocument(e);return e}))}else{const n=this.langiumDocumentFactory.fromString(t,e);this.addDocument(n);return n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString();const n=this.documentTrie.find(t);if(n){this.documentBuilder().resetToState(n,Jt.Changed)}return n}deleteDocument(e){const t=e.toString();const n=this.documentTrie.find(t);if(n){n.state=Jt.Changed;this.documentTrie.delete(t)}return n}deleteDocuments(e){const t=e.toString();const n=this.documentTrie.findAll(t);for(const r of n){r.state=Jt.Changed}this.documentTrie.delete(t);return n}}const nn=Symbol("RefResolving");class rn{constructor(e){this.reflection=e.shared.AstReflection;this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments;this.scopeProvider=e.references.ScopeProvider;this.astNodeLocator=e.workspace.AstNodeLocator;this.profiler=e.shared.profilers.LangiumProfiler;this.languageId=e.LanguageMetaData.languageId}async link(e,t=bt.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,Ge.jm)(e.parseResult.value)){await Gt(t);(0,Ge.DM)(r).forEach((t=>{const i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}}))}}finally{n.stop()}}else{for(const n of(0,Ge.jm)(e.parseResult.value)){await Gt(t);(0,Ge.DM)(n).forEach((t=>this.doLink(t,e)))}}}doLink(e,t){const n=e.reference;if("_ref"in n&&n._ref===undefined){n._ref=nn;try{const t=this.getCandidate(e);if((0,Dt.Zl)(t)){n._ref=t}else{n._nodeDescription=t;const r=this.loadAstNode(t);n._ref=r??this.createLinkingError(e,t)}}catch(r){console.error(`An error occurred while resolving reference to '${n.$refText}':`,r);const t=r.message??String(r);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`}}t.references.push(n)}else if("_items"in n&&n._items===undefined){n._items=nn;try{const t=this.getCandidates(e);const r=[];if((0,Dt.Zl)(t)){n._linkingError=t}else{for(const e of t){const t=this.loadAstNode(e);if(t){r.push({ref:t,$nodeDescription:e})}}}n._items=r}catch(r){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`};n._items=[]}t.references.push(n)}}unlink(e){for(const t of e.references){if("_ref"in t){t._ref=undefined;delete t._nodeDescription}else if("_items"in t){t._items=undefined;delete t._linkingError}}e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e);const n=t.getElement(e.reference.$refText);return n??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e);const n=t.getElements(e.reference.$refText).distinct((e=>`${e.documentUri}#${e.path}`)).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,t,n,r){const i=this;const s={$refNode:n,$refText:r,_ref:undefined,get ref(){if((0,Dt.ng)(this._ref)){return this._ref}else if((0,Dt.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(this._ref===undefined){this._ref=nn;const n=(0,Ge.cQ)(e).$document;const r=i.getLinkedNode({reference:s,container:e,property:t});if(r.error&&n&&n.state<Jt.ComputedScopes){return this._ref=undefined}this._ref=r.node??r.error;this._nodeDescription=r.descr;n?.references.push(this)}else if(this._ref===nn){i.throwCyclicReferenceError(e,t,r)}return(0,Dt.ng)(this._ref)?this._ref:undefined},get $nodeDescription(){return this._nodeDescription},get error(){return(0,Dt.Zl)(this._ref)?this._ref:undefined}};return s}buildMultiReference(e,t,n,r){const i=this;const s={$refNode:n,$refText:r,_items:undefined,get items(){if(Array.isArray(this._items)){return this._items}else if(this._items===undefined){this._items=nn;const n=(0,Ge.cQ)(e).$document;const r=i.getCandidates({reference:s,container:e,property:t});const a=[];if((0,Dt.Zl)(r)){this._linkingError=r}else{for(const e of r){const t=i.loadAstNode(e);if(t){a.push({ref:t,$nodeDescription:e})}}}this._items=a;n?.references.push(this)}else if(this._items===nn){i.throwCyclicReferenceError(e,t,r)}return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError){return this._linkingError}const n=this.items;if(n.length>0){return undefined}else{return this._linkingError=i.createLinkingError({reference:s,container:e,property:t})}}};return s}throwCyclicReferenceError(e,t,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if((0,Dt.Zl)(t)){return{error:t}}const n=this.loadAstNode(t);if(n){return{node:n,descr:t}}else{return{descr:t,error:this.createLinkingError(e,t)}}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node){return e.node}const t=this.langiumDocuments().getDocument(e.documentUri);if(!t){return undefined}return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){const n=(0,Ge.cQ)(e.container).$document;if(n&&n.state<Jt.ComputedScopes){console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`)}const r=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${r} named '${e.reference.$refText}'.`,targetDescription:t}}}function sn(e){return typeof e.name==="string"}class an{getName(e){if(sn(e)){return e.name}return undefined}getNameNode(e){return(0,i.qO)(e.$cstNode,"name")}}class on{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=(0,Ge.jm)(e.Grammar).some((e=>(0,a._c)(e)&&e.isMulti))}findDeclarations(e){if(e){const t=(0,i.Rp)(e);const n=e.astNode;if(t&&n){const r=n[t.feature];if((0,Dt.A_)(r)||(0,Dt.Dm)(r)){return(0,Ge.tC)(r)}else if(Array.isArray(r)){for(const t of r){if(((0,Dt.A_)(t)||(0,Dt.Dm)(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end){return(0,Ge.tC)(t)}}}}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||(0,r.pO)(e,t))){return this.getSelfNodes(n)}}}return[]}getSelfNodes(e){if(!this.hasMultiReference){return[e]}else{const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));const n=this.getNodeFromReferenceDescription(t.head());if(n){for(const t of(0,Ge.DM)(n)){if((0,Dt.Dm)(t.reference)&&t.reference.items.some((t=>t.ref===e))){return t.reference.items.map((e=>e.ref))}}}return[e]}}getNodeFromReferenceDescription(e){if(!e){return undefined}const t=this.documents.getDocument(e.sourceUri);if(t){return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}return undefined}findDeclarationNodes(e){const t=this.findDeclarations(e);const n=[];for(const r of t){const e=this.nameProvider.getNameNode(r)??r.$cstNode;if(e){n.push(e)}}return n}findReferences(e,t){const n=[];if(t.includeDeclaration){n.push(...this.getSelfReferences(e))}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));if(t.documentUri){r=r.filter((e=>Qt.equals(e.sourceUri,t.documentUri)))}n.push(...r);return(0,ot.Td)(n)}getSelfReferences(e){const t=this.getSelfNodes(e);const n=[];for(const i of t){const e=this.nameProvider.getNameNode(i);if(e){const t=(0,Ge.YE)(i);const s=this.nodeLocator.getAstNodePath(i);n.push({sourceUri:t.uri,sourcePath:s,targetUri:t.uri,targetPath:s,segment:(0,r.SX)(e),local:true})}}return n}}class cn{constructor(e){this.map=new Map;if(e){for(const[t,n]of e){this.add(t,n)}}}get size(){return ot.iD.sum((0,ot.Td)(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(t===undefined){return this.map.delete(e)}else{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0){if(n.length===1){this.map.delete(e)}else{n.splice(r,1)}return true}}return false}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?(0,ot.Td)(t):ot.B5}has(e,t){if(t===undefined){return this.map.has(e)}else{const n=this.map.get(e);if(n){return n.indexOf(t)>=0}return false}}add(e,t){if(this.map.has(e)){this.map.get(e).push(t)}else{this.map.set(e,[t])}return this}addAll(e,t){if(this.map.has(e)){this.map.get(e).push(...t)}else{this.map.set(e,Array.from(t))}return this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,ot.Td)(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return(0,ot.Td)(this.map.keys())}values(){return(0,ot.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,ot.Td)(this.map.entries())}}class ln{get size(){return this.map.size}constructor(e){this.map=new Map;this.inverse=new Map;if(e){for(const[t,n]of e){this.set(t,n)}}}clear(){this.map.clear();this.inverse.clear()}set(e,t){this.map.set(e,t);this.inverse.set(t,e);return this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);if(t!==undefined){this.map.delete(e);this.inverse.delete(t);return true}return false}}class un{constructor(e){this.nameProvider=e.references.NameProvider;this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=bt.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,undefined,t)}async collectExportedSymbolsForNode(e,t,n=Ge.VN,r=bt.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const s of n(e)){await Gt(r);this.addExportedSymbol(s,i,t)}return i}addExportedSymbol(e,t,n){const r=this.nameProvider.getName(e);if(r){t.push(this.descriptions.createDescription(e,r,n))}}async collectLocalSymbols(e,t=bt.CancellationToken.None){const n=e.parseResult.value;const r=new cn;for(const i of(0,Ge.Uo)(n)){await Gt(t);this.addLocalSymbol(i,e,r)}return r}addLocalSymbol(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);if(i){n.add(r,this.descriptions.createDescription(e,i,t))}}}}class fn{constructor(e,t,n){this.elements=e;this.outerScope=t;this.caseInsensitive=n?.caseInsensitive??false;this.concatOuterScope=n?.concatOuterScope??true}getAllElements(){if(this.outerScope){return this.elements.concat(this.outerScope.getAllElements())}else{return this.elements}}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.caseInsensitive?this.elements.find((e=>e.name.toLowerCase()===t)):this.elements.find((t=>t.name===e));if(n){return n}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.caseInsensitive?this.elements.filter((e=>e.name.toLowerCase()===t)):this.elements.filter((t=>t.name===e));if((this.concatOuterScope||n.isEmpty())&&this.outerScope){return n.concat(this.outerScope.getElements(e))}else{return n}}}class dn{constructor(e,t,n){this.elements=new Map;this.caseInsensitive=n?.caseInsensitive??false;this.concatOuterScope=n?.concatOuterScope??true;for(const r of e){const e=this.caseInsensitive?r.name.toLowerCase():r.name;this.elements.set(e,r)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t);if(n){return n}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t);const r=n?[n]:[];if((this.concatOuterScope||r.length>0)&&this.outerScope){return stream(r).concat(this.outerScope.getElements(e))}else{return stream(r)}}getAllElements(){let e=stream(this.elements.values());if(this.outerScope){e=e.concat(this.outerScope.getAllElements())}return e}}class pn{constructor(e,t,n){this.elements=new cn;this.caseInsensitive=n?.caseInsensitive??false;this.concatOuterScope=n?.concatOuterScope??true;for(const r of e){const e=this.caseInsensitive?r.name.toLowerCase():r.name;this.elements.add(e,r)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t)[0];if(n){return n}if(this.outerScope){return this.outerScope.getElement(e)}return undefined}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e;const n=this.elements.get(t);if((this.concatOuterScope||n.length===0)&&this.outerScope){return(0,ot.Td)(n).concat(this.outerScope.getElements(e))}else{return(0,ot.Td)(n)}}getAllElements(){let e=(0,ot.Td)(this.elements.values());if(this.outerScope){e=e.concat(this.outerScope.getAllElements())}return e}}const hn={getElement(){return undefined},getElements(){return ot.B5},getAllElements(){return ot.B5}};class mn{constructor(){this.toDispose=[];this.isDisposed=false}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed();this.clear();this.isDisposed=true;this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed){throw new Error("This cache has already been disposed")}}}class gn extends mn{constructor(){super(...arguments);this.cache=new Map}has(e){this.throwIfDisposed();return this.cache.has(e)}set(e,t){this.throwIfDisposed();this.cache.set(e,t)}get(e,t){this.throwIfDisposed();if(this.cache.has(e)){return this.cache.get(e)}else if(t){const n=t();this.cache.set(e,n);return n}else{return undefined}}delete(e){this.throwIfDisposed();return this.cache.delete(e)}clear(){this.throwIfDisposed();this.cache.clear()}}class yn extends mn{constructor(e){super();this.cache=new Map;this.converter=e??(e=>e)}has(e,t){this.throwIfDisposed();return this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed();this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t)){return r.get(t)}else if(n){const e=n();r.set(t,e);return e}else{return undefined}}delete(e,t){this.throwIfDisposed();return this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed();if(e){const t=this.converter(e);this.cache.delete(t)}else{this.cache.clear()}}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);if(!n){n=new Map;this.cache.set(t,n)}return n}}class Tn extends yn{constructor(e,t){super((e=>e.toString()));if(t){this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,(e=>{this.clear(e.uri.toString())})));this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(((e,t)=>{for(const n of t){this.clear(n)}})))}else{this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(((e,t)=>{const n=e.concat(t);for(const r of n){this.clear(r)}})))}}}class Rn extends gn{constructor(e,t){super();if(t){this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,(()=>{this.clear()})));this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(((e,t)=>{if(t.length>0){this.clear()}})))}else{this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}}class vn{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 Rn(e.shared)}getScope(e){const t=[];const n=this.reflection.getReferenceType(e);const r=(0,Ge.YE)(e.container).localSymbols;if(r){let i=e.container;do{if(r.has(i)){t.push(r.getStream(i).filter((e=>this.reflection.isSubtype(e.type,n))))}i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--){i=this.createScope(t[s],i)}return i}createScope(e,t,n){return new fn((0,ot.Td)(e),t,n)}createScopeForNodes(e,t,n){const r=(0,ot.Td)(e).map((e=>{const t=this.nameProvider.getName(e);if(t){return this.descriptions.createDescription(e,t)}return undefined})).nonNullable();return new fn(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new pn(this.indexManager.allElements(e))))}}function An(e){return typeof e.$comment==="string"}function $n(e){return typeof e==="object"&&!!e&&("$ref"in e||"$error"in e)}class En{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]);this.langiumDocuments=e.shared.workspace.LangiumDocuments;this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider;this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const n=t??{};const r=t?.replacer;const i=(e,t)=>this.replacer(e,t,n);const s=r?(e,t)=>r(e,t,i):i;try{this.currentDocument=(0,Ge.YE)(e);return JSON.stringify(e,s,t?.space)}finally{this.currentDocument=undefined}}deserialize(e,t){const n=t??{};const r=JSON.parse(e);this.linkNode(r,r,n);return r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:s,uriConverter:a}){if(this.ignoreProperties.has(e)){return undefined}else if((0,Dt.A_)(t)){const e=t.ref;const r=n?t.$refText:undefined;if(e){const t=(0,Ge.YE)(e);let n="";if(this.currentDocument&&this.currentDocument!==t){if(a){n=a(t.uri,e)}else{n=t.uri.toString()}}const i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else{return{$error:t.error?.message??"Could not resolve reference",$refText:r}}}else if((0,Dt.Dm)(t)){const e=n?t.$refText:undefined;const r=[];for(const n of t.items){const e=n.ref;const t=(0,Ge.YE)(n.ref);let i="";if(this.currentDocument&&this.currentDocument!==t){if(a){i=a(t.uri,e)}else{i=t.uri.toString()}}const s=this.astNodeLocator.getAstNodePath(e);r.push(`${i}#${s}`)}return{$refs:r,$refText:e}}else if((0,Dt.ng)(t)){let n=undefined;if(i){n=this.addAstNodeRegionWithAssignmentsTo({...t});if((!e||t.$document)&&n?.$textRegion){n.$textRegion.documentURI=this.currentDocument?.uri.toString()}}if(r&&!e){n??(n={...t});n.$sourceText=t.$cstNode?.text}if(s){n??(n={...t});const e=this.commentProvider.getComment(t);if(e){n.$comment=e.replace(/\r/g,"")}}return n??t}else{return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=e.$textRegion=t(e.$cstNode);const r=n.assignments={};Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((n=>{const s=(0,i.Bd)(e.$cstNode,n).map(t);if(s.length!==0){r[n]=s}}));return e}return undefined}linkNode(e,t,n,r,i,s){for(const[o,c]of Object.entries(e)){if(Array.isArray(c)){for(let r=0;r<c.length;r++){const i=c[r];if($n(i)){c[r]=this.reviveReference(e,o,t,i,n)}else if((0,Dt.ng)(i)){this.linkNode(i,t,n,e,o,r)}}}else if($n(c)){e[o]=this.reviveReference(e,o,t,c,n)}else if((0,Dt.ng)(c)){this.linkNode(c,t,n,e,o)}}const a=e;a.$container=r;a.$containerProperty=i;a.$containerIndex=s}reviveReference(e,t,n,r,i){let s=r.$refText;let a=r.$error;let o;if(r.$ref){const e=this.getRefNode(n,r.$ref,i.uriConverter);if((0,Dt.ng)(e)){if(!s){s=this.nameProvider.getName(e)}return{$refText:s??"",ref:e}}else{a=e}}else if(r.$refs){const e=[];for(const t of r.$refs){const r=this.getRefNode(n,t,i.uriConverter);if((0,Dt.ng)(r)){e.push({ref:r})}}if(e.length===0){o={$refText:s??"",items:e};a??(a="Could not resolve multi-reference")}else{return{$refText:s??"",items:e}}}if(a){o??(o={$refText:s??"",ref:undefined});o.error={info:{container:e,property:t,reference:o},message:a};return o}else{return undefined}}getRefNode(e,t,n){try{const r=t.indexOf("#");if(r===0){const n=this.astNodeLocator.getAstNode(e,t.substring(1));if(!n){return"Could not resolve path: "+t}return n}if(r<0){const e=n?n(t):Yt.r.parse(t);const r=this.langiumDocuments.getDocument(e);if(!r){return"Could not find document for URI: "+t}return r.parseResult.value}const i=n?n(t.substring(0,r)):Yt.r.parse(t.substring(0,r));const s=this.langiumDocuments.getDocument(i);if(!s){return"Could not find document for URI: "+t}if(r===t.length-1){return s.parseResult.value}const a=this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(r+1));if(!a){return"Could not resolve URI: "+t}return a}catch(r){return String(r)}}}class kn{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map;this.fileExtensionMap=new Map;this.fileNameMap=new Map;this.textDocuments=e?.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const n of t.fileExtensions){if(this.fileExtensionMap.has(n)){console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`)}this.fileExtensionMap.set(n,e)}if(t.fileNames){for(const n of t.fileNames){if(this.fileNameMap.has(n)){console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`)}this.fileNameMap.set(n,e)}}this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0){throw new Error("The service registry is empty. Use `register` to register the services of a language.")}const t=this.textDocuments?.get(e)?.languageId;if(t!==undefined){const e=this.languageIdMap.get(t);if(e){return e}}const n=Qt.extname(e);const r=Qt.basename(e);const i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i){if(t){throw new Error(`The service registry contains no services for the extension '${n}' for language '${t}'.`)}else{throw new Error(`The service registry contains no services for the extension '${n}'.`)}}return i}hasServices(e){try{this.getServices(e);return true}catch{return false}}get all(){return Array.from(this.languageIdMap.values())}}function Cn(e){return{code:e}}var Sn;(function(e){e.defaults=["fast","slow","built-in"];e.all=e.defaults})(Sn||(Sn={}));class xn{constructor(e){this.entries=new cn;this.knownCategories=new Set(Sn.defaults);this.entriesBefore=[];this.entriesAfter=[];this.reflection=e.shared.AstReflection}register(e,t=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[r,i]of Object.entries(e)){const e=i;if(Array.isArray(e)){for(const i of e){const e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}}else if(typeof e==="function"){const i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else{(0,at.dr)(e)}}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException((()=>e.call(t,n,r,i)),"An error occurred during validation",r,n)}}async handleException(e,t,n,r){try{await e()}catch(i){if(Ut(i)){throw i}console.error(`${t}:`,i);if(i instanceof Error&&i.stack){console.error(i.stack)}const e=i instanceof Error?i.message:String(i);n("error",`${t}: ${e}`,{node:r})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const n of this.reflection.getAllSubTypes(e)){this.entries.add(n,t)}}getChecks(e,t){let n=(0,ot.Td)(this.entries.get(e)).concat(this.entries.get("AstNode"));if(t){n=n.filter((e=>t.includes(e.category)))}return n.map((e=>e.check))}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,n){return async(r,i,s,a)=>{await this.handleException((()=>e.call(n,r,i,s,a)),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const wn=Object.freeze({validateNode:true,validateChildren:true});class Nn{constructor(e){this.validationRegistry=e.validation.ValidationRegistry;this.metadata=e.LanguageMetaData;this.profiler=e.shared.profilers.LangiumProfiler;this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=bt.CancellationToken.None){const r=e.parseResult;const i=[];await Gt(n);if(!t.categories||t.categories.includes("built-in")){this.processLexingErrors(r,i,t);if(t.stopAfterLexingErrors&&i.some((e=>e.data?.code===Ln.LexingError))){return i}this.processParsingErrors(r,i,t);if(t.stopAfterParsingErrors&&i.some((e=>e.data?.code===Ln.ParsingError))){return i}this.processLinkingErrors(e,i,t);if(t.stopAfterLinkingErrors&&i.some((e=>e.data?.code===Ln.LinkingError))){return i}}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Ut(s)){throw s}console.error("An error occurred during validation:",s)}await Gt(n);return i}processLexingErrors(e,t,n){const r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const i of r){const e=i.severity??"error";const n={severity:bn(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Dn(e),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,n){for(const i of e.parserErrors){let e=undefined;if(isNaN(i.token.startOffset)){if("previousToken"in i){const t=i.previousToken;if(!isNaN(t.startOffset)){const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}else{const t={line:0,character:0};e={start:t,end:t}}}}else{e=(0,r.wf)(i.token)}if(e){const n={severity:bn("error"),range:e,message:i.message,data:Cn(Ln.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.info.container,range:r.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:Ln.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=bt.CancellationToken.None){const r=[];const i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};await this.validateAstBefore(e,t,i,n);await this.validateAstNodes(e,t,i,n);await this.validateAstAfter(e,t,i,n);return r}async validateAstBefore(e,t,n,r=bt.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const s of i){await Gt(r);await s(e,n,t.categories??[],r)}}async validateAstNodes(e,t,n,r=bt.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const s=(0,Ge.jm)(e).iterator();for(const e of s){i.startSubTask(e.$type);const a=this.validateSingleNodeOptions(e,t);if(a.validateNode){try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i){await t(e,n,r)}}finally{i.stopSubTask(e.$type)}}if(!a.validateChildren){s.prune()}}}finally{i.stop()}}else{const i=(0,Ge.jm)(e).iterator();for(const e of i){await Gt(r);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i){await t(e,n,r)}}if(!s.validateChildren){i.prune()}}}}validateSingleNodeOptions(e,t){return wn}async validateAstAfter(e,t,n,r=bt.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const s of i){await Gt(r);await s(e,n,t.categories??[],r)}}toDiagnostic(e,t,n){return{message:t,range:In(n),severity:bn(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function In(e){if(e.range){return e.range}let t;if(typeof e.property==="string"){t=(0,i.qO)(e.node.$cstNode,e.property,e.index)}else if(typeof e.keyword==="string"){t=(0,i.SS)(e.node.$cstNode,e.keyword,e.index)}t??(t=e.node.$cstNode);if(!t){return{start:{line:0,character:0},end:{line:0,character:0}}}return t.range}function bn(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function Dn(e){switch(e){case"error":return Cn(Ln.LexingError);case"warning":return Cn(Ln.LexingWarning);case"info":return Cn(Ln.LexingInfo);case"hint":return Cn(Ln.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var Ln;(function(e){e.LexingError="lexing-error";e.LexingWarning="lexing-warning";e.LexingInfo="lexing-info";e.LexingHint="lexing-hint";e.ParsingError="parsing-error";e.LinkingError="linking-error"})(Ln||(Ln={}));class Pn{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator;this.nameProvider=e.references.NameProvider}createDescription(e,t,n){const i=n??(0,Ge.YE)(e);t??(t=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!t){throw new Error(`Node at path ${s} has no name.`)}let a;const o=()=>a??(a=(0,r.SX)(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:t,get nameSegment(){return o()},selectionSegment:(0,r.SX)(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class On{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=bt.CancellationToken.None){const n=[];const r=e.parseResult.value;for(const i of(0,Ge.jm)(r)){await Gt(t);(0,Ge.DM)(i).forEach((e=>{if(!e.reference.error){n.push(...this.createInfoDescriptions(e))}}))}return n}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode){return[]}let n=[];if((0,Dt.A_)(t)&&t.$nodeDescription){n=[t.$nodeDescription]}else if((0,Dt.Dm)(t)){n=t.items.map((e=>e.$nodeDescription)).filter((e=>e!==undefined))}const i=(0,Ge.YE)(e.container).uri;const s=this.nodeLocator.getAstNodePath(e.container);const a=[];const o=(0,r.SX)(t.$refNode);for(const r of n){a.push({sourceUri:i,sourcePath:s,targetUri:r.documentUri,targetPath:r.path,segment:o,local:Qt.equals(r.documentUri,i)})}return a}}class _n{constructor(){this.segmentSeparator="/";this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container);const n=this.getPathSegment(e);const r=t+this.segmentSeparator+n;return r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e){throw new Error("Missing '$containerProperty' in AST node.")}if(t!==undefined){return e+this.indexSeparator+t}return e}getAstNode(e,t){const n=t.split(this.segmentSeparator);return n.reduce(((e,t)=>{if(!e||t.length===0){return e}const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n);const i=parseInt(t.substring(n+1));const s=e[r];return s?.[i]}return e[t]}),e)}}var Mn=n(62676);class Fn{constructor(e){this._ready=new qt;this.onConfigurationSectionUpdateEmitter=new Mn.Emitter;this.settings={};this.workspaceConfig=false;this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??false}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})));const n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){if(typeof e.settings!=="object"||e.settings===null){return}Object.entries(e.settings).forEach((([e,t])=>{this.updateSectionConfiguration(e,t);this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n]){return this.settings[n][t]}}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var Un=n(54512);var Gn;(function(e){function t(e){return{dispose:async()=>await e()}}e.create=t})(Gn||(Gn={}));class qn{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}};this.updateListeners=[];this.buildPhaseListeners=new cn;this.documentPhaseListeners=new cn;this.buildState=new Map;this.documentBuildWaiters=new Map;this.currentState=Jt.Changed;this.langiumDocuments=e.workspace.LangiumDocuments;this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory;this.textDocuments=e.workspace.TextDocuments;this.indexManager=e.workspace.IndexManager;this.fileSystemProvider=e.workspace.FileSystemProvider;this.workspaceManager=()=>e.workspace.WorkspaceManager;this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=bt.CancellationToken.None){for(const r of e){const e=r.uri.toString();if(r.state===Jt.Validated){if(typeof t.validation==="boolean"&&t.validation){this.resetToState(r,Jt.IndexedReferences)}else if(typeof t.validation==="object"){const n=this.findMissingValidationCategories(r,t);if(n.length>0){this.buildState.set(e,{completed:false,options:{validation:{categories:n}},result:this.buildState.get(e)?.result});r.state=Jt.IndexedReferences}}}else{this.buildState.delete(e)}}this.currentState=Jt.Changed;await this.emitUpdate(e.map((e=>e.uri)),[]);await this.buildDocuments(e,t,n)}async update(e,t,n=bt.CancellationToken.None){this.currentState=Jt.Changed;const r=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e){r.push(t.uri);this.cleanUpDeleted(t)}}const i=(await Promise.all(e.map((e=>this.findChangedUris(e))))).flat();for(const o of i){let e=this.langiumDocuments.getDocument(o);if(e===undefined){e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o);e.state=Jt.Changed;this.langiumDocuments.addDocument(e)}this.resetToState(e,Jt.Changed)}const s=(0,ot.Td)(i).concat(r).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s))).forEach((e=>this.resetToState(e,Jt.ComputedScopes)));await this.emitUpdate(i,r);await Gt(n);const a=this.sortDocuments(this.langiumDocuments.all.filter((e=>e.state<Jt.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions))).toArray());await this.buildDocuments(a,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){const n=this.buildState.get(e.uri.toString());const r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e);const i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;const s=t===undefined||t.validation===true?r:typeof t.validation==="object"?t.validation.categories??r:[];return(0,ot.Td)(s).filter((e=>!i.has(e))).toArray()}async findChangedUris(e){const t=this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e);if(t){return[e]}try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){const t=await this.workspaceManager().searchFolder(e);return t}else if(this.workspaceManager().shouldIncludeEntry(t)){return[e]}}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map((n=>n(e,t))))}sortDocuments(e){let t=0;let n=e.length-1;while(t<n){while(t<e.length&&this.hasTextDocument(e[t])){t++}while(n>=0&&!this.hasTextDocument(e[n])){n--}if(t<n){[e[t],e[n]]=[e[n],e[t]]}}return e}hasTextDocument(e){return Boolean(this.textDocuments?.get(e.uri))}shouldRelink(e,t){if(e.references.some((e=>e.error!==undefined))){return true}return this.indexManager.isAffected(e,t)}onUpdate(e){this.updateListeners.push(e);return Gn.create((()=>{const t=this.updateListeners.indexOf(e);if(t>=0){this.updateListeners.splice(t,1)}}))}resetToState(e,t){switch(t){case Jt.Changed:{}case Jt.Parsed:this.indexManager.removeContent(e.uri);case Jt.IndexedContent:e.localSymbols=undefined;case Jt.ComputedScopes:{const t=this.serviceRegistry.getServices(e.uri).references.Linker;t.unlink(e)}case Jt.Linked:this.indexManager.removeReferences(e.uri);case Jt.IndexedReferences:e.diagnostics=undefined;this.buildState.delete(e.uri.toString());case Jt.Validated:}if(e.state>t){e.state=t}}cleanUpDeleted(e){this.buildState.delete(e.uri.toString());this.indexManager.remove(e.uri);e.state=Jt.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t);await this.runCancelable(e,Jt.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n)));await this.runCancelable(e,Jt.IndexedContent,n,(e=>this.indexManager.updateContent(e,n)));await this.runCancelable(e,Jt.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,n)}));const r=e.filter((e=>this.shouldLink(e)));await this.runCancelable(r,Jt.Linked,n,(e=>{const t=this.serviceRegistry.getServices(e.uri).references.Linker;return t.link(e,n)}));await this.runCancelable(r,Jt.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const i=e.filter((e=>{if(this.shouldValidate(e)){return true}else{this.markAsCompleted(e);return false}}));await this.runCancelable(i,Jt.Validated,n,(async e=>{await this.validate(e,n);this.markAsCompleted(e)}))}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());if(t){t.completed=true}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString();const r=this.buildState.get(e);if(!r||r.completed){this.buildState.set(e,{completed:false,options:t,result:r?.result})}else{}}}async runCancelable(e,t,n,r){for(const s of e){if(s.state<t){await Gt(n);await r(s);s.state=t;await this.notifyDocumentPhase(s,t,n)}}const i=e.filter((e=>e.state===t));await this.notifyBuildPhase(i,t,n);this.currentState=t}onBuildPhase(e,t){this.buildPhaseListeners.add(e,t);return Gn.create((()=>{this.buildPhaseListeners.delete(e,t)}))}onDocumentPhase(e,t){this.documentPhaseListeners.add(e,t);return Gn.create((()=>{this.documentPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r=undefined;if(t&&"path"in t){r=t}else{n=t}n??(n=bt.CancellationToken.None);if(r){return this.awaitDocumentState(e,r,n)}else{return this.awaitBuilderState(e,n)}}awaitDocumentState(e,t,n){const r=this.langiumDocuments.getDocument(t);if(!r){return Promise.reject(new Un.ResponseError(Un.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}else if(r.state>=e){return Promise.resolve(t)}else if(n.isCancellationRequested){return Promise.reject(Ft)}else if(this.currentState>=e&&e>r.state){return Promise.reject(new Un.ResponseError(Un.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Jt[r.state]}, requiring ${Jt[e]}, but workspace state is already ${Jt[this.currentState]}. Returning undefined.`))}return new Promise(((r,i)=>{const s=this.onDocumentPhase(e,(e=>{if(Qt.equals(e.uri,t)){s.dispose();a.dispose();r(e.uri)}}));const a=n.onCancellationRequested((()=>{s.dispose();a.dispose();i(Ft)}))}))}awaitBuilderState(e,t){if(this.currentState>=e){return Promise.resolve()}else if(t.isCancellationRequested){return Promise.reject(Ft)}return new Promise(((n,r)=>{const i=this.onBuildPhase(e,(()=>{i.dispose();s.dispose();n()}));const s=t.onCancellationRequested((()=>{i.dispose();s.dispose();r(Ft)}))}))}async notifyDocumentPhase(e,t,n){const r=this.documentPhaseListeners.get(t);const i=r.slice();for(const a of i){try{await Gt(n);await a(e,n)}catch(s){if(!Ut(s)){throw s}}}}async notifyBuildPhase(e,t,n){if(e.length===0){return}const r=this.buildPhaseListeners.get(t);const i=r.slice();for(const s of i){await Gt(n);await s(e,n)}}shouldLink(e){return this.getBuildOptions(e).eagerLinking??true}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator;const r=this.getBuildOptions(e);const i=typeof r.validation==="object"?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);const s=await n.validateDocument(e,i,t);if(e.diagnostics){e.diagnostics.push(...s)}else{e.diagnostics=s}const a=this.buildState.get(e.uri.toString());if(a){a.result??(a.result={});if(a.result.validationChecks){a.result.validationChecks=(0,ot.Td)(a.result.validationChecks).concat(i.categories).distinct().toArray()}else{a.result.validationChecks=[...i.categories]}}}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class zn{constructor(e){this.symbolIndex=new Map;this.symbolByTypeIndex=new yn;this.referenceIndex=new Map;this.documents=e.workspace.LangiumDocuments;this.serviceRegistry=e.ServiceRegistry;this.astReflection=e.AstReflection}findAllReferences(e,t){const n=(0,Ge.YE)(e).uri;const r=[];this.referenceIndex.forEach((e=>{e.forEach((e=>{if(Qt.equals(e.targetUri,n)&&e.targetPath===t){r.push(e)}}))}));return(0,ot.Td)(r)}allElements(e,t){let n=(0,ot.Td)(this.symbolIndex.keys());if(t){n=n.filter((e=>!t||t.has(e)))}return n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){if(!t){return this.symbolIndex.get(e)??[]}const n=this.symbolByTypeIndex.get(e,t,(()=>{const n=this.symbolIndex.get(e)??[];return n.filter((e=>this.astReflection.isSubtype(e.type,t)))}));return n}remove(e){this.removeContent(e);this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t);this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=bt.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.references.ScopeComputation.collectExportedSymbols(e,t);const i=e.uri.toString();this.symbolIndex.set(i,r);this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=bt.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri);const r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());if(!n){return false}return n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class jn{constructor(e){this.initialBuildOptions={};this._ready=new qt;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??undefined}initialized(e){return this.mutex.write((e=>this.initializeWorkspace(this.folders??[],e)))}async initializeWorkspace(e,t=bt.CancellationToken.None){const n=await this.performStartup(e);await Gt(t);await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=[];const n=e=>{t.push(e);if(!this.langiumDocuments.hasDocument(e.uri)){this.langiumDocuments.addDocument(e)}};await this.loadAdditionalDocuments(e,n);const r=[];await Promise.all(e.map((e=>this.getRootFolder(e))).map((async e=>this.traverseFolder(e,r))));const i=(0,ot.Td)(r).distinct((e=>e.toString())).filter((e=>!this.langiumDocuments.hasDocument(e)));await this.loadWorkspaceDocuments(i,n);this._ready.resolve();return t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map((async e=>{const n=await this.langiumDocuments.getOrCreateDocument(e);t(n)})))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Yt.r.parse(e.uri)}async traverseFolder(e,t){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map((async e=>{if(this.shouldIncludeEntry(e)){if(e.isDirectory){await this.traverseFolder(e.uri,t)}else if(e.isFile){t.push(e.uri)}}})))}catch(n){console.error("Failure to read directory content of "+e.toString(true),n)}}async searchFolder(e){const t=[];await this.traverseFolder(e,t);return t}shouldIncludeEntry(e){const t=Qt.basename(e.uri);if(t.startsWith(".")){return false}if(e.isDirectory){return t!=="node_modules"&&t!=="out"}else if(e.isFile){return this.serviceRegistry.hasServices(e.uri)}return false}}class Kn{buildUnexpectedCharactersMessage(e,t,n,r,i){return c.PW.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return c.PW.buildUnableToPopLexerModeMessage(e)}}const Bn={mode:"full"};class Wn{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider;this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Yn(t)?Object.values(t):t;const r=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new c.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Bn){const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Yn(e))return e;const t=Hn(e)?Object.values(e.modes).flat():e;const n={};t.forEach((e=>n[e.name]=e));return n}}function Vn(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function Hn(e){return e&&"modes"in e&&"defaultMode"in e}function Yn(e){return!Vn(e)&&!Hn(e)}function Xn(e,t,n){let r;let i;if(typeof e==="string"){i=t;r=n}else{i=e.range.start;r=t}if(!i){i=qe.Position.create(0,0)}const s=Zn(e);const a=hr(r);const o=tr({lines:s,position:i,options:a});return or({index:0,tokens:o,position:i})}function Qn(e,t){const n=hr(t);const r=Zn(e);if(r.length===0){return false}const i=r[0];const s=r[r.length-1];const a=n.start;const o=n.end;return Boolean(a?.exec(i))&&Boolean(o?.exec(s))}function Zn(e){let t="";if(typeof e==="string"){t=e}else{t=e.text}const n=t.split(s.TH);return n}const Jn=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy;const er=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function tr(e){const t=[];let n=e.position.line;let r=e.position.character;for(let i=0;i<e.lines.length;i++){const s=i===0;const a=i===e.lines.length-1;let o=e.lines[i];let c=0;if(s&&e.options.start){const t=e.options.start?.exec(o);if(t){c=t.index+t[0].length}}else{const t=e.options.line?.exec(o);if(t){c=t.index+t[0].length}}if(a){const t=e.options.end?.exec(o);if(t){o=o.substring(0,t.index)}}o=o.substring(0,ar(o));const l=sr(o,c);if(l>=o.length){if(t.length>0){const e=qe.Position.create(n,r);t.push({type:"break",content:"",range:qe.Range.create(e,e)})}}else{Jn.lastIndex=c;const e=Jn.exec(o);if(e){const i=e[0];const s=e[1];const a=qe.Position.create(n,r+c);const l=qe.Position.create(n,r+c+i.length);t.push({type:"tag",content:s,range:qe.Range.create(a,l)});c+=i.length;c=sr(o,c)}if(c<o.length){const e=o.substring(c);const i=Array.from(e.matchAll(er));t.push(...nr(i,e,n,r+c))}}n++;r=0}if(t.length>0&&t[t.length-1].type==="break"){return t.slice(0,-1)}return t}function nr(e,t,n,r){const i=[];if(e.length===0){const e=qe.Position.create(n,r);const s=qe.Position.create(n,r+t.length);i.push({type:"text",content:t,range:qe.Range.create(e,s)})}else{let s=0;for(const o of e){const e=o.index;const a=t.substring(s,e);if(a.length>0){i.push({type:"text",content:t.substring(s,e),range:qe.Range.create(qe.Position.create(n,s+r),qe.Position.create(n,e+r))})}let c=a.length+1;const l=o[1];i.push({type:"inline-tag",content:l,range:qe.Range.create(qe.Position.create(n,s+c+r),qe.Position.create(n,s+c+l.length+r))});c+=l.length;if(o.length===4){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:qe.Range.create(qe.Position.create(n,s+c+r),qe.Position.create(n,s+c+e.length+r))})}else{i.push({type:"text",content:"",range:qe.Range.create(qe.Position.create(n,s+c+r),qe.Position.create(n,s+c+r))})}s=e+o[0].length}const a=t.substring(s);if(a.length>0){i.push({type:"text",content:a,range:qe.Range.create(qe.Position.create(n,s+r),qe.Position.create(n,s+r+a.length))})}}return i}const rr=/\S/;const ir=/\s*$/;function sr(e,t){const n=e.substring(t).match(rr);if(n){return t+n.index}else{return e.length}}function ar(e){const t=e.match(ir);if(t&&typeof t.index==="number"){return t.index}return undefined}function or(e){const t=qe.Position.create(e.position.line,e.position.character);if(e.tokens.length===0){return new gr([],qe.Range.create(t,t))}const n=[];while(e.index<e.tokens.length){const t=cr(e,n[n.length-1]);if(t){n.push(t)}}const r=n[0]?.range.start??t;const i=n[n.length-1]?.range.end??t;return new gr(n,qe.Range.create(r,i))}function cr(e,t){const n=e.tokens[e.index];if(n.type==="tag"){return dr(e,false)}else if(n.type==="text"||n.type==="inline-tag"){return ur(e)}else{lr(n,t);e.index++;return undefined}}function lr(e,t){if(t){const n=new Ar("",e.range);if("inlines"in t){t.inlines.push(n)}else{t.content.inlines.push(n)}}}function ur(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];while(t&&t.type!=="break"&&t.type!=="tag"){i.push(fr(e));r=t;t=e.tokens[e.index]}return new vr(i,qe.Range.create(n.range.start,r.range.end))}function fr(e){const t=e.tokens[e.index];if(t.type==="inline-tag"){return dr(e,true)}else{return pr(e)}}function dr(e,t){const n=e.tokens[e.index++];const r=n.content.substring(1);const i=e.tokens[e.index];if(i?.type==="text"){if(t){const i=pr(e);return new yr(r,new vr([i],i.range),t,qe.Range.create(n.range.start,i.range.end))}else{const i=ur(e);return new yr(r,i,t,qe.Range.create(n.range.start,i.range.end))}}else{const e=n.range;return new yr(r,new vr([],e),t,e)}}function pr(e){const t=e.tokens[e.index++];return new Ar(t.content,t.range)}function hr(e){if(!e){return hr({start:"/**",end:"*/",line:"*"})}const{start:t,end:n,line:r}=e;return{start:mr(t,true),end:mr(n,false),line:mr(r,true)}}function mr(e,t){if(typeof e==="string"||typeof e==="object"){const n=typeof e==="string"?(0,s.Nt)(e):e.source;if(t){return new RegExp(`^\\s*${n}`)}else{return new RegExp(`\\s*${n}\\s*$`)}}else{return e}}class gr{constructor(e,t){this.elements=e;this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements){if(e.length===0){e=t.toString()}else{const n=t.toString();e+=$r(e)+n}}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements){if(t.length===0){t=n.toMarkdown(e)}else{const r=n.toMarkdown(e);t+=$r(t)+r}}return t.trim()}}class yr{constructor(e,t,n,r){this.name=e;this.content=t;this.inline=n;this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();if(this.content.inlines.length===1){e=`${e} ${t}`}else if(this.content.inlines.length>1){e=`${e}\n${t}`}if(this.inline){return`{${e}}`}else{return e}}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=Tr(this.name,t,e??{});if(typeof n==="string"){return n}}let n="";if(e?.tag==="italic"||e?.tag===undefined){n="*"}else if(e?.tag==="bold"){n="**"}else if(e?.tag==="bold-italic"){n="***"}let r=`${n}@${this.name}${n}`;if(this.content.inlines.length===1){r=`${r} — ${t}`}else if(this.content.inlines.length>1){r=`${r}\n${t}`}if(this.inline){return`{${r}}`}else{return r}}}function Tr(e,t,n){if(e==="linkplain"||e==="linkcode"||e==="link"){const r=t.indexOf(" ");let i=t;if(r>0){const e=sr(t,r);i=t.substring(e);t=t.substring(0,r)}if(e==="linkcode"||e==="link"&&n.link==="code"){i=`\`${i}\``}const s=n.renderLink?.(t,i)??Rr(t,i);return s}return undefined}function Rr(e,t){try{Yt.r.parse(e,true);return`[${t}](${e})`}catch{return e}}class vr{constructor(e,t){this.inlines=e;this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const n=this.inlines[t];const r=this.inlines[t+1];e+=n.toString();if(r&&r.range.start.line>n.range.start.line){e+="\n"}}return e}toMarkdown(e){let t="";for(let n=0;n<this.inlines.length;n++){const r=this.inlines[n];const i=this.inlines[n+1];t+=r.toMarkdown(e);if(i&&i.range.start.line>r.range.start.line){t+="\n"}}return t}}class Ar{constructor(e,t){this.text=e;this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function $r(e){if(e.endsWith("\n")){return"\n"}else{return"\n\n"}}class Er{constructor(e){this.indexManager=e.shared.workspace.IndexManager;this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&Qn(t)){const n=Xn(t);return n.toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}return undefined}documentationLinkRenderer(e,t,n){const r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){const e=r.nameSegment.range.start.line+1;const t=r.nameSegment.range.start.character+1;const i=r.documentUri.with({fragment:`L${e},${t}`});return`[${n}](${i.toString()})`}else{return undefined}}documentationTagRenderer(e,t){return undefined}findNameInLocalSymbols(e,t){const n=(0,Ge.YE)(e);const r=n.localSymbols;if(!r){return undefined}let i=e;do{const e=r.getStream(i);const n=e.find((e=>e.name===t));if(n){return n}i=i.$container}while(i);return undefined}findNameInGlobalScope(e,t){const n=this.indexManager.allElements().find((e=>e.name===t));return n}}class kr{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){if(An(e)){return e.$comment}return(0,r.v)(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class Cr{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}}class Sr{constructor(e){this.threadCount=8;this.terminationDelay=200;this.workerPool=[];this.queue=[];this.hydrator=e.serializer.Hydrator}initializeWorkers(){while(this.workerPool.length<this.threadCount){const e=this.createWorker();e.onReady((()=>{if(this.queue.length>0){const t=this.queue.shift();if(t){e.lock();t.resolve(e)}}}));this.workerPool.push(e)}}async parse(e,t){const n=await this.acquireParserWorker(t);const r=new Deferred;let i;const s=t.onCancellationRequested((()=>{i=setTimeout((()=>{this.terminateWorker(n)}),this.terminationDelay)}));n.parse(e).then((e=>{const t=this.hydrator.hydrate(e);r.resolve(t)})).catch((e=>{r.reject(e)})).finally((()=>{s.dispose();clearTimeout(i)}));return r.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);if(t>=0){this.workerPool.splice(t,1)}}async acquireParserWorker(e){this.initializeWorkers();for(const n of this.workerPool){if(n.ready){n.lock();return n}}const t=new Deferred;e.onCancellationRequested((()=>{const e=this.queue.indexOf(t);if(e>=0){this.queue.splice(e,1)}t.reject(OperationCancelled)}));this.queue.push(t);return t.promise}}class xr{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new Emitter;this.deferred=new Deferred;this._ready=true;this._parsing=false;this.sendMessage=e;this._terminate=r;t((e=>{const t=e;this.deferred.resolve(t);this.unlock()}));n((e=>{this.deferred.reject(e);this.unlock()}))}terminate(){this.deferred.reject(OperationCancelled);this._terminate()}lock(){this._ready=false}unlock(){this._parsing=false;this._ready=true;this.onReadyEmitter.fire()}parse(e){if(this._parsing){throw new Error("Parser worker is busy")}this._parsing=true;this.deferred=new Deferred;this.sendMessage(e);return this.deferred.promise}}class wr{constructor(){this.previousTokenSource=new bt.CancellationTokenSource;this.writeQueue=[];this.readQueue=[];this.done=true}write(e){this.cancelWrite();const t=_t();this.previousTokenSource=t;return this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=bt.CancellationToken.None){const r=new qt;const i={action:t,deferred:r,cancellationToken:n};e.push(i);this.performNextOperation();return r.promise}async performNextOperation(){if(!this.done){return}const e=[];if(this.writeQueue.length>0){e.push(this.writeQueue.shift())}else if(this.readQueue.length>0){e.push(...this.readQueue.splice(0,this.readQueue.length))}else{return}this.done=false;await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(r){if(Ut(r)){t.resolve(undefined)}else{t.reject(r)}}})));this.done=true;this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Nr{constructor(e){this.grammarElementIdMap=new ln;this.tokenTypeIdMap=new ln;this.grammar=e.Grammar;this.lexer=e.parser.Lexer;this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):undefined,parserErrors:e.parserErrors.map((e=>({...e,message:e.message}))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map;const n=new Map;for(const r of(0,Ge.jm)(e)){t.set(r,{})}if(e.$cstNode){for(const t of(0,r.NS)(e.$cstNode)){n.set(t,{})}}return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode!==undefined){n.$cstNode=this.dehydrateCstNode(e.$cstNode,t)}for(const[r,i]of Object.entries(e)){if(r.startsWith("$")){continue}if(Array.isArray(i)){const e=[];n[r]=e;for(const n of i){if((0,Dt.ng)(n)){e.push(this.dehydrateAstNode(n,t))}else if((0,Dt.A_)(n)){e.push(this.dehydrateReference(n,t))}else{e.push(n)}}}else if((0,Dt.ng)(i)){n[r]=this.dehydrateAstNode(i,t)}else if((0,Dt.A_)(i)){n[r]=this.dehydrateReference(i,t)}else if(i!==undefined){n[r]=i}}return n}dehydrateReference(e,t){const n={};n.$refText=e.$refText;if(e.$refNode){n.$refNode=t.cstNodes.get(e.$refNode)}return n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);if((0,Dt.br)(e)){n.fullText=e.fullText}else{n.grammarSource=this.getGrammarElementId(e.grammarSource)}n.hidden=e.hidden;n.astNode=t.astNodes.get(e.astNode);if((0,Dt.mD)(e)){n.content=e.content.map((e=>this.dehydrateCstNode(e,t)))}else if((0,Dt.FC)(e)){n.tokenType=e.tokenType.name;n.offset=e.offset;n.length=e.length;n.startLine=e.range.start.line;n.startColumn=e.range.start.character;n.endLine=e.range.end.line;n.endColumn=e.range.end.character}return n}hydrate(e){const t=e.value;const n=this.createHydrationContext(t);if("$cstNode"in t){this.hydrateCstNode(t.$cstNode,n)}return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map;const n=new Map;for(const r of(0,Ge.jm)(e)){t.set(r,{})}let i;if(e.$cstNode){for(const t of(0,r.NS)(e.$cstNode)){let e;if("fullText"in t){e=new Ve(t.fullText);i=e}else if("content"in t){e=new Be}else if("tokenType"in t){e=this.hydrateCstLeafNode(t)}if(e){n.set(t,e);e.root=i}}}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type;n.$containerIndex=e.$containerIndex;n.$containerProperty=e.$containerProperty;if(e.$cstNode){n.$cstNode=t.cstNodes.get(e.$cstNode)}for(const[r,i]of Object.entries(e)){if(r.startsWith("$")){continue}if(Array.isArray(i)){const e=[];n[r]=e;for(const s of i){if((0,Dt.ng)(s)){e.push(this.setParent(this.hydrateAstNode(s,t),n))}else if((0,Dt.A_)(s)){e.push(this.hydrateReference(s,n,r,t))}else{e.push(s)}}}else if((0,Dt.ng)(i)){n[r]=this.setParent(this.hydrateAstNode(i,t),n)}else if((0,Dt.A_)(i)){n[r]=this.hydrateReference(i,n,r,t)}else if(i!==undefined){n[r]=i}}return n}setParent(e,t){e.$container=t;return e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if(typeof e.grammarSource==="number"){r.grammarSource=this.getGrammarElement(e.grammarSource)}r.astNode=t.astNodes.get(e.astNode);if((0,Dt.mD)(r)){for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType);const n=e.offset;const r=e.length;const i=e.startLine;const s=e.startColumn;const a=e.endLine;const o=e.endColumn;const c=e.hidden;const l=new Ke(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,c);return l}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(!e){return undefined}if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}return this.grammarElementIdMap.get(e)}getGrammarElement(e){if(this.grammarElementIdMap.size===0){this.createGrammarElementIdMap()}const t=this.grammarElementIdMap.getKey(e);return t}createGrammarElementIdMap(){let e=0;for(const t of(0,Ge.jm)(this.grammar)){if((0,a.r1)(t)){this.grammarElementIdMap.set(t,e++)}}}}function Ir(e){return{documentation:{CommentProvider:e=>new kr(e),DocumentationProvider:e=>new Er(e)},parser:{AsyncParser:e=>new Cr(e),GrammarConfig:e=>o(e),LangiumParser:e=>xt(e),CompletionParser:e=>St(e),ValueConverter:()=>new It.d,TokenBuilder:()=>new Nt.Q,Lexer:e=>new Wn(e),ParserErrorMessageProvider:()=>new tt,LexerErrorMessageProvider:()=>new Kn},workspace:{AstNodeLocator:()=>new _n,AstNodeDescriptionProvider:e=>new Pn(e),ReferenceDescriptionProvider:e=>new On(e)},references:{Linker:e=>new rn(e),NameProvider:()=>new an,ScopeProvider:e=>new vn(e),ScopeComputation:e=>new un(e),References:e=>new on(e)},serializer:{Hydrator:e=>new Nr(e),JsonSerializer:e=>new En(e)},validation:{DocumentValidator:e=>new Nn(e),ValidationRegistry:e=>new xn(e)},shared:()=>e.shared}}function br(e){return{ServiceRegistry:e=>new kn(e),workspace:{LangiumDocuments:e=>new tn(e),LangiumDocumentFactory:e=>new en(e),DocumentBuilder:e=>new qn(e),IndexManager:e=>new zn(e),WorkspaceManager:e=>new jn(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new wr,ConfigurationProvider:e=>new Fn(e)},profilers:{}}}},41281:(e,t,n)=>{"use strict";n.d(t,{WQ:()=>i});var r;(function(e){e.merge=(e,t)=>u(u({},e),t)})(r||(r={}));function i(e,t,n,r,i,s,a,c,l){const f=[e,t,n,r,i,s,a,c,l].reduce(u,{});return o(f)}const s=Symbol("isProxy");function a(e){if(e&&e[s]){for(const t of Object.values(e)){a(t)}}return e}function o(e,t){const n=new Proxy({},{deleteProperty:()=>false,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>{if(i===s){return true}else{return l(r,i,e,t||n)}},getOwnPropertyDescriptor:(r,i)=>(l(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const c=Symbol();function l(e,t,n,r){if(t in e){if(e[t]instanceof Error){throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t])}if(e[t]===c){throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies')}return e[t]}else if(t in n){const s=n[t];e[t]=c;try{e[t]=typeof s==="function"?s(r):o(s,r)}catch(i){e[t]=i instanceof Error?i:undefined;throw i}return e[t]}else{return undefined}}function u(e,t){if(t){for(const[n,r]of Object.entries(t)){if(r!==undefined&&r!==null){if(typeof r==="object"){const t=e[n];if(typeof t==="object"&&t!==null){e[n]=u(t,r)}else{e[n]=u({},r)}}else{e[n]=r}}}}return e}},85684:(e,t,n)=>{"use strict";n.d(t,{$g:()=>$e,Bg:()=>S,Ct:()=>ae,Cz:()=>k,D8:()=>ke,FO:()=>_,Fy:()=>we,GL:()=>ie,IZ:()=>z,Mz:()=>He,NT:()=>W,O4:()=>De,QX:()=>Je,RP:()=>P,S2:()=>Z,SP:()=>K,TF:()=>de,Tu:()=>I,Xj:()=>Fe,_c:()=>D,cM:()=>c,cY:()=>We,fG:()=>ve,jp:()=>g,lF:()=>_e,r1:()=>a,rE:()=>Pe,s7:()=>he,vd:()=>Te,ve:()=>h,wb:()=>ee,wh:()=>$,z2:()=>Ze});var r=n(64032);const i={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]*/};const s={$type:"AbstractElement",cardinality:"cardinality"};function a(e){return et.isInstance(e,s.$type)}const o={$type:"AbstractParserRule"};function c(e){return et.isInstance(e,o.$type)}const l={$type:"AbstractRule"};function u(e){return et.isInstance(e,l.$type)}const f={$type:"AbstractType"};function d(e){return et.isInstance(e,f.$type)}const p={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function h(e){return et.isInstance(e,p.$type)}const m={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function g(e){return et.isInstance(e,m.$type)}const y={$type:"ArrayLiteral",elements:"elements"};function T(e){return et.isInstance(e,y.$type)}const R={$type:"ArrayType",elementType:"elementType"};function v(e){return et.isInstance(e,R.$type)}const A={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function $(e){return et.isInstance(e,A.$type)}const E={$type:"BooleanLiteral",true:"true"};function k(e){return et.isInstance(e,E.$type)}const C={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function S(e){return et.isInstance(e,C.$type)}const x={$type:"Condition"};function w(e){return et.isInstance(e,x.$type)}const N={$type:"Conjunction",left:"left",right:"right"};function I(e){return et.isInstance(e,N.$type)}const b={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function D(e){return et.isInstance(e,b.$type)}const L={$type:"Disjunction",left:"left",right:"right"};function P(e){return et.isInstance(e,L.$type)}const O={$type:"EndOfFile",cardinality:"cardinality"};function _(e){return et.isInstance(e,O.$type)}const M={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function F(e){return et.isInstance(e,M.$type)}const U={$type:"GrammarImport",path:"path"};function G(e){return et.isInstance(e,U.$type)}const q={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function z(e){return et.isInstance(e,q.$type)}const j={$type:"InferredType",name:"name"};function K(e){return et.isInstance(e,j.$type)}const B={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function W(e){return et.isInstance(e,B.$type)}const V={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function H(e){return et.isInstance(e,V.$type)}const Y={$type:"InfixRuleOperators",precedences:"precedences"};function X(e){return et.isInstance(e,Y.$type)}const Q={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Z(e){return et.isInstance(e,Q.$type)}const J={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function ee(e){return et.isInstance(e,J.$type)}const te={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function ne(e){return et.isInstance(e,te.$type)}const re={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ie(e){return et.isInstance(e,re.$type)}const se={$type:"Negation",value:"value"};function ae(e){return et.isInstance(e,se.$type)}const oe={$type:"NumberLiteral",value:"value"};function ce(e){return et.isInstance(e,oe.$type)}const le={$type:"Parameter",name:"name"};function ue(e){return et.isInstance(e,le.$type)}const fe={$type:"ParameterReference",parameter:"parameter"};function de(e){return et.isInstance(e,fe.$type)}const pe={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function he(e){return et.isInstance(e,pe.$type)}const me={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function ge(e){return et.isInstance(e,me.$type)}const ye={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Te(e){return et.isInstance(e,ye.$type)}const Re={$type:"ReturnType",name:"name"};function ve(e){return et.isInstance(e,Re.$type)}const Ae={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function $e(e){return et.isInstance(e,Ae.$type)}const Ee={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function ke(e){return et.isInstance(e,Ee.$type)}const Ce={$type:"StringLiteral",value:"value"};function Se(e){return et.isInstance(e,Ce.$type)}const xe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function we(e){return et.isInstance(e,xe.$type)}const Ne={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Ie(e){return et.isInstance(e,Ne.$type)}const be={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function De(e){return et.isInstance(e,be.$type)}const Le={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Pe(e){return et.isInstance(e,Le.$type)}const Oe={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function _e(e){return et.isInstance(e,Oe.$type)}const Me={$type:"Type",name:"name",type:"type"};function Fe(e){return et.isInstance(e,Me.$type)}const Ue={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function Ge(e){return et.isInstance(e,Ue.$type)}const qe={$type:"TypeDefinition"};function ze(e){return et.isInstance(e,qe.$type)}const je={$type:"UnionType",types:"types"};function Ke(e){return et.isInstance(e,je.$type)}const Be={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function We(e){return et.isInstance(e,Be.$type)}const Ve={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function He(e){return et.isInstance(e,Ve.$type)}const Ye={$type:"ValueLiteral"};function Xe(e){return et.isInstance(e,Ye.$type)}const Qe={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Ze(e){return et.isInstance(e,Qe.$type)}class Je extends r.kD{constructor(){super(...arguments);this.types={AbstractElement:{name:s.$type,properties:{cardinality:{name:s.cardinality}},superTypes:[]},AbstractParserRule:{name:o.$type,properties:{},superTypes:[l.$type,f.$type]},AbstractRule:{name:l.$type,properties:{},superTypes:[]},AbstractType:{name:f.$type,properties:{},superTypes:[]},Action:{name:p.$type,properties:{cardinality:{name:p.cardinality},feature:{name:p.feature},inferredType:{name:p.inferredType},operator:{name:p.operator},type:{name:p.type,referenceType:f.$type}},superTypes:[s.$type]},Alternatives:{name:m.$type,properties:{cardinality:{name:m.cardinality},elements:{name:m.elements,defaultValue:[]}},superTypes:[s.$type]},ArrayLiteral:{name:y.$type,properties:{elements:{name:y.elements,defaultValue:[]}},superTypes:[Ye.$type]},ArrayType:{name:R.$type,properties:{elementType:{name:R.elementType}},superTypes:[qe.$type]},Assignment:{name:A.$type,properties:{cardinality:{name:A.cardinality},feature:{name:A.feature},operator:{name:A.operator},predicate:{name:A.predicate},terminal:{name:A.terminal}},superTypes:[s.$type]},BooleanLiteral:{name:E.$type,properties:{true:{name:E.true,defaultValue:false}},superTypes:[x.$type,Ye.$type]},CharacterRange:{name:C.$type,properties:{cardinality:{name:C.cardinality},left:{name:C.left},lookahead:{name:C.lookahead},parenthesized:{name:C.parenthesized,defaultValue:false},right:{name:C.right}},superTypes:[Ne.$type]},Condition:{name:x.$type,properties:{},superTypes:[]},Conjunction:{name:N.$type,properties:{left:{name:N.left},right:{name:N.right}},superTypes:[x.$type]},CrossReference:{name:b.$type,properties:{cardinality:{name:b.cardinality},deprecatedSyntax:{name:b.deprecatedSyntax,defaultValue:false},isMulti:{name:b.isMulti,defaultValue:false},terminal:{name:b.terminal},type:{name:b.type,referenceType:f.$type}},superTypes:[s.$type]},Disjunction:{name:L.$type,properties:{left:{name:L.left},right:{name:L.right}},superTypes:[x.$type]},EndOfFile:{name:O.$type,properties:{cardinality:{name:O.cardinality}},superTypes:[s.$type]},Grammar:{name:M.$type,properties:{imports:{name:M.imports,defaultValue:[]},interfaces:{name:M.interfaces,defaultValue:[]},isDeclared:{name:M.isDeclared,defaultValue:false},name:{name:M.name},rules:{name:M.rules,defaultValue:[]},types:{name:M.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:U.$type,properties:{path:{name:U.path}},superTypes:[]},Group:{name:q.$type,properties:{cardinality:{name:q.cardinality},elements:{name:q.elements,defaultValue:[]},guardCondition:{name:q.guardCondition},predicate:{name:q.predicate}},superTypes:[s.$type]},InferredType:{name:j.$type,properties:{name:{name:j.name}},superTypes:[f.$type]},InfixRule:{name:B.$type,properties:{call:{name:B.call},dataType:{name:B.dataType},inferredType:{name:B.inferredType},name:{name:B.name},operators:{name:B.operators},parameters:{name:B.parameters,defaultValue:[]},returnType:{name:B.returnType,referenceType:f.$type}},superTypes:[o.$type]},InfixRuleOperatorList:{name:V.$type,properties:{associativity:{name:V.associativity},operators:{name:V.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Y.$type,properties:{precedences:{name:Y.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Q.$type,properties:{attributes:{name:Q.attributes,defaultValue:[]},name:{name:Q.name},superTypes:{name:Q.superTypes,defaultValue:[],referenceType:f.$type}},superTypes:[f.$type]},Keyword:{name:J.$type,properties:{cardinality:{name:J.cardinality},predicate:{name:J.predicate},value:{name:J.value}},superTypes:[s.$type]},NamedArgument:{name:te.$type,properties:{calledByName:{name:te.calledByName,defaultValue:false},parameter:{name:te.parameter,referenceType:le.$type},value:{name:te.value}},superTypes:[]},NegatedToken:{name:re.$type,properties:{cardinality:{name:re.cardinality},lookahead:{name:re.lookahead},parenthesized:{name:re.parenthesized,defaultValue:false},terminal:{name:re.terminal}},superTypes:[Ne.$type]},Negation:{name:se.$type,properties:{value:{name:se.value}},superTypes:[x.$type]},NumberLiteral:{name:oe.$type,properties:{value:{name:oe.value}},superTypes:[Ye.$type]},Parameter:{name:le.$type,properties:{name:{name:le.name}},superTypes:[]},ParameterReference:{name:fe.$type,properties:{parameter:{name:fe.parameter,referenceType:le.$type}},superTypes:[x.$type]},ParserRule:{name:pe.$type,properties:{dataType:{name:pe.dataType},definition:{name:pe.definition},entry:{name:pe.entry,defaultValue:false},fragment:{name:pe.fragment,defaultValue:false},inferredType:{name:pe.inferredType},name:{name:pe.name},parameters:{name:pe.parameters,defaultValue:[]},returnType:{name:pe.returnType,referenceType:f.$type}},superTypes:[o.$type]},ReferenceType:{name:me.$type,properties:{isMulti:{name:me.isMulti,defaultValue:false},referenceType:{name:me.referenceType}},superTypes:[qe.$type]},RegexToken:{name:ye.$type,properties:{cardinality:{name:ye.cardinality},lookahead:{name:ye.lookahead},parenthesized:{name:ye.parenthesized,defaultValue:false},regex:{name:ye.regex}},superTypes:[Ne.$type]},ReturnType:{name:Re.$type,properties:{name:{name:Re.name}},superTypes:[]},RuleCall:{name:Ae.$type,properties:{arguments:{name:Ae.arguments,defaultValue:[]},cardinality:{name:Ae.cardinality},predicate:{name:Ae.predicate},rule:{name:Ae.rule,referenceType:l.$type}},superTypes:[s.$type]},SimpleType:{name:Ee.$type,properties:{primitiveType:{name:Ee.primitiveType},stringType:{name:Ee.stringType},typeRef:{name:Ee.typeRef,referenceType:f.$type}},superTypes:[qe.$type]},StringLiteral:{name:Ce.$type,properties:{value:{name:Ce.value}},superTypes:[Ye.$type]},TerminalAlternatives:{name:xe.$type,properties:{cardinality:{name:xe.cardinality},elements:{name:xe.elements,defaultValue:[]},lookahead:{name:xe.lookahead},parenthesized:{name:xe.parenthesized,defaultValue:false}},superTypes:[Ne.$type]},TerminalElement:{name:Ne.$type,properties:{cardinality:{name:Ne.cardinality},lookahead:{name:Ne.lookahead},parenthesized:{name:Ne.parenthesized,defaultValue:false}},superTypes:[s.$type]},TerminalGroup:{name:be.$type,properties:{cardinality:{name:be.cardinality},elements:{name:be.elements,defaultValue:[]},lookahead:{name:be.lookahead},parenthesized:{name:be.parenthesized,defaultValue:false}},superTypes:[Ne.$type]},TerminalRule:{name:Le.$type,properties:{definition:{name:Le.definition},fragment:{name:Le.fragment,defaultValue:false},hidden:{name:Le.hidden,defaultValue:false},name:{name:Le.name},type:{name:Le.type}},superTypes:[l.$type]},TerminalRuleCall:{name:Oe.$type,properties:{cardinality:{name:Oe.cardinality},lookahead:{name:Oe.lookahead},parenthesized:{name:Oe.parenthesized,defaultValue:false},rule:{name:Oe.rule,referenceType:Le.$type}},superTypes:[Ne.$type]},Type:{name:Me.$type,properties:{name:{name:Me.name},type:{name:Me.type}},superTypes:[f.$type]},TypeAttribute:{name:Ue.$type,properties:{defaultValue:{name:Ue.defaultValue},isOptional:{name:Ue.isOptional,defaultValue:false},name:{name:Ue.name},type:{name:Ue.type}},superTypes:[]},TypeDefinition:{name:qe.$type,properties:{},superTypes:[]},UnionType:{name:je.$type,properties:{types:{name:je.types,defaultValue:[]}},superTypes:[qe.$type]},UnorderedGroup:{name:Be.$type,properties:{cardinality:{name:Be.cardinality},elements:{name:Be.elements,defaultValue:[]}},superTypes:[s.$type]},UntilToken:{name:Ve.$type,properties:{cardinality:{name:Ve.cardinality},lookahead:{name:Ve.lookahead},parenthesized:{name:Ve.parenthesized,defaultValue:false},terminal:{name:Ve.terminal}},superTypes:[Ne.$type]},ValueLiteral:{name:Ye.$type,properties:{},superTypes:[]},Wildcard:{name:Qe.$type,properties:{cardinality:{name:Qe.cardinality},lookahead:{name:Qe.lookahead},parenthesized:{name:Qe.parenthesized,defaultValue:false}},superTypes:[Ne.$type]}}}}const et=new Je},25355:(e,t,n)=>{"use strict";n.d(t,{Q:()=>l});var r=n(50450);var i=n(85684);var s=n(63752);var a=n(70977);var o=n(65811);var c=n(64386);class l{constructor(){this.diagnostics=[]}buildTokens(e,t){const n=(0,c.Td)((0,a.YV)(e,false));const r=this.buildTerminalTokens(n);const i=this.buildKeywordTokens(n,r,t);i.push(...r);return i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];this.diagnostics=[];return e}buildTerminalTokens(e){return e.filter(i.rE).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=(0,a.S)(e);const n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t;const i={name:e.name,PATTERN:n};if(typeof n==="function"){i.LINE_BREAKS=true}if(e.hidden){i.GROUP=(0,o.Yv)(t)?r.JG.SKIPPED:"hidden"}return i}requiresCustomPattern(e){if(e.flags.includes("u")||e.flags.includes("s")){return true}else{return false}}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>{t.lastIndex=n;const r=t.exec(e);return r}}buildKeywordTokens(e,t,n){return e.filter(i.cM).flatMap((e=>(0,s.Uo)(e).filter(i.wb))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(n?.caseInsensitive))))}buildKeywordToken(e,t,n){const r=this.buildKeywordPattern(e,n);const i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};if(typeof r==="function"){i.LINE_BREAKS=true}return i}buildKeywordPattern(e,t){return t?new RegExp((0,o.Nt)(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=n?.PATTERN;if(r?.source&&(0,o.PC)("^"+r.source+"$",e.value)){t.push(n)}return t}),[])}}},14480:(e,t,n)=>{"use strict";n.d(t,{d:()=>s});var r=n(85684);var i=n(70977);class s{convert(e,t){let n=t.grammarSource;if((0,r._c)(n)){n=(0,i.g4)(n)}if((0,r.$g)(n)){const r=n.rule.ref;if(!r){throw new Error("This cst node was not parsed by a rule.")}return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case"INT":return a.convertInt(t);case"STRING":return a.convertString(t);case"ID":return a.convertID(t)}switch((0,i.P3)(e)?.toLowerCase()){case"number":return a.convertNumber(t);case"boolean":return a.convertBoolean(t);case"bigint":return a.convertBigint(t);case"date":return a.convertDate(t);default:return t}}}var a;(function(e){function t(e){let t="";for(let r=1;r<e.length-1;r++){const i=e.charAt(r);if(i==="\\"){const i=e.charAt(++r);t+=n(i)}else{t+=i}}return t}e.convertString=t;function n(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function r(e){if(e.charAt(0)==="^"){return e.substring(1)}else{return e}}e.convertID=r;function i(e){return parseInt(e)}e.convertInt=i;function s(e){return BigInt(e)}e.convertBigint=s;function a(e){return new Date(e)}e.convertDate=a;function o(e){return Number(e)}e.convertNumber=o;function c(e){return e.toLowerCase()==="true"}e.convertBoolean=c})(a||(a={}))},64032:(e,t,n)=>{"use strict";n.d(t,{A_:()=>i,Dm:()=>s,FC:()=>u,Nr:()=>a,Zl:()=>o,br:()=>f,kD:()=>c,mD:()=>l,ng:()=>r});function r(e){return typeof e==="object"&&e!==null&&typeof e.$type==="string"}function i(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"&&"ref"in e}function s(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"&&"items"in e}function a(e){return typeof e==="object"&&e!==null&&typeof e.name==="string"&&typeof e.type==="string"&&typeof e.path==="string"}function o(e){return typeof e==="object"&&e!==null&&typeof e.info==="object"&&typeof e.message==="string"}class c{constructor(){this.subtypes={};this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t){throw new Error(`Type ${e.container.$type||"undefined"} not found.`)}const n=t.properties[e.property]?.referenceType;if(!n){throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`)}return n}getTypeMetaData(e){const t=this.types[e];if(!t){return{name:e,properties:{},superTypes:[]}}return t}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t){return true}let n=this.subtypes[e];if(!n){n=this.subtypes[e]={}}const r=n[t];if(r!==undefined){return r}else{const r=this.types[e];const i=r?r.superTypes.some((e=>this.isSubtype(e,t))):false;n[t]=i;return i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t){return t}else{const t=this.getAllTypes();const n=[];for(const r of t){if(this.isSubtype(r,e)){n.push(r)}}this.allSubtypes[e]=n;return n}}}function l(e){return typeof e==="object"&&e!==null&&Array.isArray(e.content)}function u(e){return typeof e==="object"&&e!==null&&typeof e.tokenType==="object"}function f(e){return l(e)&&typeof e.fullText==="string"}},63752:(e,t,n)=>{"use strict";n.d(t,{DM:()=>g,OP:()=>y,SD:()=>a,Uo:()=>p,VN:()=>d,XG:()=>o,YE:()=>l,cQ:()=>u,jm:()=>h,tC:()=>f});var r=n(64032);var i=n(64386);var s=n(5730);function a(e,t={}){for(const[n,i]of Object.entries(e)){if(!n.startsWith("$")){if(Array.isArray(i)){i.forEach(((i,s)=>{if((0,r.ng)(i)){i.$container=e;i.$containerProperty=n;i.$containerIndex=s;if(t.deep){a(i,t)}}}))}else if((0,r.ng)(i)){i.$container=e;i.$containerProperty=n;if(t.deep){a(i,t)}}}}}function o(e,t){let n=e;while(n){if(t(n)){return n}n=n.$container}return undefined}function c(e,t){let n=e;while(n){if(t(n)){return true}n=n.$container}return false}function l(e){const t=u(e);const n=t.$document;if(!n){throw new Error("AST node has no document.")}return n}function u(e){while(e.$container){e=e.$container}return e}function f(e){if((0,r.A_)(e)){return e.ref?[e.ref]:[]}else if((0,r.Dm)(e)){return e.items.map((e=>e.ref))}return[]}function d(e,t){if(!e){throw new Error("Node must be an AstNode.")}const n=t?.range;return new i.fq((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const i=t.keys[t.keyIndex];if(!i.startsWith("$")){const s=e[i];if((0,r.ng)(s)){t.keyIndex++;if(m(s,n)){return{done:false,value:s}}}else if(Array.isArray(s)){while(t.arrayIndex<s.length){const e=t.arrayIndex++;const i=s[e];if((0,r.ng)(i)&&m(i,n)){return{done:false,value:i}}}t.arrayIndex=0}}t.keyIndex++}return i.Rf}))}function p(e,t){if(!e){throw new Error("Root node must be an AstNode.")}return new i.Vj(e,(e=>d(e,t)))}function h(e,t){if(!e){throw new Error("Root node must be an AstNode.")}else if(t?.range&&!m(e,t.range)){return new i.Vj(e,(()=>[]))}return new i.Vj(e,(e=>d(e,t)),{includeRoot:true})}function m(e,t){if(!t){return true}const n=e.$cstNode?.range;if(!n){return false}return(0,s.r4)(n,t)}function g(e){return new i.fq((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{while(t.keyIndex<t.keys.length){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const i=e[n];if((0,r.A_)(i)||(0,r.Dm)(i)){t.keyIndex++;return{done:false,value:{reference:i,container:e,property:n}}}else if(Array.isArray(i)){while(t.arrayIndex<i.length){const s=t.arrayIndex++;const a=i[s];if((0,r.A_)(a)||(0,r.Dm)(i)){return{done:false,value:{reference:a,container:e,property:n,index:s}}}}t.arrayIndex=0}}t.keyIndex++}return i.Rf}))}function y(e,t){const n=e.getTypeMetaData(t.$type);const r=t;for(const i of Object.values(n.properties)){if(i.defaultValue!==undefined&&r[i.name]===undefined){r[i.name]=T(i.defaultValue)}}}function T(e){if(Array.isArray(e)){return[...e.map(T)]}else{return e}}function R(e,t,n){const r={$type:e.$type};if(n){n.set(e,r);n.set(r,e)}for(const[i,s]of Object.entries(e)){if(!i.startsWith("$")){if(isAstNode(s)){r[i]=R(s,t,n)}else if(isReference(s)){r[i]=t(r,i,s.$refNode,s.$refText,s)}else if(Array.isArray(s)){const e=[];for(const a of s){if(isAstNode(a)){e.push(R(a,t,n))}else if(isReference(a)){e.push(t(r,i,a.$refNode,a.$refText,a))}else{e.push(a)}}r[i]=e}else{r[i]=s}}}a(r,{deep:true});return r}},5730:(e,t,n)=>{"use strict";n.d(t,{El:()=>h,NS:()=>a,SX:()=>u,pO:()=>c,r4:()=>p,v:()=>g,wf:()=>l});var r=n(64032);var i=n(64386);function s(e){let t=e;let n=false;while(t){const e=getContainerOfType(t.grammarSource,isParserRule);if(e&&e.dataType){t=t.container;n=true}else if(n){return t}else{return undefined}}return undefined}function a(e){return new i.Vj(e,(e=>{if((0,r.mD)(e)){return e.content}else{return[]}}),{includeRoot:true})}function o(e){return a(e).filter(isLeafCstNode)}function c(e,t){while(e.container){e=e.container;if(e===t){return true}}return false}function l(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function u(e){if(!e){return undefined}const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var f;(function(e){e[e["Before"]=0]="Before";e[e["After"]=1]="After";e[e["OverlapFront"]=2]="OverlapFront";e[e["OverlapBack"]=3]="OverlapBack";e[e["Inside"]=4]="Inside";e[e["Outside"]=5]="Outside"})(f||(f={}));function d(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character){return f.Before}else if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character){return f.After}const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character;const r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;if(n&&r){return f.Inside}else if(n){return f.OverlapBack}else if(r){return f.OverlapFront}else{return f.Outside}}function p(e,t){const n=d(e,t);return n>f.After}const h=/^[\w\p{L}]$/u;function m(e,t,n=h){if(e){if(t>0){const r=t-e.offset;const i=e.text.charAt(r);if(!n.test(i)){t--}}return T(e,t)}return undefined}function g(e,t){if(e){const n=A(e,true);if(n&&y(n,t)){return n}if((0,r.br)(e)){const n=e.content.findIndex((e=>!e.hidden));for(let r=n-1;r>=0;r--){const n=e.content[r];if(y(n,t)){return n}}}}return undefined}function y(e,t){return(0,r.FC)(e)&&t.includes(e.tokenType.name)}function T(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=v(e,t,false);if(n){return T(n,t)}}return undefined}function R(e,t){if(isLeafCstNode(e)){return e}else if(isCompositeCstNode(e)){const n=v(e,t,true);if(n){return R(n,t)}}return undefined}function v(e,t,n){let r=0;let i=e.content.length-1;let s=undefined;while(r<=i){const a=Math.floor((r+i)/2);const o=e.content[a];if(o.offset<=t&&o.end>t){return o}if(o.end<=t){s=n?o:undefined;r=a+1}else{i=a-1}}return s}function A(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);while(r>0){r--;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function $(e,t=true){while(e.container){const n=e.container;let r=n.content.indexOf(e);const i=n.content.length-1;while(r<i){r++;const e=n.content[r];if(t||!e.hidden){return e}}e=n}return undefined}function E(e){if(e.range.start.character===0){return e}const t=e.range.start.line;let n=e;let r;while(e.container){const i=e.container;const s=r??i.content.indexOf(e);if(s===0){e=i;r=undefined}else{r=s-1;e=i.content[r]}if(e.range.start.line!==t){break}n=e}return n}function k(e,t){const n=C(e,t);if(!n){return[]}return n.parent.content.slice(n.a+1,n.b)}function C(e,t){const n=S(e);const r=S(t);let i;for(let s=0;s<n.length&&s<r.length;s++){const e=n[s];const t=r[s];if(e.parent===t.parent){i={parent:e.parent,a:e.index,b:t.index}}else{break}}return i}function S(e){const t=[];while(e.container){const n=e.container;const r=n.content.indexOf(e);t.push({parent:n,index:r});e=n}return t.reverse()}},73101:(e,t,n)=>{"use strict";n.d(t,{WB:()=>r,dr:()=>i});class r extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function i(e,t="Error: Got unexpected value."){throw new Error(t)}function s(e,t="Error: Condition is violated."){if(!e){throw new Error(t)}}},70977:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>g,P3:()=>M,Rp:()=>$,S:()=>F,SS:()=>v,U5:()=>E,Uz:()=>P,Xq:()=>N,YV:()=>f,eb:()=>m,g4:()=>h,qO:()=>y});var r=n(73101);var i=n(85684);var s=n(64032);var a=n(63752);var o=n(5730);var c=n(65811);function l(e){return e.rules.find((e=>i.s7(e)&&e.entry))}function u(e){return e.rules.filter((e=>i.rE(e)&&e.hidden))}function f(e,t){const n=new Set;const r=l(e);if(!r){return new Set(e.rules)}const s=[r].concat(u(e));for(const i of s){d(i,n,t)}const a=new Set;for(const o of e.rules){if(n.has(o.name)||i.rE(o)&&o.hidden){a.add(o)}}return a}function d(e,t,n){t.add(e.name);(0,a.Uo)(e).forEach((e=>{if(i.$g(e)||n&&i.lF(e)){const r=e.rule.ref;if(r&&!t.has(r.name)){d(r,t,n)}}}))}function p(e){const t=new Set;streamAllContents(e).forEach((e=>{if(ast.isCrossReference(e)){if(ast.isParserRule(e.type.ref)){t.add(e.type.ref)}if(ast.isInferredType(e.type.ref)&&ast.isParserRule(e.type.ref.$container)){t.add(e.type.ref.$container)}}}));return t}function h(e){if(e.terminal){return e.terminal}else if(e.type.ref){const t=E(e.type.ref);return t?.terminal}return undefined}function m(e){return e.hidden&&!(0,c.Yv)(F(e))}function g(e,t){if(!e||!t){return[]}return T(e,t,e.astNode,true)}function y(e,t,n){if(!e||!t){return undefined}const r=T(e,t,e.astNode,true);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function T(e,t,n,r){if(!r){const n=(0,a.XG)(e.grammarSource,i.wh);if(n&&n.feature===t){return[e]}}if((0,s.mD)(e)&&e.astNode===n){return e.content.flatMap((e=>T(e,t,n,false)))}return[]}function R(e,t){if(!e){return[]}return A(e,t,e?.astNode)}function v(e,t,n){if(!e){return undefined}const r=A(e,t,e?.astNode);if(r.length===0){return undefined}if(n!==undefined){n=Math.max(0,Math.min(n,r.length-1))}else{n=0}return r[n]}function A(e,t,n){if(e.astNode!==n){return[]}if(i.wb(e.grammarSource)&&e.grammarSource.value===t){return[e]}const r=(0,o.NS)(e).iterator();let s;const a=[];do{s=r.next();if(!s.done){const e=s.value;if(e.astNode===n){if(i.wb(e.grammarSource)&&e.grammarSource.value===t){a.push(e)}}else{r.prune()}}}while(!s.done);return a}function $(e){const t=e.astNode;while(t===e.container?.astNode){const t=(0,a.XG)(e.grammarSource,i.wh);if(t){return t}e=e.container}return undefined}function E(e){let t=e;if(i.SP(t)){if(i.ve(t.$container)){t=t.$container.$container}else if(i.cM(t.$container)){t=t.$container}else{(0,r.dr)(t.$container)}}return k(e,t,new Map)}function k(e,t,n){function r(t,r){let s=undefined;const o=(0,a.XG)(t,i.wh);if(!o){s=k(r,r,n)}n.set(e,s);return s}if(n.has(e)){return n.get(e)}n.set(e,undefined);for(const s of(0,a.Uo)(t)){if(i.wh(s)&&s.feature.toLowerCase()==="name"){n.set(e,s);return s}else if(i.$g(s)&&i.s7(s.rule.ref)){return r(s,s.rule.ref)}else if(i.D8(s)&&s.typeRef?.ref){return r(s,s.typeRef.ref)}}return undefined}function C(e){const t=e.$container;if(ast.isGroup(t)){const n=t.elements;const r=n.indexOf(e);for(let e=r-1;e>=0;e--){const t=n[e];if(ast.isAction(t)){return t}else{const t=streamAllContents(n[e]).find(ast.isAction);if(t){return t}}}}if(ast.isAbstractElement(t)){return C(t)}else{return undefined}}function S(e,t){return e==="?"||e==="*"||ast.isGroup(t)&&Boolean(t.guardCondition)}function x(e){return e==="*"||e==="+"}function w(e){return e==="+="}function N(e){return I(e,new Set)}function I(e,t){if(t.has(e)){return true}else{t.add(e)}for(const n of(0,a.Uo)(e)){if(i.$g(n)){if(!n.rule.ref){return false}if(i.s7(n.rule.ref)&&!I(n.rule.ref,t)){return false}if(i.NT(n.rule.ref)){return false}}else if(i.wh(n)){return false}else if(i.ve(n)){return false}}return Boolean(e.definition)}function b(e){return D(e.type,new Set)}function D(e,t){if(t.has(e)){return true}else{t.add(e)}if(ast.isArrayType(e)){return false}else if(ast.isReferenceType(e)){return false}else if(ast.isUnionType(e)){return e.types.every((e=>D(e,t)))}else if(ast.isSimpleType(e)){if(e.primitiveType!==undefined){return true}else if(e.stringType!==undefined){return true}else if(e.typeRef!==undefined){const n=e.typeRef.ref;if(ast.isType(n)){return D(n.type,t)}else{return false}}else{return false}}else{return false}}function L(e){if(i.rE(e)){return undefined}if(e.inferredType){return e.inferredType.name}else if(e.dataType){return e.dataType}else if(e.returnType){const t=e.returnType.ref;if(t){return t.name}}return undefined}function P(e){if(i.cM(e)){return i.s7(e)&&N(e)?e.name:L(e)??e.name}else if(i.S2(e)||i.Xj(e)||i.fG(e)){return e.name}else if(i.ve(e)){const t=O(e);if(t){return t}}else if(i.SP(e)){return e.name}throw new Error("Cannot get name of Unknown Type")}function O(e){if(e.inferredType){return e.inferredType.name}else if(e.type?.ref){return P(e.type.ref)}return undefined}function _(e){if(ast.isTerminalRule(e)){return e.type?.name??"string"}else{return ast.isParserRule(e)&&N(e)?e.name:L(e)??e.name}}function M(e){if(i.rE(e)){return e.type?.name??"string"}else{return L(e)??e.name}}function F(e){const t={s:false,i:false,u:false};const n=G(e.definition,t);const r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const U=/[\s\S]/.source;function G(e,t){if(i.Fy(e)){return q(e)}else if(i.O4(e)){return z(e)}else if(i.Bg(e)){return B(e)}else if(i.lF(e)){const t=e.rule.ref;if(!t){throw new Error("Missing rule reference.")}return V(G(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else if(i.GL(e)){return K(e)}else if(i.Mz(e)){return j(e)}else if(i.vd(e)){const n=e.regex.lastIndexOf("/");const r=e.regex.substring(1,n);const i=e.regex.substring(n+1);if(t){t.i=i.includes("i");t.s=i.includes("s");t.u=i.includes("u")}return V(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:false})}else if(i.z2(e)){return V(U,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}function q(e){return V(e.elements.map((e=>G(e))).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:false})}function z(e){return V(e.elements.map((e=>G(e))).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:false})}function j(e){return V(`${U}*?${G(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function K(e){return V(`(?!${G(e.terminal)})${U}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function B(e){if(e.right){return V(`[${W(e.left)}-${W(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:false})}return V(W(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:false})}function W(e){return(0,c.Nt)(e.value)}function V(e,t){if(t.parenthesized||t.lookahead||t.wrap!==false){const n=t.lookahead??(t.parenthesized?"":"?:");e=`(${n}${e})`}if(t.cardinality){return`${e}${t.cardinality}`}return e}},65811:(e,t,n)=>{"use strict";n.d(t,{Nt:()=>d,PC:()=>p,TH:()=>i,Yv:()=>f,lU:()=>l});var r=n(83173);const i=/\r?\n/gm;const s=new r.H;class a extends r.z{constructor(){super(...arguments);this.isStarting=true;this.endRegexpStack=[];this.multiline=false}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=false;this.regex=e;this.startRegexp="";this.isStarting=true;this.endRegexpStack=[]}visitGroup(e){if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t==="\n"){this.multiline=true}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const e=d(t);this.endRegexpStack.push(e);if(this.isStarting){this.startRegexp+=e}}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end);const n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier){this.isStarting=false;this.endRegexpStack=[]}else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t);if(this.isStarting){this.startRegexp+=t}}}visitChildren(e){if(e.type==="Group"){const t=e;if(t.quantifier){return}}super.visitChildren(e)}}const o=new a;function c(e){try{if(typeof e!=="string"){e=e.source}e=`/${e}/`;const t=s.pattern(e);const n=[];for(const r of t.value.value){o.reset(e);o.visit(r);n.push({start:o.startRegexp,end:o.endRegex})}return n}catch{return[]}}function l(e){try{if(typeof e==="string"){e=new RegExp(e)}e=e.toString();o.reset(e);o.visit(s.pattern(e));return o.multiline}catch{return false}}const u=("\f\n\r\t\v           "+"   \u2028\u2029   \ufeff").split("");function f(e){const t=typeof e==="string"?new RegExp(e):e;return u.some((e=>t.test(e)))}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(e,t){const n=h(e);const r=t.match(n);return!!r&&r[0].length>0}function h(e){if(typeof e==="string"){e=new RegExp(e)}const t=e,n=e.source;let r=0;function i(){let e="",s;function a(t){e+=n.substr(r,t);r+=t}function o(t){e+="(?:"+n.substr(r,t)+"|$)";r+=t}while(r<n.length){switch(n[r]){case"\\":switch(n[r+1]){case"c":o(3);break;case"x":o(4);break;case"u":if(t.unicode){if(n[r+2]==="{"){o(n.indexOf("}",r)-r+1)}else{o(6)}}else{o(2)}break;case"p":case"P":if(t.unicode){o(n.indexOf("}",r)-r+1)}else{o(2)}break;case"k":o(n.indexOf(">",r)-r+1);break;default:o(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g;s.lastIndex=r;s=s.exec(n)||[];o(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":s=/\{\d+,?\d*\}/g;s.lastIndex=r;s=s.exec(n);if(s){a(s[0].length)}else{o(1)}break;case"(":if(n[r+1]==="?"){switch(n[r+2]){case":":e+="(?:";r+=3;e+=i()+"|$)";break;case"=":e+="(?=";r+=3;e+=i()+")";break;case"!":s=r;r+=3;i();e+=n.substr(s,r-s);break;case"<":switch(n[r+3]){case"=":case"!":s=r;r+=4;i();e+=n.substr(s,r-s);break;default:a(n.indexOf(">",r)-r+1);e+=i()+"|$)";break}break}}else{a(1);e+=i()+"|$)"}break;case")":++r;return e;default:o(1);break}}return e}return new RegExp(i(),e.flags)}},64386:(e,t,n)=>{"use strict";n.d(t,{B5:()=>a,Rf:()=>o,Td:()=>c,Vj:()=>l,fq:()=>r,iD:()=>u});class r{constructor(e,t){this.startFn=e;this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0;let n=e.next();while(!n.done){t++;n=e.next()}return t}toArray(){const e=[];const t=this.iterator();let n;do{n=t.next();if(n.value!==undefined){e.push(n.value)}}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){return new r((()=>({first:this.startFn(),firstDone:false,iterator:e[Symbol.iterator]()})),(e=>{let t;if(!e.firstDone){do{t=this.nextFn(e.first);if(!t.done){return t}}while(!t.done);e.firstDone=true}do{t=e.iterator.next();if(!t.done){return t}}while(!t.done);return o}))}join(e=","){const t=this.iterator();let n="";let r;let s=false;do{r=t.next();if(!r.done){if(s){n+=e}n+=i(r.value)}s=true}while(!r.done);return n}indexOf(e,t=0){const n=this.iterator();let r=0;let i=n.next();while(!i.done){if(r>=t&&i.value===e){return r}i=n.next();r++}return-1}every(e){const t=this.iterator();let n=t.next();while(!n.done){if(!e(n.value)){return false}n=t.next()}return true}some(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return true}n=t.next()}return false}forEach(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){e(r.value,n);r=t.next();n++}}map(e){return new r(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);if(n){return o}else{return{done:false,value:e(r)}}}))}filter(e){return new r(this.startFn,(t=>{let n;do{n=this.nextFn(t);if(!n.done&&e(n.value)){return n}}while(!n.done);return o}))}nonNullable(){return this.filter((e=>e!==undefined&&e!==null))}reduce(e,t){const n=this.iterator();let r=t;let i=n.next();while(!i.done){if(r===undefined){r=i.value}else{r=e(r,i.value)}i=n.next()}return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done){return n}const i=this.recursiveReduce(e,t,n);if(i===undefined){return r.value}return t(i,r.value)}find(e){const t=this.iterator();let n=t.next();while(!n.done){if(e(n.value)){return n.value}n=t.next()}return undefined}findIndex(e){const t=this.iterator();let n=0;let r=t.next();while(!r.done){if(e(r.value)){return n}r=t.next();n++}return-1}includes(e){const t=this.iterator();let n=t.next();while(!n.done){if(n.value===e){return true}n=t.next()}return false}flatMap(e){return new r((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(e.done){t.iterator=undefined}else{return e}}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(s(n)){t.iterator=n[Symbol.iterator]()}else{return{done:false,value:n}}}}while(t.iterator);return o}))}flat(e){if(e===undefined){e=1}if(e<=0){return this}const t=e>1?this.flat(e-1):this;return new r((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(t.done){e.iterator=undefined}else{return t}}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(s(r)){e.iterator=r[Symbol.iterator]()}else{return{done:false,value:r}}}}while(e.iterator);return o}))}head(){const e=this.iterator();const t=e.next();if(t.done){return undefined}return t.value}tail(e=1){return new r((()=>{const t=this.startFn();for(let n=0;n<e;n++){const e=this.nextFn(t);if(e.done){return t}}return t}),this.nextFn)}limit(e){return new r((()=>({size:0,state:this.startFn()})),(t=>{t.size++;if(t.size>e){return o}return this.nextFn(t.state)}))}distinct(e){return new r((()=>({set:new Set,internalState:this.startFn()})),(t=>{let n;do{n=this.nextFn(t.internalState);if(!n.done){const r=e?e(n.value):n.value;if(!t.set.has(r)){t.set.add(r);return n}}}while(!n.done);return o}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function i(e){if(typeof e==="string"){return e}if(typeof e==="undefined"){return"undefined"}if(typeof e.toString==="function"){return e.toString()}return Object.prototype.toString.call(e)}function s(e){return!!e&&typeof e[Symbol.iterator]==="function"}const a=new r((()=>undefined),(()=>o));const o=Object.freeze({done:true,value:undefined});function c(...e){if(e.length===1){const t=e[0];if(t instanceof r){return t}if(s(t)){return new r((()=>t[Symbol.iterator]()),(e=>e.next()))}if(typeof t.length==="number"){return new r((()=>({index:0})),(e=>{if(e.index<t.length){return{done:false,value:t[e.index++]}}else{return o}}))}}if(e.length>1){return new r((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done){return e}t.iterator=undefined}if(t.array){if(t.arrIndex<t.array.length){return{done:false,value:t.array[t.arrIndex++]}}t.array=undefined;t.arrIndex=0}if(t.collIndex<e.length){const n=e[t.collIndex++];if(s(n)){t.iterator=n[Symbol.iterator]()}else if(n&&typeof n.length==="number"){t.array=n}}}while(t.iterator||t.array||t.collIndex<e.length);return o}))}return a}class l extends r{constructor(e,t,n){super((()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:false})),(e=>{if(e.pruned){e.iterators.pop();e.pruned=false}while(e.iterators.length>0){const n=e.iterators[e.iterators.length-1];const r=n.next();if(r.done){e.iterators.pop()}else{e.iterators.push(t(r.value)[Symbol.iterator]());return r}}return o}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=true},[Symbol.iterator]:()=>e};return e}}var u;(function(e){function t(e){return e.reduce(((e,t)=>e+t),0)}e.sum=t;function n(e){return e.reduce(((e,t)=>e*t),0)}e.product=n;function r(e){return e.reduce(((e,t)=>Math.min(e,t)))}e.min=r;function i(e){return e.reduce(((e,t)=>Math.max(e,t)))}e.max=i})(u||(u={}))},6052:(e,t,n)=>{"use strict";n.d(t,{D:()=>i});class r{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return false}existsSync(){return false}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},95852:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62579);function i(e,t,n){var i=-1,s=e.length;while(++i<s){var a=e[i],o=t(a);if(o!=null&&(c===undefined?o===o&&!(0,r.A)(o):n(o,c))){var c=o,l=a}}return l}const s=i},51135:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e,t){return e<t}const i=r},97457:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(15912);var i=n(21585);function s(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)}));return s}const a=s},44835:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(22883);var i=n(16542);var s=n(65900);var a=n(78912);var o=n(85356);var c=n(43512);function l(e,t,n,r){if(!(0,o.A)(e)){return e}t=(0,s.A)(t,e);var l=-1,u=t.length,f=u-1,d=e;while(d!=null&&++l<u){var p=(0,c.A)(t[l]),h=n;if(p==="__proto__"||p==="constructor"||p==="prototype"){return e}if(l!=f){var m=d[p];h=r?r(m,p,d):undefined;if(h===undefined){h=(0,o.A)(m)?m:(0,a.A)(t[l+1])?[]:{}}}(0,i.A)(d,p,h);d=d[p]}return e}const u=l;function f(e,t,n){var i=-1,a=t.length,o={};while(++i<a){var c=t[i],l=(0,r.A)(e,c);if(n(l,c)){u(o,(0,s.A)(c,e),l)}}return o}const d=f},97134:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(59386);var i=4;function s(e){return(0,r.A)(e,i)}const a=s},38693:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(55881);var i=n(24461);var s=n(31943);var a=n(13839);var o=Object.prototype;var c=o.hasOwnProperty;var l=(0,r.A)((function(e,t){e=Object(e);var n=-1;var r=t.length;var l=r>2?t[2]:undefined;if(l&&(0,s.A)(t[0],t[1],l)){r=1}while(++n<r){var u=t[n];var f=(0,a.A)(u);var d=-1;var p=f.length;while(++d<p){var h=f[d];var m=e[h];if(m===undefined||(0,i.A)(m,o[h])&&!c.call(e,h)){e[h]=u[h]}}}return e}));const u=l},85075:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(1121);var i=n(21585);var s=n(37947);function a(e){return function(t,n,a){var o=Object(t);if(!(0,i.A)(t)){var c=(0,r.A)(n,3);t=(0,s.A)(t);n=function(e){return c(o[e],e,o)}}var l=e(t,n,a);return l>-1?o[c?t[l]:l]:undefined}}const o=a;var c=n(97314);var l=n(29914);var u=Math.max;function f(e,t,n){var i=e==null?0:e.length;if(!i){return-1}var s=n==null?0:(0,l.A)(n);if(s<0){s=u(i+s,0)}return(0,c.A)(e,(0,r.A)(t,3),s)}const d=f;var p=o(d);const h=p},57852:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(62040);var i=n(8937);function s(e,t){return(0,r.A)((0,i.A)(e,t),1)}const a=s},74033:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(62040);function i(e){var t=e==null?0:e.length;return t?(0,r.A)(e,1):[]}const s=i},2850:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=Object.prototype;var i=r.hasOwnProperty;function s(e,t){return e!=null&&i.call(e,t)}const a=s;var o=n(64491);function c(e,t){return e!=null&&(0,o.A)(e,t,a)}const l=c},86378:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(64128);var i=n(39990);var s=n(53315);var a="[object String]";function o(e){return typeof e=="string"||!(0,i.A)(e)&&(0,s.A)(e)&&(0,r.A)(e)==a}const c=o},80359:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});function r(e){var t=e==null?0:e.length;return t?e[t-1]:undefined}const i=r},8937:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(98519);var i=n(1121);var s=n(97457);var a=n(39990);function o(e,t){var n=(0,a.A)(e)?r.A:s.A;return n(e,(0,i.A)(t,3))}const c=o},963:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(95852);var i=n(51135);var s=n(63077);function a(e){return e&&e.length?(0,r.A)(e,s.A,i.A):undefined}const o=a},52712:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var r=/\s/;function i(e){var t=e.length;while(t--&&r.test(e.charAt(t))){}return t}const s=i;var a=/^\s+/;function o(e){return e?e.slice(0,s(e)+1).replace(a,""):e}const c=o;var l=n(85356);var u=n(62579);var f=0/0;var d=/^[-+]0x[0-9a-f]+$/i;var p=/^0b[01]+$/i;var h=/^0o[0-7]+$/i;var m=parseInt;function g(e){if(typeof e=="number"){return e}if((0,u.A)(e)){return f}if((0,l.A)(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=(0,l.A)(t)?t+"":t}if(typeof e!="string"){return e===0?e:+e}e=c(e);var n=p.test(e);return n||h.test(e)?m(e.slice(2),n?2:8):d.test(e)?f:+e}const y=g;var T=1/0,R=17976931348623157e292;function v(e){if(!e){return e===0?e:0}e=y(e);if(e===T||e===-T){var t=e<0?-1:1;return t*R}return e===e?e:0}const A=v},29914:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(52712);function i(e){var t=(0,r.A)(e),n=t%1;return t===t?n?t-n:t:0}const s=i},65606:e=>{var t=e.exports={};var n;var r;function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=i}}catch(e){n=i}try{if(typeof clearTimeout==="function"){r=clearTimeout}else{r=s}}catch(e){r=s}})();function a(e){if(n===setTimeout){return setTimeout(e,0)}if((n===i||!n)&&setTimeout){n=setTimeout;return setTimeout(e,0)}try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function o(e){if(r===clearTimeout){return clearTimeout(e)}if((r===s||!r)&&clearTimeout){r=clearTimeout;return clearTimeout(e)}try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}var c=[];var l=false;var u;var f=-1;function d(){if(!l||!u){return}l=false;if(u.length){c=u.concat(c)}else{f=-1}if(c.length){p()}}function p(){if(l){return}var e=a(d);l=true;var t=c.length;while(t){u=c;c=[];while(++f<t){if(u){u[f].run()}}f=-1;t=c.length}u=null;l=false;o(e)}t.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var n=1;n<arguments.length;n++){t[n-1]=arguments[n]}}c.push(new h(e,t));if(c.length===1&&!l){a(p)}};function h(e,t){this.fun=e;this.array=t}h.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=true;t.env={};t.argv=[];t.version="";t.versions={};function m(){}t.on=m;t.addListener=m;t.once=m;t.off=m;t.removeListener=m;t.removeAllListeners=m;t.emit=m;t.prependListener=m;t.prependOnceListener=m;t.listeners=function(e){return[]};t.binding=function(e){throw new Error("process.binding is not supported")};t.cwd=function(){return"/"};t.chdir=function(e){throw new Error("process.chdir is not supported")};t.umask=function(){return 0}},26087:(e,t,n)=>{"use strict";e.exports=n(76439)},54512:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.createProtocolConnection=void 0;const s=n(26087);i(n(26087),t);i(n(98766),t);function a(e,t,n,r){return(0,s.createMessageConnection)(e,t,n,r)}t.createProtocolConnection=a},98766:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){if(r===undefined)r=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,i)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]});var i=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))r(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.LSPErrorCodes=t.createProtocolConnection=void 0;i(n(76439),t);i(n(57806),t);i(n(90372),t);i(n(91560),t);var s=n(41580);Object.defineProperty(t,"createProtocolConnection",{enumerable:true,get:function(){return s.createProtocolConnection}});var a;(function(e){e.lspReservedErrorRangeStart=-32899;e.RequestFailed=-32803;e.ServerCancelled=-32802;e.ContentModified=-32801;e.RequestCancelled=-32800;e.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))},41580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createProtocolConnection=void 0;const r=n(76439);function i(e,t,n,i){if(r.ConnectionStrategy.is(i)){i={connectionStrategy:i}}return(0,r.createMessageConnection)(e,t,n,i)}t.createProtocolConnection=i},90372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(76439);var i;(function(e){e["clientToServer"]="clientToServer";e["serverToClient"]="serverToClient";e["both"]="both"})(i||(t.MessageDirection=i={}));class s{constructor(e){this.method=e}}t.RegistrationType=s;class a extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=a;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class c extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=c;class l extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=l},71146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/prepareCallHierarchy";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.CallHierarchyPrepareRequest=i={}));var s;(function(e){e.method="callHierarchy/incomingCalls";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.CallHierarchyIncomingCallsRequest=s={}));var a;(function(e){e.method="callHierarchy/outgoingCalls";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(a||(t.CallHierarchyOutgoingCallsRequest=a={}))},77672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/documentColor";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.DocumentColorRequest=i={}));var s;(function(e){e.method="textDocument/colorPresentation";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.ColorPresentationRequest=s={}))},41660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ConfigurationRequest=void 0;const r=n(90372);var i;(function(e){e.method="workspace/configuration";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType(e.method)})(i||(t.ConfigurationRequest=i={}))},46914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DeclarationRequest=void 0;const r=n(90372);let i;var s;(function(e){e.method="textDocument/declaration";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.DeclarationRequest=s={}))},26011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(76439);const i=n(38598);const s=n(90372);var a;(function(e){function t(e){const t=e;return t&&i.boolean(t.retriggerRequest)}e.is=t})(a||(t.DiagnosticServerCancellationData=a={}));var o;(function(e){e.Full="full";e.Unchanged="unchanged"})(o||(t.DocumentDiagnosticReportKind=o={}));var c;(function(e){e.method="textDocument/diagnostic";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolRequestType(e.method);e.partialResult=new r.ProgressType})(c||(t.DocumentDiagnosticRequest=c={}));var l;(function(e){e.method="workspace/diagnostic";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolRequestType(e.method);e.partialResult=new r.ProgressType})(l||(t.WorkspaceDiagnosticRequest=l={}));var u;(function(e){e.method=`workspace/diagnostic/refresh`;e.messageDirection=s.MessageDirection.serverToClient;e.type=new s.ProtocolRequestType0(e.method)})(u||(t.DiagnosticRefreshRequest=u={}))},69840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(90372);var i;(function(e){e.file="file";e.folder="folder"})(i||(t.FileOperationPatternKind=i={}));var s;(function(e){e.method="workspace/willCreateFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.WillCreateFilesRequest=s={}));var a;(function(e){e.method="workspace/didCreateFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(a||(t.DidCreateFilesNotification=a={}));var o;(function(e){e.method="workspace/willRenameFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(o||(t.WillRenameFilesRequest=o={}));var c;(function(e){e.method="workspace/didRenameFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(c||(t.DidRenameFilesNotification=c={}));var l;(function(e){e.method="workspace/didDeleteFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(l||(t.DidDeleteFilesNotification=l={}));var u;(function(e){e.method="workspace/willDeleteFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(u||(t.WillDeleteFilesRequest=u={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/foldingRange";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.FoldingRangeRequest=i={}));var s;(function(e){e.method=`workspace/foldingRange/refresh`;e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(s||(t.FoldingRangeRefreshRequest=s={}))},39574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ImplementationRequest=void 0;const r=n(90372);let i;var s;(function(e){e.method="textDocument/implementation";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.ImplementationRequest=s={}))},77752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/inlayHint";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.InlayHintRequest=i={}));var s;(function(e){e.method="inlayHint/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.InlayHintResolveRequest=s={}));var a;(function(e){e.method=`workspace/inlayHint/refresh`;e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(a||(t.InlayHintRefreshRequest=a={}))},13307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.InlineCompletionRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/inlineCompletion";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.InlineCompletionRequest=i={}))},63124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/inlineValue";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.InlineValueRequest=i={}));var s;(function(e){e.method=`workspace/inlineValue/refresh`;e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(s||(t.InlineValueRefreshRequest=s={}))},91560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});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;const r=n(90372);const i=n(57806);const s=n(38598);const a=n(39574);Object.defineProperty(t,"ImplementationRequest",{enumerable:true,get:function(){return a.ImplementationRequest}});const o=n(68461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:true,get:function(){return o.TypeDefinitionRequest}});const c=n(99935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:true,get:function(){return c.WorkspaceFoldersRequest}});Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:true,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(41660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:true,get:function(){return l.ConfigurationRequest}});const u=n(77672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:true,get:function(){return u.DocumentColorRequest}});Object.defineProperty(t,"ColorPresentationRequest",{enumerable:true,get:function(){return u.ColorPresentationRequest}});const f=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:true,get:function(){return f.FoldingRangeRequest}});Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:true,get:function(){return f.FoldingRangeRefreshRequest}});const d=n(46914);Object.defineProperty(t,"DeclarationRequest",{enumerable:true,get:function(){return d.DeclarationRequest}});const p=n(33487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:true,get:function(){return p.SelectionRangeRequest}});const h=n(32687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:true,get:function(){return h.WorkDoneProgress}});Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:true,get:function(){return h.WorkDoneProgressCreateRequest}});Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:true,get:function(){return h.WorkDoneProgressCancelNotification}});const m=n(71146);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:true,get:function(){return m.CallHierarchyIncomingCallsRequest}});Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:true,get:function(){return m.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:true,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(72478);Object.defineProperty(t,"TokenFormat",{enumerable:true,get:function(){return g.TokenFormat}});Object.defineProperty(t,"SemanticTokensRequest",{enumerable:true,get:function(){return g.SemanticTokensRequest}});Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:true,get:function(){return g.SemanticTokensDeltaRequest}});Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:true,get:function(){return g.SemanticTokensRangeRequest}});Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:true,get:function(){return g.SemanticTokensRefreshRequest}});Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:true,get:function(){return g.SemanticTokensRegistrationType}});const y=n(80908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:true,get:function(){return y.ShowDocumentRequest}});const T=n(35316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:true,get:function(){return T.LinkedEditingRangeRequest}});const R=n(69840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:true,get:function(){return R.FileOperationPatternKind}});Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:true,get:function(){return R.DidCreateFilesNotification}});Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:true,get:function(){return R.WillCreateFilesRequest}});Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:true,get:function(){return R.DidRenameFilesNotification}});Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:true,get:function(){return R.WillRenameFilesRequest}});Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:true,get:function(){return R.DidDeleteFilesNotification}});Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:true,get:function(){return R.WillDeleteFilesRequest}});const v=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:true,get:function(){return v.UniquenessLevel}});Object.defineProperty(t,"MonikerKind",{enumerable:true,get:function(){return v.MonikerKind}});Object.defineProperty(t,"MonikerRequest",{enumerable:true,get:function(){return v.MonikerRequest}});const A=n(50645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:true,get:function(){return A.TypeHierarchyPrepareRequest}});Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:true,get:function(){return A.TypeHierarchySubtypesRequest}});Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:true,get:function(){return A.TypeHierarchySupertypesRequest}});const $=n(63124);Object.defineProperty(t,"InlineValueRequest",{enumerable:true,get:function(){return $.InlineValueRequest}});Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:true,get:function(){return $.InlineValueRefreshRequest}});const E=n(77752);Object.defineProperty(t,"InlayHintRequest",{enumerable:true,get:function(){return E.InlayHintRequest}});Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:true,get:function(){return E.InlayHintResolveRequest}});Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:true,get:function(){return E.InlayHintRefreshRequest}});const k=n(26011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:true,get:function(){return k.DiagnosticServerCancellationData}});Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:true,get:function(){return k.DocumentDiagnosticReportKind}});Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:true,get:function(){return k.DocumentDiagnosticRequest}});Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:true,get:function(){return k.WorkspaceDiagnosticRequest}});Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:true,get:function(){return k.DiagnosticRefreshRequest}});const C=n(53557);Object.defineProperty(t,"NotebookCellKind",{enumerable:true,get:function(){return C.NotebookCellKind}});Object.defineProperty(t,"ExecutionSummary",{enumerable:true,get:function(){return C.ExecutionSummary}});Object.defineProperty(t,"NotebookCell",{enumerable:true,get:function(){return C.NotebookCell}});Object.defineProperty(t,"NotebookDocument",{enumerable:true,get:function(){return C.NotebookDocument}});Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:true,get:function(){return C.NotebookDocumentSyncRegistrationType}});Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:true,get:function(){return C.DidOpenNotebookDocumentNotification}});Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:true,get:function(){return C.NotebookCellArrayChange}});Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:true,get:function(){return C.DidChangeNotebookDocumentNotification}});Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:true,get:function(){return C.DidSaveNotebookDocumentNotification}});Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:true,get:function(){return C.DidCloseNotebookDocumentNotification}});const S=n(13307);Object.defineProperty(t,"InlineCompletionRequest",{enumerable:true,get:function(){return S.InlineCompletionRequest}});let x;var w;(function(e){function t(e){const t=e;return s.string(t)||(s.string(t.language)||s.string(t.scheme)||s.string(t.pattern))}e.is=t})(w||(t.TextDocumentFilter=w={}));var N;(function(e){function t(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}e.is=t})(N||(t.NotebookDocumentFilter=N={}));var I;(function(e){function t(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||N.is(t.notebook))&&(t.language===undefined||s.string(t.language))}e.is=t})(I||(t.NotebookCellTextDocumentFilter=I={}));var b;(function(e){function t(e){if(!Array.isArray(e)){return false}for(let t of e){if(!s.string(t)&&!w.is(t)&&!I.is(t)){return false}}return true}e.is=t})(b||(t.DocumentSelector=b={}));var D;(function(e){e.method="client/registerCapability";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType(e.method)})(D||(t.RegistrationRequest=D={}));var L;(function(e){e.method="client/unregisterCapability";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType(e.method)})(L||(t.UnregistrationRequest=L={}));var P;(function(e){e.Create="create";e.Rename="rename";e.Delete="delete"})(P||(t.ResourceOperationKind=P={}));var O;(function(e){e.Abort="abort";e.Transactional="transactional";e.TextOnlyTransactional="textOnlyTransactional";e.Undo="undo"})(O||(t.FailureHandlingKind=O={}));var _;(function(e){e.UTF8="utf-8";e.UTF16="utf-16";e.UTF32="utf-32"})(_||(t.PositionEncodingKind=_={}));var M;(function(e){function t(e){const t=e;return t&&s.string(t.id)&&t.id.length>0}e.hasId=t})(M||(t.StaticRegistrationOptions=M={}));var F;(function(e){function t(e){const t=e;return t&&(t.documentSelector===null||b.is(t.documentSelector))}e.is=t})(F||(t.TextDocumentRegistrationOptions=F={}));var U;(function(e){function t(e){const t=e;return s.objectLiteral(t)&&(t.workDoneProgress===undefined||s.boolean(t.workDoneProgress))}e.is=t;function n(e){const t=e;return t&&s.boolean(t.workDoneProgress)}e.hasWorkDoneProgress=n})(U||(t.WorkDoneProgressOptions=U={}));var G;(function(e){e.method="initialize";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(G||(t.InitializeRequest=G={}));var q;(function(e){e.unknownProtocolVersion=1})(q||(t.InitializeErrorCodes=q={}));var z;(function(e){e.method="initialized";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(z||(t.InitializedNotification=z={}));var j;(function(e){e.method="shutdown";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType0(e.method)})(j||(t.ShutdownRequest=j={}));var K;(function(e){e.method="exit";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType0(e.method)})(K||(t.ExitNotification=K={}));var B;(function(e){e.method="workspace/didChangeConfiguration";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(B||(t.DidChangeConfigurationNotification=B={}));var W;(function(e){e.Error=1;e.Warning=2;e.Info=3;e.Log=4;e.Debug=5})(W||(t.MessageType=W={}));var V;(function(e){e.method="window/showMessage";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolNotificationType(e.method)})(V||(t.ShowMessageNotification=V={}));var H;(function(e){e.method="window/showMessageRequest";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType(e.method)})(H||(t.ShowMessageRequest=H={}));var Y;(function(e){e.method="window/logMessage";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolNotificationType(e.method)})(Y||(t.LogMessageNotification=Y={}));var X;(function(e){e.method="telemetry/event";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolNotificationType(e.method)})(X||(t.TelemetryEventNotification=X={}));var Q;(function(e){e.None=0;e.Full=1;e.Incremental=2})(Q||(t.TextDocumentSyncKind=Q={}));var Z;(function(e){e.method="textDocument/didOpen";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(Z||(t.DidOpenTextDocumentNotification=Z={}));var J;(function(e){function t(e){let t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range!==undefined&&(t.rangeLength===undefined||typeof t.rangeLength==="number")}e.isIncremental=t;function n(e){let t=e;return t!==undefined&&t!==null&&typeof t.text==="string"&&t.range===undefined&&t.rangeLength===undefined}e.isFull=n})(J||(t.TextDocumentContentChangeEvent=J={}));var ee;(function(e){e.method="textDocument/didChange";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(ee||(t.DidChangeTextDocumentNotification=ee={}));var te;(function(e){e.method="textDocument/didClose";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(te||(t.DidCloseTextDocumentNotification=te={}));var ne;(function(e){e.method="textDocument/didSave";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(ne||(t.DidSaveTextDocumentNotification=ne={}));var re;(function(e){e.Manual=1;e.AfterDelay=2;e.FocusOut=3})(re||(t.TextDocumentSaveReason=re={}));var ie;(function(e){e.method="textDocument/willSave";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(ie||(t.WillSaveTextDocumentNotification=ie={}));var se;(function(e){e.method="textDocument/willSaveWaitUntil";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(se||(t.WillSaveTextDocumentWaitUntilRequest=se={}));var ae;(function(e){e.method="workspace/didChangeWatchedFiles";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(ae||(t.DidChangeWatchedFilesNotification=ae={}));var oe;(function(e){e.Created=1;e.Changed=2;e.Deleted=3})(oe||(t.FileChangeType=oe={}));var ce;(function(e){function t(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)}e.is=t})(ce||(t.RelativePattern=ce={}));var le;(function(e){e.Create=1;e.Change=2;e.Delete=4})(le||(t.WatchKind=le={}));var ue;(function(e){e.method="textDocument/publishDiagnostics";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolNotificationType(e.method)})(ue||(t.PublishDiagnosticsNotification=ue={}));var fe;(function(e){e.Invoked=1;e.TriggerCharacter=2;e.TriggerForIncompleteCompletions=3})(fe||(t.CompletionTriggerKind=fe={}));var de;(function(e){e.method="textDocument/completion";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(de||(t.CompletionRequest=de={}));var pe;(function(e){e.method="completionItem/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(pe||(t.CompletionResolveRequest=pe={}));var he;(function(e){e.method="textDocument/hover";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(he||(t.HoverRequest=he={}));var me;(function(e){e.Invoked=1;e.TriggerCharacter=2;e.ContentChange=3})(me||(t.SignatureHelpTriggerKind=me={}));var ge;(function(e){e.method="textDocument/signatureHelp";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(ge||(t.SignatureHelpRequest=ge={}));var ye;(function(e){e.method="textDocument/definition";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(ye||(t.DefinitionRequest=ye={}));var Te;(function(e){e.method="textDocument/references";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Te||(t.ReferencesRequest=Te={}));var Re;(function(e){e.method="textDocument/documentHighlight";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Re||(t.DocumentHighlightRequest=Re={}));var ve;(function(e){e.method="textDocument/documentSymbol";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(ve||(t.DocumentSymbolRequest=ve={}));var Ae;(function(e){e.method="textDocument/codeAction";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Ae||(t.CodeActionRequest=Ae={}));var $e;(function(e){e.method="codeAction/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})($e||(t.CodeActionResolveRequest=$e={}));var Ee;(function(e){e.method="workspace/symbol";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Ee||(t.WorkspaceSymbolRequest=Ee={}));var ke;(function(e){e.method="workspaceSymbol/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(ke||(t.WorkspaceSymbolResolveRequest=ke={}));var Ce;(function(e){e.method="textDocument/codeLens";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Ce||(t.CodeLensRequest=Ce={}));var Se;(function(e){e.method="codeLens/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Se||(t.CodeLensResolveRequest=Se={}));var xe;(function(e){e.method=`workspace/codeLens/refresh`;e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(xe||(t.CodeLensRefreshRequest=xe={}));var we;(function(e){e.method="textDocument/documentLink";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(we||(t.DocumentLinkRequest=we={}));var Ne;(function(e){e.method="documentLink/resolve";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Ne||(t.DocumentLinkResolveRequest=Ne={}));var Ie;(function(e){e.method="textDocument/formatting";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Ie||(t.DocumentFormattingRequest=Ie={}));var be;(function(e){e.method="textDocument/rangeFormatting";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(be||(t.DocumentRangeFormattingRequest=be={}));var De;(function(e){e.method="textDocument/rangesFormatting";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(De||(t.DocumentRangesFormattingRequest=De={}));var Le;(function(e){e.method="textDocument/onTypeFormatting";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Le||(t.DocumentOnTypeFormattingRequest=Le={}));var Pe;(function(e){e.Identifier=1})(Pe||(t.PrepareSupportDefaultBehavior=Pe={}));var Oe;(function(e){e.method="textDocument/rename";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Oe||(t.RenameRequest=Oe={}));var _e;(function(e){e.method="textDocument/prepareRename";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(_e||(t.PrepareRenameRequest=_e={}));var Me;(function(e){e.method="workspace/executeCommand";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(Me||(t.ExecuteCommandRequest=Me={}));var Fe;(function(e){e.method="workspace/applyEdit";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType("workspace/applyEdit")})(Fe||(t.ApplyWorkspaceEditRequest=Fe={}))},35316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LinkedEditingRangeRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/linkedEditingRange";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.LinkedEditingRangeRequest=i={}))},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(90372);var i;(function(e){e.document="document";e.project="project";e.group="group";e.scheme="scheme";e.global="global"})(i||(t.UniquenessLevel=i={}));var s;(function(e){e.$import="import";e.$export="export";e.local="local"})(s||(t.MonikerKind=s={}));var a;(function(e){e.method="textDocument/moniker";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(a||(t.MonikerRequest=a={}))},53557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(57806);const i=n(38598);const s=n(90372);var a;(function(e){e.Markup=1;e.Code=2;function t(e){return e===1||e===2}e.is=t})(a||(t.NotebookCellKind=a={}));var o;(function(e){function t(e,t){const n={executionOrder:e};if(t===true||t===false){n.success=t}return n}e.create=t;function n(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(t.success===undefined||i.boolean(t.success))}e.is=n;function s(e,t){if(e===t){return true}if(e===null||e===undefined||t===null||t===undefined){return false}return e.executionOrder===t.executionOrder&&e.success===t.success}e.equals=s})(o||(t.ExecutionSummary=o={}));var c;(function(e){function t(e,t){return{kind:e,document:t}}e.create=t;function n(e){const t=e;return i.objectLiteral(t)&&a.is(t.kind)&&r.DocumentUri.is(t.document)&&(t.metadata===undefined||i.objectLiteral(t.metadata))}e.is=n;function s(e,t){const n=new Set;if(e.document!==t.document){n.add("document")}if(e.kind!==t.kind){n.add("kind")}if(e.executionSummary!==t.executionSummary){n.add("executionSummary")}if((e.metadata!==undefined||t.metadata!==undefined)&&!c(e.metadata,t.metadata)){n.add("metadata")}if((e.executionSummary!==undefined||t.executionSummary!==undefined)&&!o.equals(e.executionSummary,t.executionSummary)){n.add("executionSummary")}return n}e.diff=s;function c(e,t){if(e===t){return true}if(e===null||e===undefined||t===null||t===undefined){return false}if(typeof e!==typeof t){return false}if(typeof e!=="object"){return false}const n=Array.isArray(e);const r=Array.isArray(t);if(n!==r){return false}if(n&&r){if(e.length!==t.length){return false}for(let n=0;n<e.length;n++){if(!c(e[n],t[n])){return false}}}if(i.objectLiteral(e)&&i.objectLiteral(t)){const n=Object.keys(e);const r=Object.keys(t);if(n.length!==r.length){return false}n.sort();r.sort();if(!c(n,r)){return false}for(let i=0;i<n.length;i++){const r=n[i];if(!c(e[r],t[r])){return false}}}return true}})(c||(t.NotebookCell=c={}));var l;(function(e){function t(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}e.create=t;function n(e){const t=e;return i.objectLiteral(t)&&i.string(t.uri)&&r.integer.is(t.version)&&i.typedArray(t.cells,c.is)}e.is=n})(l||(t.NotebookDocument=l={}));var u;(function(e){e.method="notebookDocument/sync";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.RegistrationType(e.method)})(u||(t.NotebookDocumentSyncRegistrationType=u={}));var f;(function(e){e.method="notebookDocument/didOpen";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolNotificationType(e.method);e.registrationMethod=u.method})(f||(t.DidOpenNotebookDocumentNotification=f={}));var d;(function(e){function t(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.start)&&r.uinteger.is(t.deleteCount)&&(t.cells===undefined||i.typedArray(t.cells,c.is))}e.is=t;function n(e,t,n){const r={start:e,deleteCount:t};if(n!==undefined){r.cells=n}return r}e.create=n})(d||(t.NotebookCellArrayChange=d={}));var p;(function(e){e.method="notebookDocument/didChange";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolNotificationType(e.method);e.registrationMethod=u.method})(p||(t.DidChangeNotebookDocumentNotification=p={}));var h;(function(e){e.method="notebookDocument/didSave";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolNotificationType(e.method);e.registrationMethod=u.method})(h||(t.DidSaveNotebookDocumentNotification=h={}));var m;(function(e){e.method="notebookDocument/didClose";e.messageDirection=s.MessageDirection.clientToServer;e.type=new s.ProtocolNotificationType(e.method);e.registrationMethod=u.method})(m||(t.DidCloseNotebookDocumentNotification=m={}))},32687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(76439);const i=n(90372);var s;(function(e){e.type=new r.ProgressType;function t(t){return t===e.type}e.is=t})(s||(t.WorkDoneProgress=s={}));var a;(function(e){e.method="window/workDoneProgress/create";e.messageDirection=i.MessageDirection.serverToClient;e.type=new i.ProtocolRequestType(e.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var o;(function(e){e.method="window/workDoneProgress/cancel";e.messageDirection=i.MessageDirection.clientToServer;e.type=new i.ProtocolNotificationType(e.method)})(o||(t.WorkDoneProgressCancelNotification=o={}))},33487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SelectionRangeRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/selectionRange";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.SelectionRangeRequest=i={}))},72478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(90372);var i;(function(e){e.Relative="relative"})(i||(t.TokenFormat=i={}));var s;(function(e){e.method="textDocument/semanticTokens";e.type=new r.RegistrationType(e.method)})(s||(t.SemanticTokensRegistrationType=s={}));var a;(function(e){e.method="textDocument/semanticTokens/full";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method);e.registrationMethod=s.method})(a||(t.SemanticTokensRequest=a={}));var o;(function(e){e.method="textDocument/semanticTokens/full/delta";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method);e.registrationMethod=s.method})(o||(t.SemanticTokensDeltaRequest=o={}));var c;(function(e){e.method="textDocument/semanticTokens/range";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method);e.registrationMethod=s.method})(c||(t.SemanticTokensRangeRequest=c={}));var l;(function(e){e.method=`workspace/semanticTokens/refresh`;e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(l||(t.SemanticTokensRefreshRequest=l={}))},80908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ShowDocumentRequest=void 0;const r=n(90372);var i;(function(e){e.method="window/showDocument";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType(e.method)})(i||(t.ShowDocumentRequest=i={}))},68461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TypeDefinitionRequest=void 0;const r=n(90372);let i;var s;(function(e){e.method="textDocument/typeDefinition";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.TypeDefinitionRequest=s={}))},50645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(90372);var i;(function(e){e.method="textDocument/prepareTypeHierarchy";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(i||(t.TypeHierarchyPrepareRequest=i={}));var s;(function(e){e.method="typeHierarchy/supertypes";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(s||(t.TypeHierarchySupertypesRequest=s={}));var a;(function(e){e.method="typeHierarchy/subtypes";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolRequestType(e.method)})(a||(t.TypeHierarchySubtypesRequest=a={}))},99935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(90372);var i;(function(e){e.method="workspace/workspaceFolders";e.messageDirection=r.MessageDirection.serverToClient;e.type=new r.ProtocolRequestType0(e.method)})(i||(t.WorkspaceFoldersRequest=i={}));var s;(function(e){e.method="workspace/didChangeWorkspaceFolders";e.messageDirection=r.MessageDirection.clientToServer;e.type=new r.ProtocolNotificationType(e.method)})(s||(t.DidChangeWorkspaceFoldersNotification=s={}))},38598:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function n(e){return e===true||e===false}t.boolean=n;function r(e){return typeof e==="string"||e instanceof String}t.string=r;function i(e){return typeof e==="number"||e instanceof Number}t.number=i;function s(e){return e instanceof Error}t.error=s;function a(e){return typeof e==="function"}t.func=a;function o(e){return Array.isArray(e)}t.array=o;function c(e){return o(e)&&e.every((e=>r(e)))}t.stringArray=c;function l(e,t){return Array.isArray(e)&&e.every(t)}t.typedArray=l;function u(e){return e!==null&&typeof e==="object"}t.objectLiteral=u},57806:(e,t,n)=>{"use strict";n.r(t);n.d(t,{AnnotatedTextEdit:()=>C,ChangeAnnotation:()=>E,ChangeAnnotationIdentifier:()=>k,CodeAction:()=>ce,CodeActionContext:()=>oe,CodeActionKind:()=>se,CodeActionTriggerKind:()=>ae,CodeDescription:()=>R,CodeLens:()=>le,Color:()=>f,ColorInformation:()=>d,ColorPresentation:()=>p,Command:()=>A,CompletionItem:()=>W,CompletionItemKind:()=>G,CompletionItemLabelDetails:()=>B,CompletionItemTag:()=>z,CompletionList:()=>V,CreateFile:()=>x,DeleteFile:()=>N,Diagnostic:()=>v,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>T,DocumentHighlight:()=>J,DocumentHighlightKind:()=>Z,DocumentLink:()=>fe,DocumentSymbol:()=>ie,DocumentUri:()=>r,EOL:()=>Ie,FoldingRange:()=>m,FoldingRangeKind:()=>h,FormattingOptions:()=>ue,Hover:()=>Y,InlayHint:()=>$e,InlayHintKind:()=>ve,InlayHintLabelPart:()=>Ae,InlineCompletionContext:()=>we,InlineCompletionItem:()=>ke,InlineCompletionList:()=>Ce,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>Re,InlineValueEvaluatableExpression:()=>Te,InlineValueText:()=>ge,InlineValueVariableLookup:()=>ye,InsertReplaceEdit:()=>j,InsertTextFormat:()=>q,InsertTextMode:()=>K,Location:()=>l,LocationLink:()=>u,MarkedString:()=>H,MarkupContent:()=>U,MarkupKind:()=>F,OptionalVersionedTextDocumentIdentifier:()=>_,ParameterInformation:()=>X,Position:()=>o,Range:()=>c,RenameFile:()=>w,SelectedCompletionInfo:()=>xe,SelectionRange:()=>de,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>pe,SemanticTokens:()=>me,SignatureInformation:()=>Q,StringValue:()=>Ee,SymbolInformation:()=>ne,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>be,TextDocumentEdit:()=>S,TextDocumentIdentifier:()=>P,TextDocumentItem:()=>M,TextEdit:()=>$,URI:()=>i,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>L,WorkspaceEdit:()=>I,WorkspaceFolder:()=>Ne,WorkspaceSymbol:()=>re,integer:()=>s,uinteger:()=>a});var r;(function(e){function t(e){return typeof e==="string"}e.is=t})(r||(r={}));var i;(function(e){function t(e){return typeof e==="string"}e.is=t})(i||(i={}));var s;(function(e){e.MIN_VALUE=-2147483648;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(s||(s={}));var a;(function(e){e.MIN_VALUE=0;e.MAX_VALUE=2147483647;function t(t){return typeof t==="number"&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(a||(a={}));var o;(function(e){function t(e,t){if(e===Number.MAX_VALUE){e=a.MAX_VALUE}if(t===Number.MAX_VALUE){t=a.MAX_VALUE}return{line:e,character:t}}e.create=t;function n(e){let t=e;return Le.objectLiteral(t)&&Le.uinteger(t.line)&&Le.uinteger(t.character)}e.is=n})(o||(o={}));var c;(function(e){function t(e,t,n,r){if(Le.uinteger(e)&&Le.uinteger(t)&&Le.uinteger(n)&&Le.uinteger(r)){return{start:o.create(e,t),end:o.create(n,r)}}else if(o.is(e)&&o.is(t)){return{start:e,end:t}}else{throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}}e.create=t;function n(e){let t=e;return Le.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}e.is=n})(c||(c={}));var l;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return Le.objectLiteral(t)&&c.is(t.range)&&(Le.string(t.uri)||Le.undefined(t.uri))}e.is=n})(l||(l={}));var u;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return Le.objectLiteral(t)&&c.is(t.targetRange)&&Le.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Le.undefined(t.originSelectionRange))}e.is=n})(u||(u={}));var f;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&Le.numberRange(t.red,0,1)&&Le.numberRange(t.green,0,1)&&Le.numberRange(t.blue,0,1)&&Le.numberRange(t.alpha,0,1)}e.is=n})(f||(f={}));var d;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&c.is(t.range)&&f.is(t.color)}e.is=n})(d||(d={}));var p;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&Le.string(t.label)&&(Le.undefined(t.textEdit)||$.is(t))&&(Le.undefined(t.additionalTextEdits)||Le.typedArray(t.additionalTextEdits,$.is))}e.is=n})(p||(p={}));var h;(function(e){e.Comment="comment";e.Imports="imports";e.Region="region"})(h||(h={}));var m;(function(e){function t(e,t,n,r,i,s){const a={startLine:e,endLine:t};if(Le.defined(n)){a.startCharacter=n}if(Le.defined(r)){a.endCharacter=r}if(Le.defined(i)){a.kind=i}if(Le.defined(s)){a.collapsedText=s}return a}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&Le.uinteger(t.startLine)&&Le.uinteger(t.startLine)&&(Le.undefined(t.startCharacter)||Le.uinteger(t.startCharacter))&&(Le.undefined(t.endCharacter)||Le.uinteger(t.endCharacter))&&(Le.undefined(t.kind)||Le.string(t.kind))}e.is=n})(m||(m={}));var g;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return Le.defined(t)&&l.is(t.location)&&Le.string(t.message)}e.is=n})(g||(g={}));var y;(function(e){e.Error=1;e.Warning=2;e.Information=3;e.Hint=4})(y||(y={}));var T;(function(e){e.Unnecessary=1;e.Deprecated=2})(T||(T={}));var R;(function(e){function t(e){const t=e;return Le.objectLiteral(t)&&Le.string(t.href)}e.is=t})(R||(R={}));var v;(function(e){function t(e,t,n,r,i,s){let a={range:e,message:t};if(Le.defined(n)){a.severity=n}if(Le.defined(r)){a.code=r}if(Le.defined(i)){a.source=i}if(Le.defined(s)){a.relatedInformation=s}return a}e.create=t;function n(e){var t;let n=e;return Le.defined(n)&&c.is(n.range)&&Le.string(n.message)&&(Le.number(n.severity)||Le.undefined(n.severity))&&(Le.integer(n.code)||Le.string(n.code)||Le.undefined(n.code))&&(Le.undefined(n.codeDescription)||Le.string((t=n.codeDescription)===null||t===void 0?void 0:t.href))&&(Le.string(n.source)||Le.undefined(n.source))&&(Le.undefined(n.relatedInformation)||Le.typedArray(n.relatedInformation,g.is))}e.is=n})(v||(v={}));var A;(function(e){function t(e,t,...n){let r={title:e,command:t};if(Le.defined(n)&&n.length>0){r.arguments=n}return r}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.title)&&Le.string(t.command)}e.is=n})(A||(A={}));var $;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:""}}e.del=r;function i(e){const t=e;return Le.objectLiteral(t)&&Le.string(t.newText)&&c.is(t.range)}e.is=i})($||($={}));var E;(function(e){function t(e,t,n){const r={label:e};if(t!==undefined){r.needsConfirmation=t}if(n!==undefined){r.description=n}return r}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&Le.string(t.label)&&(Le.boolean(t.needsConfirmation)||t.needsConfirmation===undefined)&&(Le.string(t.description)||t.description===undefined)}e.is=n})(E||(E={}));var k;(function(e){function t(e){const t=e;return Le.string(t)}e.is=t})(k||(k={}));var C;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:"",annotationId:t}}e.del=r;function i(e){const t=e;return $.is(t)&&(E.is(t.annotationId)||k.is(t.annotationId))}e.is=i})(C||(C={}));var S;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return Le.defined(t)&&_.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(S||(S={}));var x;(function(e){function t(e,t,n){let r={kind:"create",uri:e};if(t!==undefined&&(t.overwrite!==undefined||t.ignoreIfExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="create"&&Le.string(t.uri)&&(t.options===undefined||(t.options.overwrite===undefined||Le.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Le.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||k.is(t.annotationId))}e.is=n})(x||(x={}));var w;(function(e){function t(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};if(n!==undefined&&(n.overwrite!==undefined||n.ignoreIfExists!==undefined)){i.options=n}if(r!==undefined){i.annotationId=r}return i}e.create=t;function n(e){let t=e;return t&&t.kind==="rename"&&Le.string(t.oldUri)&&Le.string(t.newUri)&&(t.options===undefined||(t.options.overwrite===undefined||Le.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===undefined||Le.boolean(t.options.ignoreIfExists)))&&(t.annotationId===undefined||k.is(t.annotationId))}e.is=n})(w||(w={}));var N;(function(e){function t(e,t,n){let r={kind:"delete",uri:e};if(t!==undefined&&(t.recursive!==undefined||t.ignoreIfNotExists!==undefined)){r.options=t}if(n!==undefined){r.annotationId=n}return r}e.create=t;function n(e){let t=e;return t&&t.kind==="delete"&&Le.string(t.uri)&&(t.options===undefined||(t.options.recursive===undefined||Le.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===undefined||Le.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===undefined||k.is(t.annotationId))}e.is=n})(N||(N={}));var I;(function(e){function t(e){let t=e;return t&&(t.changes!==undefined||t.documentChanges!==undefined)&&(t.documentChanges===undefined||t.documentChanges.every((e=>{if(Le.string(e.kind)){return x.is(e)||w.is(e)||N.is(e)}else{return S.is(e)}})))}e.is=t})(I||(I={}));class b{constructor(e,t){this.edits=e;this.changeAnnotations=t}insert(e,t,n){let r;let i;if(n===undefined){r=$.insert(e,t)}else if(k.is(n)){i=n;r=C.insert(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=C.insert(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}replace(e,t,n){let r;let i;if(n===undefined){r=$.replace(e,t)}else if(k.is(n)){i=n;r=C.replace(e,t,n)}else{this.assertChangeAnnotations(this.changeAnnotations);i=this.changeAnnotations.manage(n);r=C.replace(e,t,i)}this.edits.push(r);if(i!==undefined){return i}}delete(e,t){let n;let r;if(t===undefined){n=$.del(e)}else if(k.is(t)){r=t;n=C.del(e,t)}else{this.assertChangeAnnotations(this.changeAnnotations);r=this.changeAnnotations.manage(t);n=C.del(e,r)}this.edits.push(n);if(r!==undefined){return r}}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===undefined){throw new Error(`Text edit change is not configured to manage change annotations.`)}}}class D{constructor(e){this._annotations=e===undefined?Object.create(null):e;this._counter=0;this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(k.is(e)){n=e}else{n=this.nextId();t=e}if(this._annotations[n]!==undefined){throw new Error(`Id ${n} is already in use.`)}if(t===undefined){throw new Error(`No annotation provided for id ${n}`)}this._annotations[n]=t;this._size++;return n}nextId(){this._counter++;return this._counter.toString()}}class L{constructor(e){this._textEditChanges=Object.create(null);if(e!==undefined){this._workspaceEdit=e;if(e.documentChanges){this._changeAnnotations=new D(e.changeAnnotations);e.changeAnnotations=this._changeAnnotations.all();e.documentChanges.forEach((e=>{if(S.is(e)){const t=new b(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))}else if(e.changes){Object.keys(e.changes).forEach((t=>{const n=new b(e.changes[t]);this._textEditChanges[t]=n}))}}else{this._workspaceEdit={}}}get edit(){this.initDocumentChanges();if(this._changeAnnotations!==undefined){if(this._changeAnnotations.size===0){this._workspaceEdit.changeAnnotations=undefined}else{this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}return this._workspaceEdit}getTextEditChange(e){if(_.is(e)){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[];const r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r);n=new b(e,this._changeAnnotations);this._textEditChanges[t.uri]=n}return n}else{this.initChanges();if(this._workspaceEdit.changes===undefined){throw new Error("Workspace edit is not configured for normal text edit changes.")}let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n;t=new b(n);this._textEditChanges[e]=t}return t}}initDocumentChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._changeAnnotations=new D;this._workspaceEdit.documentChanges=[];this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}}initChanges(){if(this._workspaceEdit.documentChanges===undefined&&this._workspaceEdit.changes===undefined){this._workspaceEdit.changes=Object.create(null)}}createFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(E.is(t)||k.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=x.create(e,n)}else{s=k.is(r)?r:this._changeAnnotations.manage(r);i=x.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}renameFile(e,t,n,r){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let i;if(E.is(n)||k.is(n)){i=n}else{r=n}let s;let a;if(i===undefined){s=w.create(e,t,r)}else{a=k.is(i)?i:this._changeAnnotations.manage(i);s=w.create(e,t,r,a)}this._workspaceEdit.documentChanges.push(s);if(a!==undefined){return a}}deleteFile(e,t,n){this.initDocumentChanges();if(this._workspaceEdit.documentChanges===undefined){throw new Error("Workspace edit is not configured for document changes.")}let r;if(E.is(t)||k.is(t)){r=t}else{n=t}let i;let s;if(r===undefined){i=N.create(e,n)}else{s=k.is(r)?r:this._changeAnnotations.manage(r);i=N.create(e,n,s)}this._workspaceEdit.documentChanges.push(i);if(s!==undefined){return s}}}var P;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.uri)}e.is=n})(P||(P={}));var O;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.uri)&&Le.integer(t.version)}e.is=n})(O||(O={}));var _;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.uri)&&(t.version===null||Le.integer(t.version))}e.is=n})(_||(_={}));var M;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.uri)&&Le.string(t.languageId)&&Le.integer(t.version)&&Le.string(t.text)}e.is=n})(M||(M={}));var F;(function(e){e.PlainText="plaintext";e.Markdown="markdown";function t(t){const n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(F||(F={}));var U;(function(e){function t(e){const t=e;return Le.objectLiteral(e)&&F.is(t.kind)&&Le.string(t.value)}e.is=t})(U||(U={}));var G;(function(e){e.Text=1;e.Method=2;e.Function=3;e.Constructor=4;e.Field=5;e.Variable=6;e.Class=7;e.Interface=8;e.Module=9;e.Property=10;e.Unit=11;e.Value=12;e.Enum=13;e.Keyword=14;e.Snippet=15;e.Color=16;e.File=17;e.Reference=18;e.Folder=19;e.EnumMember=20;e.Constant=21;e.Struct=22;e.Event=23;e.Operator=24;e.TypeParameter=25})(G||(G={}));var q;(function(e){e.PlainText=1;e.Snippet=2})(q||(q={}));var z;(function(e){e.Deprecated=1})(z||(z={}));var j;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){const t=e;return t&&Le.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}e.is=n})(j||(j={}));var K;(function(e){e.asIs=1;e.adjustIndentation=2})(K||(K={}));var B;(function(e){function t(e){const t=e;return t&&(Le.string(t.detail)||t.detail===undefined)&&(Le.string(t.description)||t.description===undefined)}e.is=t})(B||(B={}));var W;(function(e){function t(e){return{label:e}}e.create=t})(W||(W={}));var V;(function(e){function t(e,t){return{items:e?e:[],isIncomplete:!!t}}e.create=t})(V||(V={}));var H;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(e){const t=e;return Le.string(t)||Le.objectLiteral(t)&&Le.string(t.language)&&Le.string(t.value)}e.is=n})(H||(H={}));var Y;(function(e){function t(e){let t=e;return!!t&&Le.objectLiteral(t)&&(U.is(t.contents)||H.is(t.contents)||Le.typedArray(t.contents,H.is))&&(e.range===undefined||c.is(e.range))}e.is=t})(Y||(Y={}));var X;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(X||(X={}));var Q;(function(e){function t(e,t,...n){let r={label:e};if(Le.defined(t)){r.documentation=t}if(Le.defined(n)){r.parameters=n}else{r.parameters=[]}return r}e.create=t})(Q||(Q={}));var Z;(function(e){e.Text=1;e.Read=2;e.Write=3})(Z||(Z={}));var J;(function(e){function t(e,t){let n={range:e};if(Le.number(t)){n.kind=t}return n}e.create=t})(J||(J={}));var ee;(function(e){e.File=1;e.Module=2;e.Namespace=3;e.Package=4;e.Class=5;e.Method=6;e.Property=7;e.Field=8;e.Constructor=9;e.Enum=10;e.Interface=11;e.Function=12;e.Variable=13;e.Constant=14;e.String=15;e.Number=16;e.Boolean=17;e.Array=18;e.Object=19;e.Key=20;e.Null=21;e.EnumMember=22;e.Struct=23;e.Event=24;e.Operator=25;e.TypeParameter=26})(ee||(ee={}));var te;(function(e){e.Deprecated=1})(te||(te={}));var ne;(function(e){function t(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};if(i){s.containerName=i}return s}e.create=t})(ne||(ne={}));var re;(function(e){function t(e,t,n,r){return r!==undefined?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}e.create=t})(re||(re={}));var ie;(function(e){function t(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};if(s!==undefined){a.children=s}return a}e.create=t;function n(e){let t=e;return t&&Le.string(t.name)&&Le.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(t.detail===undefined||Le.string(t.detail))&&(t.deprecated===undefined||Le.boolean(t.deprecated))&&(t.children===undefined||Array.isArray(t.children))&&(t.tags===undefined||Array.isArray(t.tags))}e.is=n})(ie||(ie={}));var se;(function(e){e.Empty="";e.QuickFix="quickfix";e.Refactor="refactor";e.RefactorExtract="refactor.extract";e.RefactorInline="refactor.inline";e.RefactorRewrite="refactor.rewrite";e.Source="source";e.SourceOrganizeImports="source.organizeImports";e.SourceFixAll="source.fixAll"})(se||(se={}));var ae;(function(e){e.Invoked=1;e.Automatic=2})(ae||(ae={}));var oe;(function(e){function t(e,t,n){let r={diagnostics:e};if(t!==undefined&&t!==null){r.only=t}if(n!==undefined&&n!==null){r.triggerKind=n}return r}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.typedArray(t.diagnostics,v.is)&&(t.only===undefined||Le.typedArray(t.only,Le.string))&&(t.triggerKind===undefined||t.triggerKind===ae.Invoked||t.triggerKind===ae.Automatic)}e.is=n})(oe||(oe={}));var ce;(function(e){function t(e,t,n){let r={title:e};let i=true;if(typeof t==="string"){i=false;r.kind=t}else if(A.is(t)){r.command=t}else{r.edit=t}if(i&&n!==undefined){r.kind=n}return r}e.create=t;function n(e){let t=e;return t&&Le.string(t.title)&&(t.diagnostics===undefined||Le.typedArray(t.diagnostics,v.is))&&(t.kind===undefined||Le.string(t.kind))&&(t.edit!==undefined||t.command!==undefined)&&(t.command===undefined||A.is(t.command))&&(t.isPreferred===undefined||Le.boolean(t.isPreferred))&&(t.edit===undefined||I.is(t.edit))}e.is=n})(ce||(ce={}));var le;(function(e){function t(e,t){let n={range:e};if(Le.defined(t)){n.data=t}return n}e.create=t;function n(e){let t=e;return Le.defined(t)&&c.is(t.range)&&(Le.undefined(t.command)||A.is(t.command))}e.is=n})(le||(le={}));var ue;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.uinteger(t.tabSize)&&Le.boolean(t.insertSpaces)}e.is=n})(ue||(ue={}));var fe;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return Le.defined(t)&&c.is(t.range)&&(Le.undefined(t.target)||Le.string(t.target))}e.is=n})(fe||(fe={}));var de;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return Le.objectLiteral(n)&&c.is(n.range)&&(n.parent===undefined||e.is(n.parent))}e.is=n})(de||(de={}));var pe;(function(e){e["namespace"]="namespace";e["type"]="type";e["class"]="class";e["enum"]="enum";e["interface"]="interface";e["struct"]="struct";e["typeParameter"]="typeParameter";e["parameter"]="parameter";e["variable"]="variable";e["property"]="property";e["enumMember"]="enumMember";e["event"]="event";e["function"]="function";e["method"]="method";e["macro"]="macro";e["keyword"]="keyword";e["modifier"]="modifier";e["comment"]="comment";e["string"]="string";e["number"]="number";e["regexp"]="regexp";e["operator"]="operator";e["decorator"]="decorator"})(pe||(pe={}));var he;(function(e){e["declaration"]="declaration";e["definition"]="definition";e["readonly"]="readonly";e["static"]="static";e["deprecated"]="deprecated";e["abstract"]="abstract";e["async"]="async";e["modification"]="modification";e["documentation"]="documentation";e["defaultLibrary"]="defaultLibrary"})(he||(he={}));var me;(function(e){function t(e){const t=e;return Le.objectLiteral(t)&&(t.resultId===undefined||typeof t.resultId==="string")&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==="number")}e.is=t})(me||(me={}));var ge;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&c.is(t.range)&&Le.string(t.text)}e.is=n})(ge||(ge={}));var ye;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&c.is(t.range)&&Le.boolean(t.caseSensitiveLookup)&&(Le.string(t.variableName)||t.variableName===undefined)}e.is=n})(ye||(ye={}));var Te;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){const t=e;return t!==undefined&&t!==null&&c.is(t.range)&&(Le.string(t.expression)||t.expression===undefined)}e.is=n})(Te||(Te={}));var Re;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){const t=e;return Le.defined(t)&&c.is(e.stoppedLocation)}e.is=n})(Re||(Re={}));var ve;(function(e){e.Type=1;e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(ve||(ve={}));var Ae;(function(e){function t(e){return{value:e}}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&(t.tooltip===undefined||Le.string(t.tooltip)||U.is(t.tooltip))&&(t.location===undefined||l.is(t.location))&&(t.command===undefined||A.is(t.command))}e.is=n})(Ae||(Ae={}));var $e;(function(e){function t(e,t,n){const r={position:e,label:t};if(n!==undefined){r.kind=n}return r}e.create=t;function n(e){const t=e;return Le.objectLiteral(t)&&o.is(t.position)&&(Le.string(t.label)||Le.typedArray(t.label,Ae.is))&&(t.kind===undefined||ve.is(t.kind))&&t.textEdits===undefined||Le.typedArray(t.textEdits,$.is)&&(t.tooltip===undefined||Le.string(t.tooltip)||U.is(t.tooltip))&&(t.paddingLeft===undefined||Le.boolean(t.paddingLeft))&&(t.paddingRight===undefined||Le.boolean(t.paddingRight))}e.is=n})($e||($e={}));var Ee;(function(e){function t(e){return{kind:"snippet",value:e}}e.createSnippet=t})(Ee||(Ee={}));var ke;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(ke||(ke={}));var Ce;(function(e){function t(e){return{items:e}}e.create=t})(Ce||(Ce={}));var Se;(function(e){e.Invoked=0;e.Automatic=1})(Se||(Se={}));var xe;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(xe||(xe={}));var we;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(we||(we={}));var Ne;(function(e){function t(e){const t=e;return Le.objectLiteral(t)&&i.is(t.uri)&&Le.string(t.name)}e.is=t})(Ne||(Ne={}));const Ie=["\n","\r\n","\r"];var be;(function(e){function t(e,t,n,r){return new De(e,t,n,r)}e.create=t;function n(e){let t=e;return Le.defined(t)&&Le.string(t.uri)&&(Le.undefined(t.languageId)||Le.string(t.languageId))&&Le.uinteger(t.lineCount)&&Le.func(t.getText)&&Le.func(t.positionAt)&&Le.func(t.offsetAt)?true:false}e.is=n;function r(e,t){let n=e.getText();let r=i(t,((e,t)=>{let n=e.range.start.line-t.range.start.line;if(n===0){return e.range.start.character-t.range.start.character}return n}));let s=n.length;for(let i=r.length-1;i>=0;i--){let t=r[i];let a=e.offsetAt(t.range.start);let o=e.offsetAt(t.range.end);if(o<=s){n=n.substring(0,a)+t.newText+n.substring(o,n.length)}else{throw new Error("Overlapping edit")}s=a}return n}e.applyEdits=r;function i(e,t){if(e.length<=1){return e}const n=e.length/2|0;const r=e.slice(0,n);const s=e.slice(n);i(r,t);i(s,t);let a=0;let o=0;let c=0;while(a<r.length&&o<s.length){let n=t(r[a],s[o]);if(n<=0){e[c++]=r[a++]}else{e[c++]=s[o++]}}while(a<r.length){e[c++]=r[a++]}while(o<s.length){e[c++]=s[o++]}return e}})(be||(be={}));class De{constructor(e,t,n,r){this._uri=e;this._languageId=t;this._version=n;this._content=r;this._lineOffsets=undefined}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start);let n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text;this._version=t;this._lineOffsets=undefined}getLineOffsets(){if(this._lineOffsets===undefined){let e=[];let t=this._content;let n=true;for(let r=0;r<t.length;r++){if(n){e.push(r);n=false}let i=t.charAt(r);n=i==="\r"||i==="\n";if(i==="\r"&&r+1<t.length&&t.charAt(r+1)==="\n"){r++}}if(n&&t.length>0){e.push(t.length)}this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets();let n=0,r=t.length;if(r===0){return o.create(0,e)}while(n<r){let i=Math.floor((n+r)/2);if(t[i]>e){r=i}else{n=i+1}}let i=n-1;return o.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length){return this._content.length}else if(e.line<0){return 0}let n=t[e.line];let r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}}var Le;(function(e){const t=Object.prototype.toString;function n(e){return typeof e!=="undefined"}e.defined=n;function r(e){return typeof e==="undefined"}e.undefined=r;function i(e){return e===true||e===false}e.boolean=i;function s(e){return t.call(e)==="[object String]"}e.string=s;function a(e){return t.call(e)==="[object Number]"}e.number=a;function o(e,n,r){return t.call(e)==="[object Number]"&&n<=e&&e<=r}e.numberRange=o;function c(e){return t.call(e)==="[object Number]"&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)==="[object Number]"&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)==="[object Function]"}e.func=u;function f(e){return e!==null&&typeof e==="object"}e.objectLiteral=f;function d(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=d})(Le||(Le={}))},14247:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,r:()=>s});var r=n(65606);var i;(()=>{"use strict";var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o<e.length)n=e.charCodeAt(o);else{if(47===n)break;n=47}if(47===n){if(s===o-1||1===a);else if(s!==o-1&&2===a){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var i={resolve:function(){for(var e,i="",s=!1,a=arguments.length-1;a>=-1&&!s;a--){var o;a>=0?o=arguments[a]:(void 0===e&&(e=r.cwd()),o=e),t(o),0!==o.length&&(i=o+"/"+i,s=47===o.charCodeAt(0))}return i=n(i,!s),s?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var r=arguments[n];t(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":i.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=i.resolve(e))===(n=i.resolve(n)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var s=e.length,a=s-r,o=1;o<n.length&&47===n.charCodeAt(o);++o);for(var c=n.length-o,l=a<c?a:c,u=-1,f=0;f<=l;++f){if(f===l){if(c>l){if(47===n.charCodeAt(o+f))return n.slice(o+f+1);if(0===f)return n.slice(o+f)}else a>l&&(47===e.charCodeAt(r+f)?u=f:0===f&&(u=0));break}var d=e.charCodeAt(r+f);if(d!==n.charCodeAt(o+f))break;47===d&&(u=f)}var p="";for(f=r+u+1;f<=s;++f)f!==s&&47!==e.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+n.slice(o+u):(o+=u,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!a){i=r+1;break}}else-1===c&&(a=!1,c=r+1),o>=0&&(l===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===i&&(s=!1,i=o+1),46===c?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,c=-1,l=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===a?a=u:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){o=u+1;break}return-1===a||-1===c||0===f||1===f&&a===c-1&&a===o+1?-1!==c&&(n.base=n.name=0===o&&s?e.slice(1,c):e.slice(o,c)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(o,a),n.base=e.slice(o,c)),n.ext=e.slice(a,c)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};let a;if(n.r(s),n.d(s,{URI:()=>h,Utils:()=>w}),"object"==typeof r)a="win32"===r.platform;else if("object"==typeof navigator){let e=navigator.userAgent;a=e.indexOf("Windows")>=0}const o=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;function u(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.test(e.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(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const f="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static isUri(e){return e instanceof h||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||f,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||f),this.query=r||f,this.fragment=i||f,u(this,s))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),void 0===i?i=this.query:null===i&&(i=f),void 0===s?s=this.fragment:null===s&&(s=f),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new g(t,n,r,i,s)}static parse(e,t=!1){const n=p.exec(e);return n?new g(n[2]||f,k(n[4]||f),k(n[5]||f),k(n[7]||f),k(n[9]||f),t):new g(f,f,f,f,f)}static file(e){let t=f;if(a&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new g("file",t,e,f,f)}static from(e){const t=new g(e.scheme,e.authority,e.path,e.query,e.fragment);return u(t,!0),t}toString(e=!1){return A(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof h)return e;{const t=new g(e);return t._formatted=e.external,t._fsPath=e._sep===m?e.fsPath:null,t}}return e}}const m=a?1:void 0;class g extends h{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const y={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 T(e,t,n){let r,i=-1;for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=y[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function R(e){let t;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=y[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function v(e,t){let n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,a&&(n=n.replace(/\//g,"\\")),n}function A(e,t){const n=t?R:T;let r="",{scheme:i,authority:s,path:a,query:o,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=d,r+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),c&&(r+="#",r+=t?c:T(c,!1,!1)),r}function $(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+$(e.substr(3)):e}}const E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(E)?e.replace(E,(e=>$(e))):e}var C=n(975);const S=C.posix||C,x="/";var w;!function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==x&&(n=x+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===x&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===x)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}}(w||(w={})),i=s})();const{URI:s,Utils:a}=i}}]);