@freik/pedroviz 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js DELETED
@@ -1,156 +0,0 @@
1
- #!/usr/bin/env bun
2
- // @bun
3
- var pS=Object.create;var{getPrototypeOf:mS,defineProperty:as,getOwnPropertyNames:dS}=Object;var hS=Object.prototype.hasOwnProperty;function gS(e){return this[e]}var ES,SS,TS=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var i=t?ES??=new WeakMap:SS??=new WeakMap,o=i.get(e);if(o)return o}r=e!=null?pS(mS(e)):{};let a=t||!e||!e.__esModule?as(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let s of dS(e))if(!hS.call(a,s))as(a,s,{get:gS.bind(e,s),enumerable:!0})}if(n)i.set(e,a);return a};var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yS=(e)=>e;function xS(e,t){this[e]=yS.bind(null,t)}var ai=(e,t)=>{for(var r in t)as(e,r,{get:t[r],enumerable:!0,configurable:!0,set:xS.bind(t,r)})};var d6=(e,t)=>()=>(e&&(t=e(e=0)),t);var au=(e)=>JSON.parse(e);var Od=w(function(pie,Ld){var HN=typeof global=="object"&&global&&global.Object===Object&&global;Ld.exports=HN});var Ud=w(function(mie,Ad){var WN=Od(),VN=typeof self=="object"&&self&&self.Object===Object&&self,qN=WN||VN||Function("return this")();Ad.exports=qN});var Ea=w(function(die,Nd){var YN=Ud(),zN=YN.Symbol;Nd.exports=zN});var Id=w(function(hie,Cd){function XN(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r<n)i[r]=t(e[r],r,e);return i}Cd.exports=XN});var Pd=w(function(gie,bd){var JN=Array.isArray;bd.exports=JN});var _d=w(function(Eie,kd){var Md=Ea(),vd=Object.prototype,QN=vd.hasOwnProperty,ZN=vd.toString,Mi=Md?Md.toStringTag:void 0;function $N(e){var t=QN.call(e,Mi),r=e[Mi];try{e[Mi]=void 0;var n=!0}catch(o){}var i=ZN.call(e);if(n)if(t)e[Mi]=r;else delete e[Mi];return i}kd.exports=$N});var Bd=w(function(Sie,wd){var eC=Object.prototype,tC=eC.toString;function rC(e){return tC.call(e)}wd.exports=rC});var Gd=w(function(Tie,jd){var Fd=Ea(),nC=_d(),iC=Bd(),oC="[object Null]",aC="[object Undefined]",Dd=Fd?Fd.toStringTag:void 0;function sC(e){if(e==null)return e===void 0?aC:oC;return Dd&&Dd in Object(e)?nC(e):iC(e)}jd.exports=sC});var Hd=w(function(yie,Kd){function fC(e){return e!=null&&typeof e=="object"}Kd.exports=fC});var Vd=w(function(xie,Wd){var uC=Gd(),cC=Hd(),lC="[object Symbol]";function pC(e){return typeof e=="symbol"||cC(e)&&uC(e)==lC}Wd.exports=pC});var Qd=w(function(Rie,Jd){var qd=Ea(),mC=Id(),dC=Pd(),hC=Vd(),gC=1/0,Yd=qd?qd.prototype:void 0,zd=Yd?Yd.toString:void 0;function Xd(e){if(typeof e=="string")return e;if(dC(e))return mC(e,Xd)+"";if(hC(e))return zd?zd.call(e):"";var t=e+"";return t=="0"&&1/e==-gC?"-0":t}Jd.exports=Xd});var vi=w(function(Lie,Zd){var EC=Qd();function SC(e){return e==null?"":EC(e)}Zd.exports=SC});var eh=w(function(Oie,$d){function TC(e,t,r){var n=-1,i=e.length;if(t<0)t=-t>i?0:i+t;if(r=r>i?i:r,r<0)r+=i;i=t>r?0:r-t>>>0,t>>>=0;var o=Array(i);while(++n<i)o[n]=e[n+t];return o}$d.exports=TC});var rh=w(function(Aie,th){var yC=eh();function xC(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:yC(e,t,r)}th.exports=xC});var If=w(function(Uie,nh){var RC="\\ud800-\\udfff",LC="\\u0300-\\u036f",OC="\\ufe20-\\ufe2f",AC="\\u20d0-\\u20ff",UC=LC+OC+AC,NC="\\ufe0e\\ufe0f",CC="\\u200d",IC=RegExp("["+CC+RC+UC+NC+"]");function bC(e){return IC.test(e)}nh.exports=bC});var oh=w(function(Nie,ih){function PC(e){return e.split("")}ih.exports=PC});var mh=w(function(Cie,ph){var ah="\\ud800-\\udfff",MC="\\u0300-\\u036f",vC="\\ufe20-\\ufe2f",kC="\\u20d0-\\u20ff",_C=MC+vC+kC,wC="\\ufe0e\\ufe0f",BC="["+ah+"]",bf="["+_C+"]",Pf="\\ud83c[\\udffb-\\udfff]",FC="(?:"+bf+"|"+Pf+")",sh="[^"+ah+"]",fh="(?:\\ud83c[\\udde6-\\uddff]){2}",uh="[\\ud800-\\udbff][\\udc00-\\udfff]",DC="\\u200d",ch=FC+"?",lh="["+wC+"]?",jC="(?:"+DC+"(?:"+[sh,fh,uh].join("|")+")"+lh+ch+")*",GC=lh+ch+jC,KC="(?:"+[sh+bf+"?",bf,fh,uh,BC].join("|")+")",HC=RegExp(Pf+"(?="+Pf+")|"+KC+GC,"g");function WC(e){return e.match(HC)||[]}ph.exports=WC});var hh=w(function(Iie,dh){var VC=oh(),qC=If(),YC=mh();function zC(e){return qC(e)?YC(e):VC(e)}dh.exports=zC});var Eh=w(function(bie,gh){var XC=rh(),JC=If(),QC=hh(),ZC=vi();function $C(e){return function(t){t=ZC(t);var r=JC(t)?QC(t):void 0,n=r?r[0]:t.charAt(0),i=r?XC(r,1).join(""):t.slice(1);return n[e]()+i}}gh.exports=$C});var Th=w(function(Pie,Sh){var eI=Eh(),tI=eI("toUpperCase");Sh.exports=tI});var xh=w(function(Mie,yh){var rI=vi(),nI=Th();function iI(e){return nI(rI(e).toLowerCase())}yh.exports=iI});var Lh=w(function(vie,Rh){function oI(e,t,r,n){var i=-1,o=e==null?0:e.length;if(n&&o)r=e[++i];while(++i<o)r=t(r,e[i],i,e);return r}Rh.exports=oI});var Ah=w(function(kie,Oh){function aI(e){return function(t){return e==null?void 0:e[t]}}Oh.exports=aI});var Nh=w(function(_ie,Uh){var sI=Ah(),fI={"\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xC7":"C","\xE7":"c","\xD0":"D","\xF0":"d","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xD1":"N","\xF1":"n","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xDD":"Y","\xFD":"y","\xFF":"y","\xC6":"Ae","\xE6":"ae","\xDE":"Th","\xFE":"th","\xDF":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u010E":"D","\u0110":"D","\u010F":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011A":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011B":"e","\u011C":"G","\u011E":"G","\u0120":"G","\u0122":"G","\u011D":"g","\u011F":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012A":"I","\u012C":"I","\u012E":"I","\u0130":"I","\u0129":"i","\u012B":"i","\u012D":"i","\u012F":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013B":"L","\u013D":"L","\u013F":"L","\u0141":"L","\u013A":"l","\u013C":"l","\u013E":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014A":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014B":"n","\u014C":"O","\u014E":"O","\u0150":"O","\u014D":"o","\u014F":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015A":"S","\u015C":"S","\u015E":"S","\u0160":"S","\u015B":"s","\u015D":"s","\u015F":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016A":"U","\u016C":"U","\u016E":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016B":"u","\u016D":"u","\u016F":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017B":"Z","\u017D":"Z","\u017A":"z","\u017C":"z","\u017E":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017F":"s"},uI=sI(fI);Uh.exports=uI});var Ih=w(function(wie,Ch){var cI=Nh(),lI=vi(),pI=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mI="\\u0300-\\u036f",dI="\\ufe20-\\ufe2f",hI="\\u20d0-\\u20ff",gI=mI+dI+hI,EI="["+gI+"]",SI=RegExp(EI,"g");function TI(e){return e=lI(e),e&&e.replace(pI,cI).replace(SI,"")}Ch.exports=TI});var Ph=w(function(Bie,bh){var yI=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function xI(e){return e.match(yI)||[]}bh.exports=xI});var vh=w(function(Fie,Mh){var RI=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function LI(e){return RI.test(e)}Mh.exports=LI});var Zh=w(function(Die,Qh){var Fh="\\ud800-\\udfff",OI="\\u0300-\\u036f",AI="\\ufe20-\\ufe2f",UI="\\u20d0-\\u20ff",NI=OI+AI+UI,Dh="\\u2700-\\u27bf",jh="a-z\\xdf-\\xf6\\xf8-\\xff",CI="\\xac\\xb1\\xd7\\xf7",II="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bI="\\u2000-\\u206f",PI=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gh="A-Z\\xc0-\\xd6\\xd8-\\xde",MI="\\ufe0e\\ufe0f",Kh=CI+II+bI+PI,Hh="['\u2019]",kh="["+Kh+"]",vI="["+NI+"]",Wh="\\d+",kI="["+Dh+"]",Vh="["+jh+"]",qh="[^"+Fh+Kh+Wh+Dh+jh+Gh+"]",_I="\\ud83c[\\udffb-\\udfff]",wI="(?:"+vI+"|"+_I+")",BI="[^"+Fh+"]",Yh="(?:\\ud83c[\\udde6-\\uddff]){2}",zh="[\\ud800-\\udbff][\\udc00-\\udfff]",Dn="["+Gh+"]",FI="\\u200d",_h="(?:"+Vh+"|"+qh+")",DI="(?:"+Dn+"|"+qh+")",wh="(?:"+Hh+"(?:d|ll|m|re|s|t|ve))?",Bh="(?:"+Hh+"(?:D|LL|M|RE|S|T|VE))?",Xh=wI+"?",Jh="["+MI+"]?",jI="(?:"+FI+"(?:"+[BI,Yh,zh].join("|")+")"+Jh+Xh+")*",GI="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KI="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",HI=Jh+Xh+jI,WI="(?:"+[kI,Yh,zh].join("|")+")"+HI,VI=RegExp([Dn+"?"+Vh+"+"+wh+"(?="+[kh,Dn,"$"].join("|")+")",DI+"+"+Bh+"(?="+[kh,Dn+_h,"$"].join("|")+")",Dn+"?"+_h+"+"+wh,Dn+"+"+Bh,KI,GI,Wh,WI].join("|"),"g");function qI(e){return e.match(VI)||[]}Qh.exports=qI});var eg=w(function(jie,$h){var YI=Ph(),zI=vh(),XI=vi(),JI=Zh();function QI(e,t,r){if(e=XI(e),t=r?void 0:t,t===void 0)return zI(e)?JI(e):YI(e);return e.match(t)||[]}$h.exports=QI});var rg=w(function(Gie,tg){var ZI=Lh(),$I=Ih(),eb=eg(),tb="['\u2019]",rb=RegExp(tb,"g");function nb(e){return function(t){return ZI(eb($I(t).replace(rb,"")),e,"")}}tg.exports=nb});var ig=w(function(Kie,ng){var ib=xh(),ob=rg(),ab=ob(function(e,t,r){return t=t.toLowerCase(),e+(r?ib(t):t)});ng.exports=ab});var{serve:c6}=globalThis.Bun;import l6 from"path";import{chdir as p6}from"process";var su=au("{\"index\":\"./index.html\",\"files\":[{\"input\":\"index.html\",\"path\":\"./index-fh6bm18e.js\",\"loader\":\"js\",\"isEntry\":true,\"headers\":{\"etag\":\"L7HmC_QByI4\",\"content-type\":\"text/javascript;charset=utf-8\"}},{\"input\":\"index.html\",\"path\":\"./index.html\",\"loader\":\"html\",\"isEntry\":true,\"headers\":{\"etag\":\"wPIIwrzPPOs\",\"content-type\":\"text/html;charset=utf-8\"}},{\"input\":\"index.html\",\"path\":\"./index-1wdsy1g5.css\",\"loader\":\"css\",\"isEntry\":true,\"headers\":{\"etag\":\"IVzNmf6BEGU\",\"content-type\":\"text/css;charset=utf-8\"}},{\"input\":\"client/logo.png\",\"path\":\"./logo-nspswy0y.png\",\"loader\":\"file\",\"isEntry\":false,\"headers\":{\"etag\":\"dTk22RyeYF4\",\"content-type\":\"image/png\"}}]}");import oc,{promises as _r}from"fs";import Fe from"path";var si=Symbol.for("freik.typetag");function pu(e){return e===void 0}function fu(e){return!pu(e)}function Yi(e){return e===void 0||e===null}function zi(e){return!Yi(e)}function LS(e,...t){return t.some((r)=>r(e))}function fs(...e){return(t)=>LS(t,...e)}function OS(e,...t){return t.every((r)=>r(e))}function Yt(e){return OS(e,AS,zi)}function AS(e){return typeof e==="object"}function us(e){return Array.isArray(e)}function zt(e){return typeof e==="string"}function US(e){return typeof e==="number"&&!isNaN(e-0)}var E6=fs(zt,US);function fi(e){return typeof e==="function"}function NS(e){return e instanceof Map}function Xi(e,t){if(!us(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function mu(e){return(t)=>Xi(t,e)}function CS(e,...t){return us(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function cs(...e){return(t)=>CS(t,...e)}function IS(e,t,r){if(!NS(e))return!1;for(let[n,i]of e){if(!t(n))return!1;if(!r(i))return!1}return!0}function uu(e,t){return(r)=>IS(r,e,t)}function cu(e){return typeof e==="symbol"}function Te(e,t){return Yt(e)&&t in e}function bS(e,t,r){return Te(e,t)&&r(e[t])}var qi=bS;function lu(e,t){return qi(e,t,zt)}function du(e,t){return Te(e,si)&&e[si]===t}function PS(e,t,r,n){if(!Yt(t))return!1;let i=Object.keys(r).length,o=Object.keys(t),a=o.length;for(let s of o){if(!Te(t,s))continue;let f=t[s];if(pu(f)||t[s]===null){delete t[s],a--;continue}if(qi(n,s,fi)){let u=n[s];if(!u(f))return!1;a--}else if(qi(r,s,fi)){let u=r[s];if(!u(f))return!1;i--,a--}}return i===0&&(a===0||!e)}function MS(e,t={}){return(r)=>PS(!1,r,e,t)}var hu=Function("try {return this===global;}catch(e){ return false;}"),gu=Function("try {return this===window;}catch(e){ return false;}");function ls(){return typeof globalThis<"u"}var Eu=Symbol.for("freik.Set"),Su=Symbol.for("freik.Map"),Tu=Symbol.for("freik.Symbol"),yu=Symbol.for("freik.RegExp"),xu=Symbol.for("freik.Date"),Ru=Symbol.for("freik.BigInt");function vS(e){return[...e.entries()]}function kS(e){return Xi(e,cs(fu,fu))?new Map(e):void 0}function _S(e){return[...e]}function wS(e){return us(e)?new Set(e):void 0}function BS(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function FS(e){return zt(e)?Symbol.for(e):void 0}function DS(e){return{source:e.source,flags:e.flags}}function jS(e){if(lu(e,"source")&&lu(e,"flags"))return new RegExp(e.source,e.flags)}function GS(e){return e.toJSON()}function KS(e){try{return zt(e)?new Date(e):void 0}catch{return}}function HS(e){return e.toString()}function WS(e){try{return zt(e)?BigInt(e):void 0}catch{return}}var VS=new Map([[Su,vS],[Eu,_S],[Tu,BS],[yu,DS],[xu,GS],[Ru,HS]]),qS=new Map([[Su,kS],[Eu,wS],[Tu,FS],[yu,jS],[xu,KS],[Ru,WS]]),YS;((e)=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(YS||={});var ie=si;function ss(e){if(!Te(e,ie))return e[ie]={to:VS,from:qS},0;if(!qi(e,ie,MS({to:uu(fs(cu,zt),fi),from:uu(fs(cu,zt),fi)})))return 2;return 1}function zS(){if(ls())return ss(globalThis);if(gu())return ss(window);if(hu())return ss(global);return 3}switch(zS()){case 2:throw Error(`Invalid <global>[${String(ie)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function XS(){if(ls()&&Yt(globalThis)&&Te(globalThis,ie)&&Te(globalThis[ie],"to"))return globalThis[ie].to;else if(hu()&&Yt(global)&&Te(global,ie)&&Te(global[ie],"to"))return global[ie].to;else if(gu()&&Yt(window)&&Te(window,ie)&&Te(window[ie],"to"))return window[ie].to;throw Error("Pickling not registered!")}function JS(e,t){XS().set(e,t)}function QS(){if(ls()&&Yt(globalThis)&&Te(globalThis,ie)&&Te(globalThis[ie],"from"))return globalThis[ie].from;else if(Yt(process)&&!Te(process,"browser")&&Te(global,ie)&&Te(global[ie],"from"))return global[ie].from;else if(!Yt(process)&&!Te(process,"browser")&&Te(window,ie)&&Te(window[ie],"from"))return window[ie].from;throw Error("Unpickling not registered!")}function ZS(e,t){QS().set(e,t)}function Lu(e,t,r){if(r)JS(e,r);ZS(e,t)}var $S=Symbol.for("freik.typetag");function Cu(e){return e===void 0}function Ou(e){return!Cu(e)}function eT(e){return e===void 0||e===null}function tT(e){return!eT(e)}function rT(e,...t){return t.some((r)=>r(e))}function ms(...e){return(t)=>rT(t,...e)}function nT(e,...t){return t.every((r)=>r(e))}function ds(e){return nT(e,iT,tT)}function iT(e){return typeof e==="object"}function $i(e){return Array.isArray(e)}function Xt(e){return typeof e==="string"}function Iu(e){return typeof e==="number"&&!isNaN(e-0)}var T6=ms(Xt,Iu);function Qi(e){return typeof e==="function"}function bu(e){return e instanceof Map}function oT(e,t){if(!$i(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function aT(e,...t){return $i(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function sT(...e){return(t)=>aT(t,...e)}function fT(e,t,r){if(!bu(e))return!1;for(let[n,i]of e){if(!t(n))return!1;if(!r(i))return!1}return!0}function Au(e,t){return(r)=>fT(r,e,t)}function Uu(e){return typeof e==="symbol"}function hs(e,t){return ds(e)&&t in e}function uT(e,t,r){return hs(e,t)&&r(e[t])}var Zi=uT;function Nu(e,t){return Zi(e,t,Xt)}function cT(e,t,r,n){if(!ds(t))return!1;let i=Object.keys(r).length,o=Object.keys(t),a=o.length;for(let s of o){if(!hs(t,s))continue;let f=t[s];if(Cu(f)||t[s]===null){delete t[s],a--;continue}if(Zi(n,s,Qi)){let u=n[s];if(!u(f))return!1;a--}else if(Zi(r,s,Qi)){let u=r[s];if(!u(f))return!1;i--,a--}}return i===0&&(a===0||!e)}function lT(e,t={}){return(r)=>cT(!1,r,e,t)}var pT=Function("try {return this===global;}catch(e){ return false;}"),mT=Function("try {return this===window;}catch(e){ return false;}");function dT(){return typeof globalThis<"u"}var Pu=Symbol.for("freik.Set"),Mu=Symbol.for("freik.Map"),vu=Symbol.for("freik.Symbol"),ku=Symbol.for("freik.RegExp"),_u=Symbol.for("freik.Date"),wu=Symbol.for("freik.BigInt");function hT(e){return[...e.entries()]}function gT(e){return oT(e,sT(Ou,Ou))?new Map(e):void 0}function ET(e){return[...e]}function ST(e){return $i(e)?new Set(e):void 0}function TT(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function yT(e){return Xt(e)?Symbol.for(e):void 0}function xT(e){return{source:e.source,flags:e.flags}}function RT(e){if(Nu(e,"source")&&Nu(e,"flags"))return new RegExp(e.source,e.flags)}function LT(e){return e.toJSON()}function OT(e){try{return Xt(e)?new Date(e):void 0}catch{return}}function AT(e){return e.toString()}function UT(e){try{return Xt(e)?BigInt(e):void 0}catch{return}}var NT=new Map([[Mu,hT],[Pu,ET],[vu,TT],[ku,xT],[_u,LT],[wu,AT]]),CT=new Map([[Mu,gT],[Pu,ST],[vu,yT],[ku,RT],[_u,OT],[wu,UT]]),IT;((e)=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(IT||={});var Ji=$S;function ps(e){if(!hs(e,Ji))return e[Ji]={to:NT,from:CT},0;if(!Zi(e,Ji,lT({to:Au(ms(Uu,Xt),Qi),from:Au(ms(Uu,Xt),Qi)})))return 2;return 1}function bT(){if(dT())return ps(globalThis);if(mT())return ps(window);if(pT())return ps(global);return 3}switch(bT()){case 2:throw Error(`Invalid <global>[${String(Ji)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function Bu(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}var gs=Symbol.for("freik.MultiMapTypeTag");function It(e){let t=e?new Map([...e].map(([m,g])=>[m,new Set(g)])):new Map,r=()=>t.clear(),n=(m)=>t.delete(m),i=(m,g)=>{let d=f(m);if(d!==void 0){let x=d.delete(g);if(d.size===0)t.delete(m);return x}return!1},o=()=>t.keys(),a=(m,g)=>t.forEach((d,x)=>m(d,x,y),g),s=async(m,g)=>{for(let[d,x]of t)if(!g)await m(x,d,y);else await m.apply(g,[x,d,y])},f=(m)=>t.get(m),u=(m)=>t.has(m);function c(m,g){let d=t.get(m);if(d===void 0)t.set(m,new Set([g]));else d.add(g);return y}function l(m,g){let d=t.get(m);if(d===void 0)t.set(m,new Set(g));else for(let x of g)d.add(x);return y}function*p(){for(let[m,g]of t)yield[m,g.values()]}let h=()=>t.size;function S(m){if(h()!==m.size())return!1;for(let[g,d]of t){let x=m.get(g);if(!x)return!1;if(!Bu(new Set(d),new Set(x)))return!1}return!0}function T(){return[...y]}let y={clear:r,delete:n,remove:i,keys:o,forEach:a,forEachAwaitable:s,get:f,has:u,set:c,add:l,size:h,[Symbol.iterator]:p,[si]:gs,toJSON:T,valueEqual:S};return y}function PT(e){if(Xi(e,cs(zi,mu(zi))))return It(e)}Lu(gs,PT);function MT(e){return du(e,gs)}function vT(e,t,r){if(!MT(e))return!1;for(let[n,i]of e){if(!t(n))return!1;for(let o of i)if(!r(o))return!1}return!0}function Es(e,t){return(r)=>vT(r,e,t)}var Ts=Symbol.for("freik.typetag");function A(e){return e===void 0}function b(e){return!A(e)}function ci(e){return e===null}function kT(e){return e===void 0||e===null}function _T(e){return!kT(e)}function wT(e,...t){return t.some((r)=>r(e))}function Pe(...e){return(t)=>wT(t,...e)}function BT(e,...t){return t.every((r)=>r(e))}function ft(e){return BT(e,FT,_T)}function FT(e){return typeof e==="object"}function Zt(e){return Array.isArray(e)}function v(e){return typeof e==="string"}function Qr(e){return typeof e==="number"&&!isNaN(e-0)}var _6=Pe(v,Qr);function xs(e){return typeof e==="boolean"}function DT(e){return e instanceof Date}function jT(e){return typeof e==="bigint"}function Jt(e){return typeof e==="function"}function GT(e){return e instanceof RegExp}function Du(e){return e instanceof Map}function KT(e){return e instanceof Set}function eo(e,t){if(!Zt(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function bt(e){return(t)=>eo(t,e)}function HT(e,...t){return Zt(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function WT(...e){return(t)=>HT(t,...e)}function VT(e,t,r){if(!Du(e))return!1;for(let[n,i]of e){if(!t(n))return!1;if(!r(i))return!1}return!0}function to(e,t){return(r)=>VT(r,e,t)}function qT(e,t){if(!ft(e))return!1;for(let r of[...Object.keys(e),...Object.getOwnPropertySymbols(e)])if(!$e(e,r,t))return!1;return!0}function ro(e){return typeof e==="symbol"}function ae(e,t){return ft(e)&&t in e}function $t(e,t,r){return ae(e,t)&&r(e[t])}function Rs(e,t){return(r)=>$e(r,e,t)}var $e=$t;function ui(e,t){return $e(e,t,v)}function YT(e){return ae(e,Symbol.iterator)}function ys(e){return e===null||v(e)||Qr(e)||xs(e)||eo(e,ys)||ft(e)&&eo(Object.keys(e),Pe(v,Qr))&&qT(e,ys)}function ju(e,t,r,n){if(!ft(t))return!1;let i=Object.keys(r).length,o=Object.keys(t),a=o.length;for(let s of o){if(!ae(t,s))continue;let f=t[s];if(A(f)||t[s]===null){delete t[s],a--;continue}if($e(n,s,Jt)){let u=n[s];if(!u(f))return!1;a--}else if($e(r,s,Jt)){let u=r[s];if(!u(f))return!1;i--,a--}}return i===0&&(a===0||!e)}function zT(e,t={}){return(r)=>ju(!1,r,e,t)}function se(e,t={}){return(r)=>ju(!0,r,e,t)}function XT(e,t,r){if(!ft(e))return!1;let n=Object.keys(e),i=n.length;for(let o of n){if(!ae(e,o))continue;let a=e[o];if(!t(o)||!r(a))return!1;i--}return i===0}function Gu(e,t){return(r)=>XT(r,e,t)}var Ku=Function("try {return this===global;}catch(e){ return false;}"),Hu=Function("try {return this===window;}catch(e){ return false;}");function Ls(){return typeof globalThis<"u"}function JT(e){return ui(e,"@dataType")&&$e(e,"@dataValue",ys)}function QT(e,t){return{"@dataType":e,"@dataValue":t}}function ZT(e){return[e["@dataType"],e["@dataValue"]]}var Os=Symbol.for("freik.Set"),As=Symbol.for("freik.Map"),Us=Symbol.for("freik.Symbol"),Ns=Symbol.for("freik.RegExp"),Cs=Symbol.for("freik.Date"),Is=Symbol.for("freik.BigInt");function $T(e){return[...e.entries()]}function ey(e){return eo(e,WT(b,b))?new Map(e):void 0}function ty(e){return[...e]}function ry(e){return Zt(e)?new Set(e):void 0}function ny(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function iy(e){return v(e)?Symbol.for(e):void 0}function oy(e){return{source:e.source,flags:e.flags}}function ay(e){if(ui(e,"source")&&ui(e,"flags"))return new RegExp(e.source,e.flags)}function sy(e){return e.toJSON()}function fy(e){try{return v(e)?new Date(e):void 0}catch{return}}function uy(e){return e.toString()}function cy(e){try{return v(e)?BigInt(e):void 0}catch{return}}var ly=[[Du,As],[KT,Os],[ro,Us],[GT,Ns],[DT,Cs],[jT,Is]],py=new Map([[As,$T],[Os,ty],[Us,ny],[Ns,oy],[Cs,sy],[Is,uy]]),my=new Map([[As,ey],[Os,ry],[Us,iy],[Ns,ay],[Cs,fy],[Is,cy]]),dy;((e)=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(dy||={});var oe=Ts;function Ss(e){if(!ae(e,oe))return e[oe]={to:py,from:my},0;if(!$e(e,oe,zT({to:to(Pe(ro,v),Jt),from:to(Pe(ro,v),Jt)})))return 2;return 1}function hy(){if(Ls())return Ss(globalThis);if(Hu())return Ss(window);if(Ku())return Ss(global);return 3}switch(hy()){case 2:throw Error(`Invalid <global>[${String(oe)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function gy(){if(Ls()&&ft(globalThis)&&ae(globalThis,oe)&&ae(globalThis[oe],"to"))return globalThis[oe].to;else if(Ku()&&ft(global)&&ae(global,oe)&&ae(global[oe],"to"))return global[oe].to;else if(Hu()&&ft(window)&&ae(window,oe)&&ae(window[oe],"to"))return window[oe].to;throw Error("Pickling not registered!")}function Fu(e){return gy().get(e)}function Ey(){if(Ls()&&ft(globalThis)&&ae(globalThis,oe)&&ae(globalThis[oe],"from"))return globalThis[oe].from;else if(ft(process)&&!ae(process,"browser")&&ae(global,oe)&&ae(global[oe],"from"))return global[oe].from;else if(!ft(process)&&!ae(process,"browser")&&ae(window,oe)&&ae(window[oe],"from"))return window[oe].from;throw Error("Unpickling not registered!")}function Sy(e){return Ey().get(e)}function Ty(e){if($e(e,Ts,ro)){let t=e[Ts],r=Fu(t);if(r)return[t,r];else if($e(e,"toJSON",Jt))return[t,(n)=>$e(n,"toJSON",Jt)?n.toJSON():"ERROR"]}for(let[t,r]of ly)if(t(e)){let n=Fu(r);if(n)return[r,n]}}function yy(e){return Sy(Symbol.for(e))}function xy(e,t){let r=this[e],n=Ty(r);if(n){let[i,o]=n,a=Symbol.keyFor(i);if(!a)return t;return QT(a,o(r))}else if(YT(r))return[...r];return t}function Ry(e,t){if(JT(t)){let[r,n]=ZT(t),i=yy(r);if(i){let o=i(n);if(o!==void 0)return o}}return t}function bs(e){return JSON.stringify(e,xy)}function Ly(e){return JSON.parse(e,Ry)}function Oy(e){return Ly(e)}function Wu(e,t){let r=Oy(e);return t(r)?r:void 0}var Qt=se({errors:Jt,[Symbol.toPrimitive]:Jt});function li(e,t){let r=[];if(r.push(...v(e)?[e]:Qt(e)?e.errors():e),b(t))r.push(...v(t)?[t]:Qt(t)?t.errors():t);return{errors:()=>r,[Symbol.toPrimitive]:(n)=>n==="string"?r.join(`
4
- `):null}}var Zr=Object.freeze({Line:"line",Curve:"curve"}),he=Object.freeze({Reversed:"reversed",Tangent:"tangent",Constant:"constant",Linear:"linear",Point:"point",Piecewise:"piecewise"});var Ps={name:"",fullName:"",imports:[],container:{fileName:""},children:{},values:[],poses:[],beziers:[],pathChains:[],pathChainHelpers:[]},Vu=v,Ay=v,Uy=se({int:Qr}),Ny=se({double:Qr}),Ms=Pe(Uy,Ny),kr=Pe(Ay,Ms),io=se({radians:kr}),Cy=se({name:v,value:Pe(kr,io)}),no=Pe(kr,io),Iy=v,qu=se({x:kr,y:kr},{heading:no}),by=se({name:v,pose:qu}),Yu=Pe(Iy,qu);function Py(e){return e===Zr.Line||e===Zr.Curve}var My=v,zu=se({type:Py,points:bt(Yu)}),vy=se({name:v,points:zu}),ky=Pe(My,zu);function _y(e){return e===he.Tangent}function wy(e){return e===he.Constant}function By(e){return e===he.Linear}function Fy(e){return e===he.Point}function Dy(e){return e===he.Reversed}function jy(e){return e===he.Piecewise}var Xu=se({type:_y}),Ju=se({type:wy,heading:no}),Qu=se({type:By,start:no,end:no}),Zu=se({type:Fy,point:Yu}),$u=Pe(Xu,Ju,Qu,Zu),Gy=se({start:kr,end:kr}),ec=se({type:Dy,facing:$u}),Ky=Pe($u,ec),Hy=se({timing:Gy,heading:Ky}),Wy=se({type:jy,pieces:bt(Hy)}),Vy=(e)=>Pe(Xu,Ju,Qu,Zu,Wy,ec)(e),qy=se({name:v,paths:bt(ky),heading:Vy}),Yy=se({name:v,staticType:v}),zy=Pe(Rs("fileName",v),Rs("className",v));function vs(e){let t=ui(e,"name");return t=t&&$t(e,"container",zy),t=t&&$t(e,"values",bt(Cy)),t=t&&$t(e,"poses",bt(by)),t=t&&$t(e,"beziers",bt(vy)),t=t&&$t(e,"pathChains",bt(qy)),t=t&&$t(e,"pathChainHelpers",bt(Yy)),t=t&&$e(e,"children",Gu(v,vs)),t}function $r(e,t){return`${e}*${t}`}function rc(e){return e.split("*").pop()||""}function ks(e){if(!v(e))return!1;return e.split("*").length===2}function _s(e,t){return`${e};${t}`}function nc(e){return e.split(";").pop()||""}function tc(e){if(!v(e))return!1;let t=e.split(";");return t.length===2&&ks(t[0])}var ic=se({HasFieldImage:xs,TeamPaths:Es(v,ks),PathClasses:Es(ks,tc),ParsedClasses:to(tc,vs)}),Rv=Object.freeze({HasFieldImage:!1,TeamPaths:It(),PathClasses:It(),ParsedClasses:new Map});import{promises as Xy}from"fs";async function ws(e){try{return(await Xy.stat(e)).isDirectory()}catch{return!1}}var Pt=null,ac=[];function sc(e){ac=e}async function Jy(e){if(await Zy(e))return Pt=e,!0;return!1}function Bs(){if(ci(Pt))throw Error("Unable to find FtcRobotController/TeamCode home");return Pt}async function Qy(e,t=8){let r="",n=v(e)?[e]:e;for(let i of n){let o=t;while(i!=r&&o>0){if(await Jy(i))return console.log("Found directory",i),i;r=i,i=Fe.dirname(i),o--}}return console.error("Unable to find any potential repositories:",e),null}async function Zy(e){return await _r.exists(Fe.join(e,"settings.gradle"))&&await _r.exists(Fe.join(e,"build.gradle"))&&await _r.exists(Fe.join(e,"FtcRobotController"))&&await ws(Fe.join(e,"FtcRobotController"))}async function fc(){if(ci(Pt))await Qy([...ac,process.cwd(),import.meta.dirname]);if(ci(Pt))throw Error("Unable to find repository root");let e=await nx(),t=It();for(let r of e){let i=(await ex(Pt,r)).map((o)=>$r(r,o));t.add(r,i)}return t}var $y=/[^\/\\]*(Path|Pose)[^\/\\]*\.java$/;async function ex(e,t){let r=Fe.join(e,t,Fs,t.toLocaleLowerCase()),n=[],i=[r];while(i.length>0){let o=i.pop(),a=await _r.readdir(o,{withFileTypes:!0});for(let s of a){let f=Fe.join(o,s.name);if(s.isDirectory())i.push(f);else if(await rx(s))n.push(Fe.relative(r,f))}}return n}var tx=[/^\s*import\s+com\.pedropathing\.follower\.Follower\s*;/,/^\s*import\s+com\.pedropathing\.geometry\.(Bezier[A-Za-z]+|Pose)\s*;/,/^\s*import\s+com\.pedropathing\.paths\.(HeadingInterpolator|PathChain)\s*;/,/^\s*import\s+com\.bylazar\.configurables\.annotations\.Configurable\s*;/];async function rx(e){if(!e.isFile()||!$y.test(e.name))return!1;return(await _r.readFile(Fe.join(e.parentPath,e.name),"utf-8")).split(`
5
- `).filter((n)=>{for(let i of tx)if(i.test(n.trim()))return!0;return!1}).length!==0}async function nx(){if(ci(Pt))throw Error("Unknonw repository location");return(await _r.readdir(Pt,{withFileTypes:!0})).filter((r)=>ix(Pt,r)).map((r)=>r.name)}function ix(e,t){if(!t.isDirectory())return!1;let r=t.name;if(r[0]===".")return!1;if(r==="FtcRobotController")return!1;let n=Fe.join(e,t.name,"build.gradle");if(!oc.existsSync(n))return!1;let i=Fe.join(e,t.name,Fs,t.name.toLocaleLowerCase());if(!oc.existsSync(i)||!ws(i))return!1;return!0}function uc(e,t){return Fe.join(Bs(),e,Fs,e.toLocaleLowerCase(),t)}var Fs=Fe.join("src","main","java","org","firstinspires","ftc");var Ds=!1;function cc(){console.log("HMR State: ",Ds);let e=Ds;return Ds=!0,e}var{sleep:u6}=globalThis.Bun;import{promises as ox}from"fs";import*as en from"path";var mt=new Map;async function lc(){mt.clear();let e=Bs(),t=await ox.readdir(e,{withFileTypes:!0});for(let r of t){let n=en.extname(r.name).toLocaleLowerCase();if(n===".png"||n===".jpg"||n===".jpeg"){let i=en.basename(r.name.toLocaleLowerCase(),n);if(i==="field"||i==="field-light"||i==="field-dark")mt.set(i+n,en.join(e,r.name))}}return mt.size>0}function ax(){return mt.size!==0}function pc(e){if(!ax())return;return mt.get(`field-${e}.png`)||mt.get(`field-${e}.jpg`)||mt.get(`field-${e}.jpeg`)||mt.get("field.png")||mt.get("field.jpg")||mt.get("field.jpeg")}var sx="#ccc",fx="#333",ux=`<svg viewBox="5 5 1130 1130" version="1.1" xmlns="http://www.w3.org/2000/svg">
6
- <!--
7
- Copyright (C) 2026 Kevin Frei
8
- Licensed under the GNU Affero General Public License v3.0 or later.
9
- See https://www.gnu.org/licenses/agpl-3.0.html
10
- -->
11
- <defs>
12
- <clipPath id="bounds">
13
- <rect x="5" y="5" width="1130" height="1130"/>
14
- </clipPath>
15
- <path id="ln" fill="none" stroke="%%%FG%%%" stroke-width="0.8" stroke-linejoin="round" d="M0,4L5,8L7,8L5,0L17,0L15,8L27,8L25,0L37,0L35,8L47,8L45,0L57,0L55,8L67,8L65,0L77,0L75,8L87,8L85,0L93,0L94.25,4"/>
16
- <g id="corner">
17
- <use href="#ln" x="4" y="0"/>
18
- <use href="#ln" x="-192.5" y="-8" transform="rotate(180)"/>
19
- <use href="#ln" x="4" y="-8" transform="rotate(90)"/>
20
- <use href="#ln" x="-192.5" y="0" transform="rotate(-90)"/>
21
- </g>
22
- <g id="row">
23
- <use href="#corner" x="0"/>
24
- <use href="#corner" x="188.5"/>
25
- <use href="#corner" x="377"/>
26
- <use href="#corner" x="565.5"/>
27
- <use href="#corner" x="754"/>
28
- <use href="#corner" x="942.5"/>
29
- <use href="#corner" x="1131"/>
30
- </g>
31
- </defs>
32
- <g clipPath="url(#bounds)">
33
- <use href="#row"/>
34
- <use href="#row" y="188.5"/>
35
- <use href="#row" y="377"/>
36
- <use href="#row" y="565.5"/>
37
- <use href="#row" y="754"/>
38
- <use href="#row" y="942.5"/>
39
- <use href="#row" y="1131"/>
40
- </g>
41
- </svg>`;function js(e){return ux.replace("%%%FG%%%",e==="light"?fx:sx)}import{promises as V3}from"fs";var cx=typeof global=="object"&&global&&global.Object===Object&&global,oo=cx;var lx=typeof self=="object"&&self&&self.Object===Object&&self,px=oo||lx||Function("return this")(),ce=px;var mx=ce.Symbol,ye=mx;var mc=Object.prototype,dx=mc.hasOwnProperty,hx=mc.toString,pi=ye?ye.toStringTag:void 0;function gx(e){var t=dx.call(e,pi),r=e[pi];try{e[pi]=void 0;var n=!0}catch(o){}var i=hx.call(e);if(n)if(t)e[pi]=r;else delete e[pi];return i}var dc=gx;var Ex=Object.prototype,Sx=Ex.toString;function Tx(e){return Sx.call(e)}var hc=Tx;var yx="[object Null]",xx="[object Undefined]",gc=ye?ye.toStringTag:void 0;function Rx(e){if(e==null)return e===void 0?xx:yx;return gc&&gc in Object(e)?dc(e):hc(e)}var Me=Rx;function Lx(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var re=Lx;var Ox="[object AsyncFunction]",Ax="[object Function]",Ux="[object GeneratorFunction]",Nx="[object Proxy]";function Cx(e){if(!re(e))return!1;var t=Me(e);return t==Ax||t==Ux||t==Ox||t==Nx}var ve=Cx;var Ix=ce["__core-js_shared__"],ao=Ix;var Ec=function(){var e=/[^.]+$/.exec(ao&&ao.keys&&ao.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bx(e){return!!Ec&&Ec in e}var Sc=bx;var Px=Function.prototype,Mx=Px.toString;function vx(e){if(e!=null){try{return Mx.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Mt=vx;var kx=/[\\^$.*+?()[\]{}|]/g,_x=/^\[object .+?Constructor\]$/,wx=Function.prototype,Bx=Object.prototype,Fx=wx.toString,Dx=Bx.hasOwnProperty,jx=RegExp("^"+Fx.call(Dx).replace(kx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gx(e){if(!re(e)||Sc(e))return!1;var t=ve(e)?jx:_x;return t.test(Mt(e))}var Tc=Gx;function Kx(e,t){return e==null?void 0:e[t]}var yc=Kx;function Hx(e,t){var r=yc(e,t);return Tc(r)?r:void 0}var De=Hx;var Wx=function(){try{var e=De(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),tn=Wx;function Vx(e,t,r){if(t=="__proto__"&&tn)tn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0});else e[t]=r}var rn=Vx;function qx(e,t){return e===t||e!==e&&t!==t}var dt=qx;var Yx=Object.prototype,zx=Yx.hasOwnProperty;function Xx(e,t,r){var n=e[t];if(!(zx.call(e,t)&&dt(n,r))||r===void 0&&!(t in e))rn(e,t,r)}var er=Xx;function Jx(e,t,r,n){var i=!r;r||(r={});var o=-1,a=t.length;while(++o<a){var s=t[o],f=n?n(r[s],e[s],s,r,e):void 0;if(f===void 0)f=e[s];if(i)rn(r,s,f);else er(r,s,f)}return r}var ht=Jx;function Qx(e){return e}var et=Qx;function Zx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var xc=Zx;var Rc=Math.max;function $x(e,t,r){return t=Rc(t===void 0?e.length-1:t,0),function(){var n=arguments,i=-1,o=Rc(n.length-t,0),a=Array(o);while(++i<o)a[i]=n[t+i];i=-1;var s=Array(t+1);while(++i<t)s[i]=n[i];return s[t]=r(a),xc(e,this,s)}}var Lc=$x;function eR(e){return function(){return e}}var Oc=eR;var tR=!tn?et:function(e,t){return tn(e,"toString",{configurable:!0,enumerable:!1,value:Oc(t),writable:!0})},Ac=tR;var rR=800,nR=16,iR=Date.now;function oR(e){var t=0,r=0;return function(){var n=iR(),i=nR-(n-r);if(r=n,i>0){if(++t>=rR)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Uc=oR;var aR=Uc(Ac),Nc=aR;function sR(e,t){return Nc(Lc(e,t,et),e+"")}var nn=sR;var fR=9007199254740991;function uR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fR}var on=uR;function cR(e){return e!=null&&on(e.length)&&!ve(e)}var le=cR;var lR=9007199254740991,pR=/^(?:0|[1-9]\d*)$/;function mR(e,t){var r=typeof e;return t=t==null?lR:t,!!t&&(r=="number"||r!="symbol"&&pR.test(e))&&(e>-1&&e%1==0&&e<t)}var tr=mR;function dR(e,t,r){if(!re(r))return!1;var n=typeof t;if(n=="number"?le(r)&&tr(t,r.length):n=="string"&&(t in r))return dt(r[t],e);return!1}var rr=dR;function hR(e){return nn(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;if(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&rr(r[0],r[1],a))o=i<3?void 0:o,i=1;t=Object(t);while(++n<i){var s=r[n];if(s)e(t,s,n,o)}return t})}var Cc=hR;var gR=Object.prototype;function ER(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gR;return e===r}var gt=ER;function SR(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}var Ic=SR;function TR(e){return e!=null&&typeof e=="object"}var fe=TR;var yR="[object Arguments]";function xR(e){return fe(e)&&Me(e)==yR}var Gs=xR;var bc=Object.prototype,RR=bc.hasOwnProperty,LR=bc.propertyIsEnumerable,OR=Gs(function(){return arguments}())?Gs:function(e){return fe(e)&&RR.call(e,"callee")&&!LR.call(e,"callee")},nr=OR;var AR=Array.isArray,N=AR;var fo={};ai(fo,{default:()=>Et});function UR(){return!1}var Pc=UR;var kc=typeof fo=="object"&&fo&&!fo.nodeType&&fo,Mc=kc&&typeof so=="object"&&so&&!so.nodeType&&so,NR=Mc&&Mc.exports===kc,vc=NR?ce.Buffer:void 0,CR=vc?vc.isBuffer:void 0,IR=CR||Pc,Et=IR;var bR="[object Arguments]",PR="[object Array]",MR="[object Boolean]",vR="[object Date]",kR="[object Error]",_R="[object Function]",wR="[object Map]",BR="[object Number]",FR="[object Object]",DR="[object RegExp]",jR="[object Set]",GR="[object String]",KR="[object WeakMap]",HR="[object ArrayBuffer]",WR="[object DataView]",VR="[object Float32Array]",qR="[object Float64Array]",YR="[object Int8Array]",zR="[object Int16Array]",XR="[object Int32Array]",JR="[object Uint8Array]",QR="[object Uint8ClampedArray]",ZR="[object Uint16Array]",$R="[object Uint32Array]",Y={};Y[VR]=Y[qR]=Y[YR]=Y[zR]=Y[XR]=Y[JR]=Y[QR]=Y[ZR]=Y[$R]=!0;Y[bR]=Y[PR]=Y[HR]=Y[MR]=Y[WR]=Y[vR]=Y[kR]=Y[_R]=Y[wR]=Y[BR]=Y[FR]=Y[DR]=Y[jR]=Y[GR]=Y[KR]=!1;function eL(e){return fe(e)&&on(e.length)&&!!Y[Me(e)]}var _c=eL;function tL(e){return function(t){return e(t)}}var St=tL;var co={};ai(co,{default:()=>qe});var wc=typeof co=="object"&&co&&!co.nodeType&&co,mi=wc&&typeof uo=="object"&&uo&&!uo.nodeType&&uo,rL=mi&&mi.exports===wc,Ks=rL&&oo.process,nL=function(){try{var e=mi&&mi.require&&mi.require("util").types;if(e)return e;return Ks&&Ks.binding&&Ks.binding("util")}catch(t){}}(),qe=nL;var Bc=qe&&qe.isTypedArray,iL=Bc?St(Bc):_c,an=iL;var oL=Object.prototype,aL=oL.hasOwnProperty;function sL(e,t){var r=N(e),n=!r&&nr(e),i=!r&&!n&&Et(e),o=!r&&!n&&!i&&an(e),a=r||n||i||o,s=a?Ic(e.length,String):[],f=s.length;for(var u in e)if((t||aL.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||tr(u,f))))s.push(u);return s}var lo=sL;function fL(e,t){return function(r){return e(t(r))}}var po=fL;var uL=po(Object.keys,Object),Fc=uL;var cL=Object.prototype,lL=cL.hasOwnProperty;function pL(e){if(!gt(e))return Fc(e);var t=[];for(var r in Object(e))if(lL.call(e,r)&&r!="constructor")t.push(r);return t}var mo=pL;function mL(e){return le(e)?lo(e):mo(e)}var K=mL;var dL=Object.prototype,hL=dL.hasOwnProperty,gL=Cc(function(e,t){if(gt(t)||le(t)){ht(t,K(t),e);return}for(var r in t)if(hL.call(t,r))er(e,r,t[r])}),Ae=gL;function EL(){this.__data__=[],this.size=0}var Dc=EL;function SL(e,t){var r=e.length;while(r--)if(dt(e[r][0],t))return r;return-1}var ir=SL;var TL=Array.prototype,yL=TL.splice;function xL(e){var t=this.__data__,r=ir(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else yL.call(t,r,1);return--this.size,!0}var jc=xL;function RL(e){var t=this.__data__,r=ir(t,e);return r<0?void 0:t[r][1]}var Gc=RL;function LL(e){return ir(this.__data__,e)>-1}var Kc=LL;function OL(e,t){var r=this.__data__,n=ir(r,e);if(n<0)++this.size,r.push([e,t]);else r[n][1]=t;return this}var Hc=OL;function sn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}sn.prototype.clear=Dc;sn.prototype.delete=jc;sn.prototype.get=Gc;sn.prototype.has=Kc;sn.prototype.set=Hc;var or=sn;function AL(){this.__data__=new or,this.size=0}var Wc=AL;function UL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Vc=UL;function NL(e){return this.__data__.get(e)}var qc=NL;function CL(e){return this.__data__.has(e)}var Yc=CL;var IL=De(ce,"Map"),ar=IL;var bL=De(Object,"create"),vt=bL;function PL(){this.__data__=vt?vt(null):{},this.size=0}var zc=PL;function ML(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xc=ML;var vL="__lodash_hash_undefined__",kL=Object.prototype,_L=kL.hasOwnProperty;function wL(e){var t=this.__data__;if(vt){var r=t[e];return r===vL?void 0:r}return _L.call(t,e)?t[e]:void 0}var Jc=wL;var BL=Object.prototype,FL=BL.hasOwnProperty;function DL(e){var t=this.__data__;return vt?t[e]!==void 0:FL.call(t,e)}var Qc=DL;var jL="__lodash_hash_undefined__";function GL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vt&&t===void 0?jL:t,this}var Zc=GL;function fn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}fn.prototype.clear=zc;fn.prototype.delete=Xc;fn.prototype.get=Jc;fn.prototype.has=Qc;fn.prototype.set=Zc;var Hs=fn;function KL(){this.size=0,this.__data__={hash:new Hs,map:new(ar||or),string:new Hs}}var $c=KL;function HL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var el=HL;function WL(e,t){var r=e.__data__;return el(t)?r[typeof t=="string"?"string":"hash"]:r.map}var sr=WL;function VL(e){var t=sr(this,e).delete(e);return this.size-=t?1:0,t}var tl=VL;function qL(e){return sr(this,e).get(e)}var rl=qL;function YL(e){return sr(this,e).has(e)}var nl=YL;function zL(e,t){var r=sr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var il=zL;function un(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}un.prototype.clear=$c;un.prototype.delete=tl;un.prototype.get=rl;un.prototype.has=nl;un.prototype.set=il;var wr=un;var XL=200;function JL(e,t){var r=this.__data__;if(r instanceof or){var n=r.__data__;if(!ar||n.length<XL-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new wr(n)}return r.set(e,t),this.size=r.size,this}var ol=JL;function cn(e){var t=this.__data__=new or(e);this.size=t.size}cn.prototype.clear=Wc;cn.prototype.delete=Vc;cn.prototype.get=qc;cn.prototype.has=Yc;cn.prototype.set=ol;var fr=cn;function QL(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e)===!1)break;return e}var ho=QL;function ZL(e,t){return e&&ht(t,K(t),e)}var al=ZL;function $L(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var sl=$L;var eO=Object.prototype,tO=eO.hasOwnProperty;function rO(e){if(!re(e))return sl(e);var t=gt(e),r=[];for(var n in e)if(!(n=="constructor"&&(t||!tO.call(e,n))))r.push(n);return r}var fl=rO;function nO(e){return le(e)?lo(e,!0):fl(e)}var ur=nO;function iO(e,t){return e&&ht(t,ur(t),e)}var ul=iO;var Eo={};ai(Eo,{default:()=>Ws});var ml=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,cl=ml&&typeof go=="object"&&go&&!go.nodeType&&go,oO=cl&&cl.exports===ml,ll=oO?ce.Buffer:void 0,pl=ll?ll.allocUnsafe:void 0;function aO(e,t){if(t)return e.slice();var r=e.length,n=pl?pl(r):new e.constructor(r);return e.copy(n),n}var Ws=aO;function sO(e,t){var r=-1,n=e.length;t||(t=Array(n));while(++r<n)t[r]=e[r];return t}var dl=sO;function fO(e,t){var r=-1,n=e==null?0:e.length,i=0,o=[];while(++r<n){var a=e[r];if(t(a,r,e))o[i++]=a}return o}var ln=fO;function uO(){return[]}var So=uO;var cO=Object.prototype,lO=cO.propertyIsEnumerable,hl=Object.getOwnPropertySymbols,pO=!hl?So:function(e){if(e==null)return[];return e=Object(e),ln(hl(e),function(t){return lO.call(e,t)})},pn=pO;function mO(e,t){return ht(e,pn(e),t)}var gl=mO;function dO(e,t){var r=-1,n=t.length,i=e.length;while(++r<n)e[i+r]=t[r];return e}var mn=dO;var hO=po(Object.getPrototypeOf,Object),To=hO;var gO=Object.getOwnPropertySymbols,EO=!gO?So:function(e){var t=[];while(e)mn(t,pn(e)),e=To(e);return t},yo=EO;function SO(e,t){return ht(e,yo(e),t)}var El=SO;function TO(e,t,r){var n=t(e);return N(e)?n:mn(n,r(e))}var xo=TO;function yO(e){return xo(e,K,pn)}var di=yO;function xO(e){return xo(e,ur,yo)}var Ro=xO;var RO=De(ce,"DataView"),Lo=RO;var LO=De(ce,"Promise"),Oo=LO;var OO=De(ce,"Set"),cr=OO;var AO=De(ce,"WeakMap"),Ao=AO;var Sl="[object Map]",UO="[object Object]",Tl="[object Promise]",yl="[object Set]",xl="[object WeakMap]",Rl="[object DataView]",NO=Mt(Lo),CO=Mt(ar),IO=Mt(Oo),bO=Mt(cr),PO=Mt(Ao),Br=Me;if(Lo&&Br(new Lo(new ArrayBuffer(1)))!=Rl||ar&&Br(new ar)!=Sl||Oo&&Br(Oo.resolve())!=Tl||cr&&Br(new cr)!=yl||Ao&&Br(new Ao)!=xl)Br=function(e){var t=Me(e),r=t==UO?e.constructor:void 0,n=r?Mt(r):"";if(n)switch(n){case NO:return Rl;case CO:return Sl;case IO:return Tl;case bO:return yl;case PO:return xl}return t};var ut=Br;var MO=Object.prototype,vO=MO.hasOwnProperty;function kO(e){var t=e.length,r=new e.constructor(t);if(t&&typeof e[0]=="string"&&vO.call(e,"index"))r.index=e.index,r.input=e.input;return r}var Ll=kO;var _O=ce.Uint8Array,dn=_O;function wO(e){var t=new e.constructor(e.byteLength);return new dn(t).set(new dn(e)),t}var hn=wO;function BO(e,t){var r=t?hn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Ol=BO;var FO=/\w*$/;function DO(e){var t=new e.constructor(e.source,FO.exec(e));return t.lastIndex=e.lastIndex,t}var Al=DO;var Ul=ye?ye.prototype:void 0,Nl=Ul?Ul.valueOf:void 0;function jO(e){return Nl?Object(Nl.call(e)):{}}var Cl=jO;function GO(e,t){var r=t?hn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Il=GO;var KO="[object Boolean]",HO="[object Date]",WO="[object Map]",VO="[object Number]",qO="[object RegExp]",YO="[object Set]",zO="[object String]",XO="[object Symbol]",JO="[object ArrayBuffer]",QO="[object DataView]",ZO="[object Float32Array]",$O="[object Float64Array]",eA="[object Int8Array]",tA="[object Int16Array]",rA="[object Int32Array]",nA="[object Uint8Array]",iA="[object Uint8ClampedArray]",oA="[object Uint16Array]",aA="[object Uint32Array]";function sA(e,t,r){var n=e.constructor;switch(t){case JO:return hn(e);case KO:case HO:return new n(+e);case QO:return Ol(e,r);case ZO:case $O:case eA:case tA:case rA:case nA:case iA:case oA:case aA:return Il(e,r);case WO:return new n;case VO:case zO:return new n(e);case qO:return Al(e);case YO:return new n;case XO:return Cl(e)}}var bl=sA;var Pl=Object.create,fA=function(){function e(){}return function(t){if(!re(t))return{};if(Pl)return Pl(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Ml=fA;function uA(e){return typeof e.constructor=="function"&&!gt(e)?Ml(To(e)):{}}var vl=uA;var cA="[object Map]";function lA(e){return fe(e)&&ut(e)==cA}var kl=lA;var _l=qe&&qe.isMap,pA=_l?St(_l):kl,wl=pA;var mA="[object Set]";function dA(e){return fe(e)&&ut(e)==mA}var Bl=dA;var Fl=qe&&qe.isSet,hA=Fl?St(Fl):Bl,Dl=hA;var gA=1,EA=2,SA=4,jl="[object Arguments]",TA="[object Array]",yA="[object Boolean]",xA="[object Date]",RA="[object Error]",Gl="[object Function]",LA="[object GeneratorFunction]",OA="[object Map]",AA="[object Number]",Kl="[object Object]",UA="[object RegExp]",NA="[object Set]",CA="[object String]",IA="[object Symbol]",bA="[object WeakMap]",PA="[object ArrayBuffer]",MA="[object DataView]",vA="[object Float32Array]",kA="[object Float64Array]",_A="[object Int8Array]",wA="[object Int16Array]",BA="[object Int32Array]",FA="[object Uint8Array]",DA="[object Uint8ClampedArray]",jA="[object Uint16Array]",GA="[object Uint32Array]",H={};H[jl]=H[TA]=H[PA]=H[MA]=H[yA]=H[xA]=H[vA]=H[kA]=H[_A]=H[wA]=H[BA]=H[OA]=H[AA]=H[Kl]=H[UA]=H[NA]=H[CA]=H[IA]=H[FA]=H[DA]=H[jA]=H[GA]=!0;H[RA]=H[Gl]=H[bA]=!1;function Uo(e,t,r,n,i,o){var a,s=t&gA,f=t&EA,u=t&SA;if(r)a=i?r(e,n,i,o):r(e);if(a!==void 0)return a;if(!re(e))return e;var c=N(e);if(c){if(a=Ll(e),!s)return dl(e,a)}else{var l=ut(e),p=l==Gl||l==LA;if(Et(e))return Ws(e,s);if(l==Kl||l==jl||p&&!i){if(a=f||p?{}:vl(e),!s)return f?El(e,ul(a,e)):gl(e,al(a,e))}else{if(!H[l])return i?e:{};a=bl(e,l,s)}}o||(o=new fr);var h=o.get(e);if(h)return h;if(o.set(e,a),Dl(e))e.forEach(function(y){a.add(Uo(y,t,r,y,e,o))});else if(wl(e))e.forEach(function(y,m){a.set(m,Uo(y,t,r,m,e,o))});var S=u?f?Ro:di:f?ur:K,T=c?void 0:S(e);return ho(T||e,function(y,m){if(T)m=y,y=e[m];er(a,m,Uo(y,t,r,m,e,o))}),a}var Hl=Uo;var KA=4;function HA(e){return Hl(e,KA)}var W=HA;function WA(e){var t=-1,r=e==null?0:e.length,n=0,i=[];while(++t<r){var o=e[t];if(o)i[n++]=o}return i}var Tt=WA;var Wl=Object.prototype,VA=Wl.hasOwnProperty,qA=nn(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;if(i&&rr(t[0],t[1],i))n=1;while(++r<n){var o=t[r],a=ur(o),s=-1,f=a.length;while(++s<f){var u=a[s],c=e[u];if(c===void 0||dt(c,Wl[u])&&!VA.call(e,u))e[u]=o[u]}}return e}),gn=qA;var YA="__lodash_hash_undefined__";function zA(e){return this.__data__.set(e,YA),this}var Vl=zA;function XA(e){return this.__data__.has(e)}var ql=XA;function No(e){var t=-1,r=e==null?0:e.length;this.__data__=new wr;while(++t<r)this.add(e[t])}No.prototype.add=No.prototype.push=Vl;No.prototype.has=ql;var En=No;function JA(e,t,r,n){var i=e.length,o=r+(n?1:-1);while(n?o--:++o<i)if(t(e[o],o,e))return o;return-1}var Co=JA;function QA(e){return e!==e}var Yl=QA;function ZA(e,t,r){var n=r-1,i=e.length;while(++n<i)if(e[n]===t)return n;return-1}var zl=ZA;function $A(e,t,r){return t===t?zl(e,t,r):Co(e,Yl,r)}var Sn=$A;function eU(e,t){var r=e==null?0:e.length;return!!r&&Sn(e,t,0)>-1}var Io=eU;function tU(e,t,r){var n=-1,i=e==null?0:e.length;while(++n<i)if(r(t,e[n]))return!0;return!1}var bo=tU;function rU(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r<n)i[r]=t(e[r],r,e);return i}var yt=rU;function nU(e,t){return e.has(t)}var Tn=nU;var iU=200;function oU(e,t,r,n){var i=-1,o=Io,a=!0,s=e.length,f=[],u=t.length;if(!s)return f;if(r)t=yt(t,St(r));if(n)o=bo,a=!1;else if(t.length>=iU)o=Tn,a=!1,t=new En(t);e:while(++i<s){var c=e[i],l=r==null?c:r(c);if(c=n||c!==0?c:0,a&&l===l){var p=u;while(p--)if(t[p]===l)continue e;f.push(c)}else if(!o(t,l,n))f.push(c)}return f}var Xl=oU;var Jl=ye?ye.isConcatSpreadable:void 0;function aU(e){return N(e)||nr(e)||!!(Jl&&e&&e[Jl])}var Ql=aU;function Zl(e,t,r,n,i){var o=-1,a=e.length;r||(r=Ql),i||(i=[]);while(++o<a){var s=e[o];if(t>0&&r(s))if(t>1)Zl(s,t-1,r,n,i);else mn(i,s);else if(!n)i[i.length]=s}return i}var yn=Zl;function sU(e){return fe(e)&&le(e)}var Vs=sU;var fU=nn(function(e,t){return Vs(e)?Xl(e,yn(t,1,Vs,!0)):[]}),lr=fU;function uU(e,t,r){var n=-1,i=e.length;if(t<0)t=-t>i?0:i+t;if(r=r>i?i:r,r<0)r+=i;i=t>r?0:r-t>>>0,t>>>=0;var o=Array(i);while(++n<i)o[n]=e[n+t];return o}var Po=uU;var cU=/\s/;function lU(e){var t=e.length;while(t--&&cU.test(e.charAt(t)));return t}var $l=lU;var pU=/^\s+/;function mU(e){return e?e.slice(0,$l(e)+1).replace(pU,""):e}var ep=mU;var dU="[object Symbol]";function hU(e){return typeof e=="symbol"||fe(e)&&Me(e)==dU}var pr=hU;var tp=NaN,gU=/^[-+]0x[0-9a-f]+$/i,EU=/^0b[01]+$/i,SU=/^0o[0-7]+$/i,TU=parseInt;function yU(e){if(typeof e=="number")return e;if(pr(e))return tp;if(re(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=re(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ep(e);var r=EU.test(e);return r||SU.test(e)?TU(e.slice(2),r?2:8):gU.test(e)?tp:+e}var rp=yU;var np=1/0,xU=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function RU(e){if(!e)return e===0?e:0;if(e=rp(e),e===np||e===-np){var t=e<0?-1:1;return t*xU}return e===e?e:0}var ip=RU;function LU(e){var t=ip(e),r=t%1;return t===t?r?t-r:t:0}var xt=LU;function OU(e,t,r){var n=e==null?0:e.length;if(!n)return[];return t=r||t===void 0?1:xt(t),Po(e,t<0?0:t,n)}var ue=OU;function AU(e,t,r){var n=e==null?0:e.length;if(!n)return[];return t=r||t===void 0?1:xt(t),t=n-t,Po(e,0,t<0?0:t)}var kt=AU;function UU(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(!t(e[r],r,e))return!1;return!0}var op=UU;function NU(e){return function(t,r,n){var i=-1,o=Object(t),a=n(t),s=a.length;while(s--){var f=a[e?s:++i];if(r(o[f],f,o)===!1)break}return t}}var ap=NU;var CU=ap(),sp=CU;function IU(e,t){return e&&sp(e,t,K)}var fp=IU;function bU(e,t){return function(r,n){if(r==null)return r;if(!le(r))return e(r,n);var i=r.length,o=t?i:-1,a=Object(r);while(t?o--:++o<i)if(n(a[o],o,a)===!1)break;return r}}var up=bU;var PU=up(fp),je=PU;function MU(e,t){var r=!0;return je(e,function(n,i,o){return r=!!t(n,i,o),r}),r}var cp=MU;function vU(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e))return!0;return!1}var Mo=vU;var kU=1,_U=2;function wU(e,t,r,n,i,o){var a=r&kU,s=e.length,f=t.length;if(s!=f&&!(a&&f>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var l=-1,p=!0,h=r&_U?new En:void 0;o.set(e,t),o.set(t,e);while(++l<s){var S=e[l],T=t[l];if(n)var y=a?n(T,S,l,t,e,o):n(S,T,l,e,t,o);if(y!==void 0){if(y)continue;p=!1;break}if(h){if(!Mo(t,function(m,g){if(!Tn(h,g)&&(S===m||i(S,m,r,n,o)))return h.push(g)})){p=!1;break}}else if(!(S===T||i(S,T,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var vo=wU;function BU(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var lp=BU;function FU(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var xn=FU;var DU=1,jU=2,GU="[object Boolean]",KU="[object Date]",HU="[object Error]",WU="[object Map]",VU="[object Number]",qU="[object RegExp]",YU="[object Set]",zU="[object String]",XU="[object Symbol]",JU="[object ArrayBuffer]",QU="[object DataView]",pp=ye?ye.prototype:void 0,qs=pp?pp.valueOf:void 0;function ZU(e,t,r,n,i,o,a){switch(r){case QU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JU:if(e.byteLength!=t.byteLength||!o(new dn(e),new dn(t)))return!1;return!0;case GU:case KU:case VU:return dt(+e,+t);case HU:return e.name==t.name&&e.message==t.message;case qU:case zU:return e==t+"";case WU:var s=lp;case YU:var f=n&DU;if(s||(s=xn),e.size!=t.size&&!f)return!1;var u=a.get(e);if(u)return u==t;n|=jU,a.set(e,t);var c=vo(s(e),s(t),n,i,o,a);return a.delete(e),c;case XU:if(qs)return qs.call(e)==qs.call(t)}return!1}var mp=ZU;var $U=1,e2=Object.prototype,t2=e2.hasOwnProperty;function r2(e,t,r,n,i,o){var a=r&$U,s=di(e),f=s.length,u=di(t),c=u.length;if(f!=c&&!a)return!1;var l=f;while(l--){var p=s[l];if(!(a?p in t:t2.call(t,p)))return!1}var h=o.get(e),S=o.get(t);if(h&&S)return h==t&&S==e;var T=!0;o.set(e,t),o.set(t,e);var y=a;while(++l<f){p=s[l];var m=e[p],g=t[p];if(n)var d=a?n(g,m,p,t,e,o):n(m,g,p,e,t,o);if(!(d===void 0?m===g||i(m,g,r,n,o):d)){T=!1;break}y||(y=p=="constructor")}if(T&&!y){var x=e.constructor,_=t.constructor;if(x!=_&&(("constructor"in e)&&("constructor"in t))&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _))T=!1}return o.delete(e),o.delete(t),T}var dp=r2;var n2=1,hp="[object Arguments]",gp="[object Array]",ko="[object Object]",i2=Object.prototype,Ep=i2.hasOwnProperty;function o2(e,t,r,n,i,o){var a=N(e),s=N(t),f=a?gp:ut(e),u=s?gp:ut(t);f=f==hp?ko:f,u=u==hp?ko:u;var c=f==ko,l=u==ko,p=f==u;if(p&&Et(e)){if(!Et(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new fr),a||an(e)?vo(e,t,r,n,i,o):mp(e,t,f,r,n,i,o);if(!(r&n2)){var h=c&&Ep.call(e,"__wrapped__"),S=l&&Ep.call(t,"__wrapped__");if(h||S){var T=h?e.value():e,y=S?t.value():t;return o||(o=new fr),i(T,y,r,n,o)}}if(!p)return!1;return o||(o=new fr),dp(e,t,r,n,i,o)}var Sp=o2;function Tp(e,t,r,n,i){if(e===t)return!0;if(e==null||t==null||!fe(e)&&!fe(t))return e!==e&&t!==t;return Sp(e,t,r,n,Tp,i)}var _o=Tp;var a2=1,s2=2;function f2(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;e=Object(e);while(i--){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}while(++i<o){s=r[i];var f=s[0],u=e[f],c=s[1];if(a&&s[2]){if(u===void 0&&!(f in e))return!1}else{var l=new fr;if(n)var p=n(u,c,f,e,t,l);if(!(p===void 0?_o(c,u,a2|s2,n,l):p))return!1}}return!0}var yp=f2;function u2(e){return e===e&&!re(e)}var wo=u2;function c2(e){var t=K(e),r=t.length;while(r--){var n=t[r],i=e[n];t[r]=[n,i,wo(i)]}return t}var xp=c2;function l2(e,t){return function(r){if(r==null)return!1;return r[e]===t&&(t!==void 0||(e in Object(r)))}}var Bo=l2;function p2(e){var t=xp(e);if(t.length==1&&t[0][2])return Bo(t[0][0],t[0][1]);return function(r){return r===e||yp(r,e,t)}}var Rp=p2;var m2=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d2=/^\w*$/;function h2(e,t){if(N(e))return!1;var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||pr(e))return!0;return d2.test(e)||!m2.test(e)||t!=null&&e in Object(t)}var Rn=h2;var g2="Expected a function";function Ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(g2);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ys.Cache||wr),r}Ys.Cache=wr;var Lp=Ys;var E2=500;function S2(e){var t=Lp(e,function(n){if(r.size===E2)r.clear();return n}),r=t.cache;return t}var Op=S2;var T2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y2=/\\(\\)?/g,x2=Op(function(e){var t=[];if(e.charCodeAt(0)===46)t.push("");return e.replace(T2,function(r,n,i,o){t.push(i?o.replace(y2,"$1"):n||r)}),t}),Ap=x2;var R2=1/0,Up=ye?ye.prototype:void 0,Np=Up?Up.toString:void 0;function Cp(e){if(typeof e=="string")return e;if(N(e))return yt(e,Cp)+"";if(pr(e))return Np?Np.call(e):"";var t=e+"";return t=="0"&&1/e==-R2?"-0":t}var Ip=Cp;function L2(e){return e==null?"":Ip(e)}var bp=L2;function O2(e,t){if(N(e))return e;return Rn(e,t)?[e]:Ap(bp(e))}var mr=O2;var A2=1/0;function U2(e){if(typeof e=="string"||pr(e))return e;var t=e+"";return t=="0"&&1/e==-A2?"-0":t}var Rt=U2;function N2(e,t){t=mr(t,e);var r=0,n=t.length;while(e!=null&&r<n)e=e[Rt(t[r++])];return r&&r==n?e:void 0}var Ln=N2;function C2(e,t,r){var n=e==null?void 0:Ln(e,t);return n===void 0?r:n}var Pp=C2;function I2(e,t){return e!=null&&t in Object(e)}var Mp=I2;function b2(e,t,r){t=mr(t,e);var n=-1,i=t.length,o=!1;while(++n<i){var a=Rt(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}if(o||++n!=i)return o;return i=e==null?0:e.length,!!i&&on(i)&&tr(a,i)&&(N(e)||nr(e))}var Fo=b2;function P2(e,t){return e!=null&&Fo(e,t,Mp)}var vp=P2;var M2=1,v2=2;function k2(e,t){if(Rn(e)&&wo(t))return Bo(Rt(e),t);return function(r){var n=Pp(r,e);return n===void 0&&n===t?vp(r,e):_o(t,n,M2|v2)}}var kp=k2;function _2(e){return function(t){return t==null?void 0:t[e]}}var _p=_2;function w2(e){return function(t){return Ln(t,e)}}var wp=w2;function B2(e){return Rn(e)?_p(Rt(e)):wp(e)}var Bp=B2;function F2(e){if(typeof e=="function")return e;if(e==null)return et;if(typeof e=="object")return N(e)?kp(e[0],e[1]):Rp(e);return Bp(e)}var pe=F2;function D2(e,t,r){var n=N(e)?op:cp;if(r&&rr(e,t,r))t=void 0;return n(e,pe(t,3))}var Ne=D2;function j2(e,t){var r=[];return je(e,function(n,i,o){if(t(n,i,o))r.push(n)}),r}var Do=j2;function G2(e,t){var r=N(e)?ln:Do;return r(e,pe(t,3))}var Ce=G2;function K2(e){return function(t,r,n){var i=Object(t);if(!le(t)){var o=pe(r,3);t=K(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var Fp=K2;var H2=Math.max;function W2(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:xt(r);if(i<0)i=H2(n+i,0);return Co(e,pe(t,3),i)}var Dp=W2;var V2=Fp(Dp),Lt=V2;function q2(e){return e&&e.length?e[0]:void 0}var xe=q2;function Y2(e,t){var r=-1,n=le(e)?Array(e.length):[];return je(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var jp=Y2;function z2(e,t){var r=N(e)?yt:jp;return r(e,pe(t,3))}var L=z2;function X2(e,t){return yn(L(e,t),1)}var ke=X2;function J2(e){var t=e==null?0:e.length;return t?yn(e,1):[]}var ge=J2;function Q2(e){return typeof e=="function"?e:et}var Gp=Q2;function Z2(e,t){var r=N(e)?ho:je;return r(e,Gp(t))}var O=Z2;function $2(e,t,r,n){var i=-1,o=e==null?0:e.length;while(++i<o){var a=e[i];t(n,a,r(a),e)}return n}var Kp=$2;function e0(e,t,r,n){return je(e,function(i,o,a){t(n,i,r(i),a)}),n}var Hp=e0;function t0(e,t){return function(r,n){var i=N(r)?Kp:Hp,o=t?t():{};return i(r,e,pe(n,2),o)}}var Wp=t0;var r0=Object.prototype,n0=r0.hasOwnProperty,i0=Wp(function(e,t,r){if(n0.call(e,r))e[r].push(t);else rn(e,r,[t])}),zs=i0;var o0=Object.prototype,a0=o0.hasOwnProperty;function s0(e,t){return e!=null&&a0.call(e,t)}var Vp=s0;function f0(e,t){return e!=null&&Fo(e,t,Vp)}var U=f0;var u0="[object String]";function c0(e){return typeof e=="string"||!N(e)&&fe(e)&&Me(e)==u0}var Ee=c0;function l0(e,t){return yt(t,function(r){return e[r]})}var qp=l0;function p0(e){return e==null?[]:qp(e,K(e))}var G=p0;var m0=Math.max;function d0(e,t,r,n){e=le(e)?e:G(e),r=r&&!n?xt(r):0;var i=e.length;if(r<0)r=m0(i+r,0);return Ee(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Sn(e,t,r)>-1}var Z=d0;var h0=Math.max;function g0(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:xt(r);if(i<0)i=h0(n+i,0);return Sn(e,t,i)}var jo=g0;var E0="[object Map]",S0="[object Set]",T0=Object.prototype,y0=T0.hasOwnProperty;function x0(e){if(e==null)return!0;if(le(e)&&(N(e)||typeof e=="string"||typeof e.splice=="function"||Et(e)||an(e)||nr(e)))return!e.length;var t=ut(e);if(t==E0||t==S0)return!e.size;if(gt(e))return!mo(e).length;for(var r in e)if(y0.call(e,r))return!1;return!0}var P=x0;var R0="[object RegExp]";function L0(e){return fe(e)&&Me(e)==R0}var Yp=L0;var zp=qe&&qe.isRegExp,O0=zp?St(zp):Yp,tt=O0;function A0(e){return e===void 0}var Ie=A0;function U0(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Ot=U0;function N0(){}var ne=N0;function C0(e,t,r,n){if(!re(e))return e;t=mr(t,e);var i=-1,o=t.length,a=o-1,s=e;while(s!=null&&++i<o){var f=Rt(t[i]),u=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=a){var c=s[f];if(u=n?n(c,f,s):void 0,u===void 0)u=re(c)?c:tr(t[i+1])?[]:{}}er(s,f,u),s=s[f]}return e}var Xp=C0;function I0(e,t,r){var n=-1,i=t.length,o={};while(++n<i){var a=t[n],s=Ln(e,a);if(r(s,a))Xp(o,mr(a,e),s)}return o}var Jp=I0;function b0(e,t){if(e==null)return{};var r=yt(Ro(e),function(n){return[n]});return t=pe(t),Jp(e,r,function(n,i){return t(n,i[0])})}var Ge=b0;function P0(e,t,r,n){var i=-1,o=e==null?0:e.length;if(n&&o)r=e[++i];while(++i<o)r=t(r,e[i],i,e);return r}var Qp=P0;function M0(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var Zp=M0;function v0(e,t,r){var n=N(e)?Qp:Zp,i=arguments.length<3;return n(e,pe(t,4),r,i,je)}var me=v0;var k0="Expected a function";function _0(e){if(typeof e!="function")throw TypeError(k0);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)}}var $p=_0;function w0(e,t){var r=N(e)?ln:Do;return r(e,$p(pe(t,3)))}var dr=w0;function B0(e,t){var r;return je(e,function(n,i,o){return r=t(n,i,o),!r}),!!r}var em=B0;function F0(e,t,r){var n=N(e)?Mo:em;if(r&&rr(e,t,r))t=void 0;return n(e,pe(t,3))}var hi=F0;var D0=1/0,j0=!(cr&&1/xn(new cr([,-0]))[1]==D0)?ne:function(e){return new cr(e)},tm=j0;var G0=200;function K0(e,t,r){var n=-1,i=Io,o=e.length,a=!0,s=[],f=s;if(r)a=!1,i=bo;else if(o>=G0){var u=t?null:tm(e);if(u)return xn(u);a=!1,i=Tn,f=new En}else f=t?[]:s;e:while(++n<o){var c=e[n],l=t?t(c):c;if(c=r||c!==0?c:0,a&&l===l){var p=f.length;while(p--)if(f[p]===l)continue e;if(t)f.push(l);s.push(c)}else if(!i(f,l,r)){if(f!==s)f.push(l);s.push(c)}}return s}var rm=K0;function H0(e){return e&&e.length?rm(e):[]}var On=H0;function An(e){if(console&&console.error)console.error(`Error: ${e}`)}function gi(e){if(console&&console.warn)console.warn(`Warning: ${e}`)}function Ei(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function Si(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function W0(e){if(V0(e))return e.LABEL;else return e.name}function V0(e){return Ee(e.LABEL)&&e.LABEL!==""}class rt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),O(this.definition,(t)=>{t.accept(e)})}}class B extends rt{constructor(e){super([]);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}set definition(e){}get definition(){if(this.referencedRule!==void 0)return this.referencedRule.definition;return[]}accept(e){e.visit(this)}}class Ke extends rt{constructor(e){super(e.definition);this.orgText="",Ae(this,Ge(e,(t)=>t!==void 0))}}class z extends rt{constructor(e){super(e.definition);this.ignoreAmbiguities=!1,Ae(this,Ge(e,(t)=>t!==void 0))}}class F extends rt{constructor(e){super(e.definition);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}}class X extends rt{constructor(e){super(e.definition);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}}class J extends rt{constructor(e){super(e.definition);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}}class k extends rt{constructor(e){super(e.definition);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}}class V extends rt{constructor(e){super(e.definition);this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}}class q extends rt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition);this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ae(this,Ge(e,(t)=>t!==void 0))}}class M{constructor(e){this.idx=1,Ae(this,Ge(e,(t)=>t!==void 0))}accept(e){e.visit(this)}}function Go(e){return L(e,Un)}function Un(e){function t(r){return L(r,Un)}if(e instanceof B){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(Ee(e.label))r.label=e.label;return r}else if(e instanceof z)return{type:"Alternative",definition:t(e.definition)};else if(e instanceof F)return{type:"Option",idx:e.idx,definition:t(e.definition)};else if(e instanceof X)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};else if(e instanceof J)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Un(new M({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof V)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Un(new M({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof k)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};else if(e instanceof q)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};else if(e instanceof M){let r={type:"Terminal",name:e.terminalType.name,label:W0(e.terminalType),idx:e.idx};if(Ee(e.label))r.terminalLabel=e.label;let n=e.terminalType.PATTERN;if(e.terminalType.PATTERN)r.pattern=tt(n)?n.source:n;return r}else if(e instanceof Ke)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error("non exhaustive match")}class He{visit(e){let t=e;switch(t.constructor){case B:return this.visitNonTerminal(t);case z:return this.visitAlternative(t);case F:return this.visitOption(t);case X:return this.visitRepetitionMandatory(t);case J:return this.visitRepetitionMandatoryWithSeparator(t);case V:return this.visitRepetitionWithSeparator(t);case k:return this.visitRepetition(t);case q:return this.visitAlternation(t);case M:return this.visitTerminal(t);case Ke: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){}}function Xs(e){return e instanceof z||e instanceof F||e instanceof k||e instanceof X||e instanceof J||e instanceof V||e instanceof M||e instanceof Ke}function Fr(e,t=[]){if(e instanceof F||e instanceof k||e instanceof V)return!0;if(e instanceof q)return hi(e.definition,(n)=>Fr(n,t));else if(e instanceof B&&Z(t,e))return!1;else if(e instanceof rt){if(e instanceof B)t.push(e);return Ne(e.definition,(n)=>Fr(n,t))}else return!1}function Js(e){return e instanceof q}function We(e){if(e instanceof B)return"SUBRULE";else if(e instanceof F)return"OPTION";else if(e instanceof q)return"OR";else if(e instanceof X)return"AT_LEAST_ONE";else if(e instanceof J)return"AT_LEAST_ONE_SEP";else if(e instanceof V)return"MANY_SEP";else if(e instanceof k)return"MANY";else if(e instanceof M)return"CONSUME";else throw Error("non exhaustive match")}class hr{walk(e,t=[]){O(e.definition,(r,n)=>{let i=ue(e.definition,n+1);if(r instanceof B)this.walkProdRef(r,i,t);else if(r instanceof M)this.walkTerminal(r,i,t);else if(r instanceof z)this.walkFlat(r,i,t);else if(r instanceof F)this.walkOption(r,i,t);else if(r instanceof X)this.walkAtLeastOne(r,i,t);else if(r instanceof J)this.walkAtLeastOneSep(r,i,t);else if(r instanceof V)this.walkManySep(r,i,t);else if(r instanceof k)this.walkMany(r,i,t);else if(r instanceof q)this.walkOr(r,i,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new F({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=nm(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new F({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=nm(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);O(e.definition,(i)=>{let o=new z({definition:[i]});this.walk(o,n)})}}function nm(e,t,r){return[new F({definition:[new M({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Dr(e){if(e instanceof B)return Dr(e.referencedRule);else if(e instanceof M)return z0(e);else if(Xs(e))return q0(e);else if(Js(e))return Y0(e);else throw Error("non exhaustive match")}function q0(e){let t=[],r=e.definition,n=0,i=r.length>n,o,a=!0;while(i&&a)o=r[n],a=Fr(o),t=t.concat(Dr(o)),n=n+1,i=r.length>n;return On(t)}function Y0(e){let t=L(e.definition,(r)=>Dr(r));return On(ge(t))}function z0(e){return[e.terminalType]}var Ko="_~IN~_";class im extends hr{constructor(e){super();this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=X0(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(r),o=new z({definition:i}),a=Dr(o);this.follows[n]=a}}function om(e){let t={};return O(e,(r)=>{let n=new im(r).startWalking();Ae(t,n)}),t}function X0(e,t){return e.name+t+Ko}function C(e){return e.charCodeAt(0)}function Ho(e,t){if(Array.isArray(e))e.forEach(function(r){t.push(r)});else t.push(e)}function Nn(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function jr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function Ti(){throw Error("Internal Error - Should never get here!")}function Qs(e){return e.type==="Character"}var yi=[];for(let e=C("0");e<=C("9");e++)yi.push(e);var xi=[C("_")].concat(yi);for(let e=C("a");e<=C("z");e++)xi.push(e);for(let e=C("A");e<=C("Z");e++)xi.push(e);var Zs=[C(" "),C("\f"),C(`
42
- `),C("\r"),C("\t"),C("\v"),C("\t"),C("\xA0"),C("\u1680"),C("\u2000"),C("\u2001"),C("\u2002"),C("\u2003"),C("\u2004"),C("\u2005"),C("\u2006"),C("\u2007"),C("\u2008"),C("\u2009"),C("\u200A"),C("\u2028"),C("\u2029"),C("\u202F"),C("\u205F"),C("\u3000"),C("\uFEFF")];var J0=/[0-9a-fA-F]/,Wo=/[0-9]/,Q0=/[1-9]/;class Vo{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("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":Nn(r,"global");break;case"i":Nn(r,"ignoreCase");break;case"m":Nn(r,"multiLine");break;case"u":Nn(r,"unicode");break;case"y":Nn(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],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(){let e=[],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(){let 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}jr(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Ti()}quantifier(e=!1){let t=void 0,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let i;if(this.isDigit())i=this.integerIncludingZero(),t={atLeast:n,atMost:i};else t={atLeast:n,atMost:1/0};this.consumeChar("}");break}if(e===!0&&t===void 0)return;jr(t);break}if(e===!0&&t===void 0)return;if(jr(t)){if(this.peekChar(0)==="?")this.consumeChar("?"),t.greedy=!1;else t.greedy=!0;return t.type="Quantifier",t.loc=this.loc(r),t}}atom(){let e,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===void 0&&this.isPatternCharacter())e=this.patternCharacter();if(jr(e)){if(e.loc=this.loc(t),this.isQuantifier())e.quantifier=this.quantifier();return e}return Ti()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[C(`
43
- `),C("\r"),C("\u2028"),C("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=yi;break;case"D":e=yi,t=!0;break;case"s":e=Zs;break;case"S":e=Zs,t=!0;break;case"w":e=xi;break;case"W":e=xi,t=!0;break}if(jr(e))return{type:"Set",value:e,complement:t};return Ti()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=C("\f");break;case"n":e=C(`
44
- `);break;case"r":e=C("\r");break;case"t":e=C("\t");break;case"v":e=C("\v");break}if(jr(e))return{type:"Character",value:e};return Ti()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:C("\x00")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:C(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
45
- `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:C(e)}}}characterClass(){let e=[],t=!1;if(this.consumeChar("["),this.peekChar(0)==="^")this.consumeChar("^"),t=!0;while(this.isClassAtom()){let r=this.classAtom(),n=r.type==="Character";if(Qs(r)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),o=i.type==="Character";if(Qs(i)){if(i.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:i.value})}else Ho(r.value,e),e.push(C("-")),Ho(i.value,e)}else Ho(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
46
- `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:C("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(")");let r={type:"Group",capturing:e,value:t};if(e)r.idx=this.groupIdx;return r}positiveInteger(){let e=this.popChar();if(Q0.test(e)===!1)throw Error("Expecting a positive integer");while(Wo.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Wo.test(e)===!1)throw Error("Expecting an integer");while(Wo.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
47
- `: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:C(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Wo.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
48
- `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch(t){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
49
- `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){let i=this.popChar();if(J0.test(i)===!1)throw Error("Expecting a HexDecimal digits");t+=i}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class Gr{visitChildren(e){for(let t in e){let r=e[t];if(e.hasOwnProperty(t)){if(r.type!==void 0)this.visit(r);else if(Array.isArray(r))r.forEach((n)=>{this.visit(n)},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"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){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}var qo={},Z0=new Vo;function Cn(e){let t=e.toString();if(qo.hasOwnProperty(t))return qo[t];else{let r=Z0.pattern(t);return qo[t]=r,r}}function am(){qo={}}var fm="Complement Sets are not supported for first char optimization",Ri=`Unable to use "first char" lexer optimizations:
50
- `;function um(e,t=!1){try{let r=Cn(e);return $s(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===fm){if(t)gi(`${Ri} Unable to optimize: < ${e.toString()} >
51
- Complement Sets cannot be automatically optimized.
52
- This will disable the lexer's first char optimizations.
53
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`)}else{let n="";if(t)n=`
54
- This will disable the lexer's first char optimizations.
55
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`;An(`${Ri}
56
- Failed parsing: < ${e.toString()} >
57
- Using the @chevrotain/regexp-to-ast library
58
- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function $s(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)$s(e.value[i],t,r);break;case"Alternative":let n=e.value;for(let i=0;i<n.length;i++){let o=n[i];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let a=o;switch(a.type){case"Character":Yo(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(fm);O(a.value,(f)=>{if(typeof f==="number")Yo(f,t,r);else{let u=f;if(r===!0)for(let c=u.from;c<=u.to;c++)Yo(c,t,r);else{for(let c=u.from;c<=u.to&&c<In;c++)Yo(c,t,r);if(u.to>=In){let c=u.from>=In?u.from:In,l=u.to,p=At(c),h=At(l);for(let S=p;S<=h;S++)t[S]=S}}}});break;case"Group":$s(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&ef(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return G(t)}function Yo(e,t,r){let n=At(e);if(t[n]=n,r===!0)$0(e,t)}function $0(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=At(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let o=At(i.charCodeAt(0));t[o]=o}}}function sm(e,t){return Lt(e.value,(r)=>{if(typeof r==="number")return Z(t,r);else{let n=r;return Lt(t,(i)=>n.from<=i&&i<=n.to)!==void 0}})}function ef(e){let t=e.quantifier;if(t&&t.atLeast===0)return!0;if(!e.value)return!1;return N(e.value)?Ne(e.value,ef):ef(e.value)}class cm extends Gr{constructor(e){super();this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found===!0)return;switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}visitCharacter(e){if(Z(this.targetCharCodes,e.value))this.found=!0}visitSet(e){if(e.complement){if(sm(e,this.targetCharCodes)===void 0)this.found=!0}else if(sm(e,this.targetCharCodes)!==void 0)this.found=!0}}function zo(e,t){if(t instanceof RegExp){let r=Cn(t),n=new cm(e);return n.visit(r),n.found}else return Lt(t,(r)=>Z(e,r.charCodeAt(0)))!==void 0}var Kr="PATTERN",bn="defaultMode",Xo="modes",rf=typeof new RegExp("(?:)").sticky==="boolean";function mm(e,t){t=gn(t,{useSticky:rf,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
59
- `],tracer:(g,d)=>d()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{EN()});let n;r("Reject Lexer.NA",()=>{n=dr(e,(g)=>g[Kr]===D.NA)});let i=!1,o;r("Transform Patterns",()=>{i=!1,o=L(n,(g)=>{let d=g[Kr];if(tt(d)){let x=d.source;if(x.length===1&&x!=="^"&&x!=="$"&&x!=="."&&!d.ignoreCase)return x;else if(x.length===2&&x[0]==="\\"&&!Z(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],x[1]))return x[1];else return t.useSticky?pm(d):lm(d)}else if(ve(d))return i=!0,{exec:d};else if(typeof d==="object")return i=!0,d;else if(typeof d==="string")if(d.length===1)return d;else{let x=d.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),_=new RegExp(x);return t.useSticky?pm(_):lm(_)}else throw Error("non exhaustive match")})});let a,s,f,u,c;r("misc mapping",()=>{a=L(n,(g)=>g.tokenTypeIdx),s=L(n,(g)=>{let d=g.GROUP;if(d===D.SKIPPED)return;else if(Ee(d))return d;else if(Ie(d))return!1;else throw Error("non exhaustive match")}),f=L(n,(g)=>{let d=g.LONGER_ALT;if(d)return N(d)?L(d,(_)=>jo(n,_)):[jo(n,d)]}),u=L(n,(g)=>g.PUSH_MODE),c=L(n,(g)=>U(g,"POP_MODE"))});let l;r("Line Terminator Handling",()=>{let g=xm(t.lineTerminatorCharacters);if(l=L(n,(d)=>!1),t.positionTracking!=="onlyOffset")l=L(n,(d)=>{if(U(d,"LINE_BREAKS"))return!!d.LINE_BREAKS;else return ym(d,g)===!1&&zo(g,d.PATTERN)})});let p,h,S,T;r("Misc Mapping #2",()=>{p=L(n,Sm),h=L(o,hN),S=me(n,(g,d)=>{let x=d.GROUP;if(Ee(x)&&x!==D.SKIPPED)g[x]=[];return g},{}),T=L(o,(g,d)=>({pattern:o[d],longerAlt:f[d],canLineTerminator:l[d],isCustom:p[d],short:h[d],group:s[d],push:u[d],pop:c[d],tokenTypeIdx:a[d],tokenType:n[d]}))});let y=!0,m=[];if(!t.safeMode)r("First Char Optimization",()=>{m=me(n,(g,d,x)=>{if(typeof d.PATTERN==="string"){let _=d.PATTERN.charCodeAt(0),at=At(_);tf(g,at,T[x])}else if(N(d.START_CHARS_HINT)){let _;O(d.START_CHARS_HINT,(at)=>{let Ht=typeof at==="string"?at.charCodeAt(0):at,Mr=At(Ht);if(_!==Mr)_=Mr,tf(g,Mr,T[x])})}else if(tt(d.PATTERN))if(d.PATTERN.unicode){if(y=!1,t.ensureOptimizations)An(`${Ri} Unable to analyze < ${d.PATTERN.toString()} > pattern.
60
- The regexp unicode flag is not currently supported by the regexp-to-ast library.
61
- This will disable the lexer's first char optimizations.
62
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)}else{let _=um(d.PATTERN,t.ensureOptimizations);if(P(_))y=!1;O(_,(at)=>{tf(g,at,T[x])})}else{if(t.ensureOptimizations)An(`${Ri} TokenType: <${d.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
63
- This will disable the lexer's first char optimizations.
64
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`);y=!1}return g},[])});return{emptyGroups:S,patternIdxToConfig:T,charCodeToPatternIdxToConfig:m,hasCustom:i,canBeOptimized:y}}function dm(e,t){let r=[],n=tN(e);r=r.concat(n.errors);let i=rN(n.valid),o=i.valid;return r=r.concat(i.errors),r=r.concat(eN(o)),r=r.concat(cN(o)),r=r.concat(lN(o,t)),r=r.concat(pN(o)),r}function eN(e){let t=[],r=Ce(e,(n)=>tt(n[Kr]));return t=t.concat(iN(r)),t=t.concat(sN(r)),t=t.concat(fN(r)),t=t.concat(uN(r)),t=t.concat(oN(r)),t}function tN(e){let t=Ce(e,(i)=>!U(i,Kr)),r=L(t,(i)=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:ee.MISSING_PATTERN,tokenTypes:[i]})),n=lr(e,t);return{errors:r,valid:n}}function rN(e){let t=Ce(e,(i)=>{let o=i[Kr];return!tt(o)&&!ve(o)&&!U(o,"exec")&&!Ee(o)}),r=L(t,(i)=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ee.INVALID_PATTERN,tokenTypes:[i]})),n=lr(e,t);return{errors:r,valid:n}}var nN=/[^\\][$]/;function iN(e){class t extends Gr{constructor(){super(...arguments);this.found=!1}visitEndAnchor(i){this.found=!0}}let r=Ce(e,(i)=>{let o=i.PATTERN;try{let a=Cn(o),s=new t;return s.visit(a),s.found}catch(a){return nN.test(o.source)}});return L(r,(i)=>({message:`Unexpected RegExp Anchor Error:
65
- Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
66
- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ee.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function oN(e){let t=Ce(e,(n)=>n.PATTERN.test(""));return L(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:ee.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}var aN=/[^\\[][\^]|^\^/;function sN(e){class t extends Gr{constructor(){super(...arguments);this.found=!1}visitStartAnchor(i){this.found=!0}}let r=Ce(e,(i)=>{let o=i.PATTERN;try{let a=Cn(o),s=new t;return s.visit(a),s.found}catch(a){return aN.test(o.source)}});return L(r,(i)=>({message:`Unexpected RegExp Anchor Error:
67
- Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
68
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ee.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function fN(e){let t=Ce(e,(n)=>{let i=n[Kr];return i instanceof RegExp&&(i.multiline||i.global)});return L(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ee.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function uN(e){let t=[],r=L(e,(o)=>me(e,(a,s)=>{if(o.PATTERN.source===s.PATTERN.source&&!Z(t,s)&&s.PATTERN!==D.NA)return t.push(s),a.push(s),a;return a},[]));r=Tt(r);let n=Ce(r,(o)=>o.length>1);return L(n,(o)=>{let a=L(o,(f)=>f.name);return{message:`The same RegExp pattern ->${xe(o).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:ee.DUPLICATE_PATTERNS_FOUND,tokenTypes:o}})}function cN(e){let t=Ce(e,(n)=>{if(!U(n,"GROUP"))return!1;let i=n.GROUP;return i!==D.SKIPPED&&i!==D.NA&&!Ee(i)});return L(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ee.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function lN(e,t){let r=Ce(e,(i)=>i.PUSH_MODE!==void 0&&!Z(t,i.PUSH_MODE));return L(r,(i)=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:ee.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function pN(e){let t=[],r=me(e,(n,i,o)=>{let a=i.PATTERN;if(a===D.NA)return n;if(Ee(a))n.push({str:a,idx:o,tokenType:i});else if(tt(a)&&dN(a))n.push({str:a.source,idx:o,tokenType:i});return n},[]);return O(e,(n,i)=>{O(r,({str:o,idx:a,tokenType:s})=>{if(i<a&&mN(o,n.PATTERN)){let f=`Token: ->${s.name}<- can never be matched.
69
- Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
70
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:f,type:ee.UNREACHABLE_PATTERN,tokenTypes:[n,s]})}})}),t}function mN(e,t){if(tt(t)){let r=t.exec(e);return r!==null&&r.index===0}else if(ve(t))return t(e,0,[],{});else if(U(t,"exec"))return t.exec(e,0,[],{});else if(typeof t==="string")return t===e;else throw Error("non exhaustive match")}function dN(e){return Lt([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(r)=>e.source.indexOf(r)!==-1)===void 0}function lm(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function pm(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function hm(e,t,r){let n=[];if(!U(e,bn))n.push({message:"A MultiMode Lexer cannot be initialized without a <"+bn+`> property in its definition
71
- `,type:ee.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE});if(!U(e,Xo))n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Xo+`> property in its definition
72
- `,type:ee.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY});if(U(e,Xo)&&U(e,bn)&&!U(e.modes,e.defaultMode))n.push({message:`A MultiMode Lexer cannot be initialized with a ${bn}: <${e.defaultMode}>which does not exist
73
- `,type:ee.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST});if(U(e,Xo))O(e.modes,(i,o)=>{O(i,(a,s)=>{if(Ie(a))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${o}> at index: <${s}>
74
- `,type:ee.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(U(a,"LONGER_ALT")){let f=N(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];O(f,(u)=>{if(!Ie(u)&&!Z(i,u))n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${a.name}> outside of mode <${o}>
75
- `,type:ee.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})});return n}function gm(e,t,r){let n=[],i=!1,o=Tt(ge(G(e.modes))),a=dr(o,(f)=>f[Kr]===D.NA),s=xm(r);if(t)O(a,(f)=>{let u=ym(f,s);if(u!==!1){let l={message:gN(f,u),type:u.issue,tokenType:f};n.push(l)}else if(U(f,"LINE_BREAKS")){if(f.LINE_BREAKS===!0)i=!0}else if(zo(s,f.PATTERN))i=!0});if(t&&!i)n.push({message:`Warning: No LINE_BREAKS Found.
76
- This Lexer has been defined to track line and column information,
77
- But none of the Token Types can be identified as matching a line terminator.
78
- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
79
- for details.`,type:ee.NO_LINE_BREAKS_FLAGS});return n}function Em(e){let t={},r=K(e);return O(r,(n)=>{let i=e[n];if(N(i))t[n]=[];else throw Error("non exhaustive match")}),t}function Sm(e){let t=e.PATTERN;if(tt(t))return!1;else if(ve(t))return!0;else if(U(t,"exec"))return!0;else if(Ee(t))return!1;else throw Error("non exhaustive match")}function hN(e){if(Ee(e)&&e.length===1)return e.charCodeAt(0);else return!1}var Tm={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;else if(n===13){if(e.charCodeAt(r+1)===10)this.lastIndex=r+2;else this.lastIndex=r+1;return!0}}return!1},lastIndex:0};function ym(e,t){if(U(e,"LINE_BREAKS"))return!1;else if(tt(e.PATTERN)){try{zo(t,e.PATTERN)}catch(r){return{issue:ee.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else if(Ee(e.PATTERN))return!1;else if(Sm(e))return{issue:ee.CUSTOM_LINE_BREAK};else throw Error("non exhaustive match")}function gN(e,t){if(t.issue===ee.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
80
- The problem is in the <${e.name}> Token Type
81
- Root cause: ${t.errMsg}.
82
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;else if(t.issue===ee.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
83
- The problem is in the <${e.name}> Token Type
84
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;else throw Error("non exhaustive match")}function xm(e){return L(e,(r)=>{if(Ee(r))return r.charCodeAt(0);else return r})}function tf(e,t,r){if(e[t]===void 0)e[t]=[r];else e[t].push(r)}var In=256,Jo=[];function At(e){return e<In?e:Jo[e]}function EN(){if(P(Jo)){Jo=Array(65536);for(let e=0;e<65536;e++)Jo[e]=e>255?255+~~(e/255):e}}function _t(e,t){let r=e.tokenTypeIdx;if(r===t.tokenTypeIdx)return!0;else return t.isParent===!0&&t.categoryMatchesMap[r]===!0}function Pn(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Rm=1,Om={};function wt(e){let t=SN(e);TN(t),xN(t),yN(t),O(t,(r)=>{r.isParent=r.categoryMatches.length>0})}function SN(e){let t=W(e),r=e,n=!0;while(n){r=Tt(ge(L(r,(o)=>o.CATEGORIES)));let i=lr(r,t);if(t=t.concat(i),P(i))n=!1;else r=i}return t}function TN(e){O(e,(t)=>{if(!nf(t))Om[Rm]=t,t.tokenTypeIdx=Rm++;if(Lm(t)&&!N(t.CATEGORIES))t.CATEGORIES=[t.CATEGORIES];if(!Lm(t))t.CATEGORIES=[];if(!RN(t))t.categoryMatches=[];if(!LN(t))t.categoryMatchesMap={}})}function yN(e){O(e,(t)=>{t.categoryMatches=[],O(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(Om[n].tokenTypeIdx)})})}function xN(e){O(e,(t)=>{Am([],t)})}function Am(e,t){O(e,(r)=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),O(t.CATEGORIES,(r)=>{let n=e.concat(t);if(!Z(n,r))Am(n,r)})}function nf(e){return U(e,"tokenTypeIdx")}function Lm(e){return U(e,"CATEGORIES")}function RN(e){return U(e,"categoryMatches")}function LN(e){return U(e,"categoryMatchesMap")}function Um(e){return U(e,"tokenTypeIdx")}var of={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var ee;(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"})(ee||(ee={}));var Li={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
85
- `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:of,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Li);class D{constructor(e,t=Li){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(n,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let o=Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent)console.log(`${o}--> <${n}>`);let{time:a,value:s}=Ei(i),f=a>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent)f(`${o}<-- <${n}> time: ${a}ms`);return this.traceInitIndent--,s}else return i()},typeof t==="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
86
- a boolean 2nd argument is no longer supported`);this.config=Ae({},Li,t);let r=this.config.traceInitPerf;if(r===!0)this.traceInitMaxIdent=1/0,this.traceInitPerf=!0;else if(typeof r==="number")this.traceInitMaxIdent=r,this.traceInitPerf=!0;this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,i=!0;if(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Li.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Tm;else if(this.config.lineTerminatorCharacters===Li.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
87
- For 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.');if(this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),N(e))n={modes:{defaultMode:W(e)},defaultMode:bn};else i=!1,n=W(e)}),this.config.skipValidations===!1)this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(hm(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(gm(n,this.trackStartLines,this.config.lineTerminatorCharacters))});n.modes=n.modes?n.modes:{},O(n.modes,(a,s)=>{n.modes[s]=dr(a,(f)=>Ie(f))});let o=K(n.modes);if(O(n.modes,(a,s)=>{this.TRACE_INIT(`Mode: <${s}> processing`,()=>{if(this.modes.push(s),this.config.skipValidations===!1)this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(dm(a,o))});if(P(this.lexerDefinitionErrors)){wt(a);let f;this.TRACE_INIT("analyzeTokenTypes",()=>{f=mm(a,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[s]=f.patternIdxToConfig,this.charCodeToPatternIdxToConfig[s]=f.charCodeToPatternIdxToConfig,this.emptyGroups=Ae({},this.emptyGroups,f.emptyGroups),this.hasCustom=f.hasCustom||this.hasCustom,this.canModeBeOptimized[s]=f.canBeOptimized}})}),this.defaultMode=n.defaultMode,!P(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let s=L(this.lexerDefinitionErrors,(f)=>f.message).join(`-----------------------
88
- `);throw Error(`Errors detected in definition of Lexer:
89
- `+s)}O(this.lexerDefinitionWarning,(a)=>{gi(a.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(rf)this.chopInput=et,this.match=this.matchWithTest;else this.updateLastIndex=ne,this.match=this.matchWithExec;if(i)this.handleModes=ne;if(this.trackStartLines===!1)this.computeNewColumn=et;if(this.trackEndLines===!1)this.updateTokenEndLineColumnLocation=ne;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",()=>{let a=me(this.canModeBeOptimized,(s,f,u)=>{if(f===!1)s.push(u);return s},[]);if(t.ensureOptimizations&&!P(a))throw Error(`Lexer Modes: < ${a.join(", ")} > cannot be optimized.
90
- Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
91
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{am()}),this.TRACE_INIT("toFastProperties",()=>{Si(this)})})}tokenize(e,t=this.defaultMode){if(!P(this.lexerDefinitionErrors)){let n=L(this.lexerDefinitionErrors,(i)=>i.message).join(`-----------------------
92
- `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
93
- `+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,i,o,a,s,f,u,c,l,p,h,S,T,y,m,g=e,d=g.length,x=0,_=0,at=this.hasCustom?0:Math.floor(e.length/10),Ht=Array(at),Mr=[],ri=this.trackStartLines?1:void 0,Wt=this.trackStartLines?1:void 0,ni=Em(this.emptyGroups),cS=this.trackStartLines,is=this.config.lineTerminatorsPattern,Wi=0,Vt=[],ii=[],Vi=[],eu=[];Object.freeze(eu);let oi;function tu(){return Vt}function ru(Ue){let Ze=At(Ue),Jr=ii[Ze];if(Jr===void 0)return eu;else return Jr}let lS=(Ue)=>{if(Vi.length===1&&Ue.tokenType.PUSH_MODE===void 0){let Ze=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Ue);Mr.push({offset:Ue.startOffset,line:Ue.startLine,column:Ue.startColumn,length:Ue.image.length,message:Ze})}else{Vi.pop();let Ze=Ot(Vi);Vt=this.patternIdxToConfig[Ze],ii=this.charCodeToPatternIdxToConfig[Ze],Wi=Vt.length;let Jr=this.canModeBeOptimized[Ze]&&this.config.safeMode===!1;if(ii&&Jr)oi=ru;else oi=tu}};function nu(Ue){Vi.push(Ue),ii=this.charCodeToPatternIdxToConfig[Ue],Vt=this.patternIdxToConfig[Ue],Wi=Vt.length,Wi=Vt.length;let Ze=this.canModeBeOptimized[Ue]&&this.config.safeMode===!1;if(ii&&Ze)oi=ru;else oi=tu}nu.call(this,t);let st,iu=this.config.recoveryEnabled;while(x<d){s=null;let Ue=g.charCodeAt(x),Ze=oi(Ue),Jr=Ze.length;for(r=0;r<Jr;r++){st=Ze[r];let Ve=st.pattern;f=null;let Nt=st.short;if(Nt!==!1){if(Ue===Nt)s=Ve}else if(st.isCustom===!0)if(m=Ve.exec(g,x,Ht,ni),m!==null){if(s=m[0],m.payload!==void 0)f=m.payload}else s=null;else this.updateLastIndex(Ve,x),s=this.match(Ve,e,x);if(s!==null){if(a=st.longerAlt,a!==void 0){let qt=a.length;for(i=0;i<qt;i++){let Ct=Vt[a[i]],vr=Ct.pattern;if(u=null,Ct.isCustom===!0)if(m=vr.exec(g,x,Ht,ni),m!==null){if(o=m[0],m.payload!==void 0)u=m.payload}else o=null;else this.updateLastIndex(vr,x),o=this.match(vr,e,x);if(o&&o.length>s.length){s=o,f=u,st=Ct;break}}}break}}if(s!==null){if(c=s.length,l=st.group,l!==void 0)if(p=st.tokenTypeIdx,h=this.createTokenInstance(s,x,p,st.tokenType,ri,Wt,c),this.handlePayload(h,f),l===!1)_=this.addToken(Ht,_,h);else ni[l].push(h);if(e=this.chopInput(e,c),x=x+c,Wt=this.computeNewColumn(Wt,c),cS===!0&&st.canLineTerminator===!0){let Ve=0,Nt,qt;is.lastIndex=0;do if(Nt=is.test(s),Nt===!0)qt=is.lastIndex-1,Ve++;while(Nt===!0);if(Ve!==0)ri=ri+Ve,Wt=c-qt,this.updateTokenEndLineColumnLocation(h,l,qt,Ve,ri,Wt,c)}this.handleModes(st,lS,nu,h)}else{let Ve=x,Nt=ri,qt=Wt,Ct=iu===!1;while(Ct===!1&&x<d){e=this.chopInput(e,1),x++;for(n=0;n<Wi;n++){let vr=Vt[n],os=vr.pattern,ou=vr.short;if(ou!==!1){if(g.charCodeAt(x)===ou)Ct=!0}else if(vr.isCustom===!0)Ct=os.exec(g,x,Ht,ni)!==null;else this.updateLastIndex(os,x),Ct=os.exec(e)!==null;if(Ct===!0)break}}if(S=x-Ve,Wt=this.computeNewColumn(Wt,S),y=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,Ve,S,Nt,qt),Mr.push({offset:Ve,line:Nt,column:qt,length:S,message:y}),iu===!1)break}}if(!this.hasCustom)Ht.length=_;return{tokens:Ht,groups:ni,errors:Mr}}handleModes(e,t,r,n){if(e.pop===!0){let i=e.push;if(t(n),i!==void 0)r.call(this,i)}else if(e.push!==void 0)r.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,n,i,o,a){let s,f;if(t!==void 0){if(s=r===a-1,f=s?-1:0,!(n===1&&s===!0))e.endLine=i+f,e.endColumn=o-1+-f}}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,i,o){return{image:e,startOffset:t,startLine:i,startColumn:o,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,i,o,a){return{image:e,startOffset:t,endOffset:t+a-1,startLine:i,endLine:i,startColumn:o,endColumn:o+a-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){if(t!==null)e.payload=t}matchWithTest(e,t,r){if(e.test(t)===!0)return t.substring(r,e.lastIndex);return null}matchWithExec(e,t){let r=e.exec(t);return r!==null?r[0]:null}}D.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";D.NA=/NOT_APPLICABLE/;function Bt(e){if(af(e))return e.LABEL;else return e.name}function af(e){return Ee(e.LABEL)&&e.LABEL!==""}var ON="parent",Nm="categories",Cm="label",Im="group",bm="push_mode",Pm="pop_mode",Mm="longer_alt",vm="line_breaks",km="start_chars_hint";function Hr(e){return AN(e)}function AN(e){let t=e.pattern,r={};if(r.name=e.name,!Ie(t))r.PATTERN=t;if(U(e,ON))throw`The parent property is no longer supported.
94
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;if(U(e,Nm))r.CATEGORIES=e[Nm];if(wt([r]),U(e,Cm))r.LABEL=e[Cm];if(U(e,Im))r.GROUP=e[Im];if(U(e,Pm))r.POP_MODE=e[Pm];if(U(e,bm))r.PUSH_MODE=e[bm];if(U(e,Mm))r.LONGER_ALT=e[Mm];if(U(e,vm))r.LINE_BREAKS=e[vm];if(U(e,km))r.START_CHARS_HINT=e[km];return r}var Ye=Hr({name:"EOF",pattern:D.NA});wt([Ye]);function Wr(e,t,r,n,i,o,a,s){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:o,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function I(e,t){return _t(e,t)}var Qo={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${af(e)?`--> ${Bt(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let s=`
95
- but found: '`+xe(t).image+"'";if(n)return"Expecting: "+n+s;else{let f=me(e,(p,h)=>p.concat(h),[]),u=L(f,(p)=>`[${L(p,(h)=>Bt(h)).join(", ")}]`);return`Expecting: one of these possible Token sequences:
96
- ${L(u,(p,h)=>` ${h+1}. ${p}`).join(`
97
- `)}`+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let a=`
98
- but found: '`+xe(t).image+"'";if(r)return"Expecting: "+r+a;else return`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::
99
- <${L(e,(u)=>`[${L(u,(c)=>Bt(c)).join(",")}]`).join(" ,")}>`+a}};Object.freeze(Qo);var _m={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
100
- inside top level rule: ->`+e.name+"<-"}},ct={buildDuplicateFoundError(e,t){function r(c){if(c instanceof M)return c.terminalType.name;else if(c instanceof B)return c.nonTerminalName;else return""}let n=e.name,i=xe(t),o=i.idx,a=We(i),s=r(i),f=o>0,u=`->${a}${f?o:""}<- ${s?`with argument: ->${s}<-`:""}
101
- appears more than once (${t.length} times) in the top level rule: ->${n}<-.
102
- For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
103
- `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,`
104
- `),u},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.
105
- The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
106
- To resolve this make sure each Terminal and Non-Terminal names are unique
107
- This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
108
- and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=L(e.prefixPath,(i)=>Bt(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
109
- in <OR${r}> inside <${e.topLevelRule.name}> Rule,
110
- <${t}> may appears as a prefix path in all these alternatives.
111
- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
112
- For Further details.`},buildAlternationAmbiguityError(e){let t=L(e.prefixPath,(i)=>Bt(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${e.topLevelRule.name}> Rule,
113
- <${t}> may appears as a prefix path in all these alternatives.
114
- `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
115
- For Further details.`,n},buildEmptyRepetitionError(e){let t=We(e.repetition);if(e.repetition.idx!==0)t+=e.repetition.idx;return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
116
- This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
117
- Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
118
- <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
119
- has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=L(e.leftRecursionPath,(o)=>o.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
120
- rule: <${t}> can be invoked from itself (directly or indirectly)
121
- without consuming any Tokens. The grammar path that causes this is:
122
- ${n}
123
- To fix this refactor your grammar to remove the left recursion.
124
- see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;if(e.topLevelRule instanceof Ke)t=e.topLevelRule.name;else t=e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function wm(e,t){let r=new Bm(e,t);return r.resolveRefs(),r.errors}class Bm extends He{constructor(e,t){super();this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){O(G(this.nameToTopRule),(e)=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(!t){let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:Se.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}else e.referencedRule=t}}class Fm extends hr{constructor(e,t){super();this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=W(this.path.ruleStack).reverse(),this.occurrenceStack=W(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){if(!this.found)super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){if(P(this.ruleStack))this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0;else this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop()}}class sf extends Fm{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,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),i=new z({definition:n});this.possibleTokTypes=Dr(i),this.found=!0}}}class Oi extends hr{constructor(e,t){super();this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class ff extends Oi{walkMany(e,t,r){if(e.idx===this.occurrence){let n=xe(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof M)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkMany(e,t,r)}}class Zo extends Oi{walkManySep(e,t,r){if(e.idx===this.occurrence){let n=xe(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof M)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkManySep(e,t,r)}}class uf extends Oi{walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=xe(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof M)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkAtLeastOne(e,t,r)}}class $o extends Oi{walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=xe(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof M)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkAtLeastOneSep(e,t,r)}}function ea(e,t,r=[]){r=W(r);let n=[],i=0;function o(s){return s.concat(ue(e,i+1))}function a(s){let f=ea(o(s),t,r);return n.concat(f)}while(r.length<t&&i<e.length){let s=e[i];if(s instanceof z)return a(s.definition);else if(s instanceof B)return a(s.definition);else if(s instanceof F)n=a(s.definition);else if(s instanceof X){let f=s.definition.concat([new k({definition:s.definition})]);return a(f)}else if(s instanceof J){let f=[new z({definition:s.definition}),new k({definition:[new M({terminalType:s.separator})].concat(s.definition)})];return a(f)}else if(s instanceof V){let f=s.definition.concat([new k({definition:[new M({terminalType:s.separator})].concat(s.definition)})]);n=a(f)}else if(s instanceof k){let f=s.definition.concat([new k({definition:s.definition})]);n=a(f)}else if(s instanceof q)return O(s.definition,(f)=>{if(P(f.definition)===!1)n=a(f.definition)}),n;else if(s instanceof M)r.push(s.terminalType);else throw Error("non exhaustive match");i++}return n.push({partialPath:r,suffixDef:ue(e,i)}),n}function ta(e,t,r,n){let o=["EXIT_NONE_TERMINAL"],a="EXIT_ALTERNATIVE",s=!1,f=t.length,u=f-n-1,c=[],l=[];l.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!P(l)){let p=l.pop();if(p==="EXIT_ALTERNATIVE"){if(s&&Ot(l).idx<=u)l.pop();continue}let{def:h,idx:S,ruleStack:T,occurrenceStack:y}=p;if(P(h))continue;let m=h[0];if(m==="EXIT_NONE_TERMINAL"){let g={idx:S,def:ue(h),ruleStack:kt(T),occurrenceStack:kt(y)};l.push(g)}else if(m instanceof M)if(S<f-1){let g=S+1,d=t[g];if(r(d,m.terminalType)){let x={idx:g,def:ue(h),ruleStack:T,occurrenceStack:y};l.push(x)}}else if(S===f-1)c.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:T,occurrenceStack:y}),s=!0;else throw Error("non exhaustive match");else if(m instanceof B){let g=W(T);g.push(m.nonTerminalName);let d=W(y);d.push(m.idx);let x={idx:S,def:m.definition.concat(o,ue(h)),ruleStack:g,occurrenceStack:d};l.push(x)}else if(m instanceof F){let g={idx:S,def:ue(h),ruleStack:T,occurrenceStack:y};l.push(g),l.push("EXIT_ALTERNATIVE");let d={idx:S,def:m.definition.concat(ue(h)),ruleStack:T,occurrenceStack:y};l.push(d)}else if(m instanceof X){let g=new k({definition:m.definition,idx:m.idx}),d=m.definition.concat([g],ue(h)),x={idx:S,def:d,ruleStack:T,occurrenceStack:y};l.push(x)}else if(m instanceof J){let g=new M({terminalType:m.separator}),d=new k({definition:[g].concat(m.definition),idx:m.idx}),x=m.definition.concat([d],ue(h)),_={idx:S,def:x,ruleStack:T,occurrenceStack:y};l.push(_)}else if(m instanceof V){let g={idx:S,def:ue(h),ruleStack:T,occurrenceStack:y};l.push(g),l.push("EXIT_ALTERNATIVE");let d=new M({terminalType:m.separator}),x=new k({definition:[d].concat(m.definition),idx:m.idx}),_=m.definition.concat([x],ue(h)),at={idx:S,def:_,ruleStack:T,occurrenceStack:y};l.push(at)}else if(m instanceof k){let g={idx:S,def:ue(h),ruleStack:T,occurrenceStack:y};l.push(g),l.push("EXIT_ALTERNATIVE");let d=new k({definition:m.definition,idx:m.idx}),x=m.definition.concat([d],ue(h)),_={idx:S,def:x,ruleStack:T,occurrenceStack:y};l.push(_)}else if(m instanceof q)for(let g=m.definition.length-1;g>=0;g--){let d=m.definition[g],x={idx:S,def:d.definition.concat(ue(h)),ruleStack:T,occurrenceStack:y};l.push(x),l.push("EXIT_ALTERNATIVE")}else if(m instanceof z)l.push({idx:S,def:m.definition.concat(ue(h)),ruleStack:T,occurrenceStack:y});else if(m instanceof Ke)l.push(UN(m,S,T,y));else throw Error("non exhaustive match")}return c}function UN(e,t,r,n){let i=W(r);i.push(e.name);let o=W(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var te;(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"})(te||(te={}));function Ai(e){if(e instanceof F||e==="Option")return te.OPTION;else if(e instanceof k||e==="Repetition")return te.REPETITION;else if(e instanceof X||e==="RepetitionMandatory")return te.REPETITION_MANDATORY;else if(e instanceof J||e==="RepetitionMandatoryWithSeparator")return te.REPETITION_MANDATORY_WITH_SEPARATOR;else if(e instanceof V||e==="RepetitionWithSeparator")return te.REPETITION_WITH_SEPARATOR;else if(e instanceof q||e==="Alternation")return te.ALTERNATION;else throw Error("non exhaustive match")}function ra(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,o=Ai(n);if(o===te.ALTERNATION)return Mn(t,r,i);else return vn(t,r,o,i)}function jm(e,t,r,n,i,o){let a=Mn(e,t,r),s=Ym(a)?Pn:_t;return o(a,n,s,i)}function Gm(e,t,r,n,i,o){let a=vn(e,t,i,r),s=Ym(a)?Pn:_t;return o(a[0],s,n)}function Km(e,t,r,n){let i=e.length,o=Ne(e,(a)=>Ne(a,(s)=>s.length===1));if(t)return function(a){let s=L(a,(f)=>f.GATE);for(let f=0;f<i;f++){let u=e[f],c=u.length,l=s[f];if(l!==void 0&&l.call(this)===!1)continue;e:for(let p=0;p<c;p++){let h=u[p],S=h.length;for(let T=0;T<S;T++){let y=this.LA(T+1);if(r(y,h[T])===!1)continue e}return f}}return};else if(o&&!n){let a=L(e,(f)=>ge(f)),s=me(a,(f,u,c)=>(O(u,(l)=>{if(!U(f,l.tokenTypeIdx))f[l.tokenTypeIdx]=c;O(l.categoryMatches,(p)=>{if(!U(f,p))f[p]=c})}),f),{});return function(){let f=this.LA(1);return s[f.tokenTypeIdx]}}else return function(){for(let a=0;a<i;a++){let s=e[a],f=s.length;e:for(let u=0;u<f;u++){let c=s[u],l=c.length;for(let p=0;p<l;p++){let h=this.LA(p+1);if(r(h,c[p])===!1)continue e}return a}}return}}function Hm(e,t,r){let n=Ne(e,(o)=>o.length===1),i=e.length;if(n&&!r){let o=ge(e);if(o.length===1&&P(o[0].categoryMatches)){let s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=me(o,(s,f,u)=>(s[f.tokenTypeIdx]=!0,O(f.categoryMatches,(c)=>{s[c]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let o=0;o<i;o++){let a=e[o],s=a.length;for(let f=0;f<s;f++){let u=this.LA(f+1);if(t(u,a[f])===!1)continue e}return!0}return!1}}class Wm extends hr{constructor(e,t,r){super();this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){if(e.idx===this.targetOccurrence&&this.targetProdType===t)return this.restDef=r.concat(n),!0;return!1}walkOption(e,t,r){if(!this.checkIsTarget(e,te.OPTION,t,r))super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){if(!this.checkIsTarget(e,te.REPETITION_MANDATORY,t,r))super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){if(!this.checkIsTarget(e,te.REPETITION_MANDATORY_WITH_SEPARATOR,t,r))super.walkOption(e,t,r)}walkMany(e,t,r){if(!this.checkIsTarget(e,te.REPETITION,t,r))super.walkOption(e,t,r)}walkManySep(e,t,r){if(!this.checkIsTarget(e,te.REPETITION_WITH_SEPARATOR,t,r))super.walkOption(e,t,r)}}class lf extends He{constructor(e,t,r){super();this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){if(e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef))this.result=e.definition}visitOption(e){this.checkIsTarget(e,te.OPTION)}visitRepetition(e){this.checkIsTarget(e,te.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,te.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,te.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,te.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,te.ALTERNATION)}}function Dm(e){let t=Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function cf(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],i=[];for(let o=0;o<t.length;o++){let a=t[o];i.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let f="_"+n.categoryMatches[s];i.push(a+f)}}t=i}return t}function NN(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let i=e[n];for(let o=0;o<t.length;o++){let a=t[o];if(i[a]===!0)return!1}}return!0}function Vm(e,t){let r=L(e,(a)=>ea([a],1)),n=Dm(r.length),i=L(r,(a)=>{let s={};return O(a,(f)=>{let u=cf(f.partialPath);O(u,(c)=>{s[c]=!0})}),s}),o=r;for(let a=1;a<=t;a++){let s=o;o=Dm(s.length);for(let f=0;f<s.length;f++){let u=s[f];for(let c=0;c<u.length;c++){let l=u[c].partialPath,p=u[c].suffixDef,h=cf(l);if(NN(i,h,f)||P(p)||l.length===t){let T=n[f];if(na(T,l)===!1){T.push(l);for(let y=0;y<h.length;y++){let m=h[y];i[f][m]=!0}}}else{let T=ea(p,a+1,l);o[f]=o[f].concat(T),O(T,(y)=>{let m=cf(y.partialPath);O(m,(g)=>{i[f][g]=!0})})}}}}return n}function Mn(e,t,r,n){let i=new lf(e,te.ALTERNATION,n);return t.accept(i),Vm(i.result,r)}function vn(e,t,r,n){let i=new lf(e,r);t.accept(i);let o=i.result,s=new Wm(t,e,r).startWalking(),f=new z({definition:o}),u=new z({definition:s});return Vm([f,u],n)}function na(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length!==t.length)continue;for(let i=0;i<n.length;i++){let o=t[i],a=n[i];if((o===a||a.categoryMatchesMap[o.tokenTypeIdx]!==void 0)===!1)continue e}return!0}return!1}function qm(e,t){return e.length<t.length&&Ne(e,(r,n)=>{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function Ym(e){return Ne(e,(t)=>Ne(t,(r)=>Ne(r,(n)=>P(n.categoryMatches))))}function zm(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return L(t,(r)=>Object.assign({type:Se.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Xm(e,t,r,n){let i=ke(e,(f)=>CN(f,r)),o=kN(e,t,r),a=ke(e,(f)=>PN(f,r)),s=ke(e,(f)=>bN(f,e,n,r));return i.concat(o,a,s)}function CN(e,t){let r=new Qm;e.accept(r);let n=r.allProductions,i=zs(n,IN),o=Ge(i,(s)=>s.length>1);return L(G(o),(s)=>{let f=xe(s),u=t.buildDuplicateFoundError(e,s),c=We(f),l={message:u,type:Se.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:f.idx},p=Jm(f);if(p)l.parameter=p;return l})}function IN(e){return`${We(e)}_#_${e.idx}_#_${Jm(e)}`}function Jm(e){if(e instanceof M)return e.terminalType.name;else if(e instanceof B)return e.nonTerminalName;else return""}class Qm extends He{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 bN(e,t,r,n){let i=[];if(me(t,(a,s)=>{if(s.name===e.name)return a+1;return a},0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:Se.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Zm(e,t,r){let n=[],i;if(!Z(t,e))i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:Se.INVALID_RULE_OVERRIDE,ruleName:e});return n}function pf(e,t,r,n=[]){let i=[],o=ia(t.definition);if(P(o))return[];else{let a=e.name;if(Z(o,e))i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Se.LEFT_RECURSION,ruleName:a});let f=lr(o,n.concat([e])),u=ke(f,(c)=>{let l=W(n);return l.push(c),pf(e,c,r,l)});return i.concat(u)}}function ia(e){let t=[];if(P(e))return t;let r=xe(e);if(r instanceof B)t.push(r.referencedRule);else if(r instanceof z||r instanceof F||r instanceof X||r instanceof J||r instanceof V||r instanceof k)t=t.concat(ia(r.definition));else if(r instanceof q)t=ge(L(r.definition,(o)=>ia(o.definition)));else if(r instanceof M);else throw Error("non exhaustive match");let n=Fr(r),i=e.length>1;if(n&&i){let o=ue(e);return t.concat(ia(o))}else return t}class oa extends He{constructor(){super(...arguments);this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function $m(e,t){let r=new oa;e.accept(r);let n=r.alternations;return ke(n,(o)=>{let a=kt(o.definition);return ke(a,(s,f)=>{let u=ta([s],[],_t,1);if(P(u))return[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:o,emptyChoiceIdx:f}),type:Se.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:o.idx,alternative:f+1}];else return[]})})}function ed(e,t,r){let n=new oa;e.accept(n);let i=n.alternations;return i=dr(i,(a)=>a.ignoreAmbiguities===!0),ke(i,(a)=>{let s=a.idx,f=a.maxLookahead||t,u=Mn(s,e,f,a),c=MN(u,a,e,r),l=vN(u,a,e,r);return c.concat(l)})}class td extends He{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 PN(e,t){let r=new oa;e.accept(r);let n=r.alternations;return ke(n,(o)=>{if(o.definition.length>255)return[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:o}),type:Se.TOO_MANY_ALTS,ruleName:e.name,occurrence:o.idx}];else return[]})}function rd(e,t,r){let n=[];return O(e,(i)=>{let o=new td;i.accept(o);let a=o.allProductions;O(a,(s)=>{let f=Ai(s),u=s.maxLookahead||t,c=s.idx,p=vn(c,i,f,u)[0];if(P(ge(p))){let h=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:h,type:Se.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function MN(e,t,r,n){let i=[],o=me(e,(s,f,u)=>{if(t.definition[u].ignoreAmbiguities===!0)return s;return O(f,(c)=>{let l=[u];if(O(e,(p,h)=>{if(u!==h&&na(p,c)&&t.definition[h].ignoreAmbiguities!==!0)l.push(h)}),l.length>1&&!na(i,c))i.push(c),s.push({alts:l,path:c})}),s},[]);return L(o,(s)=>{let f=L(s.alts,(c)=>c+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:f,prefixPath:s.path}),type:Se.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function vN(e,t,r,n){let i=me(e,(a,s,f)=>{let u=L(s,(c)=>({idx:f,path:c}));return a.concat(u)},[]);return Tt(ke(i,(a)=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let{idx:f,path:u}=a,c=Ce(i,(p)=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<f&&qm(p.path,u));return L(c,(p)=>{let h=[p.idx+1,f+1],S=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:h,prefixPath:p.path}),type:Se.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:S,alternatives:h}})}))}function kN(e,t,r){let n=[],i=L(t,(o)=>o.name);return O(e,(o)=>{let a=o.name;if(Z(i,a)){let s=r.buildNamespaceConflictError(o);n.push({message:s,type:Se.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function nd(e){let t=gn(e,{errMsgProvider:_m}),r={};return O(e.rules,(n)=>{r[n.name]=n}),wm(r,t.errMsgProvider)}function id(e){return e=gn(e,{errMsgProvider:ct}),Xm(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var od="MismatchedTokenException",ad="NoViableAltException",sd="EarlyExitException",fd="NotAllInputParsedException",ud=[od,ad,sd,fd];Object.freeze(ud);function Ut(e){return Z(ud,e.name)}class Ui extends Error{constructor(e,t){super(e);if(this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}}class kn extends Ui{constructor(e,t,r){super(e,t);this.previousToken=r,this.name=od}}class aa extends Ui{constructor(e,t,r){super(e,t);this.previousToken=r,this.name=ad}}class sa extends Ui{constructor(e,t){super(e,t);this.name=fd}}class fa extends Ui{constructor(e,t,r){super(e,t);this.previousToken=r,this.name=sd}}var mf={},df="InRuleRecoveryException";class cd extends Error{constructor(e){super(e);this.name=df}}class hf{initRecoverable(e){if(this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=U(e,"recoveryEnabled")?e.recoveryEnabled:_e.recoveryEnabled,this.recoveryEnabled)this.attemptInRepetitionRecovery=_N}getTokenToInsert(e){let t=Wr(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),o=this.exportLexerState(),a=[],s=!1,f=this.LA(1),u=this.LA(1),c=()=>{let l=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:f,previous:l,ruleName:this.getCurrRuleFullName()}),h=new kn(p,f,this.LA(0));h.resyncedTokens=kt(a),this.SAVE_ERROR(h)};while(!s)if(this.tokenMatcher(u,n)){c();return}else if(r.call(this)){c(),e.apply(this,t);return}else if(this.tokenMatcher(u,i))s=!0;else u=this.SKIP_TOKEN(),this.addToResyncTokens(u,a);this.importLexerState(o)}shouldInRepetitionRecoveryBeTried(e,t,r){if(r===!1)return!1;if(this.tokenMatcher(this.LA(1),e))return!1;if(this.isBackTracking())return!1;if(this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))return!1;return!0}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new cd("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(P(t))return!1;let r=this.LA(1);return Lt(t,(i)=>this.tokenMatcher(r,i))!==void 0}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return Z(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;while(!0){let n=Lt(e,(i)=>I(t,i));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return mf;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return L(e,(r,n)=>{if(n===0)return mf;return{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])}})}flattenFollowSet(){let e=L(this.buildFullFollowKeyStack(),(t)=>this.getFollowSetFromFollowKey(t));return ge(e)}getFollowSetFromFollowKey(e){if(e===mf)return[Ye];let t=e.ruleName+e.idxInCallingRule+Ko+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){if(!this.tokenMatcher(e,Ye))t.push(e);return t}reSyncTo(e){let t=[],r=this.LA(1);while(this.tokenMatcher(r,e)===!1)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return kt(t)}attemptInRepetitionRecovery(e,t,r,n,i,o,a){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=W(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return L(this.RULE_STACK,(e)=>this.shortRuleNameToFullName(e))}}function _N(e,t,r,n,i,o,a){let s=this.getKeyForAutomaticLookahead(n,i),f=this.firstAfterRepMap[s];if(f===void 0){let p=this.getCurrRuleFullName(),h=this.getGAstProductions()[p];f=new o(h,i).startWalking(),this.firstAfterRepMap[s]=f}let{token:u,occurrence:c,isEndOfRule:l}=f;if(this.RULE_STACK.length===1&&l&&u===void 0)u=Ye,c=1;if(u===void 0||c===void 0)return;if(this.shouldInRepetitionRecoveryBeTried(u,c,a))this.tryInRepetitionRecovery(e,t,r,u)}var ld=4,ua=8;var ca=256,la=512,Ni=768,Ci=1024,Ii=1280,_n=1536;function pa(e,t,r){return r|t|e}class wn{constructor(e){var t;this.maxLookahead=(t=e===null||e===void 0?void 0:e.maxLookahead)!==null&&t!==void 0?t:_e.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(P(t)){let r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...i]}return t}validateNoLeftRecursion(e){return ke(e,(t)=>pf(t,t,ct))}validateEmptyOrAlternatives(e){return ke(e,(t)=>$m(t,ct))}validateAmbiguousAlternationAlternatives(e,t){return ke(e,(r)=>ed(r,t,ct))}validateSomeNonEmptyLookaheadPath(e,t){return rd(e,t,ct)}buildLookaheadForAlternation(e){return jm(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Km)}buildLookaheadForOptional(e){return Gm(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Ai(e.prodType),Hm)}}class gf{initLooksAhead(e){this.dynamicTokensEnabled=U(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:_e.dynamicTokensEnabled,this.maxLookahead=U(e,"maxLookahead")?e.maxLookahead:_e.maxLookahead,this.lookaheadStrategy=U(e,"lookaheadStrategy")?e.lookaheadStrategy:new wn({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){O(e,(t)=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:i,repetitionMandatory:o,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:s}=wN(t);O(r,(f)=>{let u=f.idx===0?"":f.idx;this.TRACE_INIT(`${We(f)}${u}`,()=>{let c=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:f.idx,rule:t,maxLookahead:f.maxLookahead||this.maxLookahead,hasPredicates:f.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),l=pa(this.fullRuleNameToShort[t.name],ca,f.idx);this.setLaFuncCache(l,c)})}),O(n,(f)=>{this.computeLookaheadFunc(t,f.idx,Ni,"Repetition",f.maxLookahead,We(f))}),O(i,(f)=>{this.computeLookaheadFunc(t,f.idx,la,"Option",f.maxLookahead,We(f))}),O(o,(f)=>{this.computeLookaheadFunc(t,f.idx,Ci,"RepetitionMandatory",f.maxLookahead,We(f))}),O(a,(f)=>{this.computeLookaheadFunc(t,f.idx,_n,"RepetitionMandatoryWithSeparator",f.maxLookahead,We(f))}),O(s,(f)=>{this.computeLookaheadFunc(t,f.idx,Ii,"RepetitionWithSeparator",f.maxLookahead,We(f))})})})}computeLookaheadFunc(e,t,r,n,i,o){this.TRACE_INIT(`${o}${t===0?"":t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=pa(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(s,a)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return pa(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class pd extends He{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)}}var ma=new pd;function wN(e){ma.reset(),e.accept(ma);let t=ma.dslMethods;return ma.reset(),t}function Ef(e,t){if(isNaN(e.startOffset)===!0)e.startOffset=t.startOffset,e.endOffset=t.endOffset;else if(e.endOffset<t.endOffset===!0)e.endOffset=t.endOffset}function Sf(e,t){if(isNaN(e.startOffset)===!0)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===!0)e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine}function md(e,t,r){if(e.children[r]===void 0)e.children[r]=[t];else e.children[r].push(t)}function dd(e,t,r){if(e.children[t]===void 0)e.children[t]=[r];else e.children[t].push(r)}function Tf(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function BN(e,t){let r=K(e),n=r.length;for(let i=0;i<n;i++){let o=r[i],a=e[o],s=a.length;for(let f=0;f<s;f++){let u=a[f];if(u.tokenTypeIdx===void 0)this[u.name](u.children,t)}}}function hd(e,t){let r=function(){};Tf(r,e+"BaseSemantics");let n={visit:function(i,o){if(N(i))i=i[0];if(Ie(i))return;return this[i.name](i.children,o)},validateVisitor:function(){let i=FN(this,t);if(!P(i)){let o=L(i,(a)=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
125
- ${o.join(`
126
-
127
- `).replace(/\n/g,`
128
- `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function gd(e,t,r){let n=function(){};Tf(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return O(t,(o)=>{i[o]=BN}),n.prototype=i,n.prototype.constructor=n,n}var yf;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(yf||(yf={}));function FN(e,t){return DN(e,t)}function DN(e,t){let r=Ce(t,(i)=>ve(e[i])===!1),n=L(r,(i)=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:yf.MISSING_METHOD,methodName:i}));return Tt(n)}class xf{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=U(e,"nodeLocationTracking")?e.nodeLocationTracking:_e.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ne,this.cstFinallyStateUpdate=ne,this.cstPostTerminal=ne,this.cstPostNonTerminal=ne,this.cstPostRule=ne;else if(/full/i.test(this.nodeLocationTracking))if(this.recoveryEnabled)this.setNodeLocationFromToken=Sf,this.setNodeLocationFromNode=Sf,this.cstPostRule=ne,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery;else this.setNodeLocationFromToken=ne,this.setNodeLocationFromNode=ne,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular;else if(/onlyOffset/i.test(this.nodeLocationTracking))if(this.recoveryEnabled)this.setNodeLocationFromToken=Ef,this.setNodeLocationFromNode=Ef,this.cstPostRule=ne,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery;else this.setNodeLocationFromToken=ne,this.setNodeLocationFromNode=ne,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular;else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ne,this.setNodeLocationFromNode=ne,this.cstPostRule=ne,this.setInitialNodeLocation=ne;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){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;if(r.startOffset<=t.startOffset===!0)r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn;else r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;if(r.startOffset<=t.startOffset===!0)r.endOffset=t.endOffset;else r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];md(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];dd(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(Ie(this.baseCstVisitorConstructor)){let e=hd(this.className,K(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ie(this.baseCstVisitorWithDefaultsConstructor)){let e=gd(this.className,K(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class Rf{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){if(this.currIdx<=this.tokVector.length-2)return this.consumeToken(),this.LA(1);else return Bn}LA(e){let t=this.currIdx+e;if(t<0||this.tokVectorLength<=t)return Bn;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 Lf{ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}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,r=Fn){if(Z(this.definedRulesNames,e)){let o={message:ct.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Se.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=Fn){let n=Zm(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let i=this.defineRule(e,t,r);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(Ut(n))return!1;else throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Go(G(this.gastProductionsCache))}}class Of{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Pn,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},U(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
129
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
130
- For Further details.`);if(N(e)){if(P(e))throw Error(`A Token Vocabulary cannot be empty.
131
- Note that the first argument for the parser constructor
132
- is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
133
- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
134
- For Further details.`)}if(N(e))this.tokensMap=me(e,(i,o)=>(i[o.name]=o,i),{});else if(U(e,"modes")&&Ne(ge(G(e.modes)),Um)){let i=ge(G(e.modes)),o=On(i);this.tokensMap=me(o,(a,s)=>(a[s.name]=s,a),{})}else if(re(e))this.tokensMap=W(e);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Ye;let r=U(e,"modes")?ge(G(e.modes)):G(e),n=Ne(r,(i)=>P(i.categoryMatches));this.tokenMatcher=n?Pn:_t,wt(G(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
135
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=U(r,"resyncEnabled")?r.resyncEnabled:Fn.resyncEnabled,i=U(r,"recoveryValueFunc")?r.recoveryValueFunc:Fn.recoveryValueFunc,o=this.ruleShortNameIdx<<ld+ua;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=e,this.fullRuleNameToShort[e]=o;let a;if(this.outputCst===!0)a=function(...u){try{this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,u);let c=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(c),c}catch(c){return this.invokeRuleCatch(c,n,i)}finally{this.ruleFinallyStateUpdate()}};else a=function(...u){try{return this.ruleInvocationStateUpdate(o,e,this.subruleIdx),t.apply(this,u)}catch(c){return this.invokeRuleCatch(c,n,i)}finally{this.ruleFinallyStateUpdate()}};return Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){let n=this.RULE_STACK.length===1,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Ut(e)){let o=e;if(i){let a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))if(o.resyncedTokens=this.reSyncTo(a),this.outputCst){let s=this.CST_STACK[this.CST_STACK.length-1];return s.recoveredNode=!0,s}else return r(e);else{if(this.outputCst){let s=this.CST_STACK[this.CST_STACK.length-1];s.recoveredNode=!0,o.partialCstResult=s}throw o}}else if(n)return this.moveToTerminatedState(),r(e);else throw o}else throw e}optionInternal(e,t){let r=this.getKeyForAutomaticLookahead(la,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof e!=="function"){i=e.DEF;let o=e.GATE;if(o!==void 0){let a=n;n=()=>o.call(this)&&a.call(this)}}else i=e;if(n.call(this)===!0)return i.call(this);return}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(Ci,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!=="function"){i=t.DEF;let o=t.GATE;if(o!==void 0){let a=n;n=()=>o.call(this)&&a.call(this)}}else i=t;if(n.call(this)===!0){let o=this.doSingleRepetition(i);while(n.call(this)===!0&&o===!0)o=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,te.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,Ci,e,uf)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(_n,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let{DEF:n,SEP:i}=t;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let a=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===!0)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,a,n,$o],a,_n,e,$o)}else throw this.raiseEarlyExitException(e,te.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(Ni,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!=="function"){i=t.DEF;let a=t.GATE;if(a!==void 0){let s=n;n=()=>a.call(this)&&s.call(this)}}else i=t;let o=!0;while(n.call(this)===!0&&o===!0)o=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,Ni,e,ff,o)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(Ii,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let{DEF:n,SEP:i}=t;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let a=()=>this.tokenMatcher(this.LA(1),i);while(this.tokenMatcher(this.LA(1),i)===!0)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,a,n,Zo],a,Ii,e,Zo)}}repetitionSepSecondInternal(e,t,r,n,i){while(r())this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,_n,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(ca,t),n=N(e)?e:e.DEF,o=this.getLaFuncFromCache(r).call(this,n);if(o!==void 0)return n[o].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new sa(t,e))}}subruleInternal(e,t,r){let n;try{let i=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(i){throw this.subruleInternalError(i,r,e.ruleName)}}subruleInternalError(e,t,r){if(Ut(e)&&e.partialCstResult!==void 0)this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult;throw e}consumeInternal(e,t,r){let n;try{let i=this.LA(1);if(this.tokenMatcher(i,e)===!0)this.consumeToken(),n=i;else this.consumeInternalError(e,i,r)}catch(i){n=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,i=this.LA(0);if(r!==void 0&&r.ERR_MSG)n=r.ERR_MSG;else n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new kn(n,t,i))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(i){if(i.name===df)throw r;else throw i}}else throw r}saveRecogState(){let e=this.errors,t=W(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,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Ye)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class Af{initErrorHandler(e){this._errors=[],this.errorMessageProvider=U(e,"errorMessageProvider")?e.errorMessageProvider:_e.errorMessageProvider}SAVE_ERROR(e){if(Ut(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:W(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;else throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return W(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=vn(e,i,t,this.maxLookahead)[0],s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let f=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:s,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new fa(f,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],i=Mn(e,n,this.maxLookahead),o=[];for(let f=1;f<=this.maxLookahead;f++)o.push(this.LA(f));let a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:o,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new aa(s,this.LA(1),a))}}class Uf{initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(Ie(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return ta([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=xe(e.ruleStack),n=this.getGAstProductions()[t];return new sf(n,e).startWalking()}}var ha={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ha);var Ed=!0,Sd=Math.pow(2,ua)-1,yd=Hr({name:"RECORDING_PHASE_TOKEN",pattern:D.NA});wt([yd]);var xd=Wr(yd,`This IToken indicates the Parser is in Recording Phase
136
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(xd);var jN={name:`This CSTNode indicates the Parser is in Recording Phase
137
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class Nf{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},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=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}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()=>!0}LA_RECORD(e){return Bn}topLevelRuleRecord(e,t){try{let r=new Ke({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+`
138
- This error was thrown during the "grammar recording phase" For more info see:
139
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(n){throw r}throw r}}optionInternalRecord(e,t){return bi.call(this,F,e,t)}atLeastOneInternalRecord(e,t){bi.call(this,X,t,e)}atLeastOneSepFirstInternalRecord(e,t){bi.call(this,J,t,e,Ed)}manyInternalRecord(e,t){bi.call(this,k,t,e)}manySepFirstInternalRecord(e,t){bi.call(this,V,t,e,Ed)}orInternalRecord(e,t){return GN.call(this,e,t)}subruleInternalRecord(e,t,r){if(da(t),!e||U(e,"ruleName")===!1){let a=Error(`<SUBRULE${Td(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
140
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let n=Ot(this.recordingProdStack),i=e.ruleName,o=new B({idx:t,nonTerminalName:i,label:r===null||r===void 0?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(o),this.outputCst?jN:ha}consumeInternalRecord(e,t,r){if(da(t),!nf(e)){let o=Error(`<CONSUME${Td(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
141
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let n=Ot(this.recordingProdStack),i=new M({idx:t,terminalType:e,label:r===null||r===void 0?void 0:r.LABEL});return n.definition.push(i),xd}}function bi(e,t,r,n=!1){da(r);let i=Ot(this.recordingProdStack),o=ve(t)?t:t.DEF,a=new e({definition:[],idx:r});if(n)a.separator=t.SEP;if(U(t,"MAX_LOOKAHEAD"))a.maxLookahead=t.MAX_LOOKAHEAD;return this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),ha}function GN(e,t){da(t);let r=Ot(this.recordingProdStack),n=N(e)===!1,i=n===!1?e:e.DEF,o=new q({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});if(U(e,"MAX_LOOKAHEAD"))o.maxLookahead=e.MAX_LOOKAHEAD;let a=hi(i,(s)=>ve(s.GATE));return o.hasPredicates=a,r.definition.push(o),O(i,(s)=>{let f=new z({definition:[]});if(o.definition.push(f),U(s,"IGNORE_AMBIGUITIES"))f.ignoreAmbiguities=s.IGNORE_AMBIGUITIES;else if(U(s,"GATE"))f.ignoreAmbiguities=!0;this.recordingProdStack.push(f),s.ALT.call(this),this.recordingProdStack.pop()}),ha}function Td(e){return e===0?"":`${e}`}function da(e){if(e<0||e>Sd){let t=Error(`Invalid DSL Method idx value: <${e}>
142
- Idx value must be a none negative value smaller than ${Sd+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}class Cf{initPerformanceTracer(e){if(U(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t==="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=_e.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent)console.log(`${r}--> <${e}>`);let{time:n,value:i}=Ei(t),o=n>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent)o(`${r}<-- <${e}> time: ${n}ms`);return this.traceInitIndent--,i}else return t()}}function Rd(e,t){t.forEach((r)=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach((i)=>{if(i==="constructor")return;let o=Object.getOwnPropertyDescriptor(n,i);if(o&&(o.get||o.set))Object.defineProperty(e.prototype,i,o);else e.prototype[i]=r.prototype[i]})})}var Bn=Wr(Ye,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bn);var _e=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Qo,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Fn=Object.freeze({recoveryValueFunc:()=>{return},resyncEnabled:!0}),Se;(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"})(Se||(Se={}));class Pi{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=!0;let t=this.className;this.TRACE_INIT("toFastProps",()=>{Si(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),O(this.definedRulesNames,(n)=>{let o=this[n].originalGrammarAction,a;this.TRACE_INIT(`${n} Rule`,()=>{a=this.topLevelRuleRecord(n,o)}),this.gastProductionsCache[n]=a})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=nd({rules:G(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(P(r)&&this.skipValidations===!1){let n=id({rules:G(this.gastProductionsCache),tokenTypes:G(this.tokensMap),errMsgProvider:ct,grammarName:t}),i=zm({lookaheadStrategy:this.lookaheadStrategy,rules:G(this.gastProductionsCache),tokenTypes:G(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,i)}}),P(this.definitionErrors)){if(this.recoveryEnabled)this.TRACE_INIT("computeAllProdsFollows",()=>{let n=om(G(this.gastProductionsCache));this.resyncFollows=n});this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var n,i;(i=(n=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(n,{rules:G(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(G(this.gastProductionsCache))})}if(!Pi.DEFER_DEFINITION_ERRORS_HANDLING&&!P(this.definitionErrors))throw e=L(this.definitionErrors,(n)=>n.message),Error(`Parser Definition Errors detected:
143
- ${e.join(`
144
- -------------------------------
145
- `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),U(t,"ignoredIssues"))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
146
- Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
147
- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
148
- For further details.`);this.skipValidations=U(t,"skipValidations")?t.skipValidations:_e.skipValidations}}Pi.DEFER_DEFINITION_ERRORS_HANDLING=!1;Rd(Pi,[hf,gf,xf,Rf,Of,Lf,Af,Uf,Nf,Cf]);class ga extends Pi{constructor(e,t=_e){let r=W(t);r.outputCst=!0;super(e,r)}}var ag=TS(ig(),1);var Mf=(e,t)=>{for(let r=0;r<t.length;r++){let n=t[r],i=n[0],o=n[1];for(let a=i;a<=o;a++)e.add(a)}},ki=new Set([181,257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,314,316,318,320,322,324,326,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,378,380,387,389,392,402,405,414,417,419,421,424,429,432,436,438,454,457,460,462,464,466,468,470,472,474,479,481,483,485,487,489,491,493,499,501,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,545,547,549,551,553,555,557,559,561,572,578,583,585,587,589,881,883,887,912,985,987,989,991,993,995,997,999,1001,1003,1005,1013,1016,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1218,1220,1222,1224,1226,1228,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,1301,1303,1305,1307,1309,1311,1313,1315,1317,1319,1321,1323,1325,1327,7681,7683,7685,7687,7689,7691,7693,7695,7697,7699,7701,7703,7705,7707,7709,7711,7713,7715,7717,7719,7721,7723,7725,7727,7729,7731,7733,7735,7737,7739,7741,7743,7745,7747,7749,7751,7753,7755,7757,7759,7761,7763,7765,7767,7769,7771,7773,7775,7777,7779,7781,7783,7785,7787,7789,7791,7793,7795,7797,7799,7801,7803,7805,7807,7809,7811,7813,7815,7817,7819,7821,7823,7825,7827,7839,7841,7843,7845,7847,7849,7851,7853,7855,7857,7859,7861,7863,7865,7867,7869,7871,7873,7875,7877,7879,7881,7883,7885,7887,7889,7891,7893,7895,7897,7899,7901,7903,7905,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,7931,7933,8126,8458,8467,8495,8500,8505,8526,8580,11361,11368,11370,11372,11377,11393,11395,11397,11399,11401,11403,11405,11407,11409,11411,11413,11415,11417,11419,11421,11423,11425,11427,11429,11431,11433,11435,11437,11439,11441,11443,11445,11447,11449,11451,11453,11455,11457,11459,11461,11463,11465,11467,11469,11471,11473,11475,11477,11479,11481,11483,11485,11487,11489,11500,11502,11507,11559,11565,42561,42563,42565,42567,42569,42571,42573,42575,42577,42579,42581,42583,42585,42587,42589,42591,42593,42595,42597,42599,42601,42603,42605,42625,42627,42629,42631,42633,42635,42637,42639,42641,42643,42645,42647,42649,42651,42787,42789,42791,42793,42795,42797,42803,42805,42807,42809,42811,42813,42815,42817,42819,42821,42823,42825,42827,42829,42831,42833,42835,42837,42839,42841,42843,42845,42847,42849,42851,42853,42855,42857,42859,42861,42863,42874,42876,42879,42881,42883,42885,42887,42892,42894,42897,42903,42905,42907,42909,42911,42913,42915,42917,42919,42921,42927,42933,42935,42937,42939,42941,42943,42947,43002,119995,120779,748,750,884,890,1369,1600,2042,2074,2084,2088,2417,3654,3782,4348,6103,6211,6823,7544,8305,8319,11631,11823,12293,12347,40981,42508,42623,42864,42888,43471,43494,43632,43741,65392,94179,125259,170,186,443,660,1749,1791,1808,1969,2365,2384,2482,2493,2510,2556,2654,2749,2768,2809,2877,2929,2947,2972,3024,3133,3200,3261,3294,3389,3406,3517,3716,3749,3773,3840,4159,4193,4238,4696,4800,6108,6314,7418,12294,12348,12447,12543,13312,19968,42606,42895,42999,43259,43642,43697,43712,43714,43762,44032,64285,64318,67592,67644,68096,69415,69956,70006,70106,70108,70280,70461,70480,70751,70855,71236,71352,71935,72161,72163,72192,72250,72272,72349,72768,73030,73112,94032,94208,123214,126500,126503,126521,126523,126530,126535,126537,126539,126548,126551,126553,126555,126557,126559,126564,126590,131072,173824,177984,178208,183984,453,456,459,498,8124,8140,8188,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,313,315,317,319,321,323,325,327,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,379,381,388,418,420,425,428,437,444,452,455,458,461,463,465,467,469,471,473,475,478,480,482,484,486,488,490,492,494,497,500,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,577,584,586,588,590,880,882,886,895,902,908,975,984,986,988,990,992,994,996,998,1000,1002,1004,1006,1012,1015,1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1162,1164,1166,1168,1170,1172,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212,1214,1219,1221,1223,1225,1227,1229,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310,1312,1314,1316,1318,1320,1322,1324,1326,4295,4301,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,8025,8027,8029,8031,8450,8455,8469,8484,8486,8488,8517,8579,11360,11367,11369,11371,11378,11381,11394,11396,11398,11400,11402,11404,11406,11408,11410,11412,11414,11416,11418,11420,11422,11424,11426,11428,11430,11432,11434,11436,11438,11440,11442,11444,11446,11448,11450,11452,11454,11456,11458,11460,11462,11464,11466,11468,11470,11472,11474,11476,11478,11480,11482,11484,11486,11488,11490,11499,11501,11506,42560,42562,42564,42566,42568,42570,42572,42574,42576,42578,42580,42582,42584,42586,42588,42590,42592,42594,42596,42598,42600,42602,42604,42624,42626,42628,42630,42632,42634,42636,42638,42640,42642,42644,42646,42648,42650,42786,42788,42790,42792,42794,42796,42798,42802,42804,42806,42808,42810,42812,42814,42816,42818,42820,42822,42824,42826,42828,42830,42832,42834,42836,42838,42840,42842,42844,42846,42848,42850,42852,42854,42856,42858,42860,42862,42873,42875,42880,42882,42884,42886,42891,42893,42896,42898,42902,42904,42906,42908,42910,42912,42914,42916,42918,42920,42934,42936,42938,42940,42942,42946,119964,119970,120134,120778,12295,66369,66378,36,1423,1547,2555,2801,3065,3647,6107,43064,65020,65129,65284,123647,126128,95,8276,65343]),sb=[[97,122],[223,246],[248,255],[311,312],[328,329],[382,384],[396,397],[409,411],[426,427],[441,442],[445,447],[476,477],[495,496],[563,569],[575,576],[591,659],[661,687],[891,893],[940,974],[976,977],[981,983],[1007,1011],[1019,1020],[1072,1119],[1230,1231],[1376,1416],[4304,4346],[4349,4351],[5112,5117],[7296,7304],[7424,7467],[7531,7543],[7545,7578],[7829,7837],[7935,7943],[7952,7957],[7968,7975],[7984,7991],[8000,8005],[8016,8023],[8032,8039],[8048,8061],[8064,8071],[8080,8087],[8096,8103],[8112,8116],[8118,8119],[8130,8132],[8134,8135],[8144,8147],[8150,8151],[8160,8167],[8178,8180],[8182,8183],[8462,8463],[8508,8509],[8518,8521],[11312,11358],[11365,11366],[11379,11380],[11382,11387],[11491,11492],[11520,11557],[42799,42801],[42865,42872],[42899,42901],[43824,43866],[43872,43879],[43888,43967],[64256,64262],[64275,64279],[65345,65370],[66600,66639],[66776,66811],[68800,68850],[71872,71903],[93792,93823],[119834,119859],[119886,119892],[119894,119911],[119938,119963],[119990,119993],[119997,120003],[120005,120015],[120042,120067],[120094,120119],[120146,120171],[120198,120223],[120250,120275],[120302,120327],[120354,120379],[120406,120431],[120458,120485],[120514,120538],[120540,120545],[120572,120596],[120598,120603],[120630,120654],[120656,120661],[120688,120712],[120714,120719],[120746,120770],[120772,120777],[125218,125251],[688,705],[710,721],[736,740],[1765,1766],[2036,2037],[7288,7293],[7468,7530],[7579,7615],[8336,8348],[11388,11389],[12337,12341],[12445,12446],[12540,12542],[42232,42237],[42652,42653],[42775,42783],[43000,43001],[43763,43764],[43868,43871],[65438,65439],[92992,92995],[94099,94111],[94176,94177],[123191,123197],[13313,19893],[19969,40943],[44033,55203],[94209,100343],[131073,173782],[173825,177972],[177985,178205],[178209,183969],[183985,191456],[448,451],[1488,1514],[1519,1522],[1568,1599],[1601,1610],[1646,1647],[1649,1747],[1774,1775],[1786,1788],[1810,1839],[1869,1957],[1994,2026],[2048,2069],[2112,2136],[2144,2154],[2208,2228],[2230,2237],[2308,2361],[2392,2401],[2418,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2486,2489],[2524,2525],[2527,2529],[2544,2545],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2674,2676],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2784,2785],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2908,2909],[2911,2913],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3160,3162],[3168,3169],[3205,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3296,3297],[3313,3314],[3333,3340],[3342,3344],[3346,3386],[3412,3414],[3423,3425],[3450,3455],[3461,3478],[3482,3505],[3507,3515],[3520,3526],[3585,3632],[3634,3635],[3648,3653],[3713,3714],[3718,3722],[3724,3747],[3751,3760],[3762,3763],[3776,3780],[3804,3807],[3904,3911],[3913,3948],[3976,3980],[4096,4138],[4176,4181],[4186,4189],[4197,4198],[4206,4208],[4213,4225],[4352,4680],[4682,4685],[4688,4694],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4992,5007],[5121,5740],[5743,5759],[5761,5786],[5792,5866],[5873,5880],[5888,5900],[5902,5905],[5920,5937],[5952,5969],[5984,5996],[5998,6000],[6016,6067],[6176,6210],[6212,6264],[6272,6276],[6279,6312],[6320,6389],[6400,6430],[6480,6509],[6512,6516],[6528,6571],[6576,6601],[6656,6678],[6688,6740],[6917,6963],[6981,6987],[7043,7072],[7086,7087],[7098,7141],[7168,7203],[7245,7247],[7258,7287],[7401,7404],[7406,7411],[7413,7414],[8501,8504],[11568,11623],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[12353,12438],[12449,12538],[12549,12591],[12593,12686],[12704,12730],[12784,12799],[40960,40980],[40982,42124],[42192,42231],[42240,42507],[42512,42527],[42538,42539],[42656,42725],[43003,43009],[43011,43013],[43015,43018],[43020,43042],[43072,43123],[43138,43187],[43250,43255],[43261,43262],[43274,43301],[43312,43334],[43360,43388],[43396,43442],[43488,43492],[43495,43503],[43514,43518],[43520,43560],[43584,43586],[43588,43595],[43616,43631],[43633,43638],[43646,43695],[43701,43702],[43705,43709],[43739,43740],[43744,43754],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43968,44002],[55216,55238],[55243,55291],[63744,64109],[64112,64217],[64287,64296],[64298,64310],[64312,64316],[64320,64321],[64323,64324],[64326,64433],[64467,64829],[64848,64911],[64914,64967],[65008,65019],[65136,65140],[65142,65276],[65382,65391],[65393,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[66176,66204],[66208,66256],[66304,66335],[66349,66368],[66370,66377],[66384,66421],[66432,66461],[66464,66499],[66504,66511],[66640,66717],[66816,66855],[66864,66915],[67072,67382],[67392,67413],[67424,67431],[67584,67589],[67594,67637],[67639,67640],[67647,67669],[67680,67702],[67712,67742],[67808,67826],[67828,67829],[67840,67861],[67872,67897],[67968,68023],[68030,68031],[68112,68115],[68117,68119],[68121,68149],[68192,68220],[68224,68252],[68288,68295],[68297,68324],[68352,68405],[68416,68437],[68448,68466],[68480,68497],[68608,68680],[68864,68899],[69376,69404],[69424,69445],[69600,69622],[69635,69687],[69763,69807],[69840,69864],[69891,69926],[69968,70002],[70019,70066],[70081,70084],[70144,70161],[70163,70187],[70272,70278],[70282,70285],[70287,70301],[70303,70312],[70320,70366],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70493,70497],[70656,70708],[70727,70730],[70784,70831],[70852,70853],[71040,71086],[71128,71131],[71168,71215],[71296,71338],[71424,71450],[71680,71723],[72096,72103],[72106,72144],[72203,72242],[72284,72329],[72384,72440],[72704,72712],[72714,72750],[72818,72847],[72960,72966],[72968,72969],[72971,73008],[73056,73061],[73063,73064],[73066,73097],[73440,73458],[73728,74649],[74880,75075],[77824,78894],[82944,83526],[92160,92728],[92736,92766],[92880,92909],[92928,92975],[93027,93047],[93053,93071],[93952,94026],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[123136,123180],[123584,123627],[124928,125124],[126464,126467],[126469,126495],[126497,126498],[126505,126514],[126516,126519],[126541,126543],[126545,126546],[126561,126562],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[194560,195101],[8072,8079],[8088,8095],[8104,8111],[65,90],[192,214],[216,222],[376,377],[385,386],[390,391],[393,395],[398,401],[403,404],[406,408],[412,413],[415,416],[422,423],[430,431],[433,435],[439,440],[502,504],[570,571],[573,574],[579,582],[904,906],[910,911],[913,929],[931,939],[978,980],[1017,1018],[1021,1071],[1216,1217],[1329,1366],[4256,4293],[5024,5109],[7312,7354],[7357,7359],[7944,7951],[7960,7965],[7976,7983],[7992,7999],[8008,8013],[8040,8047],[8120,8123],[8136,8139],[8152,8155],[8168,8172],[8184,8187],[8459,8461],[8464,8466],[8473,8477],[8490,8493],[8496,8499],[8510,8511],[11264,11310],[11362,11364],[11373,11376],[11390,11392],[42877,42878],[42922,42926],[42928,42932],[42948,42950],[65313,65338],[66560,66599],[66736,66771],[68736,68786],[71840,71871],[93760,93791],[119808,119833],[119860,119885],[119912,119937],[119966,119967],[119973,119974],[119977,119980],[119982,119989],[120016,120041],[120068,120069],[120071,120074],[120077,120084],[120086,120092],[120120,120121],[120123,120126],[120128,120132],[120138,120144],[120172,120197],[120224,120249],[120276,120301],[120328,120353],[120380,120405],[120432,120457],[120488,120512],[120546,120570],[120604,120628],[120662,120686],[120720,120744],[125184,125217],[5870,5872],[8544,8578],[8581,8584],[12321,12329],[12344,12346],[42726,42735],[65856,65908],[66513,66517],[74752,74862],[162,165],[2046,2047],[2546,2547],[8352,8383],[65504,65505],[65509,65510],[73693,73696],[8255,8256],[65075,65076],[65101,65103]];Mf(ki,sb);var vf=new Set([1471,1479,1648,1809,2045,2362,2364,2381,2433,2492,2509,2558,2620,2641,2677,2748,2765,2817,2876,2879,2893,2902,2946,3008,3021,3072,3076,3201,3260,3263,3270,3405,3530,3542,3633,3761,3893,3895,3897,4038,4226,4237,4253,6086,6109,6313,6450,6683,6742,6752,6754,6783,6964,6972,6978,7142,7149,7405,7412,8417,11647,42607,43010,43014,43019,43263,43443,43493,43587,43596,43644,43696,43713,43766,44005,44008,44013,64286,66045,66272,68159,69633,70003,70196,70206,70367,70464,70726,70750,70842,71229,71339,71341,71351,72160,72263,72767,73018,73031,73109,73111,94031,121461,121476,173,1564,1757,1807,2274,6158,65279,69821,69837,917505]),fb=[[768,879],[1155,1159],[1425,1469],[1473,1474],[1476,1477],[1552,1562],[1611,1631],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1840,1866],[1958,1968],[2027,2035],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,2306],[2369,2376],[2385,2391],[2402,2403],[2497,2500],[2530,2531],[2561,2562],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2753,2757],[2759,2760],[2786,2787],[2810,2815],[2881,2884],[2914,2915],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3426,3427],[3538,3540],[3636,3642],[3655,3662],[3764,3772],[3784,3789],[3864,3865],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4229,4230],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6089,6099],[6155,6157],[6277,6278],[6432,6434],[6439,6440],[6457,6459],[6679,6680],[6744,6750],[6757,6764],[6771,6780],[6832,6845],[6912,6915],[6966,6970],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7144,7145],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7416,7417],[7616,7673],[7675,7679],[8400,8412],[8421,8432],[11503,11505],[11744,11775],[12330,12333],[12441,12442],[42612,42621],[42654,42655],[42736,42737],[43045,43046],[43204,43205],[43232,43249],[43302,43309],[43335,43345],[43392,43394],[43446,43449],[43452,43453],[43561,43566],[43569,43570],[43573,43574],[43698,43700],[43703,43704],[43710,43711],[43756,43757],[65024,65039],[65056,65071],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68325,68326],[68900,68903],[69446,69456],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69888,69890],[69927,69931],[69933,69940],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70198,70199],[70371,70378],[70400,70401],[70459,70460],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70835,70840],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71231,71232],[71344,71349],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72193,72202],[72243,72248],[72251,72254],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73020,73021],[73023,73029],[73104,73105],[73459,73460],[92912,92916],[92976,92982],[94095,94098],[113821,113822],[119143,119145],[119163,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917760,917999],[1536,1541],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[65529,65531],[78896,78904],[113824,113827],[119155,119162],[917536,917631]];Mf(vf,fb);var ub=[[0,8],[14,27],[127,159],[768,879],[6832,6911],[7616,7679],[8400,8447],[65056,65071],[48,57]];Mf(vf,ub);var og=new Set(function*(){yield*ki,yield*vf}());var kf={};function sg(e){let t=e;return Object.keys(kf).forEach((r)=>{let n=kf[r],i=new RegExp(`{{${r}}}`,"g");t=t.replace(i,n)}),t}function be(e,t){kf[e]=sg(t)}function ze(e,t){let r=sg(e);return new RegExp(r,t)}be("Digits","[0-9]([0-9_]*[0-9])?");be("ExponentPart","[eE][+-]?{{Digits}}");be("HexDigit","[0-9a-fA-F]");be("HexDigits","{{HexDigit}}(({{HexDigit}}|'_')*{{HexDigit}})?");be("FloatTypeSuffix","[fFdD]");be("LineTerminator","(\\x0A|(\\x0D(\\x0A)?))");be("UnicodeMarker","uu*");be("UnicodeEscape","\\\\{{UnicodeMarker}}{{HexDigit}}{4}");be("RawInputCharacter","\\\\{{UnicodeMarker}}[0-9a-fA-F]{4}");be("UnicodeInputCharacter","({{UnicodeEscape}}|{{RawInputCharacter}})");be("OctalDigit","[0-7]");be("ZeroToThree","[0-3]");be("OctalEscape","\\\\({{OctalDigit}}|{{ZeroToThree}}?{{OctalDigit}}{2})");be("EscapeSequence",`\\\\[bstnfr"'\\\\]|{{OctalEscape}}`);be("StringCharacter",'(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!["\\\\]).)');be("TextBlockCharacter","(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!\\\\).|\\\\?{{LineTerminator}})");function lb(e,t){let r=t,n=e.codePointAt(r);if(ki.has(n)){if(r++,n>65535)r++;n=e.codePointAt(r)}while(og.has(n)){if(r++,n>65535)r++;n=e.codePointAt(r)}if(r===t)return null;return[e.substring(t,r)]}var Vr=Hr({name:"Identifier",pattern:{exec:lb},line_breaks:!1,start_chars_hint:Array.from(ki,(e)=>String.fromCharCode(e))}),Ft={modes:{global:[],stringTemplate:[],textBlockTemplate:[]},defaultMode:"global"},fg=Object.keys(Ft.modes),Xe={};function R(e,t=fg){if(!e.label){if(typeof e.pattern==="string")e.label=`'${e.pattern}'`;else if(e.pattern instanceof RegExp)e.label=`'${e.name}'`}let r=Hr(e);return t.forEach((n)=>Ft.modes[n].push(r)),Xe[e.name]=r,r}function Dt(e){return e.longer_alt=Vr,R(e)}var pb=R({name:"RestrictedKeyword",pattern:D.NA}),ug=R({name:"Keyword",pattern:D.NA}),nt=R({name:"AssignmentOperator",pattern:D.NA}),Re=R({name:"BinaryOperator",pattern:D.NA}),jn=R({name:"UnaryPrefixOperator",pattern:D.NA}),Sa=R({name:"UnaryPrefixOperatorNotPlusMinus",pattern:D.NA}),cg=R({name:"UnarySuffixOperator",pattern:D.NA}),it=R({name:"Separators",pattern:D.NA});R({name:"WhiteSpace",pattern:ze("[\\x09\\x20\\x0C]|{{LineTerminator}}"),group:D.SKIPPED});R({name:"LineComment",pattern:/\/\/[^\n\r]*/,group:"comments"});R({name:"TraditionalComment",pattern:/\/\*([^*]|\*(?!\/))*\*\//,group:"comments"});R({name:"BinaryLiteral",pattern:/0[bB][01]([01_]*[01])?[lL]?/});R({name:"FloatLiteral",pattern:ze("{{Digits}}\\.({{Digits}})?({{ExponentPart}})?({{FloatTypeSuffix}})?|\\.{{Digits}}({{ExponentPart}})?({{FloatTypeSuffix}})?|{{Digits}}{{ExponentPart}}({{FloatTypeSuffix}})?|{{Digits}}({{ExponentPart}})?{{FloatTypeSuffix}}")});R({name:"OctalLiteral",pattern:/0_*[0-7]([0-7_]*[0-7])?[lL]?/});R({name:"HexFloatLiteral",pattern:ze("0[xX]({{HexDigits}}\\.?|({{HexDigits}})?\\.{{HexDigits}})[pP][+-]?{{Digits}}[fFdD]?")});R({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[lL]?/});R({name:"DecimalLiteral",pattern:ze("(0|[1-9](_+{{Digits}}|({{Digits}})?))[lL]?")});R({name:"CharLiteral",pattern:ze("'(?:[^\\\\']|(?:(?:{{EscapeSequence}})|{{UnicodeInputCharacter}}))'")});R({name:"TextBlock",pattern:ze('"""[\\x09\\x20\\x0C]*{{LineTerminator}}{{TextBlockCharacter}}*?"""')});R({name:"TextBlockTemplateBegin",pattern:ze('"""{{LineTerminator}}{{TextBlockCharacter}}*?\\\\\\{'),push_mode:"textBlockTemplate"});R({name:"TextBlockTemplateEnd",pattern:ze('\\}{{TextBlockCharacter}}*?"""'),pop_mode:!0},["textBlockTemplate"]);R({name:"StringLiteral",pattern:ze('"{{StringCharacter}}*?"')});R({name:"StringTemplateBegin",pattern:ze('"{{StringCharacter}}*?\\\\\\{'),push_mode:"stringTemplate"});R({name:"StringTemplateEnd",pattern:ze('\\}{{StringCharacter}}*?"'),pop_mode:!0},["stringTemplate"]);R({name:"StringTemplateMid",pattern:ze("\\}{{StringCharacter}}*?\\\\\\{")},["stringTemplate"]);R({name:"TextBlockTemplateMid",pattern:ze("\\}{{TextBlockCharacter}}*?\\\\\\{")},["textBlockTemplate"]);var mb=["open","module","requires","transitive","exports","opens","to","uses","provides","when","with","sealed","non-sealed","permits"];lg(mb).forEach((e)=>{Dt({name:e[0].toUpperCase()+ag.default(e.substr(1)),pattern:e,categories:[Vr,pb]})});var db=["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while",["_","underscore"]];lg(db).forEach((e)=>{let t=Array.isArray(e),r=t?e[1]:e,n=t?e[0]:e,i={name:r[0].toUpperCase()+r.substr(1),pattern:n,categories:ug};if(t)i.label=`'${r}'`;Dt(i)});Dt({name:"Instanceof",pattern:"instanceof",categories:[ug,Re]});Dt({name:"Var",pattern:"var",categories:Vr});Dt({name:"Yield",pattern:"yield",categories:Vr});Dt({name:"Record",pattern:"record",categories:Vr});Dt({name:"True",pattern:"true"});Dt({name:"False",pattern:"false"});Dt({name:"Null",pattern:"null"});R({name:"At",pattern:"@",categories:[it]});R({name:"Arrow",pattern:"->"});R({name:"DotDotDot",pattern:"...",categories:[it]});R({name:"Dot",pattern:".",categories:[it]});R({name:"Comma",pattern:",",categories:[it]});R({name:"Semicolon",pattern:";",categories:[it]});R({name:"ColonColon",pattern:"::",categories:[it]});R({name:"Colon",pattern:":"});R({name:"QuestionMark",pattern:"?"});R({name:"LBrace",pattern:"(",categories:[it]});R({name:"RBrace",pattern:")",categories:[it]});R({name:"LCurly",pattern:"{",categories:[it],push_mode:Ft.defaultMode});R({name:"RCurly",pattern:"}",categories:[it],pop_mode:!0},[Ft.defaultMode]);R({name:"LSquare",pattern:"[",categories:[it]});R({name:"RSquare",pattern:"]",categories:[it]});R({name:"MinusMinus",pattern:"--",categories:[jn,cg,Sa]});R({name:"PlusPlus",pattern:"++",categories:[jn,cg,Sa]});R({name:"Complement",pattern:"~",categories:[jn,Sa]});R({name:"LessEquals",pattern:"<=",categories:[Re]});R({name:"LessLessEquals",pattern:"<<=",categories:[nt]});R({name:"Less",pattern:"<",categories:[Re]});R({name:"GreaterEquals",pattern:">=",categories:[Re]});R({name:"GreaterGreaterEquals",pattern:">>=",categories:[nt]});R({name:"GreaterGreaterGreaterEquals",pattern:">>>=",categories:[nt]});R({name:"Greater",pattern:">",categories:[Re]});R({name:"EqualsEquals",pattern:"==",categories:[Re]});R({name:"Equals",pattern:"=",categories:[Re,nt]});R({name:"MinusEquals",pattern:"-=",categories:[nt]});R({name:"Minus",pattern:"-",categories:[Re,jn]});R({name:"PlusEquals",pattern:"+=",categories:[nt]});R({name:"Plus",pattern:"+",categories:[Re,jn]});R({name:"AndAnd",pattern:"&&",categories:[Re]});R({name:"AndEquals",pattern:"&=",categories:[nt]});R({name:"And",pattern:"&",categories:[Re]});R({name:"XorEquals",pattern:"^=",categories:[nt]});R({name:"Xor",pattern:"^",categories:[Re]});R({name:"NotEquals",pattern:"!=",categories:[Re]});R({name:"OrOr",pattern:"||",categories:[Re]});R({name:"OrEquals",pattern:"|=",categories:[nt]});R({name:"Or",pattern:"|",categories:[Re]});R({name:"MultiplyEquals",pattern:"*=",categories:[nt]});R({name:"Star",pattern:"*",categories:[Re]});R({name:"DivideEquals",pattern:"/=",categories:[nt]});R({name:"Divide",pattern:"/",categories:[Re]});R({name:"ModuloEquals",pattern:"%=",categories:[nt]});R({name:"Modulo",pattern:"%",categories:[Re]});R({name:"Not",pattern:"!",categories:[jn,Sa]});fg.forEach((e)=>Ft.modes[e].push(Vr));Xe.Identifier=Vr;function lg(e){return e.sort((t,r)=>r.length-t.length)}function _i(){return(typeof process<"u"&&process.env&&process.env["prettier-java-development-mode"]==="enabled")===!1}var pg=new D(Ft,{ensureOptimizations:!0,skipValidations:_i()});function hb(e,t){var r=-1,n=e==null?0:e.length,i=Array(n);while(++r<n)i[r]=t(e[r],r,e);return i}var Ta=hb;function gb(){this.__data__=[],this.size=0}var mg=gb;function Eb(e,t){return e===t||e!==e&&t!==t}var ya=Eb;function Sb(e,t){var r=e.length;while(r--)if(ya(e[r][0],t))return r;return-1}var gr=Sb;var Tb=Array.prototype,yb=Tb.splice;function xb(e){var t=this.__data__,r=gr(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else yb.call(t,r,1);return--this.size,!0}var dg=xb;function Rb(e){var t=this.__data__,r=gr(t,e);return r<0?void 0:t[r][1]}var hg=Rb;function Lb(e){return gr(this.__data__,e)>-1}var gg=Lb;function Ob(e,t){var r=this.__data__,n=gr(r,e);if(n<0)++this.size,r.push([e,t]);else r[n][1]=t;return this}var Eg=Ob;function Gn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}Gn.prototype.clear=mg;Gn.prototype.delete=dg;Gn.prototype.get=hg;Gn.prototype.has=gg;Gn.prototype.set=Eg;var Er=Gn;function Ab(){this.__data__=new Er,this.size=0}var Sg=Ab;function Ub(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Tg=Ub;function Nb(e){return this.__data__.get(e)}var yg=Nb;function Cb(e){return this.__data__.has(e)}var xg=Cb;var Ib=typeof global=="object"&&global&&global.Object===Object&&global,xa=Ib;var bb=typeof self=="object"&&self&&self.Object===Object&&self,Pb=xa||bb||Function("return this")(),Le=Pb;var Mb=Le.Symbol,we=Mb;var Rg=Object.prototype,vb=Rg.hasOwnProperty,kb=Rg.toString,wi=we?we.toStringTag:void 0;function _b(e){var t=vb.call(e,wi),r=e[wi];try{e[wi]=void 0;var n=!0}catch(o){}var i=kb.call(e);if(n)if(t)e[wi]=r;else delete e[wi];return i}var Lg=_b;var wb=Object.prototype,Bb=wb.toString;function Fb(e){return Bb.call(e)}var Og=Fb;var Db="[object Null]",jb="[object Undefined]",Ag=we?we.toStringTag:void 0;function Gb(e){if(e==null)return e===void 0?jb:Db;return Ag&&Ag in Object(e)?Lg(e):Og(e)}var lt=Gb;function Kb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Kn=Kb;var Hb="[object AsyncFunction]",Wb="[object Function]",Vb="[object GeneratorFunction]",qb="[object Proxy]";function Yb(e){if(!Kn(e))return!1;var t=lt(e);return t==Wb||t==Vb||t==Hb||t==qb}var Ra=Yb;var zb=Le["__core-js_shared__"],La=zb;var Ug=function(){var e=/[^.]+$/.exec(La&&La.keys&&La.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xb(e){return!!Ug&&Ug in e}var Ng=Xb;var Jb=Function.prototype,Qb=Jb.toString;function Zb(e){if(e!=null){try{return Qb.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var jt=Zb;var $b=/[\\^$.*+?()[\]{}|]/g,e4=/^\[object .+?Constructor\]$/,t4=Function.prototype,r4=Object.prototype,n4=t4.toString,i4=r4.hasOwnProperty,o4=RegExp("^"+n4.call(i4).replace($b,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function a4(e){if(!Kn(e)||Ng(e))return!1;var t=Ra(e)?o4:e4;return t.test(jt(e))}var Cg=a4;function s4(e,t){return e==null?void 0:e[t]}var Ig=s4;function f4(e,t){var r=Ig(e,t);return Cg(r)?r:void 0}var ot=f4;var u4=ot(Le,"Map"),Sr=u4;var c4=ot(Object,"create"),Gt=c4;function l4(){this.__data__=Gt?Gt(null):{},this.size=0}var bg=l4;function p4(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Pg=p4;var m4="__lodash_hash_undefined__",d4=Object.prototype,h4=d4.hasOwnProperty;function g4(e){var t=this.__data__;if(Gt){var r=t[e];return r===m4?void 0:r}return h4.call(t,e)?t[e]:void 0}var Mg=g4;var E4=Object.prototype,S4=E4.hasOwnProperty;function T4(e){var t=this.__data__;return Gt?t[e]!==void 0:S4.call(t,e)}var vg=T4;var y4="__lodash_hash_undefined__";function x4(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gt&&t===void 0?y4:t,this}var kg=x4;function Hn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}Hn.prototype.clear=bg;Hn.prototype.delete=Pg;Hn.prototype.get=Mg;Hn.prototype.has=vg;Hn.prototype.set=kg;var _f=Hn;function R4(){this.size=0,this.__data__={hash:new _f,map:new(Sr||Er),string:new _f}}var _g=R4;function L4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var wg=L4;function O4(e,t){var r=e.__data__;return wg(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Tr=O4;function A4(e){var t=Tr(this,e).delete(e);return this.size-=t?1:0,t}var Bg=A4;function U4(e){return Tr(this,e).get(e)}var Fg=U4;function N4(e){return Tr(this,e).has(e)}var Dg=N4;function C4(e,t){var r=Tr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var jg=C4;function Wn(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}Wn.prototype.clear=_g;Wn.prototype.delete=Bg;Wn.prototype.get=Fg;Wn.prototype.has=Dg;Wn.prototype.set=jg;var qr=Wn;var I4=200;function b4(e,t){var r=this.__data__;if(r instanceof Er){var n=r.__data__;if(!Sr||n.length<I4-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new qr(n)}return r.set(e,t),this.size=r.size,this}var Gg=b4;function Vn(e){var t=this.__data__=new Er(e);this.size=t.size}Vn.prototype.clear=Sg;Vn.prototype.delete=Tg;Vn.prototype.get=yg;Vn.prototype.has=xg;Vn.prototype.set=Gg;var qn=Vn;var P4="__lodash_hash_undefined__";function M4(e){return this.__data__.set(e,P4),this}var Kg=M4;function v4(e){return this.__data__.has(e)}var Hg=v4;function Oa(e){var t=-1,r=e==null?0:e.length;this.__data__=new qr;while(++t<r)this.add(e[t])}Oa.prototype.add=Oa.prototype.push=Kg;Oa.prototype.has=Hg;var Aa=Oa;function k4(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e))return!0;return!1}var Wg=k4;function _4(e,t){return e.has(t)}var Ua=_4;var w4=1,B4=2;function F4(e,t,r,n,i,o){var a=r&w4,s=e.length,f=t.length;if(s!=f&&!(a&&f>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var l=-1,p=!0,h=r&B4?new Aa:void 0;o.set(e,t),o.set(t,e);while(++l<s){var S=e[l],T=t[l];if(n)var y=a?n(T,S,l,t,e,o):n(S,T,l,e,t,o);if(y!==void 0){if(y)continue;p=!1;break}if(h){if(!Wg(t,function(m,g){if(!Ua(h,g)&&(S===m||i(S,m,r,n,o)))return h.push(g)})){p=!1;break}}else if(!(S===T||i(S,T,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}var Na=F4;var D4=Le.Uint8Array,wf=D4;function j4(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Vg=j4;function G4(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Yn=G4;var K4=1,H4=2,W4="[object Boolean]",V4="[object Date]",q4="[object Error]",Y4="[object Map]",z4="[object Number]",X4="[object RegExp]",J4="[object Set]",Q4="[object String]",Z4="[object Symbol]",$4="[object ArrayBuffer]",e7="[object DataView]",qg=we?we.prototype:void 0,Bf=qg?qg.valueOf:void 0;function t7(e,t,r,n,i,o,a){switch(r){case e7:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $4:if(e.byteLength!=t.byteLength||!o(new wf(e),new wf(t)))return!1;return!0;case W4:case V4:case z4:return ya(+e,+t);case q4:return e.name==t.name&&e.message==t.message;case X4:case Q4:return e==t+"";case Y4:var s=Vg;case J4:var f=n&K4;if(s||(s=Yn),e.size!=t.size&&!f)return!1;var u=a.get(e);if(u)return u==t;n|=H4,a.set(e,t);var c=Na(s(e),s(t),n,i,o,a);return a.delete(e),c;case Z4:if(Bf)return Bf.call(e)==Bf.call(t)}return!1}var Yg=t7;function r7(e,t){var r=-1,n=t.length,i=e.length;while(++r<n)e[i+r]=t[r];return e}var Ca=r7;var n7=Array.isArray,j=n7;function i7(e,t,r){var n=t(e);return j(e)?n:Ca(n,r(e))}var zg=i7;function o7(e,t){var r=-1,n=e==null?0:e.length,i=0,o=[];while(++r<n){var a=e[r];if(t(a,r,e))o[i++]=a}return o}var Ia=o7;function a7(){return[]}var Xg=a7;var s7=Object.prototype,f7=s7.propertyIsEnumerable,Jg=Object.getOwnPropertySymbols,u7=!Jg?Xg:function(e){if(e==null)return[];return e=Object(e),Ia(Jg(e),function(t){return f7.call(e,t)})},Qg=u7;function c7(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}var Zg=c7;function l7(e){return e!=null&&typeof e=="object"}var pt=l7;var p7="[object Arguments]";function m7(e){return pt(e)&&lt(e)==p7}var Ff=m7;var $g=Object.prototype,d7=$g.hasOwnProperty,h7=$g.propertyIsEnumerable,g7=Ff(function(){return arguments}())?Ff:function(e){return pt(e)&&d7.call(e,"callee")&&!h7.call(e,"callee")},yr=g7;var Pa={};ai(Pa,{default:()=>xr});function E7(){return!1}var eE=E7;var nE=typeof Pa=="object"&&Pa&&!Pa.nodeType&&Pa,tE=nE&&typeof ba=="object"&&ba&&!ba.nodeType&&ba,S7=tE&&tE.exports===nE,rE=S7?Le.Buffer:void 0,T7=rE?rE.isBuffer:void 0,y7=T7||eE,xr=y7;var x7=9007199254740991,R7=/^(?:0|[1-9]\d*)$/;function L7(e,t){var r=typeof e;return t=t==null?x7:t,!!t&&(r=="number"||r!="symbol"&&R7.test(e))&&(e>-1&&e%1==0&&e<t)}var Ma=L7;var O7=9007199254740991;function A7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=O7}var zn=A7;var U7="[object Arguments]",N7="[object Array]",C7="[object Boolean]",I7="[object Date]",b7="[object Error]",P7="[object Function]",M7="[object Map]",v7="[object Number]",k7="[object Object]",_7="[object RegExp]",w7="[object Set]",B7="[object String]",F7="[object WeakMap]",D7="[object ArrayBuffer]",j7="[object DataView]",G7="[object Float32Array]",K7="[object Float64Array]",H7="[object Int8Array]",W7="[object Int16Array]",V7="[object Int32Array]",q7="[object Uint8Array]",Y7="[object Uint8ClampedArray]",z7="[object Uint16Array]",X7="[object Uint32Array]",Q={};Q[G7]=Q[K7]=Q[H7]=Q[W7]=Q[V7]=Q[q7]=Q[Y7]=Q[z7]=Q[X7]=!0;Q[U7]=Q[N7]=Q[D7]=Q[C7]=Q[j7]=Q[I7]=Q[b7]=Q[P7]=Q[M7]=Q[v7]=Q[k7]=Q[_7]=Q[w7]=Q[B7]=Q[F7]=!1;function J7(e){return pt(e)&&zn(e.length)&&!!Q[lt(e)]}var iE=J7;function Q7(e){return function(t){return e(t)}}var oE=Q7;var ka={};ai(ka,{default:()=>_a});var aE=typeof ka=="object"&&ka&&!ka.nodeType&&ka,Bi=aE&&typeof va=="object"&&va&&!va.nodeType&&va,Z7=Bi&&Bi.exports===aE,Df=Z7&&xa.process,$7=function(){try{var e=Bi&&Bi.require&&Bi.require("util").types;if(e)return e;return Df&&Df.binding&&Df.binding("util")}catch(t){}}(),_a=$7;var sE=_a&&_a.isTypedArray,eP=sE?oE(sE):iE,Xn=eP;var tP=Object.prototype,rP=tP.hasOwnProperty;function nP(e,t){var r=j(e),n=!r&&yr(e),i=!r&&!n&&xr(e),o=!r&&!n&&!i&&Xn(e),a=r||n||i||o,s=a?Zg(e.length,String):[],f=s.length;for(var u in e)if((t||rP.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ma(u,f))))s.push(u);return s}var fE=nP;var iP=Object.prototype;function oP(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||iP;return e===r}var wa=oP;function aP(e,t){return function(r){return e(t(r))}}var uE=aP;var sP=uE(Object.keys,Object),cE=sP;var fP=Object.prototype,uP=fP.hasOwnProperty;function cP(e){if(!wa(e))return cE(e);var t=[];for(var r in Object(e))if(uP.call(e,r)&&r!="constructor")t.push(r);return t}var Ba=cP;function lP(e){return e!=null&&zn(e.length)&&!Ra(e)}var Rr=lP;function pP(e){return Rr(e)?fE(e):Ba(e)}var Jn=pP;function mP(e){return zg(e,Jn,Qg)}var jf=mP;var dP=1,hP=Object.prototype,gP=hP.hasOwnProperty;function EP(e,t,r,n,i,o){var a=r&dP,s=jf(e),f=s.length,u=jf(t),c=u.length;if(f!=c&&!a)return!1;var l=f;while(l--){var p=s[l];if(!(a?p in t:gP.call(t,p)))return!1}var h=o.get(e),S=o.get(t);if(h&&S)return h==t&&S==e;var T=!0;o.set(e,t),o.set(t,e);var y=a;while(++l<f){p=s[l];var m=e[p],g=t[p];if(n)var d=a?n(g,m,p,t,e,o):n(m,g,p,e,t,o);if(!(d===void 0?m===g||i(m,g,r,n,o):d)){T=!1;break}y||(y=p=="constructor")}if(T&&!y){var x=e.constructor,_=t.constructor;if(x!=_&&(("constructor"in e)&&("constructor"in t))&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _))T=!1}return o.delete(e),o.delete(t),T}var lE=EP;var SP=ot(Le,"DataView"),Fa=SP;var TP=ot(Le,"Promise"),Da=TP;var yP=ot(Le,"Set"),Lr=yP;var xP=ot(Le,"WeakMap"),ja=xP;var pE="[object Map]",RP="[object Object]",mE="[object Promise]",dE="[object Set]",hE="[object WeakMap]",gE="[object DataView]",LP=jt(Fa),OP=jt(Sr),AP=jt(Da),UP=jt(Lr),NP=jt(ja),Yr=lt;if(Fa&&Yr(new Fa(new ArrayBuffer(1)))!=gE||Sr&&Yr(new Sr)!=pE||Da&&Yr(Da.resolve())!=mE||Lr&&Yr(new Lr)!=dE||ja&&Yr(new ja)!=hE)Yr=function(e){var t=lt(e),r=t==RP?e.constructor:void 0,n=r?jt(r):"";if(n)switch(n){case LP:return gE;case OP:return pE;case AP:return mE;case UP:return dE;case NP:return hE}return t};var Fi=Yr;var CP=1,EE="[object Arguments]",SE="[object Array]",Ga="[object Object]",IP=Object.prototype,TE=IP.hasOwnProperty;function bP(e,t,r,n,i,o){var a=j(e),s=j(t),f=a?SE:Fi(e),u=s?SE:Fi(t);f=f==EE?Ga:f,u=u==EE?Ga:u;var c=f==Ga,l=u==Ga,p=f==u;if(p&&xr(e)){if(!xr(t))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new qn),a||Xn(e)?Na(e,t,r,n,i,o):Yg(e,t,f,r,n,i,o);if(!(r&CP)){var h=c&&TE.call(e,"__wrapped__"),S=l&&TE.call(t,"__wrapped__");if(h||S){var T=h?e.value():e,y=S?t.value():t;return o||(o=new qn),i(T,y,r,n,o)}}if(!p)return!1;return o||(o=new qn),lE(e,t,r,n,i,o)}var yE=bP;function xE(e,t,r,n,i){if(e===t)return!0;if(e==null||t==null||!pt(e)&&!pt(t))return e!==e&&t!==t;return yE(e,t,r,n,xE,i)}var Ka=xE;var PP=1,MP=2;function vP(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;e=Object(e);while(i--){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}while(++i<o){s=r[i];var f=s[0],u=e[f],c=s[1];if(a&&s[2]){if(u===void 0&&!(f in e))return!1}else{var l=new qn;if(n)var p=n(u,c,f,e,t,l);if(!(p===void 0?Ka(c,u,PP|MP,n,l):p))return!1}}return!0}var RE=vP;function kP(e){return e===e&&!Kn(e)}var Ha=kP;function _P(e){var t=Jn(e),r=t.length;while(r--){var n=t[r],i=e[n];t[r]=[n,i,Ha(i)]}return t}var LE=_P;function wP(e,t){return function(r){if(r==null)return!1;return r[e]===t&&(t!==void 0||(e in Object(r)))}}var Wa=wP;function BP(e){var t=LE(e);if(t.length==1&&t[0][2])return Wa(t[0][0],t[0][1]);return function(r){return r===e||RE(r,e,t)}}var OE=BP;var FP="[object Symbol]";function DP(e){return typeof e=="symbol"||pt(e)&&lt(e)==FP}var Or=DP;var jP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GP=/^\w*$/;function KP(e,t){if(j(e))return!1;var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||Or(e))return!0;return GP.test(e)||!jP.test(e)||t!=null&&e in Object(t)}var Qn=KP;var HP="Expected a function";function Gf(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(HP);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Gf.Cache||qr),r}Gf.Cache=qr;var AE=Gf;var WP=500;function VP(e){var t=AE(e,function(n){if(r.size===WP)r.clear();return n}),r=t.cache;return t}var UE=VP;var qP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,YP=/\\(\\)?/g,zP=UE(function(e){var t=[];if(e.charCodeAt(0)===46)t.push("");return e.replace(qP,function(r,n,i,o){t.push(i?o.replace(YP,"$1"):n||r)}),t}),NE=zP;var XP=1/0,CE=we?we.prototype:void 0,IE=CE?CE.toString:void 0;function bE(e){if(typeof e=="string")return e;if(j(e))return Ta(e,bE)+"";if(Or(e))return IE?IE.call(e):"";var t=e+"";return t=="0"&&1/e==-XP?"-0":t}var PE=bE;function JP(e){return e==null?"":PE(e)}var ME=JP;function QP(e,t){if(j(e))return e;return Qn(e,t)?[e]:NE(ME(e))}var Va=QP;var ZP=1/0;function $P(e){if(typeof e=="string"||Or(e))return e;var t=e+"";return t=="0"&&1/e==-ZP?"-0":t}var Ar=$P;function eM(e,t){t=Va(t,e);var r=0,n=t.length;while(e!=null&&r<n)e=e[Ar(t[r++])];return r&&r==n?e:void 0}var qa=eM;function tM(e,t,r){var n=e==null?void 0:qa(e,t);return n===void 0?r:n}var vE=tM;function rM(e,t){return e!=null&&t in Object(e)}var kE=rM;function nM(e,t,r){t=Va(t,e);var n=-1,i=t.length,o=!1;while(++n<i){var a=Ar(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}if(o||++n!=i)return o;return i=e==null?0:e.length,!!i&&zn(i)&&Ma(a,i)&&(j(e)||yr(e))}var _E=nM;function iM(e,t){return e!=null&&_E(e,t,kE)}var wE=iM;var oM=1,aM=2;function sM(e,t){if(Qn(e)&&Ha(t))return Wa(Ar(e),t);return function(r){var n=vE(r,e);return n===void 0&&n===t?wE(r,e):Ka(t,n,oM|aM)}}var BE=sM;function fM(e){return e}var Zn=fM;function uM(e){return function(t){return t==null?void 0:t[e]}}var FE=uM;function cM(e){return function(t){return qa(t,e)}}var DE=cM;function lM(e){return Qn(e)?FE(Ar(e)):DE(e)}var jE=lM;function pM(e){if(typeof e=="function")return e;if(e==null)return Zn;if(typeof e=="object")return j(e)?BE(e[0],e[1]):OE(e);return jE(e)}var Ur=pM;function mM(e){return function(t,r,n){var i=-1,o=Object(t),a=n(t),s=a.length;while(s--){var f=a[e?s:++i];if(r(o[f],f,o)===!1)break}return t}}var GE=mM;var dM=GE(),KE=dM;function hM(e,t){return e&&KE(e,t,Jn)}var HE=hM;function gM(e,t){return function(r,n){if(r==null)return r;if(!Rr(r))return e(r,n);var i=r.length,o=t?i:-1,a=Object(r);while(t?o--:++o<i)if(n(a[o],o,a)===!1)break;return r}}var WE=gM;var EM=WE(HE),Nr=EM;function SM(e,t){var r=-1,n=Rr(e)?Array(e.length):[];return Nr(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var VE=SM;function TM(e,t){var r=j(e)?Ta:VE;return r(e,Ur(t,3))}var Je=TM;function yM(e,t){var r=[];return Nr(e,function(n,i,o){if(t(n,i,o))r.push(n)}),r}var qE=yM;function xM(e,t){var r=j(e)?Ia:qE;return r(e,Ur(t,3))}var YE=xM;function zr(e,t,r){return`${e.name}_${t}_${r}`}var Cr=1,RM=2,zE=4,XE=5;var $n=7,LM=8,OM=9,AM=10,UM=11,JE=12;class Ya{constructor(e){this.target=e}isEpsilon(){return!1}}class Di extends Ya{constructor(e,t){super(e);this.tokenType=t}}class za extends Ya{constructor(e){super(e)}isEpsilon(){return!0}}class ji extends Ya{constructor(e,t,r){super(e);this.rule=t,this.followState=r}isEpsilon(){return!0}}function QE(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};NM(t,e);let r=e.length;for(let n=0;n<r;n++){let i=e[n],o=Xr(t,i,i);if(o===void 0)continue;FM(t,i,o)}return t}function NM(e,t){let r=t.length;for(let n=0;n<r;n++){let i=t[n],o=Oe(e,i,void 0,{type:RM}),a=Oe(e,i,void 0,{type:$n});o.stop=a,e.ruleToStartState.set(i,o),e.ruleToStopState.set(i,a)}}function ZE(e,t,r){if(r instanceof M)return Kf(e,t,r.terminalType,r);else if(r instanceof B)return BM(e,t,r);else if(r instanceof q)return MM(e,t,r);else if(r instanceof F)return vM(e,t,r);else if(r instanceof k)return CM(e,t,r);else if(r instanceof V)return IM(e,t,r);else if(r instanceof X)return bM(e,t,r);else if(r instanceof J)return PM(e,t,r);else return Xr(e,t,r)}function CM(e,t,r){let n=Oe(e,t,r,{type:XE});Ir(e,n);let i=ei(e,t,n,r,Xr(e,t,r));return e1(e,t,r,i)}function IM(e,t,r){let n=Oe(e,t,r,{type:XE});Ir(e,n);let i=ei(e,t,n,r,Xr(e,t,r)),o=Kf(e,t,r.separator,r);return e1(e,t,r,i,o)}function bM(e,t,r){let n=Oe(e,t,r,{type:zE});Ir(e,n);let i=ei(e,t,n,r,Xr(e,t,r));return $E(e,t,r,i)}function PM(e,t,r){let n=Oe(e,t,r,{type:zE});Ir(e,n);let i=ei(e,t,n,r,Xr(e,t,r)),o=Kf(e,t,r.separator,r);return $E(e,t,r,i,o)}function MM(e,t,r){let n=Oe(e,t,r,{type:Cr});Ir(e,n);let i=Je(r.definition,(a)=>ZE(e,t,a));return ei(e,t,n,r,...i)}function vM(e,t,r){let n=Oe(e,t,r,{type:Cr});Ir(e,n);let i=ei(e,t,n,r,Xr(e,t,r));return kM(e,t,r,i)}function Xr(e,t,r){let n=YE(Je(r.definition,(i)=>ZE(e,t,i)),(i)=>i!==void 0);if(n.length===1)return n[0];else if(n.length===0)return;else return wM(e,n)}function $E(e,t,r,n,i){let{left:o,right:a}=n,s=Oe(e,t,r,{type:UM});Ir(e,s);let f=Oe(e,t,r,{type:JE});if(o.loopback=s,f.loopback=s,e.decisionMap[zr(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s,de(a,s),i===void 0)de(s,o),de(s,f);else de(s,f),de(s,i.left),de(i.right,o);return{left:o,right:f}}function e1(e,t,r,n,i){let{left:o,right:a}=n,s=Oe(e,t,r,{type:AM});Ir(e,s);let f=Oe(e,t,r,{type:JE}),u=Oe(e,t,r,{type:OM});if(s.loopback=u,f.loopback=u,de(s,o),de(s,f),de(a,u),i!==void 0)de(u,f),de(u,i.left),de(i.right,o);else de(u,s);return e.decisionMap[zr(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,{left:s,right:f}}function kM(e,t,r,n){let{left:i,right:o}=n;return de(i,o),e.decisionMap[zr(t,"Option",r.idx)]=i,n}function Ir(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function ei(e,t,r,n,...i){let o=Oe(e,t,n,{type:LM,start:r});r.end=o;for(let s of i)if(s!==void 0)de(r,s.left),de(s.right,o);else de(r,o);let a={left:r,right:o};return e.decisionMap[zr(t,_M(n),n.idx)]=r,a}function _M(e){if(e instanceof q)return"Alternation";else if(e instanceof F)return"Option";else if(e instanceof k)return"Repetition";else if(e instanceof V)return"RepetitionWithSeparator";else if(e instanceof X)return"RepetitionMandatory";else if(e instanceof J)return"RepetitionMandatoryWithSeparator";else throw Error("Invalid production type encountered")}function wM(e,t){let r=t.length;for(let o=0;o<r-1;o++){let a=t[o],s;if(a.left.transitions.length===1)s=a.left.transitions[0];let f=s instanceof ji,u=s,c=t[o+1].left;if(a.left.type===Cr&&a.right.type===Cr&&s!==void 0&&(f&&u.followState===a.right||s.target===a.right)){if(f)u.followState=c;else s.target=c;DM(e,a.right)}else de(a.right,c)}let n=t[0],i=t[r-1];return{left:n.left,right:i.right}}function Kf(e,t,r,n){let i=Oe(e,t,n,{type:Cr}),o=Oe(e,t,n,{type:Cr});return Hf(i,new Di(o,r)),{left:i,right:o}}function BM(e,t,r){let n=r.referencedRule,i=e.ruleToStartState.get(n),o=Oe(e,t,r,{type:Cr}),a=Oe(e,t,r,{type:Cr}),s=new ji(i,n,a);return Hf(o,s),{left:o,right:a}}function FM(e,t,r){let n=e.ruleToStartState.get(t);de(n,r.left);let i=e.ruleToStopState.get(t);return de(r.right,i),{left:n,right:i}}function de(e,t){let r=new za(t);Hf(e,r)}function Oe(e,t,r,n){let i=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(i),i}function Hf(e,t){if(e.transitions.length===0)e.epsilonOnlyTransitions=t.isEpsilon();e.transitions.push(t)}function DM(e,t){e.states.splice(e.states.indexOf(t),1)}var Gi={};class Ki{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Wf(e);if(!(t in this.map))this.map[t]=this.configs.length,this.configs.push(e)}get elements(){return this.configs}get alts(){return Je(this.configs,(e)=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}}function Wf(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((r)=>r.stateNumber.toString()).join("_")}`}function jM(e,t,r){var n=-1,i=e.length;while(++n<i){var o=e[n],a=t(o);if(a!=null&&(s===void 0?a===a&&!Or(a):r(a,s)))var s=a,f=o}return f}var t1=jM;function GM(e,t){return e<t}var r1=GM;function KM(e){return e&&e.length?t1(e,Zn,r1):void 0}var n1=KM;var i1=we?we.isConcatSpreadable:void 0;function HM(e){return j(e)||yr(e)||!!(i1&&e&&e[i1])}var o1=HM;function a1(e,t,r,n,i){var o=-1,a=e.length;r||(r=o1),i||(i=[]);while(++o<a){var s=e[o];if(t>0&&r(s))if(t>1)a1(s,t-1,r,n,i);else Ca(i,s);else if(!n)i[i.length]=s}return i}var Xa=a1;function WM(e,t){return Xa(Je(e,t),1)}var s1=WM;function VM(e,t,r,n){var i=e.length,o=r+(n?1:-1);while(n?o--:++o<i)if(t(e[o],o,e))return o;return-1}var f1=VM;function qM(e){return e!==e}var u1=qM;function YM(e,t,r){var n=r-1,i=e.length;while(++n<i)if(e[n]===t)return n;return-1}var c1=YM;function zM(e,t,r){return t===t?c1(e,t,r):f1(e,u1,r)}var l1=zM;function XM(e,t){var r=e==null?0:e.length;return!!r&&l1(e,t,0)>-1}var p1=XM;function JM(e,t,r){var n=-1,i=e==null?0:e.length;while(++n<i)if(r(t,e[n]))return!0;return!1}var m1=JM;function QM(){}var d1=QM;var ZM=1/0,$M=!(Lr&&1/Yn(new Lr([,-0]))[1]==ZM)?d1:function(e){return new Lr(e)},h1=$M;var e3=200;function t3(e,t,r){var n=-1,i=p1,o=e.length,a=!0,s=[],f=s;if(r)a=!1,i=m1;else if(o>=e3){var u=t?null:h1(e);if(u)return Yn(u);a=!1,i=Ua,f=new Aa}else f=t?[]:s;e:while(++n<o){var c=e[n],l=t?t(c):c;if(c=r||c!==0?c:0,a&&l===l){var p=f.length;while(p--)if(f[p]===l)continue e;if(t)f.push(l);s.push(c)}else if(!i(f,l,r)){if(f!==s)f.push(l);s.push(c)}}return s}var g1=t3;function r3(e,t){return e&&e.length?g1(e,Ur(t,2)):[]}var E1=r3;function n3(e){var t=e==null?0:e.length;return t?Xa(e,1):[]}var S1=n3;function i3(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e)===!1)break;return e}var T1=i3;function o3(e){return typeof e=="function"?e:Zn}var y1=o3;function a3(e,t){var r=j(e)?T1:Nr;return r(e,y1(t))}var Ja=a3;var s3="[object Map]",f3="[object Set]",u3=Object.prototype,c3=u3.hasOwnProperty;function l3(e){if(e==null)return!0;if(Rr(e)&&(j(e)||typeof e=="string"||typeof e.splice=="function"||xr(e)||Xn(e)||yr(e)))return!e.length;var t=Fi(e);if(t==s3||t==f3)return!e.size;if(wa(e))return!Ba(e).length;for(var r in e)if(c3.call(e,r))return!1;return!0}var x1=l3;function p3(e,t,r,n){var i=-1,o=e==null?0:e.length;if(n&&o)r=e[++i];while(++i<o)r=t(r,e[i],i,e);return r}var R1=p3;function m3(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}var L1=m3;function d3(e,t,r){var n=j(e)?R1:L1,i=arguments.length<3;return n(e,Ur(t,4),r,i,Nr)}var Vf=d3;function h3(e,t){let r={};return(n)=>{let i=n.toString(),o=r[i];if(o!==void 0)return o;else return o={atnStartState:e,decision:t,states:{}},r[i]=o,o}}class Yf{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;r<t;r++)e+=this.predicates[r]===!0?"1":"0";return e}}var O1=new Yf;class Za extends wn{constructor(e){var t;super();this.logging=(t=e===null||e===void 0?void 0:e.logging)!==null&&t!==void 0?t:(r)=>console.log(r)}initialize(e){this.atn=QE(e.rules),this.dfas=g3(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,o=this.dfas,a=this.logging,s=zr(r,"Alternation",t),u=this.atn.decisionMap[s].decision,c=Je(ra({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),(l)=>Je(l,(p)=>p[0]));if(A1(c,!1)&&!i){let l=Vf(c,(p,h,S)=>(Ja(h,(T)=>{if(T)p[T.tokenTypeIdx]=S,Ja(T.categoryMatches,(y)=>{p[y]=S})}),p),{});if(n)return function(p){var h;let S=this.LA(1),T=l[S.tokenTypeIdx];if(p!==void 0&&T!==void 0){let y=(h=p[T])===null||h===void 0?void 0:h.GATE;if(y!==void 0&&y.call(this)===!1)return}return T};else return function(){let p=this.LA(1);return l[p.tokenTypeIdx]}}else if(n)return function(l){let p=new Yf,h=l===void 0?0:l.length;for(let T=0;T<h;T++){let y=l===null||l===void 0?void 0:l[T].GATE;p.set(T,y===void 0||y.call(this))}let S=qf.call(this,o,u,p,a);return typeof S==="number"?S:void 0};else return function(){let l=qf.call(this,o,u,O1,a);return typeof l==="number"?l:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:i}=e,o=this.dfas,a=this.logging,s=zr(r,n,t),u=this.atn.decisionMap[s].decision,c=Je(ra({maxLookahead:1,occurrence:t,prodType:n,rule:r}),(l)=>Je(l,(p)=>p[0]));if(A1(c)&&c[0][0]&&!i){let l=c[0],p=S1(l);if(p.length===1&&x1(p[0].categoryMatches)){let S=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===S}}else{let h=Vf(p,(S,T)=>{if(T!==void 0)S[T.tokenTypeIdx]=!0,Ja(T.categoryMatches,(y)=>{S[y]=!0});return S},{});return function(){let S=this.LA(1);return h[S.tokenTypeIdx]===!0}}}return function(){let l=qf.call(this,o,u,O1,a);return typeof l==="object"?!1:l===0}}}function A1(e,t=!0){let r=new Set;for(let n of e){let i=new Set;for(let o of n){if(o===void 0)if(t)break;else return!1;let a=[o.tokenTypeIdx].concat(o.categoryMatches);for(let s of a)if(r.has(s)){if(!i.has(s))return!1}else r.add(s),i.add(s)}}return!0}function g3(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=h3(e.decisionStates[n],n);return r}function qf(e,t,r,n){let i=e[t](r),o=i.start;if(o===void 0){let s=N3(i.atnStartState);o=C1(i,N1(s)),i.start=o}return E3.apply(this,[i,o,r,n])}function E3(e,t,r,n){let i=t,o=1,a=[],s=this.LA(o++);while(!0){let f=L3(i,s);if(f===void 0)f=S3.apply(this,[e,i,s,o,r,n]);if(f===Gi)return R3(a,i,s);if(f.isAcceptState===!0)return f.prediction;i=f,a.push(s),s=this.LA(o++)}}function S3(e,t,r,n,i,o){let a=O3(t.configs,r,i);if(a.size===0)return U1(e,t,r,Gi),Gi;let s=N1(a),f=U3(a,i);if(f!==void 0)s.isAcceptState=!0,s.prediction=f,s.configs.uniqueAlt=f;else if(P3(a)){let u=n1(a.alts);s.isAcceptState=!0,s.prediction=u,s.configs.uniqueAlt=u,T3.apply(this,[e,n,a.alts,o])}return s=U1(e,t,r,s),s}function T3(e,t,r,n){let i=[];for(let u=1;u<=t;u++)i.push(this.LA(u).tokenType);let o=e.atnStartState,a=o.rule,s=o.production,f=y3({topLevelRule:a,ambiguityIndices:r,production:s,prefixPath:i});n(f)}function y3(e){let t=Je(e.prefixPath,(i)=>Bt(i)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${x3(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
149
- <${t}> may appears as a prefix path in all these alternatives.
150
- `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
151
- For Further details.`,n}function x3(e){if(e instanceof B)return"SUBRULE";else if(e instanceof F)return"OPTION";else if(e instanceof q)return"OR";else if(e instanceof X)return"AT_LEAST_ONE";else if(e instanceof J)return"AT_LEAST_ONE_SEP";else if(e instanceof V)return"MANY_SEP";else if(e instanceof k)return"MANY";else if(e instanceof M)return"CONSUME";else throw Error("non exhaustive match")}function R3(e,t,r){let n=s1(t.configs.elements,(o)=>o.state.transitions),i=E1(n.filter((o)=>o instanceof Di).map((o)=>o.tokenType),(o)=>o.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}function L3(e,t){return e.edges[t.tokenTypeIdx]}function O3(e,t,r){let n=new Ki,i=[];for(let a of e.elements){if(r.is(a.alt)===!1)continue;if(a.state.type===$n){i.push(a);continue}let s=a.state.transitions.length;for(let f=0;f<s;f++){let u=a.state.transitions[f],c=A3(u,t);if(c!==void 0)n.add({state:c,alt:a.alt,stack:a.stack})}}let o;if(i.length===0&&n.size===1)o=n;if(o===void 0){o=new Ki;for(let a of n.elements)Qa(a,o)}if(i.length>0&&!I3(o))for(let a of i)o.add(a);return o}function A3(e,t){if(e instanceof Di&&I(t,e.tokenType))return e.target;return}function U3(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function N1(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function U1(e,t,r,n){return n=C1(e,n),t.edges[r.tokenTypeIdx]=n,n}function C1(e,t){if(t===Gi)return t;let r=t.configs.key,n=e.states[r];if(n!==void 0)return n;return t.configs.finalize(),e.states[r]=t,t}function N3(e){let t=new Ki,r=e.transitions.length;for(let n=0;n<r;n++){let o={state:e.transitions[n].target,alt:n,stack:[]};Qa(o,t)}return t}function Qa(e,t){let r=e.state;if(r.type===$n){if(e.stack.length>0){let i=[...e.stack],a={state:i.pop(),alt:e.alt,stack:i};Qa(a,t)}else t.add(e);return}if(!r.epsilonOnlyTransitions)t.add(e);let n=r.transitions.length;for(let i=0;i<n;i++){let o=r.transitions[i],a=C3(e,o);if(a!==void 0)Qa(a,t)}}function C3(e,t){if(t instanceof za)return{state:t.target,alt:e.alt,stack:e.stack};else if(t instanceof ji){let r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}return}function I3(e){for(let t of e.elements)if(t.state.type===$n)return!0;return!1}function b3(e){for(let t of e.elements)if(t.state.type!==$n)return!1;return!0}function P3(e){if(b3(e))return!0;let t=M3(e.elements);return v3(t)&&!k3(t)}function M3(e){let t=new Map;for(let r of e){let n=Wf(r,!1),i=t.get(n);if(i===void 0)i={},t.set(n,i);i[r.alt]=!0}return t}function v3(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function k3(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function I1(e,t){e.RULE("literal",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integerLiteral)},{ALT:()=>e.SUBRULE(e.floatingPointLiteral)},{ALT:()=>e.SUBRULE(e.booleanLiteral)},{ALT:()=>e.CONSUME(t.CharLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.Null)}])}),e.RULE("integerLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.DecimalLiteral)},{ALT:()=>e.CONSUME(t.HexLiteral)},{ALT:()=>e.CONSUME(t.OctalLiteral)},{ALT:()=>e.CONSUME(t.BinaryLiteral)}])}),e.RULE("floatingPointLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.FloatLiteral)},{ALT:()=>e.CONSUME(t.HexFloatLiteral)}])}),e.RULE("booleanLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.True)},{ALT:()=>e.CONSUME(t.False)}])}),e.RULE("shiftOperator",()=>{e.OR([{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Less),e.CONSUME2(t.Less)}},{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Greater),e.CONSUME2(t.Greater),e.OPTION({GATE:()=>e.LA(0).startOffset+1===e.LA(1).startOffset,DEF:()=>e.CONSUME3(t.Greater)})}}])})}function b1(e,t){e.RULE("primitiveType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("numericType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integralType)},{ALT:()=>e.SUBRULE(e.floatingPointType)}])}),e.RULE("integralType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Byte)},{ALT:()=>e.CONSUME(t.Short)},{ALT:()=>e.CONSUME(t.Int)},{ALT:()=>e.CONSUME(t.Long)},{ALT:()=>e.CONSUME(t.Char)}])}),e.RULE("floatingPointType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Float)},{ALT:()=>e.CONSUME(t.Double)}])}),e.RULE("referenceType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR({DEF:[{ALT:()=>{e.SUBRULE(e.primitiveType),e.SUBRULE(e.dims)}},{ALT:()=>{e.SUBRULE(e.classOrInterfaceType),e.OPTION(()=>{e.SUBRULE2(e.dims)})}}],IGNORE_AMBIGUITIES:!0})}),e.RULE("classOrInterfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("classType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>e.SUBRULE2(e.typeArguments))})}),e.RULE("interfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("typeVariable",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier)}),e.RULE("dims",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.CONSUME(t.RSquare),e.MANY2({GATE:()=>e.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>{e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.LSquare),e.CONSUME2(t.RSquare)}})}),e.RULE("typeParameter",()=>{e.MANY(()=>{e.SUBRULE(e.typeParameterModifier)}),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeBound)})}),e.RULE("typeParameterModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("typeBound",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classOrInterfaceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)})}),e.RULE("additionalBound",()=>{e.CONSUME(t.And),e.SUBRULE(e.interfaceType)}),e.RULE("typeArguments",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeArgumentList),e.CONSUME(t.Greater)}),e.RULE("typeArgumentList",()=>{e.SUBRULE(e.typeArgument),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeArgument)})}),e.RULE("typeArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.referenceType)},{ALT:()=>e.SUBRULE(e.wildcard)}])}),e.RULE("wildcard",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.QuestionMark),e.OPTION(()=>{e.SUBRULE(e.wildcardBounds)})}),e.RULE("wildcardBounds",()=>{e.OR([{ALT:()=>e.CONSUME(t.Extends)},{ALT:()=>e.CONSUME(t.Super)}]),e.SUBRULE(e.referenceType)})}function P1(e,t){e.RULE("moduleName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("packageName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("typeName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("expressionName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>I(this.LA(2).tokenType,t.Identifier),DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("methodName",()=>{e.CONSUME(t.Identifier)}),e.RULE("packageOrTypeName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>I(this.LA(2).tokenType,t.Star)===!1,DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("ambiguousName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})})}function M1(e,t){e.RULE("compilationUnit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.ordinaryCompilationUnit)},{ALT:()=>e.SUBRULE(e.modularCompilationUnit)},{ALT:()=>e.CONSUME(Ye)}])}),e.RULE("ordinaryCompilationUnit",()=>{e.OPTION(()=>e.SUBRULE(e.packageDeclaration)),e.MANY(()=>{e.SUBRULE3(e.importDeclaration)}),e.MANY2(()=>{e.SUBRULE(e.typeDeclaration)})}),e.RULE("modularCompilationUnit",()=>{e.MANY(()=>{e.SUBRULE(e.importDeclaration)}),e.SUBRULE(e.moduleDeclaration)}),e.RULE("packageDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.packageModifier)}),e.CONSUME(t.Package),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME2(t.Semicolon)}),e.RULE("packageModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("importDeclaration",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Import),e.OPTION(()=>{e.CONSUME(t.Static)}),e.SUBRULE(e.packageOrTypeName),e.OPTION2(()=>{e.CONSUME(t.Dot),e.CONSUME(t.Star)}),e.CONSUME(t.Semicolon)}},{ALT:()=>e.SUBRULE(e.emptyStatement)}])}),e.RULE("typeDeclaration",()=>{e.OR([{ALT:()=>e.CONSUME(t.Semicolon)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)}])}),e.RULE("moduleDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>{e.CONSUME(t.Open)}),e.CONSUME(t.Module),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME(t.LCurly),e.MANY3(()=>{e.SUBRULE(e.moduleDirective)}),e.CONSUME(t.RCurly)}),e.RULE("moduleDirective",()=>{e.OR([{ALT:()=>e.SUBRULE(e.requiresModuleDirective)},{ALT:()=>e.SUBRULE(e.exportsModuleDirective)},{ALT:()=>e.SUBRULE(e.opensModuleDirective)},{ALT:()=>e.SUBRULE(e.usesModuleDirective)},{ALT:()=>e.SUBRULE(e.providesModuleDirective)}])}),e.RULE("requiresModuleDirective",()=>{e.CONSUME(t.Requires),e.MANY({GATE:()=>(I(e.LA(1).tokenType,t.Transitive)&&I(e.LA(2).tokenType,t.Separators))===!1,DEF:()=>{e.SUBRULE(e.requiresModifier)}}),e.SUBRULE(e.moduleName),e.CONSUME(t.Semicolon)}),e.RULE("exportsModuleDirective",()=>{e.CONSUME(t.Exports),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("opensModuleDirective",()=>{e.CONSUME(t.Opens),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("usesModuleDirective",()=>{e.CONSUME(t.Uses),e.SUBRULE(e.typeName),e.CONSUME(t.Semicolon)}),e.RULE("providesModuleDirective",()=>{e.CONSUME(t.Provides),e.SUBRULE(e.typeName),e.CONSUME(t.With),e.SUBRULE2(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE3(e.typeName)}),e.CONSUME(t.Semicolon)}),e.RULE("requiresModifier",()=>{e.OR([{ALT:()=>e.CONSUME(t.Transitive)},{ALT:()=>e.CONSUME(t.Static)}])})}function v1(e,t){e.RULE("classDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalClassDeclaration)},{ALT:()=>e.SUBRULE(e.enumDeclaration)},{ALT:()=>e.SUBRULE(e.recordDeclaration)}])}),e.RULE("normalClassDeclaration",()=>{e.CONSUME(t.Class),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.classExtends)}),e.OPTION3(()=>{e.SUBRULE(e.classImplements)}),e.OPTION4(()=>{e.SUBRULE(e.classPermits)}),e.SUBRULE(e.classBody)}),e.RULE("classModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("typeParameters",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeParameterList),e.CONSUME(t.Greater)}),e.RULE("typeParameterList",()=>{e.SUBRULE(e.typeParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeParameter)})}),e.RULE("classExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classType)}),e.RULE("classImplements",()=>{e.CONSUME(t.Implements),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfaceTypeList",()=>{e.SUBRULE(e.interfaceType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.interfaceType)})}),e.RULE("classPermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("classBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("classBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.classMemberDeclaration)},{ALT:()=>e.SUBRULE(e.instanceInitializer)},{ALT:()=>e.SUBRULE(e.staticInitializer)},{ALT:()=>e.SUBRULE(e.constructorDeclaration)}])}),e.RULE("classMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("fieldDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.fieldModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("fieldModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Transient)},{ALT:()=>e.CONSUME(t.Volatile)}])}),e.RULE("variableDeclaratorList",(r)=>{e.SUBRULE(e.variableDeclarator),e.MANY({GATE:()=>!r,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableDeclarator)}})}),e.RULE("variableDeclarator",()=>{e.SUBRULE(e.variableDeclaratorId),e.OPTION(()=>{e.CONSUME(t.Equals),e.SUBRULE(e.variableInitializer)})}),e.RULE("variableDeclaratorId",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.dims)})}},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("variableInitializer",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.arrayInitializer)}])}),e.RULE("unannType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.unannReferenceType)}])}),e.RULE("unannPrimitiveTypeWithOptionalDimsSuffix",()=>{e.SUBRULE(e.unannPrimitiveType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannPrimitiveType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("unannReferenceType",()=>{e.SUBRULE(e.unannClassOrInterfaceType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannClassOrInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannClassType",()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>{e.SUBRULE2(e.typeArguments)})})}),e.RULE("unannInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannTypeVariable",()=>{e.CONSUME(t.Identifier)}),e.RULE("methodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.methodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("methodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Synchronized)},{ALT:()=>e.CONSUME(t.Native)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("methodHeader",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters),e.MANY(()=>{e.SUBRULE(e.annotation)})}),e.SUBRULE(e.result),e.SUBRULE(e.methodDeclarator),e.OPTION2(()=>{e.SUBRULE(e.throws)})}),e.RULE("result",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Void)}])}),e.RULE("methodDeclarator",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION1(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace),e.OPTION2(()=>{e.SUBRULE(e.dims)})}),e.RULE("receiverParameter",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.unannType),e.OPTION(()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Dot)}),e.CONSUME(t.This)}),e.RULE("formalParameterList",()=>{e.SUBRULE(e.formalParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.formalParameter)})}),e.RULE("formalParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.variableParaRegularParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("variableParaRegularParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("variableArityParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.MANY2(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("variableModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("throws",()=>{e.CONSUME(t.Throws),e.SUBRULE(e.exceptionTypeList)}),e.RULE("exceptionTypeList",()=>{e.SUBRULE(e.exceptionType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.exceptionType)})}),e.RULE("exceptionType",()=>{e.SUBRULE(e.classType)}),e.RULE("methodBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("instanceInitializer",()=>{e.SUBRULE(e.block)}),e.RULE("staticInitializer",()=>{e.CONSUME(t.Static),e.SUBRULE(e.block)}),e.RULE("constructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.constructorDeclarator),e.OPTION(()=>{e.SUBRULE(e.throws)}),e.SUBRULE(e.constructorBody)}),e.RULE("constructorModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)}])}),e.RULE("constructorDeclarator",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.simpleTypeName),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION1(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION2(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace)}),e.RULE("simpleTypeName",()=>{e.SUBRULE(e.typeIdentifier)}),e.RULE("constructorBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.explicitConstructorInvocation)}),e.OPTION2(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("explicitConstructorInvocation",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unqualifiedExplicitConstructorInvocation)},{ALT:()=>e.SUBRULE(e.qualifiedExplicitConstructorInvocation)}])}),e.RULE("unqualifiedExplicitConstructorInvocation",()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Super)}]),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("qualifiedExplicitConstructorInvocation",()=>{e.SUBRULE(e.expressionName),e.CONSUME(t.Dot),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Super),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("enumDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.CONSUME(t.Enum),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.enumBody)}),e.RULE("enumBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.enumConstantList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.OPTION3(()=>{e.SUBRULE(e.enumBodyDeclarations)}),e.CONSUME(t.RCurly)}),e.RULE("enumConstantList",()=>{e.SUBRULE(e.enumConstant),e.MANY({GATE:()=>{let r=e.LA(2);return I(r,t.Identifier)||I(r,t.At)},DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.enumConstant)}})}),e.RULE("enumConstant",()=>{e.MANY(()=>{e.SUBRULE(e.enumConstantModifier)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("enumConstantModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("enumBodyDeclarations",()=>{e.CONSUME(t.Semicolon),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)})}),e.RULE("recordDeclaration",()=>{e.CONSUME(t.Record),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.recordHeader),e.OPTION2(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.recordBody)}),e.RULE("recordHeader",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.recordComponentList)}),e.CONSUME(t.RBrace)}),e.RULE("recordComponentList",()=>{e.SUBRULE(e.recordComponent),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.recordComponent)})}),e.RULE("recordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.recordComponentModifier)}),e.SUBRULE(e.unannType),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.SUBRULE(e.variableArityRecordComponent)}])}),e.RULE("variableArityRecordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("recordComponentModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("recordBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.recordBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("recordBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.compactConstructorDeclaration)},{ALT:()=>e.SUBRULE(e.classBodyDeclaration)}])}),e.RULE("compactConstructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.simpleTypeName),e.SUBRULE(e.constructorBody)}),e.RULE("isDims",()=>(e.MANY(e.annotation),I(this.LA(1),t.LSquare)&&I(this.LA(2),t.RSquare)))}function k1(e,t){e.RULE("interfaceDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalInterfaceDeclaration)},{ALT:()=>e.SUBRULE(e.annotationInterfaceDeclaration)}])}),e.RULE("normalInterfaceDeclaration",()=>{e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.interfaceExtends)}),e.OPTION3(()=>{e.SUBRULE(e.interfacePermits)}),e.SUBRULE(e.interfaceBody)}),e.RULE("interfaceModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("interfaceExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfacePermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("interfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.interfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("interfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceMethodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("constantDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constantModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("constantModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("interfaceMethodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceMethodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("interfaceMethodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Default)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("annotationInterfaceDeclaration",()=>{e.CONSUME(t.At),e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.SUBRULE(e.annotationInterfaceBody)}),e.RULE("annotationInterfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.annotationInterfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("annotationInterfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotationInterfaceElementDeclaration)},{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("annotationInterfaceElementDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotationInterfaceElementModifier)}),e.SUBRULE(e.unannType),e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.CONSUME(t.RBrace),e.OPTION(()=>{e.SUBRULE(e.dims)}),e.OPTION2(()=>{e.SUBRULE(e.defaultValue)}),e.CONSUME(t.Semicolon)}),e.RULE("annotationInterfaceElementModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Abstract)}])}),e.RULE("defaultValue",()=>{e.CONSUME(t.Default),e.SUBRULE(e.elementValue)}),e.RULE("annotation",()=>{e.CONSUME(t.At),e.SUBRULE(e.typeName),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OR({DEF:[{ALT:()=>e.SUBRULE(e.elementValuePairList)},{ALT:()=>e.SUBRULE(e.elementValue)},{ALT:()=>{}}],IGNORE_AMBIGUITIES:!0}),e.CONSUME(t.RBrace)})}),e.RULE("elementValuePairList",()=>{e.SUBRULE(e.elementValuePair),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValuePair)})}),e.RULE("elementValuePair",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Equals),e.SUBRULE(e.elementValue)}),e.RULE("elementValue",()=>{e.OR([{ALT:()=>e.SUBRULE(e.conditionalExpression)},{ALT:()=>e.SUBRULE(e.elementValueArrayInitializer)},{ALT:()=>e.SUBRULE(e.annotation)}])}),e.RULE("elementValueArrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.elementValueList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("elementValueList",()=>{e.SUBRULE(e.elementValue),e.MANY({GATE:()=>I(e.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValue)}})})}function _1(e,t){e.RULE("arrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.variableInitializerList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("variableInitializerList",()=>{e.SUBRULE(e.variableInitializer),e.MANY({GATE:()=>I(this.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableInitializer)}})})}function w1(e,t){e.RULE("block",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("blockStatements",()=>{e.SUBRULE(e.blockStatement),e.MANY(()=>{e.SUBRULE2(e.blockStatement)})}),e.RULE("blockStatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.localVariableDeclarationStatement)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.statement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("localVariableDeclarationStatement",()=>{e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Semicolon)}),e.RULE("localVariableDeclaration",(r)=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.localVariableType),e.SUBRULE(e.variableDeclaratorList,{ARGS:[r]})}),e.RULE("localVariableType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("statement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.statementWithoutTrailingSubstatement)},{ALT:()=>e.SUBRULE(e.labeledStatement)},{ALT:()=>e.SUBRULE(e.ifStatement)},{ALT:()=>e.SUBRULE(e.whileStatement)},{ALT:()=>e.SUBRULE(e.forStatement)}])}),e.RULE("statementWithoutTrailingSubstatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.SUBRULE(e.yieldStatement)},{ALT:()=>e.SUBRULE(e.emptyStatement)},{GATE:()=>!I(this.LA(1).tokenType,t.Switch),ALT:()=>e.SUBRULE(e.expressionStatement)},{ALT:()=>e.SUBRULE(e.assertStatement)},{ALT:()=>e.SUBRULE(e.switchStatement)},{ALT:()=>e.SUBRULE(e.doStatement)},{ALT:()=>e.SUBRULE(e.breakStatement)},{ALT:()=>e.SUBRULE(e.continueStatement)},{ALT:()=>e.SUBRULE(e.returnStatement)},{ALT:()=>e.SUBRULE(e.synchronizedStatement)},{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.tryStatement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("emptyStatement",()=>{e.CONSUME(t.Semicolon)}),e.RULE("labeledStatement",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Colon),e.SUBRULE(e.statement)}),e.RULE("expressionStatement",()=>{e.SUBRULE(e.statementExpression),e.CONSUME(t.Semicolon)}),e.RULE("statementExpression",()=>{e.SUBRULE(e.expression)}),e.RULE("ifStatement",()=>{e.CONSUME(t.If),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement),e.OPTION(()=>{e.CONSUME(t.Else),e.SUBRULE2(e.statement)})}),e.RULE("assertStatement",()=>{e.CONSUME(t.Assert),e.SUBRULE(e.expression),e.OPTION(()=>{e.CONSUME(t.Colon),e.SUBRULE2(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("switchStatement",()=>{e.CONSUME(t.Switch),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.switchBlock)}),e.RULE("switchBlock",()=>{e.CONSUME(t.LCurly),e.OR([{ALT:()=>{e.SUBRULE(e.switchRule),e.MANY(()=>e.SUBRULE2(e.switchRule))}},{ALT:()=>e.MANY2(()=>e.SUBRULE(e.switchBlockStatementGroup))}]),e.CONSUME(t.RCurly)}),e.RULE("switchBlockStatementGroup",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Colon),e.OPTION(()=>{e.SUBRULE(e.blockStatements)})}),e.RULE("switchLabel",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Case),e.OR2([{ALT:()=>{e.CONSUME(t.Null),e.OPTION2(()=>{e.CONSUME3(t.Comma),e.CONSUME(t.Default)})}},{ALT:()=>{e.SUBRULE(e.casePattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.casePattern)}),e.OPTION(()=>{e.SUBRULE(e.guard)})}},{GATE:()=>!I(e.LA(1).tokenType,t.Null),ALT:()=>{e.SUBRULE(e.caseConstant),e.MANY2(()=>{e.CONSUME2(t.Comma),e.SUBRULE2(e.caseConstant)})}}])}},{ALT:()=>e.CONSUME2(t.Default)}])}),e.RULE("switchRule",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Arrow),e.OR([{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>{e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}}])}),e.RULE("caseConstant",()=>{e.SUBRULE(e.conditionalExpression)}),e.RULE("casePattern",()=>{e.SUBRULE(e.pattern)}),e.RULE("whileStatement",()=>{e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("doStatement",()=>{e.CONSUME(t.Do),e.SUBRULE(e.statement),e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("forStatement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.basicForStatement)},{ALT:()=>e.SUBRULE(e.enhancedForStatement)}])}),e.RULE("basicForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.forInit)}),e.CONSUME(t.Semicolon),e.OPTION2(()=>{e.SUBRULE(e.expression)}),e.CONSUME2(t.Semicolon),e.OPTION3(()=>{e.SUBRULE(e.forUpdate)}),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("forInit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.statementExpressionList)}])}),e.RULE("forUpdate",()=>{e.SUBRULE(e.statementExpressionList)}),e.RULE("statementExpressionList",()=>{e.SUBRULE(e.statementExpression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.statementExpression)})}),e.RULE("enhancedForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Colon),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("breakStatement",()=>{e.CONSUME(t.Break),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("continueStatement",()=>{e.CONSUME(t.Continue),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("returnStatement",()=>{e.CONSUME(t.Return),e.OPTION(()=>{e.SUBRULE(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("throwStatement",()=>{e.CONSUME(t.Throw),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("synchronizedStatement",()=>{e.CONSUME(t.Synchronized),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("tryStatement",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Try),e.SUBRULE(e.block),e.OR2([{ALT:()=>{e.SUBRULE(e.catches),e.OPTION(()=>{e.SUBRULE(e.finally)})}},{ALT:()=>e.SUBRULE2(e.finally)}])}},{ALT:()=>e.SUBRULE(e.tryWithResourcesStatement)}])}),e.RULE("catches",()=>{e.SUBRULE(e.catchClause),e.MANY(()=>{e.SUBRULE2(e.catchClause)})}),e.RULE("catchClause",()=>{e.CONSUME(t.Catch),e.CONSUME(t.LBrace),e.SUBRULE(e.catchFormalParameter),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("catchFormalParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.catchType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("catchType",()=>{e.SUBRULE(e.unannClassType),e.MANY(()=>{e.CONSUME(t.Or),e.SUBRULE2(e.classType)})}),e.RULE("finally",()=>{e.CONSUME(t.Finally),e.SUBRULE(e.block)}),e.RULE("tryWithResourcesStatement",()=>{e.CONSUME(t.Try),e.SUBRULE(e.resourceSpecification),e.SUBRULE(e.block),e.OPTION(()=>{e.SUBRULE(e.catches)}),e.OPTION2(()=>{e.SUBRULE(e.finally)})}),e.RULE("resourceSpecification",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.resourceList),e.OPTION(()=>{e.CONSUME(t.Semicolon)}),e.CONSUME(t.RBrace)}),e.RULE("resourceList",()=>{e.SUBRULE(e.resource),e.MANY({GATE:()=>I(e.LA(2).tokenType,t.RBrace)===!1,DEF:()=>{e.CONSUME(t.Semicolon),e.SUBRULE2(e.resource)}})}),e.RULE("resource",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.variableAccess)}])}),e.RULE("yieldStatement",()=>{e.CONSUME(t.Yield),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("variableAccess",()=>{e.SUBRULE(e.primary)})}function B1(e,t){e.RULE("expression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.conditionalExpression)}])}),e.RULE("lambdaExpression",()=>{e.SUBRULE(e.lambdaParameters),e.CONSUME(t.Arrow),e.SUBRULE(e.lambdaBody)}),e.RULE("lambdaParameters",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaParametersWithBraces)},{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaParametersWithBraces",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.lambdaParameterList)}),e.CONSUME(t.RBrace)}),e.RULE("lambdaParameterList",()=>{e.OR([{GATE:()=>{let r=this.LA(1).tokenType,n=this.LA(2).tokenType;return(I(r,t.Identifier)||I(r,t.Underscore))&&(I(n,t.RBrace)||I(n,t.Comma))},ALT:()=>e.SUBRULE(e.conciseLambdaParameterList)},{ALT:()=>e.SUBRULE(e.normalLambdaParameterList)}])}),e.RULE("conciseLambdaParameterList",()=>{e.SUBRULE(e.conciseLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.conciseLambdaParameter)})}),e.RULE("normalLambdaParameterList",()=>{e.SUBRULE(e.normalLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.normalLambdaParameter)})}),e.RULE("normalLambdaParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.regularLambdaParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("regularLambdaParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.lambdaParameterType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("lambdaParameterType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("conciseLambdaParameter",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.block)}])}),e.RULE("conditionalExpression",()=>{e.SUBRULE(e.binaryExpression),e.OPTION(()=>{e.CONSUME(t.QuestionMark),e.SUBRULE(e.expression),e.CONSUME(t.Colon),e.SUBRULE2(e.expression)})}),e.RULE("binaryExpression",()=>{e.SUBRULE(e.unaryExpression),e.MANY(()=>{e.OR({DEF:[{ALT:()=>{e.CONSUME(t.Instanceof),e.OR1([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.referenceType)}])}},{ALT:()=>{e.CONSUME(t.AssignmentOperator),e.SUBRULE2(e.expression)}},{GATE:()=>I(e.LA(2).tokenType,t.Less)||I(e.LA(2).tokenType,t.Greater),ALT:()=>{e.SUBRULE(e.shiftOperator),e.SUBRULE2(e.unaryExpression)}},{ALT:()=>{e.CONSUME(t.BinaryOperator),e.SUBRULE3(e.unaryExpression)}}],IGNORE_AMBIGUITIES:!0})})}),e.RULE("unaryExpression",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperator)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("unaryExpressionNotPlusMinus",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperatorNotPlusMinus)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("primary",()=>{e.SUBRULE(e.primaryPrefix),e.MANY(()=>{e.SUBRULE(e.primarySuffix)})}),e.RULE("primaryPrefix",()=>{e.OR([{ALT:()=>e.SUBRULE(e.literal)},{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Void)},{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.fqnOrRefType)},{ALT:()=>e.SUBRULE(e.castExpression)},{ALT:()=>e.SUBRULE(e.parenthesisExpression)},{ALT:()=>e.SUBRULE(e.newExpression)},{ALT:()=>e.SUBRULE(e.switchStatement)}])}),e.RULE("primarySuffix",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Dot),e.OR2([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)},{ALT:()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Identifier)}},{ALT:()=>e.SUBRULE(e.templateArgument)}])}},{ALT:()=>e.SUBRULE(e.methodInvocationSuffix)},{ALT:()=>e.SUBRULE(e.classLiteralSuffix)},{ALT:()=>e.SUBRULE(e.arrayAccessSuffix)},{ALT:()=>e.SUBRULE(e.methodReferenceSuffix)}])}),e.RULE("fqnOrRefType",()=>{e.SUBRULE(e.fqnOrRefTypePartFirst),e.MANY({GATE:()=>{let r=e.LA(2);return!(I(r,t.Class)||I(r,t.This)||I(r,t.New)||I(r,t.StringLiteral)||I(r,t.TextBlock)||I(r,t.StringTemplateBegin)||I(r,t.TextBlockTemplateBegin))},DEF:()=>{e.CONSUME(t.Dot),e.SUBRULE2(e.fqnOrRefTypePartRest)}}),e.OPTION({GATE:()=>I(e.LA(1).tokenType,t.At)||I(e.LA(2).tokenType,t.RSquare),DEF:()=>{e.SUBRULE(e.dims)}})}),e.RULE("fqnOrRefTypePartRest",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>e.SUBRULE2(e.typeArguments)),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("fqnOrRefTypePartCommon",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Super)}]);let r=!1;if(I(e.LA(1).tokenType,t.Less))r=this.BACKTRACK_LOOKAHEAD(e.isRefTypeInMethodRef);e.OPTION2({GATE:()=>r,DEF:()=>{e.SUBRULE3(e.typeArguments)}})}),e.RULE("fqnOrRefTypePartFirst",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("parenthesisExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace)}),e.RULE("castExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.primitiveCastExpression)},{ALT:()=>e.SUBRULE(e.referenceTypeCastExpression)}])}),e.RULE("primitiveCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.primitiveType),e.CONSUME(t.RBrace),e.SUBRULE(e.unaryExpression)}),e.RULE("referenceTypeCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.referenceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)}),e.CONSUME(t.RBrace),e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.unaryExpressionNotPlusMinus)}])}),e.RULE("newExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.arrayCreationExpression)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)}])}),e.RULE("unqualifiedClassInstanceCreationExpression",()=>{e.CONSUME(t.New),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.SUBRULE(e.classOrInterfaceTypeToInstantiate),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("classOrInterfaceTypeToInstantiate",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier)}),e.OPTION(()=>{e.SUBRULE(e.typeArgumentsOrDiamond)})}),e.RULE("typeArgumentsOrDiamond",()=>{e.OR([{ALT:()=>e.SUBRULE(e.diamond)},{ALT:()=>e.SUBRULE(e.typeArguments)}])}),e.RULE("diamond",()=>{e.CONSUME(t.Less),e.CONSUME(t.Greater)}),e.RULE("methodInvocationSuffix",()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.RULE("argumentList",()=>{e.SUBRULE(e.expression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.expression)})}),e.RULE("arrayCreationExpression",()=>{e.CONSUME(t.New),e.OR([{ALT:()=>e.SUBRULE(e.primitiveType)},{ALT:()=>e.SUBRULE(e.classOrInterfaceType)}]),e.OR2([{ALT:()=>e.SUBRULE(e.arrayCreationExpressionWithoutInitializerSuffix)},{ALT:()=>e.SUBRULE(e.arrayCreationWithInitializerSuffix)}])}),e.RULE("arrayCreationExpressionWithoutInitializerSuffix",()=>{e.SUBRULE(e.dimExprs),e.OPTION(()=>{e.SUBRULE(e.dims)})}),e.RULE("arrayCreationWithInitializerSuffix",()=>{e.SUBRULE(e.dims),e.SUBRULE(e.arrayInitializer)}),e.RULE("dimExprs",()=>{e.SUBRULE(e.dimExpr),e.MANY({GATE:()=>I(e.LA(2).tokenType,t.RSquare)===!1,DEF:()=>e.SUBRULE2(e.dimExpr)})}),e.RULE("dimExpr",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("classLiteralSuffix",()=>{e.MANY(()=>{e.CONSUME(t.LSquare),e.CONSUME(t.RSquare)}),e.CONSUME(t.Dot),e.CONSUME(t.Class)}),e.RULE("arrayAccessSuffix",()=>{e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("methodReferenceSuffix",()=>{e.CONSUME(t.ColonColon),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.New)}])}),e.RULE("templateArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.template)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)}])}),e.RULE("template",()=>{e.OR([{ALT:()=>e.SUBRULE(e.stringTemplate)},{ALT:()=>e.SUBRULE(e.textBlockTemplate)}])}),e.RULE("stringTemplate",()=>{e.CONSUME(t.StringTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.StringTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.StringTemplateEnd)}),e.RULE("textBlockTemplate",()=>{e.CONSUME(t.TextBlockTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.TextBlockTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.TextBlockTemplateEnd)}),e.RULE("embeddedExpression",()=>{e.OPTION(()=>{e.SUBRULE(e.expression)})}),e.RULE("pattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.typePattern)},{ALT:()=>e.SUBRULE(e.recordPattern)}])}),e.RULE("typePattern",()=>{e.SUBRULE(e.localVariableDeclaration,{ARGS:[!0]})}),e.RULE("recordPattern",()=>{e.SUBRULE(e.referenceType),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.componentPatternList)}),e.CONSUME(t.RBrace)}),e.RULE("componentPatternList",()=>{e.SUBRULE(e.componentPattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.componentPattern)})}),e.RULE("componentPattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.matchAllPattern)}])}),e.RULE("matchAllPattern",()=>{e.CONSUME(t.Underscore)}),e.RULE("guard",()=>{e.CONSUME(t.When),e.SUBRULE(e.expression)}),e.RULE("isRefTypeInMethodRef",()=>{let r=void 0;e.SUBRULE(e.typeArguments);let n=e.OPTION(()=>{e.SUBRULE(e.dims)}),i=this.LA(1).tokenType;if(I(i,t.ColonColon))r=!0;else if(n)r=!1;if(e.OPTION2(()=>{e.CONSUME(t.Dot),e.SUBRULE(e.classOrInterfaceType)}),r!==void 0)return r;let o=this.LA(1).tokenType;return I(o,t.ColonColon)})}function F1(){return this.computeContentAssist("unaryExpressionNotPlusMinus",[]).map((r)=>r.nextTokenType).filter((r,n,i)=>i.indexOf(r)===n)}class $a extends ga{constructor(){super(Ft,{lookaheadStrategy:new Za({logging:_i()?()=>{}:void 0}),nodeLocationTracking:"full",skipValidations:_i()});let e=this;e.RULE("typeIdentifier",()=>{e.CONSUME(Xe.Identifier)}),I1.call(this,e,Xe),b1.call(this,e,Xe),P1.call(this,e,Xe),v1.call(this,e,Xe),M1.call(this,e,Xe),k1.call(this,e,Xe),_1.call(this,e,Xe),w1.call(this,e,Xe),B1.call(this,e,Xe),this.firstForUnaryExpressionNotPlusMinus=[],this.performSelfAnalysis(),this.firstForUnaryExpressionNotPlusMinus=F1.call(this)}cstPostNonTerminal(e,t){if(this.isBackTracking())return;super.cstPostNonTerminal(e,t)}BACKTRACK_LOOKAHEAD(e,t=!1){return this.ACTION(()=>{this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{let{ruleName:n,originalGrammarAction:i}=e;try{return this.ruleInvocationStateUpdate(this.fullRuleNameToShort[n],n,this.subruleIdx),i.call(this)}catch(o){return this.invokeRuleCatch(o,!0,()=>{return})}finally{this.ruleFinallyStateUpdate()}}catch(n){if(Ut(n))return t;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}})}}var ti=new $a,zpe=ti.getBaseCstVisitorConstructor(),D1=ti.getBaseCstVisitorConstructorWithDefaults();function W3(e,t="compilationUnit"){let r=pg.tokenize(e);if(r.errors.length>0){let o=r.errors[0];throw Error("Sad sad panda, lexing errors detected in line: "+o.line+", column: "+o.column+`!
152
- `+o.message)}let n=r.tokens;ti.input=n;let i=ti[t]();if(ti.errors.length>0){let o=ti.errors[0];throw Error("Sad sad panda, parsing errors detected in line: "+o.token.startLine+", column: "+o.token.startColumn+`!
153
- `+o.message+`!
154
- ->`+o.context.ruleStack.join(`
155
- ->`))}return i.comments=r.groups.comments,{cst:i,tokens:n}}function j1(e,t="compilationUnit"){return W3(e,t).cst}class G1 extends D1{content="";parsed=null;contextStack=[];package="";imports=[];info={...structuredClone(Ps),pathChainFields:[]};constructor(){super();this.validateVisitor()}async loadFile(e){this.info.container={fileName:e};try{let t=await V3.readFile(e,"utf-8");return this.parseContent(t)}catch(t){return`Could not read file: ${e} - ${t}`}}parseContent(e){try{this.content=e,this.parsed=j1(this.content)}catch(t){return`Could not parse content - ${t}`}try{this.visit(this.parsed)}catch(t){return`Could not visit parsed CST for file: ${this.info.name} - ${t}`}return!0}packageDeclaration(e){this.package=Be(e.Identifier)||"",super.packageDeclaration(e)}importDeclaration(e){let t=Be(E(e.packageOrTypeName)?.Identifier);if(b(t)&&!t.startsWith("com.pedropathing.")&&!t.startsWith("com.bylazar.")&&!t.startsWith("com.technototes.library."))this.imports.push(t);super.importDeclaration(e)}fieldDeclaration(e){let t=q3(e);if(b(t))return this.info.values.push(t),super.fieldDeclaration(e);let r=X3(e);if(b(r))return this.info.poses.push(r),super.fieldDeclaration(e);let n=J3(e);if(b(n))return this.info.beziers.push(n),super.fieldDeclaration(e);let i=Q3(e);if(b(i))this.info.pathChainFields.push(i);return super.fieldDeclaration(e)}constructorDeclaration(e){return this.info.pathChainHelpers.push(...r6(e)),this.info.pathChains.push(...n6(e)),super.constructorDeclaration(e)}classDeclaration(e,t){let r=Be(E(E(e?.normalClassDeclaration)?.typeIdentifier)?.Identifier);if(A(r))return;if(this.contextStack.length!==0){let i=this.info;this.info={...structuredClone(Ps),container:{className:i.name},pathChainFields:[]},i.children[r]=this.info}this.info.name=r,this.contextStack.push(this.info);let n=super.classDeclaration(e,t);if(this.info.name=this.contextStack.map((i)=>i.name).join("."),this.contextStack.pop(),this.contextStack.length>0)this.info=this.contextStack[this.contextStack.length-1];return n}}function es(e){if(!Zt(e)||e.length!==1)return;return e[0]}function E(e){return es(e)?.children}function Be(e){if(Zt(e))return e.map((t)=>t.image).join(".");else return e?.image}function K1(e){switch(e){case"BezierLine":return Zr.Line;case"BezierCurve":return Zr.Curve}}function zf(e){if(!e.fieldModifier||e.fieldModifier.length!==2)return!1;if(!e.fieldModifier.every((t)=>t.children.Public||t.children.Static))return!1;return!0}function H1(e){if(!e.fieldModifier||e.fieldModifier.length!==1)return!1;return b(e.fieldModifier[0].children.Public)}function q3(e){if(!zf(e))return;let t=E(E(E(E(e.unannType)?.unannPrimitiveTypeWithOptionalDimsSuffix)?.unannPrimitiveType)?.numericType);if(!t)return;let r="double";if(t.floatingPointType){if(!E(t.floatingPointType)?.Double)return}else if(t.integralType){if(!E(t.integralType)?.Int)return;r="int"}if(e.variableDeclaratorList.length!==1)return;let n=E(E(e.variableDeclaratorList)?.variableDeclarator);if(!n)return;let i=Be(E(n.variableDeclaratorId)?.Identifier);if(!i)return;let o=i,a=es(E(n.variableInitializer)?.expression);if(A(a))return;let s=Pr(a);if(v(s))return{name:o,value:s};if(Ms(s)||io(s))return{name:o,value:s}}function W1(e){let t=E(E(E(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=Be(t?.UnaryPrefixOperator)==="-"?-1:1,n=E(E(E(t?.primary)?.primaryPrefix)?.literal);if(b(n?.integerLiteral)){let i=Be(E(n.integerLiteral)?.DecimalLiteral);if(b(i))return{int:parseInt(i)*r}}else if(b(n?.floatingPointLiteral)){let i=Be(E(n.floatingPointLiteral)?.FloatLiteral);if(b(i))return{double:parseFloat(i)*r}}return}function Xf(e){let t=Be(E(E(E(e)?.fqnOrRefTypePartFirst)?.fqnOrRefTypePartCommon)?.Identifier);if(A(t))return;let r=E(e)?.fqnOrRefTypePartRest;if(b(r))for(let n of r.map((i)=>i.children.fqnOrRefTypePartCommon)){let i=Be(es(n)?.children.Identifier);if(b(i))t=t+"."+i}return t}function V1(e){let t=E(E(E(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=E(E(t?.primary)?.primaryPrefix);if(b(r?.fqnOrRefType))return Xf(r.fqnOrRefType)}function ts(e,t){if(A(e))return;let r=V1(e);return v(r)?r:t(e)}function q1(e){let t=E(e.primaryPrefix)?.fqnOrRefType;if(A(t))return;return Xf(t)}function Y3(e){let t=E(E(E(E(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(t))return;let r=q1(t);if(A(r)||r!=="Math.toRadians"||A(e.children.conditionalExpression))return;let n=E(E(E(E(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix;if(A(n)||n.length===0)return;let i=Kt(n[0]);if(A(i)||i.length!==1)return;let o=br(i[0]);if(v(o))return{radians:o};else if(b(o))return{radians:o}}function br(e){if(A(e))return;return ts(e,W1)}function z3(e){if(A(e))return;let t=Y3(e);return b(t)?t:ts(e,W1)}function Jf(e){return Be(E(E(E(E(e)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier)}function rs(e){return Be(E(e?.variableDeclaratorId)?.Identifier)}function Qf(e){return E(E(e.variableDeclaratorList)?.variableDeclarator)}function Y1(e){return E(E(E(E(E(E(E(e?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primaryPrefix)?.newExpression)?.unqualifiedClassInstanceCreationExpression)}function Zf(e,t){let r;if(!ae(e,"name")){let o=es(E(e.variableInitializer)?.expression);if(A(o))return["",void 0];r=o}else r=e;let n=Y1(r?.children),i=Be(E(n?.classOrInterfaceTypeToInstantiate)?.Identifier);if(b(t)&&i!==t)return["",void 0];return[t||i||"",E(n?.argumentList)?.expression]}function X3(e){if(!zf(e)&&!H1(e))return;if(Jf(e.unannType)!=="Pose")return;let r=Qf(e);if(A(r))return;let n=rs(r);if(A(n))return;let i=z1(r);return b(i)?{name:n,pose:i}:void 0}function z1(e){let[,t]=Zf(e,"Pose");if(A(t)||t.length!==3&&t.length!==2)return;let r=br(t[0]),n=br(t[1]);if(A(r)||A(n))return;let i=t.length===3?Pr(t[2]):void 0;return A(i)?{x:r,y:n}:{x:r,y:n,heading:i}}function X1(e){return ts(e,z1)}function J1(e,t){let r=Zt(e)?e[0]:e;if(A(r))return;let[n,i]=Zf(r,t);if(A(i))return;let o=K1(n);if(A(o))return;let a=i.map(X1);if(!a.every(b))return;return{type:o,points:a}}function J3(e){if(!zf(e))return;let t=Jf(e.unannType);if(A(t))return;let r=K1(t),n=Qf(e);if(A(n)||A(r))return;let i=rs(n);if(A(i))return;let o=i,a=J1(E(n.variableInitializer)?.expression);if(b(a))return{name:o,points:a}}function Q3(e){if(!H1(e))return;if(Jf(e.unannType)!=="PathChain")return;let t=Qf(e);if(A(t))return;return rs(t)}function Kt(e){if(Zt(e))return Kt(e[0]);return E(E(e?.children.methodInvocationSuffix)?.argumentList)?.expression}function Pr(e,t=!1){let r=z3(e);if(b(r)&&t){if(Vu(r)&&r.endsWith(".getHeading"))return r.substring(0,r.length-11)}return r}function Z3(e){return ts(e,J1)}function $3(e){let[t,r]=Zf(e);if(A(r)||t!=="HeadingInterpolator.PiecewiseNode"||r.length!==3)return;let n=br(r[0]),i=br(r[1]),o=Q1(r[2],!0);if(A(n)||A(i)||A(o))return;return{timing:{start:n,end:i},heading:o}}function Q1(e,t){let r=V1(e);if(A(r))return;let n=Kt(E(E(E(E(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix);switch(r){case"HeadingInterpolator.piecewise":if(t||A(n))break;let i=n.map($3);if(i.every(b))return{type:he.Piecewise,pieces:i};break;case"HeadingInterpolator.facingPoint":if(b(n)&&n.length>0&&n.length<3){if(n.length===1){let u=X1(n[0]);if(b(u))return{type:he.Point,point:u}}else if(n.length===2){let u=br(n[0]),c=br(n[1]);if(b(u)&&b(c))return{type:he.Point,point:{x:u,y:c}}}}return;case"HeadingInterpolator.tangent":if(b(n))return;else return{type:he.Tangent};case"HeadingInterpolator.constant":if(b(n)){let u=Pr(n[0]);if(b(u))return{type:he.Constant,heading:u}}return;case"HeadingInterpolator.linear":case"HeadingInterpolator.reversedLinear":if(A(n)||n.length<2)return;let o=Pr(n[0]),a=Pr(n[1]);if(A(o)||A(a)||n.length>3)return;let s=n.length===3?br(n[3]):void 0,f={type:he.Linear,start:o,end:a};return r.indexOf("v")<0?f:{type:he.Reversed,facing:f};case"HeadingInterpolator.reverse":console.error("NYI: HeadingInterpolator.reverse");return;case"HeadingInterpolator.offset":console.error("NYI: HeadingInterpolator.offset");return}}function e6(e){let t=E(E(E(E(E(E(E(e.children.statement)?.statementWithoutTrailingSubstatement)?.expressionStatement)?.statementExpression)?.expression)?.conditionalExpression)?.binaryExpression);if(A(t)||A(t.AssignmentOperator))return;let r=E(E(E(t.unaryExpression)?.primary)?.primaryPrefix);if(A(r)||A(r.fqnOrRefType))return;let n=Xf(r.fqnOrRefType),i=E(E(E(E(E(t.expression)?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(i))return;let o=q1(i);if(A(o)||o!=="follower.pathBuilder")return;let a=i.primarySuffix;if(A(a)||a.length<5)return;let s=[],f=null,u="pathBuilder";for(let c=0;c<a.length;c++){let l=a[c];if(c%2===1){if(A(l?.children?.Dot))return;switch(u=Be(l.children.Identifier),u){case"pathBuilder":case"addPath":case"setTangentHeadingInterpolation":case"setLinearHeadingInterpolation":case"setConstantHeadingInterpolation":case"setHeadingInterpolation":case"setReversed":case"build":continue;default:return}}else switch(u){case"pathBuilder":case"build":if(b(Kt(l)))return;continue;case"setTangentHeadingInterpolation":if(b(Kt(l)))return;f={type:he.Tangent};continue;case"setLinearHeadingInterpolation":let p=Kt(l);if(p?.length!==2)return;let h=Pr(p[0],!0),S=Pr(p[1],!0);if(A(h)||A(S))return;f={type:he.Linear,start:h,end:S};continue;case"setConstantHeadingInterpolation":let T=Kt(l);if(T?.length!==1)return;let y=Pr(T[0],!0);if(A(y))return;f={type:he.Constant,heading:y};continue;case"setReversed":if(f===null)return;f={type:he.Reversed,facing:f};continue;case"setHeadingInterpolation":let m=Kt(l);if(A(m)||m.length!==1)return;let g=Q1(m[0]);if(A(g))return;f=g;continue;case"addPath":let d=Kt(l);if(d?.length!==1)return;let x=Z3(d[0]);if(A(x))return;s.push(x);continue;default:return}}if(f===null)return;return{name:n,paths:s,heading:f}}function t6(e){let t=E(E(e.children.localVariableDeclarationStatement)?.localVariableDeclaration);if(A(t))return;let r=E(E(E(E(E(t.localVariableType)?.unannType)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier;if(A(r)||r.length===0)return;let n=E(E(t.variableDeclaratorList)?.variableDeclarator);if(A(n))return;let i=Be(r),o=rs(n);if(A(o)||A(i))return;let a=Y1(E(E(n.variableInitializer)?.expression));if(A(a))return;let s=E(a.classOrInterfaceTypeToInstantiate)?.Identifier;if(A(s))return;if(Be(s)!==i)return;if(b(a.argumentList)||b(a.classBody)||b(a.typeArguments))return;return{name:o,staticType:i}}function r6(e){let t=E(E(e.constructorBody)?.blockStatements)?.blockStatement;if(A(t))return[];return t.map(t6).filter(b)}function n6(e){let t=E(E(e.constructorBody)?.blockStatements)?.blockStatement;if(A(t))return[];return t.map(e6).filter(b)}async function Z1(e){let t=new G1,r=await t.loadFile(e);if(v(r))return li(r);let n={...t.info};if(delete n.pathChainFields,$f(n)){let i=[...t.imports];Hi(n,(o)=>{let a=[...i];if(ae(o.container,"className"))a.push(t.package+"."+o.container.className);else a.push(t.package);o.imports=a,o.fullName=`${t.package}.${o.name}`})}return n}function $f(e){let t=!1;return Hi(e,(r)=>{if(r.beziers.length||r.poses.length||r.pathChains.length||r.values.length)return t=!0,!0}),t}var Qe={HasFieldImage:!1,TeamPaths:It(),PathClasses:It(),ParsedClasses:new Map};function Hi(e,t){let r=[e];while(r.length>0){let n=r.pop();if(t(n)===!0)return;r.push(...Object.values(n.children))}}async function i6(e,t){let r=uc(e,t),n=await Z1(r);if(Qt(n))return n;let i=[];return Hi(n,(o)=>i.push(o.name)),[i,n]}function o6(e,t,r,n){if(!$f(n))return;let i=$r(e,t);Qe.TeamPaths.set(e,i),Hi(n,(o)=>{let a=_s(i,o.name);Qe.PathClasses.set(i,a),Qe.ParsedClasses.set(a,o)})}async function ns(){s6();let e=await fc();for(let[t,r]of e)for(let n of r){let i=rc(n),o=await i6(t,i);if(!Qt(o))o6(t,i,o[0],o[1])}return Qe.HasFieldImage=await lc(),a6()}function a6(){return Qe}function s6(){Qe.TeamPaths.clear(),Qe.PathClasses.clear(),Qe.ParsedClasses.clear()}function $1(e){Qe.TeamPaths=e.TeamPaths,Qe.PathClasses=e.PathClasses,Qe.ParsedClasses=e.ParsedClasses}function f6(e,t){let r=Qe.PathClasses.get($r(e,t));if(A(r))return li(`List: ${e}:${t} no Pedro pathing classes found`);return[...r.keys()].map(nc)}function eS(e,t){let r=f6(e,t);if(Qt(r))return r;let n=r.reduce((a,s)=>a.length<s.length?a:s),i=_s($r(e,t),n),o=Qe.ParsedClasses.get(i);if(A(o))return li(`Root: ${e}:${t} no Pedro pathing classes found`);return o}import*as tS from"child_process";function rS(e){let t="",r=process.platform;if(/^darwin/.test(r))t="open";else if(/^win/.test(r))t="start";else if(/^linux/.test(r))t="xdg-open";else{console.log(`open a brower to ${e} to launch the application`);return}tS.exec(t+" "+e,(n,i,o)=>{if(n!==null&&n!==void 0)console.log(`exec error: ${JSON.stringify(n)}`)})}async function nS(e){console.log("Parsing code: Please wait..."),await ns(),console.log(`\uD83D\uDE80 Server running at ${e}`),await u6(1500),rS(e.toString())}function iS(e,t,r){return Response.json({message:`Data received for ${e}: ${r}`})}async function oS(e){let t=e!=="dark"&&e!=="light"?"dark":e,r=pc(t);if(console.log("Image Path: ",r),b(r))return new Response(Bun.file(r));return console.log("Replying with SVG field"),new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}})}async function aS(e){let t=e!=="dark"&&e!=="light"?"dark":e;return console.log("SVG field requested"),new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}})}async function sS(e,t){let r=eS(e,t);if(Qt(r))return Response.json({error:r.errors().join(`
156
- `)});return Response.json(JSON.parse(bs(r)))}async function fS(){let e=await ns();return Response.json(JSON.parse(bs(e)))}async function uS(e){console.log("Saving DB");try{let t=Wu(e,ic);if(b(t))$1(t);else return Response.json({error:"Failed to unpickle database"})}catch(t){return Response.json({error:"Crashed while unpickle database"})}return Response.json({success:1})}if(!cc()){let e=[...process.argv.slice(2),process.cwd()].map((t)=>l6.resolve(t));sc(e),p6(import.meta.dir)}var m6=c6({routes:{"/*":su,"/img/field/:theme":async(e)=>oS(e.params.theme),"/img/svg/:theme":async(e)=>aS(e.params.theme),"/api/loadpath/:team/:path":async(e)=>sS(decodeURIComponent(e.params.team),decodeURIComponent(e.params.path)),"/api/savepath/:team/:path/:data":async(e)=>iS(decodeURIComponent(e.params.team),decodeURIComponent(e.params.path),decodeURIComponent(e.params.data)),"/api/db":async(e)=>fS(),"/api/putdb":{PUT:async(e)=>uS(JSON.stringify(await e.json()))}},development:!1});nS(m6.url).then(()=>{}).catch(console.error);