@layerzerolabs/verify-contract 1.1.8 → 1.1.10
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/README.md +3 -11
- package/cli.js +3 -0
- package/dist/antlr/SolidityLexer.tokens +249 -0
- package/dist/cli.js +495 -0
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +1757 -12516
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1757 -12516
- package/dist/index.mjs.map +1 -1
- package/package.json +37 -39
- package/cli/index.js +0 -26
- /package/{cli → dist/antlr}/Solidity.tokens +0 -0
package/cli/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node --max-old-space-size=4096
|
|
2
|
-
(()=>{var e={4175:(e,t,r)=>{var i={};e["exports"]=i;i.themes={};var n=r(3837);var s=i.styles=r(5691);var o=Object.defineProperties;var a=new RegExp(/[\r\n]+/g);i.supportsColor=r(1959).supportsColor;if(typeof i.enabled==="undefined"){i.enabled=i.supportsColor()!==false}i.enable=function(){i.enabled=true};i.disable=function(){i.enabled=false};i.stripColors=i.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var l=i.stylize=function stylize(e,t){if(!i.enabled){return e+""}var r=s[t];if(!r&&t in i){return i[t](e)}return r.open+e+r.close};var u=/[|\\{}()[\]^$+*?.]/g;var escapeStringRegexp=function(e){if(typeof e!=="string"){throw new TypeError("Expected a string")}return e.replace(u,"\\$&")};function build(e){var t=function builder(){return applyStyle.apply(builder,arguments)};t._styles=e;t.__proto__=h;return t}var c=function(){var e={};s.grey=s.gray;Object.keys(s).forEach((function(t){s[t].closeRe=new RegExp(escapeStringRegexp(s[t].close),"g");e[t]={get:function(){return build(this._styles.concat(t))}}}));return e}();var h=o((function colors(){}),c);function applyStyle(){var e=Array.prototype.slice.call(arguments);var t=e.map((function(e){if(e!=null&&e.constructor===String){return e}else{return n.inspect(e)}})).join(" ");if(!i.enabled||!t){return t}var r=t.indexOf("\n")!=-1;var o=this._styles;var l=o.length;while(l--){var u=s[o[l]];t=u.open+t.replace(u.closeRe,u.open)+u.close;if(r){t=t.replace(a,(function(e){return u.close+e+u.open}))}}return t}i.setTheme=function(e){if(typeof e==="string"){console.log("colors.setTheme now only accepts an object, not a string. "+"If you are trying to set a theme from a file, it is now your (the "+"caller's) responsibility to require the file. The old syntax "+"looked like colors.setTheme(__dirname + "+"'/../themes/generic-logging.js'); The new syntax looks like "+"colors.setTheme(require(__dirname + "+"'/../themes/generic-logging.js'));");return}for(var t in e){(function(t){i[t]=function(r){if(typeof e[t]==="object"){var n=r;for(var s in e[t]){n=i[e[t][s]](n)}return n}return i[e[t]](r)}})(t)}};function init(){var e={};Object.keys(c).forEach((function(t){e[t]={get:function(){return build([t])}}}));return e}var d=function sequencer(e,t){var r=t.split("");r=r.map(e);return r.join("")};i.trap=r(9493);i.zalgo=r(90);i.maps={};i.maps.america=r(9337)(i);i.maps.zebra=r(3792)(i);i.maps.rainbow=r(9565)(i);i.maps.random=r(8212)(i);for(var p in i.maps){(function(e){i[e]=function(t){return d(i.maps[e],t)}})(p)}o(i,init())},9493:e=>{e["exports"]=function runTheTrap(e,t){var r="";e=e||"Run the trap, drop the bass";e=e.split("");var i={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};e.forEach((function(e){e=e.toLowerCase();var t=i[e]||[" "];var n=Math.floor(Math.random()*t.length);if(typeof i[e]!=="undefined"){r+=i[e][n]}else{r+=e}}));return r}},90:e=>{e["exports"]=function zalgo(e,t){e=e||" he is here ";var r={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]};var i=[].concat(r.up,r.down,r.mid);function randomNumber(e){var t=Math.floor(Math.random()*e);return t}function isChar(e){var t=false;i.filter((function(r){t=r===e}));return t}function heComes(e,t){var i="";var n;var s;t=t||{};t["up"]=typeof t["up"]!=="undefined"?t["up"]:true;t["mid"]=typeof t["mid"]!=="undefined"?t["mid"]:true;t["down"]=typeof t["down"]!=="undefined"?t["down"]:true;t["size"]=typeof t["size"]!=="undefined"?t["size"]:"maxi";e=e.split("");for(s in e){if(isChar(s)){continue}i=i+e[s];n={up:0,down:0,mid:0};switch(t.size){case"mini":n.up=randomNumber(8);n.mid=randomNumber(2);n.down=randomNumber(8);break;case"maxi":n.up=randomNumber(16)+3;n.mid=randomNumber(4)+1;n.down=randomNumber(64)+3;break;default:n.up=randomNumber(8)+1;n.mid=randomNumber(6)/2;n.down=randomNumber(8)+1;break}var o=["up","mid","down"];for(var a in o){var l=o[a];for(var u=0;u<=n[l];u++){if(t[l]){i=i+r[l][randomNumber(r[l].length)]}}}}return i}return heComes(e,t)}},9337:e=>{e["exports"]=function(e){return function(t,r,i){if(t===" ")return t;switch(r%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}},9565:e=>{e["exports"]=function(e){var t=["red","yellow","green","blue","magenta"];return function(r,i,n){if(r===" "){return r}else{return e[t[i++%t.length]](r)}}}},8212:e=>{e["exports"]=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:e[t[Math.round(Math.random()*(t.length-2))]](r)}}},3792:e=>{e["exports"]=function(e){return function(t,r,i){return r%2===0?t:e.inverse(t)}}},5691:e=>{var t={};e["exports"]=t;var r={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(r).forEach((function(e){var i=r[e];var n=t[e]=[];n.open="["+i[0]+"m";n.close="["+i[1]+"m"}))},3680:e=>{"use strict";e.exports=function(e,t){t=t||process.argv;var r=t.indexOf("--");var i=/^-{1,2}/.test(e)?"":"--";var n=t.indexOf(i+e);return n!==-1&&(r===-1?true:n<r)}},1959:(e,t,r)=>{"use strict";var i=r(2037);var n=r(3680);var s=process.env;var o=void 0;if(n("no-color")||n("no-colors")||n("color=false")){o=false}else if(n("color")||n("colors")||n("color=true")||n("color=always")){o=true}if("FORCE_COLOR"in s){o=s.FORCE_COLOR.length===0||parseInt(s.FORCE_COLOR,10)!==0}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===false){return 0}if(n("color=16m")||n("color=full")||n("color=truecolor")){return 3}if(n("color=256")){return 2}if(e&&!e.isTTY&&o!==true){return 0}var t=o?1:0;if(process.platform==="win32"){var r=i.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586){return Number(r[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in s}))||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if("TERM_PROGRAM"in s){var a=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}if(s.TERM==="dumb"){return t}return t}function getSupportLevel(e){var t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},9256:(e,t,r)=>{var i=r(4175);e["exports"]=i},4235:(e,t,r)=>{var i=r(3495);e.exports=function create(e){return function adapter(t){try{return i(t,e())}catch(e){}return false}}},1009:(e,t,r)=>{var i=r(4235);e.exports=i((function processenv(){return process.env.DEBUG||process.env.DIAGNOSTICS}))},3201:e=>{var t=[];var r=[];var i=function devnull(){};function use(e){if(~t.indexOf(e))return false;t.push(e);return true}function set(e){i=e}function enabled(e){var r=[];for(var i=0;i<t.length;i++){if(t[i].async){r.push(t[i]);continue}if(t[i](e))return true}if(!r.length)return false;return new Promise((function pinky(t){Promise.all(r.map((function prebind(t){return t(e)}))).then((function resolved(e){t(e.some(Boolean))}))}))}function modify(e){if(~r.indexOf(e))return false;r.push(e);return true}function write(){i.apply(i,arguments)}function process(e){for(var t=0;t<r.length;t++){e=r[t].apply(r[t],arguments)}return e}function introduce(e,t){var r=Object.prototype.hasOwnProperty;for(var i in t){if(r.call(t,i)){e[i]=t[i]}}return e}function nope(e){e.enabled=false;e.modify=modify;e.set=set;e.use=use;return introduce((function diagnopes(){return false}),e)}function yep(e){function diagnostics(){var t=Array.prototype.slice.call(arguments,0);write.call(write,e,process(t,e));return true}e.enabled=true;e.modify=modify;e.set=set;e.use=use;return introduce(diagnostics,e)}e.exports=function create(e){e.introduce=introduce;e.enabled=enabled;e.process=process;e.modify=modify;e.write=write;e.nope=nope;e.yep=yep;e.set=set;e.use=use;return e}},1238:e=>{e.exports=function(e,t){try{Function.prototype.apply.call(console.log,console,t)}catch(e){}}},5037:(e,t,r)=>{var i=r(5917);var n=r(6287);e.exports=function ansiModifier(e,t){var r=t.namespace;var s=t.colors!==false?n(r+":",i(r)):r+":";e[0]=s+" "+e[0];return e}},611:(e,t,r)=>{var i=r(3201);var n=r(6224).isatty(1);var s=i((function dev(e,t){t=t||{};t.colors="colors"in t?t.colors:n;t.namespace=e;t.prod=false;t.dev=true;if(!dev.enabled(e)&&!(t.force||dev.force)){return dev.nope(t)}return dev.yep(t)}));s.modify(r(5037));s.use(r(1009));s.set(r(1238));e.exports=s},3170:(e,t,r)=>{if(process.env.NODE_ENV==="production"){e.exports=r(9827)}else{e.exports=r(611)}},9827:(e,t,r)=>{var i=r(3201);var n=i((function prod(e,t){t=t||{};t.namespace=e;t.prod=true;t.dev=false;if(!(t.force||prod.force))return prod.nope(t);return prod.yep(t)}));e.exports=n},7902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="abi/5.7.0"},9606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.defaultAbiCoder=t.AbiCoder=void 0;var i=r(2056);var n=r(8078);var s=r(2975);var o=r(7902);var a=new s.Logger(o.version);var l=r(3321);var u=r(2325);var c=r(153);var h=r(9208);var d=r(4425);var p=r(1676);var m=r(6883);var g=r(2194);var y=r(83);var _=r(5671);var v=r(7737);var b=new RegExp(/^bytes([0-9]*)$/);var x=new RegExp(/^(u?int)([0-9]*)$/);var T=function(){function AbiCoder(e){(0,n.defineReadOnly)(this,"coerceFunc",e||null)}AbiCoder.prototype._getCoder=function(e){var t=this;switch(e.baseType){case"address":return new u.AddressCoder(e.name);case"bool":return new h.BooleanCoder(e.name);case"string":return new y.StringCoder(e.name);case"bytes":return new d.BytesCoder(e.name);case"array":return new c.ArrayCoder(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _.TupleCoder((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new m.NullCoder(e.name)}var r=e.type.match(x);if(r){var i=parseInt(r[2]||"256");if(i===0||i>256||i%8!==0){a.throwArgumentError("invalid "+r[1]+" bit length","param",e)}return new g.NumberCoder(i/8,r[1]==="int",e.name)}r=e.type.match(b);if(r){var i=parseInt(r[1]);if(i===0||i>32){a.throwArgumentError("invalid bytes length","param",e)}return new p.FixedBytesCoder(i,e.name)}return a.throwArgumentError("invalid type","type",e.type)};AbiCoder.prototype._getWordSize=function(){return 32};AbiCoder.prototype._getReader=function(e,t){return new l.Reader(e,this._getWordSize(),this.coerceFunc,t)};AbiCoder.prototype._getWriter=function(){return new l.Writer(this._getWordSize())};AbiCoder.prototype.getDefaultValue=function(e){var t=this;var r=e.map((function(e){return t._getCoder(v.ParamType.from(e))}));var i=new _.TupleCoder(r,"_");return i.defaultValue()};AbiCoder.prototype.encode=function(e,t){var r=this;if(e.length!==t.length){a.throwError("types/values length mismatch",s.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}})}var i=e.map((function(e){return r._getCoder(v.ParamType.from(e))}));var n=new _.TupleCoder(i,"_");var o=this._getWriter();n.encode(o,t);return o.data};AbiCoder.prototype.decode=function(e,t,r){var n=this;var s=e.map((function(e){return n._getCoder(v.ParamType.from(e))}));var o=new _.TupleCoder(s,"_");return o.decode(this._getReader((0,i.arrayify)(t),r))};return AbiCoder}();t.AbiCoder=T;t.defaultAbiCoder=new T},3321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Reader=t.Writer=t.Coder=t.checkResultErrors=void 0;var i=r(2056);var n=r(1267);var s=r(8078);var o=r(2975);var a=r(7902);var l=new o.Logger(a.version);function checkResultErrors(e){var t=[];var checkErrors=function(e,r){if(!Array.isArray(r)){return}for(var i in r){var n=e.slice();n.push(i);try{checkErrors(n,r[i])}catch(e){t.push({path:n,error:e})}}};checkErrors([],e);return t}t.checkResultErrors=checkResultErrors;var u=function(){function Coder(e,t,r,i){this.name=e;this.type=t;this.localName=r;this.dynamic=i}Coder.prototype._throwError=function(e,t){l.throwArgumentError(e,this.localName,t)};return Coder}();t.Coder=u;var c=function(){function Writer(e){(0,s.defineReadOnly)(this,"wordSize",e||32);this._data=[];this._dataLength=0;this._padding=new Uint8Array(e)}Object.defineProperty(Writer.prototype,"data",{get:function(){return(0,i.hexConcat)(this._data)},enumerable:false,configurable:true});Object.defineProperty(Writer.prototype,"length",{get:function(){return this._dataLength},enumerable:false,configurable:true});Writer.prototype._writeData=function(e){this._data.push(e);this._dataLength+=e.length;return e.length};Writer.prototype.appendWriter=function(e){return this._writeData((0,i.concat)(e._data))};Writer.prototype.writeBytes=function(e){var t=(0,i.arrayify)(e);var r=t.length%this.wordSize;if(r){t=(0,i.concat)([t,this._padding.slice(r)])}return this._writeData(t)};Writer.prototype._getValue=function(e){var t=(0,i.arrayify)(n.BigNumber.from(e));if(t.length>this.wordSize){l.throwError("value out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length})}if(t.length%this.wordSize){t=(0,i.concat)([this._padding.slice(t.length%this.wordSize),t])}return t};Writer.prototype.writeValue=function(e){return this._writeData(this._getValue(e))};Writer.prototype.writeUpdatableValue=function(){var e=this;var t=this._data.length;this._data.push(this._padding);this._dataLength+=this.wordSize;return function(r){e._data[t]=e._getValue(r)}};return Writer}();t.Writer=c;var h=function(){function Reader(e,t,r,n){(0,s.defineReadOnly)(this,"_data",(0,i.arrayify)(e));(0,s.defineReadOnly)(this,"wordSize",t||32);(0,s.defineReadOnly)(this,"_coerceFunc",r);(0,s.defineReadOnly)(this,"allowLoose",n);this._offset=0}Object.defineProperty(Reader.prototype,"data",{get:function(){return(0,i.hexlify)(this._data)},enumerable:false,configurable:true});Object.defineProperty(Reader.prototype,"consumed",{get:function(){return this._offset},enumerable:false,configurable:true});Reader.coerce=function(e,t){var r=e.match("^u?int([0-9]+)$");if(r&&parseInt(r[1])<=48){t=t.toNumber()}return t};Reader.prototype.coerce=function(e,t){if(this._coerceFunc){return this._coerceFunc(e,t)}return Reader.coerce(e,t)};Reader.prototype._peekBytes=function(e,t,r){var i=Math.ceil(t/this.wordSize)*this.wordSize;if(this._offset+i>this._data.length){if(this.allowLoose&&r&&this._offset+t<=this._data.length){i=t}else{l.throwError("data out-of-bounds",o.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})}}return this._data.slice(this._offset,this._offset+i)};Reader.prototype.subReader=function(e){return new Reader(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)};Reader.prototype.readBytes=function(e,t){var r=this._peekBytes(0,e,!!t);this._offset+=r.length;return r.slice(0,e)};Reader.prototype.readValue=function(){return n.BigNumber.from(this.readBytes(this.wordSize))};return Reader}();t.Reader=h},2325:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.AddressCoder=void 0;var n=r(8957);var s=r(2056);var o=r(3321);var a=function(e){i(AddressCoder,e);function AddressCoder(t){return e.call(this,"address","address",t,false)||this}AddressCoder.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000"};AddressCoder.prototype.encode=function(e,t){try{t=(0,n.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)};AddressCoder.prototype.decode=function(e){return(0,n.getAddress)((0,s.hexZeroPad)(e.readValue().toHexString(),20))};return AddressCoder}(o.Coder);t.AddressCoder=a},7722:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.AnonymousCoder=void 0;var n=r(3321);var s=function(e){i(AnonymousCoder,e);function AnonymousCoder(t){var r=e.call(this,t.name,t.type,undefined,t.dynamic)||this;r.coder=t;return r}AnonymousCoder.prototype.defaultValue=function(){return this.coder.defaultValue()};AnonymousCoder.prototype.encode=function(e,t){return this.coder.encode(e,t)};AnonymousCoder.prototype.decode=function(e){return this.coder.decode(e)};return AnonymousCoder}(n.Coder);t.AnonymousCoder=s},153:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.ArrayCoder=t.unpack=t.pack=void 0;var n=r(2975);var s=r(7902);var o=new n.Logger(s.version);var a=r(3321);var l=r(7722);function pack(e,t,r){var i=null;if(Array.isArray(r)){i=r}else if(r&&typeof r==="object"){var s={};i=t.map((function(e){var t=e.localName;if(!t){o.throwError("cannot encode object for signature with missing names",n.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r})}if(s[t]){o.throwError("cannot encode object for signature with duplicate names",n.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r})}s[t]=true;return r[t]}))}else{o.throwArgumentError("invalid tuple value","tuple",r)}if(t.length!==i.length){o.throwArgumentError("types/value length mismatch","tuple",r)}var l=new a.Writer(e.wordSize);var u=new a.Writer(e.wordSize);var c=[];t.forEach((function(e,t){var r=i[t];if(e.dynamic){var n=u.length;e.encode(u,r);var s=l.writeUpdatableValue();c.push((function(e){s(e+n)}))}else{e.encode(l,r)}}));c.forEach((function(e){e(l.length)}));var h=e.appendWriter(l);h+=e.appendWriter(u);return h}t.pack=pack;function unpack(e,t){var r=[];var i=e.subReader(0);t.forEach((function(t){var s=null;if(t.dynamic){var o=e.readValue();var a=i.subReader(o.toNumber());try{s=t.decode(a)}catch(e){if(e.code===n.Logger.errors.BUFFER_OVERRUN){throw e}s=e;s.baseType=t.name;s.name=t.localName;s.type=t.type}}else{try{s=t.decode(e)}catch(e){if(e.code===n.Logger.errors.BUFFER_OVERRUN){throw e}s=e;s.baseType=t.name;s.name=t.localName;s.type=t.type}}if(s!=undefined){r.push(s)}}));var s=t.reduce((function(e,t){var r=t.localName;if(r){if(!e[r]){e[r]=0}e[r]++}return e}),{});t.forEach((function(e,t){var i=e.localName;if(!i||s[i]!==1){return}if(i==="length"){i="_length"}if(r[i]!=null){return}var n=r[t];if(n instanceof Error){Object.defineProperty(r,i,{enumerable:true,get:function(){throw n}})}else{r[i]=n}}));var _loop_1=function(e){var t=r[e];if(t instanceof Error){Object.defineProperty(r,e,{enumerable:true,get:function(){throw t}})}};for(var o=0;o<r.length;o++){_loop_1(o)}return Object.freeze(r)}t.unpack=unpack;var u=function(e){i(ArrayCoder,e);function ArrayCoder(t,r,i){var n=this;var s=t.type+"["+(r>=0?r:"")+"]";var o=r===-1||t.dynamic;n=e.call(this,"array",s,i,o)||this;n.coder=t;n.length=r;return n}ArrayCoder.prototype.defaultValue=function(){var e=this.coder.defaultValue();var t=[];for(var r=0;r<this.length;r++){t.push(e)}return t};ArrayCoder.prototype.encode=function(e,t){if(!Array.isArray(t)){this._throwError("expected array value",t)}var r=this.length;if(r===-1){r=t.length;e.writeValue(t.length)}o.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));var i=[];for(var n=0;n<t.length;n++){i.push(this.coder)}return pack(e,i,t)};ArrayCoder.prototype.decode=function(e){var t=this.length;if(t===-1){t=e.readValue().toNumber();if(t*32>e._data.length){o.throwError("insufficient data length",n.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t})}}var r=[];for(var i=0;i<t;i++){r.push(new l.AnonymousCoder(this.coder))}return e.coerce(this.name,unpack(e,r))};return ArrayCoder}(a.Coder);t.ArrayCoder=u},9208:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.BooleanCoder=void 0;var n=r(3321);var s=function(e){i(BooleanCoder,e);function BooleanCoder(t){return e.call(this,"bool","bool",t,false)||this}BooleanCoder.prototype.defaultValue=function(){return false};BooleanCoder.prototype.encode=function(e,t){return e.writeValue(t?1:0)};BooleanCoder.prototype.decode=function(e){return e.coerce(this.type,!e.readValue().isZero())};return BooleanCoder}(n.Coder);t.BooleanCoder=s},4425:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.BytesCoder=t.DynamicBytesCoder=void 0;var n=r(2056);var s=r(3321);var o=function(e){i(DynamicBytesCoder,e);function DynamicBytesCoder(t,r){return e.call(this,t,t,r,true)||this}DynamicBytesCoder.prototype.defaultValue=function(){return"0x"};DynamicBytesCoder.prototype.encode=function(e,t){t=(0,n.arrayify)(t);var r=e.writeValue(t.length);r+=e.writeBytes(t);return r};DynamicBytesCoder.prototype.decode=function(e){return e.readBytes(e.readValue().toNumber(),true)};return DynamicBytesCoder}(s.Coder);t.DynamicBytesCoder=o;var a=function(e){i(BytesCoder,e);function BytesCoder(t){return e.call(this,"bytes",t)||this}BytesCoder.prototype.decode=function(t){return t.coerce(this.name,(0,n.hexlify)(e.prototype.decode.call(this,t)))};return BytesCoder}(o);t.BytesCoder=a},1676:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.FixedBytesCoder=void 0;var n=r(2056);var s=r(3321);var o=function(e){i(FixedBytesCoder,e);function FixedBytesCoder(t,r){var i=this;var n="bytes"+String(t);i=e.call(this,n,n,r,false)||this;i.size=t;return i}FixedBytesCoder.prototype.defaultValue=function(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)};FixedBytesCoder.prototype.encode=function(e,t){var r=(0,n.arrayify)(t);if(r.length!==this.size){this._throwError("incorrect data length",t)}return e.writeBytes(r)};FixedBytesCoder.prototype.decode=function(e){return e.coerce(this.name,(0,n.hexlify)(e.readBytes(this.size)))};return FixedBytesCoder}(s.Coder);t.FixedBytesCoder=o},6883:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.NullCoder=void 0;var n=r(3321);var s=function(e){i(NullCoder,e);function NullCoder(t){return e.call(this,"null","",t,false)||this}NullCoder.prototype.defaultValue=function(){return null};NullCoder.prototype.encode=function(e,t){if(t!=null){this._throwError("not null",t)}return e.writeBytes([])};NullCoder.prototype.decode=function(e){e.readBytes(0);return e.coerce(this.name,null)};return NullCoder}(n.Coder);t.NullCoder=s},2194:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.NumberCoder=void 0;var n=r(1267);var s=r(1309);var o=r(3321);var a=function(e){i(NumberCoder,e);function NumberCoder(t,r,i){var n=this;var s=(r?"int":"uint")+t*8;n=e.call(this,s,s,i,false)||this;n.size=t;n.signed=r;return n}NumberCoder.prototype.defaultValue=function(){return 0};NumberCoder.prototype.encode=function(e,t){var r=n.BigNumber.from(t);var i=s.MaxUint256.mask(e.wordSize*8);if(this.signed){var o=i.mask(this.size*8-1);if(r.gt(o)||r.lt(o.add(s.One).mul(s.NegativeOne))){this._throwError("value out-of-bounds",t)}}else if(r.lt(s.Zero)||r.gt(i.mask(this.size*8))){this._throwError("value out-of-bounds",t)}r=r.toTwos(this.size*8).mask(this.size*8);if(this.signed){r=r.fromTwos(this.size*8).toTwos(8*e.wordSize)}return e.writeValue(r)};NumberCoder.prototype.decode=function(e){var t=e.readValue().mask(this.size*8);if(this.signed){t=t.fromTwos(this.size*8)}return e.coerce(this.name,t)};return NumberCoder}(o.Coder);t.NumberCoder=a},83:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.StringCoder=void 0;var n=r(9115);var s=r(4425);var o=function(e){i(StringCoder,e);function StringCoder(t){return e.call(this,"string",t)||this}StringCoder.prototype.defaultValue=function(){return""};StringCoder.prototype.encode=function(t,r){return e.prototype.encode.call(this,t,(0,n.toUtf8Bytes)(r))};StringCoder.prototype.decode=function(t){return(0,n.toUtf8String)(e.prototype.decode.call(this,t))};return StringCoder}(s.DynamicBytesCoder);t.StringCoder=o},5671:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.TupleCoder=void 0;var n=r(3321);var s=r(153);var o=function(e){i(TupleCoder,e);function TupleCoder(t,r){var i=this;var n=false;var s=[];t.forEach((function(e){if(e.dynamic){n=true}s.push(e.type)}));var o="tuple("+s.join(",")+")";i=e.call(this,"tuple",o,r,n)||this;i.coders=t;return i}TupleCoder.prototype.defaultValue=function(){var e=[];this.coders.forEach((function(t){e.push(t.defaultValue())}));var t=this.coders.reduce((function(e,t){var r=t.localName;if(r){if(!e[r]){e[r]=0}e[r]++}return e}),{});this.coders.forEach((function(r,i){var n=r.localName;if(!n||t[n]!==1){return}if(n==="length"){n="_length"}if(e[n]!=null){return}e[n]=e[i]}));return Object.freeze(e)};TupleCoder.prototype.encode=function(e,t){return(0,s.pack)(e,this.coders,t)};TupleCoder.prototype.decode=function(e){return e.coerce(this.name,(0,s.unpack)(e,this.coders))};return TupleCoder}(n.Coder);t.TupleCoder=o},7737:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.ErrorFragment=t.FunctionFragment=t.ConstructorFragment=t.EventFragment=t.Fragment=t.ParamType=t.FormatTypes=void 0;var n=r(1267);var s=r(8078);var o=r(2975);var a=r(7902);var l=new o.Logger(a.version);var u={};var c={calldata:true,memory:true,storage:true};var h={calldata:true,memory:true};function checkModifier(e,t){if(e==="bytes"||e==="string"){if(c[t]){return true}}else if(e==="address"){if(t==="payable"){return true}}else if(e.indexOf("[")>=0||e==="tuple"){if(h[t]){return true}}if(c[t]||t==="payable"){l.throwArgumentError("invalid modifier","name",t)}return false}function parseParamType(e,t){var r=e;function throwError(t){l.throwArgumentError("unexpected character at position "+t,"param",e)}e=e.replace(/\s/g," ");function newNode(e){var r={type:"",name:"",parent:e,state:{allowType:true}};if(t){r.indexed=false}return r}var i={type:"",name:"",state:{allowType:true}};var n=i;for(var s=0;s<e.length;s++){var o=e[s];switch(o){case"(":if(n.state.allowType&&n.type===""){n.type="tuple"}else if(!n.state.allowParams){throwError(s)}n.state.allowType=false;n.type=verifyType(n.type);n.components=[newNode(n)];n=n.components[0];break;case")":delete n.state;if(n.name==="indexed"){if(!t){throwError(s)}n.indexed=true;n.name=""}if(checkModifier(n.type,n.name)){n.name=""}n.type=verifyType(n.type);var a=n;n=n.parent;if(!n){throwError(s)}delete a.parent;n.state.allowParams=false;n.state.allowName=true;n.state.allowArray=true;break;case",":delete n.state;if(n.name==="indexed"){if(!t){throwError(s)}n.indexed=true;n.name=""}if(checkModifier(n.type,n.name)){n.name=""}n.type=verifyType(n.type);var u=newNode(n.parent);n.parent.components.push(u);delete n.parent;n=u;break;case" ":if(n.state.allowType){if(n.type!==""){n.type=verifyType(n.type);delete n.state.allowType;n.state.allowName=true;n.state.allowParams=true}}if(n.state.allowName){if(n.name!==""){if(n.name==="indexed"){if(!t){throwError(s)}if(n.indexed){throwError(s)}n.indexed=true;n.name=""}else if(checkModifier(n.type,n.name)){n.name=""}else{n.state.allowName=false}}}break;case"[":if(!n.state.allowArray){throwError(s)}n.type+=o;n.state.allowArray=false;n.state.allowName=false;n.state.readArray=true;break;case"]":if(!n.state.readArray){throwError(s)}n.type+=o;n.state.readArray=false;n.state.allowArray=true;n.state.allowName=true;break;default:if(n.state.allowType){n.type+=o;n.state.allowParams=true;n.state.allowArray=true}else if(n.state.allowName){n.name+=o;delete n.state.allowArray}else if(n.state.readArray){n.type+=o}else{throwError(s)}}}if(n.parent){l.throwArgumentError("unexpected eof","param",e)}delete i.state;if(n.name==="indexed"){if(!t){throwError(r.length-7)}if(n.indexed){throwError(r.length-7)}n.indexed=true;n.name=""}else if(checkModifier(n.type,n.name)){n.name=""}i.type=verifyType(i.type);return i}function populate(e,t){for(var r in t){(0,s.defineReadOnly)(e,r,t[r])}}t.FormatTypes=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"});var d=new RegExp(/^(.*)\[([0-9]*)\]$/);var p=function(){function ParamType(e,t){if(e!==u){l.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"})}populate(this,t);var r=this.type.match(d);if(r){populate(this,{arrayLength:parseInt(r[2]||"-1"),arrayChildren:ParamType.fromObject({type:r[1],components:this.components}),baseType:"array"})}else{populate(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type})}this._isParamType=true;Object.freeze(this)}ParamType.prototype.format=function(e){if(!e){e=t.FormatTypes.sighash}if(!t.FormatTypes[e]){l.throwArgumentError("invalid format type","format",e)}if(e===t.FormatTypes.json){var r={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||undefined};if(typeof this.indexed==="boolean"){r.indexed=this.indexed}if(this.components){r.components=this.components.map((function(t){return JSON.parse(t.format(e))}))}return JSON.stringify(r)}var i="";if(this.baseType==="array"){i+=this.arrayChildren.format(e);i+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"}else{if(this.baseType==="tuple"){if(e!==t.FormatTypes.sighash){i+=this.type}i+="("+this.components.map((function(t){return t.format(e)})).join(e===t.FormatTypes.full?", ":",")+")"}else{i+=this.type}}if(e!==t.FormatTypes.sighash){if(this.indexed===true){i+=" indexed"}if(e===t.FormatTypes.full&&this.name){i+=" "+this.name}}return i};ParamType.from=function(e,t){if(typeof e==="string"){return ParamType.fromString(e,t)}return ParamType.fromObject(e)};ParamType.fromObject=function(e){if(ParamType.isParamType(e)){return e}return new ParamType(u,{name:e.name||null,type:verifyType(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ParamType.fromObject):null})};ParamType.fromString=function(e,t){function ParamTypify(e){return ParamType.fromObject({name:e.name,type:e.type,indexed:e.indexed,components:e.components})}return ParamTypify(parseParamType(e,!!t))};ParamType.isParamType=function(e){return!!(e!=null&&e._isParamType)};return ParamType}();t.ParamType=p;function parseParams(e,t){return splitNesting(e).map((function(e){return p.fromString(e,t)}))}var m=function(){function Fragment(e,t){if(e!==u){l.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"})}populate(this,t);this._isFragment=true;Object.freeze(this)}Fragment.from=function(e){if(Fragment.isFragment(e)){return e}if(typeof e==="string"){return Fragment.fromString(e)}return Fragment.fromObject(e)};Fragment.fromObject=function(e){if(Fragment.isFragment(e)){return e}switch(e.type){case"function":return _.fromObject(e);case"event":return g.fromObject(e);case"constructor":return y.fromObject(e);case"error":return v.fromObject(e);case"fallback":case"receive":return null}return l.throwArgumentError("invalid fragment object","value",e)};Fragment.fromString=function(e){e=e.replace(/\s/g," ");e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ");e=e.trim();if(e.split(" ")[0]==="event"){return g.fromString(e.substring(5).trim())}else if(e.split(" ")[0]==="function"){return _.fromString(e.substring(8).trim())}else if(e.split("(")[0].trim()==="constructor"){return y.fromString(e.trim())}else if(e.split(" ")[0]==="error"){return v.fromString(e.substring(5).trim())}return l.throwArgumentError("unsupported fragment","value",e)};Fragment.isFragment=function(e){return!!(e&&e._isFragment)};return Fragment}();t.Fragment=m;var g=function(e){i(EventFragment,e);function EventFragment(){return e!==null&&e.apply(this,arguments)||this}EventFragment.prototype.format=function(e){if(!e){e=t.FormatTypes.sighash}if(!t.FormatTypes[e]){l.throwArgumentError("invalid format type","format",e)}if(e===t.FormatTypes.json){return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))})}var r="";if(e!==t.FormatTypes.sighash){r+="event "}r+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===t.FormatTypes.full?", ":",")+") ";if(e!==t.FormatTypes.sighash){if(this.anonymous){r+="anonymous "}}return r.trim()};EventFragment.from=function(e){if(typeof e==="string"){return EventFragment.fromString(e)}return EventFragment.fromObject(e)};EventFragment.fromObject=function(e){if(EventFragment.isEventFragment(e)){return e}if(e.type!=="event"){l.throwArgumentError("invalid event object","value",e)}var t={name:verifyIdentifier(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(p.fromObject):[],type:"event"};return new EventFragment(u,t)};EventFragment.fromString=function(e){var t=e.match(x);if(!t){l.throwArgumentError("invalid event string","value",e)}var r=false;t[3].split(" ").forEach((function(e){switch(e.trim()){case"anonymous":r=true;break;case"":break;default:l.warn("unknown modifier: "+e)}}));return EventFragment.fromObject({name:t[1].trim(),anonymous:r,inputs:parseParams(t[2],true),type:"event"})};EventFragment.isEventFragment=function(e){return e&&e._isFragment&&e.type==="event"};return EventFragment}(m);t.EventFragment=g;function parseGas(e,t){t.gas=null;var r=e.split("@");if(r.length!==1){if(r.length>2){l.throwArgumentError("invalid human-readable ABI signature","value",e)}if(!r[1].match(/^[0-9]+$/)){l.throwArgumentError("invalid human-readable ABI signature gas","value",e)}t.gas=n.BigNumber.from(r[1]);return r[0]}return e}function parseModifiers(e,t){t.constant=false;t.payable=false;t.stateMutability="nonpayable";e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=true;break;case"payable":t.payable=true;t.stateMutability="payable";break;case"nonpayable":t.payable=false;t.stateMutability="nonpayable";break;case"pure":t.constant=true;t.stateMutability="pure";break;case"view":t.constant=true;t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function verifyState(e){var t={constant:false,payable:true,stateMutability:"payable"};if(e.stateMutability!=null){t.stateMutability=e.stateMutability;t.constant=t.stateMutability==="view"||t.stateMutability==="pure";if(e.constant!=null){if(!!e.constant!==t.constant){l.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e)}}t.payable=t.stateMutability==="payable";if(e.payable!=null){if(!!e.payable!==t.payable){l.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)}}}else if(e.payable!=null){t.payable=!!e.payable;if(e.constant==null&&!t.payable&&e.type!=="constructor"){l.throwArgumentError("unable to determine stateMutability","value",e)}t.constant=!!e.constant;if(t.constant){t.stateMutability="view"}else{t.stateMutability=t.payable?"payable":"nonpayable"}if(t.payable&&t.constant){l.throwArgumentError("cannot have constant payable function","value",e)}}else if(e.constant!=null){t.constant=!!e.constant;t.payable=!t.constant;t.stateMutability=t.constant?"view":"payable"}else if(e.type!=="constructor"){l.throwArgumentError("unable to determine stateMutability","value",e)}return t}var y=function(e){i(ConstructorFragment,e);function ConstructorFragment(){return e!==null&&e.apply(this,arguments)||this}ConstructorFragment.prototype.format=function(e){if(!e){e=t.FormatTypes.sighash}if(!t.FormatTypes[e]){l.throwArgumentError("invalid format type","format",e)}if(e===t.FormatTypes.json){return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))})}if(e===t.FormatTypes.sighash){l.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"})}var r="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===t.FormatTypes.full?", ":",")+") ";if(this.stateMutability&&this.stateMutability!=="nonpayable"){r+=this.stateMutability+" "}return r.trim()};ConstructorFragment.from=function(e){if(typeof e==="string"){return ConstructorFragment.fromString(e)}return ConstructorFragment.fromObject(e)};ConstructorFragment.fromObject=function(e){if(ConstructorFragment.isConstructorFragment(e)){return e}if(e.type!=="constructor"){l.throwArgumentError("invalid constructor object","value",e)}var t=verifyState(e);if(t.constant){l.throwArgumentError("constructor cannot be constant","value",e)}var r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.BigNumber.from(e.gas):null};return new ConstructorFragment(u,r)};ConstructorFragment.fromString=function(e){var t={type:"constructor"};e=parseGas(e,t);var r=e.match(x);if(!r||r[1].trim()!=="constructor"){l.throwArgumentError("invalid constructor string","value",e)}t.inputs=parseParams(r[2].trim(),false);parseModifiers(r[3].trim(),t);return ConstructorFragment.fromObject(t)};ConstructorFragment.isConstructorFragment=function(e){return e&&e._isFragment&&e.type==="constructor"};return ConstructorFragment}(m);t.ConstructorFragment=y;var _=function(e){i(FunctionFragment,e);function FunctionFragment(){return e!==null&&e.apply(this,arguments)||this}FunctionFragment.prototype.format=function(e){if(!e){e=t.FormatTypes.sighash}if(!t.FormatTypes[e]){l.throwArgumentError("invalid format type","format",e)}if(e===t.FormatTypes.json){return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:undefined,payable:this.payable,gas:this.gas?this.gas.toNumber():undefined,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))})}var r="";if(e!==t.FormatTypes.sighash){r+="function "}r+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===t.FormatTypes.full?", ":",")+") ";if(e!==t.FormatTypes.sighash){if(this.stateMutability){if(this.stateMutability!=="nonpayable"){r+=this.stateMutability+" "}}else if(this.constant){r+="view "}if(this.outputs&&this.outputs.length){r+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "}if(this.gas!=null){r+="@"+this.gas.toString()+" "}}return r.trim()};FunctionFragment.from=function(e){if(typeof e==="string"){return FunctionFragment.fromString(e)}return FunctionFragment.fromObject(e)};FunctionFragment.fromObject=function(e){if(FunctionFragment.isFunctionFragment(e)){return e}if(e.type!=="function"){l.throwArgumentError("invalid function object","value",e)}var t=verifyState(e);var r={type:e.type,name:verifyIdentifier(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(p.fromObject):[],outputs:e.outputs?e.outputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.BigNumber.from(e.gas):null};return new FunctionFragment(u,r)};FunctionFragment.fromString=function(e){var t={type:"function"};e=parseGas(e,t);var r=e.split(" returns ");if(r.length>2){l.throwArgumentError("invalid function string","value",e)}var i=r[0].match(x);if(!i){l.throwArgumentError("invalid function signature","value",e)}t.name=i[1].trim();if(t.name){verifyIdentifier(t.name)}t.inputs=parseParams(i[2],false);parseModifiers(i[3].trim(),t);if(r.length>1){var n=r[1].match(x);if(n[1].trim()!=""||n[3].trim()!=""){l.throwArgumentError("unexpected tokens","value",e)}t.outputs=parseParams(n[2],false)}else{t.outputs=[]}return FunctionFragment.fromObject(t)};FunctionFragment.isFunctionFragment=function(e){return e&&e._isFragment&&e.type==="function"};return FunctionFragment}(y);t.FunctionFragment=_;function checkForbidden(e){var t=e.format();if(t==="Error(string)"||t==="Panic(uint256)"){l.throwArgumentError("cannot specify user defined "+t+" error","fragment",e)}return e}var v=function(e){i(ErrorFragment,e);function ErrorFragment(){return e!==null&&e.apply(this,arguments)||this}ErrorFragment.prototype.format=function(e){if(!e){e=t.FormatTypes.sighash}if(!t.FormatTypes[e]){l.throwArgumentError("invalid format type","format",e)}if(e===t.FormatTypes.json){return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))})}var r="";if(e!==t.FormatTypes.sighash){r+="error "}r+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===t.FormatTypes.full?", ":",")+") ";return r.trim()};ErrorFragment.from=function(e){if(typeof e==="string"){return ErrorFragment.fromString(e)}return ErrorFragment.fromObject(e)};ErrorFragment.fromObject=function(e){if(ErrorFragment.isErrorFragment(e)){return e}if(e.type!=="error"){l.throwArgumentError("invalid error object","value",e)}var t={type:e.type,name:verifyIdentifier(e.name),inputs:e.inputs?e.inputs.map(p.fromObject):[]};return checkForbidden(new ErrorFragment(u,t))};ErrorFragment.fromString=function(e){var t={type:"error"};var r=e.match(x);if(!r){l.throwArgumentError("invalid error signature","value",e)}t.name=r[1].trim();if(t.name){verifyIdentifier(t.name)}t.inputs=parseParams(r[2],false);return checkForbidden(ErrorFragment.fromObject(t))};ErrorFragment.isErrorFragment=function(e){return e&&e._isFragment&&e.type==="error"};return ErrorFragment}(m);t.ErrorFragment=v;function verifyType(e){if(e.match(/^uint($|[^1-9])/)){e="uint256"+e.substring(4)}else if(e.match(/^int($|[^1-9])/)){e="int256"+e.substring(3)}return e}var b=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(e){if(!e||!e.match(b)){l.throwArgumentError('invalid identifier "'+e+'"',"value",e)}return e}var x=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(e){e=e.trim();var t=[];var r="";var i=0;for(var n=0;n<e.length;n++){var s=e[n];if(s===","&&i===0){t.push(r);r=""}else{r+=s;if(s==="("){i++}else if(s===")"){i--;if(i===-1){l.throwArgumentError("unbalanced parenthesis","value",e)}}}}if(r){t.push(r)}return t}},3831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TransactionDescription=t.LogDescription=t.checkResultErrors=t.Indexed=t.Interface=t.defaultAbiCoder=t.AbiCoder=t.FormatTypes=t.ParamType=t.FunctionFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=void 0;var i=r(7737);Object.defineProperty(t,"ConstructorFragment",{enumerable:true,get:function(){return i.ConstructorFragment}});Object.defineProperty(t,"ErrorFragment",{enumerable:true,get:function(){return i.ErrorFragment}});Object.defineProperty(t,"EventFragment",{enumerable:true,get:function(){return i.EventFragment}});Object.defineProperty(t,"FormatTypes",{enumerable:true,get:function(){return i.FormatTypes}});Object.defineProperty(t,"Fragment",{enumerable:true,get:function(){return i.Fragment}});Object.defineProperty(t,"FunctionFragment",{enumerable:true,get:function(){return i.FunctionFragment}});Object.defineProperty(t,"ParamType",{enumerable:true,get:function(){return i.ParamType}});var n=r(9606);Object.defineProperty(t,"AbiCoder",{enumerable:true,get:function(){return n.AbiCoder}});Object.defineProperty(t,"defaultAbiCoder",{enumerable:true,get:function(){return n.defaultAbiCoder}});var s=r(3620);Object.defineProperty(t,"checkResultErrors",{enumerable:true,get:function(){return s.checkResultErrors}});Object.defineProperty(t,"Indexed",{enumerable:true,get:function(){return s.Indexed}});Object.defineProperty(t,"Interface",{enumerable:true,get:function(){return s.Interface}});Object.defineProperty(t,"LogDescription",{enumerable:true,get:function(){return s.LogDescription}});Object.defineProperty(t,"TransactionDescription",{enumerable:true,get:function(){return s.TransactionDescription}})},3620:function(e,t,r){"use strict";var i=this&&this.__extends||function(){var extendStatics=function(e,t){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return extendStatics(e,t)};return function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");extendStatics(e,t);function __(){this.constructor=e}e.prototype=t===null?Object.create(t):(__.prototype=t.prototype,new __)}}();Object.defineProperty(t,"__esModule",{value:true});t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.checkResultErrors=void 0;var n=r(8957);var s=r(1267);var o=r(2056);var a=r(7866);var l=r(3100);var u=r(8078);var c=r(9606);var h=r(3321);Object.defineProperty(t,"checkResultErrors",{enumerable:true,get:function(){return h.checkResultErrors}});var d=r(7737);var p=r(2975);var m=r(7902);var g=new p.Logger(m.version);var y=function(e){i(LogDescription,e);function LogDescription(){return e!==null&&e.apply(this,arguments)||this}return LogDescription}(u.Description);t.LogDescription=y;var _=function(e){i(TransactionDescription,e);function TransactionDescription(){return e!==null&&e.apply(this,arguments)||this}return TransactionDescription}(u.Description);t.TransactionDescription=_;var v=function(e){i(ErrorDescription,e);function ErrorDescription(){return e!==null&&e.apply(this,arguments)||this}return ErrorDescription}(u.Description);t.ErrorDescription=v;var b=function(e){i(Indexed,e);function Indexed(){return e!==null&&e.apply(this,arguments)||this}Indexed.isIndexed=function(e){return!!(e&&e._isIndexed)};return Indexed}(u.Description);t.Indexed=b;var x={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:true},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(e,t){var r=new Error("deferred error during ABI decoding triggered accessing "+e);r.error=t;return r}var T=function(){function Interface(e){var t=this.constructor;var r=this;var i=[];if(typeof e==="string"){i=JSON.parse(e)}else{i=e}(0,u.defineReadOnly)(this,"fragments",i.map((function(e){return d.Fragment.from(e)})).filter((function(e){return e!=null})));(0,u.defineReadOnly)(this,"_abiCoder",(0,u.getStatic)(t,"getAbiCoder")());(0,u.defineReadOnly)(this,"functions",{});(0,u.defineReadOnly)(this,"errors",{});(0,u.defineReadOnly)(this,"events",{});(0,u.defineReadOnly)(this,"structs",{});this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":if(r.deploy){g.warn("duplicate definition - constructor");return}(0,u.defineReadOnly)(r,"deploy",e);return;case"function":t=r.functions;break;case"event":t=r.events;break;case"error":t=r.errors;break;default:return}var i=e.format();if(t[i]){g.warn("duplicate definition - "+i);return}t[i]=e}));if(!this.deploy){(0,u.defineReadOnly)(this,"deploy",d.ConstructorFragment.from({payable:false,type:"constructor"}))}(0,u.defineReadOnly)(this,"_isInterface",true)}Interface.prototype.format=function(e){if(!e){e=d.FormatTypes.full}if(e===d.FormatTypes.sighash){g.throwArgumentError("interface does not support formatting sighash","format",e)}var t=this.fragments.map((function(t){return t.format(e)}));if(e===d.FormatTypes.json){return JSON.stringify(t.map((function(e){return JSON.parse(e)})))}return t};Interface.getAbiCoder=function(){return c.defaultAbiCoder};Interface.getAddress=function(e){return(0,n.getAddress)(e)};Interface.getSighash=function(e){return(0,o.hexDataSlice)((0,a.id)(e.format()),0,4)};Interface.getEventTopic=function(e){return(0,a.id)(e.format())};Interface.prototype.getFunction=function(e){if((0,o.isHexString)(e)){for(var t in this.functions){if(e===this.getSighash(t)){return this.functions[t]}}g.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){var r=e.trim();var i=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===r}));if(i.length===0){g.throwArgumentError("no matching function","name",r)}else if(i.length>1){g.throwArgumentError("multiple matching functions","name",r)}return this.functions[i[0]]}var n=this.functions[d.FunctionFragment.fromString(e).format()];if(!n){g.throwArgumentError("no matching function","signature",e)}return n};Interface.prototype.getEvent=function(e){if((0,o.isHexString)(e)){var t=e.toLowerCase();for(var r in this.events){if(t===this.getEventTopic(r)){return this.events[r]}}g.throwArgumentError("no matching event","topichash",t)}if(e.indexOf("(")===-1){var i=e.trim();var n=Object.keys(this.events).filter((function(e){return e.split("(")[0]===i}));if(n.length===0){g.throwArgumentError("no matching event","name",i)}else if(n.length>1){g.throwArgumentError("multiple matching events","name",i)}return this.events[n[0]]}var s=this.events[d.EventFragment.fromString(e).format()];if(!s){g.throwArgumentError("no matching event","signature",e)}return s};Interface.prototype.getError=function(e){if((0,o.isHexString)(e)){var t=(0,u.getStatic)(this.constructor,"getSighash");for(var r in this.errors){var i=this.errors[r];if(e===t(i)){return this.errors[r]}}g.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){var n=e.trim();var s=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===n}));if(s.length===0){g.throwArgumentError("no matching error","name",n)}else if(s.length>1){g.throwArgumentError("multiple matching errors","name",n)}return this.errors[s[0]]}var a=this.errors[d.FunctionFragment.fromString(e).format()];if(!a){g.throwArgumentError("no matching error","signature",e)}return a};Interface.prototype.getSighash=function(e){if(typeof e==="string"){try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}}return(0,u.getStatic)(this.constructor,"getSighash")(e)};Interface.prototype.getEventTopic=function(e){if(typeof e==="string"){e=this.getEvent(e)}return(0,u.getStatic)(this.constructor,"getEventTopic")(e)};Interface.prototype._decodeParams=function(e,t){return this._abiCoder.decode(e,t)};Interface.prototype._encodeParams=function(e,t){return this._abiCoder.encode(e,t)};Interface.prototype.encodeDeploy=function(e){return this._encodeParams(this.deploy.inputs,e||[])};Interface.prototype.decodeErrorResult=function(e,t){if(typeof e==="string"){e=this.getError(e)}var r=(0,o.arrayify)(t);if((0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)){g.throwArgumentError("data signature does not match error "+e.name+".","data",(0,o.hexlify)(r))}return this._decodeParams(e.inputs,r.slice(4))};Interface.prototype.encodeErrorResult=function(e,t){if(typeof e==="string"){e=this.getError(e)}return(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))};Interface.prototype.decodeFunctionData=function(e,t){if(typeof e==="string"){e=this.getFunction(e)}var r=(0,o.arrayify)(t);if((0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)){g.throwArgumentError("data signature does not match function "+e.name+".","data",(0,o.hexlify)(r))}return this._decodeParams(e.inputs,r.slice(4))};Interface.prototype.encodeFunctionData=function(e,t){if(typeof e==="string"){e=this.getFunction(e)}return(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))};Interface.prototype.decodeFunctionResult=function(e,t){if(typeof e==="string"){e=this.getFunction(e)}var r=(0,o.arrayify)(t);var i=null;var n="";var s=null;var a=null;var l=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(h){}break;case 4:{var u=(0,o.hexlify)(r.slice(0,4));var c=x[u];if(c){s=this._abiCoder.decode(c.inputs,r.slice(4));a=c.name;l=c.signature;if(c.reason){i=s[0]}if(a==="Error"){n="; VM Exception while processing transaction: reverted with reason string "+JSON.stringify(s[0])}else if(a==="Panic"){n="; VM Exception while processing transaction: reverted with panic code "+s[0]}}else{try{var h=this.getError(u);s=this._abiCoder.decode(h.inputs,r.slice(4));a=h.name;l=h.format()}catch(h){}}break}}return g.throwError("call revert exception"+n,p.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:s,errorName:a,errorSignature:l,reason:i})};Interface.prototype.encodeFunctionResult=function(e,t){if(typeof e==="string"){e=this.getFunction(e)}return(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))};Interface.prototype.encodeFilterTopics=function(e,t){var r=this;if(typeof e==="string"){e=this.getEvent(e)}if(t.length>e.inputs.length){g.throwError("too many arguments for "+e.format(),p.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t})}var i=[];if(!e.anonymous){i.push(this.getEventTopic(e))}var encodeTopic=function(e,t){if(e.type==="string"){return(0,a.id)(t)}else if(e.type==="bytes"){return(0,l.keccak256)((0,o.hexlify)(t))}if(e.type==="bool"&&typeof t==="boolean"){t=t?"0x01":"0x00"}if(e.type.match(/^u?int/)){t=s.BigNumber.from(t).toHexString()}if(e.type==="address"){r._abiCoder.encode(["address"],[t])}return(0,o.hexZeroPad)((0,o.hexlify)(t),32)};t.forEach((function(t,r){var n=e.inputs[r];if(!n.indexed){if(t!=null){g.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+n.name,t)}return}if(t==null){i.push(null)}else if(n.baseType==="array"||n.baseType==="tuple"){g.throwArgumentError("filtering with tuples or arrays not supported","contract."+n.name,t)}else if(Array.isArray(t)){i.push(t.map((function(e){return encodeTopic(n,e)})))}else{i.push(encodeTopic(n,t))}}));while(i.length&&i[i.length-1]===null){i.pop()}return i};Interface.prototype.encodeEventLog=function(e,t){var r=this;if(typeof e==="string"){e=this.getEvent(e)}var i=[];var n=[];var s=[];if(!e.anonymous){i.push(this.getEventTopic(e))}if(t.length!==e.inputs.length){g.throwArgumentError("event arguments/values mismatch","values",t)}e.inputs.forEach((function(e,o){var u=t[o];if(e.indexed){if(e.type==="string"){i.push((0,a.id)(u))}else if(e.type==="bytes"){i.push((0,l.keccak256)(u))}else if(e.baseType==="tuple"||e.baseType==="array"){throw new Error("not implemented")}else{i.push(r._abiCoder.encode([e.type],[u]))}}else{n.push(e);s.push(u)}}));return{data:this._abiCoder.encode(n,s),topics:i}};Interface.prototype.decodeEventLog=function(e,t,r){if(typeof e==="string"){e=this.getEvent(e)}if(r!=null&&!e.anonymous){var i=this.getEventTopic(e);if(!(0,o.isHexString)(r[0],32)||r[0].toLowerCase()!==i){g.throwError("fragment/topic mismatch",p.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:i,value:r[0]})}r=r.slice(1)}var n=[];var s=[];var a=[];e.inputs.forEach((function(e,t){if(e.indexed){if(e.type==="string"||e.type==="bytes"||e.baseType==="tuple"||e.baseType==="array"){n.push(d.ParamType.fromObject({type:"bytes32",name:e.name}));a.push(true)}else{n.push(e);a.push(false)}}else{s.push(e);a.push(false)}}));var l=r!=null?this._abiCoder.decode(n,(0,o.concat)(r)):null;var u=this._abiCoder.decode(s,t,true);var c=[];var h=0,m=0;e.inputs.forEach((function(e,t){if(e.indexed){if(l==null){c[t]=new b({_isIndexed:true,hash:null})}else if(a[t]){c[t]=new b({_isIndexed:true,hash:l[m++]})}else{try{c[t]=l[m++]}catch(e){c[t]=e}}}else{try{c[t]=u[h++]}catch(e){c[t]=e}}if(e.name&&c[e.name]==null){var r=c[t];if(r instanceof Error){Object.defineProperty(c,e.name,{enumerable:true,get:function(){throw wrapAccessError("property "+JSON.stringify(e.name),r)}})}else{c[e.name]=r}}}));var _loop_1=function(e){var t=c[e];if(t instanceof Error){Object.defineProperty(c,e,{enumerable:true,get:function(){throw wrapAccessError("index "+e,t)}})}};for(var y=0;y<c.length;y++){_loop_1(y)}return Object.freeze(c)};Interface.prototype.parseTransaction=function(e){var t=this.getFunction(e.data.substring(0,10).toLowerCase());if(!t){return null}return new _({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:s.BigNumber.from(e.value||"0")})};Interface.prototype.parseLog=function(e){var t=this.getEvent(e.topics[0]);if(!t||t.anonymous){return null}return new y({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})};Interface.prototype.parseError=function(e){var t=(0,o.hexlify)(e);var r=this.getError(t.substring(0,10).toLowerCase());if(!r){return null}return new v({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)})};Interface.isInterface=function(e){return!!(e&&e._isInterface)};return Interface}();t.Interface=T},3627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="address/5.7.0"},8957:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.isAddress=t.getAddress=void 0;var i=r(2056);var n=r(1267);var s=r(3100);var o=r(2099);var a=r(2975);var l=r(3627);var u=new a.Logger(l.version);function getChecksumAddress(e){if(!(0,i.isHexString)(e,20)){u.throwArgumentError("invalid address","address",e)}e=e.toLowerCase();var t=e.substring(2).split("");var r=new Uint8Array(40);for(var n=0;n<40;n++){r[n]=t[n].charCodeAt(0)}var o=(0,i.arrayify)((0,s.keccak256)(r));for(var n=0;n<40;n+=2){if(o[n>>1]>>4>=8){t[n]=t[n].toUpperCase()}if((o[n>>1]&15)>=8){t[n+1]=t[n+1].toUpperCase()}}return"0x"+t.join("")}var c=9007199254740991;function log10(e){if(Math.log10){return Math.log10(e)}return Math.log(e)/Math.LN10}var h={};for(var d=0;d<10;d++){h[String(d)]=String(d)}for(var d=0;d<26;d++){h[String.fromCharCode(65+d)]=String(10+d)}var p=Math.floor(log10(c));function ibanChecksum(e){e=e.toUpperCase();e=e.substring(4)+e.substring(0,2)+"00";var t=e.split("").map((function(e){return h[e]})).join("");while(t.length>=p){var r=t.substring(0,p);t=parseInt(r,10)%97+t.substring(r.length)}var i=String(98-parseInt(t,10)%97);while(i.length<2){i="0"+i}return i}function getAddress(e){var t=null;if(typeof e!=="string"){u.throwArgumentError("invalid address","address",e)}if(e.match(/^(0x)?[0-9a-fA-F]{40}$/)){if(e.substring(0,2)!=="0x"){e="0x"+e}t=getChecksumAddress(e);if(e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e){u.throwArgumentError("bad address checksum","address",e)}}else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){if(e.substring(2,4)!==ibanChecksum(e)){u.throwArgumentError("bad icap checksum","address",e)}t=(0,n._base36To16)(e.substring(4));while(t.length<40){t="0"+t}t=getChecksumAddress("0x"+t)}else{u.throwArgumentError("invalid address","address",e)}return t}t.getAddress=getAddress;function isAddress(e){try{getAddress(e);return true}catch(e){}return false}t.isAddress=isAddress;function getIcapAddress(e){var t=(0,n._base16To36)(getAddress(e).substring(2)).toUpperCase();while(t.length<30){t="0"+t}return"XE"+ibanChecksum("XE00"+t)+t}t.getIcapAddress=getIcapAddress;function getContractAddress(e){var t=null;try{t=getAddress(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}var r=(0,i.stripZeros)((0,i.arrayify)(n.BigNumber.from(e.nonce).toHexString()));return getAddress((0,i.hexDataSlice)((0,s.keccak256)((0,o.encode)([t,r])),12))}t.getContractAddress=getContractAddress;function getCreate2Address(e,t,r){if((0,i.hexDataLength)(t)!==32){u.throwArgumentError("salt must be 32 bytes","salt",t)}if((0,i.hexDataLength)(r)!==32){u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r)}return getAddress((0,i.hexDataSlice)((0,s.keccak256)((0,i.concat)(["0xff",getAddress(e),t,r])),12))}t.getCreate2Address=getCreate2Address},3119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.encode=t.decode=void 0;var i=r(2056);function decode(e){return(0,i.arrayify)(new Uint8Array(Buffer.from(e,"base64")))}t.decode=decode;function encode(e){return Buffer.from((0,i.arrayify)(e)).toString("base64")}t.encode=encode},8144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.encode=t.decode=void 0;var i=r(3119);Object.defineProperty(t,"decode",{enumerable:true,get:function(){return i.decode}});Object.defineProperty(t,"encode",{enumerable:true,get:function(){return i.encode}})},3181:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="bignumber/5.7.0"},3876:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t._base16To36=t._base36To16=t.BigNumber=t.isBigNumberish=void 0;var n=i(r(6641));var s=n.default.BN;var o=r(2056);var a=r(2975);var l=r(3181);var u=new a.Logger(l.version);var c={};var h=9007199254740991;function isBigNumberish(e){return e!=null&&(p.isBigNumber(e)||typeof e==="number"&&e%1===0||typeof e==="string"&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||typeof e==="bigint"||(0,o.isBytes)(e))}t.isBigNumberish=isBigNumberish;var d=false;var p=function(){function BigNumber(e,t){if(e!==c){u.throwError("cannot call constructor directly; use BigNumber.from",a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"})}this._hex=t;this._isBigNumber=true;Object.freeze(this)}BigNumber.prototype.fromTwos=function(e){return toBigNumber(toBN(this).fromTwos(e))};BigNumber.prototype.toTwos=function(e){return toBigNumber(toBN(this).toTwos(e))};BigNumber.prototype.abs=function(){if(this._hex[0]==="-"){return BigNumber.from(this._hex.substring(1))}return this};BigNumber.prototype.add=function(e){return toBigNumber(toBN(this).add(toBN(e)))};BigNumber.prototype.sub=function(e){return toBigNumber(toBN(this).sub(toBN(e)))};BigNumber.prototype.div=function(e){var t=BigNumber.from(e);if(t.isZero()){throwFault("division-by-zero","div")}return toBigNumber(toBN(this).div(toBN(e)))};BigNumber.prototype.mul=function(e){return toBigNumber(toBN(this).mul(toBN(e)))};BigNumber.prototype.mod=function(e){var t=toBN(e);if(t.isNeg()){throwFault("division-by-zero","mod")}return toBigNumber(toBN(this).umod(t))};BigNumber.prototype.pow=function(e){var t=toBN(e);if(t.isNeg()){throwFault("negative-power","pow")}return toBigNumber(toBN(this).pow(t))};BigNumber.prototype.and=function(e){var t=toBN(e);if(this.isNegative()||t.isNeg()){throwFault("unbound-bitwise-result","and")}return toBigNumber(toBN(this).and(t))};BigNumber.prototype.or=function(e){var t=toBN(e);if(this.isNegative()||t.isNeg()){throwFault("unbound-bitwise-result","or")}return toBigNumber(toBN(this).or(t))};BigNumber.prototype.xor=function(e){var t=toBN(e);if(this.isNegative()||t.isNeg()){throwFault("unbound-bitwise-result","xor")}return toBigNumber(toBN(this).xor(t))};BigNumber.prototype.mask=function(e){if(this.isNegative()||e<0){throwFault("negative-width","mask")}return toBigNumber(toBN(this).maskn(e))};BigNumber.prototype.shl=function(e){if(this.isNegative()||e<0){throwFault("negative-width","shl")}return toBigNumber(toBN(this).shln(e))};BigNumber.prototype.shr=function(e){if(this.isNegative()||e<0){throwFault("negative-width","shr")}return toBigNumber(toBN(this).shrn(e))};BigNumber.prototype.eq=function(e){return toBN(this).eq(toBN(e))};BigNumber.prototype.lt=function(e){return toBN(this).lt(toBN(e))};BigNumber.prototype.lte=function(e){return toBN(this).lte(toBN(e))};BigNumber.prototype.gt=function(e){return toBN(this).gt(toBN(e))};BigNumber.prototype.gte=function(e){return toBN(this).gte(toBN(e))};BigNumber.prototype.isNegative=function(){return this._hex[0]==="-"};BigNumber.prototype.isZero=function(){return toBN(this).isZero()};BigNumber.prototype.toNumber=function(){try{return toBN(this).toNumber()}catch(e){throwFault("overflow","toNumber",this.toString())}return null};BigNumber.prototype.toBigInt=function(){try{return BigInt(this.toString())}catch(e){}return u.throwError("this platform does not support BigInt",a.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})};BigNumber.prototype.toString=function(){if(arguments.length>0){if(arguments[0]===10){if(!d){d=true;u.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")}}else if(arguments[0]===16){u.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Logger.errors.UNEXPECTED_ARGUMENT,{})}else{u.throwError("BigNumber.toString does not accept parameters",a.Logger.errors.UNEXPECTED_ARGUMENT,{})}}return toBN(this).toString(10)};BigNumber.prototype.toHexString=function(){return this._hex};BigNumber.prototype.toJSON=function(e){return{type:"BigNumber",hex:this.toHexString()}};BigNumber.from=function(e){if(e instanceof BigNumber){return e}if(typeof e==="string"){if(e.match(/^-?0x[0-9a-f]+$/i)){return new BigNumber(c,toHex(e))}if(e.match(/^-?[0-9]+$/)){return new BigNumber(c,toHex(new s(e)))}return u.throwArgumentError("invalid BigNumber string","value",e)}if(typeof e==="number"){if(e%1){throwFault("underflow","BigNumber.from",e)}if(e>=h||e<=-h){throwFault("overflow","BigNumber.from",e)}return BigNumber.from(String(e))}var t=e;if(typeof t==="bigint"){return BigNumber.from(t.toString())}if((0,o.isBytes)(t)){return BigNumber.from((0,o.hexlify)(t))}if(t){if(t.toHexString){var r=t.toHexString();if(typeof r==="string"){return BigNumber.from(r)}}else{var r=t._hex;if(r==null&&t.type==="BigNumber"){r=t.hex}if(typeof r==="string"){if((0,o.isHexString)(r)||r[0]==="-"&&(0,o.isHexString)(r.substring(1))){return BigNumber.from(r)}}}}return u.throwArgumentError("invalid BigNumber value","value",e)};BigNumber.isBigNumber=function(e){return!!(e&&e._isBigNumber)};return BigNumber}();t.BigNumber=p;function toHex(e){if(typeof e!=="string"){return toHex(e.toString(16))}if(e[0]==="-"){e=e.substring(1);if(e[0]==="-"){u.throwArgumentError("invalid hex","value",e)}e=toHex(e);if(e==="0x00"){return e}return"-"+e}if(e.substring(0,2)!=="0x"){e="0x"+e}if(e==="0x"){return"0x00"}if(e.length%2){e="0x0"+e.substring(2)}while(e.length>4&&e.substring(0,4)==="0x00"){e="0x"+e.substring(4)}return e}function toBigNumber(e){return p.from(toHex(e))}function toBN(e){var t=p.from(e).toHexString();if(t[0]==="-"){return new s("-"+t.substring(3),16)}return new s(t.substring(2),16)}function throwFault(e,t,r){var i={fault:e,operation:t};if(r!=null){i.value=r}return u.throwError(e,a.Logger.errors.NUMERIC_FAULT,i)}function _base36To16(e){return new s(e,36).toString(16)}t._base36To16=_base36To16;function _base16To36(e){return new s(e,16).toString(36)}t._base16To36=_base16To36},1276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FixedNumber=t.FixedFormat=t.parseFixed=t.formatFixed=void 0;var i=r(2056);var n=r(2975);var s=r(3181);var o=new n.Logger(s.version);var a=r(3876);var l={};var u=a.BigNumber.from(0);var c=a.BigNumber.from(-1);function throwFault(e,t,r,i){var s={fault:t,operation:r};if(i!==undefined){s.value=i}return o.throwError(e,n.Logger.errors.NUMERIC_FAULT,s)}var h="0";while(h.length<256){h+=h}function getMultiplier(e){if(typeof e!=="number"){try{e=a.BigNumber.from(e).toNumber()}catch(e){}}if(typeof e==="number"&&e>=0&&e<=256&&!(e%1)){return"1"+h.substring(0,e)}return o.throwArgumentError("invalid decimal size","decimals",e)}function formatFixed(e,t){if(t==null){t=0}var r=getMultiplier(t);e=a.BigNumber.from(e);var i=e.lt(u);if(i){e=e.mul(c)}var n=e.mod(r).toString();while(n.length<r.length-1){n="0"+n}n=n.match(/^([0-9]*[1-9]|0)(0*)/)[1];var s=e.div(r).toString();if(r.length===1){e=s}else{e=s+"."+n}if(i){e="-"+e}return e}t.formatFixed=formatFixed;function parseFixed(e,t){if(t==null){t=0}var r=getMultiplier(t);if(typeof e!=="string"||!e.match(/^-?[0-9.]+$/)){o.throwArgumentError("invalid decimal value","value",e)}var i=e.substring(0,1)==="-";if(i){e=e.substring(1)}if(e==="."){o.throwArgumentError("missing value","value",e)}var n=e.split(".");if(n.length>2){o.throwArgumentError("too many decimal points","value",e)}var s=n[0],l=n[1];if(!s){s="0"}if(!l){l="0"}while(l[l.length-1]==="0"){l=l.substring(0,l.length-1)}if(l.length>r.length-1){throwFault("fractional component exceeds decimals","underflow","parseFixed")}if(l===""){l="0"}while(l.length<r.length-1){l+="0"}var u=a.BigNumber.from(s);var h=a.BigNumber.from(l);var d=u.mul(r).add(h);if(i){d=d.mul(c)}return d}t.parseFixed=parseFixed;var d=function(){function FixedFormat(e,t,r,i){if(e!==l){o.throwError("cannot use FixedFormat constructor; use FixedFormat.from",n.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.signed=t;this.width=r;this.decimals=i;this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(i);this._multiplier=getMultiplier(i);Object.freeze(this)}FixedFormat.from=function(e){if(e instanceof FixedFormat){return e}if(typeof e==="number"){e="fixed128x"+e}var t=true;var r=128;var i=18;if(typeof e==="string"){if(e==="fixed"){}else if(e==="ufixed"){t=false}else{var n=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);if(!n){o.throwArgumentError("invalid fixed format","format",e)}t=n[1]!=="u";r=parseInt(n[2]);i=parseInt(n[3])}}else if(e){var check=function(t,r,i){if(e[t]==null){return i}if(typeof e[t]!==r){o.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t])}return e[t]};t=check("signed","boolean",t);r=check("width","number",r);i=check("decimals","number",i)}if(r%8){o.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r)}if(i>80){o.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i)}return new FixedFormat(l,t,r,i)};return FixedFormat}();t.FixedFormat=d;var p=function(){function FixedNumber(e,t,r,i){if(e!==l){o.throwError("cannot use FixedNumber constructor; use FixedNumber.from",n.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"})}this.format=i;this._hex=t;this._value=r;this._isFixedNumber=true;Object.freeze(this)}FixedNumber.prototype._checkFormat=function(e){if(this.format.name!==e.format.name){o.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}};FixedNumber.prototype.addUnsafe=function(e){this._checkFormat(e);var t=parseFixed(this._value,this.format.decimals);var r=parseFixed(e._value,e.format.decimals);return FixedNumber.fromValue(t.add(r),this.format.decimals,this.format)};FixedNumber.prototype.subUnsafe=function(e){this._checkFormat(e);var t=parseFixed(this._value,this.format.decimals);var r=parseFixed(e._value,e.format.decimals);return FixedNumber.fromValue(t.sub(r),this.format.decimals,this.format)};FixedNumber.prototype.mulUnsafe=function(e){this._checkFormat(e);var t=parseFixed(this._value,this.format.decimals);var r=parseFixed(e._value,e.format.decimals);return FixedNumber.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)};FixedNumber.prototype.divUnsafe=function(e){this._checkFormat(e);var t=parseFixed(this._value,this.format.decimals);var r=parseFixed(e._value,e.format.decimals);return FixedNumber.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)};FixedNumber.prototype.floor=function(){var e=this.toString().split(".");if(e.length===1){e.push("0")}var t=FixedNumber.from(e[0],this.format);var r=!e[1].match(/^(0*)$/);if(this.isNegative()&&r){t=t.subUnsafe(m.toFormat(t.format))}return t};FixedNumber.prototype.ceiling=function(){var e=this.toString().split(".");if(e.length===1){e.push("0")}var t=FixedNumber.from(e[0],this.format);var r=!e[1].match(/^(0*)$/);if(!this.isNegative()&&r){t=t.addUnsafe(m.toFormat(t.format))}return t};FixedNumber.prototype.round=function(e){if(e==null){e=0}var t=this.toString().split(".");if(t.length===1){t.push("0")}if(e<0||e>80||e%1){o.throwArgumentError("invalid decimal count","decimals",e)}if(t[1].length<=e){return this}var r=FixedNumber.from("1"+h.substring(0,e),this.format);var i=g.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(i).floor().divUnsafe(r)};FixedNumber.prototype.isZero=function(){return this._value==="0.0"||this._value==="0"};FixedNumber.prototype.isNegative=function(){return this._value[0]==="-"};FixedNumber.prototype.toString=function(){return this._value};FixedNumber.prototype.toHexString=function(e){if(e==null){return this._hex}if(e%8){o.throwArgumentError("invalid byte width","width",e)}var t=a.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,i.hexZeroPad)(t,e/8)};FixedNumber.prototype.toUnsafeFloat=function(){return parseFloat(this.toString())};FixedNumber.prototype.toFormat=function(e){return FixedNumber.fromString(this._value,e)};FixedNumber.fromValue=function(e,t,r){if(r==null&&t!=null&&!(0,a.isBigNumberish)(t)){r=t;t=null}if(t==null){t=0}if(r==null){r="fixed"}return FixedNumber.fromString(formatFixed(e,t),d.from(r))};FixedNumber.fromString=function(e,t){if(t==null){t="fixed"}var r=d.from(t);var n=parseFixed(e,r.decimals);if(!r.signed&&n.lt(u)){throwFault("unsigned value cannot be negative","overflow","value",e)}var s=null;if(r.signed){s=n.toTwos(r.width).toHexString()}else{s=n.toHexString();s=(0,i.hexZeroPad)(s,r.width/8)}var o=formatFixed(n,r.decimals);return new FixedNumber(l,s,o,r)};FixedNumber.fromBytes=function(e,t){if(t==null){t="fixed"}var r=d.from(t);if((0,i.arrayify)(e).length>r.width/8){throw new Error("overflow")}var n=a.BigNumber.from(e);if(r.signed){n=n.fromTwos(r.width)}var s=n.toTwos((r.signed?0:1)+r.width).toHexString();var o=formatFixed(n,r.decimals);return new FixedNumber(l,s,o,r)};FixedNumber.from=function(e,t){if(typeof e==="string"){return FixedNumber.fromString(e,t)}if((0,i.isBytes)(e)){return FixedNumber.fromBytes(e,t)}try{return FixedNumber.fromValue(e,0,t)}catch(e){if(e.code!==n.Logger.errors.INVALID_ARGUMENT){throw e}}return o.throwArgumentError("invalid FixedNumber value","value",e)};FixedNumber.isFixedNumber=function(e){return!!(e&&e._isFixedNumber)};return FixedNumber}();t.FixedNumber=p;var m=p.from(1);var g=p.from("0.5")},1267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._base36To16=t._base16To36=t.parseFixed=t.FixedNumber=t.FixedFormat=t.formatFixed=t.BigNumber=void 0;var i=r(3876);Object.defineProperty(t,"BigNumber",{enumerable:true,get:function(){return i.BigNumber}});var n=r(1276);Object.defineProperty(t,"formatFixed",{enumerable:true,get:function(){return n.formatFixed}});Object.defineProperty(t,"FixedFormat",{enumerable:true,get:function(){return n.FixedFormat}});Object.defineProperty(t,"FixedNumber",{enumerable:true,get:function(){return n.FixedNumber}});Object.defineProperty(t,"parseFixed",{enumerable:true,get:function(){return n.parseFixed}});var s=r(3876);Object.defineProperty(t,"_base16To36",{enumerable:true,get:function(){return s._base16To36}});Object.defineProperty(t,"_base36To16",{enumerable:true,get:function(){return s._base36To16}})},9433:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="bytes/5.7.0"},2056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.joinSignature=t.splitSignature=t.hexZeroPad=t.hexStripZeros=t.hexValue=t.hexConcat=t.hexDataSlice=t.hexDataLength=t.hexlify=t.isHexString=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.isBytes=t.isBytesLike=void 0;var i=r(2975);var n=r(9433);var s=new i.Logger(n.version);function isHexable(e){return!!e.toHexString}function addSlice(e){if(e.slice){return e}e.slice=function(){var t=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(e,t)))};return e}function isBytesLike(e){return isHexString(e)&&!(e.length%2)||isBytes(e)}t.isBytesLike=isBytesLike;function isInteger(e){return typeof e==="number"&&e==e&&e%1===0}function isBytes(e){if(e==null){return false}if(e.constructor===Uint8Array){return true}if(typeof e==="string"){return false}if(!isInteger(e.length)||e.length<0){return false}for(var t=0;t<e.length;t++){var r=e[t];if(!isInteger(r)||r<0||r>=256){return false}}return true}t.isBytes=isBytes;function arrayify(e,t){if(!t){t={}}if(typeof e==="number"){s.checkSafeUint53(e,"invalid arrayify value");var r=[];while(e){r.unshift(e&255);e=parseInt(String(e/256))}if(r.length===0){r.push(0)}return addSlice(new Uint8Array(r))}if(t.allowMissingPrefix&&typeof e==="string"&&e.substring(0,2)!=="0x"){e="0x"+e}if(isHexable(e)){e=e.toHexString()}if(isHexString(e)){var i=e.substring(2);if(i.length%2){if(t.hexPad==="left"){i="0"+i}else if(t.hexPad==="right"){i+="0"}else{s.throwArgumentError("hex data is odd-length","value",e)}}var r=[];for(var n=0;n<i.length;n+=2){r.push(parseInt(i.substring(n,n+2),16))}return addSlice(new Uint8Array(r))}if(isBytes(e)){return addSlice(new Uint8Array(e))}return s.throwArgumentError("invalid arrayify value","value",e)}t.arrayify=arrayify;function concat(e){var t=e.map((function(e){return arrayify(e)}));var r=t.reduce((function(e,t){return e+t.length}),0);var i=new Uint8Array(r);t.reduce((function(e,t){i.set(t,e);return e+t.length}),0);return addSlice(i)}t.concat=concat;function stripZeros(e){var t=arrayify(e);if(t.length===0){return t}var r=0;while(r<t.length&&t[r]===0){r++}if(r){t=t.slice(r)}return t}t.stripZeros=stripZeros;function zeroPad(e,t){e=arrayify(e);if(e.length>t){s.throwArgumentError("value out of range","value",arguments[0])}var r=new Uint8Array(t);r.set(e,t-e.length);return addSlice(r)}t.zeroPad=zeroPad;function isHexString(e,t){if(typeof e!=="string"||!e.match(/^0x[0-9A-Fa-f]*$/)){return false}if(t&&e.length!==2+2*t){return false}return true}t.isHexString=isHexString;var o="0123456789abcdef";function hexlify(e,t){if(!t){t={}}if(typeof e==="number"){s.checkSafeUint53(e,"invalid hexlify value");var r="";while(e){r=o[e&15]+r;e=Math.floor(e/16)}if(r.length){if(r.length%2){r="0"+r}return"0x"+r}return"0x00"}if(typeof e==="bigint"){e=e.toString(16);if(e.length%2){return"0x0"+e}return"0x"+e}if(t.allowMissingPrefix&&typeof e==="string"&&e.substring(0,2)!=="0x"){e="0x"+e}if(isHexable(e)){return e.toHexString()}if(isHexString(e)){if(e.length%2){if(t.hexPad==="left"){e="0x0"+e.substring(2)}else if(t.hexPad==="right"){e+="0"}else{s.throwArgumentError("hex data is odd-length","value",e)}}return e.toLowerCase()}if(isBytes(e)){var i="0x";for(var n=0;n<e.length;n++){var a=e[n];i+=o[(a&240)>>4]+o[a&15]}return i}return s.throwArgumentError("invalid hexlify value","value",e)}t.hexlify=hexlify;function hexDataLength(e){if(typeof e!=="string"){e=hexlify(e)}else if(!isHexString(e)||e.length%2){return null}return(e.length-2)/2}t.hexDataLength=hexDataLength;function hexDataSlice(e,t,r){if(typeof e!=="string"){e=hexlify(e)}else if(!isHexString(e)||e.length%2){s.throwArgumentError("invalid hexData","value",e)}t=2+2*t;if(r!=null){return"0x"+e.substring(t,2+2*r)}return"0x"+e.substring(t)}t.hexDataSlice=hexDataSlice;function hexConcat(e){var t="0x";e.forEach((function(e){t+=hexlify(e).substring(2)}));return t}t.hexConcat=hexConcat;function hexValue(e){var t=hexStripZeros(hexlify(e,{hexPad:"left"}));if(t==="0x"){return"0x0"}return t}t.hexValue=hexValue;function hexStripZeros(e){if(typeof e!=="string"){e=hexlify(e)}if(!isHexString(e)){s.throwArgumentError("invalid hex string","value",e)}e=e.substring(2);var t=0;while(t<e.length&&e[t]==="0"){t++}return"0x"+e.substring(t)}t.hexStripZeros=hexStripZeros;function hexZeroPad(e,t){if(typeof e!=="string"){e=hexlify(e)}else if(!isHexString(e)){s.throwArgumentError("invalid hex string","value",e)}if(e.length>2*t+2){s.throwArgumentError("value out of range","value",arguments[1])}while(e.length<2*t+2){e="0x0"+e.substring(2)}return e}t.hexZeroPad=hexZeroPad;function splitSignature(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(isBytesLike(e)){var r=arrayify(e);if(r.length===64){t.v=27+(r[32]>>7);r[32]&=127;t.r=hexlify(r.slice(0,32));t.s=hexlify(r.slice(32,64))}else if(r.length===65){t.r=hexlify(r.slice(0,32));t.s=hexlify(r.slice(32,64));t.v=r[64]}else{s.throwArgumentError("invalid signature string","signature",e)}if(t.v<27){if(t.v===0||t.v===1){t.v+=27}else{s.throwArgumentError("signature invalid v byte","signature",e)}}t.recoveryParam=1-t.v%2;if(t.recoveryParam){r[32]|=128}t._vs=hexlify(r.slice(32,64))}else{t.r=e.r;t.s=e.s;t.v=e.v;t.recoveryParam=e.recoveryParam;t._vs=e._vs;if(t._vs!=null){var i=zeroPad(arrayify(t._vs),32);t._vs=hexlify(i);var n=i[0]>=128?1:0;if(t.recoveryParam==null){t.recoveryParam=n}else if(t.recoveryParam!==n){s.throwArgumentError("signature recoveryParam mismatch _vs","signature",e)}i[0]&=127;var o=hexlify(i);if(t.s==null){t.s=o}else if(t.s!==o){s.throwArgumentError("signature v mismatch _vs","signature",e)}}if(t.recoveryParam==null){if(t.v==null){s.throwArgumentError("signature missing v and recoveryParam","signature",e)}else if(t.v===0||t.v===1){t.recoveryParam=t.v}else{t.recoveryParam=1-t.v%2}}else{if(t.v==null){t.v=27+t.recoveryParam}else{var a=t.v===0||t.v===1?t.v:1-t.v%2;if(t.recoveryParam!==a){s.throwArgumentError("signature recoveryParam mismatch v","signature",e)}}}if(t.r==null||!isHexString(t.r)){s.throwArgumentError("signature missing or invalid r","signature",e)}else{t.r=hexZeroPad(t.r,32)}if(t.s==null||!isHexString(t.s)){s.throwArgumentError("signature missing or invalid s","signature",e)}else{t.s=hexZeroPad(t.s,32)}var l=arrayify(t.s);if(l[0]>=128){s.throwArgumentError("signature s out of range","signature",e)}if(t.recoveryParam){l[0]|=128}var u=hexlify(l);if(t._vs){if(!isHexString(t._vs)){s.throwArgumentError("signature invalid _vs","signature",e)}t._vs=hexZeroPad(t._vs,32)}if(t._vs==null){t._vs=u}else if(t._vs!==u){s.throwArgumentError("signature _vs mismatch v and s","signature",e)}}t.yParityAndS=t._vs;t.compact=t.r+t.yParityAndS.substring(2);return t}t.splitSignature=splitSignature;function joinSignature(e){e=splitSignature(e);return hexlify(concat([e.r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}t.joinSignature=joinSignature},8611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AddressZero=void 0;t.AddressZero="0x0000000000000000000000000000000000000000"},6662:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.Two=t.One=t.Zero=t.NegativeOne=void 0;var i=r(1267);var n=i.BigNumber.from(-1);t.NegativeOne=n;var s=i.BigNumber.from(0);t.Zero=s;var o=i.BigNumber.from(1);t.One=o;var a=i.BigNumber.from(2);t.Two=a;var l=i.BigNumber.from("1000000000000000000");t.WeiPerEther=l;var u=i.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxUint256=u;var c=i.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");t.MinInt256=c;var h=i.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");t.MaxInt256=h},7788:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HashZero=void 0;t.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"},1309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EtherSymbol=t.HashZero=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.Two=t.One=t.Zero=t.NegativeOne=t.AddressZero=void 0;var i=r(8611);Object.defineProperty(t,"AddressZero",{enumerable:true,get:function(){return i.AddressZero}});var n=r(6662);Object.defineProperty(t,"NegativeOne",{enumerable:true,get:function(){return n.NegativeOne}});Object.defineProperty(t,"Zero",{enumerable:true,get:function(){return n.Zero}});Object.defineProperty(t,"One",{enumerable:true,get:function(){return n.One}});Object.defineProperty(t,"Two",{enumerable:true,get:function(){return n.Two}});Object.defineProperty(t,"WeiPerEther",{enumerable:true,get:function(){return n.WeiPerEther}});Object.defineProperty(t,"MaxUint256",{enumerable:true,get:function(){return n.MaxUint256}});Object.defineProperty(t,"MinInt256",{enumerable:true,get:function(){return n.MinInt256}});Object.defineProperty(t,"MaxInt256",{enumerable:true,get:function(){return n.MaxInt256}});var s=r(7788);Object.defineProperty(t,"HashZero",{enumerable:true,get:function(){return s.HashZero}});var o=r(5454);Object.defineProperty(t,"EtherSymbol",{enumerable:true,get:function(){return o.EtherSymbol}})},5454:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EtherSymbol=void 0;t.EtherSymbol="Ξ"},9553:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="hash/5.7.0"},4021:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.read_emoji_trie=t.read_zero_terminated_array=t.read_mapped_map=t.read_member_array=t.signed=t.read_compressed_payload=t.read_payload=t.decode_arithmetic=void 0;function flat(e,t){if(t==null){t=1}var r=[];var i=r.forEach;var flatDeep=function(e,t){i.call(e,(function(e){if(t>0&&Array.isArray(e)){flatDeep(e,t-1)}else{r.push(e)}}))};flatDeep(e,t);return r}function fromEntries(e){var t={};for(var r=0;r<e.length;r++){var i=e[r];t[i[0]]=i[1]}return t}function decode_arithmetic(e){var t=0;function u16(){return e[t++]<<8|e[t++]}var r=u16();var i=1;var n=[0,1];for(var s=1;s<r;s++){n.push(i+=u16())}var o=u16();var a=t;t+=o;var l=0;var u=0;function read_bit(){if(l==0){u=u<<8|e[t++];l=8}return u>>--l&1}var c=31;var h=Math.pow(2,c);var d=h>>>1;var p=d>>1;var m=h-1;var g=0;for(var s=0;s<c;s++)g=g<<1|read_bit();var y=[];var _=0;var v=h;while(true){var b=Math.floor(((g-_+1)*i-1)/v);var x=0;var T=r;while(T-x>1){var w=x+T>>>1;if(b<n[w]){T=w}else{x=w}}if(x==0)break;y.push(x);var S=_+Math.floor(v*n[x]/i);var E=_+Math.floor(v*n[x+1]/i)-1;while(((S^E)&d)==0){g=g<<1&m|read_bit();S=S<<1&m;E=E<<1&m|1}while(S&~E&p){g=g&d|g<<1&m>>>1|read_bit();S=S<<1^d;E=(E^d)<<1|d|1}_=S;v=1+E-S}var A=r-4;return y.map((function(t){switch(t-A){case 3:return A+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return A+256+(e[a++]<<8|e[a++]);case 1:return A+e[a++];default:return t-1}}))}t.decode_arithmetic=decode_arithmetic;function read_payload(e){var t=0;return function(){return e[t++]}}t.read_payload=read_payload;function read_compressed_payload(e){return read_payload(decode_arithmetic(e))}t.read_compressed_payload=read_compressed_payload;function signed(e){return e&1?~e>>1:e>>1}t.signed=signed;function read_counts(e,t){var r=Array(e);for(var i=0;i<e;i++)r[i]=1+t();return r}function read_ascending(e,t){var r=Array(e);for(var i=0,n=-1;i<e;i++)r[i]=n+=1+t();return r}function read_deltas(e,t){var r=Array(e);for(var i=0,n=0;i<e;i++)r[i]=n+=signed(t());return r}function read_member_array(e,t){var r=read_ascending(e(),e);var i=e();var n=read_ascending(i,e);var s=read_counts(i,e);for(var o=0;o<i;o++){for(var a=0;a<s[o];a++){r.push(n[o]+a)}}return t?r.map((function(e){return t[e]})):r}t.read_member_array=read_member_array;function read_mapped_map(e){var t=[];while(true){var r=e();if(r==0)break;t.push(read_linear_table(r,e))}while(true){var r=e()-1;if(r<0)break;t.push(read_replacement_table(r,e))}return fromEntries(flat(t))}t.read_mapped_map=read_mapped_map;function read_zero_terminated_array(e){var t=[];while(true){var r=e();if(r==0)break;t.push(r)}return t}t.read_zero_terminated_array=read_zero_terminated_array;function read_transposed(e,t,r){var i=Array(e).fill(undefined).map((function(){return[]}));for(var n=0;n<t;n++){read_deltas(e,r).forEach((function(e,t){return i[t].push(e)}))}return i}function read_linear_table(e,t){var r=1+t();var i=t();var n=read_zero_terminated_array(t);var s=read_transposed(n.length,1+e,t);return flat(s.map((function(e,t){var s=e[0],o=e.slice(1);return Array(n[t]).fill(undefined).map((function(e,t){var n=t*i;return[s+t*r,o.map((function(e){return e+n}))]}))})))}function read_replacement_table(e,t){var r=1+t();var i=read_transposed(r,1+e,t);return i.map((function(e){return[e[0],e.slice(1)]}))}function read_emoji_trie(e){var t=read_member_array(e).sort((function(e,t){return e-t}));return read();function read(){var r=[];while(true){var i=read_member_array(e,t);if(i.length==0)break;r.push({set:new Set(i),node:read()})}r.sort((function(e,t){return t.set.size-e.set.size}));var n=e();var s=n%3;n=n/3|0;var o=!!(n&1);n>>=1;var a=n==1;var l=n==2;return{branches:r,valid:s,fe0f:o,save:a,check:l}}}t.read_emoji_trie=read_emoji_trie},2250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getData=void 0;var i=r(8144);var n=r(4021);function getData(){return(0,n.read_compressed_payload)((0,i.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}t.getData=getData},8732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ens_normalize=t.ens_normalize_post_check=void 0;var i=r(9115);var n=r(2250);var s=(0,n.getData)();var o=r(4021);var a=new Set((0,o.read_member_array)(s));var l=new Set((0,o.read_member_array)(s));var u=(0,o.read_mapped_map)(s);var c=(0,o.read_emoji_trie)(s);var h=45;var d=95;function explode_cp(e){return(0,i.toUtf8CodePoints)(e)}function filter_fe0f(e){return e.filter((function(e){return e!=65039}))}function ens_normalize_post_check(e){for(var t=0,r=e.split(".");t<r.length;t++){var i=r[t];var n=explode_cp(i);try{for(var s=n.lastIndexOf(d)-1;s>=0;s--){if(n[s]!==d){throw new Error("underscore only allowed at start")}}if(n.length>=4&&n.every((function(e){return e<128}))&&n[2]===h&&n[3]===h){throw new Error("invalid label extension")}}catch(e){throw new Error('Invalid label "'+i+'": '+e.message)}}return e}t.ens_normalize_post_check=ens_normalize_post_check;function ens_normalize(e){return ens_normalize_post_check(normalize(e,filter_fe0f))}t.ens_normalize=ens_normalize;function normalize(e,t){var r=explode_cp(e).reverse();var i=[];while(r.length){var n=consume_emoji_reversed(r);if(n){i.push.apply(i,t(n));continue}var s=r.pop();if(a.has(s)){i.push(s);continue}if(l.has(s)){continue}var o=u[s];if(o){i.push.apply(i,o);continue}throw new Error("Disallowed codepoint: 0x"+s.toString(16).toUpperCase())}return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String,i)))}function nfc(e){return e.normalize("NFC")}function consume_emoji_reversed(e,t){var r;var i=c;var n;var s;var o=[];var a=e.length;if(t)t.length=0;var _loop_1=function(){var l=e[--a];i=(r=i.branches.find((function(e){return e.set.has(l)})))===null||r===void 0?void 0:r.node;if(!i)return"break";if(i.save){s=l}else if(i.check){if(l===s)return"break"}o.push(l);if(i.fe0f){o.push(65039);if(a>0&&e[a-1]==65039)a--}if(i.valid){n=o.slice();if(i.valid==2)n.splice(1,1);if(t)t.push.apply(t,e.slice(a).reverse());e.length=a}};while(a){var l=_loop_1();if(l==="break")break}return n}},3727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.id=void 0;var i=r(3100);var n=r(9115);function id(e){return(0,i.keccak256)((0,n.toUtf8Bytes)(e))}t.id=id},7866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t._TypedDataEncoder=t.hashMessage=t.messagePrefix=t.ensNormalize=t.isValidName=t.namehash=t.dnsEncode=t.id=void 0;var i=r(3727);Object.defineProperty(t,"id",{enumerable:true,get:function(){return i.id}});var n=r(4267);Object.defineProperty(t,"dnsEncode",{enumerable:true,get:function(){return n.dnsEncode}});Object.defineProperty(t,"isValidName",{enumerable:true,get:function(){return n.isValidName}});Object.defineProperty(t,"namehash",{enumerable:true,get:function(){return n.namehash}});var s=r(2512);Object.defineProperty(t,"hashMessage",{enumerable:true,get:function(){return s.hashMessage}});Object.defineProperty(t,"messagePrefix",{enumerable:true,get:function(){return s.messagePrefix}});var o=r(4267);Object.defineProperty(t,"ensNormalize",{enumerable:true,get:function(){return o.ensNormalize}});var a=r(7516);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:true,get:function(){return a.TypedDataEncoder}})},2512:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hashMessage=t.messagePrefix=void 0;var i=r(2056);var n=r(3100);var s=r(9115);t.messagePrefix="Ethereum Signed Message:\n";function hashMessage(e){if(typeof e==="string"){e=(0,s.toUtf8Bytes)(e)}return(0,n.keccak256)((0,i.concat)([(0,s.toUtf8Bytes)(t.messagePrefix),(0,s.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=hashMessage},4267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;var i=r(2056);var n=r(9115);var s=r(3100);var o=r(2975);var a=r(9553);var l=new o.Logger(a.version);var u=r(8732);var c=new Uint8Array(32);c.fill(0);function checkComponent(e){if(e.length===0){throw new Error("invalid ENS name; empty component")}return e}function ensNameSplit(e){var t=(0,n.toUtf8Bytes)((0,u.ens_normalize)(e));var r=[];if(e.length===0){return r}var i=0;for(var s=0;s<t.length;s++){var o=t[s];if(o===46){r.push(checkComponent(t.slice(i,s)));i=s+1}}if(i>=t.length){throw new Error("invalid ENS name; empty component")}r.push(checkComponent(t.slice(i)));return r}function ensNormalize(e){return ensNameSplit(e).map((function(e){return(0,n.toUtf8String)(e)})).join(".")}t.ensNormalize=ensNormalize;function isValidName(e){try{return ensNameSplit(e).length!==0}catch(e){}return false}t.isValidName=isValidName;function namehash(e){if(typeof e!=="string"){l.throwArgumentError("invalid ENS name; not a string","name",e)}var t=c;var r=ensNameSplit(e);while(r.length){t=(0,s.keccak256)((0,i.concat)([t,(0,s.keccak256)(r.pop())]))}return(0,i.hexlify)(t)}t.namehash=namehash;function dnsEncode(e){return(0,i.hexlify)((0,i.concat)(ensNameSplit(e).map((function(e){if(e.length>63){throw new Error("invalid DNS encoded entry; length exceeds 63 bytes")}var t=new Uint8Array(e.length+1);t.set(e,1);t[0]=t.length-1;return t}))))+"00"}t.dnsEncode=dnsEncode},7516:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.TypedDataEncoder=void 0;var s=r(8957);var o=r(1267);var a=r(2056);var l=r(3100);var u=r(8078);var c=r(2975);var h=r(9553);var d=new c.Logger(h.version);var p=r(3727);var m=new Uint8Array(32);m.fill(0);var g=o.BigNumber.from(-1);var y=o.BigNumber.from(0);var _=o.BigNumber.from(1);var v=o.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hexPadRight(e){var t=(0,a.arrayify)(e);var r=t.length%32;if(r){return(0,a.hexConcat)([t,m.slice(r)])}return(0,a.hexlify)(t)}var b=(0,a.hexZeroPad)(_.toHexString(),32);var x=(0,a.hexZeroPad)(y.toHexString(),32);var T={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"};var w=["name","version","chainId","verifyingContract","salt"];function checkString(e){return function(t){if(typeof t!=="string"){d.throwArgumentError("invalid domain value for "+JSON.stringify(e),"domain."+e,t)}return t}}var S={name:checkString("name"),version:checkString("version"),chainId:function(e){try{return o.BigNumber.from(e).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,s.getAddress)(e).toLowerCase()}catch(e){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=(0,a.arrayify)(e);if(t.length!==32){throw new Error("bad length")}return(0,a.hexlify)(t)}catch(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function getBaseEncoder(e){{var t=e.match(/^(u?)int(\d*)$/);if(t){var r=t[1]==="";var i=parseInt(t[2]||"256");if(i%8!==0||i>256||t[2]&&t[2]!==String(i)){d.throwArgumentError("invalid numeric width","type",e)}var n=v.mask(r?i-1:i);var u=r?n.add(_).mul(g):y;return function(t){var r=o.BigNumber.from(t);if(r.lt(u)||r.gt(n)){d.throwArgumentError("value out-of-bounds for "+e,"value",t)}return(0,a.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{var t=e.match(/^bytes(\d+)$/);if(t){var c=parseInt(t[1]);if(c===0||c>32||t[1]!==String(c)){d.throwArgumentError("invalid bytes width","type",e)}return function(t){var r=(0,a.arrayify)(t);if(r.length!==c){d.throwArgumentError("invalid length for "+e,"value",t)}return hexPadRight(t)}}}switch(e){case"address":return function(e){return(0,a.hexZeroPad)((0,s.getAddress)(e),32)};case"bool":return function(e){return!e?x:b};case"bytes":return function(e){return(0,l.keccak256)(e)};case"string":return function(e){return(0,p.id)(e)}}return null}function encodeType(e,t){return e+"("+t.map((function(e){var t=e.name,r=e.type;return r+" "+t})).join(",")+")"}var E=function(){function TypedDataEncoder(e){(0,u.defineReadOnly)(this,"types",Object.freeze((0,u.deepCopy)(e)));(0,u.defineReadOnly)(this,"_encoderCache",{});(0,u.defineReadOnly)(this,"_types",{});var t={};var r={};var i={};Object.keys(e).forEach((function(e){t[e]={};r[e]=[];i[e]={}}));var _loop_1=function(i){var n={};e[i].forEach((function(s){if(n[s.name]){d.throwArgumentError("duplicate variable name "+JSON.stringify(s.name)+" in "+JSON.stringify(i),"types",e)}n[s.name]=true;var o=s.type.match(/^([^\x5b]*)(\x5b|$)/)[1];if(o===i){d.throwArgumentError("circular type reference to "+JSON.stringify(o),"types",e)}var a=getBaseEncoder(o);if(a){return}if(!r[o]){d.throwArgumentError("unknown type "+JSON.stringify(o),"types",e)}r[o].push(i);t[i][o]=true}))};for(var n in e){_loop_1(n)}var s=Object.keys(r).filter((function(e){return r[e].length===0}));if(s.length===0){d.throwArgumentError("missing primary type","types",e)}else if(s.length>1){d.throwArgumentError("ambiguous primary types or unused types: "+s.map((function(e){return JSON.stringify(e)})).join(", "),"types",e)}(0,u.defineReadOnly)(this,"primaryType",s[0]);function checkCircular(n,s){if(s[n]){d.throwArgumentError("circular type reference to "+JSON.stringify(n),"types",e)}s[n]=true;Object.keys(t[n]).forEach((function(e){if(!r[e]){return}checkCircular(e,s);Object.keys(s).forEach((function(t){i[t][e]=true}))}));delete s[n]}checkCircular(this.primaryType,{});for(var o in i){var a=Object.keys(i[o]);a.sort();this._types[o]=encodeType(o,e[o])+a.map((function(t){return encodeType(t,e[t])})).join("")}}TypedDataEncoder.prototype.getEncoder=function(e){var t=this._encoderCache[e];if(!t){t=this._encoderCache[e]=this._getEncoder(e)}return t};TypedDataEncoder.prototype._getEncoder=function(e){var t=this;{var r=getBaseEncoder(e);if(r){return r}}var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var n=i[1];var s=this.getEncoder(n);var o=parseInt(i[3]);return function(e){if(o>=0&&e.length!==o){d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e)}var r=e.map(s);if(t._types[n]){r=r.map(l.keccak256)}return(0,l.keccak256)((0,a.hexConcat)(r))}}var u=this.types[e];if(u){var c=(0,p.id)(this._types[e]);return function(e){var r=u.map((function(r){var i=r.name,n=r.type;var s=t.getEncoder(n)(e[i]);if(t._types[n]){return(0,l.keccak256)(s)}return s}));r.unshift(c);return(0,a.hexConcat)(r)}}return d.throwArgumentError("unknown type: "+e,"type",e)};TypedDataEncoder.prototype.encodeType=function(e){var t=this._types[e];if(!t){d.throwArgumentError("unknown type: "+JSON.stringify(e),"name",e)}return t};TypedDataEncoder.prototype.encodeData=function(e,t){return this.getEncoder(e)(t)};TypedDataEncoder.prototype.hashStruct=function(e,t){return(0,l.keccak256)(this.encodeData(e,t))};TypedDataEncoder.prototype.encode=function(e){return this.encodeData(this.primaryType,e)};TypedDataEncoder.prototype.hash=function(e){return this.hashStruct(this.primaryType,e)};TypedDataEncoder.prototype._visit=function(e,t,r){var i=this;{var n=getBaseEncoder(e);if(n){return r(e,t)}}var s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){var o=s[1];var a=parseInt(s[3]);if(a>=0&&t.length!==a){d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t)}return t.map((function(e){return i._visit(o,e,r)}))}var l=this.types[e];if(l){return l.reduce((function(e,n){var s=n.name,o=n.type;e[s]=i._visit(o,t[s],r);return e}),{})}return d.throwArgumentError("unknown type: "+e,"type",e)};TypedDataEncoder.prototype.visit=function(e,t){return this._visit(this.primaryType,e,t)};TypedDataEncoder.from=function(e){return new TypedDataEncoder(e)};TypedDataEncoder.getPrimaryType=function(e){return TypedDataEncoder.from(e).primaryType};TypedDataEncoder.hashStruct=function(e,t,r){return TypedDataEncoder.from(t).hashStruct(e,r)};TypedDataEncoder.hashDomain=function(e){var t=[];for(var r in e){var i=T[r];if(!i){d.throwArgumentError("invalid typed-data domain key: "+JSON.stringify(r),"domain",e)}t.push({name:r,type:i})}t.sort((function(e,t){return w.indexOf(e.name)-w.indexOf(t.name)}));return TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:t},e)};TypedDataEncoder.encode=function(e,t,r){return(0,a.hexConcat)(["0x1901",TypedDataEncoder.hashDomain(e),TypedDataEncoder.from(t).hash(r)])};TypedDataEncoder.hash=function(e,t,r){return(0,l.keccak256)(TypedDataEncoder.encode(e,t,r))};TypedDataEncoder.resolveNames=function(e,t,r,s){return i(this,void 0,void 0,(function(){var i,o,l,c,h,d,p,m;return n(this,(function(n){switch(n.label){case 0:e=(0,u.shallowCopy)(e);i={};if(e.verifyingContract&&!(0,a.isHexString)(e.verifyingContract,20)){i[e.verifyingContract]="0x"}o=TypedDataEncoder.from(t);o.visit(r,(function(e,t){if(e==="address"&&!(0,a.isHexString)(t,20)){i[t]="0x"}return t}));l=[];for(c in i)l.push(c);h=0;n.label=1;case 1:if(!(h<l.length))return[3,4];d=l[h];p=i;m=d;return[4,s(d)];case 2:p[m]=n.sent();n.label=3;case 3:h++;return[3,1];case 4:if(e.verifyingContract&&i[e.verifyingContract]){e.verifyingContract=i[e.verifyingContract]}r=o.visit(r,(function(e,t){if(e==="address"&&i[t]){return i[t]}return t}));return[2,{domain:e,value:r}]}}))}))};TypedDataEncoder.getPayload=function(e,t,r){TypedDataEncoder.hashDomain(e);var i={};var n=[];w.forEach((function(t){var r=e[t];if(r==null){return}i[t]=S[t](r);n.push({name:t,type:T[t]})}));var s=TypedDataEncoder.from(t);var l=(0,u.shallowCopy)(t);if(l.EIP712Domain){d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t)}else{l.EIP712Domain=n}s.encode(r);return{types:l,domain:i,primaryType:s.primaryType,message:s.visit(r,(function(e,t){if(e.match(/^bytes(\d*)/)){return(0,a.hexlify)((0,a.arrayify)(t))}if(e.match(/^u?int/)){return o.BigNumber.from(t).toString()}switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":if(typeof t!=="string"){d.throwArgumentError("invalid string","value",t)}return t}return d.throwArgumentError("unsupported type","type",e)}))}};return TypedDataEncoder}();t.TypedDataEncoder=E},3100:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.keccak256=void 0;var n=i(r(1434));var s=r(2056);function keccak256(e){return"0x"+n.default.keccak_256((0,s.arrayify)(e))}t.keccak256=keccak256},790:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="logger/5.7.0"},2975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Logger=t.ErrorCode=t.LogLevel=void 0;var i=false;var n=false;var s={debug:1,default:2,info:2,warning:3,error:4,off:5};var o=s["default"];var a=r(790);var l=null;function _checkNormalize(){try{var e=[];["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test".normalize(t)!=="test"){throw new Error("bad normalize")}}catch(r){e.push(t)}}));if(e.length){throw new Error("missing "+e.join(", "))}if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769)){throw new Error("broken implementation")}}catch(e){return e.message}return null}var u=_checkNormalize();var c;(function(e){e["DEBUG"]="DEBUG";e["INFO"]="INFO";e["WARNING"]="WARNING";e["ERROR"]="ERROR";e["OFF"]="OFF"})(c=t.LogLevel||(t.LogLevel={}));var h;(function(e){e["UNKNOWN_ERROR"]="UNKNOWN_ERROR";e["NOT_IMPLEMENTED"]="NOT_IMPLEMENTED";e["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION";e["NETWORK_ERROR"]="NETWORK_ERROR";e["SERVER_ERROR"]="SERVER_ERROR";e["TIMEOUT"]="TIMEOUT";e["BUFFER_OVERRUN"]="BUFFER_OVERRUN";e["NUMERIC_FAULT"]="NUMERIC_FAULT";e["MISSING_NEW"]="MISSING_NEW";e["INVALID_ARGUMENT"]="INVALID_ARGUMENT";e["MISSING_ARGUMENT"]="MISSING_ARGUMENT";e["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT";e["CALL_EXCEPTION"]="CALL_EXCEPTION";e["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS";e["NONCE_EXPIRED"]="NONCE_EXPIRED";e["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED";e["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT";e["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED";e["ACTION_REJECTED"]="ACTION_REJECTED"})(h=t.ErrorCode||(t.ErrorCode={}));var d="0123456789abcdef";var p=function(){function Logger(e){Object.defineProperty(this,"version",{enumerable:true,value:e,writable:false})}Logger.prototype._log=function(e,t){var r=e.toLowerCase();if(s[r]==null){this.throwArgumentError("invalid log level name","logLevel",e)}if(o>s[r]){return}console.log.apply(console,t)};Logger.prototype.debug=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}this._log(Logger.levels.DEBUG,e)};Logger.prototype.info=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}this._log(Logger.levels.INFO,e)};Logger.prototype.warn=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}this._log(Logger.levels.WARNING,e)};Logger.prototype.makeError=function(e,t,r){if(n){return this.makeError("censored error",t,{})}if(!t){t=Logger.errors.UNKNOWN_ERROR}if(!r){r={}}var i=[];Object.keys(r).forEach((function(e){var t=r[e];try{if(t instanceof Uint8Array){var n="";for(var s=0;s<t.length;s++){n+=d[t[s]>>4];n+=d[t[s]&15]}i.push(e+"=Uint8Array(0x"+n+")")}else{i.push(e+"="+JSON.stringify(t))}}catch(t){i.push(e+"="+JSON.stringify(r[e].toString()))}}));i.push("code="+t);i.push("version="+this.version);var s=e;var o="";switch(t){case h.NUMERIC_FAULT:{o="NUMERIC_FAULT";var a=e;switch(a){case"overflow":case"underflow":case"division-by-zero":o+="-"+a;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case h.CALL_EXCEPTION:case h.INSUFFICIENT_FUNDS:case h.MISSING_NEW:case h.NONCE_EXPIRED:case h.REPLACEMENT_UNDERPRICED:case h.TRANSACTION_REPLACED:case h.UNPREDICTABLE_GAS_LIMIT:o=t;break}if(o){e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"}if(i.length){e+=" ("+i.join(", ")+")"}var l=new Error(e);l.reason=s;l.code=t;Object.keys(r).forEach((function(e){l[e]=r[e]}));return l};Logger.prototype.throwError=function(e,t,r){throw this.makeError(e,t,r)};Logger.prototype.throwArgumentError=function(e,t,r){return this.throwError(e,Logger.errors.INVALID_ARGUMENT,{argument:t,value:r})};Logger.prototype.assert=function(e,t,r,i){if(!!e){return}this.throwError(t,r,i)};Logger.prototype.assertArgument=function(e,t,r,i){if(!!e){return}this.throwArgumentError(t,r,i)};Logger.prototype.checkNormalize=function(e){if(e==null){e="platform missing String.prototype.normalize"}if(u){this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:u})}};Logger.prototype.checkSafeUint53=function(e,t){if(typeof e!=="number"){return}if(t==null){t="value not safe"}if(e<0||e>=9007199254740991){this.throwError(t,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e})}if(e%1){this.throwError(t,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e})}};Logger.prototype.checkArgumentCount=function(e,t,r){if(r){r=": "+r}else{r=""}if(e<t){this.throwError("missing argument"+r,Logger.errors.MISSING_ARGUMENT,{count:e,expectedCount:t})}if(e>t){this.throwError("too many arguments"+r,Logger.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}};Logger.prototype.checkNew=function(e,t){if(e===Object||e==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:t.name})}};Logger.prototype.checkAbstract=function(e,t){if(e===t){this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"})}else if(e===Object||e==null){this.throwError("missing new",Logger.errors.MISSING_NEW,{name:t.name})}};Logger.globalLogger=function(){if(!l){l=new Logger(a.version)}return l};Logger.setCensorship=function(e,t){if(!e&&t){this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}if(i){if(!e){return}this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}n=!!e;i=!!t};Logger.setLogLevel=function(e){var t=s[e.toLowerCase()];if(t==null){Logger.globalLogger().warn("invalid log level - "+e);return}o=t};Logger.from=function(e){return new Logger(e)};Logger.errors=h;Logger.levels=c;return Logger}();t.Logger=p},5212:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="properties/5.7.0"},8078:function(e,t,r){"use strict";var i=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};var n=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(i)throw new TypeError("Generator is already executing.");while(r)try{if(i=1,n&&(s=o[0]&2?n["return"]:o[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,o[1])).done)return s;if(n=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];n=0}finally{i=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};Object.defineProperty(t,"__esModule",{value:true});t.Description=t.deepCopy=t.shallowCopy=t.checkProperties=t.resolveProperties=t.getStatic=t.defineReadOnly=void 0;var s=r(2975);var o=r(5212);var a=new s.Logger(o.version);function defineReadOnly(e,t,r){Object.defineProperty(e,t,{enumerable:true,value:r,writable:false})}t.defineReadOnly=defineReadOnly;function getStatic(e,t){for(var r=0;r<32;r++){if(e[t]){return e[t]}if(!e.prototype||typeof e.prototype!=="object"){break}e=Object.getPrototypeOf(e.prototype).constructor}return null}t.getStatic=getStatic;function resolveProperties(e){return i(this,void 0,void 0,(function(){var t,r;return n(this,(function(i){switch(i.label){case 0:t=Object.keys(e).map((function(t){var r=e[t];return Promise.resolve(r).then((function(e){return{key:t,value:e}}))}));return[4,Promise.all(t)];case 1:r=i.sent();return[2,r.reduce((function(e,t){e[t.key]=t.value;return e}),{})]}}))}))}t.resolveProperties=resolveProperties;function checkProperties(e,t){if(!e||typeof e!=="object"){a.throwArgumentError("invalid object","object",e)}Object.keys(e).forEach((function(r){if(!t[r]){a.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}}))}t.checkProperties=checkProperties;function shallowCopy(e){var t={};for(var r in e){t[r]=e[r]}return t}t.shallowCopy=shallowCopy;var l={bigint:true,boolean:true,function:true,number:true,string:true};function _isFrozen(e){if(e===undefined||e===null||l[typeof e]){return true}if(Array.isArray(e)||typeof e==="object"){if(!Object.isFrozen(e)){return false}var t=Object.keys(e);for(var r=0;r<t.length;r++){var i=null;try{i=e[t[r]]}catch(e){continue}if(!_isFrozen(i)){return false}}return true}return a.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function _deepCopy(e){if(_isFrozen(e)){return e}if(Array.isArray(e)){return Object.freeze(e.map((function(e){return deepCopy(e)})))}if(typeof e==="object"){var t={};for(var r in e){var i=e[r];if(i===undefined){continue}defineReadOnly(t,r,deepCopy(i))}return t}return a.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function deepCopy(e){return _deepCopy(e)}t.deepCopy=deepCopy;var u=function(){function Description(e){for(var t in e){this[t]=deepCopy(e[t])}}return Description}();t.Description=u},1669:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="rlp/5.7.0"},2099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.decode=t.encode=void 0;var i=r(2056);var n=r(2975);var s=r(1669);var o=new n.Logger(s.version);function arrayifyInteger(e){var t=[];while(e){t.unshift(e&255);e>>=8}return t}function unarrayifyInteger(e,t,r){var i=0;for(var n=0;n<r;n++){i=i*256+e[t+n]}return i}function _encode(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(_encode(e))}));if(t.length<=55){t.unshift(192+t.length);return t}var r=arrayifyInteger(t.length);r.unshift(247+r.length);return r.concat(t)}if(!(0,i.isBytesLike)(e)){o.throwArgumentError("RLP object must be BytesLike","object",e)}var n=Array.prototype.slice.call((0,i.arrayify)(e));if(n.length===1&&n[0]<=127){return n}else if(n.length<=55){n.unshift(128+n.length);return n}var s=arrayifyInteger(n.length);s.unshift(183+s.length);return s.concat(n)}function encode(e){return(0,i.hexlify)(_encode(e))}t.encode=encode;function _decodeChildren(e,t,r,i){var s=[];while(r<t+1+i){var a=_decode(e,r);s.push(a.result);r+=a.consumed;if(r>t+1+i){o.throwError("child data too short",n.Logger.errors.BUFFER_OVERRUN,{})}}return{consumed:1+i,result:s}}function _decode(e,t){if(e.length===0){o.throwError("data too short",n.Logger.errors.BUFFER_OVERRUN,{})}if(e[t]>=248){var r=e[t]-247;if(t+1+r>e.length){o.throwError("data short segment too short",n.Logger.errors.BUFFER_OVERRUN,{})}var s=unarrayifyInteger(e,t+1,r);if(t+1+r+s>e.length){o.throwError("data long segment too short",n.Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(e,t,t+1+r,r+s)}else if(e[t]>=192){var a=e[t]-192;if(t+1+a>e.length){o.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{})}return _decodeChildren(e,t,t+1,a)}else if(e[t]>=184){var r=e[t]-183;if(t+1+r>e.length){o.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{})}var l=unarrayifyInteger(e,t+1,r);if(t+1+r+l>e.length){o.throwError("data array too short",n.Logger.errors.BUFFER_OVERRUN,{})}var u=(0,i.hexlify)(e.slice(t+1+r,t+1+r+l));return{consumed:1+r+l,result:u}}else if(e[t]>=128){var c=e[t]-128;if(t+1+c>e.length){o.throwError("data too short",n.Logger.errors.BUFFER_OVERRUN,{})}var u=(0,i.hexlify)(e.slice(t+1,t+1+c));return{consumed:1+c,result:u}}return{consumed:1,result:(0,i.hexlify)(e[t])}}function decode(e){var t=(0,i.arrayify)(e);var r=_decode(t,0);if(r.consumed!==t.length){o.throwArgumentError("invalid rlp data","data",e)}return r.result}t.decode=decode},4499:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.version=void 0;t.version="strings/5.7.0"},4194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseBytes32String=t.formatBytes32String=void 0;var i=r(1309);var n=r(2056);var s=r(50);function formatBytes32String(e){var t=(0,s.toUtf8Bytes)(e);if(t.length>31){throw new Error("bytes32 string must be less than 32 bytes")}return(0,n.hexlify)((0,n.concat)([t,i.HashZero]).slice(0,32))}t.formatBytes32String=formatBytes32String;function parseBytes32String(e){var t=(0,n.arrayify)(e);if(t.length!==32){throw new Error("invalid bytes32 - not 32 bytes long")}if(t[31]!==0){throw new Error("invalid bytes32 string - no null terminator")}var r=31;while(t[r-1]===0){r--}return(0,s.toUtf8String)(t.slice(0,r))}t.parseBytes32String=parseBytes32String},6403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.nameprep=t._nameprepTableC=t._nameprepTableB2=t._nameprepTableA1=void 0;var i=r(50);function bytes2(e){if(e.length%4!==0){throw new Error("bad data")}var t=[];for(var r=0;r<e.length;r+=4){t.push(parseInt(e.substring(r,r+4),16))}return t}function createTable(e,t){if(!t){t=function(e){return[parseInt(e,16)]}}var r=0;var i={};e.split(",").forEach((function(e){var n=e.split(":");r+=parseInt(n[0],16);i[r]=t(n[1])}));return i}function createRangeTable(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");if(r.length===1){r[1]="0"}else if(r[1]===""){r[1]="1"}var i=t+parseInt(r[0],16);t=parseInt(r[1],16);return{l:i,h:t}}))}function matchMap(e,t){var r=0;for(var i=0;i<t.length;i++){var n=t[i];r+=n.l;if(e>=r&&e<=r+n.h&&(e-r)%(n.d||1)===0){if(n.e&&n.e.indexOf(e-r)!==-1){continue}return n}}return null}var n=createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d");var s="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)}));var o=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}];var a=createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3");var l=createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7");var u=createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",bytes2);var c=createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function flatten(e){return e.reduce((function(e,t){t.forEach((function(t){e.push(t)}));return e}),[])}function _nameprepTableA1(e){return!!matchMap(e,n)}t._nameprepTableA1=_nameprepTableA1;function _nameprepTableB2(e){var t=matchMap(e,o);if(t){return[e+t.s]}var r=a[e];if(r){return r}var i=l[e];if(i){return[e+i[0]]}var n=u[e];if(n){return n}return null}t._nameprepTableB2=_nameprepTableB2;function _nameprepTableC(e){return!!matchMap(e,c)}t._nameprepTableC=_nameprepTableC;function nameprep(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59){return e.toLowerCase()}var t=(0,i.toUtf8CodePoints)(e);t=flatten(t.map((function(e){if(s.indexOf(e)>=0){return[]}if(e>=65024&&e<=65039){return[]}var t=_nameprepTableB2(e);if(t){return t}return[e]})));t=(0,i.toUtf8CodePoints)((0,i._toUtf8String)(t),i.UnicodeNormalizationForm.NFKC);t.forEach((function(e){if(_nameprepTableC(e)){throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}}));t.forEach((function(e){if(_nameprepTableA1(e)){throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}}));var r=(0,i._toUtf8String)(t);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-"){throw new Error("invalid hyphen")}return r}t.nameprep=nameprep},9115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.nameprep=t.parseBytes32String=t.formatBytes32String=t.UnicodeNormalizationForm=t.Utf8ErrorReason=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=void 0;var i=r(4194);Object.defineProperty(t,"formatBytes32String",{enumerable:true,get:function(){return i.formatBytes32String}});Object.defineProperty(t,"parseBytes32String",{enumerable:true,get:function(){return i.parseBytes32String}});var n=r(6403);Object.defineProperty(t,"nameprep",{enumerable:true,get:function(){return n.nameprep}});var s=r(50);Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:true,get:function(){return s._toEscapedUtf8String}});Object.defineProperty(t,"toUtf8Bytes",{enumerable:true,get:function(){return s.toUtf8Bytes}});Object.defineProperty(t,"toUtf8CodePoints",{enumerable:true,get:function(){return s.toUtf8CodePoints}});Object.defineProperty(t,"toUtf8String",{enumerable:true,get:function(){return s.toUtf8String}});Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:true,get:function(){return s.UnicodeNormalizationForm}});Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:true,get:function(){return s.Utf8ErrorFuncs}});Object.defineProperty(t,"Utf8ErrorReason",{enumerable:true,get:function(){return s.Utf8ErrorReason}})},50:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toUtf8CodePoints=t.toUtf8String=t._toUtf8String=t._toEscapedUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=t.Utf8ErrorReason=t.UnicodeNormalizationForm=void 0;var i=r(2056);var n=r(2975);var s=r(4499);var o=new n.Logger(s.version);var a;(function(e){e["current"]="";e["NFC"]="NFC";e["NFD"]="NFD";e["NFKC"]="NFKC";e["NFKD"]="NFKD"})(a=t.UnicodeNormalizationForm||(t.UnicodeNormalizationForm={}));var l;(function(e){e["UNEXPECTED_CONTINUE"]="unexpected continuation byte";e["BAD_PREFIX"]="bad codepoint prefix";e["OVERRUN"]="string overrun";e["MISSING_CONTINUE"]="missing continuation byte";e["OUT_OF_RANGE"]="out of UTF-8 range";e["UTF16_SURROGATE"]="UTF-16 surrogate";e["OVERLONG"]="overlong representation"})(l=t.Utf8ErrorReason||(t.Utf8ErrorReason={}));function errorFunc(e,t,r,i,n){return o.throwArgumentError("invalid codepoint at offset "+t+"; "+e,"bytes",r)}function ignoreFunc(e,t,r,i,n){if(e===l.BAD_PREFIX||e===l.UNEXPECTED_CONTINUE){var s=0;for(var o=t+1;o<r.length;o++){if(r[o]>>6!==2){break}s++}return s}if(e===l.OVERRUN){return r.length-t-1}return 0}function replaceFunc(e,t,r,i,n){if(e===l.OVERLONG){i.push(n);return 0}i.push(65533);return ignoreFunc(e,t,r,i,n)}t.Utf8ErrorFuncs=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(e,r){if(r==null){r=t.Utf8ErrorFuncs.error}e=(0,i.arrayify)(e);var n=[];var s=0;while(s<e.length){var o=e[s++];if(o>>7===0){n.push(o);continue}var a=null;var u=null;if((o&224)===192){a=1;u=127}else if((o&240)===224){a=2;u=2047}else if((o&248)===240){a=3;u=65535}else{if((o&192)===128){s+=r(l.UNEXPECTED_CONTINUE,s-1,e,n)}else{s+=r(l.BAD_PREFIX,s-1,e,n)}continue}if(s-1+a>=e.length){s+=r(l.OVERRUN,s-1,e,n);continue}var c=o&(1<<8-a-1)-1;for(var h=0;h<a;h++){var d=e[s];if((d&192)!=128){s+=r(l.MISSING_CONTINUE,s,e,n);c=null;break}c=c<<6|d&63;s++}if(c===null){continue}if(c>1114111){s+=r(l.OUT_OF_RANGE,s-1-a,e,n,c);continue}if(c>=55296&&c<=57343){s+=r(l.UTF16_SURROGATE,s-1-a,e,n,c);continue}if(c<=u){s+=r(l.OVERLONG,s-1-a,e,n,c);continue}n.push(c)}return n}function toUtf8Bytes(e,t){if(t===void 0){t=a.current}if(t!=a.current){o.checkNormalize();e=e.normalize(t)}var r=[];for(var n=0;n<e.length;n++){var s=e.charCodeAt(n);if(s<128){r.push(s)}else if(s<2048){r.push(s>>6|192);r.push(s&63|128)}else if((s&64512)==55296){n++;var l=e.charCodeAt(n);if(n>=e.length||(l&64512)!==56320){throw new Error("invalid utf-8 string")}var u=65536+((s&1023)<<10)+(l&1023);r.push(u>>18|240);r.push(u>>12&63|128);r.push(u>>6&63|128);r.push(u&63|128)}else{r.push(s>>12|224);r.push(s>>6&63|128);r.push(s&63|128)}}return(0,i.arrayify)(r)}t.toUtf8Bytes=toUtf8Bytes;function escapeChar(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function _toEscapedUtf8String(e,t){return'"'+getUtf8CodePoints(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127){return String.fromCharCode(e)}}if(e<=65535){return escapeChar(e)}e-=65536;return escapeChar((e>>10&1023)+55296)+escapeChar((e&1023)+56320)})).join("")+'"'}t._toEscapedUtf8String=_toEscapedUtf8String;function _toUtf8String(e){return e.map((function(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320)})).join("")}t._toUtf8String=_toUtf8String;function toUtf8String(e,t){return _toUtf8String(getUtf8CodePoints(e,t))}t.toUtf8String=toUtf8String;function toUtf8CodePoints(e,t){if(t===void 0){t=a.current}return getUtf8CodePoints(toUtf8Bytes(e,t))}t.toUtf8CodePoints=toUtf8CodePoints},4834:(e,t,r)=>{var i=Object.create;var n=Object.defineProperty;var s=Object.getPrototypeOf;var o=Object.prototype.hasOwnProperty;var a=Object.getOwnPropertyNames;var l=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertySymbols;var c=Object.prototype.propertyIsEnumerable;var __defNormalProp=(e,t,r)=>t in e?n(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var __objSpread=(e,t)=>{for(var r in t||(t={}))if(o.call(t,r))__defNormalProp(e,r,t[r]);if(u)for(var r of u(t)){if(c.call(t,r))__defNormalProp(e,r,t[r])}return e};var __markAsModule=e=>n(e,"__esModule",{value:true});var __commonJS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var __export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:true})};var __reExport=(e,t,r)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let i of a(t))if(!o.call(e,i)&&i!=="default")n(e,i,{get:()=>t[i],enumerable:!(r=l(t,i))||r.enumerable})}return e};var __toModule=e=>__reExport(__markAsModule(n(e!=null?i(s(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:true}:{value:e,enumerable:true})),e);var h=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var d=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var p=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.SuppressWarnings=e.Override=e.Nullable=e.NotNull=void 0;function NotNull(e,t,r){}e.NotNull=NotNull;function Nullable(e,t,r){}e.Nullable=Nullable;function Override(e,t,r){}e.Override=Override;function SuppressWarnings(e){return(e,t,r)=>{}}e.SuppressWarnings=SuppressWarnings}));var m=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IntStream=void 0;var t;(function(e){e.EOF=-1;e.UNKNOWN_SOURCE_NAME="<unknown>"})(t=e.IntStream||(e.IntStream={}))}));var g=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ANTLRInputStream=void 0;var i=r(9491);var n=p();var s=m();var o=class{constructor(e){this.p=0;this.data=e;this.n=e.length}reset(){this.p=0}consume(){if(this.p>=this.n){i(this.LA(1)===s.IntStream.EOF);throw new Error("cannot consume EOF")}if(this.p<this.n){this.p++}}LA(e){if(e===0){return 0}if(e<0){e++;if(this.p+e-1<0){return s.IntStream.EOF}}if(this.p+e-1>=this.n){return s.IntStream.EOF}return this.data.charCodeAt(this.p+e-1)}LT(e){return this.LA(e)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(e){}seek(e){if(e<=this.p){this.p=e;return}e=Math.min(e,this.n);while(this.p<e){this.consume()}}getText(e){let t=e.a;let r=e.b;if(r>=this.n){r=this.n-1}let i=r-t+1;if(t>=this.n){return""}return this.data.substr(t,i)}get sourceName(){if(!this.name){return s.IntStream.UNKNOWN_SOURCE_NAME}return this.name}toString(){return this.data}};t([n.Override],o.prototype,"consume",null);t([n.Override],o.prototype,"LA",null);t([n.Override],o.prototype,"index",null);t([n.Override],o.prototype,"size",null);t([n.Override],o.prototype,"mark",null);t([n.Override],o.prototype,"release",null);t([n.Override],o.prototype,"seek",null);t([n.Override],o.prototype,"getText",null);t([n.Override],o.prototype,"sourceName",null);t([n.Override],o.prototype,"toString",null);e.ANTLRInputStream=o}));var y=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ATNState=void 0;var r=p();var i=class{constructor(){this.stateNumber=i.INVALID_STATE_NUMBER;this.ruleIndex=0;this.epsilonOnlyTransitions=false;this.transitions=[];this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(e){if(e instanceof i){return this.stateNumber===e.stateNumber}return false}get isNonGreedyExitState(){return false}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(e,t){if(this.transitions.length===0){this.epsilonOnlyTransitions=e.isEpsilon}else if(this.epsilonOnlyTransitions!==e.isEpsilon){this.epsilonOnlyTransitions=false;throw new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.")}this.transitions.splice(t!==void 0?t:this.transitions.length,0,e)}transition(e){return this.transitions[e]}setTransition(e,t){this.transitions[e]=t}removeTransition(e){return this.transitions.splice(e,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(e){this.ruleIndex=e}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(e){return this.optimizedTransitions[e]}addOptimizedTransition(e){if(!this.isOptimized){this.optimizedTransitions=new Array}this.optimizedTransitions.push(e)}setOptimizedTransition(e,t){if(!this.isOptimized){throw new Error("This ATNState is not optimized.")}this.optimizedTransitions[e]=t}removeOptimizedTransition(e){if(!this.isOptimized){throw new Error("This ATNState is not optimized.")}this.optimizedTransitions.splice(e,1)}};t([r.Override],i.prototype,"hashCode",null);t([r.Override],i.prototype,"equals",null);t([r.Override],i.prototype,"toString",null);e.ATNState=i;(function(e){e.INVALID_STATE_NUMBER=-1})(i=e.ATNState||(e.ATNState={}))}));var _=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ATNStateType=void 0;var t;(function(e){e[e["INVALID_TYPE"]=0]="INVALID_TYPE";e[e["BASIC"]=1]="BASIC";e[e["RULE_START"]=2]="RULE_START";e[e["BLOCK_START"]=3]="BLOCK_START";e[e["PLUS_BLOCK_START"]=4]="PLUS_BLOCK_START";e[e["STAR_BLOCK_START"]=5]="STAR_BLOCK_START";e[e["TOKEN_START"]=6]="TOKEN_START";e[e["RULE_STOP"]=7]="RULE_STOP";e[e["BLOCK_END"]=8]="BLOCK_END";e[e["STAR_LOOP_BACK"]=9]="STAR_LOOP_BACK";e[e["STAR_LOOP_ENTRY"]=10]="STAR_LOOP_ENTRY";e[e["PLUS_LOOP_BACK"]=11]="PLUS_LOOP_BACK";e[e["LOOP_END"]=12]="LOOP_END"})(t=e.ATNStateType||(e.ATNStateType={}))}));var v=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RecognitionException=void 0;var t=class extends Error{constructor(e,t,r,i){super(i);this._offendingState=-1;this._recognizer=e;this.input=t;this.ctx=r;if(e){this._offendingState=e.state}}get offendingState(){return this._offendingState}setOffendingState(e){this._offendingState=e}get expectedTokens(){if(this._recognizer){return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}return void 0}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(e){if(e&&e!==this._recognizer){return void 0}return this.offendingToken}setOffendingToken(e,t){if(e===this._recognizer){this.offendingToken=t}}get recognizer(){return this._recognizer}};e.RecognitionException=t}));var b=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.Transition=void 0;var i=p();var n=class Transition{constructor(e){if(e==null){throw new Error("target cannot be null.")}this.target=e}get isEpsilon(){return false}get label(){return void 0}};n.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"];t([i.NotNull],n.prototype,"target",void 0);n=t([r(0,i.NotNull)],n);e.Transition=n}));var x=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AbstractPredicateTransition=void 0;var t=b();var r=class extends t.Transition{constructor(e){super(e)}};e.AbstractPredicateTransition=r}));var T=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MurmurHash=void 0;var t;(function(e){const t=0;function initialize(e=t){return e}e.initialize=initialize;function update(e,t){const r=3432918353;const i=461845907;const n=15;const s=13;const o=5;const a=3864292196;if(t==null){t=0}else if(typeof t==="string"){t=hashString(t)}else if(typeof t==="object"){t=t.hashCode()}let l=t;l=Math.imul(l,r);l=l<<n|l>>>32-n;l=Math.imul(l,i);e=e^l;e=e<<s|e>>>32-s;e=Math.imul(e,o)+a;return e&4294967295}e.update=update;function finish(e,t){e=e^t*4;e=e^e>>>16;e=Math.imul(e,2246822507);e=e^e>>>13;e=Math.imul(e,3266489909);e=e^e>>>16;return e}e.finish=finish;function hashCode(e,r=t){let i=initialize(r);let n=0;for(let t of e){i=update(i,t);n++}i=finish(i,n);return i}e.hashCode=hashCode;function hashString(e){let t=e.length;if(t===0){return 0}let r=0;for(let i=0;i<t;i++){let t=e.charCodeAt(i);r=(r<<5>>>0)-r+t;r|=0}return r}})(t=e.MurmurHash||(e.MurmurHash={}))}));var w=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ObjectEqualityComparator=void 0;var r=p();var i=class{hashCode(e){if(e==null){return 0}return e.hashCode()}equals(e,t){if(e==null){return t==null}return e.equals(t)}};i.INSTANCE=new i;t([r.Override],i.prototype,"hashCode",null);t([r.Override],i.prototype,"equals",null);e.ObjectEqualityComparator=i}));var S=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.DefaultEqualityComparator=void 0;var r=p();var i=T();var n=w();var s=class{hashCode(e){if(e==null){return 0}else if(typeof e==="string"||typeof e==="number"){return i.MurmurHash.hashCode([e])}else{return n.ObjectEqualityComparator.INSTANCE.hashCode(e)}}equals(e,t){if(e==null){return t==null}else if(typeof e==="string"||typeof e==="number"){return e===t}else{return n.ObjectEqualityComparator.INSTANCE.equals(e,t)}}};s.INSTANCE=new s;t([r.Override],s.prototype,"hashCode",null);t([r.Override],s.prototype,"equals",null);e.DefaultEqualityComparator=s}));var E=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.Array2DHashSet=void 0;var n=r(9491);var s=S();var o=p();var a=T();var l=16;var u=.75;var c=class{constructor(e,t=l){this.n=0;this.threshold=Math.floor(l*u);if(e instanceof c){this.comparator=e.comparator;this.buckets=e.buckets.slice(0);for(let e=0;e<this.buckets.length;e++){let t=this.buckets[e];if(t){this.buckets[e]=t.slice(0)}}this.n=e.n;this.threshold=e.threshold}else{this.comparator=e||s.DefaultEqualityComparator.INSTANCE;this.buckets=this.createBuckets(t)}}getOrAdd(e){if(this.n>this.threshold){this.expand()}return this.getOrAddImpl(e)}getOrAddImpl(e){let t=this.getBucket(e);let r=this.buckets[t];if(!r){r=[e];this.buckets[t]=r;this.n++;return e}for(let t of r){if(this.comparator.equals(t,e)){return t}}r.push(e);this.n++;return e}get(e){if(e==null){return e}let t=this.getBucket(e);let r=this.buckets[t];if(!r){return void 0}for(let t of r){if(this.comparator.equals(t,e)){return t}}return void 0}getBucket(e){let t=this.comparator.hashCode(e);let r=t&this.buckets.length-1;return r}hashCode(){let e=a.MurmurHash.initialize();for(let t of this.buckets){if(t==null){continue}for(let r of t){if(r==null){break}e=a.MurmurHash.update(e,this.comparator.hashCode(r))}}e=a.MurmurHash.finish(e,this.size);return e}equals(e){if(e===this){return true}if(!(e instanceof c)){return false}if(e.size!==this.size){return false}let t=this.containsAll(e);return t}expand(){let e=this.buckets;let t=this.buckets.length*2;let r=this.createBuckets(t);this.buckets=r;this.threshold=Math.floor(t*u);let i=this.size;for(let t of e){if(!t){continue}for(let e of t){let t=this.getBucket(e);let r=this.buckets[t];if(!r){r=[];this.buckets[t]=r}r.push(e)}}n(this.n===i)}add(e){let t=this.getOrAdd(e);return t===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){if(e==null){return false}return this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let t=0;for(let r of this.buckets){if(r==null){continue}for(let i of r){if(i==null){break}e[t++]=i}}return e}containsAll(e){if(e instanceof c){let t=e;for(let e of t.buckets){if(e==null){continue}for(let t of e){if(t==null){break}if(!this.containsFast(this.asElementType(t))){return false}}}}else{for(let t of e){if(!this.containsFast(this.asElementType(t))){return false}}}return true}addAll(e){let t=false;for(let r of e){let e=this.getOrAdd(r);if(e!==r){t=true}}return t}clear(){this.buckets=this.createBuckets(l);this.n=0;this.threshold=Math.floor(l*u)}toString(){if(this.size===0){return"{}"}let e="{";let t=true;for(let r of this.buckets){if(r==null){continue}for(let i of r){if(i==null){break}if(t){t=false}else{e+=", "}e+=i.toString()}}e+="}";return e}toTableString(){let e="";for(let t of this.buckets){if(t==null){e+="null\n";continue}e+="[";let r=true;for(let i of t){if(r){r=false}else{e+=" "}if(i==null){e+="_"}else{e+=i.toString()}}e+="]\n"}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};t([o.NotNull],c.prototype,"comparator",void 0);t([o.Override],c.prototype,"hashCode",null);t([o.Override],c.prototype,"equals",null);t([o.Override],c.prototype,"add",null);t([o.Override],c.prototype,"size",null);t([o.Override],c.prototype,"isEmpty",null);t([o.Override],c.prototype,"contains",null);t([i(0,o.Nullable)],c.prototype,"containsFast",null);t([o.Override],c.prototype,Symbol.iterator,null);t([o.Override],c.prototype,"toArray",null);t([o.Override],c.prototype,"containsAll",null);t([o.Override],c.prototype,"addAll",null);t([o.Override],c.prototype,"clear",null);t([o.Override],c.prototype,"toString",null);t([o.SuppressWarnings("unchecked")],c.prototype,"asElementType",null);t([o.SuppressWarnings("unchecked")],c.prototype,"createBuckets",null);e.Array2DHashSet=c}));var A=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ArrayEqualityComparator=void 0;var r=p();var i=T();var n=w();var s=class{hashCode(e){if(e==null){return 0}return i.MurmurHash.hashCode(e,0)}equals(e,t){if(e==null){return t==null}else if(t==null){return false}if(e.length!==t.length){return false}for(let r=0;r<e.length;r++){if(!n.ObjectEqualityComparator.INSTANCE.equals(e[r],t[r])){return false}}return true}};s.INSTANCE=new s;t([r.Override],s.prototype,"hashCode",null);t([r.Override],s.prototype,"equals",null);e.ArrayEqualityComparator=s}));var C=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toCharArray=e.toMap=e.equals=e.join=e.escapeWhitespace=void 0;function escapeWhitespace(e,t){return t?e.replace(/ /,"·"):e.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}e.escapeWhitespace=escapeWhitespace;function join3(e,t){let r="";let i=true;for(let n of e){if(i){i=false}else{r+=t}r+=n}return r}e.join=join3;function equals(e,t){if(e===t){return true}if(e===void 0||t===void 0){return false}return e.equals(t)}e.equals=equals;function toMap(e){let t=new Map;for(let r=0;r<e.length;r++){t.set(e[r],r)}return t}e.toMap=toMap;function toCharArray3(e){if(typeof e==="string"){let t=new Uint16Array(e.length);for(let r=0;r<e.length;r++){t[r]=e.charCodeAt(r)}return t}else{return e.toCharArray()}}e.toCharArray=toCharArray3}));var N=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.SemanticContext=void 0;var i=E();var n=A();var s=T();var o=p();var a=w();var l=C();function max(e){let t;for(let r of e){if(t===void 0){t=r;continue}let e=t.compareTo(r);if(e<0){t=r}}return t}function min(e){let t;for(let r of e){if(t===void 0){t=r;continue}let e=t.compareTo(r);if(e>0){t=r}}return t}var u=class{static get NONE(){if(u._NONE===void 0){u._NONE=new u.Predicate}return u._NONE}evalPrecedence(e,t){return this}static and(e,t){if(!e||e===u.NONE){return t}if(t===u.NONE){return e}let r=new u.AND(e,t);if(r.opnds.length===1){return r.opnds[0]}return r}static or(e,t){if(!e){return t}if(e===u.NONE||t===u.NONE){return u.NONE}let r=new u.OR(e,t);if(r.opnds.length===1){return r.opnds[0]}return r}};e.SemanticContext=u;(function(e){const u=40363613;const c=486279973;function filterPrecedencePredicates(t){let r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n instanceof e.PrecedencePredicate){r.push(n);t.splice(i,1);i--}}return r}class Predicate extends e{constructor(e=-1,t=-1,r=false){super();this.ruleIndex=e;this.predIndex=t;this.isCtxDependent=r}eval(e,t){let r=this.isCtxDependent?t:void 0;return e.sempred(r,this.ruleIndex,this.predIndex)}hashCode(){let e=s.MurmurHash.initialize();e=s.MurmurHash.update(e,this.ruleIndex);e=s.MurmurHash.update(e,this.predIndex);e=s.MurmurHash.update(e,this.isCtxDependent?1:0);e=s.MurmurHash.finish(e,3);return e}equals(e){if(!(e instanceof Predicate)){return false}if(this===e){return true}return this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}t([o.Override],Predicate.prototype,"eval",null);t([o.Override],Predicate.prototype,"hashCode",null);t([o.Override],Predicate.prototype,"equals",null);t([o.Override],Predicate.prototype,"toString",null);e.Predicate=Predicate;class PrecedencePredicate extends e{constructor(e){super();this.precedence=e}eval(e,t){return e.precpred(t,this.precedence)}evalPrecedence(t,r){if(t.precpred(r,this.precedence)){return e.NONE}else{return void 0}}compareTo(e){return this.precedence-e.precedence}hashCode(){let e=1;e=31*e+this.precedence;return e}equals(e){if(!(e instanceof PrecedencePredicate)){return false}if(this===e){return true}return this.precedence===e.precedence}toString(){return"{"+this.precedence+">=prec}?"}}t([o.Override],PrecedencePredicate.prototype,"eval",null);t([o.Override],PrecedencePredicate.prototype,"evalPrecedence",null);t([o.Override],PrecedencePredicate.prototype,"compareTo",null);t([o.Override],PrecedencePredicate.prototype,"hashCode",null);t([o.Override],PrecedencePredicate.prototype,"equals",null);t([o.Override],PrecedencePredicate.prototype,"toString",null);e.PrecedencePredicate=PrecedencePredicate;class Operator extends e{}e.Operator=Operator;let h=class AND2 extends Operator{constructor(e,t){super();let r=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);if(e instanceof AND2){r.addAll(e.opnds)}else{r.add(e)}if(t instanceof AND2){r.addAll(t.opnds)}else{r.add(t)}this.opnds=r.toArray();let n=filterPrecedencePredicates(this.opnds);let s=min(n);if(s){this.opnds.push(s)}}get operands(){return this.opnds}equals(e){if(this===e){return true}if(!(e instanceof AND2)){return false}return n.ArrayEqualityComparator.INSTANCE.equals(this.opnds,e.opnds)}hashCode(){return s.MurmurHash.hashCode(this.opnds,u)}eval(e,t){for(let r of this.opnds){if(!r.eval(e,t)){return false}}return true}evalPrecedence(t,r){let i=false;let n=[];for(let s of this.opnds){let o=s.evalPrecedence(t,r);i=i||o!==s;if(o==null){return void 0}else if(o!==e.NONE){n.push(o)}}if(!i){return this}if(n.length===0){return e.NONE}let s=n[0];for(let t=1;t<n.length;t++){s=e.and(s,n[t])}return s}toString(){return l.join(this.opnds,"&&")}};t([o.Override],h.prototype,"operands",null);t([o.Override],h.prototype,"equals",null);t([o.Override],h.prototype,"hashCode",null);t([o.Override],h.prototype,"eval",null);t([o.Override],h.prototype,"evalPrecedence",null);t([o.Override],h.prototype,"toString",null);h=t([r(0,o.NotNull),r(1,o.NotNull)],h);e.AND=h;let d=class OR2 extends Operator{constructor(e,t){super();let r=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);if(e instanceof OR2){r.addAll(e.opnds)}else{r.add(e)}if(t instanceof OR2){r.addAll(t.opnds)}else{r.add(t)}this.opnds=r.toArray();let n=filterPrecedencePredicates(this.opnds);let s=max(n);if(s){this.opnds.push(s)}}get operands(){return this.opnds}equals(e){if(this===e){return true}if(!(e instanceof OR2)){return false}return n.ArrayEqualityComparator.INSTANCE.equals(this.opnds,e.opnds)}hashCode(){return s.MurmurHash.hashCode(this.opnds,c)}eval(e,t){for(let r of this.opnds){if(r.eval(e,t)){return true}}return false}evalPrecedence(t,r){let i=false;let n=[];for(let s of this.opnds){let o=s.evalPrecedence(t,r);i=i||o!==s;if(o===e.NONE){return e.NONE}else if(o){n.push(o)}}if(!i){return this}if(n.length===0){return void 0}let s=n[0];for(let t=1;t<n.length;t++){s=e.or(s,n[t])}return s}toString(){return l.join(this.opnds,"||")}};t([o.Override],d.prototype,"operands",null);t([o.Override],d.prototype,"equals",null);t([o.Override],d.prototype,"hashCode",null);t([o.Override],d.prototype,"eval",null);t([o.Override],d.prototype,"evalPrecedence",null);t([o.Override],d.prototype,"toString",null);d=t([r(0,o.NotNull),r(1,o.NotNull)],d);e.OR=d})(u=e.SemanticContext||(e.SemanticContext={}))}));var O=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.PredicateTransition=void 0;var i=x();var n=p();var s=N();var o=class PredicateTransition extends i.AbstractPredicateTransition{constructor(e,t,r,i){super(e);this.ruleIndex=t;this.predIndex=r;this.isCtxDependent=i}get serializationType(){return 4}get isEpsilon(){return true}matches(e,t,r){return false}get predicate(){return new s.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};t([n.Override],o.prototype,"serializationType",null);t([n.Override],o.prototype,"isEpsilon",null);t([n.Override],o.prototype,"matches",null);t([n.Override,n.NotNull],o.prototype,"toString",null);o=t([r(0,n.NotNull)],o);e.PredicateTransition=o}));var R=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.FailedPredicateException=void 0;var i=v();var n=p();var s=O();var o=class FailedPredicateException3 extends i.RecognitionException{constructor(e,t,r){super(e,e.inputStream,e.context,FailedPredicateException3.formatMessage(t,r));let i=e.interpreter.atn.states[e.state];let n=i.transition(0);if(n instanceof s.PredicateTransition){this._ruleIndex=n.ruleIndex;this._predicateIndex=n.predIndex}else{this._ruleIndex=0;this._predicateIndex=0}this._predicate=t;super.setOffendingToken(e,e.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(e,t){if(t){return t}return`failed predicate: {${e}}?`}};t([n.NotNull],o,"formatMessage",null);o=t([r(0,n.NotNull)],o);e.FailedPredicateException=o}));var k=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.InputMismatchException=void 0;var i=v();var n=p();var s=class InputMismatchException extends i.RecognitionException{constructor(e,t,r){if(r===void 0){r=e.context}super(e,e.inputStream,r);if(t!==void 0){this.setOffendingState(t)}this.setOffendingToken(e,e.currentToken)}};s=t([r(0,n.NotNull)],s);e.InputMismatchException=s}));var P=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Arrays=void 0;var t;(function(e){function binarySearch(e,t,r,i){return binarySearch0(e,r!==void 0?r:0,i!==void 0?i:e.length,t)}e.binarySearch=binarySearch;function binarySearch0(e,t,r,i){let n=t;let s=r-1;while(n<=s){let t=n+s>>>1;let r=e[t];if(r<i){n=t+1}else if(r>i){s=t-1}else{return t}}return-(n+1)}function toString(e){let t="[";let r=true;for(let i of e){if(r){r=false}else{t+=", "}if(i===null){t+="null"}else if(i===void 0){t+="undefined"}else{t+=i}}t+="]";return t}e.toString=toString})(t=e.Arrays||(e.Arrays={}))}));var L=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.IntegerList=void 0;var r=P();var i=p();var n=new Int32Array(0);var s=4;var o=(1<<31>>>0)-1-8;var a=class{constructor(e){if(!e){this._data=n;this._size=0}else if(e instanceof a){this._data=e._data.slice(0);this._size=e._size}else if(typeof e==="number"){if(e===0){this._data=n;this._size=0}else{this._data=new Int32Array(e);this._size=0}}else{this._data=n;this._size=0;for(let t of e){this.add(t)}}}add(e){if(this._data.length===this._size){this.ensureCapacity(this._size+1)}this._data[this._size]=e;this._size++}addAll(e){if(Array.isArray(e)){this.ensureCapacity(this._size+e.length);this._data.subarray(this._size,this._size+e.length).set(e);this._size+=e.length}else if(e instanceof a){this.ensureCapacity(this._size+e._size);this._data.subarray(this._size,this._size+e.size).set(e._data);this._size+=e._size}else{this.ensureCapacity(this._size+e.size);let t=0;for(let r of e){this._data[this._size+t]=r;t++}this._size+=e.size}}get(e){if(e<0||e>=this._size){throw RangeError()}return this._data[e]}contains(e){for(let t=0;t<this._size;t++){if(this._data[t]===e){return true}}return false}set(e,t){if(e<0||e>=this._size){throw RangeError()}let r=this._data[e];this._data[e]=t;return r}removeAt(e){let t=this.get(e);this._data.copyWithin(e,e+1,this._size);this._data[this._size-1]=0;this._size--;return t}removeRange(e,t){if(e<0||t<0||e>this._size||t>this._size){throw RangeError()}if(e>t){throw RangeError()}this._data.copyWithin(t,e,this._size);this._data.fill(0,this._size-(t-e),this._size);this._size-=t-e}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){if(this._data.length===this._size){return}this._data=this._data.slice(0,this._size)}clear(){this._data.fill(0,0,this._size);this._size=0}toArray(){if(this._size===0){return[]}return Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(e){if(e===this){return true}if(!(e instanceof a)){return false}if(this._size!==e._size){return false}for(let t=0;t<this._size;t++){if(this._data[t]!==e._data[t]){return false}}return true}hashCode(){let e=1;for(let t=0;t<this._size;t++){e=31*e+this._data[t]}return e}toString(){return this._data.toString()}binarySearch(e,t,i){if(t===void 0){t=0}if(i===void 0){i=this._size}if(t<0||i<0||t>this._size||i>this._size){throw new RangeError}if(t>i){throw new RangeError}return r.Arrays.binarySearch(this._data,e,t,i)}ensureCapacity(e){if(e<0||e>o){throw new RangeError}let t;if(this._data.length===0){t=s}else{t=this._data.length}while(t<e){t=t*2;if(t<0||t>o){t=o}}let r=new Int32Array(t);r.set(this._data);this._data=r}toCharArray(){let e=new Uint16Array(this._size);let t=0;let r=false;for(let i=0;i<this._size;i++){let n=this._data[i];if(n>=0&&n<65536){e[t]=n;t++;continue}if(!r){let t=new Uint16Array(this.charArraySize());t.set(e,0);e=t;r=true}let s=String.fromCodePoint(n);e[t]=s.charCodeAt(0);e[t+1]=s.charCodeAt(1);t+=2}return e}charArraySize(){let e=0;for(let t=0;t<this._size;t++){e+=this._data[t]>=65536?2:1}return e}};t([i.NotNull],a.prototype,"_data",void 0);t([i.Override],a.prototype,"equals",null);t([i.Override],a.prototype,"hashCode",null);t([i.Override],a.prototype,"toString",null);e.IntegerList=a}));var I=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.Interval=void 0;var r=p();var i=1e3;var n=class{constructor(e,t){this.a=e;this.b=t}static get INVALID(){return n._INVALID}static of(e,t){if(e!==t||e<0||e>i){return new n(e,t)}if(n.cache[e]==null){n.cache[e]=new n(e,e)}return n.cache[e]}get length(){if(this.b<this.a){return 0}return this.b-this.a+1}equals(e){if(e===this){return true}else if(!(e instanceof n)){return false}return this.a===e.a&&this.b===e.b}hashCode(){let e=23;e=e*31+this.a;e=e*31+this.b;return e}startsBeforeDisjoint(e){return this.a<e.a&&this.b<e.a}startsBeforeNonDisjoint(e){return this.a<=e.a&&this.b>=e.a}startsAfter(e){return this.a>e.a}startsAfterDisjoint(e){return this.a>e.b}startsAfterNonDisjoint(e){return this.a>e.a&&this.a<=e.b}disjoint(e){return this.startsBeforeDisjoint(e)||this.startsAfterDisjoint(e)}adjacent(e){return this.a===e.b+1||this.b===e.a-1}properlyContains(e){return e.a>=this.a&&e.b<=this.b}union(e){return n.of(Math.min(this.a,e.a),Math.max(this.b,e.b))}intersection(e){return n.of(Math.max(this.a,e.a),Math.min(this.b,e.b))}differenceNotProperlyContained(e){let t;if(e.startsBeforeNonDisjoint(this)){t=n.of(Math.max(this.a,e.b+1),this.b)}else if(e.startsAfterNonDisjoint(this)){t=n.of(this.a,e.a-1)}return t}toString(){return this.a+".."+this.b}};n._INVALID=new n(-1,-2);n.cache=new Array(i+1);t([r.Override],n.prototype,"equals",null);t([r.Override],n.prototype,"hashCode",null);t([r.Override],n.prototype,"toString",null);e.Interval=n}));var M=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Token=void 0;var t=m();var r;(function(e){e.INVALID_TYPE=0;e.EPSILON=-2;e.MIN_USER_TOKEN_TYPE=1;e.EOF=t.IntStream.EOF;e.DEFAULT_CHANNEL=0;e.HIDDEN_CHANNEL=1;e.MIN_USER_CHANNEL_VALUE=2})(r=e.Token||(e.Token={}))}));var D=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.CommonToken=void 0;var i=I();var n=p();var s=M();var o=class CommonToken2{constructor(e,t,r=CommonToken2.EMPTY_SOURCE,i=s.Token.DEFAULT_CHANNEL,n=0,o=0){this._line=0;this._charPositionInLine=-1;this._channel=s.Token.DEFAULT_CHANNEL;this.index=-1;this._text=t;this._type=e;this.source=r;this._channel=i;this.start=n;this.stop=o;if(r.source!=null){this._line=r.source.line;this._charPositionInLine=r.source.charPositionInLine}}static fromToken(e){let t=new CommonToken2(e.type,void 0,CommonToken2.EMPTY_SOURCE,e.channel,e.startIndex,e.stopIndex);t._line=e.line;t.index=e.tokenIndex;t._charPositionInLine=e.charPositionInLine;if(e instanceof CommonToken2){t._text=e._text;t.source=e.source}else{t._text=e.text;t.source={source:e.tokenSource,stream:e.inputStream}}return t}get type(){return this._type}set type(e){this._type=e}get line(){return this._line}set line(e){this._line=e}get text(){if(this._text!=null){return this._text}let e=this.inputStream;if(e==null){return void 0}let t=e.size;if(this.start<t&&this.stop<t){return e.getText(i.Interval.of(this.start,this.stop))}else{return"<EOF>"}}set text(e){this._text=e}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(e){this._charPositionInLine=e}get channel(){return this._channel}set channel(e){this._channel=e}get startIndex(){return this.start}set startIndex(e){this.start=e}get stopIndex(){return this.stop}set stopIndex(e){this.stop=e}get tokenIndex(){return this.index}set tokenIndex(e){this.index=e}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(e){let t="";if(this._channel>0){t=",channel="+this._channel}let r=this.text;if(r!=null){r=r.replace(/\n/g,"\\n");r=r.replace(/\r/g,"\\r");r=r.replace(/\t/g,"\\t")}else{r="<no text>"}let i=String(this._type);if(e){i=e.vocabulary.getDisplayName(this._type)}return"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+r+"',<"+i+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};o.EMPTY_SOURCE={source:void 0,stream:void 0};t([n.NotNull],o.prototype,"source",void 0);t([n.Override],o.prototype,"type",null);t([n.Override],o.prototype,"line",null);t([n.Override],o.prototype,"text",null);t([n.Override],o.prototype,"charPositionInLine",null);t([n.Override],o.prototype,"channel",null);t([n.Override],o.prototype,"startIndex",null);t([n.Override],o.prototype,"stopIndex",null);t([n.Override],o.prototype,"tokenIndex",null);t([n.Override],o.prototype,"tokenSource",null);t([n.Override],o.prototype,"inputStream",null);t([n.Override],o.prototype,"toString",null);t([r(0,n.NotNull)],o,"fromToken",null);o=t([r(2,n.NotNull)],o);e.CommonToken=o}));var F=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.CommonTokenFactory=void 0;var r=D();var i=I();var n=p();var s=class{constructor(e=false){this.copyText=e}create(e,t,n,s,o,a,l,u){let c=new r.CommonToken(t,n,e,s,o,a);c.line=l;c.charPositionInLine=u;if(n==null&&this.copyText&&e.stream!=null){c.text=e.stream.getText(i.Interval.of(o,a))}return c}createSimple(e,t){return new r.CommonToken(e,t)}};t([n.Override],s.prototype,"create",null);t([n.Override],s.prototype,"createSimple",null);e.CommonTokenFactory=s;(function(e){e.DEFAULT=new e})(s=e.CommonTokenFactory||(e.CommonTokenFactory={}))}));var j=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IntegerStack=void 0;var t=L();var r=class extends t.IntegerList{constructor(e){super(e)}push(e){this.add(e)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};e.IntegerStack=r}));var B=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AcceptStateInfo=void 0;var t=class{constructor(e,t){this._prediction=e;this._lexerActionExecutor=t}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};e.AcceptStateInfo=t}));var U=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Array2DHashMap=void 0;var t=E();var r=class{constructor(e){this.keyComparator=e}hashCode(e){return this.keyComparator.hashCode(e.key)}equals(e,t){return this.keyComparator.equals(e.key,t.key)}};var i=class{constructor(e){if(e instanceof i){this.backingStore=new t.Array2DHashSet(e.backingStore)}else{this.backingStore=new t.Array2DHashSet(new r(e))}}clear(){this.backingStore.clear()}containsKey(e){return this.backingStore.contains({key:e})}get(e){let t=this.backingStore.get({key:e});if(!t){return void 0}return t.value}get isEmpty(){return this.backingStore.isEmpty}put(e,t){let r=this.backingStore.get({key:e,value:t});let i;if(!r){this.backingStore.add({key:e,value:t})}else{i=r.value;r.value=t}return i}putIfAbsent(e,t){let r=this.backingStore.get({key:e,value:t});let i;if(!r){this.backingStore.add({key:e,value:t})}else{i=r.value}return i}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(e){if(!(e instanceof i)){return false}return this.backingStore.equals(e.backingStore)}};e.Array2DHashMap=i}));var H=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DecisionState=void 0;var t=y();var r=class extends t.ATNState{constructor(){super(...arguments);this.decision=-1;this.nonGreedy=false;this.sll=false}};e.DecisionState=r}));var z=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.PredictionContextCache=void 0;var i=U();var n=p();var s=w();var o=K();var a=r(9491);var l=class{constructor(e=true){this.contexts=new i.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE);this.childContexts=new i.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE);this.joinContexts=new i.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE);this.enableCache=e}getAsCached(e){if(!this.enableCache){return e}let t=this.contexts.get(e);if(!t){t=e;this.contexts.put(e,e)}return t}getChild(e,t){if(!this.enableCache){return e.getChild(t)}let r=new l.PredictionContextAndInt(e,t);let i=this.childContexts.get(r);if(!i){i=e.getChild(t);i=this.getAsCached(i);this.childContexts.put(r,i)}return i}join(e,t){if(!this.enableCache){return o.PredictionContext.join(e,t,this)}let r=new l.IdentityCommutativePredictionContextOperands(e,t);let i=this.joinContexts.get(r);if(i){return i}i=o.PredictionContext.join(e,t,this);i=this.getAsCached(i);this.joinContexts.put(r,i);return i}};e.PredictionContextCache=l;l.UNCACHED=new l(false);(function(e){class PredictionContextAndInt{constructor(e,t){this.obj=e;this.value=t}equals(e){if(!(e instanceof PredictionContextAndInt)){return false}else if(e===this){return true}let t=e;return this.value===t.value&&(this.obj===t.obj||this.obj!=null&&this.obj.equals(t.obj))}hashCode(){let e=5;e=7*e+(this.obj!=null?this.obj.hashCode():0);e=7*e+this.value;return e}}t([n.Override],PredictionContextAndInt.prototype,"equals",null);t([n.Override],PredictionContextAndInt.prototype,"hashCode",null);e.PredictionContextAndInt=PredictionContextAndInt;class IdentityCommutativePredictionContextOperands{constructor(e,t){a(e!=null);a(t!=null);this._x=e;this._y=t}get x(){return this._x}get y(){return this._y}equals(e){if(!(e instanceof IdentityCommutativePredictionContextOperands)){return false}else if(this===e){return true}let t=e;return this._x===t._x&&this._y===t._y||this._x===t._y&&this._y===t._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}t([n.Override],IdentityCommutativePredictionContextOperands.prototype,"equals",null);t([n.Override],IdentityCommutativePredictionContextOperands.prototype,"hashCode",null);e.IdentityCommutativePredictionContextOperands=IdentityCommutativePredictionContextOperands})(l=e.PredictionContextCache||(e.PredictionContextCache={}))}));var K=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.SingletonPredictionContext=e.PredictionContext=void 0;var n=U();var s=E();var o=P();var a=T();var l=p();var u=z();var c=r(9491);var h=1;var d=class{constructor(e){this.cachedHashCode=e}static calculateEmptyHashCode(){let e=a.MurmurHash.initialize(h);e=a.MurmurHash.finish(e,0);return e}static calculateSingleHashCode(e,t){let r=a.MurmurHash.initialize(h);r=a.MurmurHash.update(r,e);r=a.MurmurHash.update(r,t);r=a.MurmurHash.finish(r,2);return r}static calculateHashCode(e,t){let r=a.MurmurHash.initialize(h);for(let t of e){r=a.MurmurHash.update(r,t)}for(let e of t){r=a.MurmurHash.update(r,e)}r=a.MurmurHash.finish(r,2*e.length);return r}static fromRuleContext(e,t,r=true){if(t.isEmpty){return r?d.EMPTY_FULL:d.EMPTY_LOCAL}let i;if(t._parent){i=d.fromRuleContext(e,t._parent,r)}else{i=r?d.EMPTY_FULL:d.EMPTY_LOCAL}let n=e.states[t.invokingState];let s=n.transition(0);return i.getChild(s.followState.stateNumber)}static addEmptyContext(e){return e.addEmptyContext()}static removeEmptyContext(e){return e.removeEmptyContext()}static join(e,t,r=u.PredictionContextCache.UNCACHED){if(e===t){return e}if(e.isEmpty){return d.isEmptyLocal(e)?e:d.addEmptyContext(t)}else if(t.isEmpty){return d.isEmptyLocal(t)?t:d.addEmptyContext(e)}let i=e.size;let n=t.size;if(i===1&&n===1&&e.getReturnState(0)===t.getReturnState(0)){let i=r.join(e.getParent(0),t.getParent(0));if(i===e.getParent(0)){return e}else if(i===t.getParent(0)){return t}else{return i.getChild(e.getReturnState(0))}}let s=0;let o=new Array(i+n);let a=new Array(o.length);let l=0;let h=0;let p=true;let m=true;while(l<i&&h<n){if(e.getReturnState(l)===t.getReturnState(h)){o[s]=r.join(e.getParent(l),t.getParent(h));a[s]=e.getReturnState(l);p=p&&o[s]===e.getParent(l);m=m&&o[s]===t.getParent(h);l++;h++}else if(e.getReturnState(l)<t.getReturnState(h)){o[s]=e.getParent(l);a[s]=e.getReturnState(l);m=false;l++}else{c(t.getReturnState(h)<e.getReturnState(l));o[s]=t.getParent(h);a[s]=t.getReturnState(h);p=false;h++}s++}while(l<i){o[s]=e.getParent(l);a[s]=e.getReturnState(l);l++;m=false;s++}while(h<n){o[s]=t.getParent(h);a[s]=t.getReturnState(h);h++;p=false;s++}if(p){return e}else if(m){return t}if(s<o.length){o=o.slice(0,s);a=a.slice(0,s)}if(o.length===0){return d.EMPTY_FULL}else if(o.length===1){return new y(o[0],a[0])}else{return new g(o,a)}}static isEmptyLocal(e){return e===d.EMPTY_LOCAL}static getCachedContext(e,t,r){if(e.isEmpty){return e}let i=r.get(e);if(i){return i}i=t.get(e);if(i){r.put(e,i);return i}let n=false;let s=new Array(e.size);for(let i=0;i<s.length;i++){let o=d.getCachedContext(e.getParent(i),t,r);if(n||o!==e.getParent(i)){if(!n){s=new Array(e.size);for(let t=0;t<e.size;t++){s[t]=e.getParent(t)}n=true}s[i]=o}}if(!n){i=t.putIfAbsent(e,e);r.put(e,i!=null?i:e);return e}let o;if(s.length===1){o=new y(s[0],e.getReturnState(0))}else{let t=new Array(e.size);for(let r=0;r<e.size;r++){t[r]=e.getReturnState(r)}o=new g(s,t,e.hashCode())}i=t.putIfAbsent(o,o);r.put(o,i||o);r.put(e,i||o);return o}appendSingleContext(e,t){return this.appendContext(d.EMPTY_FULL.getChild(e),t)}getChild(e){return new y(this,e)}hashCode(){return this.cachedHashCode}toStrings(e,t,r=d.EMPTY_FULL){let i=[];e:for(let n=0;;n++){let s=0;let o=true;let a=this;let l=t;let u="";u+="[";while(!a.isEmpty&&a!==r){let t=0;if(a.size>0){let e=1;while(1<<e>>>0<a.size){e++}let r=(1<<e>>>0)-1;t=n>>s&r;o=o&&t>=a.size-1;if(t>=a.size){continue e}s+=e}if(e){if(u.length>1){u+=" "}let t=e.atn;let r=t.states[l];let i=e.ruleNames[r.ruleIndex];u+=i}else if(a.getReturnState(t)!==d.EMPTY_FULL_STATE_KEY){if(!a.isEmpty){if(u.length>1){u+=" "}u+=a.getReturnState(t)}}l=a.getReturnState(t);a=a.getParent(t)}u+="]";i.push(u);if(o){break}}return i}};t([l.Override],d.prototype,"hashCode",null);t([i(0,l.NotNull),i(1,l.NotNull),i(2,l.NotNull)],d,"join",null);t([i(0,l.NotNull),i(1,l.NotNull),i(2,l.NotNull)],d,"getCachedContext",null);e.PredictionContext=d;var m=class extends d{constructor(e){super(d.calculateEmptyHashCode());this.fullContext=e}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(e){throw new Error("index out of bounds")}getReturnState(e){throw new Error("index out of bounds")}findReturnState(e){return-1}get size(){return 0}appendSingleContext(e,t){return t.getChild(this,e)}appendContext(e,t){return e}get isEmpty(){return true}get hasEmpty(){return true}equals(e){return this===e}toStrings(e,t,r){return["[]"]}};t([l.Override],m.prototype,"addEmptyContext",null);t([l.Override],m.prototype,"removeEmptyContext",null);t([l.Override],m.prototype,"getParent",null);t([l.Override],m.prototype,"getReturnState",null);t([l.Override],m.prototype,"findReturnState",null);t([l.Override],m.prototype,"size",null);t([l.Override],m.prototype,"appendSingleContext",null);t([l.Override],m.prototype,"appendContext",null);t([l.Override],m.prototype,"isEmpty",null);t([l.Override],m.prototype,"hasEmpty",null);t([l.Override],m.prototype,"equals",null);t([l.Override],m.prototype,"toStrings",null);var g=class ArrayPredictionContext2 extends d{constructor(e,t,r){super(r||d.calculateHashCode(e,t));c(e.length===t.length);c(t.length>1||t[0]!==d.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead.");this.parents=e;this.returnStates=t}getParent(e){return this.parents[e]}getReturnState(e){return this.returnStates[e]}findReturnState(e){return o.Arrays.binarySearch(this.returnStates,e)}get size(){return this.returnStates.length}get isEmpty(){return false}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===d.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty){return this}let e=this.parents.slice(0);let t=this.returnStates.slice(0);e.push(d.EMPTY_FULL);t.push(d.EMPTY_FULL_STATE_KEY);return new ArrayPredictionContext2(e,t)}removeEmptyContext(){if(!this.hasEmpty){return this}if(this.returnStates.length===2){return new y(this.parents[0],this.returnStates[0])}else{let e=this.parents.slice(0,this.parents.length-1);let t=this.returnStates.slice(0,this.returnStates.length-1);return new ArrayPredictionContext2(e,t)}}appendContext(e,t){return ArrayPredictionContext2.appendContextImpl(this,e,new d.IdentityHashMap)}static appendContextImpl(e,t,r){if(t.isEmpty){if(d.isEmptyLocal(t)){if(e.hasEmpty){return d.EMPTY_LOCAL}throw new Error("what to do here?")}return e}if(t.size!==1){throw new Error("Appending a tree suffix is not yet supported.")}let i=r.get(e);if(!i){if(e.isEmpty){i=t}else{let n=e.size;if(e.hasEmpty){n--}let s=new Array(n);let o=new Array(n);for(let t=0;t<n;t++){o[t]=e.getReturnState(t)}for(let i=0;i<n;i++){s[i]=ArrayPredictionContext2.appendContextImpl(e.getParent(i),t,r)}if(s.length===1){i=new y(s[0],o[0])}else{c(s.length>1);i=new ArrayPredictionContext2(s,o)}if(e.hasEmpty){i=d.join(i,t)}}r.put(e,i)}return i}equals(e){if(this===e){return true}else if(!(e instanceof ArrayPredictionContext2)){return false}if(this.hashCode()!==e.hashCode()){return false}let t=e;return this.equalsImpl(t,new s.Array2DHashSet)}equalsImpl(e,t){let r=[];let i=[];r.push(this);i.push(e);while(true){let e=r.pop();let n=i.pop();if(!e||!n){break}let s=new u.PredictionContextCache.IdentityCommutativePredictionContextOperands(e,n);if(!t.add(s)){continue}let o=s.x.size;if(o===0){if(!s.x.equals(s.y)){return false}continue}let a=s.y.size;if(o!==a){return false}for(let e=0;e<o;e++){if(s.x.getReturnState(e)!==s.y.getReturnState(e)){return false}let t=s.x.getParent(e);let n=s.y.getParent(e);if(t.hashCode()!==n.hashCode()){return false}if(t!==n){r.push(t);i.push(n)}}}return true}};t([l.NotNull],g.prototype,"parents",void 0);t([l.NotNull],g.prototype,"returnStates",void 0);t([l.Override],g.prototype,"getParent",null);t([l.Override],g.prototype,"getReturnState",null);t([l.Override],g.prototype,"findReturnState",null);t([l.Override],g.prototype,"size",null);t([l.Override],g.prototype,"isEmpty",null);t([l.Override],g.prototype,"hasEmpty",null);t([l.Override],g.prototype,"addEmptyContext",null);t([l.Override],g.prototype,"removeEmptyContext",null);t([l.Override],g.prototype,"appendContext",null);t([l.Override],g.prototype,"equals",null);g=t([i(0,l.NotNull)],g);var y=class SingletonPredictionContext2 extends d{constructor(e,t){super(d.calculateSingleHashCode(e,t));this.parent=e;this.returnState=t}getParent(e){return this.parent}getReturnState(e){return this.returnState}findReturnState(e){return this.returnState===e?0:-1}get size(){return 1}get isEmpty(){return false}get hasEmpty(){return false}appendContext(e,t){return t.getChild(this.parent.appendContext(e,t),this.returnState)}addEmptyContext(){let e=[this.parent,d.EMPTY_FULL];let t=[this.returnState,d.EMPTY_FULL_STATE_KEY];return new g(e,t)}removeEmptyContext(){return this}equals(e){if(e===this){return true}else if(!(e instanceof SingletonPredictionContext2)){return false}let t=e;if(this.hashCode()!==t.hashCode()){return false}return this.returnState===t.returnState&&this.parent.equals(t.parent)}};t([l.NotNull],y.prototype,"parent",void 0);t([l.Override],y.prototype,"getParent",null);t([l.Override],y.prototype,"getReturnState",null);t([l.Override],y.prototype,"findReturnState",null);t([l.Override],y.prototype,"size",null);t([l.Override],y.prototype,"isEmpty",null);t([l.Override],y.prototype,"hasEmpty",null);t([l.Override],y.prototype,"appendContext",null);t([l.Override],y.prototype,"addEmptyContext",null);t([l.Override],y.prototype,"removeEmptyContext",null);t([l.Override],y.prototype,"equals",null);y=t([i(0,l.NotNull)],y);e.SingletonPredictionContext=y;(function(e){e.EMPTY_LOCAL=new m(false);e.EMPTY_FULL=new m(true);e.EMPTY_LOCAL_STATE_KEY=-(1<<31>>>0);e.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class IdentityHashMap extends n.Array2DHashMap{constructor(){super(IdentityEqualityComparator.INSTANCE)}}e.IdentityHashMap=IdentityHashMap;class IdentityEqualityComparator{IdentityEqualityComparator(){}hashCode(e){return e.hashCode()}equals(e,t){return e===t}}IdentityEqualityComparator.INSTANCE=new IdentityEqualityComparator;t([l.Override],IdentityEqualityComparator.prototype,"hashCode",null);t([l.Override],IdentityEqualityComparator.prototype,"equals",null);e.IdentityEqualityComparator=IdentityEqualityComparator})(d=e.PredictionContext||(e.PredictionContext={}))}));var V=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ATNConfig=void 0;var n=U();var s=H();var o=T();var a=p();var l=w();var u=K();var c=N();var h=r(9491);var d=2147483648;var m=class ATNConfig2{constructor(e,t,r){if(typeof t==="number"){h((t&16777215)===t);this._state=e;this.altAndOuterContextDepth=t;this._context=r}else{this._state=e;this.altAndOuterContextDepth=t.altAndOuterContextDepth;this._context=r}}static create(e,t,r,i=c.SemanticContext.NONE,n){if(i!==c.SemanticContext.NONE){if(n!=null){return new _(n,i,e,t,r,false)}else{return new g(i,e,t,r)}}else if(n!=null){return new y(n,e,t,r,false)}else{return new ATNConfig2(e,t,r)}}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(e){this._context=e}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(e){h(e>=0);e=Math.min(e,127);this.altAndOuterContextDepth=e<<24|(this.altAndOuterContextDepth&~2130706432)>>>0}get lexerActionExecutor(){return void 0}get semanticContext(){return c.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return false}clone(){return this.transform(this.state,false)}transform(e,t,r){if(r==null){return this.transformImpl(e,this._context,this.semanticContext,t,this.lexerActionExecutor)}else if(r instanceof u.PredictionContext){return this.transformImpl(e,r,this.semanticContext,t,this.lexerActionExecutor)}else if(r instanceof c.SemanticContext){return this.transformImpl(e,this._context,r,t,this.lexerActionExecutor)}else{return this.transformImpl(e,this._context,this.semanticContext,t,r)}}transformImpl(e,t,r,i,n){let s=i&&ATNConfig2.checkNonGreedyDecision(this,e);if(r!==c.SemanticContext.NONE){if(n!=null||s){return new _(n,r,e,this,t,s)}else{return new g(r,e,this,t)}}else if(n!=null||s){return new y(n,e,this,t,s)}else{return new ATNConfig2(e,this,t)}}static checkNonGreedyDecision(e,t){return e.hasPassedThroughNonGreedyDecision||t instanceof s.DecisionState&&t.nonGreedy}appendContext(e,t){if(typeof e==="number"){let r=this.context.appendSingleContext(e,t);let i=this.transform(this.state,false,r);return i}else{let r=this.context.appendContext(e,t);let i=this.transform(this.state,false,r);return i}}contains(e){if(this.state.stateNumber!==e.state.stateNumber||this.alt!==e.alt||!this.semanticContext.equals(e.semanticContext)){return false}let t=[];let r=[];t.push(this.context);r.push(e.context);while(true){let e=t.pop();let i=r.pop();if(!e||!i){break}if(e===i){return true}if(e.size<i.size){return false}if(i.isEmpty){return e.hasEmpty}else{for(let n=0;n<i.size;n++){let s=e.findReturnState(i.getReturnState(n));if(s<0){return false}t.push(e.getParent(s));r.push(i.getParent(n))}}}return false}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&d)!==0}set isPrecedenceFilterSuppressed(e){if(e){this.altAndOuterContextDepth|=d}else{this.altAndOuterContextDepth&=~d}}equals(e){if(this===e){return true}else if(!(e instanceof ATNConfig2)){return false}return this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.reachesIntoOuterContext===e.reachesIntoOuterContext&&this.context.equals(e.context)&&this.semanticContext.equals(e.semanticContext)&&this.isPrecedenceFilterSuppressed===e.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===e.hasPassedThroughNonGreedyDecision&&l.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,e.lexerActionExecutor)}hashCode(){let e=o.MurmurHash.initialize(7);e=o.MurmurHash.update(e,this.state.stateNumber);e=o.MurmurHash.update(e,this.alt);e=o.MurmurHash.update(e,this.reachesIntoOuterContext?1:0);e=o.MurmurHash.update(e,this.context);e=o.MurmurHash.update(e,this.semanticContext);e=o.MurmurHash.update(e,this.hasPassedThroughNonGreedyDecision?1:0);e=o.MurmurHash.update(e,this.lexerActionExecutor);e=o.MurmurHash.finish(e,7);return e}toDotString(){let e="";e+="digraph G {\n";e+="rankdir=LR;\n";let t=new n.Array2DHashMap(u.PredictionContext.IdentityEqualityComparator.INSTANCE);let r=[];function getOrAddContext(e){let i=t.size;let n=t.putIfAbsent(e,i);if(n!=null){return n}r.push(e);return i}r.push(this.context);t.put(this.context,0);while(true){let t=r.pop();if(!t){break}for(let r=0;r<t.size;r++){e+=" s"+getOrAddContext(t);e+="->";e+="s"+getOrAddContext(t.getParent(r));e+='[label="'+t.getReturnState(r)+'"];\n'}}e+="}\n";return e.toString()}toString(e,t,r){if(r==null){r=t!=null}if(t==null){t=true}let i="";let n;if(r){n=this.context.toStrings(e,this.state.stateNumber)}else{n=["?"]}let s=true;for(let e of n){if(s){s=false}else{i+=", "}i+="(";i+=this.state;if(t){i+=",";i+=this.alt}if(this.context){i+=",";i+=e}if(this.semanticContext!==c.SemanticContext.NONE){i+=",";i+=this.semanticContext}if(this.reachesIntoOuterContext){i+=",up="+this.outerContextDepth}i+=")"}return i.toString()}};t([a.NotNull],m.prototype,"_state",void 0);t([a.NotNull],m.prototype,"_context",void 0);t([a.NotNull],m.prototype,"state",null);t([a.NotNull,i(0,a.NotNull)],m.prototype,"context",null);t([a.NotNull],m.prototype,"semanticContext",null);t([a.Override],m.prototype,"clone",null);t([i(0,a.NotNull),i(2,a.NotNull)],m.prototype,"transformImpl",null);t([a.Override],m.prototype,"equals",null);t([a.Override],m.prototype,"hashCode",null);t([i(0,a.NotNull),i(3,a.NotNull)],m,"create",null);m=t([i(0,a.NotNull),i(2,a.NotNull)],m);e.ATNConfig=m;var g=class SemanticContextATNConfig extends m{constructor(e,t,r,i){if(typeof r==="number"){super(t,r,i)}else{super(t,r,i)}this._semanticContext=e}get semanticContext(){return this._semanticContext}};t([a.NotNull],g.prototype,"_semanticContext",void 0);t([a.Override],g.prototype,"semanticContext",null);g=t([i(1,a.NotNull),i(2,a.NotNull)],g);var y=class ActionATNConfig extends m{constructor(e,t,r,i,n){if(typeof r==="number"){super(t,r,i)}else{super(t,r,i);if(r.semanticContext!==c.SemanticContext.NONE){throw new Error("Not supported")}}this._lexerActionExecutor=e;this.passedThroughNonGreedyDecision=n}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};t([a.Override],y.prototype,"lexerActionExecutor",null);t([a.Override],y.prototype,"hasPassedThroughNonGreedyDecision",null);y=t([i(1,a.NotNull),i(2,a.NotNull)],y);var _=class ActionSemanticContextATNConfig extends g{constructor(e,t,r,i,n,s){if(typeof i==="number"){super(t,r,i,n)}else{super(t,r,i,n)}this._lexerActionExecutor=e;this.passedThroughNonGreedyDecision=s}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};t([a.Override],_.prototype,"lexerActionExecutor",null);t([a.Override],_.prototype,"hasPassedThroughNonGreedyDecision",null);_=t([i(1,a.NotNull),i(2,a.NotNull)],_)}));var q=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BitSet=void 0;var t=r(3837);var i=T();var n=new Uint16Array(0);function getIndex(e){return e>>>4}function unIndex(e){return e*16}function findLSBSet(e){let t=1;for(let r=0;r<16;r++){if((e&t)!==0){return r}t=t<<1>>>0}throw new RangeError("No specified bit found")}function findMSBSet(e){let t=1<<15>>>0;for(let r=15;r>=0;r--){if((e&t)!==0){return r}t=t>>>1}throw new RangeError("No specified bit found")}function bitsFor(e,t){e&=15;t&=15;if(e===t){return 1<<e>>>0}return 65535>>>15-t^65535>>>16-e}var s=new Uint8Array(65536);for(let e=0;e<16;e++){const t=1<<e>>>0;let r=0;while(r<s.length){r+=t;for(let e=0;e<t;e++){s[r]++;r++}}}var o=class{constructor(e){if(!e){this.data=n}else if(typeof e==="number"){if(e<0){throw new RangeError("nbits cannot be negative")}else{this.data=new Uint16Array(getIndex(e-1)+1)}}else{if(e instanceof o){this.data=e.data.slice(0)}else{let t=-1;for(let r of e){if(t<r){t=r}}this.data=new Uint16Array(getIndex(t-1)+1);for(let t of e){this.set(t)}}}}and(e){const t=this.data;const r=e.data;const i=Math.min(t.length,r.length);let s=-1;for(let e=0;e<i;e++){let i=t[e]&=r[e];if(i!==0){s=e}}if(s===-1){this.data=n}if(s<t.length-1){this.data=t.slice(0,s+1)}}andNot(e){const t=this.data;const r=e.data;const i=Math.min(t.length,r.length);let s=-1;for(let e=0;e<i;e++){let i=t[e]&=r[e]^65535;if(i!==0){s=e}}if(s===-1){this.data=n}if(s<t.length-1){this.data=t.slice(0,s+1)}}cardinality(){if(this.isEmpty){return 0}const e=this.data;const t=e.length;let r=0;for(let i=0;i<t;i++){r+=s[e[i]]}return r}clear(e,t){if(e==null){this.data.fill(0)}else if(t==null){this.set(e,false)}else{this.set(e,t,false)}}flip(e,t){if(t==null){t=e}if(e<0||t<e){throw new RangeError}let r=getIndex(e);const i=getIndex(t);if(r===i){this.data[r]^=bitsFor(e,t)}else{this.data[r++]^=bitsFor(e,15);while(r<i){this.data[r++]^=65535}this.data[r++]^=bitsFor(0,t)}}get(e,t){if(t===void 0){return!!(this.data[getIndex(e)]&bitsFor(e,e))}else{let r=new o(t+1);for(let i=e;i<=t;i++){r.set(i,this.get(i))}return r}}intersects(e){let t=Math.min(this.length(),e.length());if(t===0){return false}let r=getIndex(t-1);for(let t=0;t<=r;t++){if((this.data[t]&e.data[t])!==0){return true}}return false}get isEmpty(){return this.length()===0}length(){if(!this.data.length){return 0}return this.previousSetBit(unIndex(this.data.length)-1)+1}nextClearBit(e){if(e<0){throw new RangeError("fromIndex cannot be negative")}const t=this.data;const r=t.length;let i=getIndex(e);if(i>r){return-1}let n=65535^bitsFor(e,15);if((t[i]|n)===65535){i++;n=0;for(;i<r;i++){if(t[i]!==65535){break}}if(i===r){return-1}}return unIndex(i)+findLSBSet((t[i]|n)^65535)}nextSetBit(e){if(e<0){throw new RangeError("fromIndex cannot be negative")}const t=this.data;const r=t.length;let i=getIndex(e);if(i>r){return-1}let n=bitsFor(e,15);if((t[i]&n)===0){i++;n=65535;for(;i<r;i++){if(t[i]!==0){break}}if(i>=r){return-1}}return unIndex(i)+findLSBSet(t[i]&n)}or(e){const t=this.data;const r=e.data;const i=Math.min(t.length,r.length);const s=Math.max(t.length,r.length);const o=t.length===s?t:new Uint16Array(s);let a=-1;for(let e=0;e<i;e++){let i=o[e]=t[e]|r[e];if(i!==0){a=e}}const l=t.length>r.length?t:r;for(let e=i;e<s;e++){let t=o[e]=l[e];if(t!==0){a=e}}if(a===-1){this.data=n}else if(o.length===a+1){this.data=o}else{this.data=o.slice(0,a)}}previousClearBit(e){if(e<0){throw new RangeError("fromIndex cannot be negative")}const t=this.data;const r=t.length;let i=getIndex(e);if(i>=r){i=r-1}let n=65535^bitsFor(0,e);if((t[i]|n)===65535){n=0;i--;for(;i>=0;i--){if(t[i]!==65535){break}}if(i<0){return-1}}return unIndex(i)+findMSBSet((t[i]|n)^65535)}previousSetBit(e){if(e<0){throw new RangeError("fromIndex cannot be negative")}const t=this.data;const r=t.length;let i=getIndex(e);if(i>=r){i=r-1}let n=bitsFor(0,e);if((t[i]&n)===0){i--;n=65535;for(;i>=0;i--){if(t[i]!==0){break}}if(i<0){return-1}}return unIndex(i)+findMSBSet(t[i]&n)}set(e,t,r){if(t===void 0){t=e;r=true}else if(typeof t==="boolean"){r=t;t=e}if(r===void 0){r=true}if(e<0||e>t){throw new RangeError}let i=getIndex(e);let n=getIndex(t);if(r&&n>=this.data.length){let e=new Uint16Array(n+1);this.data.forEach(((t,r)=>e[r]=t));this.data=e}else if(!r){if(i>=this.data.length){return}if(n>=this.data.length){n=this.data.length-1;t=this.data.length*16-1}}if(i===n){this._setBits(i,r,bitsFor(e,t))}else{this._setBits(i++,r,bitsFor(e,15));while(i<n){this.data[i++]=r?65535:0}this._setBits(i,r,bitsFor(0,t))}}_setBits(e,t,r){if(t){this.data[e]|=r}else{this.data[e]&=65535^r}}get size(){return this.data.byteLength*8}hashCode(){return i.MurmurHash.hashCode(this.data,22)}equals(e){if(e===this){return true}else if(!(e instanceof o)){return false}const t=this.length();if(t!==e.length()){return false}if(t===0){return true}let r=getIndex(t-1);for(let t=0;t<=r;t++){if(this.data[t]!==e.data[t]){return false}}return true}toString(){let e="{";let t=true;for(let r=this.nextSetBit(0);r>=0;r=this.nextSetBit(r+1)){if(t){t=false}else{e+=", "}e+=r}e+="}";return e}xor(e){const t=this.data;const r=e.data;const i=Math.min(t.length,r.length);const s=Math.max(t.length,r.length);const o=t.length===s?t:new Uint16Array(s);let a=-1;for(let e=0;e<i;e++){let i=o[e]=t[e]^r[e];if(i!==0){a=e}}const l=t.length>r.length?t:r;for(let e=i;e<s;e++){let t=o[e]=l[e];if(t!==0){a=e}}if(a===-1){this.data=n}else if(o.length===a+1){this.data=o}else{this.data=o.slice(0,a+1)}}clone(){return new o(this)}[Symbol.iterator](){return new a(this.data)}[t.inspect.custom](){return"BitSet "+this.toString()}};e.BitSet=o;var a=class{constructor(e){this.data=e;this.index=0;this.mask=65535}next(){while(this.index<this.data.length){const e=this.data[this.index]&this.mask;if(e!==0){const t=unIndex(this.index)+findLSBSet(e);this.mask=bitsFor(t+1,15);return{done:false,value:t}}this.index++;this.mask=65535}return{done:true,value:-1}}[Symbol.iterator](){return this}}}));var Z=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ATNConfigSet=void 0;var i=U();var n=E();var s=A();var o=he();var a=V();var l=q();var u=p();var c=w();var h=K();var d=z();var m=N();var g=r(9491);var y=C();var _=class{hashCode(e){return e.state^e.alt}equals(e,t){return e.state===t.state&&e.alt===t.alt}};_.INSTANCE=new _;function NewKeyedConfigMap(e){if(e){return new i.Array2DHashMap(e)}else{return new i.Array2DHashMap(_.INSTANCE)}}var v=class{constructor(e,t){this._uniqueAlt=0;this._hasSemanticContext=false;this._dipsIntoOuterContext=false;this.outermostConfigSet=false;this.cachedHashCode=-1;if(!e){this.mergedConfigs=NewKeyedConfigMap();this.unmerged=[];this.configs=[];this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER}else{if(t){this.mergedConfigs=void 0;this.unmerged=void 0}else if(!e.isReadOnly){this.mergedConfigs=NewKeyedConfigMap(e.mergedConfigs);this.unmerged=e.unmerged.slice(0)}else{this.mergedConfigs=NewKeyedConfigMap();this.unmerged=[]}this.configs=e.configs.slice(0);this._dipsIntoOuterContext=e._dipsIntoOuterContext;this._hasSemanticContext=e._hasSemanticContext;this.outermostConfigSet=e.outermostConfigSet;if(t||!e.isReadOnly){this._uniqueAlt=e._uniqueAlt;this._conflictInfo=e._conflictInfo}}}getRepresentedAlternatives(){if(this._conflictInfo!=null){return this._conflictInfo.conflictedAlts.clone()}let e=new l.BitSet;for(let t of this){e.set(t.alt)}return e}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(e){if(this.outermostConfigSet&&!e){throw new Error("IllegalStateException")}g(!e||!this._dipsIntoOuterContext);this.outermostConfigSet=e}getStates(){let e=new n.Array2DHashSet(c.ObjectEqualityComparator.INSTANCE);for(let t of this.configs){e.add(t.state)}return e}optimizeConfigs(e){if(this.configs.length===0){return}for(let t of this.configs){t.context=e.atn.getCachedContext(t.context)}}clone(e){let t=new v(this,e);if(!e&&this.isReadOnly){t.addAll(this.configs)}return t}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(e){if(!(e instanceof a.ATNConfig)){return false}if(this.mergedConfigs&&this.unmerged){let t=e;let r=this.getKey(t);let i=this.mergedConfigs.get(r);if(i!=null&&this.canMerge(t,r,i)){return i.contains(t)}for(let t of this.unmerged){if(t.contains(e)){return true}}}else{for(let t of this.configs){if(t.contains(e)){return true}}}return false}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(e,t){this.ensureWritable();if(!this.mergedConfigs||!this.unmerged){throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation")}g(!this.outermostConfigSet||!e.reachesIntoOuterContext);if(t==null){t=d.PredictionContextCache.UNCACHED}let r;let i=this.getKey(e);let n=this.mergedConfigs.get(i);r=n==null;if(n!=null&&this.canMerge(e,i,n)){n.outerContextDepth=Math.max(n.outerContextDepth,e.outerContextDepth);if(e.isPrecedenceFilterSuppressed){n.isPrecedenceFilterSuppressed=true}let r=h.PredictionContext.join(n.context,e.context,t);this.updatePropertiesForMergedConfig(e);if(n.context===r){return false}n.context=r;return true}for(let n=0;n<this.unmerged.length;n++){let s=this.unmerged[n];if(this.canMerge(e,i,s)){s.outerContextDepth=Math.max(s.outerContextDepth,e.outerContextDepth);if(e.isPrecedenceFilterSuppressed){s.isPrecedenceFilterSuppressed=true}let o=h.PredictionContext.join(s.context,e.context,t);this.updatePropertiesForMergedConfig(e);if(s.context===o){return false}s.context=o;if(r){this.mergedConfigs.put(i,s);this.unmerged.splice(n,1)}return true}}this.configs.push(e);if(r){this.mergedConfigs.put(i,e)}else{this.unmerged.push(e)}this.updatePropertiesForAddedConfig(e);return true}updatePropertiesForMergedConfig(e){this._dipsIntoOuterContext=this._dipsIntoOuterContext||e.reachesIntoOuterContext;g(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(e){if(this.configs.length===1){this._uniqueAlt=e.alt}else if(this._uniqueAlt!==e.alt){this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER}this._hasSemanticContext=this._hasSemanticContext||!m.SemanticContext.NONE.equals(e.semanticContext);this._dipsIntoOuterContext=this._dipsIntoOuterContext||e.reachesIntoOuterContext;g(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(e,t,r){if(e.state.stateNumber!==r.state.stateNumber){return false}if(t.alt!==r.alt){return false}return e.semanticContext.equals(r.semanticContext)}getKey(e){return{state:e.state.stateNumber,alt:e.alt}}containsAll(e){for(let t of e){if(!(t instanceof a.ATNConfig)){return false}if(!this.contains(t)){return false}}return true}addAll(e,t){this.ensureWritable();let r=false;for(let i of e){if(this.add(i,t)){r=true}}return r}clear(){this.ensureWritable();if(!this.mergedConfigs||!this.unmerged){throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation")}this.mergedConfigs.clear();this.unmerged.length=0;this.configs.length=0;this._dipsIntoOuterContext=false;this._hasSemanticContext=false;this._uniqueAlt=o.ATN.INVALID_ALT_NUMBER;this._conflictInfo=void 0}equals(e){if(this===e){return true}if(!(e instanceof v)){return false}return this.outermostConfigSet===e.outermostConfigSet&&y.equals(this._conflictInfo,e._conflictInfo)&&s.ArrayEqualityComparator.INSTANCE.equals(this.configs,e.configs)}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1){return this.cachedHashCode}let e=1;e=5*e^(this.outermostConfigSet?1:0);e=5*e^s.ArrayEqualityComparator.INSTANCE.hashCode(this.configs);if(this.isReadOnly){this.cachedHashCode=e}return e}toString(e){if(e==null){e=false}let t="";let r=this.configs.slice(0);r.sort(((e,t)=>{if(e.alt!==t.alt){return e.alt-t.alt}else if(e.state.stateNumber!==t.state.stateNumber){return e.state.stateNumber-t.state.stateNumber}else{return e.semanticContext.toString().localeCompare(t.semanticContext.toString())}}));t+="[";for(let i=0;i<r.length;i++){if(i>0){t+=", "}t+=r[i].toString(void 0,true,e)}t+="]";if(this._hasSemanticContext){t+=",hasSemanticContext="+this._hasSemanticContext}if(this._uniqueAlt!==o.ATN.INVALID_ALT_NUMBER){t+=",uniqueAlt="+this._uniqueAlt}if(this._conflictInfo!=null){t+=",conflictingAlts="+this._conflictInfo.conflictedAlts;if(!this._conflictInfo.isExact){t+="*"}}if(this._dipsIntoOuterContext){t+=",dipsIntoOuterContext"}return t.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(e){this.ensureWritable();this._hasSemanticContext=e}get conflictInfo(){return this._conflictInfo}set conflictInfo(e){this.ensureWritable();this._conflictInfo=e}get conflictingAlts(){if(this._conflictInfo==null){return void 0}return this._conflictInfo.conflictedAlts}get isExactConflict(){if(this._conflictInfo==null){return false}return this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(e){return this.configs[e]}ensureWritable(){if(this.isReadOnly){throw new Error("This ATNConfigSet is read only.")}}};t([u.NotNull],v.prototype,"getRepresentedAlternatives",null);t([u.Override],v.prototype,"size",null);t([u.Override],v.prototype,"isEmpty",null);t([u.Override],v.prototype,"contains",null);t([u.Override],v.prototype,Symbol.iterator,null);t([u.Override],v.prototype,"toArray",null);t([u.Override],v.prototype,"containsAll",null);t([u.Override],v.prototype,"clear",null);t([u.Override],v.prototype,"equals",null);t([u.Override],v.prototype,"hashCode",null);e.ATNConfigSet=v}));var G=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.DFAState=void 0;var n=he();var s=q();var o=T();var a=p();var l=K();var u=r(9491);var c=class{constructor(e){this.stateNumber=-1;this.configs=e;this.edges=new Map;this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(e){if(!this.isContextSensitive){return false}return this.contextSymbols.get(e)}setContextSymbol(e){u(this.isContextSensitive);this.contextSymbols.set(e)}setContextSensitive(e){u(!this.configs.isOutermostConfigSet);if(this.isContextSensitive){return}if(!this.contextSymbols){this.contextSymbols=new s.BitSet}}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(e){this._acceptStateInfo=e}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){if(!this._acceptStateInfo){return n.ATN.INVALID_ALT_NUMBER}return this._acceptStateInfo.prediction}get lexerActionExecutor(){if(!this._acceptStateInfo){return void 0}return this._acceptStateInfo.lexerActionExecutor}getTarget(e){return this.edges.get(e)}setTarget(e,t){this.edges.set(e,t)}getEdgeMap(){return this.edges}getContextTarget(e){if(e===l.PredictionContext.EMPTY_FULL_STATE_KEY){e=-1}return this.contextEdges.get(e)}setContextTarget(e,t){if(!this.isContextSensitive){throw new Error("The state is not context sensitive.")}if(e===l.PredictionContext.EMPTY_FULL_STATE_KEY){e=-1}this.contextEdges.set(e,t)}getContextEdgeMap(){let e=new Map(this.contextEdges);let t=e.get(-1);if(t!==void 0){if(e.size===1){let e=new Map;e.set(l.PredictionContext.EMPTY_FULL_STATE_KEY,t);return e}else{e.delete(-1);e.set(l.PredictionContext.EMPTY_FULL_STATE_KEY,t)}}return e}hashCode(){let e=o.MurmurHash.initialize(7);e=o.MurmurHash.update(e,this.configs.hashCode());e=o.MurmurHash.finish(e,1);return e}equals(e){if(this===e){return true}if(!(e instanceof c)){return false}let t=e;let r=this.configs.equals(t.configs);return r}toString(){let e="";e+=this.stateNumber+":"+this.configs;if(this.isAcceptState){e+="=>";if(this.predicates){e+=this.predicates}else{e+=this.prediction}}return e.toString()}};t([a.NotNull],c.prototype,"configs",void 0);t([a.NotNull],c.prototype,"edges",void 0);t([a.NotNull],c.prototype,"contextEdges",void 0);t([a.Override],c.prototype,"hashCode",null);t([a.Override],c.prototype,"equals",null);t([a.Override],c.prototype,"toString",null);e.DFAState=c;(function(e){let r=class PredPrediction{constructor(e,t){this.alt=t;this.pred=e}toString(){return"("+this.pred+", "+this.alt+")"}};t([a.NotNull],r.prototype,"pred",void 0);t([a.Override],r.prototype,"toString",null);r=t([i(0,a.NotNull)],r);e.PredPrediction=r})(c=e.DFAState||(e.DFAState={}))}));var $=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ATNSimulator=void 0;var i=Z();var n=G();var s=p();var o=K();var a=class ATNSimulator2{constructor(e){this.atn=e}static get ERROR(){if(!ATNSimulator2._ERROR){ATNSimulator2._ERROR=new n.DFAState(new i.ATNConfigSet);ATNSimulator2._ERROR.stateNumber=o.PredictionContext.EMPTY_FULL_STATE_KEY}return ATNSimulator2._ERROR}clearDFA(){this.atn.clearDFA()}};t([s.NotNull],a.prototype,"atn",void 0);t([s.NotNull],a,"ERROR",null);a=t([r(0,s.NotNull)],a);e.ATNSimulator=a;(function(e){const t="$";const r="$lf$";const i="$nolf$"})(a=e.ATNSimulator||(e.ATNSimulator={}));e.ATNSimulator=a}));var W=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ConsoleErrorListener=void 0;var t=class{syntaxError(e,t,r,i,n,s){console.error(`line ${r}:${i} ${n}`)}};e.ConsoleErrorListener=t;t.INSTANCE=new t}));var Y=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ProxyErrorListener=void 0;var i=p();var n=class{constructor(e){this.delegates=e;if(!e){throw new Error("Invalid delegates")}}getDelegates(){return this.delegates}syntaxError(e,t,r,i,n,s){this.delegates.forEach((o=>{if(o.syntaxError){o.syntaxError(e,t,r,i,n,s)}}))}};t([i.Override,r(0,i.NotNull),r(4,i.NotNull)],n.prototype,"syntaxError",null);e.ProxyErrorListener=n}));var J=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.Recognizer=void 0;var i=W();var n=Y();var s=p();var o=M();var a=C();var l=class{constructor(){this._listeners=[i.ConsoleErrorListener.INSTANCE];this._stateNumber=-1}getTokenTypeMap(){let e=this.vocabulary;let t=l.tokenTypeMapCache.get(e);if(t==null){let r=new Map;for(let t=0;t<=this.atn.maxTokenType;t++){let i=e.getLiteralName(t);if(i!=null){r.set(i,t)}let n=e.getSymbolicName(t);if(n!=null){r.set(n,t)}}r.set("EOF",o.Token.EOF);t=r;l.tokenTypeMapCache.set(e,t)}return t}getRuleIndexMap(){let e=this.ruleNames;if(e==null){throw new Error("The current recognizer does not provide a list of rule names.")}let t=l.ruleIndexMapCache.get(e);if(t==null){t=a.toMap(e);l.ruleIndexMapCache.set(e,t)}return t}getTokenType(e){let t=this.getTokenTypeMap().get(e);if(t!=null){return t}return o.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(e){this._interp=e}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(e){let t=e.getOffendingToken();if(!t){return""}let r=t.line;let i=t.charPositionInLine;return"line "+r+":"+i}addErrorListener(e){if(!e){throw new TypeError("listener must not be null")}this._listeners.push(e)}removeErrorListener(e){let t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new n.ProxyErrorListener(this.getErrorListeners())}sempred(e,t,r){return true}precpred(e,t){return true}action(e,t,r){}get state(){return this._stateNumber}set state(e){this._stateNumber=e}};l.EOF=-1;l.tokenTypeMapCache=new WeakMap;l.ruleIndexMapCache=new WeakMap;t([s.SuppressWarnings("serial"),s.NotNull],l.prototype,"_listeners",void 0);t([s.NotNull],l.prototype,"getTokenTypeMap",null);t([s.NotNull],l.prototype,"getRuleIndexMap",null);t([s.NotNull],l.prototype,"serializedATN",null);t([s.NotNull],l.prototype,"atn",null);t([s.NotNull,r(0,s.NotNull)],l.prototype,"interpreter",null);t([s.NotNull,r(0,s.NotNull)],l.prototype,"getErrorHeader",null);t([r(0,s.NotNull)],l.prototype,"addErrorListener",null);t([r(0,s.NotNull)],l.prototype,"removeErrorListener",null);t([s.NotNull],l.prototype,"getErrorListeners",null);e.Recognizer=l}));var Q=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.VocabularyImpl=void 0;var r=p();var i=M();var n=class{constructor(e,t,r){this.literalNames=e;this.symbolicNames=t;this.displayNames=r;this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(e){if(e>=0&&e<this.literalNames.length){return this.literalNames[e]}return void 0}getSymbolicName(e){if(e>=0&&e<this.symbolicNames.length){return this.symbolicNames[e]}if(e===i.Token.EOF){return"EOF"}return void 0}getDisplayName(e){if(e>=0&&e<this.displayNames.length){let t=this.displayNames[e];if(t){return t}}let t=this.getLiteralName(e);if(t){return t}let r=this.getSymbolicName(e);if(r){return r}return String(e)}};n.EMPTY_VOCABULARY=new n([],[],[]);t([r.NotNull],n.prototype,"literalNames",void 0);t([r.NotNull],n.prototype,"symbolicNames",void 0);t([r.NotNull],n.prototype,"displayNames",void 0);t([r.Override],n.prototype,"maxTokenType",null);t([r.Override],n.prototype,"getLiteralName",null);t([r.Override],n.prototype,"getSymbolicName",null);t([r.Override,r.NotNull],n.prototype,"getDisplayName",null);t([r.NotNull],n,"EMPTY_VOCABULARY",void 0);e.VocabularyImpl=n}));var X=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.DFASerializer=void 0;var r=$();var i=p();var n=K();var s=J();var o=Q();var a=class{constructor(e,t,r,i){if(t instanceof s.Recognizer){r=t.ruleNames;i=t.atn;t=t.vocabulary}else if(!t){t=o.VocabularyImpl.EMPTY_VOCABULARY}this.dfa=e;this.vocabulary=t;this.ruleNames=r;this.atn=i}toString(){if(!this.dfa.s0){return""}let e="";if(this.dfa.states){let t=new Array(...this.dfa.states.toArray());t.sort(((e,t)=>e.stateNumber-t.stateNumber));for(let i of t){let t=i.getEdgeMap();let n=[...t.keys()].sort(((e,t)=>e-t));let s=i.getContextEdgeMap();let o=[...s.keys()].sort(((e,t)=>e-t));for(let s of n){let n=t.get(s);if((n==null||n===r.ATNSimulator.ERROR)&&!i.isContextSymbol(s)){continue}let o=false;e+=this.getStateString(i)+"-"+this.getEdgeLabel(s)+"->";if(i.isContextSymbol(s)){e+="!";o=true}let a=n;if(a&&a.stateNumber!==r.ATNSimulator.ERROR.stateNumber){e+=this.getStateString(a)+"\n"}else if(o){e+="ctx\n"}}if(i.isContextSensitive){for(let t of o){e+=this.getStateString(i)+"-"+this.getContextLabel(t)+"->"+this.getStateString(s.get(t))+"\n"}}}}let t=e;if(t.length===0){return""}return t}getContextLabel(e){if(e===n.PredictionContext.EMPTY_FULL_STATE_KEY){return"ctx:EMPTY_FULL"}else if(e===n.PredictionContext.EMPTY_LOCAL_STATE_KEY){return"ctx:EMPTY_LOCAL"}if(this.atn&&e>0&&e<=this.atn.states.length){let t=this.atn.states[e];let r=t.ruleIndex;if(this.ruleNames&&r>=0&&r<this.ruleNames.length){return"ctx:"+String(e)+"("+this.ruleNames[r]+")"}}return"ctx:"+String(e)}getEdgeLabel(e){return this.vocabulary.getDisplayName(e)}getStateString(e){if(e===r.ATNSimulator.ERROR){return"ERROR"}let t=e.stateNumber;let i="s"+t;if(e.isAcceptState){if(e.predicates){i=":s"+t+"=>"+e.predicates}else{i=":s"+t+"=>"+e.prediction}}if(e.isContextSensitive){i+="*";for(let t of e.configs){if(t.reachesIntoOuterContext){i+="*";break}}}return i}};t([i.NotNull],a.prototype,"dfa",void 0);t([i.NotNull],a.prototype,"vocabulary",void 0);t([i.Override],a.prototype,"toString",null);e.DFASerializer=a}));var ee=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerDFASerializer=void 0;var i=X();var n=p();var s=Q();var o=class LexerDFASerializer extends i.DFASerializer{constructor(e){super(e,s.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(e){return"'"+String.fromCodePoint(e)+"'"}};t([n.Override,n.NotNull],o.prototype,"getEdgeLabel",null);o=t([r(0,n.NotNull)],o);e.LexerDFASerializer=o}));var te=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.StarLoopEntryState=void 0;var r=_();var i=q();var n=H();var s=p();var o=class extends n.DecisionState{constructor(){super(...arguments);this.precedenceRuleDecision=false;this.precedenceLoopbackStates=new i.BitSet}get stateType(){return r.ATNStateType.STAR_LOOP_ENTRY}};t([s.Override],o.prototype,"stateType",null);e.StarLoopEntryState=o}));var re=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.DFA=void 0;var i=E();var n=Z();var s=X();var o=G();var a=ee();var l=p();var u=w();var c=te();var h=Q();var d=class DFA{constructor(e,t=0){this.states=new i.Array2DHashSet(u.ObjectEqualityComparator.INSTANCE);this.nextStateNumber=0;if(!e.atn){throw new Error("The ATNState must be associated with an ATN")}this.atnStartState=e;this.atn=e.atn;this.decision=t;let r=false;if(e instanceof c.StarLoopEntryState){if(e.precedenceRuleDecision){r=true;this.s0=new o.DFAState(new n.ATNConfigSet);this.s0full=new o.DFAState(new n.ATNConfigSet)}}this.precedenceDfa=r}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(e,t){if(!this.isPrecedenceDfa){throw new Error("Only precedence DFAs may contain a precedence start state.")}if(t){return this.s0full.getTarget(e)}else{return this.s0.getTarget(e)}}setPrecedenceStartState(e,t,r){if(!this.isPrecedenceDfa){throw new Error("Only precedence DFAs may contain a precedence start state.")}if(e<0){return}if(t){this.s0full.setTarget(e,r)}else{this.s0.setTarget(e,r)}}get isEmpty(){if(this.isPrecedenceDfa){return this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0}return this.s0==null&&this.s0full==null}get isContextSensitive(){if(this.isPrecedenceDfa){return this.s0full.getEdgeMap().size>0}return this.s0full!=null}addState(e){e.stateNumber=this.nextStateNumber++;return this.states.getOrAdd(e)}toString(e,t){if(!e){e=h.VocabularyImpl.EMPTY_VOCABULARY}if(!this.s0){return""}let r;if(t){r=new s.DFASerializer(this,e,t,this.atnStartState.atn)}else{r=new s.DFASerializer(this,e)}return r.toString()}toLexerString(){if(!this.s0){return""}let e=new a.LexerDFASerializer(this);return e.toString()}};t([l.NotNull],d.prototype,"states",void 0);t([l.NotNull],d.prototype,"atnStartState",void 0);t([l.NotNull],d.prototype,"atn",void 0);d=t([r(0,l.NotNull)],d);e.DFA=d}));var ie=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.BasicState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{get stateType(){return i.ATNStateType.BASIC}};t([n.Override],s.prototype,"stateType",null);e.BasicState=s}));var ne=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.InvalidState=void 0;var r=_();var i=ie();var n=p();var s=class extends i.BasicState{get stateType(){return r.ATNStateType.INVALID_TYPE}};t([n.Override],s.prototype,"stateType",null);e.InvalidState=s}));var se=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.SetTransition=void 0;var i=_e();var n=p();var s=M();var o=b();var a=class SetTransition extends o.Transition{constructor(e,t){super(e);if(t==null){t=i.IntervalSet.of(s.Token.INVALID_TYPE)}this.set=t}get serializationType(){return 7}get label(){return this.set}matches(e,t,r){return this.set.contains(e)}toString(){return this.set.toString()}};t([n.NotNull],a.prototype,"set",void 0);t([n.Override],a.prototype,"serializationType",null);t([n.Override,n.NotNull],a.prototype,"label",null);t([n.Override],a.prototype,"matches",null);t([n.Override,n.NotNull],a.prototype,"toString",null);a=t([r(0,n.NotNull),r(1,n.Nullable)],a);e.SetTransition=a}));var oe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.NotSetTransition=void 0;var i=p();var n=se();var s=class NotSetTransition extends n.SetTransition{constructor(e,t){super(e,t)}get serializationType(){return 8}matches(e,t,r){return e>=t&&e<=r&&!super.matches(e,t,r)}toString(){return"~"+super.toString()}};t([i.Override],s.prototype,"serializationType",null);t([i.Override],s.prototype,"matches",null);t([i.Override],s.prototype,"toString",null);s=t([r(0,i.NotNull),r(1,i.Nullable)],s);e.NotSetTransition=s}));var ae=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.RuleStopState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{get nonStopStateNumber(){return-1}get stateType(){return i.ATNStateType.RULE_STOP}};t([n.Override],s.prototype,"nonStopStateNumber",null);t([n.Override],s.prototype,"stateType",null);e.RuleStopState=s}));var le=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.RuleTransition=void 0;var i=p();var n=b();var s=class RuleTransition extends n.Transition{constructor(e,t,r,i){super(e);this.tailCall=false;this.optimizedTailCall=false;this.ruleIndex=t;this.precedence=r;this.followState=i}get serializationType(){return 3}get isEpsilon(){return true}matches(e,t,r){return false}};t([i.NotNull],s.prototype,"followState",void 0);t([i.Override],s.prototype,"serializationType",null);t([i.Override],s.prototype,"isEpsilon",null);t([i.Override],s.prototype,"matches",null);s=t([r(0,i.NotNull),r(3,i.NotNull)],s);e.RuleTransition=s}));var ue=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.WildcardTransition=void 0;var i=p();var n=b();var s=class WildcardTransition extends n.Transition{constructor(e){super(e)}get serializationType(){return 9}matches(e,t,r){return e>=t&&e<=r}toString(){return"."}};t([i.Override],s.prototype,"serializationType",null);t([i.Override],s.prototype,"matches",null);t([i.Override,i.NotNull],s.prototype,"toString",null);s=t([r(0,i.NotNull)],s);e.WildcardTransition=s}));var ce=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LL1Analyzer=void 0;var i=x();var n=E();var s=V();var o=q();var a=_e();var l=p();var u=oe();var c=w();var h=K();var d=ae();var m=le();var g=M();var y=ue();var _=class LL1Analyzer2{constructor(e){this.atn=e}getDecisionLookahead(e){if(e==null){return void 0}let t=new Array(e.numberOfTransitions);for(let r=0;r<e.numberOfTransitions;r++){let i=new a.IntervalSet;t[r]=i;let s=new n.Array2DHashSet(c.ObjectEqualityComparator.INSTANCE);let l=false;this._LOOK(e.transition(r).target,void 0,h.PredictionContext.EMPTY_LOCAL,i,s,new o.BitSet,l,false);if(i.size===0||i.contains(LL1Analyzer2.HIT_PRED)){i=void 0;t[r]=i}}return t}LOOK(e,t,r){if(r===void 0){if(e.atn==null){throw new Error("Illegal state")}r=e.atn.ruleToStopState[e.ruleIndex]}else if(r===null){r=void 0}let i=new a.IntervalSet;let s=true;let l=true;this._LOOK(e,r,t,i,new n.Array2DHashSet,new o.BitSet,s,l);return i}_LOOK(e,t,r,n,o,l,c,p){let _=s.ATNConfig.create(e,0,r);if(!o.add(_)){return}if(e===t){if(h.PredictionContext.isEmptyLocal(r)){n.add(g.Token.EPSILON);return}else if(r.isEmpty){if(p){n.add(g.Token.EOF)}return}}if(e instanceof d.RuleStopState){if(r.isEmpty&&!h.PredictionContext.isEmptyLocal(r)){if(p){n.add(g.Token.EOF)}return}let i=l.get(e.ruleIndex);try{l.clear(e.ruleIndex);for(let e=0;e<r.size;e++){if(r.getReturnState(e)===h.PredictionContext.EMPTY_FULL_STATE_KEY){continue}let i=this.atn.states[r.getReturnState(e)];this._LOOK(i,t,r.getParent(e),n,o,l,c,p)}}finally{if(i){l.set(e.ruleIndex)}}}let v=e.numberOfTransitions;for(let s=0;s<v;s++){let h=e.transition(s);if(h instanceof m.RuleTransition){if(l.get(h.ruleIndex)){continue}let e=r.getChild(h.followState.stateNumber);try{l.set(h.ruleIndex);this._LOOK(h.target,t,e,n,o,l,c,p)}finally{l.clear(h.ruleIndex)}}else if(h instanceof i.AbstractPredicateTransition){if(c){this._LOOK(h.target,t,r,n,o,l,c,p)}else{n.add(LL1Analyzer2.HIT_PRED)}}else if(h.isEpsilon){this._LOOK(h.target,t,r,n,o,l,c,p)}else if(h instanceof y.WildcardTransition){n.addAll(a.IntervalSet.of(g.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))}else{let e=h.label;if(e!=null){if(h instanceof u.NotSetTransition){e=e.complement(a.IntervalSet.of(g.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))}n.addAll(e)}}}}};_.HIT_PRED=g.Token.INVALID_TYPE;t([l.NotNull],_.prototype,"atn",void 0);t([l.NotNull,r(0,l.NotNull),r(1,l.NotNull)],_.prototype,"LOOK",null);t([r(0,l.NotNull),r(2,l.NotNull),r(3,l.NotNull),r(4,l.NotNull),r(5,l.NotNull)],_.prototype,"_LOOK",null);_=t([r(0,l.NotNull)],_);e.LL1Analyzer=_}));var he=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ATN=void 0;var n=U();var s=re();var o=_e();var a=ne();var l=ce();var u=p();var c=w();var h=K();var d=M();var m=r(9491);var g=class ATN{constructor(e,t){this.states=[];this.decisionToState=[];this.modeNameToStartState=new Map;this.modeToStartState=[];this.contextCache=new n.Array2DHashMap(c.ObjectEqualityComparator.INSTANCE);this.decisionToDFA=[];this.modeToDFA=[];this.LL1Table=new Map;this.grammarType=e;this.maxTokenType=t}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let e=0;e<this.decisionToDFA.length;e++){this.decisionToDFA[e]=new s.DFA(this.decisionToState[e],e)}this.modeToDFA=new Array(this.modeToStartState.length);for(let e=0;e<this.modeToDFA.length;e++){this.modeToDFA[e]=new s.DFA(this.modeToStartState[e])}this.contextCache.clear();this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(e){return h.PredictionContext.getCachedContext(e,this.contextCache,new h.PredictionContext.IdentityHashMap)}getDecisionToDFA(){m(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length);return this.decisionToDFA}nextTokens(e,t){if(t){let r=new l.LL1Analyzer(this);let i=r.LOOK(e,t);return i}else{if(e.nextTokenWithinRule){return e.nextTokenWithinRule}e.nextTokenWithinRule=this.nextTokens(e,h.PredictionContext.EMPTY_LOCAL);e.nextTokenWithinRule.setReadonly(true);return e.nextTokenWithinRule}}addState(e){e.atn=this;e.stateNumber=this.states.length;this.states.push(e)}removeState(e){let t=new a.InvalidState;t.atn=this;t.stateNumber=e.stateNumber;this.states[e.stateNumber]=t}defineMode(e,t){this.modeNameToStartState.set(e,t);this.modeToStartState.push(t);this.modeToDFA.push(new s.DFA(t));this.defineDecisionState(t)}defineDecisionState(e){this.decisionToState.push(e);e.decision=this.decisionToState.length-1;this.decisionToDFA.push(new s.DFA(e,e.decision));return e.decision}getDecisionState(e){if(this.decisionToState.length>0){return this.decisionToState[e]}return void 0}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(e,t){if(e<0||e>=this.states.length){throw new RangeError("Invalid state number.")}let r=t;let i=this.states[e];let n=this.nextTokens(i);if(!n.contains(d.Token.EPSILON)){return n}let s=new o.IntervalSet;s.addAll(n);s.remove(d.Token.EPSILON);while(r!=null&&r.invokingState>=0&&n.contains(d.Token.EPSILON)){let e=this.states[r.invokingState];let t=e.transition(0);n=this.nextTokens(t.followState);s.addAll(n);s.remove(d.Token.EPSILON);r=r._parent}if(n.contains(d.Token.EPSILON)){s.add(d.Token.EOF)}return s}};t([u.NotNull],g.prototype,"states",void 0);t([u.NotNull],g.prototype,"decisionToState",void 0);t([u.NotNull],g.prototype,"modeNameToStartState",void 0);t([u.NotNull],g.prototype,"modeToStartState",void 0);t([u.NotNull],g.prototype,"decisionToDFA",void 0);t([u.NotNull],g.prototype,"modeToDFA",void 0);t([u.NotNull],g.prototype,"nextTokens",null);t([i(0,u.NotNull)],g.prototype,"removeState",null);t([i(0,u.NotNull),i(1,u.NotNull)],g.prototype,"defineMode",null);t([i(0,u.NotNull)],g.prototype,"defineDecisionState",null);t([u.NotNull],g.prototype,"getExpectedTokens",null);g=t([i(0,u.NotNull)],g);e.ATN=g;(function(e){e.INVALID_ALT_NUMBER=0})(g=e.ATN||(e.ATN={}));e.ATN=g}));var de=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerIndexedCustomAction=void 0;var i=T();var n=p();var s=class LexerIndexedCustomAction2{constructor(e,t){this._offset=e;this._action=t}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return true}execute(e){this._action.execute(e)}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this._offset);e=i.MurmurHash.update(e,this._action);return i.MurmurHash.finish(e,2)}equals(e){if(e===this){return true}else if(!(e instanceof LexerIndexedCustomAction2)){return false}return this._offset===e._offset&&this._action.equals(e._action)}};t([n.NotNull],s.prototype,"action",null);t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);s=t([r(1,n.NotNull)],s);e.LexerIndexedCustomAction=s}));var fe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerActionExecutor=void 0;var i=A();var n=de();var s=T();var o=p();var a=class LexerActionExecutor2{constructor(e){this._lexerActions=e;let t=s.MurmurHash.initialize();for(let r of e){t=s.MurmurHash.update(t,r)}this.cachedHashCode=s.MurmurHash.finish(t,e.length)}static append(e,t){if(!e){return new LexerActionExecutor2([t])}let r=e._lexerActions.slice(0);r.push(t);return new LexerActionExecutor2(r)}fixOffsetBeforeMatch(e){let t;for(let r=0;r<this._lexerActions.length;r++){if(this._lexerActions[r].isPositionDependent&&!(this._lexerActions[r]instanceof n.LexerIndexedCustomAction)){if(!t){t=this._lexerActions.slice(0)}t[r]=new n.LexerIndexedCustomAction(e,this._lexerActions[r])}}if(!t){return this}return new LexerActionExecutor2(t)}get lexerActions(){return this._lexerActions}execute(e,t,r){let i=false;let s=t.index;try{for(let o of this._lexerActions){if(o instanceof n.LexerIndexedCustomAction){let e=o.offset;t.seek(r+e);o=o.action;i=r+e!==s}else if(o.isPositionDependent){t.seek(s);i=false}o.execute(e)}}finally{if(i){t.seek(s)}}}hashCode(){return this.cachedHashCode}equals(e){if(e===this){return true}else if(!(e instanceof LexerActionExecutor2)){return false}return this.cachedHashCode===e.cachedHashCode&&i.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,e._lexerActions)}};t([o.NotNull],a.prototype,"_lexerActions",void 0);t([o.NotNull],a.prototype,"lexerActions",null);t([r(0,o.NotNull)],a.prototype,"execute",null);t([o.Override],a.prototype,"hashCode",null);t([o.Override],a.prototype,"equals",null);t([o.NotNull,r(1,o.NotNull)],a,"append",null);a=t([r(0,o.NotNull)],a);e.LexerActionExecutor=a}));var pe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerNoViableAltException=void 0;var i=v();var n=p();var s=I();var o=C();var a=class LexerNoViableAltException extends i.RecognitionException{constructor(e,t,r,i){super(e,t);this._startIndex=r;this._deadEndConfigs=i}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let e="";if(this._startIndex>=0&&this._startIndex<this.inputStream.size){e=this.inputStream.getText(s.Interval.of(this._startIndex,this._startIndex));e=o.escapeWhitespace(e,false)}return`LexerNoViableAltException('${e}')`}};t([n.Override],a.prototype,"inputStream",null);t([n.Override],a.prototype,"toString",null);a=t([r(1,n.NotNull)],a);e.LexerNoViableAltException=a}));var me=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.OrderedATNConfigSet=void 0;var r=Z();var i=p();var n=class extends r.ATNConfigSet{constructor(e,t){if(e!=null&&t!=null){super(e,t)}else{super()}}clone(e){let t=new n(this,e);if(!e&&this.isReadOnly){t.addAll(this)}return t}getKey(e){return{state:0,alt:e.hashCode()}}canMerge(e,t,r){return e.equals(r)}};t([i.Override],n.prototype,"clone",null);t([i.Override],n.prototype,"getKey",null);t([i.Override],n.prototype,"canMerge",null);e.OrderedATNConfigSet=n}));var ge=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerATNSimulator=void 0;var n=B();var s=he();var o=V();var a=Z();var l=$();var u=G();var c=I();var h=m();var d=ye();var g=fe();var y=pe();var _=p();var v=me();var b=K();var x=ae();var T=M();var w=r(9491);var S=class LexerATNSimulator3 extends l.ATNSimulator{constructor(e,t){super(e);this.optimize_tail_calls=true;this.startIndex=-1;this._line=1;this._charPositionInLine=0;this.mode=d.Lexer.DEFAULT_MODE;this.prevAccept=new LexerATNSimulator3.SimState;this.recog=t}copyState(e){this._charPositionInLine=e.charPositionInLine;this._line=e._line;this.mode=e.mode;this.startIndex=e.startIndex}match(e,t){this.mode=t;let r=e.mark();try{this.startIndex=e.index;this.prevAccept.reset();let i=this.atn.modeToDFA[t].s0;if(i==null){return this.matchATN(e)}else{return this.execATN(e,i)}}finally{e.release(r)}}reset(){this.prevAccept.reset();this.startIndex=-1;this._line=1;this._charPositionInLine=0;this.mode=d.Lexer.DEFAULT_MODE}matchATN(e){let t=this.atn.modeToStartState[this.mode];if(LexerATNSimulator3.debug){console.log(`matchATN mode ${this.mode} start: ${t}`)}let r=this.mode;let i=this.computeStartState(e,t);let n=i.hasSemanticContext;if(n){i.hasSemanticContext=false}let s=this.addDFAState(i);if(!n){let e=this.atn.modeToDFA[this.mode];if(!e.s0){e.s0=s}else{s=e.s0}}let o=this.execATN(e,s);if(LexerATNSimulator3.debug){console.log(`DFA after matchATN: ${this.atn.modeToDFA[r].toLexerString()}`)}return o}execATN(e,t){if(LexerATNSimulator3.debug){console.log(`start state closure=${t.configs}`)}if(t.isAcceptState){this.captureSimState(this.prevAccept,e,t)}let r=e.LA(1);let i=t;while(true){if(LexerATNSimulator3.debug){console.log(`execATN loop starting closure: ${i.configs}`)}let t=this.getExistingTargetState(i,r);if(t==null){t=this.computeTargetState(e,i,r)}if(t===l.ATNSimulator.ERROR){break}if(r!==h.IntStream.EOF){this.consume(e)}if(t.isAcceptState){this.captureSimState(this.prevAccept,e,t);if(r===h.IntStream.EOF){break}}r=e.LA(1);i=t}return this.failOrAccept(this.prevAccept,e,i.configs,r)}getExistingTargetState(e,t){let r=e.getTarget(t);if(LexerATNSimulator3.debug&&r!=null){console.log("reuse state "+e.stateNumber+" edge to "+r.stateNumber)}return r}computeTargetState(e,t,r){let i=new v.OrderedATNConfigSet;this.getReachableConfigSet(e,t.configs,i,r);if(i.isEmpty){if(!i.hasSemanticContext){this.addDFAEdge(t,r,l.ATNSimulator.ERROR)}return l.ATNSimulator.ERROR}return this.addDFAEdge(t,r,i)}failOrAccept(e,t,r,i){if(e.dfaState!=null){let r=e.dfaState.lexerActionExecutor;this.accept(t,r,this.startIndex,e.index,e.line,e.charPos);return e.dfaState.prediction}else{if(i===h.IntStream.EOF&&t.index===this.startIndex){return T.Token.EOF}throw new y.LexerNoViableAltException(this.recog,t,this.startIndex,r)}}getReachableConfigSet(e,t,r,i){let n=s.ATN.INVALID_ALT_NUMBER;for(let s of t){let t=s.alt===n;if(t&&s.hasPassedThroughNonGreedyDecision){continue}if(LexerATNSimulator3.debug){console.log(`testing ${this.getTokenName(i)} at ${s.toString(this.recog,true)}`)}let o=s.state.numberOfOptimizedTransitions;for(let a=0;a<o;a++){let o=s.state.getOptimizedTransition(a);let l=this.getReachableTarget(o,i);if(l!=null){let o=s.lexerActionExecutor;let a;if(o!=null){o=o.fixOffsetBeforeMatch(e.index-this.startIndex);a=s.transform(l,true,o)}else{w(s.lexerActionExecutor==null);a=s.transform(l,true)}let u=i===h.IntStream.EOF;if(this.closure(e,a,r,t,true,u)){n=s.alt;break}}}}}accept(e,t,r,i,n,s){if(LexerATNSimulator3.debug){console.log(`ACTION ${t}`)}e.seek(i);this._line=n;this._charPositionInLine=s;if(t!=null&&this.recog!=null){t.execute(this.recog,e,r)}}getReachableTarget(e,t){if(e.matches(t,d.Lexer.MIN_CHAR_VALUE,d.Lexer.MAX_CHAR_VALUE)){return e.target}return void 0}computeStartState(e,t){let r=b.PredictionContext.EMPTY_FULL;let i=new v.OrderedATNConfigSet;for(let n=0;n<t.numberOfTransitions;n++){let s=t.transition(n).target;let a=o.ATNConfig.create(s,n+1,r);this.closure(e,a,i,false,false,false)}return i}closure(e,t,r,i,n,s){if(LexerATNSimulator3.debug){console.log("closure("+t.toString(this.recog,true)+")")}if(t.state instanceof x.RuleStopState){if(LexerATNSimulator3.debug){if(this.recog!=null){console.log(`closure at ${this.recog.ruleNames[t.state.ruleIndex]} rule stop ${t}`)}else{console.log(`closure at rule stop ${t}`)}}let o=t.context;if(o.isEmpty){r.add(t);return true}else if(o.hasEmpty){r.add(t.transform(t.state,true,b.PredictionContext.EMPTY_FULL));i=true}for(let a=0;a<o.size;a++){let l=o.getReturnState(a);if(l===b.PredictionContext.EMPTY_FULL_STATE_KEY){continue}let u=o.getParent(a);let c=this.atn.states[l];let h=t.transform(c,false,u);i=this.closure(e,h,r,i,n,s)}return i}if(!t.state.onlyHasEpsilonTransitions){if(!i||!t.hasPassedThroughNonGreedyDecision){r.add(t)}}let o=t.state;for(let a=0;a<o.numberOfOptimizedTransitions;a++){let l=o.getOptimizedTransition(a);let u=this.getEpsilonTarget(e,t,l,r,n,s);if(u!=null){i=this.closure(e,u,r,i,n,s)}}return i}getEpsilonTarget(e,t,r,i,n,s){let o;switch(r.serializationType){case 3:let a=r;if(this.optimize_tail_calls&&a.optimizedTailCall&&!t.context.hasEmpty){o=t.transform(r.target,true)}else{let e=t.context.getChild(a.followState.stateNumber);o=t.transform(r.target,true,e)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let l=r;if(LexerATNSimulator3.debug){console.log("EVAL rule "+l.ruleIndex+":"+l.predIndex)}i.hasSemanticContext=true;if(this.evaluatePredicate(e,l.ruleIndex,l.predIndex,n)){o=t.transform(r.target,true)}else{o=void 0}break;case 6:if(t.context.hasEmpty){let e=g.LexerActionExecutor.append(t.lexerActionExecutor,this.atn.lexerActions[r.actionIndex]);o=t.transform(r.target,true,e);break}else{o=t.transform(r.target,true);break}case 1:o=t.transform(r.target,true);break;case 5:case 2:case 7:if(s){if(r.matches(h.IntStream.EOF,d.Lexer.MIN_CHAR_VALUE,d.Lexer.MAX_CHAR_VALUE)){o=t.transform(r.target,false);break}}o=void 0;break;default:o=void 0;break}return o}evaluatePredicate(e,t,r,i){if(this.recog==null){return true}if(!i){return this.recog.sempred(void 0,t,r)}let n=this._charPositionInLine;let s=this._line;let o=e.index;let a=e.mark();try{this.consume(e);return this.recog.sempred(void 0,t,r)}finally{this._charPositionInLine=n;this._line=s;e.seek(o);e.release(a)}}captureSimState(e,t,r){e.index=t.index;e.line=this._line;e.charPos=this._charPositionInLine;e.dfaState=r}addDFAEdge(e,t,r){if(r instanceof a.ATNConfigSet){let i=r.hasSemanticContext;if(i){r.hasSemanticContext=false}let n=this.addDFAState(r);if(i){return n}this.addDFAEdge(e,t,n);return n}else{if(LexerATNSimulator3.debug){console.log("EDGE "+e+" -> "+r+" upon "+String.fromCharCode(t))}if(e!=null){e.setTarget(t,r)}}}addDFAState(e){w(!e.hasSemanticContext);let t=new u.DFAState(e);let r=this.atn.modeToDFA[this.mode].states.get(t);if(r!=null){return r}e.optimizeConfigs(this);let i=new u.DFAState(e.clone(true));let s;for(let t of e){if(t.state instanceof x.RuleStopState){s=t;break}}if(s!=null){let e=this.atn.ruleToTokenType[s.state.ruleIndex];let t=s.lexerActionExecutor;i.acceptStateInfo=new n.AcceptStateInfo(e,t)}return this.atn.modeToDFA[this.mode].addState(i)}getDFA(e){return this.atn.modeToDFA[e]}getText(e){return e.getText(c.Interval.of(this.startIndex,e.index-1))}get line(){return this._line}set line(e){this._line=e}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(e){this._charPositionInLine=e}consume(e){let t=e.LA(1);if(t==="\n".charCodeAt(0)){this._line++;this._charPositionInLine=0}else{this._charPositionInLine++}e.consume()}getTokenName(e){if(e===-1){return"EOF"}return"'"+String.fromCharCode(e)+"'"}};t([_.NotNull],S.prototype,"prevAccept",void 0);t([i(0,_.NotNull)],S.prototype,"copyState",null);t([i(0,_.NotNull)],S.prototype,"match",null);t([_.Override],S.prototype,"reset",null);t([i(0,_.NotNull)],S.prototype,"matchATN",null);t([i(0,_.NotNull),i(1,_.NotNull)],S.prototype,"execATN",null);t([i(0,_.NotNull)],S.prototype,"getExistingTargetState",null);t([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],S.prototype,"computeTargetState",null);t([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],S.prototype,"getReachableConfigSet",null);t([i(0,_.NotNull)],S.prototype,"accept",null);t([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],S.prototype,"computeStartState",null);t([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],S.prototype,"closure",null);t([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull),i(3,_.NotNull)],S.prototype,"getEpsilonTarget",null);t([i(0,_.NotNull)],S.prototype,"evaluatePredicate",null);t([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],S.prototype,"captureSimState",null);t([_.NotNull,i(0,_.NotNull)],S.prototype,"addDFAState",null);t([_.NotNull],S.prototype,"getDFA",null);t([_.NotNull,i(0,_.NotNull)],S.prototype,"getText",null);t([i(0,_.NotNull)],S.prototype,"consume",null);t([_.NotNull],S.prototype,"getTokenName",null);S=t([i(0,_.NotNull)],S);e.LexerATNSimulator=S;(function(e){e.debug=false;e.dfa_debug=false;class SimState{constructor(){this.index=-1;this.line=0;this.charPos=-1}reset(){this.index=-1;this.line=0;this.charPos=-1;this.dfaState=void 0}}e.SimState=SimState})(S=e.LexerATNSimulator||(e.LexerATNSimulator={}));e.LexerATNSimulator=S}));var ye=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.Lexer=void 0;var r=F();var i=j();var n=I();var s=m();var o=ge();var a=pe();var l=p();var u=J();var c=M();var h=class extends u.Recognizer{constructor(e){super();this._factory=r.CommonTokenFactory.DEFAULT;this._tokenStartCharIndex=-1;this._tokenStartLine=0;this._tokenStartCharPositionInLine=0;this._hitEOF=false;this._channel=0;this._type=0;this._modeStack=new i.IntegerStack;this._mode=h.DEFAULT_MODE;this._input=e;this._tokenFactorySourcePair={source:this,stream:e}}static get DEFAULT_TOKEN_CHANNEL(){return c.Token.DEFAULT_CHANNEL}static get HIDDEN(){return c.Token.HIDDEN_CHANNEL}reset(e){if(e===void 0||e){this._input.seek(0)}this._token=void 0;this._type=c.Token.INVALID_TYPE;this._channel=c.Token.DEFAULT_CHANNEL;this._tokenStartCharIndex=-1;this._tokenStartCharPositionInLine=-1;this._tokenStartLine=-1;this._text=void 0;this._hitEOF=false;this._mode=h.DEFAULT_MODE;this._modeStack.clear();this.interpreter.reset()}nextToken(){if(this._input==null){throw new Error("nextToken requires a non-null input stream.")}let e=this._input.mark();try{e:while(true){if(this._hitEOF){return this.emitEOF()}this._token=void 0;this._channel=c.Token.DEFAULT_CHANNEL;this._tokenStartCharIndex=this._input.index;this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine;this._tokenStartLine=this.interpreter.line;this._text=void 0;do{this._type=c.Token.INVALID_TYPE;let e;try{e=this.interpreter.match(this._input,this._mode)}catch(t){if(t instanceof a.LexerNoViableAltException){this.notifyListeners(t);this.recover(t);e=h.SKIP}else{throw t}}if(this._input.LA(1)===s.IntStream.EOF){this._hitEOF=true}if(this._type===c.Token.INVALID_TYPE){this._type=e}if(this._type===h.SKIP){continue e}}while(this._type===h.MORE);if(this._token==null){return this.emit()}return this._token}}finally{this._input.release(e)}}skip(){this._type=h.SKIP}more(){this._type=h.MORE}mode(e){this._mode=e}pushMode(e){if(o.LexerATNSimulator.debug){console.log("pushMode "+e)}this._modeStack.push(this._mode);this.mode(e)}popMode(){if(this._modeStack.isEmpty){throw new Error("EmptyStackException")}if(o.LexerATNSimulator.debug){console.log("popMode back to "+this._modeStack.peek())}this.mode(this._modeStack.pop());return this._mode}get tokenFactory(){return this._factory}set tokenFactory(e){this._factory=e}get inputStream(){return this._input}set inputStream(e){this.reset(false);this._input=e;this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(e){if(!e){e=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)}this._token=e;return e}emitEOF(){let e=this.charPositionInLine;let t=this.line;let r=this._factory.create(this._tokenFactorySourcePair,c.Token.EOF,void 0,c.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,t,e);this.emit(r);return r}get line(){return this.interpreter.line}set line(e){this.interpreter.line=e}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(e){this.interpreter.charPositionInLine=e}get charIndex(){return this._input.index}get text(){if(this._text!=null){return this._text}return this.interpreter.getText(this._input)}set text(e){this._text=e}get token(){return this._token}set token(e){this._token=e}set type(e){this._type=e}get type(){return this._type}set channel(e){this._channel=e}get channel(){return this._channel}getAllTokens(){let e=[];let t=this.nextToken();while(t.type!==c.Token.EOF){e.push(t);t=this.nextToken()}return e}notifyListeners(e){let t=this._input.getText(n.Interval.of(this._tokenStartCharIndex,this._input.index));let r="token recognition error at: '"+this.getErrorDisplay(t)+"'";let i=this.getErrorListenerDispatch();if(i.syntaxError){i.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,r,e)}}getErrorDisplay(e){if(typeof e==="number"){switch(e){case c.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(e)}return e.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(e){let t=this.getErrorDisplay(e);return"'"+t+"'"}recover(e){if(e instanceof a.LexerNoViableAltException){if(this._input.LA(1)!==s.IntStream.EOF){this.interpreter.consume(this._input)}}else{this._input.consume()}}};h.DEFAULT_MODE=0;h.MORE=-2;h.SKIP=-3;h.MIN_CHAR_VALUE=0;h.MAX_CHAR_VALUE=1114111;t([l.Override],h.prototype,"nextToken",null);t([l.Override],h.prototype,"tokenFactory",null);t([l.Override],h.prototype,"inputStream",null);t([l.Override],h.prototype,"sourceName",null);t([l.Override],h.prototype,"line",null);t([l.Override],h.prototype,"charPositionInLine",null);e.Lexer=h}));var _e=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.IntervalSet=void 0;var i=A();var n=L();var s=I();var o=ye();var a=T();var l=p();var u=M();var c=class{constructor(e){this.readonly=false;if(e!=null){this._intervals=e.slice(0)}else{this._intervals=[]}}static get COMPLETE_CHAR_SET(){if(c._COMPLETE_CHAR_SET===void 0){c._COMPLETE_CHAR_SET=c.of(o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE);c._COMPLETE_CHAR_SET.setReadonly(true)}return c._COMPLETE_CHAR_SET}static get EMPTY_SET(){if(c._EMPTY_SET==null){c._EMPTY_SET=new c;c._EMPTY_SET.setReadonly(true)}return c._EMPTY_SET}static of(e,t=e){let r=new c;r.add(e,t);return r}clear(){if(this.readonly){throw new Error("can't alter readonly IntervalSet")}this._intervals.length=0}add(e,t=e){this.addRange(s.Interval.of(e,t))}addRange(e){if(this.readonly){throw new Error("can't alter readonly IntervalSet")}if(e.b<e.a){return}for(let t=0;t<this._intervals.length;t++){let r=this._intervals[t];if(e.equals(r)){return}if(e.adjacent(r)||!e.disjoint(r)){let i=e.union(r);this._intervals[t]=i;while(t<this._intervals.length-1){t++;let e=this._intervals[t];if(!i.adjacent(e)&&i.disjoint(e)){break}this._intervals.splice(t,1);t--;this._intervals[t]=i.union(e)}return}if(e.startsBeforeDisjoint(r)){this._intervals.splice(t,0,e);return}}this._intervals.push(e)}static or(e){let t=new c;for(let r of e){t.addAll(r)}return t}addAll(e){if(e==null){return this}if(e instanceof c){let t=e;let r=t._intervals.length;for(let e=0;e<r;e++){let r=t._intervals[e];this.add(r.a,r.b)}}else{for(let t of e.toArray()){this.add(t)}}return this}complementRange(e,t){return this.complement(c.of(e,t))}complement(e){if(e.isNil){return c.EMPTY_SET}let t;if(e instanceof c){t=e}else{t=new c;t.addAll(e)}return t.subtract(this)}subtract(e){if(e==null||e.isNil){return new c(this._intervals)}if(e instanceof c){return c.subtract(this,e)}let t=new c;t.addAll(e);return c.subtract(this,t)}static subtract(e,t){if(e.isNil){return new c}let r=new c(e._intervals);if(t.isNil){return r}let i=0;let n=0;while(i<r._intervals.length&&n<t._intervals.length){let e=r._intervals[i];let o=t._intervals[n];if(o.b<e.a){n++;continue}if(o.a>e.b){i++;continue}let a;let l;if(o.a>e.a){a=new s.Interval(e.a,o.a-1)}if(o.b<e.b){l=new s.Interval(o.b+1,e.b)}if(a){if(l){r._intervals[i]=a;r._intervals.splice(i+1,0,l);i++;n++;continue}else{r._intervals[i]=a;i++;continue}}else{if(l){r._intervals[i]=l;n++;continue}else{r._intervals.splice(i,1);continue}}}return r}or(e){let t=new c;t.addAll(this);t.addAll(e);return t}and(e){if(e.isNil){return new c}let t=this._intervals;let r=e._intervals;let i;let n=t.length;let s=r.length;let o=0;let a=0;while(o<n&&a<s){let e=t[o];let n=r[a];if(e.startsBeforeDisjoint(n)){o++}else if(n.startsBeforeDisjoint(e)){a++}else if(e.properlyContains(n)){if(!i){i=new c}i.addRange(e.intersection(n));a++}else if(n.properlyContains(e)){if(!i){i=new c}i.addRange(e.intersection(n));o++}else if(!e.disjoint(n)){if(!i){i=new c}i.addRange(e.intersection(n));if(e.startsAfterNonDisjoint(n)){a++}else if(n.startsAfterNonDisjoint(e)){o++}}}if(!i){return new c}return i}contains(e){let t=this._intervals.length;let r=0;let i=t-1;while(r<=i){let t=r+i>>1;let n=this._intervals[t];let s=n.a;let o=n.b;if(o<e){r=t+1}else if(s>e){i=t-1}else{return true}}return false}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil){throw new RangeError("set is empty")}let e=this._intervals[this._intervals.length-1];return e.b}get minElement(){if(this.isNil){throw new RangeError("set is empty")}return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let e=a.MurmurHash.initialize();for(let t of this._intervals){e=a.MurmurHash.update(e,t.a);e=a.MurmurHash.update(e,t.b)}e=a.MurmurHash.finish(e,this._intervals.length*2);return e}equals(e){if(e==null||!(e instanceof c)){return false}return i.ArrayEqualityComparator.INSTANCE.equals(this._intervals,e._intervals)}toString(e=false){let t="";if(this._intervals==null||this._intervals.length===0){return"{}"}if(this.size>1){t+="{"}let r=true;for(let i of this._intervals){if(r){r=false}else{t+=", "}let n=i.a;let s=i.b;if(n===s){if(n===u.Token.EOF){t+="<EOF>"}else if(e){t+="'"+String.fromCodePoint(n)+"'"}else{t+=n}}else{if(e){t+="'"+String.fromCodePoint(n)+"'..'"+String.fromCodePoint(s)+"'"}else{t+=n+".."+s}}}if(this.size>1){t+="}"}return t}toStringVocabulary(e){if(this._intervals==null||this._intervals.length===0){return"{}"}let t="";if(this.size>1){t+="{"}let r=true;for(let i of this._intervals){if(r){r=false}else{t+=", "}let n=i.a;let s=i.b;if(n===s){t+=this.elementName(e,n)}else{for(let r=n;r<=s;r++){if(r>n){t+=", "}t+=this.elementName(e,r)}}}if(this.size>1){t+="}"}return t}elementName(e,t){if(t===u.Token.EOF){return"<EOF>"}else if(t===u.Token.EPSILON){return"<EPSILON>"}else{return e.getDisplayName(t)}}get size(){let e=0;let t=this._intervals.length;if(t===1){let e=this._intervals[0];return e.b-e.a+1}for(let r=0;r<t;r++){let t=this._intervals[r];e+=t.b-t.a+1}return e}toIntegerList(){let e=new n.IntegerList(this.size);let t=this._intervals.length;for(let r=0;r<t;r++){let t=this._intervals[r];let i=t.a;let n=t.b;for(let t=i;t<=n;t++){e.add(t)}}return e}toSet(){let e=new Set;for(let t of this._intervals){let r=t.a;let i=t.b;for(let t=r;t<=i;t++){e.add(t)}}return e}toArray(){let e=new Array;let t=this._intervals.length;for(let r=0;r<t;r++){let t=this._intervals[r];let i=t.a;let n=t.b;for(let t=i;t<=n;t++){e.push(t)}}return e}remove(e){if(this.readonly){throw new Error("can't alter readonly IntervalSet")}let t=this._intervals.length;for(let r=0;r<t;r++){let t=this._intervals[r];let i=t.a;let n=t.b;if(e<i){break}if(e===i&&e===n){this._intervals.splice(r,1);break}if(e===i){this._intervals[r]=s.Interval.of(t.a+1,t.b);break}if(e===n){this._intervals[r]=s.Interval.of(t.a,t.b-1);break}if(e>i&&e<n){let i=t.b;this._intervals[r]=s.Interval.of(t.a,e-1);this.add(e+1,i)}}}get isReadonly(){return this.readonly}setReadonly(e){if(this.readonly&&!e){throw new Error("can't alter readonly IntervalSet")}this.readonly=e}};t([l.Override],c.prototype,"addAll",null);t([l.Override],c.prototype,"complement",null);t([l.Override],c.prototype,"subtract",null);t([l.Override],c.prototype,"or",null);t([l.Override],c.prototype,"and",null);t([l.Override],c.prototype,"contains",null);t([l.Override],c.prototype,"isNil",null);t([l.Override],c.prototype,"hashCode",null);t([l.Override],c.prototype,"equals",null);t([r(0,l.NotNull)],c.prototype,"toStringVocabulary",null);t([l.NotNull,r(0,l.NotNull)],c.prototype,"elementName",null);t([l.Override],c.prototype,"size",null);t([l.Override],c.prototype,"remove",null);t([l.NotNull],c,"of",null);t([l.NotNull],c,"subtract",null);e.IntervalSet=c}));var ve=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ATNDeserializationOptions=void 0;var r=p();var i=class{constructor(e){this.readOnly=false;if(e){this.verifyATN=e.verifyATN;this.generateRuleBypassTransitions=e.generateRuleBypassTransitions;this.optimize=e.optimize}else{this.verifyATN=true;this.generateRuleBypassTransitions=false;this.optimize=true}}static get defaultOptions(){if(i._defaultOptions==null){i._defaultOptions=new i;i._defaultOptions.makeReadOnly()}return i._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=true}get isVerifyATN(){return this.verifyATN}set isVerifyATN(e){this.throwIfReadOnly();this.verifyATN=e}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(e){this.throwIfReadOnly();this.generateRuleBypassTransitions=e}get isOptimize(){return this.optimize}set isOptimize(e){this.throwIfReadOnly();this.optimize=e}throwIfReadOnly(){if(this.isReadOnly){throw new Error("The object is read only.")}}};t([r.NotNull],i,"defaultOptions",null);e.ATNDeserializationOptions=i}));var be=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ActionTransition=void 0;var i=p();var n=b();var s=class ActionTransition extends n.Transition{constructor(e,t,r=-1,i=false){super(e);this.ruleIndex=t;this.actionIndex=r;this.isCtxDependent=i}get serializationType(){return 6}get isEpsilon(){return true}matches(e,t,r){return false}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};t([i.Override],s.prototype,"serializationType",null);t([i.Override],s.prototype,"isEpsilon",null);t([i.Override],s.prototype,"matches",null);t([i.Override],s.prototype,"toString",null);s=t([r(0,i.NotNull)],s);e.ActionTransition=s}));var xe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.AtomTransition=void 0;var i=_e();var n=p();var s=b();var o=class AtomTransition extends s.Transition{constructor(e,t){super(e);this._label=t}get serializationType(){return 5}get label(){return i.IntervalSet.of(this._label)}matches(e,t,r){return this._label===e}toString(){return String(this.label)}};t([n.Override],o.prototype,"serializationType",null);t([n.Override,n.NotNull],o.prototype,"label",null);t([n.Override],o.prototype,"matches",null);t([n.Override,n.NotNull],o.prototype,"toString",null);o=t([r(0,n.NotNull)],o);e.AtomTransition=o}));var Te=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.BlockStartState=void 0;var t=H();var r=class extends t.DecisionState{};e.BlockStartState=r}));var we=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.BasicBlockStartState=void 0;var r=_();var i=Te();var n=p();var s=class extends i.BlockStartState{get stateType(){return r.ATNStateType.BLOCK_START}};t([n.Override],s.prototype,"stateType",null);e.BasicBlockStartState=s}));var Se=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.BlockEndState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{get stateType(){return i.ATNStateType.BLOCK_END}};t([n.Override],s.prototype,"stateType",null);e.BlockEndState=s}));var Ee=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.EpsilonTransition=void 0;var i=p();var n=b();var s=class EpsilonTransition extends n.Transition{constructor(e,t=-1){super(e);this._outermostPrecedenceReturn=t}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return true}matches(e,t,r){return false}toString(){return"epsilon"}};t([i.Override],s.prototype,"serializationType",null);t([i.Override],s.prototype,"isEpsilon",null);t([i.Override],s.prototype,"matches",null);t([i.Override,i.NotNull],s.prototype,"toString",null);s=t([r(0,i.NotNull)],s);e.EpsilonTransition=s}));var Ae=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerChannelAction=void 0;var i=T();var n=p();var s=class{constructor(e){this._channel=e}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return false}execute(e){e.channel=this._channel}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);e=i.MurmurHash.update(e,this._channel);return i.MurmurHash.finish(e,2)}equals(e){if(e===this){return true}else if(!(e instanceof s)){return false}return this._channel===e._channel}toString(){return`channel(${this._channel})`}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerChannelAction=s}));var Ce=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerCustomAction=void 0;var i=T();var n=p();var s=class{constructor(e,t){this._ruleIndex=e;this._actionIndex=t}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return true}execute(e){e.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);e=i.MurmurHash.update(e,this._ruleIndex);e=i.MurmurHash.update(e,this._actionIndex);return i.MurmurHash.finish(e,3)}equals(e){if(e===this){return true}else if(!(e instanceof s)){return false}return this._ruleIndex===e._ruleIndex&&this._actionIndex===e._actionIndex}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);e.LexerCustomAction=s}));var Ne=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerModeAction=void 0;var i=T();var n=p();var s=class{constructor(e){this._mode=e}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return false}execute(e){e.mode(this._mode)}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);e=i.MurmurHash.update(e,this._mode);return i.MurmurHash.finish(e,2)}equals(e){if(e===this){return true}else if(!(e instanceof s)){return false}return this._mode===e._mode}toString(){return`mode(${this._mode})`}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerModeAction=s}));var Oe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerMoreAction=void 0;var i=T();var n=p();var s=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return false}execute(e){e.more()}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);return i.MurmurHash.finish(e,1)}equals(e){return e===this}toString(){return"more"}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerMoreAction=s;(function(e){e.INSTANCE=new e})(s=e.LexerMoreAction||(e.LexerMoreAction={}))}));var Re=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerPopModeAction=void 0;var i=T();var n=p();var s=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return false}execute(e){e.popMode()}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);return i.MurmurHash.finish(e,1)}equals(e){return e===this}toString(){return"popMode"}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerPopModeAction=s;(function(e){e.INSTANCE=new e})(s=e.LexerPopModeAction||(e.LexerPopModeAction={}))}));var ke=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerPushModeAction=void 0;var i=T();var n=p();var s=class{constructor(e){this._mode=e}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return false}execute(e){e.pushMode(this._mode)}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);e=i.MurmurHash.update(e,this._mode);return i.MurmurHash.finish(e,2)}equals(e){if(e===this){return true}else if(!(e instanceof s)){return false}return this._mode===e._mode}toString(){return`pushMode(${this._mode})`}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerPushModeAction=s}));var Pe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerSkipAction=void 0;var i=T();var n=p();var s=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return false}execute(e){e.skip()}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);return i.MurmurHash.finish(e,1)}equals(e){return e===this}toString(){return"skip"}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerSkipAction=s;(function(e){e.INSTANCE=new e})(s=e.LexerSkipAction||(e.LexerSkipAction={}))}));var Le=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerTypeAction=void 0;var i=T();var n=p();var s=class{constructor(e){this._type=e}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return false}execute(e){e.type=this._type}hashCode(){let e=i.MurmurHash.initialize();e=i.MurmurHash.update(e,this.actionType);e=i.MurmurHash.update(e,this._type);return i.MurmurHash.finish(e,2)}equals(e){if(e===this){return true}else if(!(e instanceof s)){return false}return this._type===e._type}toString(){return`type(${this._type})`}};t([n.Override],s.prototype,"actionType",null);t([n.Override],s.prototype,"isPositionDependent",null);t([n.Override,r(0,n.NotNull)],s.prototype,"execute",null);t([n.Override],s.prototype,"hashCode",null);t([n.Override],s.prototype,"equals",null);t([n.Override],s.prototype,"toString",null);e.LexerTypeAction=s}));var Ie=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.LoopEndState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{get stateType(){return i.ATNStateType.LOOP_END}};t([n.Override],s.prototype,"stateType",null);e.LoopEndState=s}));var Me=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ConflictInfo=void 0;var r=p();var i=C();var n=class{constructor(e,t){this._conflictedAlts=e;this.exact=t}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(e){if(e===this){return true}else if(!(e instanceof n)){return false}return this.isExact===e.isExact&&i.equals(this.conflictedAlts,e.conflictedAlts)}hashCode(){return this.conflictedAlts.hashCode()}};t([r.Override],n.prototype,"equals",null);t([r.Override],n.prototype,"hashCode",null);e.ConflictInfo=n}));var De=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.TerminalNode=void 0;var r=I();var i=p();var n=M();var s=class{constructor(e){this._symbol=e}getChild(e){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this._symbol}get sourceInterval(){let e=this._symbol.tokenIndex;return new r.Interval(e,e)}get childCount(){return 0}accept(e){return e.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(e){return this.toString()}toString(){if(this._symbol.type===n.Token.EOF){return"<EOF>"}return this._symbol.text||""}};t([i.Override],s.prototype,"getChild",null);t([i.Override],s.prototype,"parent",null);t([i.Override],s.prototype,"setParent",null);t([i.Override],s.prototype,"payload",null);t([i.Override],s.prototype,"sourceInterval",null);t([i.Override],s.prototype,"childCount",null);t([i.Override],s.prototype,"accept",null);t([i.Override],s.prototype,"text",null);t([i.Override],s.prototype,"toStringTree",null);t([i.Override],s.prototype,"toString",null);e.TerminalNode=s}));var Fe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ErrorNode=void 0;var r=p();var i=De();var n=class extends i.TerminalNode{constructor(e){super(e)}accept(e){return e.visitErrorNode(this)}};t([r.Override],n.prototype,"accept",null);e.ErrorNode=n}));var je=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RuleNode=void 0;var t=class{};e.RuleNode=t}));var Be=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.Trees=void 0;var i=he();var n=D();var s=Fe();var o=p();var a=zt();var l=He();var u=je();var c=De();var h=M();var d=C();var m=class{static toStringTree(e,t){let r;if(t instanceof a.Parser){r=t.ruleNames}else{r=t}let i=d.escapeWhitespace(this.getNodeText(e,r),false);if(e.childCount===0){return i}let n="";n+="(";i=d.escapeWhitespace(this.getNodeText(e,r),false);n+=i;n+=" ";for(let t=0;t<e.childCount;t++){if(t>0){n+=" "}n+=this.toStringTree(e.getChild(t),r)}n+=")";return n}static getNodeText(e,t){let r;if(t instanceof a.Parser){r=t.ruleNames}else if(t){r=t}else{let t=e.payload;if(typeof t.text==="string"){return t.text}return e.payload.toString()}if(e instanceof u.RuleNode){let t=e.ruleContext;let n=t.ruleIndex;let s=r[n];let o=t.altNumber;if(o!==i.ATN.INVALID_ALT_NUMBER){return s+":"+o}return s}else if(e instanceof s.ErrorNode){return e.toString()}else if(e instanceof c.TerminalNode){let t=e.symbol;return t.text||""}throw new TypeError("Unexpected node type")}static getChildren(e){let t=[];for(let r=0;r<e.childCount;r++){t.push(e.getChild(r))}return t}static getAncestors(e){let t=[];let r=e.parent;while(r){t.unshift(r);r=r.parent}return t}static isAncestorOf(e,t){if(!e||!t||!e.parent){return false}let r=t.parent;while(r){if(e===r){return true}r=r.parent}return false}static findAllTokenNodes(e,t){return m.findAllNodes(e,t,true)}static findAllRuleNodes(e,t){return m.findAllNodes(e,t,false)}static findAllNodes(e,t,r){let i=[];m._findAllNodes(e,t,r,i);return i}static _findAllNodes(e,t,r,i){if(r&&e instanceof c.TerminalNode){if(e.symbol.type===t){i.push(e)}}else if(!r&&e instanceof l.ParserRuleContext){if(e.ruleIndex===t){i.push(e)}}for(let n=0;n<e.childCount;n++){m._findAllNodes(e.getChild(n),t,r,i)}}static getDescendants(e){let t=[];function recurse(e){t.push(e);const r=e.childCount;for(let t=0;t<r;t++){recurse(e.getChild(t))}}recurse(e);return t}static getRootOfSubtreeEnclosingRegion(e,t,r){let i=e.childCount;for(let n=0;n<i;n++){let i=e.getChild(n);let s=m.getRootOfSubtreeEnclosingRegion(i,t,r);if(s){return s}}if(e instanceof l.ParserRuleContext){let i=e.stop;if(t>=e.start.tokenIndex&&(i==null||r<=i.tokenIndex)){return e}}return void 0}static stripChildrenOutOfRange(e,t,r,i){if(!e){return}let s=e.childCount;for(let o=0;o<s;o++){let s=e.getChild(o);let a=s.sourceInterval;if(s instanceof l.ParserRuleContext&&(a.b<r||a.a>i)){if(m.isAncestorOf(s,t)){let t=new n.CommonToken(h.Token.INVALID_TYPE,"...");e.children[o]=new c.TerminalNode(t)}}}}static findNodeSuchThat(e,t){if(t(e)){return e}let r=e.childCount;for(let i=0;i<r;i++){let r=m.findNodeSuchThat(e.getChild(i),t);if(r!==void 0){return r}}return void 0}};t([r(0,o.NotNull)],m,"toStringTree",null);t([o.NotNull,r(0,o.NotNull)],m,"getAncestors",null);t([r(0,o.NotNull)],m,"getRootOfSubtreeEnclosingRegion",null);e.Trees=m}));var Ue=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.RuleContext=void 0;var r=he();var i=J();var n=je();var s=I();var o=p();var a=Be();var l=He();var u=class extends n.RuleNode{constructor(e,t){super();this._parent=e;this.invokingState=t!=null?t:-1}static getChildContext(e,t){return new u(e,t)}depth(){let e=0;let t=this;while(t){t=t._parent;e++}return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return s.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0){return""}let e="";for(let t=0;t<this.childCount;t++){e+=this.getChild(t).text}return e.toString()}get ruleIndex(){return-1}get altNumber(){return r.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return a.Trees.toStringTree(this,e)}toString(e,t){const r=e instanceof i.Recognizer?e.ruleNames:e;t=t||l.ParserRuleContext.emptyContext();let n="";let s=this;n+="[";while(s&&s!==t){if(!r){if(!s.isEmpty){n+=s.invokingState}}else{let e=s.ruleIndex;let t=e>=0&&e<r.length?r[e]:e.toString();n+=t}if(s._parent&&(r||!s._parent.isEmpty)){n+=" "}s=s._parent}n+="]";return n.toString()}};t([o.Override],u.prototype,"sourceInterval",null);t([o.Override],u.prototype,"ruleContext",null);t([o.Override],u.prototype,"parent",null);t([o.Override],u.prototype,"setParent",null);t([o.Override],u.prototype,"payload",null);t([o.Override],u.prototype,"text",null);t([o.Override],u.prototype,"getChild",null);t([o.Override],u.prototype,"childCount",null);t([o.Override],u.prototype,"accept",null);t([o.Override],u.prototype,"toStringTree",null);e.RuleContext=u}));var He=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ParserRuleContext=void 0;var r=Fe();var i=I();var n=p();var s=Ue();var o=De();var a=class extends s.RuleContext{constructor(e,t){if(t==null){super()}else{super(e,t)}}static emptyContext(){return a.EMPTY}copyFrom(e){this._parent=e._parent;this.invokingState=e.invokingState;this._start=e._start;this._stop=e._stop;if(e.children){this.children=[];for(let t of e.children){if(t instanceof r.ErrorNode){this.addChild(t)}}}}enterRule(e){}exitRule(e){}addAnyChild(e){if(!this.children){this.children=[e]}else{this.children.push(e)}return e}addChild(e){let t;if(e instanceof o.TerminalNode){e.setParent(this);this.addAnyChild(e);return}else if(e instanceof s.RuleContext){this.addAnyChild(e);return}else{e=new o.TerminalNode(e);this.addAnyChild(e);e.setParent(this);return e}}addErrorNode(e){if(e instanceof r.ErrorNode){const t=e;t.setParent(this);return this.addAnyChild(t)}else{const t=e;let i=new r.ErrorNode(t);this.addAnyChild(i);i.setParent(this);return i}}removeLastChild(){if(this.children){this.children.pop()}}get parent(){let e=super.parent;if(e===void 0||e instanceof a){return e}throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(e,t){if(!this.children||e<0||e>=this.children.length){throw new RangeError("index parameter must be between >= 0 and <= number of children.")}if(t==null){return this.children[e]}let r=this.tryGetChild(e,t);if(r===void 0){throw new Error("The specified node does not exist")}return r}tryGetChild(e,t){if(!this.children||e<0||e>=this.children.length){return void 0}let r=-1;for(let i of this.children){if(i instanceof t){r++;if(r===e){return i}}}return void 0}getToken(e,t){let r=this.tryGetToken(e,t);if(r===void 0){throw new Error("The specified token does not exist")}return r}tryGetToken(e,t){if(!this.children||t<0||t>=this.children.length){return void 0}let r=-1;for(let i of this.children){if(i instanceof o.TerminalNode){let n=i.symbol;if(n.type===e){r++;if(r===t){return i}}}}return void 0}getTokens(e){let t=[];if(!this.children){return t}for(let r of this.children){if(r instanceof o.TerminalNode){let i=r.symbol;if(i.type===e){t.push(r)}}}return t}get ruleContext(){return this}getRuleContext(e,t){return this.getChild(e,t)}tryGetRuleContext(e,t){return this.tryGetChild(e,t)}getRuleContexts(e){let t=[];if(!this.children){return t}for(let r of this.children){if(r instanceof e){t.push(r)}}return t}get childCount(){return this.children?this.children.length:0}get sourceInterval(){if(!this._start){return i.Interval.INVALID}if(!this._stop||this._stop.tokenIndex<this._start.tokenIndex){return i.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1)}return i.Interval.of(this._start.tokenIndex,this._stop.tokenIndex)}get start(){return this._start}get stop(){return this._stop}toInfoString(e){let t=e.getRuleInvocationStack(this).reverse();return"ParserRuleContext"+t+"{start="+this._start+", stop="+this._stop+"}"}};a.EMPTY=new a;t([n.Override],a.prototype,"parent",null);t([n.Override],a.prototype,"childCount",null);t([n.Override],a.prototype,"sourceInterval",null);e.ParserRuleContext=a}));var ze=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.PredictionMode=void 0;var r=U();var i=T();var n=p();var s=ae();var o;(function(e){e[e["SLL"]=0]="SLL";e[e["LL"]=1]="LL";e[e["LL_EXACT_AMBIG_DETECTION"]=2]="LL_EXACT_AMBIG_DETECTION"})(o=e.PredictionMode||(e.PredictionMode={}));(function(e){class AltAndContextMap extends r.Array2DHashMap{constructor(){super(AltAndContextConfigEqualityComparator.INSTANCE)}}class AltAndContextConfigEqualityComparator{AltAndContextConfigEqualityComparator(){}hashCode(e){let t=i.MurmurHash.initialize(7);t=i.MurmurHash.update(t,e.state.stateNumber);t=i.MurmurHash.update(t,e.context);t=i.MurmurHash.finish(t,2);return t}equals(e,t){if(e===t){return true}if(e==null||t==null){return false}return e.state.stateNumber===t.state.stateNumber&&e.context.equals(t.context)}}AltAndContextConfigEqualityComparator.INSTANCE=new AltAndContextConfigEqualityComparator;t([n.Override],AltAndContextConfigEqualityComparator.prototype,"hashCode",null);t([n.Override],AltAndContextConfigEqualityComparator.prototype,"equals",null);function hasConfigInRuleStopState(e){for(let t of e){if(t.state instanceof s.RuleStopState){return true}}return false}e.hasConfigInRuleStopState=hasConfigInRuleStopState;function allConfigsInRuleStopStates(e){for(let t of e){if(!(t.state instanceof s.RuleStopState)){return false}}return true}e.allConfigsInRuleStopStates=allConfigsInRuleStopStates})(o=e.PredictionMode||(e.PredictionMode={}))}));var Ke=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.SimulatorState=void 0;var i=p();var n=He();var s=class SimulatorState{constructor(e,t,r,i){this.outerContext=e!=null?e:n.ParserRuleContext.emptyContext();this.s0=t;this.useContext=r;this.remainingOuterContext=i}};s=t([r(1,i.NotNull)],s);e.SimulatorState=s}));var Ve=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParserATNSimulator=void 0;var n=B();var s=be();var o=E();var a=P();var l=he();var u=V();var c=Z();var h=$();var d=_();var g=xe();var y=q();var v=Me();var b=H();var x=G();var T=L();var S=I();var A=m();var C=p();var O=oe();var R=Kt();var k=w();var D=He();var F=K();var j=z();var U=ze();var W=ae();var Y=le();var J=N();var X=se();var ee=Ke();var te=M();var re=Q();var ie=r(9491);var ne=65535;var ue=-(1<<31>>>0);var ce=class ParserATNSimulator3 extends h.ATNSimulator{constructor(e,t){super(e);this.predictionMode=U.PredictionMode.LL;this.force_global_context=false;this.always_try_local_context=true;this.enable_global_context_dfa=false;this.optimize_unique_closure=true;this.optimize_ll1=true;this.optimize_tail_calls=true;this.tail_call_preserves_sll=true;this.treat_sllk1_conflict_as_ambiguity=false;this.reportAmbiguities=false;this.userWantsCtxSensitive=true;this._parser=t}getPredictionMode(){return this.predictionMode}setPredictionMode(e){this.predictionMode=e}reset(){}adaptivePredict(e,t,r,i){if(i===void 0){i=false}let n=this.atn.decisionToDFA[t];ie(n!=null);if(this.optimize_ll1&&!n.isPrecedenceDfa&&!n.isEmpty){let r=e.LA(1);if(r>=0&&r<=65535){let e=(t<<16>>>0)+r;let i=this.atn.LL1Table.get(e);if(i!=null){return i}}}this.dfa=n;if(this.force_global_context){i=true}else if(!this.always_try_local_context){i=i||n.isContextSensitive}this.userWantsCtxSensitive=i||this.predictionMode!==U.PredictionMode.SLL&&r!=null&&!this.atn.decisionToState[t].sll;if(r==null){r=D.ParserRuleContext.emptyContext()}let s;if(!n.isEmpty){s=this.getStartState(n,e,r,i)}if(s==null){if(r==null){r=D.ParserRuleContext.emptyContext()}if(ParserATNSimulator3.debug){console.log("ATN decision "+n.decision+" exec LA(1)=="+this.getLookaheadName(e)+", outerContext="+r.toString(this._parser))}s=this.computeStartState(n,r,i)}let o=e.mark();let a=e.index;try{let t=this.execDFA(n,e,a,s);if(ParserATNSimulator3.debug){console.log("DFA after predictATN: "+n.toString(this._parser.vocabulary,this._parser.ruleNames))}return t}finally{this.dfa=void 0;e.seek(a);e.release(o)}}getStartState(e,t,r,i){if(!i){if(e.isPrecedenceDfa){let t=e.getPrecedenceStartState(this._parser.precedence,false);if(t==null){return void 0}return new ee.SimulatorState(r,t,false,r)}else{if(e.s0==null){return void 0}return new ee.SimulatorState(r,e.s0,false,r)}}if(!this.enable_global_context_dfa){return void 0}let n=r;ie(r!=null);let s;if(e.isPrecedenceDfa){s=e.getPrecedenceStartState(this._parser.precedence,true)}else{s=e.s0full}while(n!=null&&s!=null&&s.isContextSensitive){n=this.skipTailCalls(n);s=s.getContextTarget(this.getReturnState(n));if(n.isEmpty){ie(s==null||!s.isContextSensitive)}else{n=n.parent}}if(s==null){return void 0}return new ee.SimulatorState(r,s,i,n)}execDFA(e,t,r,i){let n=i.outerContext;if(ParserATNSimulator3.dfa_debug){console.log("DFA decision "+e.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+n.toString(this._parser))}if(ParserATNSimulator3.dfa_debug){console.log(e.toString(this._parser.vocabulary,this._parser.ruleNames))}let s=i.s0;let o=t.LA(1);let a=i.remainingOuterContext;while(true){if(ParserATNSimulator3.dfa_debug){console.log("DFA state "+s.stateNumber+" LA(1)=="+this.getLookaheadName(t))}if(i.useContext){while(s.isContextSymbol(o)){let n;if(a!=null){a=this.skipTailCalls(a);n=s.getContextTarget(this.getReturnState(a))}if(n==null){let n=new ee.SimulatorState(i.outerContext,s,i.useContext,a);return this.execATN(e,t,r,n)}ie(a!=null);a=a.parent;s=n}}if(this.isAcceptState(s,i.useContext)){if(s.predicates!=null){if(ParserATNSimulator3.dfa_debug){console.log("accept "+s)}}else{if(ParserATNSimulator3.dfa_debug){console.log("accept; predict "+s.prediction+" in state "+s.stateNumber)}}break}ie(!this.isAcceptState(s,i.useContext));let l=this.getExistingTargetState(s,o);if(l==null){if(ParserATNSimulator3.dfa_debug&&o>=0){console.log("no edge for "+this._parser.vocabulary.getDisplayName(o))}let l;if(ParserATNSimulator3.dfa_debug){let e=S.Interval.of(r,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(e)+" at DFA state "+s.stateNumber)}let u=new ee.SimulatorState(n,s,i.useContext,a);l=this.execATN(e,t,r,u);if(ParserATNSimulator3.dfa_debug){console.log("back from DFA update, alt="+l+", dfa=\n"+e.toString(this._parser.vocabulary,this._parser.ruleNames))}if(ParserATNSimulator3.dfa_debug){console.log("DFA decision "+e.decision+" predicts "+l)}return l}else if(l===h.ATNSimulator.ERROR){let e=new ee.SimulatorState(n,s,i.useContext,a);return this.handleNoViableAlt(t,r,e)}s=l;if(!this.isAcceptState(s,i.useContext)&&o!==A.IntStream.EOF){t.consume();o=t.LA(1)}}if(!i.useContext&&s.configs.conflictInfo!=null){if(e.atnStartState instanceof b.DecisionState){if(!this.userWantsCtxSensitive||!s.configs.dipsIntoOuterContext&&s.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&t.index===r){}else{ie(!i.useContext);let o;let l=s.predicates;if(l!=null){let e=t.index;if(e!==r){t.seek(r)}o=this.evalSemanticContext(l,n,true);if(o.cardinality()===1){return o.nextSetBit(0)}if(e!==r){t.seek(e)}}if(this.reportAmbiguities){let l=new ee.SimulatorState(n,s,i.useContext,a);this.reportAttemptingFullContext(e,o,l,r,t.index)}t.seek(r);return this.adaptivePredict(t,e.decision,n,true)}}}let l=s.predicates;if(l!=null){let i=t.index;if(r!==i){t.seek(r)}let o=this.evalSemanticContext(l,n,this.reportAmbiguities&&this.predictionMode===U.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(o.cardinality()){case 0:throw this.noViableAlt(t,n,s.configs,r);case 1:return o.nextSetBit(0);default:if(r!==i){t.seek(i)}this.reportAmbiguity(e,s,r,i,s.configs.isExactConflict,o,s.configs);return o.nextSetBit(0)}}if(ParserATNSimulator3.dfa_debug){console.log("DFA decision "+e.decision+" predicts "+s.prediction)}return s.prediction}isAcceptState(e,t){if(!e.isAcceptState){return false}if(e.configs.conflictingAlts==null){return true}if(t&&this.predictionMode===U.PredictionMode.LL_EXACT_AMBIG_DETECTION){return e.configs.isExactConflict}return true}execATN(e,t,r,i){if(ParserATNSimulator3.debug){console.log("execATN decision "+e.decision+" exec LA(1)=="+this.getLookaheadName(t))}let n=i.outerContext;let s=i.useContext;let o=t.LA(1);let a=i;let u=new j.PredictionContextCache;while(true){let i=this.computeReachSet(e,a,o,u);if(i==null){this.setDFAEdge(a.s0,t.LA(1),h.ATNSimulator.ERROR);return this.handleNoViableAlt(t,r,a)}let c=i.s0;ie(c.isAcceptState||c.prediction===l.ATN.INVALID_ALT_NUMBER);ie(c.isAcceptState||c.configs.conflictInfo==null);if(this.isAcceptState(c,s)){let a=c.configs.conflictingAlts;let u=a==null?c.prediction:l.ATN.INVALID_ALT_NUMBER;if(u!==l.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&t.index===r&&!e.isPrecedenceDfa&&i.outerContext===i.remainingOuterContext&&e.decision>=0&&!c.configs.hasSemanticContext){if(o>=0&&o<=ne){let t=(e.decision<<16>>>0)+o;this.atn.LL1Table.set(t,u)}}if(s&&this.always_try_local_context){this.reportContextSensitivity(e,u,i,r,t.index)}}u=c.prediction;let h=a!=null&&this.userWantsCtxSensitive;if(h){h=!s&&(c.configs.dipsIntoOuterContext||!c.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||t.index!==r)}if(c.configs.hasSemanticContext){let e=c.predicates;if(e!=null){let i=t.index;if(i!==r){t.seek(r)}a=this.evalSemanticContext(e,n,h||this.reportAmbiguities);switch(a.cardinality()){case 0:throw this.noViableAlt(t,n,c.configs,r);case 1:return a.nextSetBit(0);default:break}if(i!==r){t.seek(i)}}}if(!h){if(a!=null){if(this.reportAmbiguities&&a.cardinality()>1){this.reportAmbiguity(e,c,r,t.index,c.configs.isExactConflict,a,c.configs)}u=a.nextSetBit(0)}return u}else{ie(!s);ie(this.isAcceptState(c,false));if(ParserATNSimulator3.debug){console.log("RETRY with outerContext="+n)}let o=this.computeStartState(e,n,true);if(this.reportAmbiguities){this.reportAttemptingFullContext(e,a,i,r,t.index)}t.seek(r);return this.execATN(e,t,r,o)}}a=i;if(o!==A.IntStream.EOF){t.consume();o=t.LA(1)}}}handleNoViableAlt(e,t,r){if(r.s0!=null){let i=new y.BitSet;let n=0;for(let e of r.s0.configs){if(e.reachesIntoOuterContext||e.state instanceof W.RuleStopState){i.set(e.alt);n=Math.max(n,e.alt)}}switch(i.cardinality()){case 0:break;case 1:return i.nextSetBit(0);default:if(!r.s0.configs.hasSemanticContext){return i.nextSetBit(0)}let s=new c.ATNConfigSet;for(let e of r.s0.configs){if(e.reachesIntoOuterContext||e.state instanceof W.RuleStopState){s.add(e)}}let o=this.getPredsForAmbigAlts(i,s,n);if(o!=null){let n=this.getPredicatePredictions(i,o);if(n!=null){let i=e.index;try{e.seek(t);let s=this.evalSemanticContext(n,r.outerContext,false);if(!s.isEmpty){return s.nextSetBit(0)}}finally{e.seek(i)}}}return i.nextSetBit(0)}}throw this.noViableAlt(e,r.outerContext,r.s0.configs,t)}computeReachSet(e,t,r,i){let n=t.useContext;let s=t.remainingOuterContext;let o=t.s0;if(n){while(o.isContextSymbol(r)){let e;if(s!=null){s=this.skipTailCalls(s);e=o.getContextTarget(this.getReturnState(s))}if(e==null){break}ie(s!=null);s=s.parent;o=e}}ie(!this.isAcceptState(o,n));if(this.isAcceptState(o,n)){return new ee.SimulatorState(t.outerContext,o,n,s)}let a=o;let l=this.getExistingTargetState(a,r);if(l==null){let t=this.computeTargetState(e,a,s,r,n,i);l=t[0];s=t[1]}if(l===h.ATNSimulator.ERROR){return void 0}ie(!n||!l.configs.dipsIntoOuterContext);return new ee.SimulatorState(t.outerContext,l,n,s)}getExistingTargetState(e,t){return e.getTarget(t)}computeTargetState(e,t,r,i,n,s){let o=t.configs.toArray();let a;let u=new c.ATNConfigSet;let d;do{let e=!n||r!=null;if(!e){u.isOutermostConfigSet=true}let t=new c.ATNConfigSet;let h;for(let e of o){if(ParserATNSimulator3.debug){console.log("testing "+this.getTokenName(i)+" at "+e.toString())}if(e.state instanceof W.RuleStopState){ie(e.context.isEmpty);if(n&&!e.reachesIntoOuterContext||i===A.IntStream.EOF){if(h==null){h=[]}h.push(e)}continue}let r=e.state.numberOfOptimizedTransitions;for(let n=0;n<r;n++){let r=e.state.getOptimizedTransition(n);let o=this.getReachableTarget(e,r,i);if(o!=null){t.add(e.transform(o,false),s)}}}if(this.optimize_unique_closure&&h==null&&i!==te.Token.EOF&&t.uniqueAlt!==l.ATN.INVALID_ALT_NUMBER){t.isOutermostConfigSet=u.isOutermostConfigSet;u=t;break}let p=false;let m=i===te.Token.EOF;this.closure(t,u,p,e,s,m);d=u.dipsIntoOuterContext;if(i===A.IntStream.EOF){u=this.removeAllConfigsNotInRuleStopState(u,s)}if(h!=null&&(!n||!U.PredictionMode.hasConfigInRuleStopState(u))){ie(h.length>0);for(let e of h){u.add(e,s)}}if(n&&d){u.clear();r=r;r=this.skipTailCalls(r);let e=this.getReturnState(r);if(a==null){a=new T.IntegerList}if(r.isEmpty){r=void 0}else{r=r.parent}a.add(e);if(e!==F.PredictionContext.EMPTY_FULL_STATE_KEY){for(let t=0;t<o.length;t++){o[t]=o[t].appendContext(e,s)}}}}while(n&&d);if(u.isEmpty){this.setDFAEdge(t,i,h.ATNSimulator.ERROR);return[h.ATNSimulator.ERROR,r]}let p=this.addDFAEdge(e,t,i,a,u,s);return[p,r]}removeAllConfigsNotInRuleStopState(e,t){if(U.PredictionMode.allConfigsInRuleStopStates(e)){return e}let r=new c.ATNConfigSet;for(let i of e){if(!(i.state instanceof W.RuleStopState)){continue}r.add(i,t)}return r}computeStartState(e,t,r){let i=e.isPrecedenceDfa?e.getPrecedenceStartState(this._parser.precedence,r):r?e.s0full:e.s0;if(i!=null){if(!r){return new ee.SimulatorState(t,i,r,t)}i.setContextSensitive(this.atn)}let n=e.decision;let s=e.atnStartState;let o=0;let a=t;let l=r?F.PredictionContext.EMPTY_FULL:F.PredictionContext.EMPTY_LOCAL;let h=new j.PredictionContextCache;if(r){if(!this.enable_global_context_dfa){while(a!=null){if(a.isEmpty){o=F.PredictionContext.EMPTY_FULL_STATE_KEY;a=void 0}else{o=this.getReturnState(a);l=l.appendSingleContext(o,h);a=a.parent}}}while(i!=null&&i.isContextSensitive&&a!=null){let e;a=this.skipTailCalls(a);if(a.isEmpty){e=i.getContextTarget(F.PredictionContext.EMPTY_FULL_STATE_KEY);o=F.PredictionContext.EMPTY_FULL_STATE_KEY;a=void 0}else{o=this.getReturnState(a);e=i.getContextTarget(o);l=l.appendSingleContext(o,h);a=a.parent}if(e==null){break}i=e}}if(i!=null&&!i.isContextSensitive){return new ee.SimulatorState(t,i,r,a)}let d=new c.ATNConfigSet;while(true){let n=new c.ATNConfigSet;let p=s.numberOfTransitions;for(let e=0;e<p;e++){let t=s.transition(e).target;n.add(u.ATNConfig.create(t,e+1,l))}let m=a!=null;if(!m){d.isOutermostConfigSet=true}let g=true;this.closure(n,d,g,m,h,false);let y=d.dipsIntoOuterContext;let _;if(r&&!this.enable_global_context_dfa){i=this.addDFAState(e,d,h);break}else if(i==null){if(!e.isPrecedenceDfa){_=this.addDFAState(e,d,h);if(r){if(!e.s0full){e.s0full=_}else{_=e.s0full}}else{if(!e.s0){e.s0=_}else{_=e.s0}}}else{d=this.applyPrecedenceFilter(d,t,h);_=this.addDFAState(e,d,h);e.setPrecedenceStartState(this._parser.precedence,r,_)}}else{if(e.isPrecedenceDfa){d=this.applyPrecedenceFilter(d,t,h)}_=this.addDFAState(e,d,h);i.setContextTarget(o,_)}i=_;if(!r||!y){break}_.setContextSensitive(this.atn);a=a;d.clear();a=this.skipTailCalls(a);let v=this.getReturnState(a);if(a.isEmpty){a=void 0}else{a=a.parent}if(v!==F.PredictionContext.EMPTY_FULL_STATE_KEY){l=l.appendSingleContext(v,h)}o=v}return new ee.SimulatorState(t,i,r,a)}applyPrecedenceFilter(e,t,r){let i=new Map;let n=new c.ATNConfigSet;for(let s of e){if(s.alt!==1){continue}let e=s.semanticContext.evalPrecedence(this._parser,t);if(e==null){continue}i.set(s.state.stateNumber,s.context);if(e!==s.semanticContext){n.add(s.transform(s.state,false,e),r)}else{n.add(s,r)}}for(let t of e){if(t.alt===1){continue}if(!t.isPrecedenceFilterSuppressed){let e=i.get(t.state.stateNumber);if(e!=null&&e.equals(t.context)){continue}}n.add(t,r)}return n}getReachableTarget(e,t,r){if(t.matches(r,0,this.atn.maxTokenType)){return t.target}return void 0}predicateDFAState(e,t,r){let i=this.getConflictingAltsFromConfigSet(t);if(!i){throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.")}if(ParserATNSimulator3.debug){console.log("predicateDFAState "+e)}let n=this.getPredsForAmbigAlts(i,t,r);let s;if(n!=null){s=this.getPredicatePredictions(i,n);e.predicates=s}return s}getPredsForAmbigAlts(e,t,r){let i=new Array(r+1);let n=i.length;for(let r of t){if(e.get(r.alt)){i[r.alt]=J.SemanticContext.or(i[r.alt],r.semanticContext)}}let s=0;for(let e=0;e<n;e++){if(i[e]==null){i[e]=J.SemanticContext.NONE}else if(i[e]!==J.SemanticContext.NONE){s++}}let o=i;if(s===0){o=void 0}if(ParserATNSimulator3.debug){console.log("getPredsForAmbigAlts result "+(o?a.Arrays.toString(o):"undefined"))}return o}getPredicatePredictions(e,t){let r=[];let i=false;for(let n=1;n<t.length;n++){let s=t[n];ie(s!=null);if(e!=null&&e.get(n)&&s===J.SemanticContext.NONE){r.push(new x.DFAState.PredPrediction(s,n))}else if(s!==J.SemanticContext.NONE){i=true;r.push(new x.DFAState.PredPrediction(s,n))}}if(!i){return void 0}return r}evalSemanticContext(e,t,r){let i=new y.BitSet;for(let n of e){if(n.pred===J.SemanticContext.NONE){i.set(n.alt);if(!r){break}continue}let e=this.evalSemanticContextImpl(n.pred,t,n.alt);if(ParserATNSimulator3.debug||ParserATNSimulator3.dfa_debug){console.log("eval pred "+n+"="+e)}if(e){if(ParserATNSimulator3.debug||ParserATNSimulator3.dfa_debug){console.log("PREDICT "+n.alt)}i.set(n.alt);if(!r){break}}}return i}evalSemanticContextImpl(e,t,r){return e.eval(this._parser,t)}closure(e,t,r,i,n,s){if(n==null){n=j.PredictionContextCache.UNCACHED}let a=e;let l=new o.Array2DHashSet(k.ObjectEqualityComparator.INSTANCE);while(a.size>0){let e=new c.ATNConfigSet;for(let o of a){this.closureImpl(o,t,e,l,r,i,n,0,s)}a=e}}closureImpl(e,t,r,i,n,o,a,l,c){if(ParserATNSimulator3.debug){console.log("closure("+e.toString(this._parser,true)+")")}if(e.state instanceof W.RuleStopState){if(!e.context.isEmpty){let s=e.context.hasEmpty;let h=e.context.size-(s?1:0);for(let s=0;s<h;s++){let h=e.context.getParent(s);let d=this.atn.states[e.context.getReturnState(s)];let p=u.ATNConfig.create(d,e.alt,h,e.semanticContext);p.outerContextDepth=e.outerContextDepth;p.isPrecedenceFilterSuppressed=e.isPrecedenceFilterSuppressed;ie(l>ue);this.closureImpl(p,t,r,i,n,o,a,l-1,c)}if(!s||!o){return}e=e.transform(e.state,false,F.PredictionContext.EMPTY_LOCAL)}else if(!o){t.add(e,a);return}else{if(ParserATNSimulator3.debug){console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex))}if(e.context===F.PredictionContext.EMPTY_FULL){e=e.transform(e.state,false,F.PredictionContext.EMPTY_LOCAL)}else if(!e.reachesIntoOuterContext&&F.PredictionContext.isEmptyLocal(e.context)){t.add(e,a)}}}let h=e.state;if(!h.onlyHasEpsilonTransitions){t.add(e,a);if(ParserATNSimulator3.debug){console.log("added config "+t)}}for(let u=0;u<h.numberOfOptimizedTransitions;u++){if(u===0&&h.stateType===d.ATNStateType.STAR_LOOP_ENTRY&&h.precedenceRuleDecision&&!e.context.hasEmpty){let t=h;let r=true;for(let i=0;i<e.context.size;i++){if(!t.precedenceLoopbackStates.get(e.context.getReturnState(i))){r=false;break}}if(r){continue}}let p=h.getOptimizedTransition(u);let m=!(p instanceof s.ActionTransition)&&n;let g=this.getEpsilonTarget(e,p,m,l===0,a,c);if(g!=null){if(p instanceof Y.RuleTransition){if(r!=null&&!n){r.add(g,a);continue}}let s=l;if(e.state instanceof W.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa){let e=p.outermostPrecedenceReturn;if(e===this.dfa.atnStartState.ruleIndex){g.isPrecedenceFilterSuppressed=true}}g.outerContextDepth=g.outerContextDepth+1;if(!i.add(g)){continue}ie(s>ue);s--;if(ParserATNSimulator3.debug){console.log("dips into outer ctx: "+g)}}else if(p instanceof Y.RuleTransition){if(this.optimize_tail_calls&&p.optimizedTailCall&&(!this.tail_call_preserves_sll||!F.PredictionContext.isEmptyLocal(e.context))){ie(g.context===e.context);if(s===0){s--;if(!this.tail_call_preserves_sll&&F.PredictionContext.isEmptyLocal(e.context)){g.outerContextDepth=g.outerContextDepth+1}}}else{if(s>=0){s++}}}else{if(!p.isEpsilon&&!i.add(g)){continue}}this.closureImpl(g,t,r,i,m,o,a,s,c)}}}getRuleName(e){if(this._parser!=null&&e>=0){return this._parser.ruleNames[e]}return"<rule "+e+">"}getEpsilonTarget(e,t,r,i,n,s){switch(t.serializationType){case 3:return this.ruleTransition(e,t,n);case 10:return this.precedenceTransition(e,t,r,i);case 4:return this.predTransition(e,t,r,i);case 6:return this.actionTransition(e,t);case 1:return e.transform(t.target,false);case 5:case 2:case 7:if(s){if(t.matches(te.Token.EOF,0,1)){return e.transform(t.target,false)}}return void 0;default:return void 0}}actionTransition(e,t){if(ParserATNSimulator3.debug){console.log("ACTION edge "+t.ruleIndex+":"+t.actionIndex)}return e.transform(t.target,false)}precedenceTransition(e,t,r,i){if(ParserATNSimulator3.debug){console.log("PRED (collectPredicates="+r+") "+t.precedence+">=_p, ctx dependent=true");if(this._parser!=null){console.log("context surrounding pred is "+this._parser.getRuleInvocationStack())}}let n;if(r&&i){let r=J.SemanticContext.and(e.semanticContext,t.predicate);n=e.transform(t.target,false,r)}else{n=e.transform(t.target,false)}if(ParserATNSimulator3.debug){console.log("config from pred transition="+n)}return n}predTransition(e,t,r,i){if(ParserATNSimulator3.debug){console.log("PRED (collectPredicates="+r+") "+t.ruleIndex+":"+t.predIndex+", ctx dependent="+t.isCtxDependent);if(this._parser!=null){console.log("context surrounding pred is "+this._parser.getRuleInvocationStack())}}let n;if(r&&(!t.isCtxDependent||t.isCtxDependent&&i)){let r=J.SemanticContext.and(e.semanticContext,t.predicate);n=e.transform(t.target,false,r)}else{n=e.transform(t.target,false)}if(ParserATNSimulator3.debug){console.log("config from pred transition="+n)}return n}ruleTransition(e,t,r){if(ParserATNSimulator3.debug){console.log("CALL rule "+this.getRuleName(t.target.ruleIndex)+", ctx="+e.context)}let i=t.followState;let n;if(this.optimize_tail_calls&&t.optimizedTailCall&&(!this.tail_call_preserves_sll||!F.PredictionContext.isEmptyLocal(e.context))){n=e.context}else if(r!=null){n=r.getChild(e.context,i.stateNumber)}else{n=e.context.getChild(i.stateNumber)}return e.transform(t.target,false,n)}isConflicted(e,t){if(e.uniqueAlt!==l.ATN.INVALID_ALT_NUMBER||e.size<=1){return void 0}let r=e.toArray();r.sort(ParserATNSimulator3.STATE_ALT_SORT_COMPARATOR);let i=!e.dipsIntoOuterContext;let n=new y.BitSet;let s=r[0].alt;n.set(s);let o=r[0].state.nonStopStateNumber;for(let e of r){let t=e.state.nonStopStateNumber;if(t!==o){if(e.alt!==s){return void 0}o=t}}let a;if(i){o=r[0].state.nonStopStateNumber;a=new y.BitSet;let e=s;for(let t of r){if(t.state.nonStopStateNumber!==o){break}let r=t.alt;a.set(r);e=r}o=r[0].state.nonStopStateNumber;let t=s;for(let n of r){let r=n.state.nonStopStateNumber;let l=n.alt;if(r!==o){if(t!==e){i=false;break}o=r;t=s}else if(l!==t){if(l!==a.nextSetBit(t+1)){i=false;break}t=l}}}o=r[0].state.nonStopStateNumber;let u=0;let c=0;let h=r[0].context;for(let e=1;e<r.length;e++){let i=r[e];if(i.alt!==s){break}if(i.state.nonStopStateNumber!==o){break}c=e;h=t.join(h,r[e].context)}for(let e=c+1;e<r.length;e++){let a=r[e];let l=a.state;n.set(a.alt);if(l.nonStopStateNumber!==o){o=l.nonStopStateNumber;u=e;c=e;h=a.context;for(let e=u+1;e<r.length;e++){let i=r[e];if(i.alt!==s){break}if(i.state.nonStopStateNumber!==o){break}c=e;h=t.join(h,i.context)}e=c;continue}let d=a.context;let p=a.alt;let m=e;for(let e=m+1;e<r.length;e++){let i=r[e];if(i.alt!==p){break}if(i.state.nonStopStateNumber!==o){break}m=e;d=t.join(d,i.context)}e=m;let g=t.join(h,d);if(!h.equals(g)){return void 0}i=i&&h.equals(d)}return new v.ConflictInfo(n,i)}getConflictingAltsFromConfigSet(e){let t=e.conflictingAlts;if(t==null&&e.uniqueAlt!==l.ATN.INVALID_ALT_NUMBER){t=new y.BitSet;t.set(e.uniqueAlt)}return t}getTokenName(e){if(e===te.Token.EOF){return"EOF"}let t=this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY;let r=t.getDisplayName(e);if(r===String(e)){return r}return r+"<"+e+">"}getLookaheadName(e){return this.getTokenName(e.LA(1))}dumpDeadEndConfigs(e){console.log("dead end configs: ");let t=e.deadEndConfigs;if(!t){return}for(let e of t){let t="no edges";if(e.state.numberOfOptimizedTransitions>0){let r=e.state.getOptimizedTransition(0);if(r instanceof g.AtomTransition){t="Atom "+this.getTokenName(r._label)}else if(r instanceof X.SetTransition){let e=r instanceof O.NotSetTransition;t=(e?"~":"")+"Set "+r.set.toString()}}console.log(e.toString(this._parser,true)+":"+t)}}noViableAlt(e,t,r,i){return new R.NoViableAltException(this._parser,e,e.get(i),e.LT(1),r,t)}getUniqueAlt(e){let t=l.ATN.INVALID_ALT_NUMBER;for(let r of e){if(t===l.ATN.INVALID_ALT_NUMBER){t=r.alt}else if(r.alt!==t){return l.ATN.INVALID_ALT_NUMBER}}return t}configWithAltAtStopState(e,t){for(let r of e){if(r.alt===t){if(r.state instanceof W.RuleStopState){return true}}}return false}addDFAEdge(e,t,r,i,n,s){ie(i==null||i.isEmpty||e.isContextSensitive);let o=t;let a=this.addDFAState(e,n,s);if(i!=null){for(let t of i.toArray()){if(t===F.PredictionContext.EMPTY_FULL_STATE_KEY){if(o.configs.isOutermostConfigSet){continue}}o.setContextSensitive(this.atn);o.setContextSymbol(r);let i=o.getContextTarget(t);if(i!=null){o=i;continue}i=this.addDFAContextState(e,o.configs,t,s);ie(t!==F.PredictionContext.EMPTY_FULL_STATE_KEY||i.configs.isOutermostConfigSet);o.setContextTarget(t,i);o=i}}if(ParserATNSimulator3.debug){console.log("EDGE "+o+" -> "+a+" upon "+this.getTokenName(r))}this.setDFAEdge(o,r,a);if(ParserATNSimulator3.debug){console.log("DFA=\n"+e.toString(this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0))}return a}setDFAEdge(e,t,r){if(e!=null){e.setTarget(t,r)}}addDFAContextState(e,t,r,i){if(r!==F.PredictionContext.EMPTY_FULL_STATE_KEY){let n=new c.ATNConfigSet;for(let e of t){n.add(e.appendContext(r,i))}return this.addDFAState(e,n,i)}else{ie(!t.isOutermostConfigSet,"Shouldn't be adding a duplicate edge.");t=t.clone(true);t.isOutermostConfigSet=true;return this.addDFAState(e,t,i)}}addDFAState(e,t,r){let i=this.enable_global_context_dfa||!t.isOutermostConfigSet;if(i){if(!t.isReadOnly){t.optimizeConfigs(this)}let r=this.createDFAState(e,t);let i=e.states.get(r);if(i!=null){return i}}if(!t.isReadOnly){if(t.conflictInfo==null){t.conflictInfo=this.isConflicted(t,r)}}let s=this.createDFAState(e,t.clone(true));let o=this.atn.getDecisionState(e.decision);let a=this.getUniqueAlt(t);if(a!==l.ATN.INVALID_ALT_NUMBER){s.acceptStateInfo=new n.AcceptStateInfo(a)}else if(t.conflictingAlts!=null){let e=t.conflictingAlts;if(e){s.acceptStateInfo=new n.AcceptStateInfo(e.nextSetBit(0))}}if(s.isAcceptState&&t.hasSemanticContext){this.predicateDFAState(s,t,o.numberOfTransitions)}if(!i){return s}let u=e.addState(s);if(ParserATNSimulator3.debug&&u===s){console.log("adding new DFA state: "+s)}return u}createDFAState(e,t){return new x.DFAState(t)}reportAttemptingFullContext(e,t,r,i,n){if(ParserATNSimulator3.debug||ParserATNSimulator3.retry_debug){let t=S.Interval.of(i,n);console.log("reportAttemptingFullContext decision="+e.decision+":"+r.s0.configs+", input="+this._parser.inputStream.getText(t))}if(this._parser!=null){let s=this._parser.getErrorListenerDispatch();if(s.reportAttemptingFullContext){s.reportAttemptingFullContext(this._parser,e,i,n,t,r)}}}reportContextSensitivity(e,t,r,i,n){if(ParserATNSimulator3.debug||ParserATNSimulator3.retry_debug){let t=S.Interval.of(i,n);console.log("reportContextSensitivity decision="+e.decision+":"+r.s0.configs+", input="+this._parser.inputStream.getText(t))}if(this._parser!=null){let s=this._parser.getErrorListenerDispatch();if(s.reportContextSensitivity){s.reportContextSensitivity(this._parser,e,i,n,t,r)}}}reportAmbiguity(e,t,r,i,n,s,o){if(ParserATNSimulator3.debug||ParserATNSimulator3.retry_debug){let e=S.Interval.of(r,i);console.log("reportAmbiguity "+s+":"+o+", input="+this._parser.inputStream.getText(e))}if(this._parser!=null){let t=this._parser.getErrorListenerDispatch();if(t.reportAmbiguity){t.reportAmbiguity(this._parser,e,r,i,n,s,o)}}}getReturnState(e){if(e.isEmpty){return F.PredictionContext.EMPTY_FULL_STATE_KEY}let t=this.atn.states[e.invokingState];let r=t.transition(0);return r.followState.stateNumber}skipTailCalls(e){if(!this.optimize_tail_calls){return e}while(!e.isEmpty){let t=this.atn.states[e.invokingState];ie(t.numberOfTransitions===1&&t.transition(0).serializationType===3);let r=t.transition(0);if(!r.tailCall){break}e=e.parent}return e}get parser(){return this._parser}};ce.debug=false;ce.dfa_debug=false;ce.retry_debug=false;ce.STATE_ALT_SORT_COMPARATOR=(e,t)=>{let r=e.state.nonStopStateNumber-t.state.nonStopStateNumber;if(r!==0){return r}r=e.alt-t.alt;if(r!==0){return r}return 0};t([C.NotNull],ce.prototype,"predictionMode",void 0);t([C.NotNull],ce.prototype,"getPredictionMode",null);t([i(0,C.NotNull)],ce.prototype,"setPredictionMode",null);t([C.Override],ce.prototype,"reset",null);t([i(0,C.NotNull)],ce.prototype,"adaptivePredict",null);t([i(0,C.NotNull),i(1,C.NotNull),i(2,C.NotNull)],ce.prototype,"getStartState",null);t([i(0,C.NotNull),i(1,C.NotNull),i(3,C.NotNull)],ce.prototype,"execDFA",null);t([i(0,C.NotNull),i(1,C.NotNull),i(3,C.NotNull)],ce.prototype,"execATN",null);t([i(0,C.NotNull),i(2,C.NotNull)],ce.prototype,"handleNoViableAlt",null);t([i(0,C.NotNull)],ce.prototype,"getExistingTargetState",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"computeTargetState",null);t([C.NotNull,i(0,C.NotNull)],ce.prototype,"removeAllConfigsNotInRuleStopState",null);t([C.NotNull],ce.prototype,"computeStartState",null);t([C.NotNull,i(0,C.NotNull)],ce.prototype,"applyPrecedenceFilter",null);t([i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"getReachableTarget",null);t([i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"getPredsForAmbigAlts",null);t([i(0,C.NotNull)],ce.prototype,"evalSemanticContext",null);t([i(0,C.NotNull)],ce.prototype,"evalSemanticContextImpl",null);t([i(1,C.NotNull),i(4,C.Nullable)],ce.prototype,"closure",null);t([i(0,C.NotNull),i(1,C.NotNull),i(2,C.Nullable),i(3,C.NotNull),i(6,C.NotNull)],ce.prototype,"closureImpl",null);t([C.NotNull],ce.prototype,"getRuleName",null);t([i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"getEpsilonTarget",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"actionTransition",null);t([C.Nullable,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"precedenceTransition",null);t([C.Nullable,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"predTransition",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull),i(2,C.Nullable)],ce.prototype,"ruleTransition",null);t([i(0,C.NotNull)],ce.prototype,"isConflicted",null);t([C.NotNull],ce.prototype,"getTokenName",null);t([i(0,C.NotNull)],ce.prototype,"dumpDeadEndConfigs",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull),i(2,C.NotNull)],ce.prototype,"noViableAlt",null);t([i(0,C.NotNull)],ce.prototype,"getUniqueAlt",null);t([i(0,C.NotNull)],ce.prototype,"configWithAltAtStopState",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull),i(4,C.NotNull)],ce.prototype,"addDFAEdge",null);t([i(0,C.Nullable),i(2,C.Nullable)],ce.prototype,"setDFAEdge",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"addDFAContextState",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"addDFAState",null);t([C.NotNull,i(0,C.NotNull),i(1,C.NotNull)],ce.prototype,"createDFAState",null);t([i(0,C.NotNull),i(2,C.NotNull)],ce.prototype,"reportAttemptingFullContext",null);t([i(0,C.NotNull),i(2,C.NotNull)],ce.prototype,"reportContextSensitivity",null);t([i(0,C.NotNull),i(5,C.NotNull),i(6,C.NotNull)],ce.prototype,"reportAmbiguity",null);ce=t([i(0,C.NotNull)],ce);e.ParserATNSimulator=ce}));var qe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.PlusBlockStartState=void 0;var r=_();var i=Te();var n=p();var s=class extends i.BlockStartState{get stateType(){return r.ATNStateType.PLUS_BLOCK_START}};t([n.Override],s.prototype,"stateType",null);e.PlusBlockStartState=s}));var Ze=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.PlusLoopbackState=void 0;var r=_();var i=H();var n=p();var s=class extends i.DecisionState{get stateType(){return r.ATNStateType.PLUS_LOOP_BACK}};t([n.Override],s.prototype,"stateType",null);e.PlusLoopbackState=s}));var Ge=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.PrecedencePredicateTransition=void 0;var i=x();var n=p();var s=N();var o=class PrecedencePredicateTransition extends i.AbstractPredicateTransition{constructor(e,t){super(e);this.precedence=t}get serializationType(){return 10}get isEpsilon(){return true}matches(e,t,r){return false}get predicate(){return new s.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};t([n.Override],o.prototype,"serializationType",null);t([n.Override],o.prototype,"isEpsilon",null);t([n.Override],o.prototype,"matches",null);t([n.Override],o.prototype,"toString",null);o=t([r(0,n.NotNull)],o);e.PrecedencePredicateTransition=o}));var $e=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.RangeTransition=void 0;var i=_e();var n=p();var s=b();var o=class RangeTransition extends s.Transition{constructor(e,t,r){super(e);this.from=t;this.to=r}get serializationType(){return 2}get label(){return i.IntervalSet.of(this.from,this.to)}matches(e,t,r){return e>=this.from&&e<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};t([n.Override],o.prototype,"serializationType",null);t([n.Override,n.NotNull],o.prototype,"label",null);t([n.Override],o.prototype,"matches",null);t([n.Override,n.NotNull],o.prototype,"toString",null);o=t([r(0,n.NotNull)],o);e.RangeTransition=o}));var We=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.RuleStartState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{constructor(){super(...arguments);this.isPrecedenceRule=false;this.leftFactored=false}get stateType(){return i.ATNStateType.RULE_START}};t([n.Override],s.prototype,"stateType",null);e.RuleStartState=s}));var Ye=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.StarBlockStartState=void 0;var r=_();var i=Te();var n=p();var s=class extends i.BlockStartState{get stateType(){return r.ATNStateType.STAR_BLOCK_START}};t([n.Override],s.prototype,"stateType",null);e.StarBlockStartState=s}));var Je=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.StarLoopbackState=void 0;var r=y();var i=_();var n=p();var s=class extends r.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return i.ATNStateType.STAR_LOOP_BACK}};t([n.Override],s.prototype,"stateType",null);e.StarLoopbackState=s}));var Qe=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.TokensStartState=void 0;var r=_();var i=H();var n=p();var s=class extends i.DecisionState{get stateType(){return r.ATNStateType.TOKEN_START}};t([n.Override],s.prototype,"stateType",null);e.TokensStartState=s}));var Xe=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.UUID=void 0;var t=T();var r=class{constructor(e,t,r,i){this.data=new Uint32Array(4);this.data[0]=e;this.data[1]=t;this.data[2]=r;this.data[3]=i}static fromString(e){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(e)){throw new Error("Incorrectly formatted UUID")}let t=e.split("-");let i=parseInt(t[0],16);let n=(parseInt(t[1],16)<<16>>>0)+parseInt(t[2],16);let s=(parseInt(t[3],16)<<16>>>0)+parseInt(t[4].substr(0,4),16);let o=parseInt(t[4].substr(-8),16);return new r(i,n,s,o)}hashCode(){return t.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(e){if(e===this){return true}else if(!(e instanceof r)){return false}return this.data[0]===e.data[0]&&this.data[1]===e.data[1]&&this.data[2]===e.data[2]&&this.data[3]===e.data[3]}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};e.UUID=r}));var et=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ATNDeserializer=void 0;var i=be();var n=E();var s=he();var o=ve();var a=_();var l=xe();var u=we();var c=ie();var h=q();var d=Se();var m=Te();var g=H();var y=re();var v=Ee();var b=_e();var x=ne();var T=Ae();var w=Ce();var S=Ne();var A=Oe();var C=Re();var N=ke();var R=Pe();var k=Le();var P=Ie();var L=p();var I=oe();var D=Ve();var F=qe();var j=Ze();var B=Ge();var U=O();var z=$e();var K=We();var V=ae();var Z=le();var G=se();var $=Ye();var W=Je();var Y=te();var J=M();var Q=Qe();var X=Xe();var ee=ue();var ce;(function(e){e[e["UNICODE_BMP"]=0]="UNICODE_BMP";e[e["UNICODE_SMP"]=1]="UNICODE_SMP"})(ce||(ce={}));var de=class{constructor(e){if(e===void 0){e=o.ATNDeserializationOptions.defaultOptions}this.deserializationOptions=e}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(e,t){let r=de.SUPPORTED_UUIDS.findIndex((t=>t.equals(e)));if(r<0){return false}return de.SUPPORTED_UUIDS.findIndex((e=>e.equals(t)))>=r}static getUnicodeDeserializer(e){if(e===0){return{readUnicode:(e,t)=>de.toInt(e[t]),size:1}}else{return{readUnicode:(e,t)=>de.toInt32(e,t),size:2}}}deserialize(e){e=e.slice(0);for(let t=1;t<e.length;t++){e[t]=e[t]-2&65535}let t=0;let r=de.toInt(e[t++]);if(r!==de.SERIALIZED_VERSION){let e=`Could not deserialize ATN with version ${r} (expected ${de.SERIALIZED_VERSION}).`;throw new Error(e)}let o=de.toUUID(e,t);t+=8;if(de.SUPPORTED_UUIDS.findIndex((e=>e.equals(o)))<0){let e=`Could not deserialize ATN with UUID ${o} (expected ${de.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(e)}let h=de.isFeatureSupported(de.ADDED_LEXER_ACTIONS,o);let p=de.toInt(e[t++]);let g=de.toInt(e[t++]);let _=new s.ATN(p,g);let b=[];let T=[];let S=de.toInt(e[t++]);for(let r=0;r<S;r++){let r=de.toInt(e[t++]);if(r===a.ATNStateType.INVALID_TYPE){_.addState(new x.InvalidState);continue}let i=de.toInt(e[t++]);if(i===65535){i=-1}let n=this.stateFactory(r,i);if(r===a.ATNStateType.LOOP_END){let r=de.toInt(e[t++]);b.push([n,r])}else if(n instanceof m.BlockStartState){let r=de.toInt(e[t++]);T.push([n,r])}_.addState(n)}for(let e of b){e[0].loopBackState=_.states[e[1]]}for(let e of T){e[0].endState=_.states[e[1]]}let E=de.toInt(e[t++]);for(let r=0;r<E;r++){let r=de.toInt(e[t++]);_.states[r].nonGreedy=true}let A=de.toInt(e[t++]);for(let r=0;r<A;r++){let r=de.toInt(e[t++]);_.states[r].sll=true}let C=de.toInt(e[t++]);for(let r=0;r<C;r++){let r=de.toInt(e[t++]);_.states[r].isPrecedenceRule=true}let N=de.toInt(e[t++]);if(_.grammarType===0){_.ruleToTokenType=new Int32Array(N)}_.ruleToStartState=new Array(N);for(let r=0;r<N;r++){let i=de.toInt(e[t++]);let n=_.states[i];n.leftFactored=de.toInt(e[t++])!==0;_.ruleToStartState[r]=n;if(_.grammarType===0){let i=de.toInt(e[t++]);if(i===65535){i=J.Token.EOF}_.ruleToTokenType[r]=i;if(!de.isFeatureSupported(de.ADDED_LEXER_ACTIONS,o)){let r=de.toInt(e[t++]);if(r===65535){r=-1}}}}_.ruleToStopState=new Array(N);for(let e of _.states){if(!(e instanceof V.RuleStopState)){continue}_.ruleToStopState[e.ruleIndex]=e;_.ruleToStartState[e.ruleIndex].stopState=e}let O=de.toInt(e[t++]);for(let r=0;r<O;r++){let r=de.toInt(e[t++]);_.modeToStartState.push(_.states[r])}_.modeToDFA=new Array(O);for(let e=0;e<O;e++){_.modeToDFA[e]=new y.DFA(_.modeToStartState[e])}let R=[];t=this.deserializeSets(e,t,R,de.getUnicodeDeserializer(0));if(de.isFeatureSupported(de.ADDED_UNICODE_SMP,o)){t=this.deserializeSets(e,t,R,de.getUnicodeDeserializer(1))}let k=de.toInt(e[t++]);for(let r=0;r<k;r++){let r=de.toInt(e[t]);let i=de.toInt(e[t+1]);let n=de.toInt(e[t+2]);let s=de.toInt(e[t+3]);let o=de.toInt(e[t+4]);let a=de.toInt(e[t+5]);let l=this.edgeFactory(_,n,r,i,s,o,a,R);let u=_.states[r];u.addTransition(l);t+=6}let L=new n.Array2DHashSet({hashCode:e=>e.stopState^e.returnState^e.outermostPrecedenceReturn,equals:(e,t)=>e.stopState===t.stopState&&e.returnState===t.returnState&&e.outermostPrecedenceReturn===t.outermostPrecedenceReturn});let I=[];for(let e of _.states){let t=e.ruleIndex>=0&&_.ruleToStartState[e.ruleIndex].leftFactored;for(let r=0;r<e.numberOfTransitions;r++){let i=e.transition(r);if(!(i instanceof Z.RuleTransition)){continue}let n=i;let s=_.ruleToStartState[n.target.ruleIndex].leftFactored;if(!s&&t){continue}let o=-1;if(_.ruleToStartState[n.target.ruleIndex].isPrecedenceRule){if(n.precedence===0){o=n.target.ruleIndex}}let a={stopState:n.target.ruleIndex,returnState:n.followState.stateNumber,outermostPrecedenceReturn:o};if(L.add(a)){I.push(a)}}}for(let e of I){let t=new v.EpsilonTransition(_.states[e.returnState],e.outermostPrecedenceReturn);_.ruleToStopState[e.stopState].addTransition(t)}for(let e of _.states){if(e instanceof m.BlockStartState){if(e.endState===void 0){throw new Error("IllegalStateException")}if(e.endState.startState!==void 0){throw new Error("IllegalStateException")}e.endState.startState=e}if(e instanceof j.PlusLoopbackState){let t=e;for(let e=0;e<t.numberOfTransitions;e++){let r=t.transition(e).target;if(r instanceof F.PlusBlockStartState){r.loopBackState=t}}}else if(e instanceof W.StarLoopbackState){let t=e;for(let e=0;e<t.numberOfTransitions;e++){let r=t.transition(e).target;if(r instanceof Y.StarLoopEntryState){r.loopBackState=t}}}}let M=de.toInt(e[t++]);for(let r=1;r<=M;r++){let i=de.toInt(e[t++]);let n=_.states[i];_.decisionToState.push(n);n.decision=r-1}if(_.grammarType===0){if(h){_.lexerActions=new Array(de.toInt(e[t++]));for(let r=0;r<_.lexerActions.length;r++){let i=de.toInt(e[t++]);let n=de.toInt(e[t++]);if(n===65535){n=-1}let s=de.toInt(e[t++]);if(s===65535){s=-1}let o=this.lexerActionFactory(i,n,s);_.lexerActions[r]=o}}else{let e=[];for(let t of _.states){for(let r=0;r<t.numberOfTransitions;r++){let n=t.transition(r);if(!(n instanceof i.ActionTransition)){continue}let s=n.ruleIndex;let o=n.actionIndex;let a=new w.LexerCustomAction(s,o);t.setTransition(r,new i.ActionTransition(n.target,s,e.length,false));e.push(a)}}_.lexerActions=e}}this.markPrecedenceDecisions(_);_.decisionToDFA=new Array(M);for(let e=0;e<M;e++){_.decisionToDFA[e]=new y.DFA(_.decisionToState[e],e)}if(this.deserializationOptions.isVerifyATN){this.verifyATN(_)}if(this.deserializationOptions.isGenerateRuleBypassTransitions&&_.grammarType===1){_.ruleToTokenType=new Int32Array(_.ruleToStartState.length);for(let e=0;e<_.ruleToStartState.length;e++){_.ruleToTokenType[e]=_.maxTokenType+e+1}for(let e=0;e<_.ruleToStartState.length;e++){let t=new u.BasicBlockStartState;t.ruleIndex=e;_.addState(t);let r=new d.BlockEndState;r.ruleIndex=e;_.addState(r);t.endState=r;_.defineDecisionState(t);r.startState=t;let i;let n;if(_.ruleToStartState[e].isPrecedenceRule){i=void 0;for(let t of _.states){if(t.ruleIndex!==e){continue}if(!(t instanceof Y.StarLoopEntryState)){continue}let r=t.transition(t.numberOfTransitions-1).target;if(!(r instanceof P.LoopEndState)){continue}if(r.epsilonOnlyTransitions&&r.transition(0).target instanceof V.RuleStopState){i=t;break}}if(!i){throw new Error("Couldn't identify final state of the precedence rule prefix section.")}n=i.loopBackState.transition(0)}else{i=_.ruleToStopState[e]}for(let e of _.states){for(let t=0;t<e.numberOfTransitions;t++){let s=e.transition(t);if(s===n){continue}if(s.target===i){s.target=r}}}while(_.ruleToStartState[e].numberOfTransitions>0){let r=_.ruleToStartState[e].removeTransition(_.ruleToStartState[e].numberOfTransitions-1);t.addTransition(r)}_.ruleToStartState[e].addTransition(new v.EpsilonTransition(t));r.addTransition(new v.EpsilonTransition(i));let s=new c.BasicState;_.addState(s);s.addTransition(new l.AtomTransition(r,_.ruleToTokenType[e]));t.addTransition(new v.EpsilonTransition(s))}if(this.deserializationOptions.isVerifyATN){this.verifyATN(_)}}if(this.deserializationOptions.isOptimize){while(true){let e=0;e+=de.inlineSetRules(_);e+=de.combineChainedEpsilons(_);let t=_.grammarType===0;e+=de.optimizeSets(_,t);if(e===0){break}}if(this.deserializationOptions.isVerifyATN){this.verifyATN(_)}}de.identifyTailCalls(_);return _}deserializeSets(e,t,r,i){let n=de.toInt(e[t++]);for(let s=0;s<n;s++){let n=de.toInt(e[t]);t++;let s=new b.IntervalSet;r.push(s);let o=de.toInt(e[t++])!==0;if(o){s.add(-1)}for(let r=0;r<n;r++){let r=i.readUnicode(e,t);t+=i.size;let n=i.readUnicode(e,t);t+=i.size;s.add(r,n)}}return t}markPrecedenceDecisions(e){let t=new Map;for(let r of e.states){if(!(r instanceof Y.StarLoopEntryState)){continue}if(e.ruleToStartState[r.ruleIndex].isPrecedenceRule){let i=r.transition(r.numberOfTransitions-1).target;if(i instanceof P.LoopEndState){if(i.epsilonOnlyTransitions&&i.transition(0).target instanceof V.RuleStopState){t.set(r.ruleIndex,r);r.precedenceRuleDecision=true;r.precedenceLoopbackStates=new h.BitSet(e.states.length)}}}}for(let r of t){for(let t of e.ruleToStopState[r[0]].getTransitions()){if(t.serializationType!==1){continue}let e=t;if(e.outermostPrecedenceReturn!==-1){continue}r[1].precedenceLoopbackStates.set(t.target.stateNumber)}}}verifyATN(e){for(let t of e.states){this.checkCondition(t!==void 0,"ATN states should not be undefined.");if(t.stateType===a.ATNStateType.INVALID_TYPE){continue}this.checkCondition(t.onlyHasEpsilonTransitions||t.numberOfTransitions<=1);if(t instanceof F.PlusBlockStartState){this.checkCondition(t.loopBackState!==void 0)}if(t instanceof Y.StarLoopEntryState){let e=t;this.checkCondition(e.loopBackState!==void 0);this.checkCondition(e.numberOfTransitions===2);if(e.transition(0).target instanceof $.StarBlockStartState){this.checkCondition(e.transition(1).target instanceof P.LoopEndState);this.checkCondition(!e.nonGreedy)}else if(e.transition(0).target instanceof P.LoopEndState){this.checkCondition(e.transition(1).target instanceof $.StarBlockStartState);this.checkCondition(e.nonGreedy)}else{throw new Error("IllegalStateException")}}if(t instanceof W.StarLoopbackState){this.checkCondition(t.numberOfTransitions===1);this.checkCondition(t.transition(0).target instanceof Y.StarLoopEntryState)}if(t instanceof P.LoopEndState){this.checkCondition(t.loopBackState!==void 0)}if(t instanceof K.RuleStartState){this.checkCondition(t.stopState!==void 0)}if(t instanceof m.BlockStartState){this.checkCondition(t.endState!==void 0)}if(t instanceof d.BlockEndState){this.checkCondition(t.startState!==void 0)}if(t instanceof g.DecisionState){let e=t;this.checkCondition(e.numberOfTransitions<=1||e.decision>=0)}else{this.checkCondition(t.numberOfTransitions<=1||t instanceof V.RuleStopState)}}}checkCondition(e,t){if(!e){throw new Error("IllegalStateException: "+t)}}static inlineSetRules(e){let t=0;let r=new Array(e.ruleToStartState.length);for(let t=0;t<e.ruleToStartState.length;t++){let i=e.ruleToStartState[t];let n=i;while(n.onlyHasEpsilonTransitions&&n.numberOfOptimizedTransitions===1&&n.getOptimizedTransition(0).serializationType===1){n=n.getOptimizedTransition(0).target}if(n.numberOfOptimizedTransitions!==1){continue}let s=n.getOptimizedTransition(0);let o=s.target;if(s.isEpsilon||!o.onlyHasEpsilonTransitions||o.numberOfOptimizedTransitions!==1||!(o.getOptimizedTransition(0).target instanceof V.RuleStopState)){continue}switch(s.serializationType){case 5:case 2:case 7:r[t]=s;break;case 8:case 9:continue;default:continue}}for(let i of e.states){if(i.ruleIndex<0){continue}let n;for(let s=0;s<i.numberOfOptimizedTransitions;s++){let o=i.getOptimizedTransition(s);if(!(o instanceof Z.RuleTransition)){if(n!==void 0){n.push(o)}continue}let a=o;let u=r[a.target.ruleIndex];if(u===void 0){if(n!==void 0){n.push(o)}continue}if(n===void 0){n=[];for(let e=0;e<s;e++){n.push(i.getOptimizedTransition(s))}}t++;let h=a.followState;let d=new c.BasicState;d.setRuleIndex(h.ruleIndex);e.addState(d);n.push(new v.EpsilonTransition(d));switch(u.serializationType){case 5:d.addTransition(new l.AtomTransition(h,u._label));break;case 2:d.addTransition(new z.RangeTransition(h,u.from,u.to));break;case 7:d.addTransition(new G.SetTransition(h,u.label));break;default:throw new Error("UnsupportedOperationException")}}if(n!==void 0){if(i.isOptimized){while(i.numberOfOptimizedTransitions>0){i.removeOptimizedTransition(i.numberOfOptimizedTransitions-1)}}for(let e of n){i.addOptimizedTransition(e)}}}if(D.ParserATNSimulator.debug){console.log("ATN runtime optimizer removed "+t+" rule invocations by inlining sets.")}return t}static combineChainedEpsilons(e){let t=0;for(let r of e.states){if(!r.onlyHasEpsilonTransitions||r instanceof V.RuleStopState){continue}let e;e:for(let i=0;i<r.numberOfOptimizedTransitions;i++){let n=r.getOptimizedTransition(i);let s=n.target;if(n.serializationType!==1||n.outermostPrecedenceReturn!==-1||s.stateType!==a.ATNStateType.BASIC||!s.onlyHasEpsilonTransitions){if(e!==void 0){e.push(n)}continue e}for(let t=0;t<s.numberOfOptimizedTransitions;t++){if(s.getOptimizedTransition(t).serializationType!==1||s.getOptimizedTransition(t).outermostPrecedenceReturn!==-1){if(e!==void 0){e.push(n)}continue e}}t++;if(e===void 0){e=[];for(let t=0;t<i;t++){e.push(r.getOptimizedTransition(t))}}for(let t=0;t<s.numberOfOptimizedTransitions;t++){let r=s.getOptimizedTransition(t).target;e.push(new v.EpsilonTransition(r))}}if(e!==void 0){if(r.isOptimized){while(r.numberOfOptimizedTransitions>0){r.removeOptimizedTransition(r.numberOfOptimizedTransitions-1)}}for(let t of e){r.addOptimizedTransition(t)}}}if(D.ParserATNSimulator.debug){console.log("ATN runtime optimizer removed "+t+" transitions by combining chained epsilon transitions.")}return t}static optimizeSets(e,t){if(t){return 0}let r=0;let i=e.decisionToState;for(let t of i){let i=new b.IntervalSet;for(let e=0;e<t.numberOfOptimizedTransitions;e++){let r=t.getOptimizedTransition(e);if(!(r instanceof v.EpsilonTransition)){continue}if(r.target.numberOfOptimizedTransitions!==1){continue}let n=r.target.getOptimizedTransition(0);if(!(n.target instanceof d.BlockEndState)){continue}if(n instanceof I.NotSetTransition){continue}if(n instanceof l.AtomTransition||n instanceof z.RangeTransition||n instanceof G.SetTransition){i.add(e)}}if(i.size<=1){continue}let n=[];for(let e=0;e<t.numberOfOptimizedTransitions;e++){if(!i.contains(e)){n.push(t.getOptimizedTransition(e))}}let s=t.getOptimizedTransition(i.minElement).target.getOptimizedTransition(0).target;let o=new b.IntervalSet;for(let e of i.intervals){for(let r=e.a;r<=e.b;r++){let e=t.getOptimizedTransition(r).target.getOptimizedTransition(0);if(e instanceof I.NotSetTransition){throw new Error("Not yet implemented.")}else{o.addAll(e.label)}}}let a;if(o.intervals.length===1){if(o.size===1){a=new l.AtomTransition(s,o.minElement)}else{let e=o.intervals[0];a=new z.RangeTransition(s,e.a,e.b)}}else{a=new G.SetTransition(s,o)}let u=new c.BasicState;u.setRuleIndex(t.ruleIndex);e.addState(u);u.addTransition(a);n.push(new v.EpsilonTransition(u));r+=t.numberOfOptimizedTransitions-n.length;if(t.isOptimized){while(t.numberOfOptimizedTransitions>0){t.removeOptimizedTransition(t.numberOfOptimizedTransitions-1)}}for(let e of n){t.addOptimizedTransition(e)}}if(D.ParserATNSimulator.debug){console.log("ATN runtime optimizer removed "+r+" paths by collapsing sets.")}return r}static identifyTailCalls(e){for(let t of e.states){for(let r=0;r<t.numberOfTransitions;r++){let i=t.transition(r);if(!(i instanceof Z.RuleTransition)){continue}i.tailCall=this.testTailCall(e,i,false);i.optimizedTailCall=this.testTailCall(e,i,true)}if(!t.isOptimized){continue}for(let r=0;r<t.numberOfOptimizedTransitions;r++){let i=t.getOptimizedTransition(r);if(!(i instanceof Z.RuleTransition)){continue}i.tailCall=this.testTailCall(e,i,false);i.optimizedTailCall=this.testTailCall(e,i,true)}}}static testTailCall(e,t,r){if(!r&&t.tailCall){return true}if(r&&t.optimizedTailCall){return true}let i=new h.BitSet(e.states.length);let n=[];n.push(t.followState);while(true){let e=n.pop();if(!e){break}if(i.get(e.stateNumber)){continue}if(e instanceof V.RuleStopState){continue}if(!e.onlyHasEpsilonTransitions){return false}let t=r?e.numberOfOptimizedTransitions:e.numberOfTransitions;for(let i=0;i<t;i++){let t=r?e.getOptimizedTransition(i):e.transition(i);if(t.serializationType!==1){return false}n.push(t.target)}}return true}static toInt(e){return e}static toInt32(e,t){return(e[t]|e[t+1]<<16)>>>0}static toUUID(e,t){let r=de.toInt32(e,t);let i=de.toInt32(e,t+2);let n=de.toInt32(e,t+4);let s=de.toInt32(e,t+6);return new X.UUID(s,n,i,r)}edgeFactory(e,t,r,n,s,o,a,u){let c=e.states[n];switch(t){case 1:return new v.EpsilonTransition(c);case 2:if(a!==0){return new z.RangeTransition(c,J.Token.EOF,o)}else{return new z.RangeTransition(c,s,o)}case 3:let t=new Z.RuleTransition(e.states[s],o,a,c);return t;case 4:let r=new U.PredicateTransition(c,s,o,a!==0);return r;case 10:return new B.PrecedencePredicateTransition(c,s);case 5:if(a!==0){return new l.AtomTransition(c,J.Token.EOF)}else{return new l.AtomTransition(c,s)}case 6:let n=new i.ActionTransition(c,s,o,a!==0);return n;case 7:return new G.SetTransition(c,u[s]);case 8:return new I.NotSetTransition(c,u[s]);case 9:return new ee.WildcardTransition(c)}throw new Error("The specified transition type is not valid.")}stateFactory(e,t){let r;switch(e){case a.ATNStateType.INVALID_TYPE:return new x.InvalidState;case a.ATNStateType.BASIC:r=new c.BasicState;break;case a.ATNStateType.RULE_START:r=new K.RuleStartState;break;case a.ATNStateType.BLOCK_START:r=new u.BasicBlockStartState;break;case a.ATNStateType.PLUS_BLOCK_START:r=new F.PlusBlockStartState;break;case a.ATNStateType.STAR_BLOCK_START:r=new $.StarBlockStartState;break;case a.ATNStateType.TOKEN_START:r=new Q.TokensStartState;break;case a.ATNStateType.RULE_STOP:r=new V.RuleStopState;break;case a.ATNStateType.BLOCK_END:r=new d.BlockEndState;break;case a.ATNStateType.STAR_LOOP_BACK:r=new W.StarLoopbackState;break;case a.ATNStateType.STAR_LOOP_ENTRY:r=new Y.StarLoopEntryState;break;case a.ATNStateType.PLUS_LOOP_BACK:r=new j.PlusLoopbackState;break;case a.ATNStateType.LOOP_END:r=new P.LoopEndState;break;default:let t=`The specified state type ${e} is not valid.`;throw new Error(t)}r.ruleIndex=t;return r}lexerActionFactory(e,t,r){switch(e){case 0:return new T.LexerChannelAction(t);case 1:return new w.LexerCustomAction(t,r);case 2:return new S.LexerModeAction(t);case 3:return A.LexerMoreAction.INSTANCE;case 4:return C.LexerPopModeAction.INSTANCE;case 5:return new N.LexerPushModeAction(t);case 6:return R.LexerSkipAction.INSTANCE;case 7:return new k.LexerTypeAction(t);default:let i=`The specified lexer action type ${e} is not valid.`;throw new Error(i)}}};de.BASE_SERIALIZED_UUID=X.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3");de.ADDED_LEXER_ACTIONS=X.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D");de.ADDED_UNICODE_SMP=X.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B");de.SUPPORTED_UUIDS=[de.BASE_SERIALIZED_UUID,de.ADDED_LEXER_ACTIONS,de.ADDED_UNICODE_SMP];de.SERIALIZED_UUID=de.ADDED_UNICODE_SMP;t([L.NotNull],de.prototype,"deserializationOptions",void 0);t([r(0,L.NotNull)],de.prototype,"deserialize",null);t([r(0,L.NotNull)],de.prototype,"markPrecedenceDecisions",null);t([L.NotNull,r(0,L.NotNull)],de.prototype,"edgeFactory",null);e.ATNDeserializer=de}));var tt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParseInfo=void 0;var i=p();var n=class ParseInfo{constructor(e){this.atnSimulator=e}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let e=this.atnSimulator.getDecisionInfo();let t=[];for(let r=0;r<e.length;r++){let i=e[r].LL_Fallback;if(i>0){t.push(r)}}return t}getTotalTimeInPrediction(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.timeInPrediction}return t}getTotalSLLLookaheadOps(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.SLL_TotalLook}return t}getTotalLLLookaheadOps(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.LL_TotalLook}return t}getTotalSLLATNLookaheadOps(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.SLL_ATNTransitions}return t}getTotalLLATNLookaheadOps(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.LL_ATNTransitions}return t}getTotalATNLookaheadOps(){let e=this.atnSimulator.getDecisionInfo();let t=0;for(let r of e){t+=r.SLL_ATNTransitions;t+=r.LL_ATNTransitions}return t}getDFASize(e){if(e){let t=this.atnSimulator.atn.decisionToDFA[e];return t.states.size}else{let e=0;let t=this.atnSimulator.atn.decisionToDFA;for(let r=0;r<t.length;r++){e+=this.getDFASize(r)}return e}}};t([i.NotNull],n.prototype,"getDecisionInfo",null);t([i.NotNull],n.prototype,"getLLDecisions",null);n=t([r(0,i.NotNull)],n);e.ParseInfo=n}));var rt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.ProxyParserErrorListener=void 0;var r=Y();var i=p();var n=class extends r.ProxyErrorListener{constructor(e){super(e)}reportAmbiguity(e,t,r,i,n,s,o){this.getDelegates().forEach((a=>{if(a.reportAmbiguity){a.reportAmbiguity(e,t,r,i,n,s,o)}}))}reportAttemptingFullContext(e,t,r,i,n,s){this.getDelegates().forEach((o=>{if(o.reportAttemptingFullContext){o.reportAttemptingFullContext(e,t,r,i,n,s)}}))}reportContextSensitivity(e,t,r,i,n,s){this.getDelegates().forEach((o=>{if(o.reportContextSensitivity){o.reportContextSensitivity(e,t,r,i,n,s)}}))}};t([i.Override],n.prototype,"reportAmbiguity",null);t([i.Override],n.prototype,"reportAttemptingFullContext",null);t([i.Override],n.prototype,"reportContextSensitivity",null);e.ProxyParserErrorListener=n}));var it=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isSupplementaryCodePoint=e.isLowSurrogate=e.isHighSurrogate=void 0;function isHighSurrogate(e){return e>=55296&&e<=56319}e.isHighSurrogate=isHighSurrogate;function isLowSurrogate(e){return e>=56320&&e<=57343}e.isLowSurrogate=isLowSurrogate;function isSupplementaryCodePoint(e){return e>=65536}e.isSupplementaryCodePoint=isSupplementaryCodePoint}));var nt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CodePointBuffer=void 0;var t=r(9491);var i=it();var n=class{constructor(e,t){this.buffer=e;this._position=0;this._size=t}static withArray(e){return new n(e,e.length)}get position(){return this._position}set position(e){if(e<0||e>this._size){throw new RangeError}this._position=e}get remaining(){return this._size-this.position}get(e){return this.buffer[e]}array(){return this.buffer.slice(0,this._size)}static builder(e){return new n.Builder(e)}};e.CodePointBuffer=n;(function(e){let r;(function(e){e[e["BYTE"]=0]="BYTE";e[e["CHAR"]=1]="CHAR";e[e["INT"]=2]="INT"})(r||(r={}));class Builder{constructor(e){this.type=0;this.buffer=new Uint8Array(e);this.prevHighSurrogate=-1;this.position=0}build(){return new e(this.buffer,this.position)}static roundUpToNextPowerOfTwo(e){let t=32-Math.clz32(e-1);return Math.pow(2,t)}ensureRemaining(e){switch(this.type){case 0:if(this.buffer.length-this.position<e){let t=Builder.roundUpToNextPowerOfTwo(this.buffer.length+e);let r=new Uint8Array(t);r.set(this.buffer.subarray(0,this.position),0);this.buffer=r}break;case 1:if(this.buffer.length-this.position<e){let t=Builder.roundUpToNextPowerOfTwo(this.buffer.length+e);let r=new Uint16Array(t);r.set(this.buffer.subarray(0,this.position),0);this.buffer=r}break;case 2:if(this.buffer.length-this.position<e){let t=Builder.roundUpToNextPowerOfTwo(this.buffer.length+e);let r=new Int32Array(t);r.set(this.buffer.subarray(0,this.position),0);this.buffer=r}break}}append(e){this.ensureRemaining(e.length);this.appendArray(e)}appendArray(e){switch(this.type){case 0:this.appendArrayByte(e);break;case 1:this.appendArrayChar(e);break;case 2:this.appendArrayInt(e);break}}appendArrayByte(e){t(this.prevHighSurrogate===-1);let r=e;let n=0;let s=e.length;let o=this.buffer;let a=this.position;while(n<s){let t=r[n];if(t<=255){o[a]=t}else{e=e.subarray(n,s);this.position=a;if(!i.isHighSurrogate(t)){this.byteToCharBuffer(e.length);this.appendArrayChar(e);return}else{this.byteToIntBuffer(e.length);this.appendArrayInt(e);return}}n++;a++}this.position=a}appendArrayChar(e){t(this.prevHighSurrogate===-1);let r=e;let n=0;let s=e.length;let o=this.buffer;let a=this.position;while(n<s){let t=r[n];if(!i.isHighSurrogate(t)){o[a]=t}else{e=e.subarray(n,s);this.position=a;this.charToIntBuffer(e.length);this.appendArrayInt(e);return}n++;a++}this.position=a}appendArrayInt(e){let t=e;let r=0;let n=e.length;let s=this.buffer;let o=this.position;while(r<n){let e=t[r];r++;if(this.prevHighSurrogate!==-1){if(i.isLowSurrogate(e)){s[o]=String.fromCharCode(this.prevHighSurrogate,e).codePointAt(0);o++;this.prevHighSurrogate=-1}else{s[o]=this.prevHighSurrogate;o++;if(i.isHighSurrogate(e)){this.prevHighSurrogate=e}else{s[o]=e;o++;this.prevHighSurrogate=-1}}}else if(i.isHighSurrogate(e)){this.prevHighSurrogate=e}else{s[o]=e;o++}}if(this.prevHighSurrogate!==-1){s[o]=this.prevHighSurrogate;o++}this.position=o}byteToCharBuffer(e){let t=new Uint16Array(Math.max(this.position+e,this.buffer.length>>1));t.set(this.buffer.subarray(0,this.position),0);this.type=1;this.buffer=t}byteToIntBuffer(e){let t=new Int32Array(Math.max(this.position+e,this.buffer.length>>2));t.set(this.buffer.subarray(0,this.position),0);this.type=2;this.buffer=t}charToIntBuffer(e){let t=new Int32Array(Math.max(this.position+e,this.buffer.length>>1));t.set(this.buffer.subarray(0,this.position),0);this.type=2;this.buffer=t}}e.Builder=Builder})(n=e.CodePointBuffer||(e.CodePointBuffer={}))}));var st=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.CodePointCharStream=void 0;var i=r(9491);var n=m();var s=I();var o=p();var a=class{constructor(e,t,r,n){i(t===0);this._array=e;this._size=r;this._name=n;this._position=0}get internalStorage(){return this._array}static fromBuffer(e,t){if(t===void 0||t.length===0){t=n.IntStream.UNKNOWN_SOURCE_NAME}return new a(e.array(),e.position,e.remaining,t)}consume(){if(this._size-this._position===0){i(this.LA(1)===n.IntStream.EOF);throw new RangeError("cannot consume EOF")}this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(e){}seek(e){this._position=e}get sourceName(){return this._name}toString(){return this.getText(s.Interval.of(0,this.size-1))}LA(e){let t;switch(Math.sign(e)){case-1:t=this.index+e;if(t<0){return n.IntStream.EOF}return this._array[t];case 0:return 0;case 1:t=this.index+e-1;if(t>=this.size){return n.IntStream.EOF}return this._array[t]}throw new RangeError("Not reached")}getText(e){const t=Math.min(e.a,this.size);const r=Math.min(e.b-e.a+1,this.size-t);if(this._array instanceof Int32Array){return String.fromCodePoint(...Array.from(this._array.subarray(t,t+r)))}else{return String.fromCharCode(...Array.from(this._array.subarray(t,t+r)))}}};t([o.Override],a.prototype,"consume",null);t([o.Override],a.prototype,"index",null);t([o.Override],a.prototype,"size",null);t([o.Override],a.prototype,"mark",null);t([o.Override],a.prototype,"release",null);t([o.Override],a.prototype,"seek",null);t([o.Override],a.prototype,"sourceName",null);t([o.Override],a.prototype,"toString",null);t([o.Override],a.prototype,"LA",null);t([o.Override],a.prototype,"getText",null);e.CodePointCharStream=a}));var ot=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.CharStreams=void 0;var t=nt();var r=st();var i=m();var n;(function(e){function fromString(e,n){if(n===void 0||n.length===0){n=i.IntStream.UNKNOWN_SOURCE_NAME}let s=t.CodePointBuffer.builder(e.length);let o=new Uint16Array(e.length);for(let t=0;t<e.length;t++){o[t]=e.charCodeAt(t)}s.append(o);return r.CodePointCharStream.fromBuffer(s.build(),n)}e.fromString=fromString})(n=e.CharStreams||(e.CharStreams={}))}));var at=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var i=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.BufferedTokenStream=void 0;var n=r(9491);var s=D();var o=I();var a=ye();var l=p();var u=M();var c=class BufferedTokenStream{constructor(e){this.tokens=[];this.p=-1;this.fetchedEOF=false;if(e==null){throw new Error("tokenSource cannot be null")}this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e;this.tokens.length=0;this.p=-1;this.fetchedEOF=false}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit();this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0){if(this.fetchedEOF){e=this.p<this.tokens.length-1}else{e=this.p<this.tokens.length}}else{e=false}if(!e&&this.LA(1)===u.Token.EOF){throw new Error("cannot consume EOF")}if(this.sync(this.p+1)){this.p=this.adjustSeekIndex(this.p+1)}}sync(e){n(e>=0);let t=e-this.tokens.length+1;if(t>0){let e=this.fetch(t);return e>=t}return true}fetch(e){if(this.fetchedEOF){return 0}for(let t=0;t<e;t++){let e=this.tokenSource.nextToken();if(this.isWritableToken(e)){e.tokenIndex=this.tokens.length}this.tokens.push(e);if(e.type===u.Token.EOF){this.fetchedEOF=true;return t+1}}return e}get(e){if(e<0||e>=this.tokens.length){throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1))}return this.tokens[e]}getRange(e,t){if(e<0||t<0){return[]}this.lazyInit();let r=new Array;if(t>=this.tokens.length){t=this.tokens.length-1}for(let i=e;i<=t;i++){let e=this.tokens[i];if(e.type===u.Token.EOF){break}r.push(e)}return r}LA(e){let t=this.LT(e);if(!t){return u.Token.INVALID_TYPE}return t.type}tryLB(e){if(this.p-e<0){return void 0}return this.tokens[this.p-e]}LT(e){let t=this.tryLT(e);if(t===void 0){throw new RangeError("requested lookback index out of range")}return t}tryLT(e){this.lazyInit();if(e===0){throw new RangeError("0 is not a valid lookahead index")}if(e<0){return this.tryLB(-e)}let t=this.p+e-1;this.sync(t);if(t>=this.tokens.length){return this.tokens[this.tokens.length-1]}return this.tokens[t]}adjustSeekIndex(e){return e}lazyInit(){if(this.p===-1){this.setup()}}setup(){this.sync(0);this.p=this.adjustSeekIndex(0)}getTokens(e,t,r){this.lazyInit();if(e===void 0){n(t===void 0&&r===void 0);return this.tokens}else if(t===void 0){t=this.tokens.length-1}if(e<0||t>=this.tokens.length||t<0||e>=this.tokens.length){throw new RangeError("start "+e+" or stop "+t+" not in 0.."+(this.tokens.length-1))}if(e>t){return[]}if(r===void 0){return this.tokens.slice(e,t+1)}else if(typeof r==="number"){r=(new Set).add(r)}let i=r;let s=this.tokens.slice(e,t+1);s=s.filter((e=>i.has(e.type)));return s}nextTokenOnChannel(e,t){this.sync(e);if(e>=this.size){return this.size-1}let r=this.tokens[e];while(r.channel!==t){if(r.type===u.Token.EOF){return e}e++;this.sync(e);r=this.tokens[e]}return e}previousTokenOnChannel(e,t){this.sync(e);if(e>=this.size){return this.size-1}while(e>=0){let r=this.tokens[e];if(r.type===u.Token.EOF||r.channel===t){return e}e--}return e}getHiddenTokensToRight(e,t=-1){this.lazyInit();if(e<0||e>=this.tokens.length){throw new RangeError(e+" not in 0.."+(this.tokens.length-1))}let r=this.nextTokenOnChannel(e+1,a.Lexer.DEFAULT_TOKEN_CHANNEL);let i;let n=e+1;if(r===-1){i=this.size-1}else{i=r}return this.filterForChannel(n,i,t)}getHiddenTokensToLeft(e,t=-1){this.lazyInit();if(e<0||e>=this.tokens.length){throw new RangeError(e+" not in 0.."+(this.tokens.length-1))}if(e===0){return[]}let r=this.previousTokenOnChannel(e-1,a.Lexer.DEFAULT_TOKEN_CHANNEL);if(r===e-1){return[]}let i=r+1;let n=e-1;return this.filterForChannel(i,n,t)}filterForChannel(e,t,r){let i=new Array;for(let n=e;n<=t;n++){let e=this.tokens[n];if(r===-1){if(e.channel!==a.Lexer.DEFAULT_TOKEN_CHANNEL){i.push(e)}}else{if(e.channel===r){i.push(e)}}}return i}get sourceName(){return this.tokenSource.sourceName}getText(e){if(e===void 0){e=o.Interval.of(0,this.size-1)}else if(!(e instanceof o.Interval)){e=e.sourceInterval}let t=e.a;let r=e.b;if(t<0||r<0){return""}this.fill();if(r>=this.tokens.length){r=this.tokens.length-1}let i="";for(let e=t;e<=r;e++){let t=this.tokens[e];if(t.type===u.Token.EOF){break}i+=t.text}return i.toString()}getTextFromRange(e,t){if(this.isToken(e)&&this.isToken(t)){return this.getText(o.Interval.of(e.tokenIndex,t.tokenIndex))}return""}fill(){this.lazyInit();const e=1e3;while(true){let t=this.fetch(e);if(t<e){return}}}isWritableToken(e){return e instanceof s.CommonToken}isToken(e){return e instanceof s.CommonToken}};t([l.NotNull],c.prototype,"_tokenSource",void 0);t([l.Override],c.prototype,"tokenSource",null);t([l.Override],c.prototype,"index",null);t([l.Override],c.prototype,"mark",null);t([l.Override],c.prototype,"release",null);t([l.Override],c.prototype,"seek",null);t([l.Override],c.prototype,"size",null);t([l.Override],c.prototype,"consume",null);t([l.Override],c.prototype,"get",null);t([l.Override],c.prototype,"LA",null);t([l.NotNull,l.Override],c.prototype,"LT",null);t([l.Override],c.prototype,"sourceName",null);t([l.NotNull,l.Override],c.prototype,"getText",null);t([l.NotNull,l.Override],c.prototype,"getTextFromRange",null);c=t([i(0,l.NotNull)],c);e.BufferedTokenStream=c}));var ut=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.CommonTokenStream=void 0;var i=at();var n=p();var s=M();var o=class CommonTokenStream extends i.BufferedTokenStream{constructor(e,t=s.Token.DEFAULT_CHANNEL){super(e);this.channel=t}adjustSeekIndex(e){return this.nextTokenOnChannel(e,this.channel)}tryLB(e){if(this.p-e<0){return void 0}let t=this.p;let r=1;while(r<=e&&t>0){t=this.previousTokenOnChannel(t-1,this.channel);r++}if(t<0){return void 0}return this.tokens[t]}tryLT(e){this.lazyInit();if(e===0){throw new RangeError("0 is not a valid lookahead index")}if(e<0){return this.tryLB(-e)}let t=this.p;let r=1;while(r<e){if(this.sync(t+1)){t=this.nextTokenOnChannel(t+1,this.channel)}r++}return this.tokens[t]}getNumberOfOnChannelTokens(){let e=0;this.fill();for(let t of this.tokens){if(t.channel===this.channel){e++}if(t.type===s.Token.EOF){break}}return e}};t([n.Override],o.prototype,"adjustSeekIndex",null);t([n.Override],o.prototype,"tryLB",null);t([n.Override],o.prototype,"tryLT",null);o=t([r(0,n.NotNull)],o);e.CommonTokenStream=o}));var ct=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ListTokenSource=void 0;var i=F();var n=p();var s=M();var o=class ListTokenSource{constructor(e,t){this.i=0;this._factory=i.CommonTokenFactory.DEFAULT;if(e==null){throw new Error("tokens cannot be null")}this.tokens=e;this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length){return this.tokens[this.i].charPositionInLine}else if(this.eofToken!=null){return this.eofToken.charPositionInLine}else if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1];let t=e.text;if(t!=null){let e=t.lastIndexOf("\n");if(e>=0){return t.length-e-1}}return e.charPositionInLine+e.stopIndex-e.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let e=-1;if(this.tokens.length>0){let t=this.tokens[this.tokens.length-1].stopIndex;if(t!==-1){e=t+1}}let t=Math.max(-1,e-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},s.Token.EOF,"EOF",s.Token.DEFAULT_CHANNEL,e,t,this.line,this.charPositionInLine)}return this.eofToken}let e=this.tokens[this.i];if(this.i===this.tokens.length-1&&e.type===s.Token.EOF){this.eofToken=e}this.i++;return e}get line(){if(this.i<this.tokens.length){return this.tokens[this.i].line}else if(this.eofToken!=null){return this.eofToken.line}else if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1];let t=e.line;let r=e.text;if(r!=null){for(let e=0;e<r.length;e++){if(r.charAt(e)==="\n"){t++}}}return t}return 1}get inputStream(){if(this.i<this.tokens.length){return this.tokens[this.i].inputStream}else if(this.eofToken!=null){return this.eofToken.inputStream}else if(this.tokens.length>0){return this.tokens[this.tokens.length-1].inputStream}return void 0}get sourceName(){if(this._sourceName){return this._sourceName}let e=this.inputStream;if(e!=null){return e.sourceName}return"List"}set tokenFactory(e){this._factory=e}get tokenFactory(){return this._factory}};t([n.Override],o.prototype,"charPositionInLine",null);t([n.Override],o.prototype,"nextToken",null);t([n.Override],o.prototype,"line",null);t([n.Override],o.prototype,"inputStream",null);t([n.Override],o.prototype,"sourceName",null);t([n.Override,n.NotNull,r(0,n.NotNull)],o.prototype,"tokenFactory",null);o=t([r(0,n.NotNull)],o);e.ListTokenSource=o}));var ht=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.MultiMap=void 0;var t=class extends Map{constructor(){super()}map(e,t){let r=super.get(e);if(!r){r=[];super.set(e,r)}r.push(t)}getPairs(){let e=[];this.forEach(((t,r)=>{t.forEach((t=>{e.push([r,t])}))}));return e}};e.MultiMap=t}));var dt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ParseCancellationException=void 0;var t=class extends Error{constructor(e){super(e.message);this.cause=e;this.stack=e.stack}getCause(){return this.cause}};e.ParseCancellationException=t}));var ft=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.InterpreterRuleContext=void 0;var r=p();var i=He();var n=class extends i.ParserRuleContext{constructor(e,t,r){if(r!==void 0){super(t,r)}else{super()}this._ruleIndex=e}get ruleIndex(){return this._ruleIndex}};t([r.Override],n.prototype,"ruleIndex",null);e.InterpreterRuleContext=n}));var pt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParserInterpreter=void 0;var i=y();var n=_();var s=q();var o=R();var a=k();var l=ft();var u=Ie();var c=p();var h=p();var d=zt();var m=Ve();var g=v();var b=te();var x=M();var T=class ParserInterpreter2 extends d.Parser{constructor(e,t,r,i,n){super(e instanceof ParserInterpreter2?e.inputStream:n);this._parentContextStack=[];this.overrideDecision=-1;this.overrideDecisionInputIndex=-1;this.overrideDecisionAlt=-1;this.overrideDecisionReached=false;this._overrideDecisionRoot=void 0;if(e instanceof ParserInterpreter2){let t=e;this._grammarFileName=t._grammarFileName;this._atn=t._atn;this.pushRecursionContextStates=t.pushRecursionContextStates;this._ruleNames=t._ruleNames;this._vocabulary=t._vocabulary;this.interpreter=new m.ParserATNSimulator(this._atn,this)}else{t=t;r=r;i=i;this._grammarFileName=e;this._atn=i;this._ruleNames=r.slice(0);this._vocabulary=t;this.pushRecursionContextStates=new s.BitSet(i.states.length);for(let e of i.states){if(!(e instanceof b.StarLoopEntryState)){continue}if(e.precedenceRuleDecision){this.pushRecursionContextStates.set(e.stateNumber)}}this.interpreter=new m.ParserATNSimulator(i,this)}}reset(e){if(e===void 0){super.reset()}else{super.reset(e)}this.overrideDecisionReached=false;this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(e){let t=this._atn.ruleToStartState[e];this._rootContext=this.createInterpreterRuleContext(void 0,i.ATNState.INVALID_STATE_NUMBER,e);if(t.isPrecedenceRule){this.enterRecursionRule(this._rootContext,t.stateNumber,e,0)}else{this.enterRule(this._rootContext,t.stateNumber,e)}while(true){let e=this.atnState;switch(e.stateType){case n.ATNStateType.RULE_STOP:if(this._ctx.isEmpty){if(t.isPrecedenceRule){let e=this._ctx;let t=this._parentContextStack.pop();this.unrollRecursionContexts(t[0]);return e}else{this.exitRule();return this._rootContext}}this.visitRuleStopState(e);break;default:try{this.visitState(e)}catch(t){if(t instanceof g.RecognitionException){this.state=this._atn.ruleToStopState[e.ruleIndex].stateNumber;this.context.exception=t;this.errorHandler.reportError(this,t);this.recover(t)}else{throw t}}break}}}enterRecursionRule(e,t,r,i){this._parentContextStack.push([this._ctx,e.invokingState]);super.enterRecursionRule(e,t,r,i)}get atnState(){return this._atn.states[this.state]}visitState(e){let t=1;if(e.numberOfTransitions>1){t=this.visitDecisionState(e)}let r=e.transition(t-1);switch(r.serializationType){case 1:if(this.pushRecursionContextStates.get(e.stateNumber)&&!(r.target instanceof u.LoopEndState)){let t=this._parentContextStack[this._parentContextStack.length-1];let r=this.createInterpreterRuleContext(t[0],t[1],this._ctx.ruleIndex);this.pushNewRecursionContext(r,this._atn.ruleToStartState[e.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(r._label);break;case 2:case 7:case 8:if(!r.matches(this._input.LA(1),x.Token.MIN_USER_TOKEN_TYPE,65535)){this.recoverInline()}this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let t=r.target;let i=t.ruleIndex;let n=this.createInterpreterRuleContext(this._ctx,e.stateNumber,i);if(t.isPrecedenceRule){this.enterRecursionRule(n,t.stateNumber,i,r.precedence)}else{this.enterRule(n,r.target.stateNumber,i)}break;case 4:let s=r;if(!this.sempred(this._ctx,s.ruleIndex,s.predIndex)){throw new o.FailedPredicateException(this)}break;case 6:let a=r;this.action(this._ctx,a.ruleIndex,a.actionIndex);break;case 10:if(!this.precpred(this._ctx,r.precedence)){let e=r.precedence;throw new o.FailedPredicateException(this,`precpred(_ctx, ${e})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=r.target.stateNumber}visitDecisionState(e){let t;this.errorHandler.sync(this);let r=e.decision;if(r===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached){t=this.overrideDecisionAlt;this.overrideDecisionReached=true}else{t=this.interpreter.adaptivePredict(this._input,r,this._ctx)}return t}createInterpreterRuleContext(e,t,r){return new l.InterpreterRuleContext(r,e,t)}visitRuleStopState(e){let t=this._atn.ruleToStartState[e.ruleIndex];if(t.isPrecedenceRule){let e=this._parentContextStack.pop();this.unrollRecursionContexts(e[0]);this.state=e[1]}else{this.exitRule()}let r=this._atn.states[this.state].transition(0);this.state=r.followState.stateNumber}addDecisionOverride(e,t,r){this.overrideDecision=e;this.overrideDecisionInputIndex=t;this.overrideDecisionAlt=r}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(e){let t=this._input.index;this.errorHandler.recover(this,e);if(this._input.index===t){let t=e.getOffendingToken();if(!t){throw new Error("Expected exception to have an offending token")}let r=t.tokenSource;let i=r!==void 0?r.inputStream:void 0;let n={source:r,stream:i};if(e instanceof a.InputMismatchException){let r=e.expectedTokens;if(r===void 0){throw new Error("Expected the exception to provide expected tokens")}let i=x.Token.INVALID_TYPE;if(!r.isNil){i=r.minElement}let s=this.tokenFactory.create(n,i,t.text,x.Token.DEFAULT_CHANNEL,-1,-1,t.line,t.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,s))}else{let e=t.tokenSource;let r=this.tokenFactory.create(n,x.Token.INVALID_TYPE,t.text,x.Token.DEFAULT_CHANNEL,-1,-1,t.line,t.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,r))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};t([c.NotNull],T.prototype,"_vocabulary",void 0);t([h.Override],T.prototype,"reset",null);t([h.Override],T.prototype,"atn",null);t([h.Override],T.prototype,"vocabulary",null);t([h.Override],T.prototype,"ruleNames",null);t([h.Override],T.prototype,"grammarFileName",null);t([h.Override],T.prototype,"enterRecursionRule",null);T=t([r(1,c.NotNull)],T);e.ParserInterpreter=T}));var mt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParseTreeMatch=void 0;var i=p();var n=class ParseTreeMatch{constructor(e,t,r,i){if(!e){throw new Error("tree cannot be null")}if(!t){throw new Error("pattern cannot be null")}if(!r){throw new Error("labels cannot be null")}this._tree=e;this._pattern=t;this._labels=r;this._mismatchedNode=i}get(e){let t=this._labels.get(e);if(!t||t.length===0){return void 0}return t[t.length-1]}getAll(e){const t=this._labels.get(e);if(!t){return[]}return t}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};t([i.NotNull,r(0,i.NotNull)],n.prototype,"getAll",null);t([i.NotNull],n.prototype,"labels",null);t([i.NotNull],n.prototype,"pattern",null);t([i.NotNull],n.prototype,"tree",null);t([i.Override],n.prototype,"toString",null);n=t([r(0,i.NotNull),r(1,i.NotNull),r(2,i.NotNull)],n);e.ParseTreeMatch=n}));var yt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.XPathLexer=void 0;var t=et();var r=ye();var i=ge();var n=Q();var s=C();var o=class extends r.Lexer{constructor(e){super(e);this._interp=new i.LexerATNSimulator(o._ATN,this)}get vocabulary(){return o.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return o.ruleNames}get serializedATN(){return o._serializedATN}get channelNames(){return o.channelNames}get modeNames(){return o.modeNames}action(e,t,r){switch(t){case 4:this.ID_action(e,r);break}}ID_action(e,t){switch(t){case 0:let e=this.text;if(e.charAt(0)===e.charAt(0).toUpperCase()){this.type=o.TOKEN_REF}else{this.type=o.RULE_REF}break}}static get _ATN(){if(!o.__ATN){o.__ATN=(new t.ATNDeserializer).deserialize(s.toCharArray(o._serializedATN))}return o.__ATN}};e.XPathLexer=o;o.TOKEN_REF=1;o.RULE_REF=2;o.ANYWHERE=3;o.ROOT=4;o.WILDCARD=5;o.BANG=6;o.ID=7;o.STRING=8;o.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];o.modeNames=["DEFAULT_MODE"];o.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"];o._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"];o._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"];o.VOCABULARY=new n.VocabularyImpl(o._LITERAL_NAMES,o._SYMBOLIC_NAMES,[]);o._serializedATNSegments=2;o._serializedATNSegment0='줝쪺֍꾺体؇쉁\n2\b\t\t\t\t\t\t\b\t\b\t\t\t\n\f"\v\b\b\t\t\t,\n\t\f\t\t/\v\t\t\t-\n\t\b\v\t\r\nʶ\n2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂ͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՛՛գ։ֿׁׁ֓׃ׄ׆ׇגײ״؇ؒ؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑݏ߂߷ࠂࡂࢢࢶࢸࢿࣖ॥२ॱॳঅইকপবলসা্য়ৡ২৳ਃਅਇਕਪਬਲਵਸਾਾੀ੍ਜ਼ਫ਼੨ઃઅઇએઑઓકપબલવષાેૉો્ૢ૨૱ૻૻଃଅଇକପବଲଵଷା୍ୟୡ୨ୱ୳୳அஇஐஒஔஜஞஞபரீைொௌ௨௱ంఅఇఎఐఒఔపబిెైొౌౘౚౢ౨ಂಅಇಎಐಒಔಪಬವಷಾೆೈೊೌೠೠೢ೨ೱೳഃഅഇഎഐഒഔ഼ിെൈൊൌൖ൙ൡ൨൱ർඁඅඇගඳඵලෂෑූෘෘේ෨෴ฃโ๐๒๛ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່໊໒ໞ༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፟፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜢ᜶ᝂᝢᝮᝰᝲគ៕៙៙២᠍᠐᠒ᠢᢂᢲᤂᤠᤢᤲ᥈ᥲᦂᦲ᧒ᨂᨢ᩠ᩢ᪁᪒᪩᪩ᪿ᪲ᬂ᭒᭛᭭᭵ᮂᰂ᱂ᱏ᱿ᲂ᳔᳖᳒᳸ᳺᴂ᷽᷷ἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾‑‰⁁⁂⁖⁖ⁱ₁₁ₒ⃒⃞⃣⃣⃧℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮⴂⴧⴲⶁⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゛゜ゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒꙂ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣒꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲꥢꦂ꧂꧑ꧢꨀꨂꩂ꩒ꩢ꩸ꩼꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯲갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ!!2;C\aac|ィᅣᅩᅯᅵ�\r(*<>?AOR_üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼΟυϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵ਼ੁੁંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂೂဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌኑኟኡኪኲዬዲዻጂጅጇጎጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂᜟᜭᜲᢢᣫᤁᤁ᫂ᰂᰊᰌ᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍퟐ\ud801\uda02\uda38\uda3d\uda6e\uda77\uda77\uda86\uda86\uda9d\udaa1\udaa3\udab1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։גײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާߌ߬߶߷ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংইকপবলসিিয়ৡৣ৲৳ਇਕਪਬਲਵਸਜ਼ਫ਼ੴ੶ઇએઑઓકપબલવષિિૢૣૻૻଇକପବଲଵଷିିୟୡୣ୳୳அஅஇஐஒஔஜஞஞபரఇఎఐఒఔపబిిౚౢౣಂಂಇಎಐಒಔಪಬವಷಿಿೠೠೢೣೳഇഎഐഒഔ഼ിിൖ൘ൡൣർඁඇගඳඵලෂฃาิีโ่ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີໂໆ່່ໞ༂༂གཉཋྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙ᠢᢂᢆᢉᢪᢲᤂᤠᥒᥲᦂᦲᨂᨘᨢᩖ᪩᪩ᬈᭇᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳳ᳷᳸ᴂ᷁ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂꫝ꫟ꫢꫬꫴ꫶ꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂ힲퟍ車全flﬕײַײַﬡשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͷΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਂਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂစ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌኑኟኡኪኲዠጇጎጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂᢢᣡᤁᤁ᫂ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈';o._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\t\v\t\v\r%')111,\b#\n \b\r" !!#" #$\b$\f%&\t&'(\t()-)*,\v+*,/-.-+.0/-01)1 -`;o._serializedATN=s.join([o._serializedATNSegment0,o._serializedATNSegment1],"")}));var _t=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathLexerErrorListener=void 0;var r=p();var i=class{syntaxError(e,t,r,i,n,s){}};t([r.Override],i.prototype,"syntaxError",null);e.XPathLexerErrorListener=i}));var vt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathElement=void 0;var r=p();var i=class{constructor(e){this.nodeName=e;this.invert=false}toString(){let e=this.invert?"!":"";let t=Object.constructor.name;return t+"["+e+this.nodeName+"]"}};t([r.Override],i.prototype,"toString",null);e.XPathElement=i}));var bt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathRuleAnywhereElement=void 0;var r=p();var i=Be();var n=vt();var s=class extends n.XPathElement{constructor(e,t){super(e);this.ruleIndex=t}evaluate(e){return i.Trees.findAllRuleNodes(e,this.ruleIndex)}};t([r.Override],s.prototype,"evaluate",null);e.XPathRuleAnywhereElement=s}));var xt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathRuleElement=void 0;var r=He();var i=p();var n=Be();var s=vt();var o=class extends s.XPathElement{constructor(e,t){super(e);this.ruleIndex=t}evaluate(e){let t=[];for(let i of n.Trees.getChildren(e)){if(i instanceof r.ParserRuleContext){if(i.ruleIndex===this.ruleIndex&&!this.invert||i.ruleIndex!==this.ruleIndex&&this.invert){t.push(i)}}}return t}};t([i.Override],o.prototype,"evaluate",null);e.XPathRuleElement=o}));var Tt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathTokenAnywhereElement=void 0;var r=p();var i=Be();var n=vt();var s=class extends n.XPathElement{constructor(e,t){super(e);this.tokenType=t}evaluate(e){return i.Trees.findAllTokenNodes(e,this.tokenType)}};t([r.Override],s.prototype,"evaluate",null);e.XPathTokenAnywhereElement=s}));var wt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathTokenElement=void 0;var r=p();var i=De();var n=Be();var s=vt();var o=class extends s.XPathElement{constructor(e,t){super(e);this.tokenType=t}evaluate(e){let t=[];for(let r of n.Trees.getChildren(e)){if(r instanceof i.TerminalNode){if(r.symbol.type===this.tokenType&&!this.invert||r.symbol.type!==this.tokenType&&this.invert){t.push(r)}}}return t}};t([r.Override],o.prototype,"evaluate",null);e.XPathTokenElement=o}));var St=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathWildcardAnywhereElement=void 0;var r=p();var i=Be();var n=At();var s=vt();var o=class extends s.XPathElement{constructor(){super(n.XPath.WILDCARD)}evaluate(e){if(this.invert){return[]}return i.Trees.getDescendants(e)}};t([r.Override],o.prototype,"evaluate",null);e.XPathWildcardAnywhereElement=o}));var Et=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.XPathWildcardElement=void 0;var r=p();var i=Be();var n=At();var s=vt();var o=class extends s.XPathElement{constructor(){super(n.XPath.WILDCARD)}evaluate(e){let t=[];if(this.invert){return t}for(let r of i.Trees.getChildren(e)){t.push(r)}return t}};t([r.Override],o.prototype,"evaluate",null);e.XPathWildcardElement=o}));var At=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.XPath=void 0;var t=ot();var r=ut();var i=pe();var n=He();var s=M();var o=yt();var a=_t();var l=bt();var u=xt();var c=Tt();var h=wt();var d=St();var p=Et();var m=class{constructor(e,t){this.parser=e;this.path=t;this.elements=this.split(t)}split(e){let n=new o.XPathLexer(t.CharStreams.fromString(e));n.recover=e=>{throw e};n.removeErrorListeners();n.addErrorListener(new a.XPathLexerErrorListener);let l=new r.CommonTokenStream(n);try{l.fill()}catch(t){if(t instanceof i.LexerNoViableAltException){let r=n.charPositionInLine;let i="Invalid tokens or characters at index "+r+" in path '"+e+"' -- "+t.message;throw new RangeError(i)}throw t}let u=l.getTokens();let c=[];let h=u.length;let d=0;e:while(d<h){let e=u[d];let t;switch(e.type){case o.XPathLexer.ROOT:case o.XPathLexer.ANYWHERE:let r=e.type===o.XPathLexer.ANYWHERE;d++;t=u[d];let i=t.type===o.XPathLexer.BANG;if(i){d++;t=u[d]}let n=this.getXPathElement(t,r);n.invert=i;c.push(n);d++;break;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.RULE_REF:case o.XPathLexer.WILDCARD:c.push(this.getXPathElement(e,false));d++;break;case s.Token.EOF:break e;default:throw new Error("Unknowth path element "+e)}}return c}getXPathElement(e,t){if(e.type===s.Token.EOF){throw new Error("Missing path element at end of path")}let r=e.text;if(r==null){throw new Error("Expected wordToken to have text content.")}let i=this.parser.getTokenType(r);let n=this.parser.getRuleIndex(r);switch(e.type){case o.XPathLexer.WILDCARD:return t?new d.XPathWildcardAnywhereElement:new p.XPathWildcardElement;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.STRING:if(i===s.Token.INVALID_TYPE){throw new Error(r+" at index "+e.startIndex+" isn't a valid token name")}return t?new c.XPathTokenAnywhereElement(r,i):new h.XPathTokenElement(r,i);default:if(n===-1){throw new Error(r+" at index "+e.startIndex+" isn't a valid rule name")}return t?new l.XPathRuleAnywhereElement(r,n):new u.XPathRuleElement(r,n)}}static findAll(e,t,r){let i=new m(r,t);return i.evaluate(e)}evaluate(e){let t=new n.ParserRuleContext;t.addChild(e);let r=new Set([t]);let i=0;while(i<this.elements.length){let e=new Set;for(let t of r){if(t.childCount>0){let r=this.elements[i].evaluate(t);r.forEach(e.add,e)}}i++;r=e}return r}};e.XPath=m;m.WILDCARD="*";m.NOT="!"}));var Ct=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParseTreePattern=void 0;var i=p();var n=At();var s=class ParseTreePattern{constructor(e,t,r,i){this._matcher=e;this._patternRuleIndex=r;this._pattern=t;this._patternTree=i}match(e){return this._matcher.match(e,this)}matches(e){return this._matcher.match(e,this).succeeded}findAll(e,t){let r=n.XPath.findAll(e,t,this._matcher.parser);let i=[];for(let e of r){let t=this.match(e);if(t.succeeded){i.push(t)}}return i}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};t([i.NotNull],s.prototype,"_pattern",void 0);t([i.NotNull],s.prototype,"_patternTree",void 0);t([i.NotNull],s.prototype,"_matcher",void 0);t([i.NotNull,r(0,i.NotNull)],s.prototype,"match",null);t([r(0,i.NotNull)],s.prototype,"matches",null);t([i.NotNull,r(0,i.NotNull),r(1,i.NotNull)],s.prototype,"findAll",null);t([i.NotNull],s.prototype,"matcher",null);t([i.NotNull],s.prototype,"pattern",null);t([i.NotNull],s.prototype,"patternTree",null);s=t([r(0,i.NotNull),r(1,i.NotNull),r(3,i.NotNull)],s);e.ParseTreePattern=s}));var Nt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.RuleTagToken=void 0;var i=p();var n=M();var s=class RuleTagToken{constructor(e,t,r){if(e==null||e.length===0){throw new Error("ruleName cannot be null or empty.")}this._ruleName=e;this.bypassTokenType=t;this._label=r}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return n.Token.DEFAULT_CHANNEL}get text(){if(this._label!=null){return"<"+this._label+":"+this._ruleName+">"}return"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){return void 0}get inputStream(){return void 0}toString(){return this._ruleName+":"+this.bypassTokenType}};t([i.NotNull],s.prototype,"ruleName",null);t([i.Override],s.prototype,"channel",null);t([i.Override],s.prototype,"text",null);t([i.Override],s.prototype,"type",null);t([i.Override],s.prototype,"line",null);t([i.Override],s.prototype,"charPositionInLine",null);t([i.Override],s.prototype,"tokenIndex",null);t([i.Override],s.prototype,"startIndex",null);t([i.Override],s.prototype,"stopIndex",null);t([i.Override],s.prototype,"tokenSource",null);t([i.Override],s.prototype,"inputStream",null);t([i.Override],s.prototype,"toString",null);s=t([r(0,i.NotNull)],s);e.RuleTagToken=s}));var Ot=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Chunk=void 0;var t=class{};e.Chunk=t}));var Rt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.TagChunk=void 0;var r=Ot();var i=p();var n=class extends r.Chunk{constructor(e,t){super();if(e==null||e.length===0){throw new Error("tag cannot be null or empty")}this._tag=e;this._label=t}get tag(){return this._tag}get label(){return this._label}toString(){if(this._label!=null){return this._label+":"+this._tag}return this._tag}};t([i.NotNull],n.prototype,"tag",null);t([i.Override],n.prototype,"toString",null);e.TagChunk=n}));var kt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.TextChunk=void 0;var i=Ot();var n=p();var s=class TextChunk extends i.Chunk{constructor(e){super();if(e==null){throw new Error("text cannot be null")}this._text=e}get text(){return this._text}toString(){return"'"+this._text+"'"}};t([n.NotNull],s.prototype,"_text",void 0);t([n.NotNull],s.prototype,"text",null);t([n.Override],s.prototype,"toString",null);s=t([r(0,n.NotNull)],s);e.TextChunk=s}));var Pt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.TokenTagToken=void 0;var i=D();var n=p();var s=class TokenTagToken extends i.CommonToken{constructor(e,t,r){super(t);this._tokenName=e;this._label=r}get tokenName(){return this._tokenName}get label(){return this._label}get text(){if(this._label!=null){return"<"+this._label+":"+this._tokenName+">"}return"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};t([n.NotNull],s.prototype,"_tokenName",void 0);t([n.NotNull],s.prototype,"tokenName",null);t([n.Override],s.prototype,"text",null);t([n.Override],s.prototype,"toString",null);s=t([r(0,n.NotNull)],s);e.TokenTagToken=s}));var Lt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ParseTreePatternMatcher=void 0;var i=qt();var n=ot();var s=ut();var o=ct();var a=ht();var l=p();var u=dt();var c=pt();var h=He();var d=mt();var m=Ct();var g=v();var y=je();var _=Nt();var b=Rt();var x=De();var T=kt();var w=M();var S=Pt();var E=class{constructor(e,t){this.start="<";this.stop=">";this.escape="\\";this.escapeRE=/\\/g;this._lexer=e;this._parser=t}setDelimiters(e,t,r){if(!e){throw new Error("start cannot be null or empty")}if(!t){throw new Error("stop cannot be null or empty")}this.start=e;this.stop=t;this.escape=r;this.escapeRE=new RegExp(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(e,t,r=0){if(typeof t==="string"){let i=this.compile(t,r);return this.matches(e,i)}else{let r=new a.MultiMap;let i=this.matchImpl(e,t.patternTree,r);return!i}}match(e,t,r=0){if(typeof t==="string"){let i=this.compile(t,r);return this.match(e,i)}else{let r=new a.MultiMap;let i=this.matchImpl(e,t.patternTree,r);return new d.ParseTreeMatch(e,t,r,i)}}compile(e,t){let r=this.tokenize(e);let n=new o.ListTokenSource(r);let a=new s.CommonTokenStream(n);const l=this._parser;let h=new c.ParserInterpreter(l.grammarFileName,l.vocabulary,l.ruleNames,l.getATNWithBypassAlts(),a);let d;try{h.errorHandler=new i.BailErrorStrategy;d=h.parse(t)}catch(e){if(e instanceof u.ParseCancellationException){throw e.getCause()}else if(e instanceof g.RecognitionException){throw e}else if(e instanceof Error){throw new E.CannotInvokeStartRule(e)}else{throw e}}if(a.LA(1)!==w.Token.EOF){throw new E.StartRuleDoesNotConsumeFullPattern}return new m.ParseTreePattern(this,e,t,d)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(e,t,r){if(!e){throw new TypeError("tree cannot be null")}if(!t){throw new TypeError("patternTree cannot be null")}if(e instanceof x.TerminalNode&&t instanceof x.TerminalNode){let i;if(e.symbol.type===t.symbol.type){if(t.symbol instanceof S.TokenTagToken){let i=t.symbol;r.map(i.tokenName,e);const n=i.label;if(n){r.map(n,e)}}else if(e.text===t.text){}else{if(!i){i=e}}}else{if(!i){i=e}}return i}if(e instanceof h.ParserRuleContext&&t instanceof h.ParserRuleContext){let i;let n=this.getRuleTagToken(t);if(n){let s;if(e.ruleContext.ruleIndex===t.ruleContext.ruleIndex){r.map(n.ruleName,e);const t=n.label;if(t){r.map(t,e)}}else{if(!i){i=e}}return i}if(e.childCount!==t.childCount){if(!i){i=e}return i}let s=e.childCount;for(let i=0;i<s;i++){let n=this.matchImpl(e.getChild(i),t.getChild(i),r);if(n){return n}}return i}return e}getRuleTagToken(e){if(e instanceof y.RuleNode){if(e.childCount===1&&e.getChild(0)instanceof x.TerminalNode){let t=e.getChild(0);if(t.symbol instanceof _.RuleTagToken){return t.symbol}}}return void 0}tokenize(e){let t=this.split(e);let r=[];for(let i of t){if(i instanceof b.TagChunk){let t=i;const n=t.tag.substr(0,1);if(n===n.toUpperCase()){let i=this._parser.getTokenType(t.tag);if(i===w.Token.INVALID_TYPE){throw new Error("Unknown token "+t.tag+" in pattern: "+e)}let n=new S.TokenTagToken(t.tag,i,t.label);r.push(n)}else if(n===n.toLowerCase()){let i=this._parser.getRuleIndex(t.tag);if(i===-1){throw new Error("Unknown rule "+t.tag+" in pattern: "+e)}let n=this._parser.getATNWithBypassAlts().ruleToTokenType[i];r.push(new _.RuleTagToken(t.tag,n,t.label))}else{throw new Error("invalid tag: "+t.tag+" in pattern: "+e)}}else{let e=i;this._lexer.inputStream=n.CharStreams.fromString(e.text);let t=this._lexer.nextToken();while(t.type!==w.Token.EOF){r.push(t);t=this._lexer.nextToken()}}}return r}split(e){let t=0;let r=e.length;let i=[];let n;let s=[];let o=[];while(t<r){if(t===e.indexOf(this.escape+this.start,t)){t+=this.escape.length+this.start.length}else if(t===e.indexOf(this.escape+this.stop,t)){t+=this.escape.length+this.stop.length}else if(t===e.indexOf(this.start,t)){s.push(t);t+=this.start.length}else if(t===e.indexOf(this.stop,t)){o.push(t);t+=this.stop.length}else{t++}}if(s.length>o.length){throw new Error("unterminated tag in pattern: "+e)}if(s.length<o.length){throw new Error("missing start tag in pattern: "+e)}let a=s.length;for(let t=0;t<a;t++){if(s[t]>=o[t]){throw new Error("tag delimiters out of order in pattern: "+e)}}if(a===0){let t=e.substring(0,r);i.push(new T.TextChunk(t))}if(a>0&&s[0]>0){let t=e.substring(0,s[0]);i.push(new T.TextChunk(t))}for(let t=0;t<a;t++){let r=e.substring(s[t]+this.start.length,o[t]);let n=r;let l;let u=r.indexOf(":");if(u>=0){l=r.substring(0,u);n=r.substring(u+1,r.length)}i.push(new b.TagChunk(n,l));if(t+1<a){let r=e.substring(o[t]+this.stop.length,s[t+1]);i.push(new T.TextChunk(r))}}if(a>0){let t=o[a-1]+this.stop.length;if(t<r){let n=e.substring(t,r);i.push(new T.TextChunk(n))}}for(let e=0;e<i.length;e++){let t=i[e];if(t instanceof T.TextChunk){let r=t.text.replace(this.escapeRE,"");if(r.length<t.text.length){i[e]=new T.TextChunk(r)}}}return i}};t([l.NotNull,r(1,l.NotNull)],E.prototype,"match",null);t([l.NotNull],E.prototype,"lexer",null);t([l.NotNull],E.prototype,"parser",null);t([r(0,l.NotNull),r(1,l.NotNull),r(2,l.NotNull)],E.prototype,"matchImpl",null);e.ParseTreePatternMatcher=E;(function(e){class CannotInvokeStartRule extends Error{constructor(e){super(`CannotInvokeStartRule: ${e}`);this.error=e}}e.CannotInvokeStartRule=CannotInvokeStartRule;class StartRuleDoesNotConsumeFullPattern extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}e.StartRuleDoesNotConsumeFullPattern=StartRuleDoesNotConsumeFullPattern})(E=e.ParseTreePatternMatcher||(e.ParseTreePatternMatcher={}))}));var It=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.DecisionEventInfo=void 0;var i=p();var n=class DecisionEventInfo{constructor(e,t,r,i,n,s){this.decision=e;this.fullCtx=s;this.stopIndex=n;this.input=r;this.startIndex=i;this.state=t}};t([i.NotNull],n.prototype,"input",void 0);n=t([r(2,i.NotNull)],n);e.DecisionEventInfo=n}));var Mt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.AmbiguityInfo=void 0;var i=It();var n=p();var s=class AmbiguityInfo extends i.DecisionEventInfo{constructor(e,t,r,i,n,s){super(e,t,i,n,s,t.useContext);this.ambigAlts=r}get ambiguousAlternatives(){return this.ambigAlts}};t([n.NotNull],s.prototype,"ambigAlts",void 0);t([n.NotNull],s.prototype,"ambiguousAlternatives",null);s=t([r(1,n.NotNull),r(2,n.NotNull),r(3,n.NotNull)],s);e.AmbiguityInfo=s}));var Dt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ContextSensitivityInfo=void 0;var i=It();var n=p();var s=class ContextSensitivityInfo extends i.DecisionEventInfo{constructor(e,t,r,i,n){super(e,t,r,i,n,true)}};s=t([r(1,n.NotNull),r(2,n.NotNull)],s);e.ContextSensitivityInfo=s}));var Ft=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.DecisionInfo=void 0;var r=p();var i=class{constructor(e){this.invocations=0;this.timeInPrediction=0;this.SLL_TotalLook=0;this.SLL_MinLook=0;this.SLL_MaxLook=0;this.LL_TotalLook=0;this.LL_MinLook=0;this.LL_MaxLook=0;this.contextSensitivities=[];this.errors=[];this.ambiguities=[];this.predicateEvals=[];this.SLL_ATNTransitions=0;this.SLL_DFATransitions=0;this.LL_Fallback=0;this.LL_ATNTransitions=0;this.LL_DFATransitions=0;this.decision=e}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};t([r.Override],i.prototype,"toString",null);e.DecisionInfo=i}));var jt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ErrorInfo=void 0;var i=It();var n=p();var s=class ErrorInfo extends i.DecisionEventInfo{constructor(e,t,r,i,n){super(e,t,r,i,n,t.useContext)}};s=t([r(1,n.NotNull),r(2,n.NotNull)],s);e.ErrorInfo=s}));var Bt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LookaheadEventInfo=void 0;var i=It();var n=p();var s=class LookaheadEventInfo extends i.DecisionEventInfo{constructor(e,t,r,i,n,s,o){super(e,t,i,n,s,o);this.predictedAlt=r}};s=t([r(3,n.NotNull)],s);e.LookaheadEventInfo=s}));var Ut=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.PredicateEvalInfo=void 0;var i=It();var n=p();var s=class PredicateEvalInfo extends i.DecisionEventInfo{constructor(e,t,r,i,n,s,o,a){super(t,e,r,i,n,e.useContext);this.semctx=s;this.evalResult=o;this.predictedAlt=a}};s=t([r(0,n.NotNull),r(2,n.NotNull),r(5,n.NotNull)],s);e.PredicateEvalInfo=s}));var Ht=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.ProfilingATNSimulator=void 0;var i=Mt();var n=he();var s=$();var o=Dt();var a=Ft();var l=jt();var u=p();var c=Bt();var h=Ve();var d=Ut();var m=N();var g=Ke();var y=class extends h.ParserATNSimulator{constructor(e){super(e.interpreter.atn,e);this._startIndex=0;this._sllStopIndex=0;this._llStopIndex=0;this.currentDecision=0;this.conflictingAltResolvedBySLL=0;this.optimize_ll1=false;this.reportAmbiguities=true;this.numDecisions=this.atn.decisionToState.length;this.decisions=[];for(let e=0;e<this.numDecisions;e++){this.decisions.push(new a.DecisionInfo(e))}}adaptivePredict(e,t,r,i){if(i!==void 0){return super.adaptivePredict(e,t,r,i)}try{this._input=e;this._startIndex=e.index;this._sllStopIndex=this._startIndex-1;this._llStopIndex=-1;this.currentDecision=t;this.currentState=void 0;this.conflictingAltResolvedBySLL=n.ATN.INVALID_ALT_NUMBER;let i=process.hrtime();let s=super.adaptivePredict(e,t,r);let o=process.hrtime();let a=(o[0]-i[0])*1e9;if(a===0){a=o[1]-i[1]}else{a+=1e9-i[1]+o[1]}this.decisions[t].timeInPrediction+=a;this.decisions[t].invocations++;let l=this._sllStopIndex-this._startIndex+1;this.decisions[t].SLL_TotalLook+=l;this.decisions[t].SLL_MinLook=this.decisions[t].SLL_MinLook===0?l:Math.min(this.decisions[t].SLL_MinLook,l);if(l>this.decisions[t].SLL_MaxLook){this.decisions[t].SLL_MaxLook=l;this.decisions[t].SLL_MaxLookEvent=new c.LookaheadEventInfo(t,void 0,s,e,this._startIndex,this._sllStopIndex,false)}if(this._llStopIndex>=0){let r=this._llStopIndex-this._startIndex+1;this.decisions[t].LL_TotalLook+=r;this.decisions[t].LL_MinLook=this.decisions[t].LL_MinLook===0?r:Math.min(this.decisions[t].LL_MinLook,r);if(r>this.decisions[t].LL_MaxLook){this.decisions[t].LL_MaxLook=r;this.decisions[t].LL_MaxLookEvent=new c.LookaheadEventInfo(t,void 0,s,e,this._startIndex,this._llStopIndex,true)}}return s}finally{this._input=void 0;this.currentDecision=-1}}getStartState(e,t,r,i){let n=super.getStartState(e,t,r,i);this.currentState=n;return n}computeStartState(e,t,r){let i=super.computeStartState(e,t,r);this.currentState=i;return i}computeReachSet(e,t,r,i){if(this._input===void 0){throw new Error("Invalid state")}let n=super.computeReachSet(e,t,r,i);if(n==null){this.decisions[this.currentDecision].errors.push(new l.ErrorInfo(this.currentDecision,t,this._input,this._startIndex,this._input.index))}this.currentState=n;return n}getExistingTargetState(e,t){if(this.currentState===void 0||this._input===void 0){throw new Error("Invalid state")}if(this.currentState.useContext){this._llStopIndex=this._input.index}else{this._sllStopIndex=this._input.index}let r=super.getExistingTargetState(e,t);if(r!=null){this.currentState=new g.SimulatorState(this.currentState.outerContext,r,this.currentState.useContext,this.currentState.remainingOuterContext);if(this.currentState.useContext){this.decisions[this.currentDecision].LL_DFATransitions++}else{this.decisions[this.currentDecision].SLL_DFATransitions++}if(r===s.ATNSimulator.ERROR){let t=new g.SimulatorState(this.currentState.outerContext,e,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new l.ErrorInfo(this.currentDecision,t,this._input,this._startIndex,this._input.index))}}return r}computeTargetState(e,t,r,i,n,s){let o=super.computeTargetState(e,t,r,i,n,s);if(n){this.decisions[this.currentDecision].LL_ATNTransitions++}else{this.decisions[this.currentDecision].SLL_ATNTransitions++}return o}evalSemanticContextImpl(e,t,r){if(this.currentState===void 0||this._input===void 0){throw new Error("Invalid state")}let i=super.evalSemanticContextImpl(e,t,r);if(!(e instanceof m.SemanticContext.PrecedencePredicate)){let t=this._llStopIndex>=0;let n=t?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new d.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,n,e,i,r))}return i}reportContextSensitivity(e,t,r,i,n){if(this._input===void 0){throw new Error("Invalid state")}if(t!==this.conflictingAltResolvedBySLL){this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,r,this._input,i,n))}super.reportContextSensitivity(e,t,r,i,n)}reportAttemptingFullContext(e,t,r,i,n){if(t!=null){this.conflictingAltResolvedBySLL=t.nextSetBit(0)}else{this.conflictingAltResolvedBySLL=r.s0.configs.getRepresentedAlternatives().nextSetBit(0)}this.decisions[this.currentDecision].LL_Fallback++;super.reportAttemptingFullContext(e,t,r,i,n)}reportAmbiguity(e,t,r,s,a,l,u){if(this.currentState===void 0||this._input===void 0){throw new Error("Invalid state")}let c;if(l!=null){c=l.nextSetBit(0)}else{c=u.getRepresentedAlternatives().nextSetBit(0)}if(this.conflictingAltResolvedBySLL!==n.ATN.INVALID_ALT_NUMBER&&c!==this.conflictingAltResolvedBySLL){this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,r,s))}this.decisions[this.currentDecision].ambiguities.push(new i.AmbiguityInfo(this.currentDecision,this.currentState,l,this._input,r,s));super.reportAmbiguity(e,t,r,s,a,l,u)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};t([u.Override,r(0,u.NotNull)],y.prototype,"adaptivePredict",null);t([u.Override],y.prototype,"getStartState",null);t([u.Override],y.prototype,"computeStartState",null);t([u.Override],y.prototype,"computeReachSet",null);t([u.Override],y.prototype,"getExistingTargetState",null);t([u.Override],y.prototype,"computeTargetState",null);t([u.Override],y.prototype,"evalSemanticContextImpl",null);t([u.Override],y.prototype,"reportContextSensitivity",null);t([u.Override],y.prototype,"reportAttemptingFullContext",null);t([u.Override,r(0,u.NotNull),r(5,u.NotNull),r(6,u.NotNull)],y.prototype,"reportAmbiguity",null);e.ProfilingATNSimulator=y}));var zt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};var i=e&&e.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.Parser=void 0;var n=C();var s=ve();var o=et();var a=Vt();var l=Fe();var u=j();var c=ye();var h=p();var d=tt();var m=Ve();var g=rt();var y=J();var _=De();var v=M();var b=class{constructor(e,t){this.ruleNames=e;this.tokenStream=t}enterEveryRule(e){console.log("enter "+this.ruleNames[e.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(e){console.log("exit "+this.ruleNames[e.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(e){}visitTerminal(e){let t=e.parent.ruleContext;let r=e.symbol;console.log("consume "+r+" rule "+this.ruleNames[t.ruleIndex])}};t([h.Override],b.prototype,"enterEveryRule",null);t([h.Override],b.prototype,"exitEveryRule",null);t([h.Override],b.prototype,"visitErrorNode",null);t([h.Override],b.prototype,"visitTerminal",null);var x=class extends y.Recognizer{constructor(e){super();this._errHandler=new a.DefaultErrorStrategy;this._precedenceStack=new u.IntegerStack;this._buildParseTrees=true;this._parseListeners=[];this._syntaxErrors=0;this.matchedEOF=false;this._precedenceStack.push(0);this.inputStream=e}reset(e){if(e===void 0||e){this.inputStream.seek(0)}this._errHandler.reset(this);this._ctx=void 0;this._syntaxErrors=0;this.matchedEOF=false;this.isTrace=false;this._precedenceStack.clear();this._precedenceStack.push(0);let t=this.interpreter;if(t!=null){t.reset()}}match(e){let t=this.currentToken;if(t.type===e){if(e===v.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}else{t=this._errHandler.recoverInline(this);if(this._buildParseTrees&&t.tokenIndex===-1){this._ctx.addErrorNode(this.createErrorNode(this._ctx,t))}}return t}matchWildcard(){let e=this.currentToken;if(e.type>0){this._errHandler.reportMatch(this);this.consume()}else{e=this._errHandler.recoverInline(this);if(this._buildParseTrees&&e.tokenIndex===-1){this._ctx.addErrorNode(this.createErrorNode(this._ctx,e))}}return e}set buildParseTree(e){this._buildParseTrees=e}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(e){if(e==null){throw new TypeError("listener cannot be null")}this._parseListeners.push(e)}removeParseListener(e){let t=this._parseListeners.findIndex((t=>t===e));if(t!==-1){this._parseListeners.splice(t,1)}}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let e of this._parseListeners){if(e.enterEveryRule){e.enterEveryRule(this._ctx)}this._ctx.enterRule(e)}}triggerExitRuleEvent(){for(let e=this._parseListeners.length-1;e>=0;e--){let t=this._parseListeners[e];this._ctx.exitRule(t);if(t.exitEveryRule){t.exitEveryRule(this._ctx)}}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let e=this.serializedATN;if(e==null){throw new Error("The current parser does not support an ATN with bypass alternatives.")}let t=x.bypassAltsAtnCache.get(e);if(t==null){let r=new s.ATNDeserializationOptions;r.isGenerateRuleBypassTransitions=true;t=new o.ATNDeserializer(r).deserialize(n.toCharArray(e));x.bypassAltsAtnCache.set(e,t)}return t}compileParseTreePattern(e,t,r){return i(this,void 0,void 0,(function*(){if(!r){if(this.inputStream){let e=this.inputStream.tokenSource;if(e instanceof c.Lexer){r=e}}if(!r){throw new Error("Parser can't discover a lexer to use")}}let i=r;let n=yield Promise.resolve().then((()=>Lt()));let s=new n.ParseTreePatternMatcher(i,this);return s.compile(e,t)}))}get errorHandler(){return this._errHandler}set errorHandler(e){this._errHandler=e}get inputStream(){return this._input}set inputStream(e){this.reset(false);this._input=e}get currentToken(){return this._input.LT(1)}notifyErrorListeners(e,t,r){if(t===void 0){t=this.currentToken}else if(t===null){t=void 0}this._syntaxErrors++;let i=-1;let n=-1;if(t!=null){i=t.line;n=t.charPositionInLine}let s=this.getErrorListenerDispatch();if(s.syntaxError){s.syntaxError(this,t,i,n,e,r)}}consume(){let e=this.currentToken;if(e.type!==x.EOF){this.inputStream.consume()}let t=this._parseListeners.length!==0;if(this._buildParseTrees||t){if(this._errHandler.inErrorRecoveryMode(this)){let r=this._ctx.addErrorNode(this.createErrorNode(this._ctx,e));if(t){for(let e of this._parseListeners){if(e.visitErrorNode){e.visitErrorNode(r)}}}}else{let r=this.createTerminalNode(this._ctx,e);this._ctx.addChild(r);if(t){for(let e of this._parseListeners){if(e.visitTerminal){e.visitTerminal(r)}}}}}return e}createTerminalNode(e,t){return new _.TerminalNode(t)}createErrorNode(e,t){return new l.ErrorNode(t)}addContextToParseTree(){let e=this._ctx._parent;if(e!=null){e.addChild(this._ctx)}}enterRule(e,t,r){this.state=t;this._ctx=e;this._ctx._start=this._input.LT(1);if(this._buildParseTrees){this.addContextToParseTree()}this.triggerEnterRuleEvent()}enterLeftFactoredRule(e,t,r){this.state=t;if(this._buildParseTrees){let t=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild();t._parent=e;e.addChild(t)}this._ctx=e;this._ctx._start=this._input.LT(1);if(this._buildParseTrees){this.addContextToParseTree()}this.triggerEnterRuleEvent()}exitRule(){if(this.matchedEOF){this._ctx._stop=this._input.LT(1)}else{this._ctx._stop=this._input.tryLT(-1)}this.triggerExitRuleEvent();this.state=this._ctx.invokingState;this._ctx=this._ctx._parent}enterOuterAlt(e,t){e.altNumber=t;if(this._buildParseTrees&&this._ctx!==e){let t=this._ctx._parent;if(t!=null){t.removeLastChild();t.addChild(e)}}this._ctx=e}get precedence(){if(this._precedenceStack.isEmpty){return-1}return this._precedenceStack.peek()}enterRecursionRule(e,t,r,i){this.state=t;this._precedenceStack.push(i);this._ctx=e;this._ctx._start=this._input.LT(1);this.triggerEnterRuleEvent()}pushNewRecursionContext(e,t,r){let i=this._ctx;i._parent=e;i.invokingState=t;i._stop=this._input.tryLT(-1);this._ctx=e;this._ctx._start=i._start;if(this._buildParseTrees){this._ctx.addChild(i)}this.triggerEnterRuleEvent()}unrollRecursionContexts(e){this._precedenceStack.pop();this._ctx._stop=this._input.tryLT(-1);let t=this._ctx;if(this._parseListeners.length>0){while(this._ctx!==e){this.triggerExitRuleEvent();this._ctx=this._ctx._parent}}else{this._ctx=e}t._parent=e;if(this._buildParseTrees&&e!=null){e.addChild(t)}}getInvokingContext(e){let t=this._ctx;while(t&&t.ruleIndex!==e){t=t._parent}return t}get context(){return this._ctx}set context(e){this._ctx=e}precpred(e,t){return t>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new g.ProxyParserErrorListener(this.getErrorListeners())}inContext(e){return false}isExpectedToken(e){let t=this.interpreter.atn;let r=this._ctx;let i=t.states[this.state];let n=t.nextTokens(i);if(n.contains(e)){return true}if(!n.contains(v.Token.EPSILON)){return false}while(r!=null&&r.invokingState>=0&&n.contains(v.Token.EPSILON)){let i=t.states[r.invokingState];let s=i.transition(0);n=t.nextTokens(s.followState);if(n.contains(e)){return true}r=r._parent}if(n.contains(v.Token.EPSILON)&&e===v.Token.EOF){return true}return false}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let e=this.interpreter.atn;let t=e.states[this.state];return e.nextTokens(t)}getRuleIndex(e){let t=this.getRuleIndexMap().get(e);if(t!=null){return t}return-1}get ruleContext(){return this._ctx}getRuleInvocationStack(e=this._ctx){let t=e;let r=this.ruleNames;let i=[];while(t!=null){let e=t.ruleIndex;if(e<0){i.push("n/a")}else{i.push(r[e])}t=t._parent}return i}getDFAStrings(){let e=[];for(let t of this._interp.atn.decisionToDFA){e.push(t.toString(this.vocabulary,this.ruleNames))}return e}dumpDFA(){let e=false;for(let t of this._interp.atn.decisionToDFA){if(!t.isEmpty){if(e){console.log()}console.log("Decision "+t.decision+":");process.stdout.write(t.toString(this.vocabulary,this.ruleNames));e=true}}}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then((()=>Ht())).then((e=>{let t=this.interpreter;if(t instanceof e.ProfilingATNSimulator){return new d.ParseInfo(t)}return void 0}))}setProfile(e){return i(this,void 0,void 0,(function*(){let t=yield Promise.resolve().then((()=>Ht()));let r=this.interpreter;if(e){if(!(r instanceof t.ProfilingATNSimulator)){this.interpreter=new t.ProfilingATNSimulator(this)}}else if(r instanceof t.ProfilingATNSimulator){this.interpreter=new m.ParserATNSimulator(this.atn,this)}this.interpreter.setPredictionMode(r.getPredictionMode())}))}set isTrace(e){if(!e){if(this._tracer){this.removeParseListener(this._tracer);this._tracer=void 0}}else{if(this._tracer){this.removeParseListener(this._tracer)}else{this._tracer=new b(this.ruleNames,this._input)}this.addParseListener(this._tracer)}}get isTrace(){return this._tracer!=null}};x.bypassAltsAtnCache=new Map;t([h.NotNull],x.prototype,"_errHandler",void 0);t([h.NotNull],x.prototype,"match",null);t([h.NotNull],x.prototype,"matchWildcard",null);t([h.NotNull],x.prototype,"getParseListeners",null);t([r(0,h.NotNull)],x.prototype,"addParseListener",null);t([h.NotNull],x.prototype,"getATNWithBypassAlts",null);t([h.NotNull,r(0,h.NotNull)],x.prototype,"errorHandler",null);t([h.Override],x.prototype,"inputStream",null);t([h.NotNull],x.prototype,"currentToken",null);t([r(0,h.NotNull)],x.prototype,"enterRule",null);t([h.Override,r(0,h.Nullable)],x.prototype,"precpred",null);t([h.Override],x.prototype,"getErrorListenerDispatch",null);t([h.NotNull],x.prototype,"getExpectedTokens",null);t([h.NotNull],x.prototype,"getExpectedTokensWithinCurrentRule",null);t([h.Override],x.prototype,"parseInfo",null);e.Parser=x}));var Kt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.NoViableAltException=void 0;var r=zt();var i=v();var n=p();var s=class extends i.RecognitionException{constructor(e,t,i,n,s,o){if(e instanceof r.Parser){if(t===void 0){t=e.inputStream}if(i===void 0){i=e.currentToken}if(n===void 0){n=e.currentToken}if(o===void 0){o=e.context}}super(e,t,o);this._deadEndConfigs=s;this._startToken=i;this.setOffendingToken(e,n)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};t([n.NotNull],s.prototype,"_startToken",void 0);e.NoViableAltException=s}));var Vt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.DefaultErrorStrategy=void 0;var i=y();var n=_();var s=R();var o=k();var a=_e();var l=Kt();var u=K();var c=M();var h=p();var d=class{constructor(){this.errorRecoveryMode=false;this.lastErrorIndex=-1;this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER}reset(e){this.endErrorCondition(e)}beginErrorCondition(e){this.errorRecoveryMode=true}inErrorRecoveryMode(e){return this.errorRecoveryMode}endErrorCondition(e){this.errorRecoveryMode=false;this.lastErrorStates=void 0;this.lastErrorIndex=-1}reportMatch(e){this.endErrorCondition(e)}reportError(e,t){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);if(t instanceof l.NoViableAltException){this.reportNoViableAlternative(e,t)}else if(t instanceof o.InputMismatchException){this.reportInputMismatch(e,t)}else if(t instanceof s.FailedPredicateException){this.reportFailedPredicate(e,t)}else{console.error(`unknown recognition error type: ${t}`);this.notifyErrorListeners(e,t.toString(),t)}}notifyErrorListeners(e,t,r){let i=r.getOffendingToken(e);if(i===void 0){i=null}e.notifyErrorListeners(t,i,r)}recover(e,t){if(this.lastErrorIndex===e.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(e.state)){e.consume()}this.lastErrorIndex=e.inputStream.index;if(!this.lastErrorStates){this.lastErrorStates=new a.IntervalSet}this.lastErrorStates.add(e.state);let r=this.getErrorRecoverySet(e);this.consumeUntil(e,r)}sync(e){let t=e.interpreter.atn.states[e.state];if(this.inErrorRecoveryMode(e)){return}let r=e.inputStream;let s=r.LA(1);let a=e.atn.nextTokens(t);if(a.contains(s)){this.nextTokensContext=void 0;this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER;return}if(a.contains(c.Token.EPSILON)){if(this.nextTokensContext===void 0){this.nextTokensContext=e.context;this.nextTokensState=e.state}return}switch(t.stateType){case n.ATNStateType.BLOCK_START:case n.ATNStateType.STAR_BLOCK_START:case n.ATNStateType.PLUS_BLOCK_START:case n.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(e)){return}throw new o.InputMismatchException(e);case n.ATNStateType.PLUS_LOOP_BACK:case n.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(e);let t=e.getExpectedTokens();let r=t.or(this.getErrorRecoverySet(e));this.consumeUntil(e,r);break;default:break}}reportNoViableAlternative(e,t){let r=e.inputStream;let i;if(r){if(t.startToken.type===c.Token.EOF){i="<EOF>"}else{i=r.getTextFromRange(t.startToken,t.getOffendingToken())}}else{i="<unknown input>"}let n="no viable alternative at input "+this.escapeWSAndQuote(i);this.notifyErrorListeners(e,n,t)}reportInputMismatch(e,t){let r=t.expectedTokens;let i=r?r.toStringVocabulary(e.vocabulary):"";let n="mismatched input "+this.getTokenErrorDisplay(t.getOffendingToken(e))+" expecting "+i;this.notifyErrorListeners(e,n,t)}reportFailedPredicate(e,t){let r=e.ruleNames[e.context.ruleIndex];let i="rule "+r+" "+t.message;this.notifyErrorListeners(e,i,t)}reportUnwantedToken(e){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);let t=e.currentToken;let r=this.getTokenErrorDisplay(t);let i=this.getExpectedTokens(e);let n="extraneous input "+r+" expecting "+i.toStringVocabulary(e.vocabulary);e.notifyErrorListeners(n,t,void 0)}reportMissingToken(e){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);let t=e.currentToken;let r=this.getExpectedTokens(e);let i="missing "+r.toStringVocabulary(e.vocabulary)+" at "+this.getTokenErrorDisplay(t);e.notifyErrorListeners(i,t,void 0)}recoverInline(e){let t=this.singleTokenDeletion(e);if(t){e.consume();return t}if(this.singleTokenInsertion(e)){return this.getMissingSymbol(e)}if(this.nextTokensContext===void 0){throw new o.InputMismatchException(e)}else{throw new o.InputMismatchException(e,this.nextTokensState,this.nextTokensContext)}}singleTokenInsertion(e){let t=e.inputStream.LA(1);let r=e.interpreter.atn.states[e.state];let i=r.transition(0).target;let n=e.interpreter.atn;let s=n.nextTokens(i,u.PredictionContext.fromRuleContext(n,e.context));if(s.contains(t)){this.reportMissingToken(e);return true}return false}singleTokenDeletion(e){let t=e.inputStream.LA(2);let r=this.getExpectedTokens(e);if(r.contains(t)){this.reportUnwantedToken(e);e.consume();let t=e.currentToken;this.reportMatch(e);return t}return void 0}getMissingSymbol(e){let t=e.currentToken;let r=this.getExpectedTokens(e);let i=c.Token.INVALID_TYPE;if(!r.isNil){i=r.minElement}let n;if(i===c.Token.EOF){n="<missing EOF>"}else{n="<missing "+e.vocabulary.getDisplayName(i)+">"}let s=t;let o=e.inputStream.tryLT(-1);if(s.type===c.Token.EOF&&o!=null){s=o}return this.constructToken(e.inputStream.tokenSource,i,n,s)}constructToken(e,t,r,i){let n=e.tokenFactory;let s=i.tokenSource;let o=s?s.inputStream:void 0;return n.create({source:e,stream:o},t,r,c.Token.DEFAULT_CHANNEL,-1,-1,i.line,i.charPositionInLine)}getExpectedTokens(e){return e.getExpectedTokens()}getTokenErrorDisplay(e){if(!e){return"<no token>"}let t=this.getSymbolText(e);if(!t){if(this.getSymbolType(e)===c.Token.EOF){t="<EOF>"}else{t=`<${this.getSymbolType(e)}>`}}return this.escapeWSAndQuote(t)}getSymbolText(e){return e.text}getSymbolType(e){return e.type}escapeWSAndQuote(e){e=e.replace("\n","\\n");e=e.replace("\r","\\r");e=e.replace("\t","\\t");return"'"+e+"'"}getErrorRecoverySet(e){let t=e.interpreter.atn;let r=e.context;let i=new a.IntervalSet;while(r&&r.invokingState>=0){let e=t.states[r.invokingState];let n=e.transition(0);let s=t.nextTokens(n.followState);i.addAll(s);r=r._parent}i.remove(c.Token.EPSILON);return i}consumeUntil(e,t){let r=e.inputStream.LA(1);while(r!==c.Token.EOF&&!t.contains(r)){e.consume();r=e.inputStream.LA(1)}}};t([h.Override],d.prototype,"reset",null);t([r(0,h.NotNull)],d.prototype,"beginErrorCondition",null);t([h.Override],d.prototype,"inErrorRecoveryMode",null);t([r(0,h.NotNull)],d.prototype,"endErrorCondition",null);t([h.Override],d.prototype,"reportMatch",null);t([h.Override],d.prototype,"reportError",null);t([r(0,h.NotNull)],d.prototype,"notifyErrorListeners",null);t([h.Override],d.prototype,"recover",null);t([h.Override],d.prototype,"sync",null);t([r(0,h.NotNull),r(1,h.NotNull)],d.prototype,"reportNoViableAlternative",null);t([r(0,h.NotNull),r(1,h.NotNull)],d.prototype,"reportInputMismatch",null);t([r(0,h.NotNull),r(1,h.NotNull)],d.prototype,"reportFailedPredicate",null);t([r(0,h.NotNull)],d.prototype,"reportUnwantedToken",null);t([r(0,h.NotNull)],d.prototype,"reportMissingToken",null);t([h.Override],d.prototype,"recoverInline",null);t([r(0,h.NotNull)],d.prototype,"singleTokenInsertion",null);t([r(0,h.NotNull)],d.prototype,"singleTokenDeletion",null);t([h.NotNull,r(0,h.NotNull)],d.prototype,"getMissingSymbol",null);t([h.NotNull,r(0,h.NotNull)],d.prototype,"getExpectedTokens",null);t([r(0,h.NotNull)],d.prototype,"getSymbolText",null);t([r(0,h.NotNull)],d.prototype,"getSymbolType",null);t([h.NotNull,r(0,h.NotNull)],d.prototype,"escapeWSAndQuote",null);t([h.NotNull,r(0,h.NotNull)],d.prototype,"getErrorRecoverySet",null);t([r(0,h.NotNull),r(1,h.NotNull)],d.prototype,"consumeUntil",null);e.DefaultErrorStrategy=d}));var qt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.BailErrorStrategy=void 0;var r=Vt();var i=k();var n=p();var s=dt();var o=class extends r.DefaultErrorStrategy{recover(e,t){for(let r=e.context;r;r=r.parent){r.exception=t}throw new s.ParseCancellationException(t)}recoverInline(e){let t=new i.InputMismatchException(e);for(let r=e.context;r;r=r.parent){r.exception=t}throw new s.ParseCancellationException(t)}sync(e){}};t([n.Override],o.prototype,"recover",null);t([n.Override],o.prototype,"recoverInline",null);t([n.Override],o.prototype,"sync",null);e.BailErrorStrategy=o}));var Zt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var Gt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Dependents=void 0;var t;(function(e){e[e["SELF"]=0]="SELF";e[e["PARENTS"]=1]="PARENTS";e[e["CHILDREN"]=2]="CHILDREN";e[e["ANCESTORS"]=3]="ANCESTORS";e[e["DESCENDANTS"]=4]="DESCENDANTS";e[e["SIBLINGS"]=5]="SIBLINGS";e[e["PRECEEDING_SIBLINGS"]=6]="PRECEEDING_SIBLINGS";e[e["FOLLOWING_SIBLINGS"]=7]="FOLLOWING_SIBLINGS";e[e["PRECEEDING"]=8]="PRECEEDING";e[e["FOLLOWING"]=9]="FOLLOWING"})(t=e.Dependents||(e.Dependents={}))}));var $t=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.DiagnosticErrorListener=void 0;var i=q();var n=p();var s=I();var o=class{constructor(e=true){this.exactOnly=e;this.exactOnly=e}syntaxError(e,t,r,i,n,s){}reportAmbiguity(e,t,r,i,n,o,a){if(this.exactOnly&&!n){return}let l=this.getDecisionDescription(e,t);let u=this.getConflictingAlts(o,a);let c=e.inputStream.getText(s.Interval.of(r,i));let h=`reportAmbiguity d=${l}: ambigAlts=${u}, input='${c}'`;e.notifyErrorListeners(h)}reportAttemptingFullContext(e,t,r,i,n,o){let a="reportAttemptingFullContext d=%s, input='%s'";let l=this.getDecisionDescription(e,t);let u=e.inputStream.getText(s.Interval.of(r,i));let c=`reportAttemptingFullContext d=${l}, input='${u}'`;e.notifyErrorListeners(c)}reportContextSensitivity(e,t,r,i,n,o){let a="reportContextSensitivity d=%s, input='%s'";let l=this.getDecisionDescription(e,t);let u=e.inputStream.getText(s.Interval.of(r,i));let c=`reportContextSensitivity d=${l}, input='${u}'`;e.notifyErrorListeners(c)}getDecisionDescription(e,t){let r=t.decision;let i=t.atnStartState.ruleIndex;let n=e.ruleNames;if(i<0||i>=n.length){return r.toString()}let s=n[i];if(!s){return r.toString()}return`${r} (${s})`}getConflictingAlts(e,t){if(e!=null){return e}let r=new i.BitSet;for(let e of t){r.set(e.alt)}return r}};t([n.Override],o.prototype,"syntaxError",null);t([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(6,n.NotNull)],o.prototype,"reportAmbiguity",null);t([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(5,n.NotNull)],o.prototype,"reportAttemptingFullContext",null);t([n.Override,r(0,n.NotNull),r(1,n.NotNull),r(5,n.NotNull)],o.prototype,"reportContextSensitivity",null);t([r(0,n.NotNull),r(1,n.NotNull)],o.prototype,"getDecisionDescription",null);t([n.NotNull,r(1,n.NotNull)],o.prototype,"getConflictingAlts",null);e.DiagnosticErrorListener=o}));var Wt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.LexerInterpreter=void 0;var i=ye();var n=ge();var s=p();var o=p();var a=class LexerInterpreter extends i.Lexer{constructor(e,t,r,i,s,o,a){super(a);if(o.grammarType!==0){throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.")}this._grammarFileName=e;this._atn=o;this._ruleNames=r.slice(0);this._channelNames=i.slice(0);this._modeNames=s.slice(0);this._vocabulary=t;this._interp=new n.LexerATNSimulator(o,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};t([s.NotNull],a.prototype,"_vocabulary",void 0);t([o.Override],a.prototype,"atn",null);t([o.Override],a.prototype,"grammarFileName",null);t([o.Override],a.prototype,"ruleNames",null);t([o.Override],a.prototype,"channelNames",null);t([o.Override],a.prototype,"modeNames",null);t([o.Override],a.prototype,"vocabulary",null);a=t([r(1,s.NotNull)],a);e.LexerInterpreter=a}));var Yt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var Jt=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.RuleContextWithAltNum=void 0;var r=he();var i=p();var n=He();var s=class extends n.ParserRuleContext{constructor(e,t){if(t!==void 0){super(e,t)}else{super()}this._altNumber=r.ATN.INVALID_ALT_NUMBER}get altNumber(){return this._altNumber}set altNumber(e){this._altNumber=e}};t([i.Override],s.prototype,"altNumber",null);e.RuleContextWithAltNum=s}));var Qt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RuleDependency=void 0;function RuleDependency(e){return(e,t,r)=>{}}e.RuleDependency=RuleDependency}));var Xt=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.RuleVersion=void 0;function RuleVersion(e){return(e,t,r)=>{}}e.RuleVersion=RuleVersion}));var er=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var tr=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var rr=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var ir=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};Object.defineProperty(e,"__esModule",{value:true});e.RewriteOperation=e.TokenStreamRewriter=void 0;var r=I();var i=p();var n=M();var s=class{constructor(e){this.tokens=e;this.programs=new Map;this.programs.set(s.DEFAULT_PROGRAM_NAME,[]);this.lastRewriteTokenIndexes=new Map}getTokenStream(){return this.tokens}rollback(e,t=s.DEFAULT_PROGRAM_NAME){let r=this.programs.get(t);if(r!=null){this.programs.set(t,r.slice(s.MIN_TOKEN_INDEX,e))}}deleteProgram(e=s.DEFAULT_PROGRAM_NAME){this.rollback(s.MIN_TOKEN_INDEX,e)}insertAfter(e,t,r=s.DEFAULT_PROGRAM_NAME){let i;if(typeof e==="number"){i=e}else{i=e.tokenIndex}let n=this.getProgram(r);let o=new l(this.tokens,i,n.length,t);n.push(o)}insertBefore(e,t,r=s.DEFAULT_PROGRAM_NAME){let i;if(typeof e==="number"){i=e}else{i=e.tokenIndex}let n=this.getProgram(r);let o=new a(this.tokens,i,n.length,t);n.push(o)}replaceSingle(e,t){if(typeof e==="number"){this.replace(e,e,t)}else{this.replace(e,e,t)}}replace(e,t,r,i=s.DEFAULT_PROGRAM_NAME){if(typeof e!=="number"){e=e.tokenIndex}if(typeof t!=="number"){t=t.tokenIndex}if(e>t||e<0||t<0||t>=this.tokens.size){throw new RangeError(`replace: range invalid: ${e}..${t}(size=${this.tokens.size})`)}let n=this.getProgram(i);let o=new u(this.tokens,e,t,n.length,r);n.push(o)}delete(e,t,r=s.DEFAULT_PROGRAM_NAME){if(t===void 0){t=e}if(typeof e==="number"){this.replace(e,t,"",r)}else{this.replace(e,t,"",r)}}getLastRewriteTokenIndex(e=s.DEFAULT_PROGRAM_NAME){let t=this.lastRewriteTokenIndexes.get(e);if(t==null){return-1}return t}setLastRewriteTokenIndex(e,t){this.lastRewriteTokenIndexes.set(e,t)}getProgram(e){let t=this.programs.get(e);if(t==null){t=this.initializeProgram(e)}return t}initializeProgram(e){let t=[];this.programs.set(e,t);return t}getText(e,t=s.DEFAULT_PROGRAM_NAME){let i;if(e instanceof r.Interval){i=e}else{i=r.Interval.of(0,this.tokens.size-1)}if(typeof e==="string"){t=e}let o=this.programs.get(t);let a=i.a;let l=i.b;if(l>this.tokens.size-1){l=this.tokens.size-1}if(a<0){a=0}if(o==null||o.length===0){return this.tokens.getText(i)}let u=[];let c=this.reduceToSingleOperationPerIndex(o);let h=a;while(h<=l&&h<this.tokens.size){let e=c.get(h);c.delete(h);let t=this.tokens.get(h);if(e==null){if(t.type!==n.Token.EOF){u.push(String(t.text))}h++}else{h=e.execute(u)}}if(l===this.tokens.size-1){for(let e of c.values()){if(e.index>=this.tokens.size-1){u.push(e.text.toString())}}}return u.join("")}reduceToSingleOperationPerIndex(e){for(let t=0;t<e.length;t++){let r=e[t];if(r==null){continue}if(!(r instanceof u)){continue}let i=r;let n=this.getKindOfOps(e,a,t);for(let t of n){if(t.index===i.index){e[t.instructionIndex]=void 0;i.text=t.text.toString()+(i.text!=null?i.text.toString():"")}else if(t.index>i.index&&t.index<=i.lastIndex){e[t.instructionIndex]=void 0}}let s=this.getKindOfOps(e,u,t);for(let t of s){if(t.index>=i.index&&t.lastIndex<=i.lastIndex){e[t.instructionIndex]=void 0;continue}let r=t.lastIndex<i.index||t.index>i.lastIndex;if(t.text==null&&i.text==null&&!r){e[t.instructionIndex]=void 0;i.index=Math.min(t.index,i.index);i.lastIndex=Math.max(t.lastIndex,i.lastIndex)}else if(!r){throw new Error(`replace op boundaries of ${i} overlap with previous ${t}`)}}}for(let t=0;t<e.length;t++){let r=e[t];if(r==null){continue}if(!(r instanceof a)){continue}let i=r;let n=this.getKindOfOps(e,a,t);for(let t of n){if(t.index===i.index){if(t instanceof l){i.text=this.catOpText(t.text,i.text);e[t.instructionIndex]=void 0}else if(t instanceof a){i.text=this.catOpText(i.text,t.text);e[t.instructionIndex]=void 0}}}let s=this.getKindOfOps(e,u,t);for(let r of s){if(i.index===r.index){r.text=this.catOpText(i.text,r.text);e[t]=void 0;continue}if(i.index>=r.index&&i.index<=r.lastIndex){throw new Error(`insert op ${i} within boundaries of previous ${r}`)}}}let t=new Map;for(let r of e){if(r==null){continue}if(t.get(r.index)!=null){throw new Error("should only be one op per index")}t.set(r.index,r)}return t}catOpText(e,t){let r="";let i="";if(e!=null){r=e.toString()}if(t!=null){i=t.toString()}return r+i}getKindOfOps(e,t,r){let i=[];for(let n=0;n<r&&n<e.length;n++){let r=e[n];if(r==null){continue}if(r instanceof t){i.push(r)}}return i}};e.TokenStreamRewriter=s;s.DEFAULT_PROGRAM_NAME="default";s.PROGRAM_INIT_SIZE=100;s.MIN_TOKEN_INDEX=0;var o=class{constructor(e,t,r,i){this.tokens=e;this.instructionIndex=r;this.index=t;this.text=i===void 0?"":i}execute(e){return this.index}toString(){let e=this.constructor.name;let t=e.indexOf("$");e=e.substring(t+1,e.length);return"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}};t([i.Override],o.prototype,"toString",null);e.RewriteOperation=o;var a=class extends o{constructor(e,t,r,i){super(e,t,r,i)}execute(e){e.push(this.text.toString());if(this.tokens.get(this.index).type!==n.Token.EOF){e.push(String(this.tokens.get(this.index).text))}return this.index+1}};t([i.Override],a.prototype,"execute",null);var l=class extends a{constructor(e,t,r,i){super(e,t+1,r,i)}};var u=class extends o{constructor(e,t,r,i,n){super(e,t,i,n);this.lastIndex=r}execute(e){if(this.text!=null){e.push(this.text.toString())}return this.lastIndex+1}toString(){if(this.text==null){return"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">"}return"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}};t([i.Override],u.prototype,"execute",null);t([i.Override],u.prototype,"toString",null)}));var nr=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var sr=__commonJS((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:true})}));var ar=__commonJS((e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,i){if(i===void 0)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===void 0)i=r;e[i]=t[r]});var r=e&&e.__exportStar||function(e,r){for(var i in e)if(i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i))t(r,e,i)};Object.defineProperty(e,"__esModule",{value:true});r(h(),e);r(d(),e);r(g(),e);r(qt(),e);r(at(),e);r(Zt(),e);r(ot(),e);r(nt(),e);r(st(),e);r(D(),e);r(F(),e);r(ut(),e);r(W(),e);r(Vt(),e);r(Gt(),e);r($t(),e);r(R(),e);r(k(),e);r(ft(),e);r(m(),e);r(ye(),e);r(Wt(),e);r(pe(),e);r(ct(),e);r(Kt(),e);r(zt(),e);r(Yt(),e);r(pt(),e);r(He(),e);r(Y(),e);r(rt(),e);r(v(),e);r(J(),e);r(Ue(),e);r(Jt(),e);r(Qt(),e);r(Xt(),e);r(M(),e);r(er(),e);r(tr(),e);r(rr(),e);r(ir(),e);r(nr(),e);r(Q(),e);r(sr(),e)}));var lr=__commonJS((e=>{"use strict";var t=e&&e.__decorate||function(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)if(o=e[a])s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s;return n>3&&s&&Object.defineProperty(t,r,s),s};var r=e&&e.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(e,"__esModule",{value:true});e.AbstractParseTreeVisitor=void 0;var i=p();var n=class{visit(e){return e.accept(this)}visitChildren(e){let t=this.defaultResult();let r=e.childCount;for(let i=0;i<r;i++){if(!this.shouldVisitNextChild(e,t)){break}let r=e.getChild(i);let n=r.accept(this);t=this.aggregateResult(t,n)}return t}visitTerminal(e){return this.defaultResult()}visitErrorNode(e){return this.defaultResult()}aggregateResult(e,t){return t}shouldVisitNextChild(e,t){return true}};t([i.Override,r(0,i.NotNull)],n.prototype,"visit",null);t([i.Override,r(0,i.NotNull)],n.prototype,"visitChildren",null);t([i.Override,r(0,i.NotNull)],n.prototype,"visitTerminal",null);t([i.Override,r(0,i.NotNull)],n.prototype,"visitErrorNode",null);t([r(0,i.NotNull)],n.prototype,"shouldVisitNextChild",null);e.AbstractParseTreeVisitor=n}));var ur=__commonJS(((e,t)=>{function arrayToString(e){return Array.isArray(e)?"["+e.join(", ")+"]":"null"}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32));String.prototype.hashCode=function(){const e=this.toString();let t,r;const i=e.length&3;const n=e.length-i;let s=String.prototype.seed;const o=3432918353;const a=461845907;let l=0;while(l<n){r=e.charCodeAt(l)&255|(e.charCodeAt(++l)&255)<<8|(e.charCodeAt(++l)&255)<<16|(e.charCodeAt(++l)&255)<<24;++l;r=(r&65535)*o+(((r>>>16)*o&65535)<<16)&4294967295;r=r<<15|r>>>17;r=(r&65535)*a+(((r>>>16)*a&65535)<<16)&4294967295;s^=r;s=s<<13|s>>>19;t=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295;s=(t&65535)+27492+(((t>>>16)+58964&65535)<<16)}r=0;switch(i){case 3:r^=(e.charCodeAt(l+2)&255)<<16;case 2:r^=(e.charCodeAt(l+1)&255)<<8;case 1:r^=e.charCodeAt(l)&255;r=(r&65535)*o+(((r>>>16)*o&65535)<<16)&4294967295;r=r<<15|r>>>17;r=(r&65535)*a+(((r>>>16)*a&65535)<<16)&4294967295;s^=r}s^=e.length;s^=s>>>16;s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295;s^=s>>>13;s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295;s^=s>>>16;return s>>>0};function standardEqualsFunction(e,t){return e?e.equals(t):e==t}function standardHashCodeFunction(e){return e?e.hashCode():-1}var r=class{constructor(e,t){this.data={};this.hashFunction=e||standardHashCodeFunction;this.equalsFunction=t||standardEqualsFunction}add(e){const t=this.hashFunction(e);const r="hash_"+t;if(r in this.data){const t=this.data[r];for(let r=0;r<t.length;r++){if(this.equalsFunction(e,t[r])){return t[r]}}t.push(e);return e}else{this.data[r]=[e];return e}}contains(e){return this.get(e)!=null}get(e){const t=this.hashFunction(e);const r="hash_"+t;if(r in this.data){const t=this.data[r];for(let r=0;r<t.length;r++){if(this.equalsFunction(e,t[r])){return t[r]}}}return null}values(){let e=[];for(const t in this.data){if(t.indexOf("hash_")===0){e=e.concat(this.data[t])}}return e}toString(){return arrayToString(this.values())}get length(){let e=0;for(const t in this.data){if(t.indexOf("hash_")===0){e=e+this.data[t].length}}return e}};var i=class{constructor(){this.data=[]}add(e){this.data[e]=true}or(e){const t=this;Object.keys(e.data).map((function(e){t.add(e)}))}remove(e){delete this.data[e]}contains(e){return this.data[e]===true}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){const e=new a;e.update(this.values());return e.finish()}equals(e){if(!(e instanceof i)){return false}return this.hashCode()===e.hashCode()}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.values().length}};var n=class{constructor(e,t){this.data={};this.hashFunction=e||standardHashCodeFunction;this.equalsFunction=t||standardEqualsFunction}put(e,t){const r="hash_"+this.hashFunction(e);if(r in this.data){const i=this.data[r];for(let r=0;r<i.length;r++){const n=i[r];if(this.equalsFunction(e,n.key)){const e=n.value;n.value=t;return e}}i.push({key:e,value:t});return t}else{this.data[r]=[{key:e,value:t}];return t}}containsKey(e){const t="hash_"+this.hashFunction(e);if(t in this.data){const r=this.data[t];for(let t=0;t<r.length;t++){const i=r[t];if(this.equalsFunction(e,i.key))return true}}return false}get(e){const t="hash_"+this.hashFunction(e);if(t in this.data){const r=this.data[t];for(let t=0;t<r.length;t++){const i=r[t];if(this.equalsFunction(e,i.key))return i.value}}return null}entries(){let e=[];for(const t in this.data){if(t.indexOf("hash_")===0){e=e.concat(this.data[t])}}return e}getKeys(){return this.entries().map((function(e){return e.key}))}getValues(){return this.entries().map((function(e){return e.value}))}toString(){const e=this.entries().map((function(e){return"{"+e.key+":"+e.value+"}"}));return"["+e.join(", ")+"]"}get length(){let e=0;for(const t in this.data){if(t.indexOf("hash_")===0){e=e+this.data[t].length}}return e}};var s=class{constructor(){this.data={}}get(e){e="k-"+e;if(e in this.data){return this.data[e]}else{return null}}put(e,t){e="k-"+e;this.data[e]=t}values(){const e=this.data;const t=Object.keys(this.data);return t.map((function(t){return e[t]}))}};var o=class{constructor(e){this.defaultMapCtor=e||n;this.cacheMap=new this.defaultMapCtor}get(e,t){const r=this.cacheMap.get(e)||null;return r===null?null:r.get(t)||null}set(e,t,r){let i=this.cacheMap.get(e)||null;if(i===null){i=new this.defaultMapCtor;this.cacheMap.put(e,i)}i.put(t,r)}};var a=class{constructor(){this.count=0;this.hash=0}update(){for(let e=0;e<arguments.length;e++){const t=arguments[e];if(t==null)continue;if(Array.isArray(t))this.update.apply(this,t);else{let e=0;switch(typeof t){case"undefined":case"function":continue;case"number":case"boolean":e=t;break;case"string":e=t.hashCode();break;default:if(t.updateHashCode)t.updateHashCode(this);else console.log("No updateHashCode for "+t.toString());continue}e=e*3432918353;e=e<<15|e>>>32-15;e=e*461845907;this.count=this.count+1;let r=this.hash^e;r=r<<13|r>>>32-13;r=r*5+3864292196;this.hash=r}}}finish(){let e=this.hash^this.count*4;e=e^e>>>16;e=e*2246822507;e=e^e>>>13;e=e*3266489909;e=e^e>>>16;return e}};function hashStuff(){const e=new a;e.update.apply(e,arguments);return e.finish()}function escapeWhitespace(e,t){e=e.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r");if(t){e=e.replace(/ /g,"·")}return e}function titleCase(e){return e.replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1)}))}function equalArrays(e,t){if(!Array.isArray(e)||!Array.isArray(t))return false;if(e===t)return true;if(e.length!==t.length)return false;for(let r=0;r<e.length;r++){if(e[r]===t[r])continue;if(!e[r].equals||!e[r].equals(t[r]))return false}return true}t.exports={Hash:a,Set:r,Map:n,BitSet:i,AltDict:s,DoubleDict:o,hashStuff:hashStuff,escapeWhitespace:escapeWhitespace,arrayToString:arrayToString,titleCase:titleCase,equalArrays:equalArrays}}));var cr=__commonJS(((e,t)=>{var r=class{constructor(){this.source=null;this.type=null;this.channel=null;this.start=null;this.stop=null;this.tokenIndex=null;this.line=null;this.column=null;this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(e){this._text=e}};r.INVALID_TYPE=0;r.EPSILON=-2;r.MIN_USER_TOKEN_TYPE=1;r.EOF=-1;r.DEFAULT_CHANNEL=0;r.HIDDEN_CHANNEL=1;var i=class extends r{constructor(e,t,n,s,o){super();this.source=e!==void 0?e:i.EMPTY_SOURCE;this.type=t!==void 0?t:null;this.channel=n!==void 0?n:r.DEFAULT_CHANNEL;this.start=s!==void 0?s:-1;this.stop=o!==void 0?o:-1;this.tokenIndex=-1;if(this.source[0]!==null){this.line=e[0].line;this.column=e[0].column}else{this.column=-1}}clone(){const e=new i(this.source,this.type,this.channel,this.start,this.stop);e.tokenIndex=this.tokenIndex;e.line=this.line;e.column=this.column;e.text=this.text;return e}toString(){let e=this.text;if(e!==null){e=e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}else{e="<no text>"}return"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(this._text!==null){return this._text}const e=this.getInputStream();if(e===null){return null}const t=e.size;if(this.start<t&&this.stop<t){return e.getText(this.start,this.stop)}else{return"<EOF>"}}set text(e){this._text=e}};i.EMPTY_SOURCE=[null,null];t.exports={Token:r,CommonToken:i}}));var hr=__commonJS(((e,t)=>{var r=class{constructor(){this.atn=null;this.stateNumber=r.INVALID_STATE_NUMBER;this.stateType=null;this.ruleIndex=0;this.epsilonOnlyTransitions=false;this.transitions=[];this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(e){if(e instanceof r){return this.stateNumber===e.stateNumber}else{return false}}isNonGreedyExitState(){return false}addTransition(e,t){if(t===void 0){t=-1}if(this.transitions.length===0){this.epsilonOnlyTransitions=e.isEpsilon}else if(this.epsilonOnlyTransitions!==e.isEpsilon){this.epsilonOnlyTransitions=false}if(t===-1){this.transitions.push(e)}else{this.transitions.splice(t,1,e)}}};r.INVALID_TYPE=0;r.BASIC=1;r.RULE_START=2;r.BLOCK_START=3;r.PLUS_BLOCK_START=4;r.STAR_BLOCK_START=5;r.TOKEN_START=6;r.RULE_STOP=7;r.BLOCK_END=8;r.STAR_LOOP_BACK=9;r.STAR_LOOP_ENTRY=10;r.PLUS_LOOP_BACK=11;r.LOOP_END=12;r.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"];r.INVALID_STATE_NUMBER=-1;var i=class extends r{constructor(){super();this.stateType=r.BASIC}};var n=class extends r{constructor(){super();this.decision=-1;this.nonGreedy=false;return this}};var s=class extends n{constructor(){super();this.endState=null;return this}};var o=class extends s{constructor(){super();this.stateType=r.BLOCK_START;return this}};var a=class extends r{constructor(){super();this.stateType=r.BLOCK_END;this.startState=null;return this}};var l=class extends r{constructor(){super();this.stateType=r.RULE_STOP;return this}};var u=class extends r{constructor(){super();this.stateType=r.RULE_START;this.stopState=null;this.isPrecedenceRule=false;return this}};var c=class extends n{constructor(){super();this.stateType=r.PLUS_LOOP_BACK;return this}};var h=class extends s{constructor(){super();this.stateType=r.PLUS_BLOCK_START;this.loopBackState=null;return this}};var d=class extends s{constructor(){super();this.stateType=r.STAR_BLOCK_START;return this}};var p=class extends r{constructor(){super();this.stateType=r.STAR_LOOP_BACK;return this}};var m=class extends n{constructor(){super();this.stateType=r.STAR_LOOP_ENTRY;this.loopBackState=null;this.isPrecedenceDecision=null;return this}};var g=class extends r{constructor(){super();this.stateType=r.LOOP_END;this.loopBackState=null;return this}};var y=class extends n{constructor(){super();this.stateType=r.TOKEN_START;return this}};t.exports={ATNState:r,BasicState:i,DecisionState:n,BlockStartState:s,BlockEndState:a,LoopEndState:g,RuleStartState:u,RuleStopState:l,TokensStartState:y,PlusLoopbackState:c,StarLoopbackState:p,StarLoopEntryState:m,PlusBlockStartState:h,StarBlockStartState:d,BasicBlockStartState:o}}));var dr=__commonJS(((e,t)=>{var{Set:r,Hash:i,equalArrays:n}=ur();var s=class{hashCode(){const e=new i;this.updateHashCode(e);return e.finish()}evaluate(e,t){}evalPrecedence(e,t){return this}static andContext(e,t){if(e===null||e===s.NONE){return t}if(t===null||t===s.NONE){return e}const r=new l(e,t);if(r.opnds.length===1){return r.opnds[0]}else{return r}}static orContext(e,t){if(e===null){return t}if(t===null){return e}if(e===s.NONE||t===s.NONE){return s.NONE}const r=new u(e,t);if(r.opnds.length===1){return r.opnds[0]}else{return r}}};var o=class extends s{constructor(e,t,r){super();this.ruleIndex=e===void 0?-1:e;this.predIndex=t===void 0?-1:t;this.isCtxDependent=r===void 0?false:r}evaluate(e,t){const r=this.isCtxDependent?t:null;return e.sempred(r,this.ruleIndex,this.predIndex)}updateHashCode(e){e.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(e){if(this===e){return true}else if(!(e instanceof o)){return false}else{return this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent}}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}};s.NONE=new o;var a=class extends s{constructor(e){super();this.precedence=e===void 0?0:e}evaluate(e,t){return e.precpred(t,this.precedence)}evalPrecedence(e,t){if(e.precpred(t,this.precedence)){return s.NONE}else{return null}}compareTo(e){return this.precedence-e.precedence}updateHashCode(e){e.update(this.precedence)}equals(e){if(this===e){return true}else if(!(e instanceof a)){return false}else{return this.precedence===e.precedence}}toString(){return"{"+this.precedence+">=prec}?"}static filterPrecedencePredicates(e){const t=[];e.values().map((function(e){if(e instanceof a){t.push(e)}}));return t}};var l=class extends s{constructor(e,t){super();const i=new r;if(e instanceof l){e.opnds.map((function(e){i.add(e)}))}else{i.add(e)}if(t instanceof l){t.opnds.map((function(e){i.add(e)}))}else{i.add(t)}const n=a.filterPrecedencePredicates(i);if(n.length>0){let e=null;n.map((function(t){if(e===null||t.precedence<e.precedence){e=t}}));i.add(e)}this.opnds=Array.from(i.values())}equals(e){if(this===e){return true}else if(!(e instanceof l)){return false}else{return n(this.opnds,e.opnds)}}updateHashCode(e){e.update(this.opnds,"AND")}evaluate(e,t){for(let r=0;r<this.opnds.length;r++){if(!this.opnds[r].evaluate(e,t)){return false}}return true}evalPrecedence(e,t){let r=false;const i=[];for(let n=0;n<this.opnds.length;n++){const o=this.opnds[n];const a=o.evalPrecedence(e,t);r|=a!==o;if(a===null){return null}else if(a!==s.NONE){i.push(a)}}if(!r){return this}if(i.length===0){return s.NONE}let n=null;i.map((function(e){n=n===null?e:s.andContext(n,e)}));return n}toString(){const e=this.opnds.map((e=>e.toString()));return(e.length>3?e.slice(3):e).join("&&")}};var u=class extends s{constructor(e,t){super();const i=new r;if(e instanceof u){e.opnds.map((function(e){i.add(e)}))}else{i.add(e)}if(t instanceof u){t.opnds.map((function(e){i.add(e)}))}else{i.add(t)}const n=a.filterPrecedencePredicates(i);if(n.length>0){const e=n.sort((function(e,t){return e.compareTo(t)}));const t=e[e.length-1];i.add(t)}this.opnds=Array.from(i.values())}equals(e){if(this===e){return true}else if(!(e instanceof u)){return false}else{return n(this.opnds,e.opnds)}}updateHashCode(e){e.update(this.opnds,"OR")}evaluate(e,t){for(let r=0;r<this.opnds.length;r++){if(this.opnds[r].evaluate(e,t)){return true}}return false}evalPrecedence(e,t){let r=false;const i=[];for(let n=0;n<this.opnds.length;n++){const o=this.opnds[n];const a=o.evalPrecedence(e,t);r|=a!==o;if(a===s.NONE){return s.NONE}else if(a!==null){i.push(a)}}if(!r){return this}if(i.length===0){return null}const n=null;i.map((function(e){return n===null?e:s.orContext(n,e)}));return n}toString(){const e=this.opnds.map((e=>e.toString()));return(e.length>3?e.slice(3):e).join("||")}};t.exports={SemanticContext:s,PrecedencePredicate:a,Predicate:o}}));var fr=__commonJS(((e,t)=>{var{DecisionState:r}=hr();var{SemanticContext:i}=dr();var{Hash:n}=ur();function checkParams(e,t){if(e===null){const e={state:null,alt:null,context:null,semanticContext:null};if(t){e.reachesIntoOuterContext=0}return e}else{const r={};r.state=e.state||null;r.alt=e.alt===void 0?null:e.alt;r.context=e.context||null;r.semanticContext=e.semanticContext||null;if(t){r.reachesIntoOuterContext=e.reachesIntoOuterContext||0;r.precedenceFilterSuppressed=e.precedenceFilterSuppressed||false}return r}}var s=class{constructor(e,t){this.checkContext(e,t);e=checkParams(e);t=checkParams(t,true);this.state=e.state!==null?e.state:t.state;this.alt=e.alt!==null?e.alt:t.alt;this.context=e.context!==null?e.context:t.context;this.semanticContext=e.semanticContext!==null?e.semanticContext:t.semanticContext!==null?t.semanticContext:i.NONE;this.reachesIntoOuterContext=t.reachesIntoOuterContext;this.precedenceFilterSuppressed=t.precedenceFilterSuppressed}checkContext(e,t){if((e.context===null||e.context===void 0)&&(t===null||t.context===null||t.context===void 0)){this.context=null}}hashCode(){const e=new n;this.updateHashCode(e);return e.finish()}updateHashCode(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(e){if(this===e){return true}else if(!(e instanceof s)){return false}else{return this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&(this.context===null?e.context===null:this.context.equals(e.context))&&this.semanticContext.equals(e.semanticContext)&&this.precedenceFilterSuppressed===e.precedenceFilterSuppressed}}hashCodeForConfigSet(){const e=new n;e.update(this.state.stateNumber,this.alt,this.semanticContext);return e.finish()}equalsForConfigSet(e){if(this===e){return true}else if(!(e instanceof s)){return false}else{return this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.semanticContext.equals(e.semanticContext)}}toString(){return"("+this.state+","+this.alt+(this.context!==null?",["+this.context.toString()+"]":"")+(this.semanticContext!==i.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}};var o=class extends s{constructor(e,t){super(e,t);const r=e.lexerActionExecutor||null;this.lexerActionExecutor=r||(t!==null?t.lexerActionExecutor:null);this.passedThroughNonGreedyDecision=t!==null?this.checkNonGreedyDecision(t,this.state):false;this.hashCodeForConfigSet=o.prototype.hashCode;this.equalsForConfigSet=o.prototype.equals;return this}updateHashCode(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}equals(e){return this===e||e instanceof o&&this.passedThroughNonGreedyDecision===e.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(e.lexerActionExecutor):!e.lexerActionExecutor)&&super.equals(e)}checkNonGreedyDecision(e,t){return e.passedThroughNonGreedyDecision||t instanceof r&&t.nonGreedy}};t.exports.ATNConfig=s;t.exports.LexerATNConfig=o}));var pr=__commonJS(((e,t)=>{var{Token:r}=cr();var i=class{constructor(e,t){this.start=e;this.stop=t}contains(e){return e>=this.start&&e<this.stop}toString(){if(this.start===this.stop-1){return this.start.toString()}else{return this.start.toString()+".."+(this.stop-1).toString()}}get length(){return this.stop-this.start}};var n=class{constructor(){this.intervals=null;this.readOnly=false}first(e){if(this.intervals===null||this.intervals.length===0){return r.INVALID_TYPE}else{return this.intervals[0].start}}addOne(e){this.addInterval(new i(e,e+1))}addRange(e,t){this.addInterval(new i(e,t+1))}addInterval(e){if(this.intervals===null){this.intervals=[];this.intervals.push(e)}else{for(let t=0;t<this.intervals.length;t++){const r=this.intervals[t];if(e.stop<r.start){this.intervals.splice(t,0,e);return}else if(e.stop===r.start){this.intervals[t].start=e.start;return}else if(e.start<=r.stop){this.intervals[t]=new i(Math.min(r.start,e.start),Math.max(r.stop,e.stop));this.reduce(t);return}}this.intervals.push(e)}}addSet(e){if(e.intervals!==null){e.intervals.forEach((e=>this.addInterval(e)),this)}return this}reduce(e){if(e<this.intervals.length-1){const t=this.intervals[e];const r=this.intervals[e+1];if(t.stop>=r.stop){this.intervals.splice(e+1,1);this.reduce(e)}else if(t.stop>=r.start){this.intervals[e]=new i(t.start,r.stop);this.intervals.splice(e+1,1)}}}complement(e,t){const r=new n;r.addInterval(new i(e,t+1));if(this.intervals!==null)this.intervals.forEach((e=>r.removeRange(e)));return r}contains(e){if(this.intervals===null){return false}else{for(let t=0;t<this.intervals.length;t++){if(this.intervals[t].contains(e)){return true}}return false}}removeRange(e){if(e.start===e.stop-1){this.removeOne(e.start)}else if(this.intervals!==null){let t=0;for(let r=0;r<this.intervals.length;r++){const r=this.intervals[t];if(e.stop<=r.start){return}else if(e.start>r.start&&e.stop<r.stop){this.intervals[t]=new i(r.start,e.start);const n=new i(e.stop,r.stop);this.intervals.splice(t,0,n);return}else if(e.start<=r.start&&e.stop>=r.stop){this.intervals.splice(t,1);t=t-1}else if(e.start<r.stop){this.intervals[t]=new i(r.start,e.start)}else if(e.stop<r.stop){this.intervals[t]=new i(e.stop,r.stop)}t+=1}}}removeOne(e){if(this.intervals!==null){for(let t=0;t<this.intervals.length;t++){const r=this.intervals[t];if(e<r.start){return}else if(e===r.start&&e===r.stop-1){this.intervals.splice(t,1);return}else if(e===r.start){this.intervals[t]=new i(r.start+1,r.stop);return}else if(e===r.stop-1){this.intervals[t]=new i(r.start,r.stop-1);return}else if(e<r.stop-1){const n=new i(r.start,e);r.start=e+1;this.intervals.splice(t,0,n);return}}}}toString(e,t,r){e=e||null;t=t||null;r=r||false;if(this.intervals===null){return"{}"}else if(e!==null||t!==null){return this.toTokenString(e,t)}else if(r){return this.toCharString()}else{return this.toIndexString()}}toCharString(){const e=[];for(let t=0;t<this.intervals.length;t++){const i=this.intervals[t];if(i.stop===i.start+1){if(i.start===r.EOF){e.push("<EOF>")}else{e.push("'"+String.fromCharCode(i.start)+"'")}}else{e.push("'"+String.fromCharCode(i.start)+"'..'"+String.fromCharCode(i.stop-1)+"'")}}if(e.length>1){return"{"+e.join(", ")+"}"}else{return e[0]}}toIndexString(){const e=[];for(let t=0;t<this.intervals.length;t++){const i=this.intervals[t];if(i.stop===i.start+1){if(i.start===r.EOF){e.push("<EOF>")}else{e.push(i.start.toString())}}else{e.push(i.start.toString()+".."+(i.stop-1).toString())}}if(e.length>1){return"{"+e.join(", ")+"}"}else{return e[0]}}toTokenString(e,t){const r=[];for(let i=0;i<this.intervals.length;i++){const n=this.intervals[i];for(let i=n.start;i<n.stop;i++){r.push(this.elementName(e,t,i))}}if(r.length>1){return"{"+r.join(", ")+"}"}else{return r[0]}}elementName(e,t,i){if(i===r.EOF){return"<EOF>"}else if(i===r.EPSILON){return"<EPSILON>"}else{return e[i]||t[i]}}get length(){return this.intervals.map((e=>e.length)).reduce(((e,t)=>e+t))}};t.exports={Interval:i,IntervalSet:n}}));var mr=__commonJS(((e,t)=>{var{Token:r}=cr();var{IntervalSet:i}=pr();var{Predicate:n,PrecedencePredicate:s}=dr();var o=class{constructor(e){if(e===void 0||e===null){throw"target cannot be null."}this.target=e;this.isEpsilon=false;this.label=null}};o.EPSILON=1;o.RANGE=2;o.RULE=3;o.PREDICATE=4;o.ATOM=5;o.ACTION=6;o.SET=7;o.NOT_SET=8;o.WILDCARD=9;o.PRECEDENCE=10;o.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"];o.serializationTypes={EpsilonTransition:o.EPSILON,RangeTransition:o.RANGE,RuleTransition:o.RULE,PredicateTransition:o.PREDICATE,AtomTransition:o.ATOM,ActionTransition:o.ACTION,SetTransition:o.SET,NotSetTransition:o.NOT_SET,WildcardTransition:o.WILDCARD,PrecedencePredicateTransition:o.PRECEDENCE};var a=class extends o{constructor(e,t){super(e);this.label_=t;this.label=this.makeLabel();this.serializationType=o.ATOM}makeLabel(){const e=new i;e.addOne(this.label_);return e}matches(e,t,r){return this.label_===e}toString(){return this.label_}};var l=class extends o{constructor(e,t,r,i){super(e);this.ruleIndex=t;this.precedence=r;this.followState=i;this.serializationType=o.RULE;this.isEpsilon=true}matches(e,t,r){return false}};var u=class extends o{constructor(e,t){super(e);this.serializationType=o.EPSILON;this.isEpsilon=true;this.outermostPrecedenceReturn=t}matches(e,t,r){return false}toString(){return"epsilon"}};var c=class extends o{constructor(e,t,r){super(e);this.serializationType=o.RANGE;this.start=t;this.stop=r;this.label=this.makeLabel()}makeLabel(){const e=new i;e.addRange(this.start,this.stop);return e}matches(e,t,r){return e>=this.start&&e<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}};var h=class extends o{constructor(e){super(e)}};var d=class extends h{constructor(e,t,r,i){super(e);this.serializationType=o.PREDICATE;this.ruleIndex=t;this.predIndex=r;this.isCtxDependent=i;this.isEpsilon=true}matches(e,t,r){return false}getPredicate(){return new n(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};var p=class extends o{constructor(e,t,r,i){super(e);this.serializationType=o.ACTION;this.ruleIndex=t;this.actionIndex=r===void 0?-1:r;this.isCtxDependent=i===void 0?false:i;this.isEpsilon=true}matches(e,t,r){return false}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};var m=class extends o{constructor(e,t){super(e);this.serializationType=o.SET;if(t!==void 0&&t!==null){this.label=t}else{this.label=new i;this.label.addOne(r.INVALID_TYPE)}}matches(e,t,r){return this.label.contains(e)}toString(){return this.label.toString()}};var g=class extends m{constructor(e,t){super(e,t);this.serializationType=o.NOT_SET}matches(e,t,r){return e>=t&&e<=r&&!super.matches(e,t,r)}toString(){return"~"+super.toString()}};var y=class extends o{constructor(e){super(e);this.serializationType=o.WILDCARD}matches(e,t,r){return e>=t&&e<=r}toString(){return"."}};var _=class extends h{constructor(e,t){super(e);this.serializationType=o.PRECEDENCE;this.precedence=t;this.isEpsilon=true}matches(e,t,r){return false}getPredicate(){return new s(this.precedence)}toString(){return this.precedence+" >= _p"}};t.exports={Transition:o,AtomTransition:a,SetTransition:m,NotSetTransition:g,RuleTransition:l,ActionTransition:p,EpsilonTransition:u,RangeTransition:c,WildcardTransition:y,PredicateTransition:d,PrecedencePredicateTransition:_,AbstractPredicateTransition:h}}));var gr=__commonJS(((e,t)=>{var{Token:r}=cr();var{Interval:i}=pr();var n=new i(-1,-2);var s=class{};var o=class extends s{constructor(){super()}};var a=class extends o{constructor(){super()}};var l=class extends a{constructor(){super()}getRuleContext(){throw new Error("missing interface implementation")}};var u=class extends a{constructor(){super()}};var c=class extends u{constructor(){super()}};var h=class{visit(e){if(Array.isArray(e)){return e.map((function(e){return e.accept(this)}),this)}else{return e.accept(this)}}visitChildren(e){if(e.children){return this.visit(e.children)}else{return null}}visitTerminal(e){}visitErrorNode(e){}};var d=class{visitTerminal(e){}visitErrorNode(e){}enterEveryRule(e){}exitEveryRule(e){}};var p=class extends u{constructor(e){super();this.parentCtx=null;this.symbol=e}getChild(e){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(this.symbol===null){return n}const e=this.symbol.tokenIndex;return new i(e,e)}getChildCount(){return 0}accept(e){return e.visitTerminal(this)}getText(){return this.symbol.text}toString(){if(this.symbol.type===r.EOF){return"<EOF>"}else{return this.symbol.text}}};var m=class extends p{constructor(e){super(e)}isErrorNode(){return true}accept(e){return e.visitErrorNode(this)}};var g=class{walk(e,t){const r=t instanceof c||t.isErrorNode!==void 0&&t.isErrorNode();if(r){e.visitErrorNode(t)}else if(t instanceof u){e.visitTerminal(t)}else{this.enterRule(e,t);for(let r=0;r<t.getChildCount();r++){const i=t.getChild(r);this.walk(e,i)}this.exitRule(e,t)}}enterRule(e,t){const r=t.getRuleContext();e.enterEveryRule(r);r.enterRule(e)}exitRule(e,t){const r=t.getRuleContext();r.exitRule(e);e.exitEveryRule(r)}};g.DEFAULT=new g;t.exports={RuleNode:l,ErrorNode:c,TerminalNode:u,ErrorNodeImpl:m,TerminalNodeImpl:p,ParseTreeListener:d,ParseTreeVisitor:h,ParseTreeWalker:g,INVALID_INTERVAL:n}}));var yr=__commonJS(((e,t)=>{var r=ur();var{Token:i}=cr();var{ErrorNode:n,TerminalNode:s,RuleNode:o}=gr();var a={toStringTree:function(e,t,i){t=t||null;i=i||null;if(i!==null){t=i.ruleNames}let n=a.getNodeText(e,t);n=r.escapeWhitespace(n,false);const s=e.getChildCount();if(s===0){return n}let o="("+n+" ";if(s>0){n=a.toStringTree(e.getChild(0),t);o=o.concat(n)}for(let r=1;r<s;r++){n=a.toStringTree(e.getChild(r),t);o=o.concat(" "+n)}o=o.concat(")");return o},getNodeText:function(e,t,r){t=t||null;r=r||null;if(r!==null){t=r.ruleNames}if(t!==null){if(e instanceof o){const r=e.getRuleContext();const i=r.getAltNumber();if(i!=0){return t[e.ruleIndex]+":"+i}return t[e.ruleIndex]}else if(e instanceof n){return e.toString()}else if(e instanceof s){if(e.symbol!==null){return e.symbol.text}}}const a=e.getPayload();if(a instanceof i){return a.text}return e.getPayload().toString()},getChildren:function(e){const t=[];for(let r=0;r<e.getChildCount();r++){t.push(e.getChild(r))}return t},getAncestors:function(e){let t=[];e=e.getParent();while(e!==null){t=[e].concat(t);e=e.getParent()}return t},findAllTokenNodes:function(e,t){return a.findAllNodes(e,t,true)},findAllRuleNodes:function(e,t){return a.findAllNodes(e,t,false)},findAllNodes:function(e,t,r){const i=[];a._findAllNodes(e,t,r,i);return i},_findAllNodes:function(e,t,r,i){if(r&&e instanceof s){if(e.symbol.type===t){i.push(e)}}else if(!r&&e instanceof o){if(e.ruleIndex===t){i.push(e)}}for(let n=0;n<e.getChildCount();n++){a._findAllNodes(e.getChild(n),t,r,i)}},descendants:function(e){let t=[e];for(let r=0;r<e.getChildCount();r++){t=t.concat(a.descendants(e.getChild(r)))}return t}};t.exports=a}));var _r=__commonJS(((e,t)=>{var{RuleNode:r}=gr();var{INVALID_INTERVAL:i}=gr();var n=yr();var s=class extends r{constructor(e,t){super();this.parentCtx=e||null;this.invokingState=t||-1}depth(){let e=0;let t=this;while(t!==null){t=t.parentCtx;e+=1}return e}isEmpty(){return this.invokingState===-1}getSourceInterval(){return i}getRuleContext(){return this}getPayload(){return this}getText(){if(this.getChildCount()===0){return""}else{return this.children.map((function(e){return e.getText()})).join("")}}getAltNumber(){return 0}setAltNumber(e){}getChild(e){return null}getChildCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e,t){return n.toStringTree(this,e,t)}toString(e,t){e=e||null;t=t||null;let r=this;let i="[";while(r!==null&&r!==t){if(e===null){if(!r.isEmpty()){i+=r.invokingState}}else{const t=r.ruleIndex;const n=t>=0&&t<e.length?e[t]:""+t;i+=n}if(r.parentCtx!==null&&(e!==null||!r.parentCtx.isEmpty())){i+=" "}r=r.parentCtx}i+="]";return i}};t.exports=s}));var vr=__commonJS(((e,t)=>{var r=_r();var{Hash:i,Map:n,equalArrays:s}=ur();var o=class{constructor(e){this.cachedHashCode=e}isEmpty(){return this===o.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===o.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(e){e.update(this.cachedHashCode)}};o.EMPTY=null;o.EMPTY_RETURN_STATE=2147483647;o.globalNodeCount=1;o.id=o.globalNodeCount;var a=class{constructor(){this.cache=new n}add(e){if(e===o.EMPTY){return o.EMPTY}const t=this.cache.get(e)||null;if(t!==null){return t}this.cache.put(e,e);return e}get(e){return this.cache.get(e)||null}get length(){return this.cache.length}};var l=class extends o{constructor(e,t){let r=0;const n=new i;if(e!==null){n.update(e,t)}else{n.update(1)}r=n.finish();super(r);this.parentCtx=e;this.returnState=t}getParent(e){return this.parentCtx}getReturnState(e){return this.returnState}equals(e){if(this===e){return true}else if(!(e instanceof l)){return false}else if(this.hashCode()!==e.hashCode()){return false}else{if(this.returnState!==e.returnState)return false;else if(this.parentCtx==null)return e.parentCtx==null;else return this.parentCtx.equals(e.parentCtx)}}toString(){const e=this.parentCtx===null?"":this.parentCtx.toString();if(e.length===0){if(this.returnState===o.EMPTY_RETURN_STATE){return"$"}else{return""+this.returnState}}else{return""+this.returnState+" "+e}}get length(){return 1}static create(e,t){if(t===o.EMPTY_RETURN_STATE&&e===null){return o.EMPTY}else{return new l(e,t)}}};var u=class extends l{constructor(){super(null,o.EMPTY_RETURN_STATE)}isEmpty(){return true}getParent(e){return null}getReturnState(e){return this.returnState}equals(e){return this===e}toString(){return"$"}};o.EMPTY=new u;var c=class extends o{constructor(e,t){const r=new i;r.update(e,t);const n=r.finish();super(n);this.parents=e;this.returnStates=t;return this}isEmpty(){return this.returnStates[0]===o.EMPTY_RETURN_STATE}getParent(e){return this.parents[e]}getReturnState(e){return this.returnStates[e]}equals(e){if(this===e){return true}else if(!(e instanceof c)){return false}else if(this.hashCode()!==e.hashCode()){return false}else{return s(this.returnStates,e.returnStates)&&s(this.parents,e.parents)}}toString(){if(this.isEmpty()){return"[]"}else{let e="[";for(let t=0;t<this.returnStates.length;t++){if(t>0){e=e+", "}if(this.returnStates[t]===o.EMPTY_RETURN_STATE){e=e+"$";continue}e=e+this.returnStates[t];if(this.parents[t]!==null){e=e+" "+this.parents[t]}else{e=e+"null"}}return e+"]"}}get length(){return this.returnStates.length}};function predictionContextFromRuleContext(e,t){if(t===void 0||t===null){t=r.EMPTY}if(t.parentCtx===null||t===r.EMPTY){return o.EMPTY}const i=predictionContextFromRuleContext(e,t.parentCtx);const n=e.states[t.invokingState];const s=n.transitions[0];return l.create(i,s.followState.stateNumber)}function merge(e,t,r,i){if(e===t){return e}if(e instanceof l&&t instanceof l){return mergeSingletons(e,t,r,i)}if(r){if(e instanceof u){return e}if(t instanceof u){return t}}if(e instanceof l){e=new c([e.getParent()],[e.returnState])}if(t instanceof l){t=new c([t.getParent()],[t.returnState])}return mergeArrays(e,t,r,i)}function mergeSingletons(e,t,r,i){if(i!==null){let r=i.get(e,t);if(r!==null){return r}r=i.get(t,e);if(r!==null){return r}}const n=mergeRoot(e,t,r);if(n!==null){if(i!==null){i.set(e,t,n)}return n}if(e.returnState===t.returnState){const n=merge(e.parentCtx,t.parentCtx,r,i);if(n===e.parentCtx){return e}if(n===t.parentCtx){return t}const s=l.create(n,e.returnState);if(i!==null){i.set(e,t,s)}return s}else{let r=null;if(e===t||e.parentCtx!==null&&e.parentCtx===t.parentCtx){r=e.parentCtx}if(r!==null){const n=[e.returnState,t.returnState];if(e.returnState>t.returnState){n[0]=t.returnState;n[1]=e.returnState}const s=[r,r];const o=new c(s,n);if(i!==null){i.set(e,t,o)}return o}const n=[e.returnState,t.returnState];let s=[e.parentCtx,t.parentCtx];if(e.returnState>t.returnState){n[0]=t.returnState;n[1]=e.returnState;s=[t.parentCtx,e.parentCtx]}const o=new c(s,n);if(i!==null){i.set(e,t,o)}return o}}function mergeRoot(e,t,r){if(r){if(e===o.EMPTY){return o.EMPTY}if(t===o.EMPTY){return o.EMPTY}}else{if(e===o.EMPTY&&t===o.EMPTY){return o.EMPTY}else if(e===o.EMPTY){const e=[t.returnState,o.EMPTY_RETURN_STATE];const r=[t.parentCtx,null];return new c(r,e)}else if(t===o.EMPTY){const t=[e.returnState,o.EMPTY_RETURN_STATE];const r=[e.parentCtx,null];return new c(r,t)}}return null}function mergeArrays(e,t,r,i){if(i!==null){let r=i.get(e,t);if(r!==null){return r}r=i.get(t,e);if(r!==null){return r}}let n=0;let s=0;let a=0;let u=[];let h=[];while(n<e.returnStates.length&&s<t.returnStates.length){const l=e.parents[n];const c=t.parents[s];if(e.returnStates[n]===t.returnStates[s]){const t=e.returnStates[n];const d=t===o.EMPTY_RETURN_STATE&&l===null&&c===null;const p=l!==null&&c!==null&&l===c;if(d||p){h[a]=l;u[a]=t}else{h[a]=merge(l,c,r,i);u[a]=t}n+=1;s+=1}else if(e.returnStates[n]<t.returnStates[s]){h[a]=l;u[a]=e.returnStates[n];n+=1}else{h[a]=c;u[a]=t.returnStates[s];s+=1}a+=1}if(n<e.returnStates.length){for(let t=n;t<e.returnStates.length;t++){h[a]=e.parents[t];u[a]=e.returnStates[t];a+=1}}else{for(let e=s;e<t.returnStates.length;e++){h[a]=t.parents[e];u[a]=t.returnStates[e];a+=1}}if(a<h.length){if(a===1){const r=l.create(h[0],u[0]);if(i!==null){i.set(e,t,r)}return r}h=h.slice(0,a);u=u.slice(0,a)}const d=new c(h,u);if(d===e){if(i!==null){i.set(e,t,e)}return e}if(d===t){if(i!==null){i.set(e,t,t)}return t}combineCommonParents(h);if(i!==null){i.set(e,t,d)}return d}function combineCommonParents(e){const t=new n;for(let r=0;r<e.length;r++){const i=e[r];if(!t.containsKey(i)){t.put(i,i)}}for(let r=0;r<e.length;r++){e[r]=t.get(e[r])}}function getCachedPredictionContext(e,t,r){if(e.isEmpty()){return e}let i=r.get(e)||null;if(i!==null){return i}i=t.get(e);if(i!==null){r.put(e,i);return i}let n=false;let s=[];for(let i=0;i<s.length;i++){const o=getCachedPredictionContext(e.getParent(i),t,r);if(n||o!==e.getParent(i)){if(!n){s=[];for(let t=0;t<e.length;t++){s[t]=e.getParent(t)}n=true}s[i]=o}}if(!n){t.add(e);r.put(e,e);return e}let a=null;if(s.length===0){a=o.EMPTY}else if(s.length===1){a=l.create(s[0],e.getReturnState(0))}else{a=new c(s,e.returnStates)}t.add(a);r.put(a,a);r.put(e,a);return a}t.exports={merge:merge,PredictionContext:o,PredictionContextCache:a,SingletonPredictionContext:l,predictionContextFromRuleContext:predictionContextFromRuleContext,getCachedPredictionContext:getCachedPredictionContext}}));var br=__commonJS(((e,t)=>{var{Set:r,BitSet:i}=ur();var{Token:n}=cr();var{ATNConfig:s}=fr();var{IntervalSet:o}=pr();var{RuleStopState:a}=hr();var{RuleTransition:l,NotSetTransition:u,WildcardTransition:c,AbstractPredicateTransition:h}=mr();var{predictionContextFromRuleContext:d,PredictionContext:p,SingletonPredictionContext:m}=vr();var g=class{constructor(e){this.atn=e}getDecisionLookahead(e){if(e===null){return null}const t=e.transitions.length;const n=[];for(let s=0;s<t;s++){n[s]=new o;const t=new r;const a=false;this._LOOK(e.transition(s).target,null,p.EMPTY,n[s],t,new i,a,false);if(n[s].length===0||n[s].contains(g.HIT_PRED)){n[s]=null}}return n}LOOK(e,t,n){const s=new o;const a=true;n=n||null;const l=n!==null?d(e.atn,n):null;this._LOOK(e,t,l,s,new r,new i,a,true);return s}_LOOK(e,t,r,i,o,d,y,_){const v=new s({state:e,alt:0,context:r},null);if(o.contains(v)){return}o.add(v);if(e===t){if(r===null){i.addOne(n.EPSILON);return}else if(r.isEmpty()&&_){i.addOne(n.EOF);return}}if(e instanceof a){if(r===null){i.addOne(n.EPSILON);return}else if(r.isEmpty()&&_){i.addOne(n.EOF);return}if(r!==p.EMPTY){const n=d.contains(e.ruleIndex);try{d.remove(e.ruleIndex);for(let e=0;e<r.length;e++){const n=this.atn.states[r.getReturnState(e)];this._LOOK(n,t,r.getParent(e),i,o,d,y,_)}}finally{if(n){d.add(e.ruleIndex)}}return}}for(let s=0;s<e.transitions.length;s++){const a=e.transitions[s];if(a.constructor===l){if(d.contains(a.target.ruleIndex)){continue}const e=m.create(r,a.followState.stateNumber);try{d.add(a.target.ruleIndex);this._LOOK(a.target,t,e,i,o,d,y,_)}finally{d.remove(a.target.ruleIndex)}}else if(a instanceof h){if(y){this._LOOK(a.target,t,r,i,o,d,y,_)}else{i.addOne(g.HIT_PRED)}}else if(a.isEpsilon){this._LOOK(a.target,t,r,i,o,d,y,_)}else if(a.constructor===c){i.addRange(n.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)}else{let e=a.label;if(e!==null){if(a instanceof u){e=e.complement(n.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)}i.addSet(e)}}}}};g.HIT_PRED=n.INVALID_TYPE;t.exports=g}));var xr=__commonJS(((e,t)=>{var r=br();var{IntervalSet:i}=pr();var{Token:n}=cr();var s=class{constructor(e,t){this.grammarType=e;this.maxTokenType=t;this.states=[];this.decisionToState=[];this.ruleToStartState=[];this.ruleToStopState=null;this.modeNameToStartState={};this.ruleToTokenType=null;this.lexerActions=null;this.modeToStartState=[]}nextTokensInContext(e,t){const i=new r(this);return i.LOOK(e,null,t)}nextTokensNoContext(e){if(e.nextTokenWithinRule!==null){return e.nextTokenWithinRule}e.nextTokenWithinRule=this.nextTokensInContext(e,null);e.nextTokenWithinRule.readOnly=true;return e.nextTokenWithinRule}nextTokens(e,t){if(t===void 0){return this.nextTokensNoContext(e)}else{return this.nextTokensInContext(e,t)}}addState(e){if(e!==null){e.atn=this;e.stateNumber=this.states.length}this.states.push(e)}removeState(e){this.states[e.stateNumber]=null}defineDecisionState(e){this.decisionToState.push(e);e.decision=this.decisionToState.length-1;return e.decision}getDecisionState(e){if(this.decisionToState.length===0){return null}else{return this.decisionToState[e]}}getExpectedTokens(e,t){if(e<0||e>=this.states.length){throw"Invalid state number."}const r=this.states[e];let s=this.nextTokens(r);if(!s.contains(n.EPSILON)){return s}const o=new i;o.addSet(s);o.removeOne(n.EPSILON);while(t!==null&&t.invokingState>=0&&s.contains(n.EPSILON)){const e=this.states[t.invokingState];const r=e.transitions[0];s=this.nextTokens(r.followState);o.addSet(s);o.removeOne(n.EPSILON);t=t.parentCtx}if(s.contains(n.EPSILON)){o.addOne(n.EOF)}return o}};s.INVALID_ALT_NUMBER=0;t.exports=s}));var Tr=__commonJS(((e,t)=>{t.exports={LEXER:0,PARSER:1}}));var wr=__commonJS(((e,t)=>{var r=class{constructor(e){if(e===void 0){e=null}this.readOnly=false;this.verifyATN=e===null?true:e.verifyATN;this.generateRuleBypassTransitions=e===null?false:e.generateRuleBypassTransitions}};r.defaultOptions=new r;r.defaultOptions.readOnly=true;t.exports=r}));var Sr=__commonJS(((e,t)=>{var r={CHANNEL:0,CUSTOM:1,MODE:2,MORE:3,POP_MODE:4,PUSH_MODE:5,SKIP:6,TYPE:7};var i=class{constructor(e){this.actionType=e;this.isPositionDependent=false}hashCode(){const e=new Hash;this.updateHashCode(e);return e.finish()}updateHashCode(e){e.update(this.actionType)}equals(e){return this===e}};var n=class extends i{constructor(){super(r.SKIP)}execute(e){e.skip()}toString(){return"skip"}};n.INSTANCE=new n;var s=class extends i{constructor(e){super(r.TYPE);this.type=e}execute(e){e.type=this.type}updateHashCode(e){e.update(this.actionType,this.type)}equals(e){if(this===e){return true}else if(!(e instanceof s)){return false}else{return this.type===e.type}}toString(){return"type("+this.type+")"}};var o=class extends i{constructor(e){super(r.PUSH_MODE);this.mode=e}execute(e){e.pushMode(this.mode)}updateHashCode(e){e.update(this.actionType,this.mode)}equals(e){if(this===e){return true}else if(!(e instanceof o)){return false}else{return this.mode===e.mode}}toString(){return"pushMode("+this.mode+")"}};var a=class extends i{constructor(){super(r.POP_MODE)}execute(e){e.popMode()}toString(){return"popMode"}};a.INSTANCE=new a;var l=class extends i{constructor(){super(r.MORE)}execute(e){e.more()}toString(){return"more"}};l.INSTANCE=new l;var u=class extends i{constructor(e){super(r.MODE);this.mode=e}execute(e){e.mode(this.mode)}updateHashCode(e){e.update(this.actionType,this.mode)}equals(e){if(this===e){return true}else if(!(e instanceof u)){return false}else{return this.mode===e.mode}}toString(){return"mode("+this.mode+")"}};var c=class extends i{constructor(e,t){super(r.CUSTOM);this.ruleIndex=e;this.actionIndex=t;this.isPositionDependent=true}execute(e){e.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(e){e.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(e){if(this===e){return true}else if(!(e instanceof c)){return false}else{return this.ruleIndex===e.ruleIndex&&this.actionIndex===e.actionIndex}}};var h=class extends i{constructor(e){super(r.CHANNEL);this.channel=e}execute(e){e._channel=this.channel}updateHashCode(e){e.update(this.actionType,this.channel)}equals(e){if(this===e){return true}else if(!(e instanceof h)){return false}else{return this.channel===e.channel}}toString(){return"channel("+this.channel+")"}};var d=class extends i{constructor(e,t){super(t.actionType);this.offset=e;this.action=t;this.isPositionDependent=true}execute(e){this.action.execute(e)}updateHashCode(e){e.update(this.actionType,this.offset,this.action)}equals(e){if(this===e){return true}else if(!(e instanceof d)){return false}else{return this.offset===e.offset&&this.action===e.action}}};t.exports={LexerActionType:r,LexerSkipAction:n,LexerChannelAction:h,LexerCustomAction:c,LexerIndexedCustomAction:d,LexerMoreAction:l,LexerTypeAction:s,LexerPushModeAction:o,LexerPopModeAction:a,LexerModeAction:u}}));var Er=__commonJS(((e,t)=>{var{Token:r}=cr();var i=xr();var n=Tr();var{ATNState:s,BasicState:o,DecisionState:a,BlockStartState:l,BlockEndState:u,LoopEndState:c,RuleStartState:h,RuleStopState:d,TokensStartState:p,PlusLoopbackState:m,StarLoopbackState:g,StarLoopEntryState:y,PlusBlockStartState:_,StarBlockStartState:v,BasicBlockStartState:b}=hr();var{Transition:x,AtomTransition:T,SetTransition:w,NotSetTransition:S,RuleTransition:E,RangeTransition:A,ActionTransition:C,EpsilonTransition:N,WildcardTransition:O,PredicateTransition:R,PrecedencePredicateTransition:k}=mr();var{IntervalSet:P}=pr();var L=wr();var{LexerActionType:I,LexerSkipAction:M,LexerChannelAction:D,LexerCustomAction:F,LexerMoreAction:j,LexerTypeAction:B,LexerPushModeAction:U,LexerPopModeAction:H,LexerModeAction:z}=Sr();var K="AADB8D7E-AEEF-4415-AD2B-8204D6CF042E";var V="59627784-3BE5-417A-B9EB-8131A7286089";var q=[K,V];var Z=3;var G=V;function initArray(e,t){const r=[];r[e-1]=t;return r.map((function(e){return t}))}var $=class{constructor(e){if(e===void 0||e===null){e=L.defaultOptions}this.deserializationOptions=e;this.stateFactories=null;this.actionFactories=null}isFeatureSupported(e,t){const r=q.indexOf(e);if(r<0){return false}const i=q.indexOf(t);return i>=r}deserialize(e){this.reset(e);this.checkVersion();this.checkUUID();const t=this.readATN();this.readStates(t);this.readRules(t);this.readModes(t);const r=[];this.readSets(t,r,this.readInt.bind(this));if(this.isFeatureSupported(V,this.uuid)){this.readSets(t,r,this.readInt32.bind(this))}this.readEdges(t,r);this.readDecisions(t);this.readLexerActions(t);this.markPrecedenceDecisions(t);this.verifyATN(t);if(this.deserializationOptions.generateRuleBypassTransitions&&t.grammarType===n.PARSER){this.generateRuleBypassTransitions(t);this.verifyATN(t)}return t}reset(e){const adjust=function(e){const t=e.charCodeAt(0);return t>1?t-2:t+65534};const t=e.split("").map(adjust);t[0]=e.charCodeAt(0);this.data=t;this.pos=0}checkVersion(){const e=this.readInt();if(e!==Z){throw"Could not deserialize ATN with version "+e+" (expected "+Z+")."}}checkUUID(){const e=this.readUUID();if(q.indexOf(e)<0){throw"Could not deserialize ATN with UUID: "+e+" (expected "+G+" or a legacy UUID).",e,G}this.uuid=e}readATN(){const e=this.readInt();const t=this.readInt();return new i(e,t)}readStates(e){let t,r,i;const n=[];const o=[];const a=this.readInt();for(let t=0;t<a;t++){const t=this.readInt();if(t===s.INVALID_TYPE){e.addState(null);continue}let r=this.readInt();if(r===65535){r=-1}const i=this.stateFactory(t,r);if(t===s.LOOP_END){const e=this.readInt();n.push([i,e])}else if(i instanceof l){const e=this.readInt();o.push([i,e])}e.addState(i)}for(t=0;t<n.length;t++){r=n[t];r[0].loopBackState=e.states[r[1]]}for(t=0;t<o.length;t++){r=o[t];r[0].endState=e.states[r[1]]}let u=this.readInt();for(t=0;t<u;t++){i=this.readInt();e.states[i].nonGreedy=true}let c=this.readInt();for(t=0;t<c;t++){i=this.readInt();e.states[i].isPrecedenceRule=true}}readRules(e){let t;const i=this.readInt();if(e.grammarType===n.LEXER){e.ruleToTokenType=initArray(i,0)}e.ruleToStartState=initArray(i,0);for(t=0;t<i;t++){const i=this.readInt();e.ruleToStartState[t]=e.states[i];if(e.grammarType===n.LEXER){let i=this.readInt();if(i===65535){i=r.EOF}e.ruleToTokenType[t]=i}}e.ruleToStopState=initArray(i,0);for(t=0;t<e.states.length;t++){const r=e.states[t];if(!(r instanceof d)){continue}e.ruleToStopState[r.ruleIndex]=r;e.ruleToStartState[r.ruleIndex].stopState=r}}readModes(e){const t=this.readInt();for(let r=0;r<t;r++){let t=this.readInt();e.modeToStartState.push(e.states[t])}}readSets(e,t,r){const i=this.readInt();for(let e=0;e<i;e++){const e=new P;t.push(e);const i=this.readInt();const n=this.readInt();if(n!==0){e.addOne(-1)}for(let t=0;t<i;t++){const t=r();const i=r();e.addRange(t,i)}}}readEdges(e,t){let r,i,n,s,o;const a=this.readInt();for(r=0;r<a;r++){const r=this.readInt();const i=this.readInt();const n=this.readInt();const o=this.readInt();const a=this.readInt();const l=this.readInt();s=this.edgeFactory(e,n,r,i,o,a,l,t);const u=e.states[r];u.addTransition(s)}for(r=0;r<e.states.length;r++){n=e.states[r];for(i=0;i<n.transitions.length;i++){const t=n.transitions[i];if(!(t instanceof E)){continue}let r=-1;if(e.ruleToStartState[t.target.ruleIndex].isPrecedenceRule){if(t.precedence===0){r=t.target.ruleIndex}}s=new N(t.followState,r);e.ruleToStopState[t.target.ruleIndex].addTransition(s)}}for(r=0;r<e.states.length;r++){n=e.states[r];if(n instanceof l){if(n.endState===null){throw"IllegalState"}if(n.endState.startState!==null){throw"IllegalState"}n.endState.startState=n}if(n instanceof m){for(i=0;i<n.transitions.length;i++){o=n.transitions[i].target;if(o instanceof _){o.loopBackState=n}}}else if(n instanceof g){for(i=0;i<n.transitions.length;i++){o=n.transitions[i].target;if(o instanceof y){o.loopBackState=n}}}}}readDecisions(e){const t=this.readInt();for(let r=0;r<t;r++){const t=this.readInt();const i=e.states[t];e.decisionToState.push(i);i.decision=r}}readLexerActions(e){if(e.grammarType===n.LEXER){const t=this.readInt();e.lexerActions=initArray(t,null);for(let r=0;r<t;r++){const t=this.readInt();let i=this.readInt();if(i===65535){i=-1}let n=this.readInt();if(n===65535){n=-1}e.lexerActions[r]=this.lexerActionFactory(t,i,n)}}}generateRuleBypassTransitions(e){let t;const r=e.ruleToStartState.length;for(t=0;t<r;t++){e.ruleToTokenType[t]=e.maxTokenType+t+1}for(t=0;t<r;t++){this.generateRuleBypassTransition(e,t)}}generateRuleBypassTransition(e,t){let r,i;const n=new b;n.ruleIndex=t;e.addState(n);const s=new u;s.ruleIndex=t;e.addState(s);n.endState=s;e.defineDecisionState(n);s.startState=n;let a=null;let l=null;if(e.ruleToStartState[t].isPrecedenceRule){l=null;for(r=0;r<e.states.length;r++){i=e.states[r];if(this.stateIsEndStateFor(i,t)){l=i;a=i.loopBackState.transitions[0];break}}if(a===null){throw"Couldn't identify final state of the precedence rule prefix section."}}else{l=e.ruleToStopState[t]}for(r=0;r<e.states.length;r++){i=e.states[r];for(let e=0;e<i.transitions.length;e++){const t=i.transitions[e];if(t===a){continue}if(t.target===l){t.target=s}}}const c=e.ruleToStartState[t];const h=c.transitions.length;while(h>0){n.addTransition(c.transitions[h-1]);c.transitions=c.transitions.slice(-1)}e.ruleToStartState[t].addTransition(new N(n));s.addTransition(new N(l));const d=new o;e.addState(d);d.addTransition(new T(s,e.ruleToTokenType[t]));n.addTransition(new N(d))}stateIsEndStateFor(e,t){if(e.ruleIndex!==t){return null}if(!(e instanceof y)){return null}const r=e.transitions[e.transitions.length-1].target;if(!(r instanceof c)){return null}if(r.epsilonOnlyTransitions&&r.transitions[0].target instanceof d){return e}else{return null}}markPrecedenceDecisions(e){for(let t=0;t<e.states.length;t++){const r=e.states[t];if(!(r instanceof y)){continue}if(e.ruleToStartState[r.ruleIndex].isPrecedenceRule){const e=r.transitions[r.transitions.length-1].target;if(e instanceof c){if(e.epsilonOnlyTransitions&&e.transitions[0].target instanceof d){r.isPrecedenceDecision=true}}}}}verifyATN(e){if(!this.deserializationOptions.verifyATN){return}for(let t=0;t<e.states.length;t++){const r=e.states[t];if(r===null){continue}this.checkCondition(r.epsilonOnlyTransitions||r.transitions.length<=1);if(r instanceof _){this.checkCondition(r.loopBackState!==null)}else if(r instanceof y){this.checkCondition(r.loopBackState!==null);this.checkCondition(r.transitions.length===2);if(r.transitions[0].target instanceof v){this.checkCondition(r.transitions[1].target instanceof c);this.checkCondition(!r.nonGreedy)}else if(r.transitions[0].target instanceof c){this.checkCondition(r.transitions[1].target instanceof v);this.checkCondition(r.nonGreedy)}else{throw"IllegalState"}}else if(r instanceof g){this.checkCondition(r.transitions.length===1);this.checkCondition(r.transitions[0].target instanceof y)}else if(r instanceof c){this.checkCondition(r.loopBackState!==null)}else if(r instanceof h){this.checkCondition(r.stopState!==null)}else if(r instanceof l){this.checkCondition(r.endState!==null)}else if(r instanceof u){this.checkCondition(r.startState!==null)}else if(r instanceof a){this.checkCondition(r.transitions.length<=1||r.decision>=0)}else{this.checkCondition(r.transitions.length<=1||r instanceof d)}}}checkCondition(e,t){if(!e){if(t===void 0||t===null){t="IllegalState"}throw t}}readInt(){return this.data[this.pos++]}readInt32(){const e=this.readInt();const t=this.readInt();return e|t<<16}readLong(){const e=this.readInt32();const t=this.readInt32();return e&4294967295|t<<32}readUUID(){const e=[];for(let t=7;t>=0;t--){const r=this.readInt();e[2*t+1]=r&255;e[2*t]=r>>8&255}return W[e[0]]+W[e[1]]+W[e[2]]+W[e[3]]+"-"+W[e[4]]+W[e[5]]+"-"+W[e[6]]+W[e[7]]+"-"+W[e[8]]+W[e[9]]+"-"+W[e[10]]+W[e[11]]+W[e[12]]+W[e[13]]+W[e[14]]+W[e[15]]}edgeFactory(e,t,i,n,s,o,a,l){const u=e.states[n];switch(t){case x.EPSILON:return new N(u);case x.RANGE:return a!==0?new A(u,r.EOF,o):new A(u,s,o);case x.RULE:return new E(e.states[s],o,a,u);case x.PREDICATE:return new R(u,s,o,a!==0);case x.PRECEDENCE:return new k(u,s);case x.ATOM:return a!==0?new T(u,r.EOF):new T(u,s);case x.ACTION:return new C(u,s,o,a!==0);case x.SET:return new w(u,l[s]);case x.NOT_SET:return new S(u,l[s]);case x.WILDCARD:return new O(u);default:throw"The specified transition type: "+t+" is not valid."}}stateFactory(e,t){if(this.stateFactories===null){const e=[];e[s.INVALID_TYPE]=null;e[s.BASIC]=()=>new o;e[s.RULE_START]=()=>new h;e[s.BLOCK_START]=()=>new b;e[s.PLUS_BLOCK_START]=()=>new _;e[s.STAR_BLOCK_START]=()=>new v;e[s.TOKEN_START]=()=>new p;e[s.RULE_STOP]=()=>new d;e[s.BLOCK_END]=()=>new u;e[s.STAR_LOOP_BACK]=()=>new g;e[s.STAR_LOOP_ENTRY]=()=>new y;e[s.PLUS_LOOP_BACK]=()=>new m;e[s.LOOP_END]=()=>new c;this.stateFactories=e}if(e>this.stateFactories.length||this.stateFactories[e]===null){throw"The specified state type "+e+" is not valid."}else{const r=this.stateFactories[e]();if(r!==null){r.ruleIndex=t;return r}}}lexerActionFactory(e,t,r){if(this.actionFactories===null){const e=[];e[I.CHANNEL]=(e,t)=>new D(e);e[I.CUSTOM]=(e,t)=>new F(e,t);e[I.MODE]=(e,t)=>new z(e);e[I.MORE]=(e,t)=>j.INSTANCE;e[I.POP_MODE]=(e,t)=>H.INSTANCE;e[I.PUSH_MODE]=(e,t)=>new U(e);e[I.SKIP]=(e,t)=>M.INSTANCE;e[I.TYPE]=(e,t)=>new B(e);this.actionFactories=e}if(e>this.actionFactories.length||this.actionFactories[e]===null){throw"The specified lexer action type "+e+" is not valid."}else{return this.actionFactories[e](t,r)}}};function createByteToHex(){const e=[];for(let t=0;t<256;t++){e[t]=(t+256).toString(16).substr(1).toUpperCase()}return e}var W=createByteToHex();t.exports=$}));var Ar=__commonJS(((e,t)=>{var r=class{syntaxError(e,t,r,i,n,s){}reportAmbiguity(e,t,r,i,n,s,o){}reportAttemptingFullContext(e,t,r,i,n,s){}reportContextSensitivity(e,t,r,i,n,s){}};var i=class extends r{constructor(){super()}syntaxError(e,t,r,i,n,s){console.error("line "+r+":"+i+" "+n)}};i.INSTANCE=new i;var n=class extends r{constructor(e){super();if(e===null){throw"delegates"}this.delegates=e;return this}syntaxError(e,t,r,i,n,s){this.delegates.map((o=>o.syntaxError(e,t,r,i,n,s)))}reportAmbiguity(e,t,r,i,n,s,o){this.delegates.map((a=>a.reportAmbiguity(e,t,r,i,n,s,o)))}reportAttemptingFullContext(e,t,r,i,n,s){this.delegates.map((o=>o.reportAttemptingFullContext(e,t,r,i,n,s)))}reportContextSensitivity(e,t,r,i,n,s){this.delegates.map((o=>o.reportContextSensitivity(e,t,r,i,n,s)))}};t.exports={ErrorListener:r,ConsoleErrorListener:i,ProxyErrorListener:n}}));var Cr=__commonJS(((e,t)=>{var{Token:r}=cr();var{ConsoleErrorListener:i}=Ar();var{ProxyErrorListener:n}=Ar();var s=class{constructor(){this._listeners=[i.INSTANCE];this._interp=null;this._stateNumber=-1}checkVersion(e){const t="4.9.2";if(t!==e){console.log("ANTLR runtime and generated code versions disagree: "+t+"!="+e)}}addErrorListener(e){this._listeners.push(e)}removeErrorListeners(){this._listeners=[]}getTokenTypeMap(){const e=this.getTokenNames();if(e===null){throw"The current recognizer does not provide a list of token names."}let t=this.tokenTypeMapCache[e];if(t===void 0){t=e.reduce((function(e,t,r){e[t]=r}));t.EOF=r.EOF;this.tokenTypeMapCache[e]=t}return t}getRuleIndexMap(){const e=this.ruleNames;if(e===null){throw"The current recognizer does not provide a list of rule names."}let t=this.ruleIndexMapCache[e];if(t===void 0){t=e.reduce((function(e,t,r){e[t]=r}));this.ruleIndexMapCache[e]=t}return t}getTokenType(e){const t=this.getTokenTypeMap()[e];if(t!==void 0){return t}else{return r.INVALID_TYPE}}getErrorHeader(e){const t=e.getOffendingToken().line;const r=e.getOffendingToken().column;return"line "+t+":"+r}getTokenErrorDisplay(e){if(e===null){return"<no token>"}let t=e.text;if(t===null){if(e.type===r.EOF){t="<EOF>"}else{t="<"+e.type+">"}}t=t.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t");return"'"+t+"'"}getErrorListenerDispatch(){return new n(this._listeners)}sempred(e,t,r){return true}precpred(e,t){return true}get state(){return this._stateNumber}set state(e){this._stateNumber=e}};s.tokenTypeMapCache={};s.ruleIndexMapCache={};t.exports=s}));var Nr=__commonJS(((e,t)=>{var r=cr().CommonToken;var i=class{};var n=class extends i{constructor(e){super();this.copyText=e===void 0?false:e}create(e,t,i,n,s,o,a,l){const u=new r(e,t,n,s,o);u.line=a;u.column=l;if(i!==null){u.text=i}else if(this.copyText&&e[1]!==null){u.text=e[1].getText(s,o)}return u}createThin(e,t){const i=new r(null,e);i.text=t;return i}};n.DEFAULT=new n;t.exports=n}));var Or=__commonJS(((e,t)=>{var{PredicateTransition:r}=mr();var{Interval:i}=pr().Interval;var n=class extends Error{constructor(e){super(e.message);if(!!Error.captureStackTrace){Error.captureStackTrace(this,n)}else{var t=(new Error).stack}this.message=e.message;this.recognizer=e.recognizer;this.input=e.input;this.ctx=e.ctx;this.offendingToken=null;this.offendingState=-1;if(this.recognizer!==null){this.offendingState=this.recognizer.state}}getExpectedTokens(){if(this.recognizer!==null){return this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx)}else{return null}}toString(){return this.message}};var s=class extends n{constructor(e,t,r,i){super({message:"",recognizer:e,input:t,ctx:null});this.startIndex=r;this.deadEndConfigs=i}toString(){let e="";if(this.startIndex>=0&&this.startIndex<this.input.size){e=this.input.getText(new i(this.startIndex,this.startIndex))}return"LexerNoViableAltException"+e}};var o=class extends n{constructor(e,t,r,i,n,s){s=s||e._ctx;i=i||e.getCurrentToken();r=r||e.getCurrentToken();t=t||e.getInputStream();super({message:"",recognizer:e,input:t,ctx:s});this.deadEndConfigs=n;this.startToken=r;this.offendingToken=i}};var a=class extends n{constructor(e){super({message:"",recognizer:e,input:e.getInputStream(),ctx:e._ctx});this.offendingToken=e.getCurrentToken()}};function formatMessage(e,t){if(t!==null){return t}else{return"failed predicate: {"+e+"}?"}}var l=class extends n{constructor(e,t,i){super({message:formatMessage(t,i||null),recognizer:e,input:e.getInputStream(),ctx:e._ctx});const n=e._interp.atn.states[e.state];const s=n.transitions[0];if(s instanceof r){this.ruleIndex=s.ruleIndex;this.predicateIndex=s.predIndex}else{this.ruleIndex=0;this.predicateIndex=0}this.predicate=t;this.offendingToken=e.getCurrentToken()}};var u=class extends Error{constructor(){super();Error.captureStackTrace(this,u)}};t.exports={RecognitionException:n,NoViableAltException:o,LexerNoViableAltException:s,InputMismatchException:a,FailedPredicateException:l,ParseCancellationException:u}}));var Rr=__commonJS(((e,t)=>{var{Token:r}=cr();var i=Cr();var n=Nr();var{RecognitionException:s}=Or();var{LexerNoViableAltException:o}=Or();var a=class extends i{constructor(e){super();this._input=e;this._factory=n.DEFAULT;this._tokenFactorySourcePair=[this,e];this._interp=null;this._token=null;this._tokenStartCharIndex=-1;this._tokenStartLine=-1;this._tokenStartColumn=-1;this._hitEOF=false;this._channel=r.DEFAULT_CHANNEL;this._type=r.INVALID_TYPE;this._modeStack=[];this._mode=a.DEFAULT_MODE;this._text=null}reset(){if(this._input!==null){this._input.seek(0)}this._token=null;this._type=r.INVALID_TYPE;this._channel=r.DEFAULT_CHANNEL;this._tokenStartCharIndex=-1;this._tokenStartColumn=-1;this._tokenStartLine=-1;this._text=null;this._hitEOF=false;this._mode=a.DEFAULT_MODE;this._modeStack=[];this._interp.reset()}nextToken(){if(this._input===null){throw"nextToken requires a non-null input stream."}const e=this._input.mark();try{while(true){if(this._hitEOF){this.emitEOF();return this._token}this._token=null;this._channel=r.DEFAULT_CHANNEL;this._tokenStartCharIndex=this._input.index;this._tokenStartColumn=this._interp.column;this._tokenStartLine=this._interp.line;this._text=null;let e=false;while(true){this._type=r.INVALID_TYPE;let t=a.SKIP;try{t=this._interp.match(this._input,this._mode)}catch(e){if(e instanceof s){this.notifyListeners(e);this.recover(e)}else{console.log(e.stack);throw e}}if(this._input.LA(1)===r.EOF){this._hitEOF=true}if(this._type===r.INVALID_TYPE){this._type=t}if(this._type===a.SKIP){e=true;break}if(this._type!==a.MORE){break}}if(e){continue}if(this._token===null){this.emit()}return this._token}}finally{this._input.release(e)}}skip(){this._type=a.SKIP}more(){this._type=a.MORE}mode(e){this._mode=e}pushMode(e){if(this._interp.debug){console.log("pushMode "+e)}this._modeStack.push(this._mode);this.mode(e)}popMode(){if(this._modeStack.length===0){throw"Empty Stack"}if(this._interp.debug){console.log("popMode back to "+this._modeStack.slice(0,-1))}this.mode(this._modeStack.pop());return this._mode}emitToken(e){this._token=e}emit(){const e=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);this.emitToken(e);return e}emitEOF(){const e=this.column;const t=this.line;const i=this._factory.create(this._tokenFactorySourcePair,r.EOF,null,r.DEFAULT_CHANNEL,this._input.index,this._input.index-1,t,e);this.emitToken(i);return i}getCharIndex(){return this._input.index}getAllTokens(){const e=[];let t=this.nextToken();while(t.type!==r.EOF){e.push(t);t=this.nextToken()}return e}notifyListeners(e){const t=this._tokenStartCharIndex;const r=this._input.index;const i=this._input.getText(t,r);const n="token recognition error at: '"+this.getErrorDisplay(i)+"'";const s=this.getErrorListenerDispatch();s.syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,n,e)}getErrorDisplay(e){const t=[];for(let r=0;r<e.length;r++){t.push(e[r])}return t.join("")}getErrorDisplayForChar(e){if(e.charCodeAt(0)===r.EOF){return"<EOF>"}else if(e==="\n"){return"\\n"}else if(e==="\t"){return"\\t"}else if(e==="\r"){return"\\r"}else{return e}}getCharErrorDisplay(e){return"'"+this.getErrorDisplayForChar(e)+"'"}recover(e){if(this._input.LA(1)!==r.EOF){if(e instanceof o){this._interp.consume(this._input)}else{this._input.consume()}}}get inputStream(){return this._input}set inputStream(e){this._input=null;this._tokenFactorySourcePair=[this,this._input];this.reset();this._input=e;this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this.type}set type(e){this._type=e}get line(){return this._interp.line}set line(e){this._interp.line=e}get column(){return this._interp.column}set column(e){this._interp.column=e}get text(){if(this._text!==null){return this._text}else{return this._interp.getText(this._input)}}set text(e){this._text=e}};a.DEFAULT_MODE=0;a.MORE=-2;a.SKIP=-3;a.DEFAULT_TOKEN_CHANNEL=r.DEFAULT_CHANNEL;a.HIDDEN=r.HIDDEN_CHANNEL;a.MIN_CHAR_VALUE=0;a.MAX_CHAR_VALUE=1114111;t.exports=a}));var kr=__commonJS(((e,t)=>{var r=xr();var i=ur();var{SemanticContext:n}=dr();var{merge:s}=vr();function hashATNConfig(e){return e.hashCodeForConfigSet()}function equalATNConfigs(e,t){if(e===t){return true}else if(e===null||t===null){return false}else return e.equalsForConfigSet(t)}var o=class{constructor(e){this.configLookup=new i.Set(hashATNConfig,equalATNConfigs);this.fullCtx=e===void 0?true:e;this.readOnly=false;this.configs=[];this.uniqueAlt=0;this.conflictingAlts=null;this.hasSemanticContext=false;this.dipsIntoOuterContext=false;this.cachedHashCode=-1}add(e,t){if(t===void 0){t=null}if(this.readOnly){throw"This set is readonly"}if(e.semanticContext!==n.NONE){this.hasSemanticContext=true}if(e.reachesIntoOuterContext>0){this.dipsIntoOuterContext=true}const r=this.configLookup.add(e);if(r===e){this.cachedHashCode=-1;this.configs.push(e);return true}const i=!this.fullCtx;const o=s(r.context,e.context,i,t);r.reachesIntoOuterContext=Math.max(r.reachesIntoOuterContext,e.reachesIntoOuterContext);if(e.precedenceFilterSuppressed){r.precedenceFilterSuppressed=true}r.context=o;return true}getStates(){const e=new i.Set;for(let t=0;t<this.configs.length;t++){e.add(this.configs[t].state)}return e}getPredicates(){const e=[];for(let t=0;t<this.configs.length;t++){const r=this.configs[t].semanticContext;if(r!==n.NONE){e.push(r.semanticContext)}}return e}optimizeConfigs(e){if(this.readOnly){throw"This set is readonly"}if(this.configLookup.length===0){return}for(let t=0;t<this.configs.length;t++){const r=this.configs[t];r.context=e.getCachedContext(r.context)}}addAll(e){for(let t=0;t<e.length;t++){this.add(e[t])}return false}equals(e){return this===e||e instanceof o&&i.equalArrays(this.configs,e.configs)&&this.fullCtx===e.fullCtx&&this.uniqueAlt===e.uniqueAlt&&this.conflictingAlts===e.conflictingAlts&&this.hasSemanticContext===e.hasSemanticContext&&this.dipsIntoOuterContext===e.dipsIntoOuterContext}hashCode(){const e=new i.Hash;e.update(this.configs);return e.finish()}updateHashCode(e){if(this.readOnly){if(this.cachedHashCode===-1){this.cachedHashCode=this.hashCode()}e.update(this.cachedHashCode)}else{e.update(this.hashCode())}}isEmpty(){return this.configs.length===0}contains(e){if(this.configLookup===null){throw"This method is not implemented for readonly sets."}return this.configLookup.contains(e)}containsFast(e){if(this.configLookup===null){throw"This method is not implemented for readonly sets."}return this.configLookup.containsFast(e)}clear(){if(this.readOnly){throw"This set is readonly"}this.configs=[];this.cachedHashCode=-1;this.configLookup=new i.Set}setReadonly(e){this.readOnly=e;if(e){this.configLookup=null}}toString(){return i.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==r.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(this.conflictingAlts!==null?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}};var a=class extends o{constructor(){super();this.configLookup=new i.Set}};t.exports={ATNConfigSet:o,OrderedATNConfigSet:a}}));var Pr=__commonJS(((e,t)=>{var{ATNConfigSet:r}=kr();var{Hash:i,Set:n}=ur();var s=class{constructor(e,t){this.alt=t;this.pred=e}toString(){return"("+this.pred+", "+this.alt+")"}};var o=class{constructor(e,t){if(e===null){e=-1}if(t===null){t=new r}this.stateNumber=e;this.configs=t;this.edges=null;this.isAcceptState=false;this.prediction=0;this.lexerActionExecutor=null;this.requiresFullContext=false;this.predicates=null;return this}getAltSet(){const e=new n;if(this.configs!==null){for(let t=0;t<this.configs.length;t++){const r=this.configs[t];e.add(r.alt)}}if(e.length===0){return null}else{return e}}equals(e){return this===e||e instanceof o&&this.configs.equals(e.configs)}toString(){let e=""+this.stateNumber+":"+this.configs;if(this.isAcceptState){e=e+"=>";if(this.predicates!==null)e=e+this.predicates;else e=e+this.prediction}return e}hashCode(){const e=new i;e.update(this.configs);return e.finish()}};t.exports={DFAState:o,PredPrediction:s}}));var Lr=__commonJS(((e,t)=>{var{DFAState:r}=Pr();var{ATNConfigSet:i}=kr();var{getCachedPredictionContext:n}=vr();var{Map:s}=ur();var o=class{constructor(e,t){this.atn=e;this.sharedContextCache=t;return this}getCachedContext(e){if(this.sharedContextCache===null){return e}const t=new s;return n(e,this.sharedContextCache,t)}};o.ERROR=new r(2147483647,new i);t.exports=o}));var Ir=__commonJS(((e,t)=>{var{hashStuff:r}=ur();var{LexerIndexedCustomAction:i}=Sr();var n=class{constructor(e){this.lexerActions=e===null?[]:e;this.cachedHashCode=r(e);return this}fixOffsetBeforeMatch(e){let t=null;for(let r=0;r<this.lexerActions.length;r++){if(this.lexerActions[r].isPositionDependent&&!(this.lexerActions[r]instanceof i)){if(t===null){t=this.lexerActions.concat([])}t[r]=new i(e,this.lexerActions[r])}}if(t===null){return this}else{return new n(t)}}execute(e,t,r){let n=false;const s=t.index;try{for(let o=0;o<this.lexerActions.length;o++){let a=this.lexerActions[o];if(a instanceof i){const e=a.offset;t.seek(r+e);a=a.action;n=r+e!==s}else if(a.isPositionDependent){t.seek(s);n=false}a.execute(e)}}finally{if(n){t.seek(s)}}}hashCode(){return this.cachedHashCode}updateHashCode(e){e.update(this.cachedHashCode)}equals(e){if(this===e){return true}else if(!(e instanceof n)){return false}else if(this.cachedHashCode!=e.cachedHashCode){return false}else if(this.lexerActions.length!=e.lexerActions.length){return false}else{const t=this.lexerActions.length;for(let r=0;r<t;++r){if(!this.lexerActions[r].equals(e.lexerActions[r])){return false}}return true}}static append(e,t){if(e===null){return new n([t])}const r=e.lexerActions.concat([t]);return new n(r)}};t.exports=n}));var Mr=__commonJS(((e,t)=>{var{Token:r}=cr();var i=Rr();var n=xr();var s=Lr();var{DFAState:o}=Pr();var{OrderedATNConfigSet:a}=kr();var{PredictionContext:l}=vr();var{SingletonPredictionContext:u}=vr();var{RuleStopState:c}=hr();var{LexerATNConfig:h}=fr();var{Transition:d}=mr();var p=Ir();var{LexerNoViableAltException:m}=Or();function resetSimState(e){e.index=-1;e.line=0;e.column=-1;e.dfaState=null}var g=class{constructor(){resetSimState(this)}reset(){resetSimState(this)}};var y=class extends s{constructor(e,t,r,n){super(t,n);this.decisionToDFA=r;this.recog=e;this.startIndex=-1;this.line=1;this.column=0;this.mode=i.DEFAULT_MODE;this.prevAccept=new g}copyState(e){this.column=e.column;this.line=e.line;this.mode=e.mode;this.startIndex=e.startIndex}match(e,t){this.match_calls+=1;this.mode=t;const r=e.mark();try{this.startIndex=e.index;this.prevAccept.reset();const i=this.decisionToDFA[t];if(i.s0===null){return this.matchATN(e)}else{return this.execATN(e,i.s0)}}finally{e.release(r)}}reset(){this.prevAccept.reset();this.startIndex=-1;this.line=1;this.column=0;this.mode=i.DEFAULT_MODE}matchATN(e){const t=this.atn.modeToStartState[this.mode];if(y.debug){console.log("matchATN mode "+this.mode+" start: "+t)}const r=this.mode;const i=this.computeStartState(e,t);const n=i.hasSemanticContext;i.hasSemanticContext=false;const s=this.addDFAState(i);if(!n){this.decisionToDFA[this.mode].s0=s}const o=this.execATN(e,s);if(y.debug){console.log("DFA after matchATN: "+this.decisionToDFA[r].toLexerString())}return o}execATN(e,t){if(y.debug){console.log("start state closure="+t.configs)}if(t.isAcceptState){this.captureSimState(this.prevAccept,e,t)}let i=e.LA(1);let n=t;while(true){if(y.debug){console.log("execATN loop starting closure: "+n.configs)}let t=this.getExistingTargetState(n,i);if(t===null){t=this.computeTargetState(e,n,i)}if(t===s.ERROR){break}if(i!==r.EOF){this.consume(e)}if(t.isAcceptState){this.captureSimState(this.prevAccept,e,t);if(i===r.EOF){break}}i=e.LA(1);n=t}return this.failOrAccept(this.prevAccept,e,n.configs,i)}getExistingTargetState(e,t){if(e.edges===null||t<y.MIN_DFA_EDGE||t>y.MAX_DFA_EDGE){return null}let r=e.edges[t-y.MIN_DFA_EDGE];if(r===void 0){r=null}if(y.debug&&r!==null){console.log("reuse state "+e.stateNumber+" edge to "+r.stateNumber)}return r}computeTargetState(e,t,r){const i=new a;this.getReachableConfigSet(e,t.configs,i,r);if(i.items.length===0){if(!i.hasSemanticContext){this.addDFAEdge(t,r,s.ERROR)}return s.ERROR}return this.addDFAEdge(t,r,null,i)}failOrAccept(e,t,i,n){if(this.prevAccept.dfaState!==null){const r=e.dfaState.lexerActionExecutor;this.accept(t,r,this.startIndex,e.index,e.line,e.column);return e.dfaState.prediction}else{if(n===r.EOF&&t.index===this.startIndex){return r.EOF}throw new m(this.recog,t,this.startIndex,i)}}getReachableConfigSet(e,t,i,s){let o=n.INVALID_ALT_NUMBER;for(let n=0;n<t.items.length;n++){const a=t.items[n];const l=a.alt===o;if(l&&a.passedThroughNonGreedyDecision){continue}if(y.debug){console.log("testing %s at %s\n",this.getTokenName(s),a.toString(this.recog,true))}for(let t=0;t<a.state.transitions.length;t++){const n=a.state.transitions[t];const u=this.getReachableTarget(n,s);if(u!==null){let t=a.lexerActionExecutor;if(t!==null){t=t.fixOffsetBeforeMatch(e.index-this.startIndex)}const n=s===r.EOF;const c=new h({state:u,lexerActionExecutor:t},a);if(this.closure(e,c,i,l,true,n)){o=a.alt}}}}}accept(e,t,r,i,n,s){if(y.debug){console.log("ACTION %s\n",t)}e.seek(i);this.line=n;this.column=s;if(t!==null&&this.recog!==null){t.execute(this.recog,e,r)}}getReachableTarget(e,t){if(e.matches(t,0,i.MAX_CHAR_VALUE)){return e.target}else{return null}}computeStartState(e,t){const r=l.EMPTY;const i=new a;for(let n=0;n<t.transitions.length;n++){const s=t.transitions[n].target;const o=new h({state:s,alt:n+1,context:r},null);this.closure(e,o,i,false,false,false)}return i}closure(e,t,r,i,n,s){let o=null;if(y.debug){console.log("closure("+t.toString(this.recog,true)+")")}if(t.state instanceof c){if(y.debug){if(this.recog!==null){console.log("closure at %s rule stop %s\n",this.recog.ruleNames[t.state.ruleIndex],t)}else{console.log("closure at rule stop %s\n",t)}}if(t.context===null||t.context.hasEmptyPath()){if(t.context===null||t.context.isEmpty()){r.add(t);return true}else{r.add(new h({state:t.state,context:l.EMPTY},t));i=true}}if(t.context!==null&&!t.context.isEmpty()){for(let a=0;a<t.context.length;a++){if(t.context.getReturnState(a)!==l.EMPTY_RETURN_STATE){const l=t.context.getParent(a);const u=this.atn.states[t.context.getReturnState(a)];o=new h({state:u,context:l},t);i=this.closure(e,o,r,i,n,s)}}}return i}if(!t.state.epsilonOnlyTransitions){if(!i||!t.passedThroughNonGreedyDecision){r.add(t)}}for(let a=0;a<t.state.transitions.length;a++){const l=t.state.transitions[a];o=this.getEpsilonTarget(e,t,l,r,n,s);if(o!==null){i=this.closure(e,o,r,i,n,s)}}return i}getEpsilonTarget(e,t,n,s,o,a){let l=null;if(n.serializationType===d.RULE){const e=u.create(t.context,n.followState.stateNumber);l=new h({state:n.target,context:e},t)}else if(n.serializationType===d.PRECEDENCE){throw"Precedence predicates are not supported in lexers."}else if(n.serializationType===d.PREDICATE){if(y.debug){console.log("EVAL rule "+n.ruleIndex+":"+n.predIndex)}s.hasSemanticContext=true;if(this.evaluatePredicate(e,n.ruleIndex,n.predIndex,o)){l=new h({state:n.target},t)}}else if(n.serializationType===d.ACTION){if(t.context===null||t.context.hasEmptyPath()){const e=p.append(t.lexerActionExecutor,this.atn.lexerActions[n.actionIndex]);l=new h({state:n.target,lexerActionExecutor:e},t)}else{l=new h({state:n.target},t)}}else if(n.serializationType===d.EPSILON){l=new h({state:n.target},t)}else if(n.serializationType===d.ATOM||n.serializationType===d.RANGE||n.serializationType===d.SET){if(a){if(n.matches(r.EOF,0,i.MAX_CHAR_VALUE)){l=new h({state:n.target},t)}}}return l}evaluatePredicate(e,t,r,i){if(this.recog===null){return true}if(!i){return this.recog.sempred(null,t,r)}const n=this.column;const s=this.line;const o=e.index;const a=e.mark();try{this.consume(e);return this.recog.sempred(null,t,r)}finally{this.column=n;this.line=s;e.seek(o);e.release(a)}}captureSimState(e,t,r){e.index=t.index;e.line=this.line;e.column=this.column;e.dfaState=r}addDFAEdge(e,t,r,i){if(r===void 0){r=null}if(i===void 0){i=null}if(r===null&&i!==null){const e=i.hasSemanticContext;i.hasSemanticContext=false;r=this.addDFAState(i);if(e){return r}}if(t<y.MIN_DFA_EDGE||t>y.MAX_DFA_EDGE){return r}if(y.debug){console.log("EDGE "+e+" -> "+r+" upon "+t)}if(e.edges===null){e.edges=[]}e.edges[t-y.MIN_DFA_EDGE]=r;return r}addDFAState(e){const t=new o(null,e);let r=null;for(let t=0;t<e.items.length;t++){const i=e.items[t];if(i.state instanceof c){r=i;break}}if(r!==null){t.isAcceptState=true;t.lexerActionExecutor=r.lexerActionExecutor;t.prediction=this.atn.ruleToTokenType[r.state.ruleIndex]}const i=this.decisionToDFA[this.mode];const n=i.states.get(t);if(n!==null){return n}const s=t;s.stateNumber=i.states.length;e.setReadonly(true);s.configs=e;i.states.add(s);return s}getDFA(e){return this.decisionToDFA[e]}getText(e){return e.getText(this.startIndex,e.index-1)}consume(e){const t=e.LA(1);if(t==="\n".charCodeAt(0)){this.line+=1;this.column=0}else{this.column+=1}e.consume()}getTokenName(e){if(e===-1){return"EOF"}else{return"'"+String.fromCharCode(e)+"'"}}};y.debug=false;y.dfa_debug=false;y.MIN_DFA_EDGE=0;y.MAX_DFA_EDGE=127;y.match_calls=0;t.exports=y}));var Dr=__commonJS(((e,t)=>{var{Map:r,BitSet:i,AltDict:n,hashStuff:s}=ur();var o=xr();var{RuleStopState:a}=hr();var{ATNConfigSet:l}=kr();var{ATNConfig:u}=fr();var{SemanticContext:c}=dr();var h={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(e,t){if(h.allConfigsInRuleStopStates(t)){return true}if(e===h.SLL){if(t.hasSemanticContext){const e=new l;for(let r=0;r<t.items.length;r++){let i=t.items[r];i=new u({semanticContext:c.NONE},i);e.add(i)}t=e}}const r=h.getConflictingAltSubsets(t);return h.hasConflictingAltSet(r)&&!h.hasStateAssociatedWithOneAlt(t)},hasConfigInRuleStopState:function(e){for(let t=0;t<e.items.length;t++){const r=e.items[t];if(r.state instanceof a){return true}}return false},allConfigsInRuleStopStates:function(e){for(let t=0;t<e.items.length;t++){const r=e.items[t];if(!(r.state instanceof a)){return false}}return true},resolvesToJustOneViableAlt:function(e){return h.getSingleViableAlt(e)},allSubsetsConflict:function(e){return!h.hasNonConflictingAltSet(e)},hasNonConflictingAltSet:function(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.length===1){return true}}return false},hasConflictingAltSet:function(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.length>1){return true}}return false},allSubsetsEqual:function(e){let t=null;for(let r=0;r<e.length;r++){const i=e[r];if(t===null){t=i}else if(i!==t){return false}}return true},getUniqueAlt:function(e){const t=h.getAlts(e);if(t.length===1){return t.minValue()}else{return o.INVALID_ALT_NUMBER}},getAlts:function(e){const t=new i;e.map((function(e){t.or(e)}));return t},getConflictingAltSubsets:function(e){const t=new r;t.hashFunction=function(e){s(e.state.stateNumber,e.context)};t.equalsFunction=function(e,t){return e.state.stateNumber===t.state.stateNumber&&e.context.equals(t.context)};e.items.map((function(e){let r=t.get(e);if(r===null){r=new i;t.put(e,r)}r.add(e.alt)}));return t.getValues()},getStateToAltMap:function(e){const t=new n;e.items.map((function(e){let r=t.get(e.state);if(r===null){r=new i;t.put(e.state,r)}r.add(e.alt)}));return t},hasStateAssociatedWithOneAlt:function(e){const t=h.getStateToAltMap(e).values();for(let e=0;e<t.length;e++){if(t[e].length===1){return true}}return false},getSingleViableAlt:function(e){let t=null;for(let r=0;r<e.length;r++){const i=e[r];const n=i.minValue();if(t===null){t=n}else if(t!==n){return o.INVALID_ALT_NUMBER}}return t}};t.exports=h}));var Fr=__commonJS(((e,t)=>{var r=_r();var i=gr();var n=i.INVALID_INTERVAL;var s=i.TerminalNode;var o=i.TerminalNodeImpl;var a=i.ErrorNodeImpl;var l=pr().Interval;var u=class extends r{constructor(e,t){e=e||null;t=t||null;super(e,t);this.ruleIndex=-1;this.children=null;this.start=null;this.stop=null;this.exception=null}copyFrom(e){this.parentCtx=e.parentCtx;this.invokingState=e.invokingState;this.children=null;this.start=e.start;this.stop=e.stop;if(e.children){this.children=[];e.children.map((function(e){if(e instanceof a){this.children.push(e);e.parentCtx=this}}),this)}}enterRule(e){}exitRule(e){}addChild(e){if(this.children===null){this.children=[]}this.children.push(e);return e}removeLastChild(){if(this.children!==null){this.children.pop()}}addTokenNode(e){const t=new o(e);this.addChild(t);t.parentCtx=this;return t}addErrorNode(e){const t=new a(e);this.addChild(t);t.parentCtx=this;return t}getChild(e,t){t=t||null;if(this.children===null||e<0||e>=this.children.length){return null}if(t===null){return this.children[e]}else{for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i instanceof t){if(e===0){return i}else{e-=1}}}return null}}getToken(e,t){if(this.children===null||t<0||t>=this.children.length){return null}for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i instanceof s){if(i.symbol.type===e){if(t===0){return i}else{t-=1}}}}return null}getTokens(e){if(this.children===null){return[]}else{const t=[];for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i instanceof s){if(i.symbol.type===e){t.push(i)}}}return t}}getTypedRuleContext(e,t){return this.getChild(t,e)}getTypedRuleContexts(e){if(this.children===null){return[]}else{const t=[];for(let r=0;r<this.children.length;r++){const i=this.children[r];if(i instanceof e){t.push(i)}}return t}}getChildCount(){if(this.children===null){return 0}else{return this.children.length}}getSourceInterval(){if(this.start===null||this.stop===null){return n}else{return new l(this.start.tokenIndex,this.stop.tokenIndex)}}};r.EMPTY=new u;t.exports=u}));var jr=__commonJS(((e,t)=>{var r=ur();var{Set:i,BitSet:n,DoubleDict:s}=r;var o=xr();var{ATNState:a,RuleStopState:l}=hr();var{ATNConfig:u}=fr();var{ATNConfigSet:c}=kr();var{Token:h}=cr();var{DFAState:d,PredPrediction:p}=Pr();var m=Lr();var g=Dr();var y=_r();var _=Fr();var{SemanticContext:v}=dr();var{PredictionContext:b}=vr();var{Interval:x}=pr();var{Transition:T,SetTransition:w,NotSetTransition:S,RuleTransition:E,ActionTransition:A}=mr();var{NoViableAltException:C}=Or();var{SingletonPredictionContext:N,predictionContextFromRuleContext:O}=vr();var R=class extends m{constructor(e,t,r,i){super(t,i);this.parser=e;this.decisionToDFA=r;this.predictionMode=g.LL;this._input=null;this._startIndex=0;this._outerContext=null;this._dfa=null;this.mergeCache=null;this.debug=false;this.debug_closure=false;this.debug_add=false;this.debug_list_atn_decisions=false;this.dfa_debug=false;this.retry_debug=false}reset(){}adaptivePredict(e,t,r){if(this.debug||this.debug_list_atn_decisions){console.log("adaptivePredict decision "+t+" exec LA(1)=="+this.getLookaheadName(e)+" line "+e.LT(1).line+":"+e.LT(1).column)}this._input=e;this._startIndex=e.index;this._outerContext=r;const i=this.decisionToDFA[t];this._dfa=i;const n=e.mark();const s=e.index;try{let t;if(i.precedenceDfa){t=i.getPrecedenceStartState(this.parser.getPrecedence())}else{t=i.s0}if(t===null){if(r===null){r=y.EMPTY}if(this.debug||this.debug_list_atn_decisions){console.log("predictATN decision "+i.decision+" exec LA(1)=="+this.getLookaheadName(e)+", outerContext="+r.toString(this.parser.ruleNames))}const n=false;let s=this.computeStartState(i.atnStartState,y.EMPTY,n);if(i.precedenceDfa){i.s0.configs=s;s=this.applyPrecedenceFilter(s);t=this.addDFAState(i,new d(null,s));i.setPrecedenceStartState(this.parser.getPrecedence(),t)}else{t=this.addDFAState(i,new d(null,s));i.s0=t}}const o=this.execATN(i,t,e,s,r);if(this.debug){console.log("DFA after predictATN: "+i.toString(this.parser.literalNames))}return o}finally{this._dfa=null;this.mergeCache=null;e.seek(s);e.release(n)}}execATN(e,t,r,i,n){if(this.debug||this.debug_list_atn_decisions){console.log("execATN decision "+e.decision+" exec LA(1)=="+this.getLookaheadName(r)+" line "+r.LT(1).line+":"+r.LT(1).column)}let s;let a=t;if(this.debug){console.log("s0 = "+t)}let l=r.LA(1);while(true){let t=this.getExistingTargetState(a,l);if(t===null){t=this.computeTargetState(e,a,l)}if(t===m.ERROR){const e=this.noViableAlt(r,n,a.configs,i);r.seek(i);s=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(a.configs,n);if(s!==o.INVALID_ALT_NUMBER){return s}else{throw e}}if(t.requiresFullContext&&this.predictionMode!==g.SLL){let o=null;if(t.predicates!==null){if(this.debug){console.log("DFA state has preds in DFA sim LL failover")}const e=r.index;if(e!==i){r.seek(i)}o=this.evalSemanticContext(t.predicates,n,true);if(o.length===1){if(this.debug){console.log("Full LL avoided")}return o.minValue()}if(e!==i){r.seek(e)}}if(this.dfa_debug){console.log("ctx sensitive state "+n+" in "+t)}const a=true;const l=this.computeStartState(e.atnStartState,n,a);this.reportAttemptingFullContext(e,o,t.configs,i,r.index);s=this.execATNWithFullContext(e,t,l,r,i,n);return s}if(t.isAcceptState){if(t.predicates===null){return t.prediction}const s=r.index;r.seek(i);const o=this.evalSemanticContext(t.predicates,n,true);if(o.length===0){throw this.noViableAlt(r,n,t.configs,i)}else if(o.length===1){return o.minValue()}else{this.reportAmbiguity(e,t,i,s,false,o,t.configs);return o.minValue()}}a=t;if(l!==h.EOF){r.consume();l=r.LA(1)}}}getExistingTargetState(e,t){const r=e.edges;if(r===null){return null}else{return r[t+1]||null}}computeTargetState(e,t,i){const n=this.computeReachSet(t.configs,i,false);if(n===null){this.addDFAEdge(e,t,i,m.ERROR);return m.ERROR}let s=new d(null,n);const a=this.getUniqueAlt(n);if(this.debug){const e=g.getConflictingAltSubsets(n);console.log("SLL altSubSets="+r.arrayToString(e)+", previous="+t.configs+", configs="+n+", predict="+a+", allSubsetsConflict="+g.allSubsetsConflict(e)+", conflictingAlts="+this.getConflictingAlts(n))}if(a!==o.INVALID_ALT_NUMBER){s.isAcceptState=true;s.configs.uniqueAlt=a;s.prediction=a}else if(g.hasSLLConflictTerminatingPrediction(this.predictionMode,n)){s.configs.conflictingAlts=this.getConflictingAlts(n);s.requiresFullContext=true;s.isAcceptState=true;s.prediction=s.configs.conflictingAlts.minValue()}if(s.isAcceptState&&s.configs.hasSemanticContext){this.predicateDFAState(s,this.atn.getDecisionState(e.decision));if(s.predicates!==null){s.prediction=o.INVALID_ALT_NUMBER}}s=this.addDFAEdge(e,t,i,s);return s}predicateDFAState(e,t){const r=t.transitions.length;const i=this.getConflictingAltsOrUniqueAlt(e.configs);const n=this.getPredsForAmbigAlts(i,e.configs,r);if(n!==null){e.predicates=this.getPredicatePredictions(i,n);e.prediction=o.INVALID_ALT_NUMBER}else{e.prediction=i.minValue()}}execATNWithFullContext(e,t,r,i,n,s){if(this.debug||this.debug_list_atn_decisions){console.log("execATNWithFullContext "+r)}const a=true;let l=false;let u;let c=r;i.seek(n);let d=i.LA(1);let p=-1;while(true){u=this.computeReachSet(c,d,a);if(u===null){const e=this.noViableAlt(i,s,c,n);i.seek(n);const t=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(c,s);if(t!==o.INVALID_ALT_NUMBER){return t}else{throw e}}const e=g.getConflictingAltSubsets(u);if(this.debug){console.log("LL altSubSets="+e+", predict="+g.getUniqueAlt(e)+", resolvesToJustOneViableAlt="+g.resolvesToJustOneViableAlt(e))}u.uniqueAlt=this.getUniqueAlt(u);if(u.uniqueAlt!==o.INVALID_ALT_NUMBER){p=u.uniqueAlt;break}else if(this.predictionMode!==g.LL_EXACT_AMBIG_DETECTION){p=g.resolvesToJustOneViableAlt(e);if(p!==o.INVALID_ALT_NUMBER){break}}else{if(g.allSubsetsConflict(e)&&g.allSubsetsEqual(e)){l=true;p=g.getSingleViableAlt(e);break}}c=u;if(d!==h.EOF){i.consume();d=i.LA(1)}}if(u.uniqueAlt!==o.INVALID_ALT_NUMBER){this.reportContextSensitivity(e,p,u,n,i.index);return p}this.reportAmbiguity(e,t,n,i.index,l,null,u);return p}computeReachSet(e,t,r){if(this.debug){console.log("in computeReachSet, starting closure: "+e)}if(this.mergeCache===null){this.mergeCache=new s}const n=new c(r);let a=null;for(let i=0;i<e.items.length;i++){const s=e.items[i];if(this.debug){console.log("testing "+this.getTokenName(t)+" at "+s)}if(s.state instanceof l){if(r||t===h.EOF){if(a===null){a=[]}a.push(s);if(this.debug_add){console.log("added "+s+" to skippedStopStates")}}continue}for(let e=0;e<s.state.transitions.length;e++){const r=s.state.transitions[e];const i=this.getReachableTarget(r,t);if(i!==null){const e=new u({state:i},s);n.add(e,this.mergeCache);if(this.debug_add){console.log("added "+e+" to intermediate")}}}}let d=null;if(a===null&&t!==h.EOF){if(n.items.length===1){d=n}else if(this.getUniqueAlt(n)!==o.INVALID_ALT_NUMBER){d=n}}if(d===null){d=new c(r);const e=new i;const s=t===h.EOF;for(let t=0;t<n.items.length;t++){this.closure(n.items[t],d,e,false,r,s)}}if(t===h.EOF){d=this.removeAllConfigsNotInRuleStopState(d,d===n)}if(a!==null&&(!r||!g.hasConfigInRuleStopState(d))){for(let e=0;e<a.length;e++){d.add(a[e],this.mergeCache)}}if(d.items.length===0){return null}else{return d}}removeAllConfigsNotInRuleStopState(e,t){if(g.allConfigsInRuleStopStates(e)){return e}const r=new c(e.fullCtx);for(let i=0;i<e.items.length;i++){const n=e.items[i];if(n.state instanceof l){r.add(n,this.mergeCache);continue}if(t&&n.state.epsilonOnlyTransitions){const e=this.atn.nextTokens(n.state);if(e.contains(h.EPSILON)){const e=this.atn.ruleToStopState[n.state.ruleIndex];r.add(new u({state:e},n),this.mergeCache)}}}return r}computeStartState(e,t,r){const n=O(this.atn,t);const s=new c(r);for(let t=0;t<e.transitions.length;t++){const o=e.transitions[t].target;const a=new u({state:o,alt:t+1,context:n},null);const l=new i;this.closure(a,s,l,true,r,false)}return s}applyPrecedenceFilter(e){let t;const r=[];const i=new c(e.fullCtx);for(let n=0;n<e.items.length;n++){t=e.items[n];if(t.alt!==1){continue}const s=t.semanticContext.evalPrecedence(this.parser,this._outerContext);if(s===null){continue}r[t.state.stateNumber]=t.context;if(s!==t.semanticContext){i.add(new u({semanticContext:s},t),this.mergeCache)}else{i.add(t,this.mergeCache)}}for(let n=0;n<e.items.length;n++){t=e.items[n];if(t.alt===1){continue}if(!t.precedenceFilterSuppressed){const e=r[t.state.stateNumber]||null;if(e!==null&&e.equals(t.context)){continue}}i.add(t,this.mergeCache)}return i}getReachableTarget(e,t){if(e.matches(t,0,this.atn.maxTokenType)){return e.target}else{return null}}getPredsForAmbigAlts(e,t,i){let n=[];for(let r=0;r<t.items.length;r++){const i=t.items[r];if(e.contains(i.alt)){n[i.alt]=v.orContext(n[i.alt]||null,i.semanticContext)}}let s=0;for(let e=1;e<i+1;e++){const t=n[e]||null;if(t===null){n[e]=v.NONE}else if(t!==v.NONE){s+=1}}if(s===0){n=null}if(this.debug){console.log("getPredsForAmbigAlts result "+r.arrayToString(n))}return n}getPredicatePredictions(e,t){const r=[];let i=false;for(let n=1;n<t.length;n++){const s=t[n];if(e!==null&&e.contains(n)){r.push(new p(s,n))}if(s!==v.NONE){i=true}}if(!i){return null}return r}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(e,t){const r=this.splitAccordingToSemanticValidity(e,t);const i=r[0];const n=r[1];let s=this.getAltThatFinishedDecisionEntryRule(i);if(s!==o.INVALID_ALT_NUMBER){return s}if(n.items.length>0){s=this.getAltThatFinishedDecisionEntryRule(n);if(s!==o.INVALID_ALT_NUMBER){return s}}return o.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(e){const t=[];for(let r=0;r<e.items.length;r++){const i=e.items[r];if(i.reachesIntoOuterContext>0||i.state instanceof l&&i.context.hasEmptyPath()){if(t.indexOf(i.alt)<0){t.push(i.alt)}}}if(t.length===0){return o.INVALID_ALT_NUMBER}else{return Math.min.apply(null,t)}}splitAccordingToSemanticValidity(e,t){const r=new c(e.fullCtx);const i=new c(e.fullCtx);for(let n=0;n<e.items.length;n++){const s=e.items[n];if(s.semanticContext!==v.NONE){const e=s.semanticContext.evaluate(this.parser,t);if(e){r.add(s)}else{i.add(s)}}else{r.add(s)}}return[r,i]}evalSemanticContext(e,t,r){const i=new n;for(let n=0;n<e.length;n++){const s=e[n];if(s.pred===v.NONE){i.add(s.alt);if(!r){break}continue}const o=s.pred.evaluate(this.parser,t);if(this.debug||this.dfa_debug){console.log("eval pred "+s+"="+o)}if(o){if(this.debug||this.dfa_debug){console.log("PREDICT "+s.alt)}i.add(s.alt);if(!r){break}}}return i}closure(e,t,r,i,n,s){const o=0;this.closureCheckingStopState(e,t,r,i,n,o,s)}closureCheckingStopState(e,t,r,i,n,s,o){if(this.debug||this.debug_closure){console.log("closure("+e.toString(this.parser,true)+")");if(e.reachesIntoOuterContext>50){throw"problem"}}if(e.state instanceof l){if(!e.context.isEmpty()){for(let a=0;a<e.context.length;a++){if(e.context.getReturnState(a)===b.EMPTY_RETURN_STATE){if(n){t.add(new u({state:e.state,context:b.EMPTY},e),this.mergeCache);continue}else{if(this.debug){console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex))}this.closure_(e,t,r,i,n,s,o)}continue}const l=this.atn.states[e.context.getReturnState(a)];const c=e.context.getParent(a);const h={state:l,alt:e.alt,context:c,semanticContext:e.semanticContext};const d=new u(h,null);d.reachesIntoOuterContext=e.reachesIntoOuterContext;this.closureCheckingStopState(d,t,r,i,n,s-1,o)}return}else if(n){t.add(e,this.mergeCache);return}else{if(this.debug){console.log("FALLING off rule "+this.getRuleName(e.state.ruleIndex))}}}this.closure_(e,t,r,i,n,s,o)}closure_(e,t,r,i,n,s,o){const a=e.state;if(!a.epsilonOnlyTransitions){t.add(e,this.mergeCache)}for(let u=0;u<a.transitions.length;u++){if(u===0&&this.canDropLoopEntryEdgeInLeftRecursiveRule(e))continue;const c=a.transitions[u];const h=i&&!(c instanceof A);const d=this.getEpsilonTarget(e,c,h,s===0,n,o);if(d!==null){let i=s;if(e.state instanceof l){if(this._dfa!==null&&this._dfa.precedenceDfa){if(c.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex){d.precedenceFilterSuppressed=true}}d.reachesIntoOuterContext+=1;if(r.add(d)!==d){continue}t.dipsIntoOuterContext=true;i-=1;if(this.debug){console.log("dips into outer ctx: "+d)}}else{if(!c.isEpsilon&&r.add(d)!==d){continue}if(c instanceof E){if(i>=0){i+=1}}}this.closureCheckingStopState(d,t,r,h,n,i,o)}}}canDropLoopEntryEdgeInLeftRecursiveRule(e){const t=e.state;if(t.stateType!==a.STAR_LOOP_ENTRY)return false;if(t.stateType!==a.STAR_LOOP_ENTRY||!t.isPrecedenceDecision||e.context.isEmpty()||e.context.hasEmptyPath())return false;const r=e.context.length;for(let i=0;i<r;i++){const r=this.atn.states[e.context.getReturnState(i)];if(r.ruleIndex!==t.ruleIndex)return false}const i=t.transitions[0].target;const n=i.endState.stateNumber;const s=this.atn.states[n];for(let i=0;i<r;i++){const r=e.context.getReturnState(i);const n=this.atn.states[r];if(n.transitions.length!==1||!n.transitions[0].isEpsilon)return false;const o=n.transitions[0].target;if(n.stateType===a.BLOCK_END&&o===t)continue;if(n===s)continue;if(o===s)continue;if(o.stateType===a.BLOCK_END&&o.transitions.length===1&&o.transitions[0].isEpsilon&&o.transitions[0].target===t)continue;return false}return true}getRuleName(e){if(this.parser!==null&&e>=0){return this.parser.ruleNames[e]}else{return"<rule "+e+">"}}getEpsilonTarget(e,t,r,i,n,s){switch(t.serializationType){case T.RULE:return this.ruleTransition(e,t);case T.PRECEDENCE:return this.precedenceTransition(e,t,r,i,n);case T.PREDICATE:return this.predTransition(e,t,r,i,n);case T.ACTION:return this.actionTransition(e,t);case T.EPSILON:return new u({state:t.target},e);case T.ATOM:case T.RANGE:case T.SET:if(s){if(t.matches(h.EOF,0,1)){return new u({state:t.target},e)}}return null;default:return null}}actionTransition(e,t){if(this.debug){const e=t.actionIndex===-1?65535:t.actionIndex;console.log("ACTION edge "+t.ruleIndex+":"+e)}return new u({state:t.target},e)}precedenceTransition(e,t,i,n,s){if(this.debug){console.log("PRED (collectPredicates="+i+") "+t.precedence+">=_p, ctx dependent=true");if(this.parser!==null){console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack()))}}let o=null;if(i&&n){if(s){const r=this._input.index;this._input.seek(this._startIndex);const i=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(r);if(i){o=new u({state:t.target},e)}}else{const r=v.andContext(e.semanticContext,t.getPredicate());o=new u({state:t.target,semanticContext:r},e)}}else{o=new u({state:t.target},e)}if(this.debug){console.log("config from pred transition="+o)}return o}predTransition(e,t,i,n,s){if(this.debug){console.log("PRED (collectPredicates="+i+") "+t.ruleIndex+":"+t.predIndex+", ctx dependent="+t.isCtxDependent);if(this.parser!==null){console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack()))}}let o=null;if(i&&(t.isCtxDependent&&n||!t.isCtxDependent)){if(s){const r=this._input.index;this._input.seek(this._startIndex);const i=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(r);if(i){o=new u({state:t.target},e)}}else{const r=v.andContext(e.semanticContext,t.getPredicate());o=new u({state:t.target,semanticContext:r},e)}}else{o=new u({state:t.target},e)}if(this.debug){console.log("config from pred transition="+o)}return o}ruleTransition(e,t){if(this.debug){console.log("CALL rule "+this.getRuleName(t.target.ruleIndex)+", ctx="+e.context)}const r=t.followState;const i=N.create(e.context,r.stateNumber);return new u({state:t.target,context:i},e)}getConflictingAlts(e){const t=g.getConflictingAltSubsets(e);return g.getAlts(t)}getConflictingAltsOrUniqueAlt(e){let t=null;if(e.uniqueAlt!==o.INVALID_ALT_NUMBER){t=new n;t.add(e.uniqueAlt)}else{t=e.conflictingAlts}return t}getTokenName(e){if(e===h.EOF){return"EOF"}if(this.parser!==null&&this.parser.literalNames!==null){if(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length){console.log(""+e+" ttype out of range: "+this.parser.literalNames);console.log(""+this.parser.getInputStream().getTokens())}else{const t=this.parser.literalNames[e]||this.parser.symbolicNames[e];return t+"<"+e+">"}}return""+e}getLookaheadName(e){return this.getTokenName(e.LA(1))}dumpDeadEndConfigs(e){console.log("dead end configs: ");const t=e.getDeadEndConfigs();for(let e=0;e<t.length;e++){const r=t[e];let i="no edges";if(r.state.transitions.length>0){const e=r.state.transitions[0];if(e instanceof AtomTransition){i="Atom "+this.getTokenName(e.label)}else if(e instanceof w){const t=e instanceof S;i=(t?"~":"")+"Set "+e.set}}console.error(r.toString(this.parser,true)+":"+i)}}noViableAlt(e,t,r,i){return new C(this.parser,e,e.get(i),e.LT(1),r,t)}getUniqueAlt(e){let t=o.INVALID_ALT_NUMBER;for(let r=0;r<e.items.length;r++){const i=e.items[r];if(t===o.INVALID_ALT_NUMBER){t=i.alt}else if(i.alt!==t){return o.INVALID_ALT_NUMBER}}return t}addDFAEdge(e,t,r,i){if(this.debug){console.log("EDGE "+t+" -> "+i+" upon "+this.getTokenName(r))}if(i===null){return null}i=this.addDFAState(e,i);if(t===null||r<-1||r>this.atn.maxTokenType){return i}if(t.edges===null){t.edges=[]}t.edges[r+1]=i;if(this.debug){const t=this.parser===null?null:this.parser.literalNames;const r=this.parser===null?null:this.parser.symbolicNames;console.log("DFA=\n"+e.toString(t,r))}return i}addDFAState(e,t){if(t===m.ERROR){return t}const r=e.states.get(t);if(r!==null){return r}t.stateNumber=e.states.length;if(!t.configs.readOnly){t.configs.optimizeConfigs(this);t.configs.setReadonly(true)}e.states.add(t);if(this.debug){console.log("adding new DFA state: "+t)}return t}reportAttemptingFullContext(e,t,r,i,n){if(this.debug||this.retry_debug){const t=new x(i,n+1);console.log("reportAttemptingFullContext decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(t))}if(this.parser!==null){this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,e,i,n,t,r)}}reportContextSensitivity(e,t,r,i,n){if(this.debug||this.retry_debug){const t=new x(i,n+1);console.log("reportContextSensitivity decision="+e.decision+":"+r+", input="+this.parser.getTokenStream().getText(t))}if(this.parser!==null){this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,e,i,n,t,r)}}reportAmbiguity(e,t,r,i,n,s,o){if(this.debug||this.retry_debug){const e=new x(r,i+1);console.log("reportAmbiguity "+s+":"+o+", input="+this.parser.getTokenStream().getText(e))}if(this.parser!==null){this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,e,r,i,n,s,o)}}};t.exports=R}));var Br=__commonJS((e=>{e.ATN=xr();e.ATNDeserializer=Er();e.LexerATNSimulator=Mr();e.ParserATNSimulator=jr();e.PredictionMode=Dr()}));var Ur=__commonJS((()=>{if(!String.prototype.codePointAt){(function(){"use strict";var e=function(){let e;try{const t={};const r=Object.defineProperty;e=r(t,t,t)&&r}catch(e){}return e}();const codePointAt=function(e){if(this==null){throw TypeError()}const t=String(this);const r=t.length;let i=e?Number(e):0;if(i!==i){i=0}if(i<0||i>=r){return void 0}const n=t.charCodeAt(i);let s;if(n>=55296&&n<=56319&&r>i+1){s=t.charCodeAt(i+1);if(s>=56320&&s<=57343){return(n-55296)*1024+s-56320+65536}}return n};if(e){e(String.prototype,"codePointAt",{value:codePointAt,configurable:true,writable:true})}else{String.prototype.codePointAt=codePointAt}})()}}));var Hr=__commonJS(((e,t)=>{var r=class{constructor(e,t,r){this.dfa=e;this.literalNames=t||[];this.symbolicNames=r||[]}toString(){if(this.dfa.s0===null){return null}let e="";const t=this.dfa.sortedStates();for(let r=0;r<t.length;r++){const i=t[r];if(i.edges!==null){const t=i.edges.length;for(let r=0;r<t;r++){const t=i.edges[r]||null;if(t!==null&&t.stateNumber!==2147483647){e=e.concat(this.getStateString(i));e=e.concat("-");e=e.concat(this.getEdgeLabel(r));e=e.concat("->");e=e.concat(this.getStateString(t));e=e.concat("\n")}}}}return e.length===0?null:e}getEdgeLabel(e){if(e===0){return"EOF"}else if(this.literalNames!==null||this.symbolicNames!==null){return this.literalNames[e-1]||this.symbolicNames[e-1]}else{return String.fromCharCode(e-1)}}getStateString(e){const t=(e.isAcceptState?":":"")+"s"+e.stateNumber+(e.requiresFullContext?"^":"");if(e.isAcceptState){if(e.predicates!==null){return t+"=>"+e.predicates.toString()}else{return t+"=>"+e.prediction.toString()}}else{return t}}};var i=class extends r{constructor(e){super(e,null)}getEdgeLabel(e){return"'"+String.fromCharCode(e)+"'"}};t.exports={DFASerializer:r,LexerDFASerializer:i}}));var zr=__commonJS(((e,t)=>{var{Set:r}=ur();var{DFAState:i}=Pr();var{StarLoopEntryState:n}=hr();var{ATNConfigSet:s}=kr();var{DFASerializer:o}=Hr();var{LexerDFASerializer:a}=Hr();var l=class{constructor(e,t){if(t===void 0){t=0}this.atnStartState=e;this.decision=t;this._states=new r;this.s0=null;this.precedenceDfa=false;if(e instanceof n){if(e.isPrecedenceDecision){this.precedenceDfa=true;const e=new i(null,new s);e.edges=[];e.isAcceptState=false;e.requiresFullContext=false;this.s0=e}}}getPrecedenceStartState(e){if(!this.precedenceDfa){throw"Only precedence DFAs may contain a precedence start state."}if(e<0||e>=this.s0.edges.length){return null}return this.s0.edges[e]||null}setPrecedenceStartState(e,t){if(!this.precedenceDfa){throw"Only precedence DFAs may contain a precedence start state."}if(e<0){return}this.s0.edges[e]=t}setPrecedenceDfa(e){if(this.precedenceDfa!==e){this._states=new r;if(e){const e=new i(null,new s);e.edges=[];e.isAcceptState=false;e.requiresFullContext=false;this.s0=e}else{this.s0=null}this.precedenceDfa=e}}sortedStates(){const e=this._states.values();return e.sort((function(e,t){return e.stateNumber-t.stateNumber}))}toString(e,t){e=e||null;t=t||null;if(this.s0===null){return""}const r=new o(this,e,t);return r.toString()}toLexerString(){if(this.s0===null){return""}const e=new a(this);return e.toString()}get states(){return this._states}};t.exports=l}));var Kr=__commonJS((e=>{e.DFA=zr();e.DFASerializer=Hr().DFASerializer;e.LexerDFASerializer=Hr().LexerDFASerializer;e.PredPrediction=Pr().PredPrediction}));var Vr=__commonJS((()=>{if(!String.fromCodePoint){(function(){const e=function(){let e;try{const t={};const r=Object.defineProperty;e=r(t,t,t)&&r}catch(e){}return e}();const t=String.fromCharCode;const r=Math.floor;const fromCodePoint=function(e){const i=16384;const n=[];let s;let o;let a=-1;const l=arguments.length;if(!l){return""}let u="";while(++a<l){let e=Number(arguments[a]);if(!isFinite(e)||e<0||e>1114111||r(e)!==e){throw RangeError("Invalid code point: "+e)}if(e<=65535){n.push(e)}else{e-=65536;s=(e>>10)+55296;o=e%1024+56320;n.push(s,o)}if(a+1===l||n.length>i){u+=t.apply(null,n);n.length=0}}return u};if(e){e(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}}));var qr=__commonJS(((e,t)=>{var r=gr();var i=yr();t.exports=__objSpread(__objSpread({},r),{Trees:i})}));var Zr=__commonJS(((e,t)=>{var{BitSet:r}=ur();var{ErrorListener:i}=Ar();var{Interval:n}=pr();var s=class extends i{constructor(e){super();e=e||true;this.exactOnly=e}reportAmbiguity(e,t,r,i,s,o,a){if(this.exactOnly&&!s){return}const l="reportAmbiguity d="+this.getDecisionDescription(e,t)+": ambigAlts="+this.getConflictingAlts(o,a)+", input='"+e.getTokenStream().getText(new n(r,i))+"'";e.notifyErrorListeners(l)}reportAttemptingFullContext(e,t,r,i,s,o){const a="reportAttemptingFullContext d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new n(r,i))+"'";e.notifyErrorListeners(a)}reportContextSensitivity(e,t,r,i,s,o){const a="reportContextSensitivity d="+this.getDecisionDescription(e,t)+", input='"+e.getTokenStream().getText(new n(r,i))+"'";e.notifyErrorListeners(a)}getDecisionDescription(e,t){const r=t.decision;const i=t.atnStartState.ruleIndex;const n=e.ruleNames;if(i<0||i>=n.length){return""+r}const s=n[i]||null;if(s===null||s.length===0){return""+r}return`${r} (${s})`}getConflictingAlts(e,t){if(e!==null){return e}const i=new r;for(let e=0;e<t.items.length;e++){i.add(t.items[e].alt)}return`{${i.values().join(", ")}}`}};t.exports=s}));var Gr=__commonJS(((e,t)=>{var{Token:r}=cr();var{NoViableAltException:i,InputMismatchException:n,FailedPredicateException:s,ParseCancellationException:o}=Or();var{ATNState:a}=hr();var{Interval:l,IntervalSet:u}=pr();var c=class{reset(e){}recoverInline(e){}recover(e,t){}sync(e){}inErrorRecoveryMode(e){}reportError(e){}};var h=class extends c{constructor(){super();this.errorRecoveryMode=false;this.lastErrorIndex=-1;this.lastErrorStates=null;this.nextTokensContext=null;this.nextTokenState=0}reset(e){this.endErrorCondition(e)}beginErrorCondition(e){this.errorRecoveryMode=true}inErrorRecoveryMode(e){return this.errorRecoveryMode}endErrorCondition(e){this.errorRecoveryMode=false;this.lastErrorStates=null;this.lastErrorIndex=-1}reportMatch(e){this.endErrorCondition(e)}reportError(e,t){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);if(t instanceof i){this.reportNoViableAlternative(e,t)}else if(t instanceof n){this.reportInputMismatch(e,t)}else if(t instanceof s){this.reportFailedPredicate(e,t)}else{console.log("unknown recognition error type: "+t.constructor.name);console.log(t.stack);e.notifyErrorListeners(t.getOffendingToken(),t.getMessage(),t)}}recover(e,t){if(this.lastErrorIndex===e.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(e.state)>=0){e.consume()}this.lastErrorIndex=e._input.index;if(this.lastErrorStates===null){this.lastErrorStates=[]}this.lastErrorStates.push(e.state);const r=this.getErrorRecoverySet(e);this.consumeUntil(e,r)}sync(e){if(this.inErrorRecoveryMode(e)){return}const t=e._interp.atn.states[e.state];const i=e.getTokenStream().LA(1);const s=e.atn.nextTokens(t);if(s.contains(i)){this.nextTokensContext=null;this.nextTokenState=a.INVALID_STATE_NUMBER;return}else if(s.contains(r.EPSILON)){if(this.nextTokensContext===null){this.nextTokensContext=e._ctx;this.nextTokensState=e._stateNumber}return}switch(t.stateType){case a.BLOCK_START:case a.STAR_BLOCK_START:case a.PLUS_BLOCK_START:case a.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(e)!==null){return}else{throw new n(e)}case a.PLUS_LOOP_BACK:case a.STAR_LOOP_BACK:this.reportUnwantedToken(e);const t=new u;t.addSet(e.getExpectedTokens());const r=t.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,r);break;default:}}reportNoViableAlternative(e,t){const i=e.getTokenStream();let n;if(i!==null){if(t.startToken.type===r.EOF){n="<EOF>"}else{n=i.getText(new l(t.startToken.tokenIndex,t.offendingToken.tokenIndex))}}else{n="<unknown input>"}const s="no viable alternative at input "+this.escapeWSAndQuote(n);e.notifyErrorListeners(s,t.offendingToken,t)}reportInputMismatch(e,t){const r="mismatched input "+this.getTokenErrorDisplay(t.offendingToken)+" expecting "+t.getExpectedTokens().toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(r,t.offendingToken,t)}reportFailedPredicate(e,t){const r=e.ruleNames[e._ctx.ruleIndex];const i="rule "+r+" "+t.message;e.notifyErrorListeners(i,t.offendingToken,t)}reportUnwantedToken(e){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);const t=e.getCurrentToken();const r=this.getTokenErrorDisplay(t);const i=this.getExpectedTokens(e);const n="extraneous input "+r+" expecting "+i.toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(n,t,null)}reportMissingToken(e){if(this.inErrorRecoveryMode(e)){return}this.beginErrorCondition(e);const t=e.getCurrentToken();const r=this.getExpectedTokens(e);const i="missing "+r.toString(e.literalNames,e.symbolicNames)+" at "+this.getTokenErrorDisplay(t);e.notifyErrorListeners(i,t,null)}recoverInline(e){const t=this.singleTokenDeletion(e);if(t!==null){e.consume();return t}if(this.singleTokenInsertion(e)){return this.getMissingSymbol(e)}throw new n(e)}singleTokenInsertion(e){const t=e.getTokenStream().LA(1);const r=e._interp.atn;const i=r.states[e.state];const n=i.transitions[0].target;const s=r.nextTokens(n,e._ctx);if(s.contains(t)){this.reportMissingToken(e);return true}else{return false}}singleTokenDeletion(e){const t=e.getTokenStream().LA(2);const r=this.getExpectedTokens(e);if(r.contains(t)){this.reportUnwantedToken(e);e.consume();const t=e.getCurrentToken();this.reportMatch(e);return t}else{return null}}getMissingSymbol(e){const t=e.getCurrentToken();const i=this.getExpectedTokens(e);const n=i.first();let s;if(n===r.EOF){s="<missing EOF>"}else{s="<missing "+e.literalNames[n]+">"}let o=t;const a=e.getTokenStream().LT(-1);if(o.type===r.EOF&&a!==null){o=a}return e.getTokenFactory().create(o.source,n,s,r.DEFAULT_CHANNEL,-1,-1,o.line,o.column)}getExpectedTokens(e){return e.getExpectedTokens()}getTokenErrorDisplay(e){if(e===null){return"<no token>"}let t=e.text;if(t===null){if(e.type===r.EOF){t="<EOF>"}else{t="<"+e.type+">"}}return this.escapeWSAndQuote(t)}escapeWSAndQuote(e){e=e.replace(/\n/g,"\\n");e=e.replace(/\r/g,"\\r");e=e.replace(/\t/g,"\\t");return"'"+e+"'"}getErrorRecoverySet(e){const t=e._interp.atn;let i=e._ctx;const n=new u;while(i!==null&&i.invokingState>=0){const e=t.states[i.invokingState];const r=e.transitions[0];const s=t.nextTokens(r.followState);n.addSet(s);i=i.parentCtx}n.removeOne(r.EPSILON);return n}consumeUntil(e,t){let i=e.getTokenStream().LA(1);while(i!==r.EOF&&!t.contains(i)){e.consume();i=e.getTokenStream().LA(1)}}};var d=class extends h{constructor(){super()}recover(e,t){let r=e._ctx;while(r!==null){r.exception=t;r=r.parentCtx}throw new o(t)}recoverInline(e){this.recover(e,new n(e))}sync(e){}};t.exports={BailErrorStrategy:d,DefaultErrorStrategy:h}}));var $r=__commonJS(((e,t)=>{t.exports.RecognitionException=Or().RecognitionException;t.exports.NoViableAltException=Or().NoViableAltException;t.exports.LexerNoViableAltException=Or().LexerNoViableAltException;t.exports.InputMismatchException=Or().InputMismatchException;t.exports.FailedPredicateException=Or().FailedPredicateException;t.exports.DiagnosticErrorListener=Zr();t.exports.BailErrorStrategy=Gr().BailErrorStrategy;t.exports.DefaultErrorStrategy=Gr().DefaultErrorStrategy;t.exports.ErrorListener=Ar().ErrorListener}));var Wr=__commonJS(((e,t)=>{var{Token:r}=cr();Ur();Vr();var i=class{constructor(e,t){this.name="<empty>";this.strdata=e;this.decodeToUnicodeCodePoints=t||false;this._index=0;this.data=[];if(this.decodeToUnicodeCodePoints){for(let e=0;e<this.strdata.length;){const t=this.strdata.codePointAt(e);this.data.push(t);e+=t<=65535?1:2}}else{for(let e=0;e<this.strdata.length;e++){const t=this.strdata.charCodeAt(e);this.data.push(t)}}this._size=this.data.length}reset(){this._index=0}consume(){if(this._index>=this._size){throw"cannot consume EOF"}this._index+=1}LA(e){if(e===0){return 0}if(e<0){e+=1}const t=this._index+e-1;if(t<0||t>=this._size){return r.EOF}return this.data[t]}LT(e){return this.LA(e)}mark(){return-1}release(e){}seek(e){if(e<=this._index){this._index=e;return}this._index=Math.min(e,this._size)}getText(e,t){if(t>=this._size){t=this._size-1}if(e>=this._size){return""}else{if(this.decodeToUnicodeCodePoints){let r="";for(let i=e;i<=t;i++){r+=String.fromCodePoint(this.data[i])}return r}else{return this.strdata.slice(e,t+1)}}}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}};t.exports=i}));var Yr=__commonJS(((e,t)=>{var i=Wr();var n=r(7147);var s={fromString:function(e){return new i(e,true)},fromBlob:function(e,t,r,n){const s=new window.FileReader;s.onload=function(e){const t=new i(e.target.result,true);r(t)};s.onerror=n;s.readAsText(e,t)},fromBuffer:function(e,t){return new i(e.toString(t),true)},fromPath:function(e,t,r){n.readFile(e,t,(function(e,t){let n=null;if(t!==null){n=new i(t,true)}r(e,n)}))},fromPathSync:function(e,t){const r=n.readFileSync(e,t);return new i(r,true)}};t.exports=s}));var Jr=__commonJS(((e,t)=>{var i=Wr();var n=r(7147);var s=class extends i{constructor(e,t){const r=n.readFileSync(e,"utf8");super(r,t);this.fileName=e}};t.exports=s}));var Qr=__commonJS(((e,t)=>{var{Token:r}=cr();var i=Rr();var{Interval:n}=pr();var s=class{};var o=class extends s{constructor(e){super();this.tokenSource=e;this.tokens=[];this.index=-1;this.fetchedEOF=false}mark(){return 0}release(e){}reset(){this.seek(0)}seek(e){this.lazyInit();this.index=this.adjustSeekIndex(e)}get(e){this.lazyInit();return this.tokens[e]}consume(){let e=false;if(this.index>=0){if(this.fetchedEOF){e=this.index<this.tokens.length-1}else{e=this.index<this.tokens.length}}else{e=false}if(!e&&this.LA(1)===r.EOF){throw"cannot consume EOF"}if(this.sync(this.index+1)){this.index=this.adjustSeekIndex(this.index+1)}}sync(e){const t=e-this.tokens.length+1;if(t>0){const e=this.fetch(t);return e>=t}return true}fetch(e){if(this.fetchedEOF){return 0}for(let t=0;t<e;t++){const e=this.tokenSource.nextToken();e.tokenIndex=this.tokens.length;this.tokens.push(e);if(e.type===r.EOF){this.fetchedEOF=true;return t+1}}return e}getTokens(e,t,i){if(i===void 0){i=null}if(e<0||t<0){return null}this.lazyInit();const n=[];if(t>=this.tokens.length){t=this.tokens.length-1}for(let s=e;s<t;s++){const e=this.tokens[s];if(e.type===r.EOF){break}if(i===null||i.contains(e.type)){n.push(e)}}return n}LA(e){return this.LT(e).type}LB(e){if(this.index-e<0){return null}return this.tokens[this.index-e]}LT(e){this.lazyInit();if(e===0){return null}if(e<0){return this.LB(-e)}const t=this.index+e-1;this.sync(t);if(t>=this.tokens.length){return this.tokens[this.tokens.length-1]}return this.tokens[t]}adjustSeekIndex(e){return e}lazyInit(){if(this.index===-1){this.setup()}}setup(){this.sync(0);this.index=this.adjustSeekIndex(0)}setTokenSource(e){this.tokenSource=e;this.tokens=[];this.index=-1;this.fetchedEOF=false}nextTokenOnChannel(e,t){this.sync(e);if(e>=this.tokens.length){return-1}let i=this.tokens[e];while(i.channel!==this.channel){if(i.type===r.EOF){return-1}e+=1;this.sync(e);i=this.tokens[e]}return e}previousTokenOnChannel(e,t){while(e>=0&&this.tokens[e].channel!==t){e-=1}return e}getHiddenTokensToRight(e,t){if(t===void 0){t=-1}this.lazyInit();if(e<0||e>=this.tokens.length){throw""+e+" not in 0.."+this.tokens.length-1}const r=this.nextTokenOnChannel(e+1,i.DEFAULT_TOKEN_CHANNEL);const n=e+1;const s=r===-1?this.tokens.length-1:r;return this.filterForChannel(n,s,t)}getHiddenTokensToLeft(e,t){if(t===void 0){t=-1}this.lazyInit();if(e<0||e>=this.tokens.length){throw""+e+" not in 0.."+this.tokens.length-1}const r=this.previousTokenOnChannel(e-1,i.DEFAULT_TOKEN_CHANNEL);if(r===e-1){return null}const n=r+1;const s=e-1;return this.filterForChannel(n,s,t)}filterForChannel(e,t,r){const n=[];for(let s=e;s<t+1;s++){const e=this.tokens[s];if(r===-1){if(e.channel!==i.DEFAULT_TOKEN_CHANNEL){n.push(e)}}else if(e.channel===r){n.push(e)}}if(n.length===0){return null}return n}getSourceName(){return this.tokenSource.getSourceName()}getText(e){this.lazyInit();this.fill();if(e===void 0||e===null){e=new n(0,this.tokens.length-1)}let t=e.start;if(t instanceof r){t=t.tokenIndex}let i=e.stop;if(i instanceof r){i=i.tokenIndex}if(t===null||i===null||t<0||i<0){return""}if(i>=this.tokens.length){i=this.tokens.length-1}let s="";for(let e=t;e<i+1;e++){const t=this.tokens[e];if(t.type===r.EOF){break}s=s+t.text}return s}fill(){this.lazyInit();while(this.fetch(1e3)===1e3){continue}}};t.exports=o}));var Xr=__commonJS(((e,t)=>{var r=cr().Token;var i=Qr();var n=class extends i{constructor(e,t){super(e);this.channel=t===void 0?r.DEFAULT_CHANNEL:t}adjustSeekIndex(e){return this.nextTokenOnChannel(e,this.channel)}LB(e){if(e===0||this.index-e<0){return null}let t=this.index;let r=1;while(r<=e){t=this.previousTokenOnChannel(t-1,this.channel);r+=1}if(t<0){return null}return this.tokens[t]}LT(e){this.lazyInit();if(e===0){return null}if(e<0){return this.LB(-e)}let t=this.index;let r=1;while(r<e){if(this.sync(t+1)){t=this.nextTokenOnChannel(t+1,this.channel)}r+=1}return this.tokens[t]}getNumberOfOnChannelTokens(){let e=0;this.fill();for(let t=0;t<this.tokens.length;t++){const i=this.tokens[t];if(i.channel===this.channel){e+=1}if(i.type===r.EOF){break}}return e}};t.exports=n}));var ei=__commonJS(((e,t)=>{var{Token:r}=cr();var{ParseTreeListener:i,TerminalNode:n,ErrorNode:s}=gr();var o=Cr();var{DefaultErrorStrategy:a}=Gr();var l=Er();var u=wr();var c=Rr();var h=class extends i{constructor(e){super();this.parser=e}enterEveryRule(e){console.log("enter "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}visitTerminal(e){console.log("consume "+e.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}exitEveryRule(e){console.log("exit "+this.parser.ruleNames[e.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}};var d=class extends o{constructor(e){super();this._input=null;this._errHandler=new a;this._precedenceStack=[];this._precedenceStack.push(0);this._ctx=null;this.buildParseTrees=true;this._tracer=null;this._parseListeners=null;this._syntaxErrors=0;this.setInputStream(e)}reset(){if(this._input!==null){this._input.seek(0)}this._errHandler.reset(this);this._ctx=null;this._syntaxErrors=0;this.setTrace(false);this._precedenceStack=[];this._precedenceStack.push(0);if(this._interp!==null){this._interp.reset()}}match(e){let t=this.getCurrentToken();if(t.type===e){this._errHandler.reportMatch(this);this.consume()}else{t=this._errHandler.recoverInline(this);if(this.buildParseTrees&&t.tokenIndex===-1){this._ctx.addErrorNode(t)}}return t}matchWildcard(){let e=this.getCurrentToken();if(e.type>0){this._errHandler.reportMatch(this);this.consume()}else{e=this._errHandler.recoverInline(this);if(this._buildParseTrees&&e.tokenIndex===-1){this._ctx.addErrorNode(e)}}return e}getParseListeners(){return this._parseListeners||[]}addParseListener(e){if(e===null){throw"listener"}if(this._parseListeners===null){this._parseListeners=[]}this._parseListeners.push(e)}removeParseListener(e){if(this._parseListeners!==null){const t=this._parseListeners.indexOf(e);if(t>=0){this._parseListeners.splice(t,1)}if(this._parseListeners.length===0){this._parseListeners=null}}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(this._parseListeners!==null){const e=this._ctx;this._parseListeners.map((function(t){t.enterEveryRule(e);e.enterRule(t)}))}}triggerExitRuleEvent(){if(this._parseListeners!==null){const e=this._ctx;this._parseListeners.slice(0).reverse().map((function(t){e.exitRule(t);t.exitEveryRule(e)}))}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(e){this._input.tokenSource._factory=e}getATNWithBypassAlts(){const e=this.getSerializedATN();if(e===null){throw"The current parser does not support an ATN with bypass alternatives."}let t=this.bypassAltsAtnCache[e];if(t===null){const r=new u;r.generateRuleBypassTransitions=true;t=new l(r).deserialize(e);this.bypassAltsAtnCache[e]=t}return t}compileParseTreePattern(e,t,r){r=r||null;if(r===null){if(this.getTokenStream()!==null){const e=this.getTokenStream().tokenSource;if(e instanceof c){r=e}}}if(r===null){throw"Parser can't discover a lexer to use"}const i=new ParseTreePatternMatcher(r,this);return i.compile(e,t)}getInputStream(){return this.getTokenStream()}setInputStream(e){this.setTokenStream(e)}getTokenStream(){return this._input}setTokenStream(e){this._input=null;this.reset();this._input=e}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(e,t,r){t=t||null;r=r||null;if(t===null){t=this.getCurrentToken()}this._syntaxErrors+=1;const i=t.line;const n=t.column;const s=this.getErrorListenerDispatch();s.syntaxError(this,t,i,n,e,r)}consume(){const e=this.getCurrentToken();if(e.type!==r.EOF){this.getInputStream().consume()}const t=this._parseListeners!==null&&this._parseListeners.length>0;if(this.buildParseTrees||t){let r;if(this._errHandler.inErrorRecoveryMode(this)){r=this._ctx.addErrorNode(e)}else{r=this._ctx.addTokenNode(e)}r.invokingState=this.state;if(t){this._parseListeners.map((function(e){if(r instanceof s||r.isErrorNode!==void 0&&r.isErrorNode()){e.visitErrorNode(r)}else if(r instanceof n){e.visitTerminal(r)}}))}}return e}addContextToParseTree(){if(this._ctx.parentCtx!==null){this._ctx.parentCtx.addChild(this._ctx)}}enterRule(e,t,r){this.state=t;this._ctx=e;this._ctx.start=this._input.LT(1);if(this.buildParseTrees){this.addContextToParseTree()}if(this._parseListeners!==null){this.triggerEnterRuleEvent()}}exitRule(){this._ctx.stop=this._input.LT(-1);if(this._parseListeners!==null){this.triggerExitRuleEvent()}this.state=this._ctx.invokingState;this._ctx=this._ctx.parentCtx}enterOuterAlt(e,t){e.setAltNumber(t);if(this.buildParseTrees&&this._ctx!==e){if(this._ctx.parentCtx!==null){this._ctx.parentCtx.removeLastChild();this._ctx.parentCtx.addChild(e)}}this._ctx=e}getPrecedence(){if(this._precedenceStack.length===0){return-1}else{return this._precedenceStack[this._precedenceStack.length-1]}}enterRecursionRule(e,t,r,i){this.state=t;this._precedenceStack.push(i);this._ctx=e;this._ctx.start=this._input.LT(1);if(this._parseListeners!==null){this.triggerEnterRuleEvent()}}pushNewRecursionContext(e,t,r){const i=this._ctx;i.parentCtx=e;i.invokingState=t;i.stop=this._input.LT(-1);this._ctx=e;this._ctx.start=i.start;if(this.buildParseTrees){this._ctx.addChild(i)}if(this._parseListeners!==null){this.triggerEnterRuleEvent()}}unrollRecursionContexts(e){this._precedenceStack.pop();this._ctx.stop=this._input.LT(-1);const t=this._ctx;if(this._parseListeners!==null){while(this._ctx!==e){this.triggerExitRuleEvent();this._ctx=this._ctx.parentCtx}}else{this._ctx=e}t.parentCtx=e;if(this.buildParseTrees&&e!==null){e.addChild(t)}}getInvokingContext(e){let t=this._ctx;while(t!==null){if(t.ruleIndex===e){return t}t=t.parentCtx}return null}precpred(e,t){return t>=this._precedenceStack[this._precedenceStack.length-1]}inContext(e){return false}isExpectedToken(e){const t=this._interp.atn;let i=this._ctx;const n=t.states[this.state];let s=t.nextTokens(n);if(s.contains(e)){return true}if(!s.contains(r.EPSILON)){return false}while(i!==null&&i.invokingState>=0&&s.contains(r.EPSILON)){const r=t.states[i.invokingState];const n=r.transitions[0];s=t.nextTokens(n.followState);if(s.contains(e)){return true}i=i.parentCtx}if(s.contains(r.EPSILON)&&e===r.EOF){return true}else{return false}}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const e=this._interp.atn;const t=e.states[this.state];return e.nextTokens(t)}getRuleIndex(e){const t=this.getRuleIndexMap()[e];if(t!==null){return t}else{return-1}}getRuleInvocationStack(e){e=e||null;if(e===null){e=this._ctx}const t=[];while(e!==null){const r=e.ruleIndex;if(r<0){t.push("n/a")}else{t.push(this.ruleNames[r])}e=e.parentCtx}return t}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let e=false;for(let t=0;t<this._interp.decisionToDFA.length;t++){const r=this._interp.decisionToDFA[t];if(r.states.length>0){if(e){console.log()}this.printer.println("Decision "+r.decision+":");this.printer.print(r.toString(this.literalNames,this.symbolicNames));e=true}}}getSourceName(){return this._input.sourceName}setTrace(e){if(!e){this.removeParseListener(this._tracer);this._tracer=null}else{if(this._tracer!==null){this.removeParseListener(this._tracer)}this._tracer=new h(this);this.addParseListener(this._tracer)}}};d.bypassAltsAtnCache={};t.exports=d}));var ti=__commonJS((e=>{e.atn=Br();e.codepointat=Ur();e.dfa=Kr();e.fromcodepoint=Vr();e.tree=qr();e.error=$r();e.Token=cr().Token;e.CharStreams=Yr();e.CommonToken=cr().CommonToken;e.InputStream=Wr();e.FileStream=Jr();e.CommonTokenStream=Xr();e.Lexer=Rr();e.Parser=ei();var t=vr();e.PredictionContextCache=t.PredictionContextCache;e.ParserRuleContext=Fr();e.Interval=pr().Interval;e.IntervalSet=pr().IntervalSet;e.Utils=ur();e.LL1Analyzer=br().LL1Analyzer}));var ri=__commonJS(((e,t)=>{t.exports="./Solidity-LWZUP6Z4.tokens"}));var ii=__commonJS(((e,t)=>{if(typeof BROWSER!=="undefined"){t.exports=ri()}else{t.exports=r(7147).readFileSync(r.ab+"Solidity.tokens").toString()}}));__markAsModule(t);__export(t,{ParserError:()=>Ps,parse:()=>parse,tokenize:()=>tokenize,visit:()=>visit});var ni=__toModule(ar());var si=__toModule(et());var oi=__toModule(ye());var ai=__toModule(ge());var li=__toModule(Q());var ui=__toModule(C());var ci=class extends oi.Lexer{get vocabulary(){return ci.VOCABULARY}constructor(e){super(e);this._interp=new ai.LexerATNSimulator(ci._ATN,this)}get grammarFileName(){return"Solidity.g4"}get ruleNames(){return ci.ruleNames}get serializedATN(){return ci._serializedATN}get channelNames(){return ci.channelNames}get modeNames(){return ci.modeNames}static get _ATN(){if(!ci.__ATN){ci.__ATN=(new si.ATNDeserializer).deserialize(ui.toCharArray(ci._serializedATN))}return ci.__ATN}};var hi=ci;hi.T__0=1;hi.T__1=2;hi.T__2=3;hi.T__3=4;hi.T__4=5;hi.T__5=6;hi.T__6=7;hi.T__7=8;hi.T__8=9;hi.T__9=10;hi.T__10=11;hi.T__11=12;hi.T__12=13;hi.T__13=14;hi.T__14=15;hi.T__15=16;hi.T__16=17;hi.T__17=18;hi.T__18=19;hi.T__19=20;hi.T__20=21;hi.T__21=22;hi.T__22=23;hi.T__23=24;hi.T__24=25;hi.T__25=26;hi.T__26=27;hi.T__27=28;hi.T__28=29;hi.T__29=30;hi.T__30=31;hi.T__31=32;hi.T__32=33;hi.T__33=34;hi.T__34=35;hi.T__35=36;hi.T__36=37;hi.T__37=38;hi.T__38=39;hi.T__39=40;hi.T__40=41;hi.T__41=42;hi.T__42=43;hi.T__43=44;hi.T__44=45;hi.T__45=46;hi.T__46=47;hi.T__47=48;hi.T__48=49;hi.T__49=50;hi.T__50=51;hi.T__51=52;hi.T__52=53;hi.T__53=54;hi.T__54=55;hi.T__55=56;hi.T__56=57;hi.T__57=58;hi.T__58=59;hi.T__59=60;hi.T__60=61;hi.T__61=62;hi.T__62=63;hi.T__63=64;hi.T__64=65;hi.T__65=66;hi.T__66=67;hi.T__67=68;hi.T__68=69;hi.T__69=70;hi.T__70=71;hi.T__71=72;hi.T__72=73;hi.T__73=74;hi.T__74=75;hi.T__75=76;hi.T__76=77;hi.T__77=78;hi.T__78=79;hi.T__79=80;hi.T__80=81;hi.T__81=82;hi.T__82=83;hi.T__83=84;hi.T__84=85;hi.T__85=86;hi.T__86=87;hi.T__87=88;hi.T__88=89;hi.T__89=90;hi.T__90=91;hi.T__91=92;hi.T__92=93;hi.T__93=94;hi.T__94=95;hi.T__95=96;hi.Int=97;hi.Uint=98;hi.Byte=99;hi.Fixed=100;hi.Ufixed=101;hi.BooleanLiteral=102;hi.DecimalNumber=103;hi.HexNumber=104;hi.NumberUnit=105;hi.HexLiteralFragment=106;hi.ReservedKeyword=107;hi.AnonymousKeyword=108;hi.BreakKeyword=109;hi.ConstantKeyword=110;hi.ImmutableKeyword=111;hi.ContinueKeyword=112;hi.LeaveKeyword=113;hi.ExternalKeyword=114;hi.IndexedKeyword=115;hi.InternalKeyword=116;hi.PayableKeyword=117;hi.PrivateKeyword=118;hi.PublicKeyword=119;hi.VirtualKeyword=120;hi.PureKeyword=121;hi.TypeKeyword=122;hi.ViewKeyword=123;hi.GlobalKeyword=124;hi.ConstructorKeyword=125;hi.FallbackKeyword=126;hi.ReceiveKeyword=127;hi.Identifier=128;hi.StringLiteralFragment=129;hi.VersionLiteral=130;hi.WS=131;hi.COMMENT=132;hi.LINE_COMMENT=133;hi.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];hi.modeNames=["DEFAULT_MODE"];hi.ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","T__30","T__31","T__32","T__33","T__34","T__35","T__36","T__37","T__38","T__39","T__40","T__41","T__42","T__43","T__44","T__45","T__46","T__47","T__48","T__49","T__50","T__51","T__52","T__53","T__54","T__55","T__56","T__57","T__58","T__59","T__60","T__61","T__62","T__63","T__64","T__65","T__66","T__67","T__68","T__69","T__70","T__71","T__72","T__73","T__74","T__75","T__76","T__77","T__78","T__79","T__80","T__81","T__82","T__83","T__84","T__85","T__86","T__87","T__88","T__89","T__90","T__91","T__92","T__93","T__94","T__95","Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","DecimalDigits","HexNumber","HexDigits","NumberUnit","HexLiteralFragment","HexPair","HexCharacter","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","IdentifierStart","IdentifierPart","StringLiteralFragment","DoubleQuotedStringCharacter","SingleQuotedStringCharacter","VersionLiteral","WS","COMMENT","LINE_COMMENT"];hi._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];hi._SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];hi.VOCABULARY=new li.VocabularyImpl(ci._LITERAL_NAMES,ci._SYMBOLIC_NAMES,[]);hi._serializedATNSegments=4;hi._serializedATNSegment0="줝쪺֍꾺体؇쉁ݏ\b\t\t\t\t\t\t\b\t\b\t\t\t\n\t\n\v\t\v\f\t\f\r\t\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t !\t!\"\t\"#\t#$\t$%\t%&\t&'\t'(\t()\t)*\t*+\t+,\t,-\t-.\t./\t/0\t01\t12\t23\t34\t45\t56\t67\t78\t89\t9:\t:;\t;<\t<=\t=>\t>?\t?@\t@A\tAB\tBC\tCD\tDE\tEF\tFG\tGH\tHI\tIJ\tJK\tKL\tLM\tMN\tNO\tOP\tPQ\tQR\tRS\tST\tTU\tUV\tVW\tWX\tXY\tYZ\tZ[\t[\\\t\\]\t]^\t^_\t_`\t`a\tab\tbc\tcd\tde\tef\tfg\tgh\thi\tij\tjk\tkl\tlm\tmn\tno\top\tpq\tqr\trs\tst\ttu\tuv\tvw\twx\txy\tyz\tz{\t{|\t|}\t}~\t~\t\t\t\t\t\t
\t
\t\t\t\t\t\t\t\t\t\b\b\b\t\t\n\n\v\v\v\f\f\r\r\r !!\"\"###$$$%%%%%%%&&&&&&&&&'''''''''(((((((())))))*****++,,--------..////////0001111111222222223333333334445555566667777778888889999999999:::::::::;;;<<<<<<<======>>>>>???????@@@@AAAAABBBBBBBCCCCCDDDEEEFFFFGGHHHHHHHIIJJJKKKLLLMMMNNOOOPPPQQQRRRRSSSSTTTUUUVVVWWWXXXYYYYZZZ[[[\\\\\\\\\\\\\\]]]]]^^^^^^^^___`````````aaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\nbccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccќ\ncdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddԺ\ndeeeeeeeeeeeeeՈ\ne\reeՉeeeՎ\ne\reeՏeՒ\nefffffffffffffffբ\nf\rffգfffը\nf\rffթfլ\nfggggggggggշ\nghhhջ\nhhhhտ\nhhhhփ\nhiiiև\niii֊\ni\fii֍\vijjjjkkk֕\nkkk֘\nk\fkk֛\vklllllllllllllllllllllllllllllllllllllllllllllllllllllllllו\nlmmmmmmmם\nmmmmmע\nmmmץ\nmnnnoopppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppل\npqqqqqqqqqqrrrrrrsssssssssttttttttttuuuuuuuuuvvvvvvwwwwwwwwwxxxxxxxxyyyyyyyyyzzzzzzzz{{{{{{{{|||||||}}}}}}}}~~~~~
ۦ\n
\f
۩\v
۶\nۺ\n\f۽\v܇\n܋\n\f\vܑ\nܖ\nܛ\nܞ\n\rܟܤ\n\rܥܪ\n\rܫܮ\nܱ\n\rܻܲ\n\fܾ\v݉\n\f\vܼ\t\v\r\b\t\n\v\f\r!#%')+-/13579;= ?!A\"C#E$G%I&K'M(O)Q*S+U,W-Y.[/]0_1a2c3e4g5i6k7m8o9q:s;u<w=y>{?}@ABC
DEFGHIJKLMNOPQ¡R£S¥T§U©V«WX¯Y±Z³[µ\\·]¹^»_½`¿aÁbÃcÅdÇeÉfËgÍhÏiÑÓjÕ×kÙlÛÝßmánãoåpçqérësítïuñvówõx÷yùzû{ý|ÿ}ā~ăąćĉċčďđēĕė
ęě\f2;GGggZZzz2;CHch&&C\\aac|&&2;C\\aac|\f\f$$^^\f\f))^^\v\f\"\"\f\fߠ\t\v\r!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}
¡£¥§©«¯±³µ·¹»½¿ÁÃÅÇÉËÍÏÓ×Ùßáãåçéëí";hi._serializedATNSegment1="ïñóõ÷ùûýÿāăąćĉďĕėęěĝĤĦ\tĨ\vī\rĭįIJĴĶĹĻľŅŊ!Ō#Ŏ%Ő'ř)Ţ+Ŭ-Ŵ/ŷ1Ź3Ż5Ɓ7Ƈ9Ƌ;ƍ=Ə?ƑAƓCƕEƗGƚIƝKƤMƭOƶQƾSDŽUljWNjYǍ[Ǖ]Ǘ_ǟaǢcǩeDZgǺiǽkȂmȆoȌqȒsȜuȥwȨyȯ{ȵ}ȺɁɅɊ
ɑɖəɜɠɢɩɫɮɱɴɷɹɼ¡ɿ£ʂ¥ʆ§ʊ©ʍ«ʐʓ¯ʖ±ʙ³ʝµʠ·ʣ¹ʪ»ʯ½ʷ¿ʺÁ˃ÃÅћÇԹÉՑËիÍնÏվÑքÓ֎Õ֒×הÙזÛצÝשßكáمãُåٕçٞé٨ëٱíٷïڀñڈóڑõڙ÷ڡùڨûڰýڵÿںāڿăۆąےćۛĉۣċ۪č۬ďܐđܕēܚĕܝėܰęܶě݄ĝĞrĞğtğĠcĠġiġĢoĢģcģĤĥ=ĥĦħ,ħ\bĨĩ~ĩĪ~Ī\nīĬ`Ĭ\fĭĮĮįİ@İı?ıIJij@ijĴĵ>ĵĶķ>ķĸ?ĸĹĺ?ĺĻļcļĽuĽľĿkĿŀoŀŁrŁłqłŃtŃńvńŅņhņŇtŇňqňʼnoʼnŊŋ}ŋ Ōō.ō\"Ŏŏŏ$ŐőcőŒdŒœuœŔvŔŕtŕŖcŖŗeŗŘvŘ&řŚeŚśqśŜpŜŝvŝŞtŞşcşŠeŠšvš(ŢţkţŤpŤťvťŦgŦŧtŧŨhŨũcũŪeŪūgū*ŬŭnŭŮkŮůdůŰtŰűcűŲtŲų{ų,ŴŵkŵŶuŶ.ŷŸ*Ÿ0Źź+ź2ŻżgżŽtŽžtžſqſƀtƀ4ƁƂwƂƃuƃƄkƄƅpƅƆiƆ6ƇƈhƈƉqƉƊtƊ8Ƌƌ~ƌ:ƍƎ(Ǝ<ƏƐ-Ɛ>Ƒƒ/ƒ@ƓƔ1ƔBƕƖ'ƖDƗƘ?Ƙƙ?ƙFƚƛ#ƛƜ?ƜHƝƞuƞƟvƟƠtƠơwơƢeƢƣvƣJƤƥoƥƦqƦƧfƧƨkƨƩhƩƪkƪƫgƫƬtƬLƭƮhƮƯwƯưpưƱeƱƲvƲƳkƳƴqƴƵpƵNƶƷtƷƸgƸƹvƹƺwƺƻtƻƼpƼƽuƽPƾƿgƿǀxǀǁgǁǂpǂǃvǃRDŽDžgDždžpdžLJwLJLjoLjTljNJ]NJVNjnj_njXǍǎcǎǏfǏǐfǐǑtǑǒgǒǓuǓǔuǔZǕǖ0ǖ\\ǗǘoǘǙcǙǚrǚǛrǛǜkǜǝpǝǞiǞ^ǟǠ?Ǡǡ@ǡ`ǢǣoǣǤgǤǥoǥǦqǦǧtǧǨ{ǨbǩǪuǪǫvǫǬqǬǭtǭǮcǮǯiǯǰgǰdDZDzeDzdzcdzǴnǴǵnǵǶfǶǷcǷǸvǸǹcǹfǺǻkǻǼhǼhǽǾgǾǿnǿȀuȀȁgȁjȂȃvȃȄtȄȅ{ȅlȆȇeȇȈcȈȉvȉȊeȊȋjȋnȌȍyȍȎjȎȏkȏȐnȐȑgȑpȒȓwȓȔpȔȕeȕȖjȖȗgȗȘeȘșmșȚgȚțfțrȜȝcȝȞuȞȟuȟȠgȠȡoȡȢdȢȣnȣȤ{ȤtȥȦfȦȧqȧvȨȩtȩȪgȪȫvȫȬwȬȭtȭȮpȮxȯȰvȰȱjȱȲtȲȳqȳȴyȴzȵȶgȶȷoȷȸkȸȹvȹ|ȺȻtȻȼgȼȽxȽȾgȾȿtȿɀvɀ~ɁɂxɂɃcɃɄtɄɅɆdɆɇqɇɈqɈɉnɉɊɋuɋɌvɌɍtɍɎkɎɏpɏɐiɐɑɒdɒɓ{ɓɔvɔɕgɕɖɗ-ɗɘ-ɘəɚ/ɚɛ/ɛɜɝpɝɞgɞɟyɟɠɡ<ɡɢɣfɣɤgɤɥnɥɦgɦɧvɧɨgɨɩɪ#ɪɫɬ,ɬɭ,ɭɮɯ>ɯɰ>ɰɱɲ@ɲɳ@ɳɴɵ(ɵɶ(ɶɷɸAɸɹɺ~ɺɻ?ɻɼɽ`ɽɾ?ɾ ɿʀ(ʀʁ?ʁ¢ʂʃ>ʃʄ>ʄʅ?ʅ¤ʆʇ@ʇʈ@ʈʉ?ʉ¦ʊʋ-ʋʌ?ʌ¨ʍʎ/ʎʏ?ʏªʐʑ,ʑʒ?ʒ¬ʓʔ1ʔʕ?ʕ®ʖʗ'ʗʘ?ʘ°ʙʚnʚʛgʛʜvʜ²ʝʞ<ʞʟ?ʟ´ʠʡ?ʡʢ<ʢ¶ʣʤuʤʥyʥʦkʦʧvʧʨeʨʩjʩ¸ʪʫeʫʬcʬʭuʭʮgʮºʯʰfʰʱgʱʲhʲʳcʳʴwʴʵnʵʶvʶ¼ʷʸ/ʸʹ@ʹ¾ʺʻeʻʼcʼʽnʽʾnʾʿdʿˀcˀˁeˁ˂m˂À˃˄q˄˅x˅ˆgˆˇtˇˈtˈˉkˉˊfˊˋgˋÂˌˍkˍˎpˎvˏːkːˑpˑ˒v˒:˓˔k˔˕p˕˖v˖˗3˗8˘˙k˙˚p˚˛v˛˜4˜6˝˞k˞˟p˟ˠvˠˡ5ˡ4ˢˣkˣˤpˤ˥v˥˦6˦2˧˨k˨˩p˩˪v˪˫6˫:ˬ˭k˭ˮpˮ˯v˯˰7˰8˱˲k˲˳p˳˴v˴˵8˵6˶˷k˷˸p˸˹v˹˺9˺4˻˼k˼˽p˽˾v˾˿:˿2̀́ḱ̂p̂̃ṽ̄:̄:̅̆k̆̇ṗ̈v̈̉;̉8̊̋k̋̌p̌̍v̍̎3̎̏2̏6̐̑k̑̒p̒̓v̓̔3̔̕3̕4̖̗k̗̘p̘̙v̙̚3̛̚4̛2̜̝k̝̞p̞̟v̟̠3̡̠4̡:̢̣ḳ̤p̤̥v̥̦3̧̦5̧8̨̩k̩̪p̪̫v̫̬3̬̭6̭6̮̯k̯̰p̰̱v̱̲3̲̳7̳4̴̵k̵̶p̶̷v̷̸3̸̹8̹2̺̻k̻̼p̼̽v̽̾3̾̿8̿:̀́ḱ͂p͂̓v̓̈́3̈́ͅ9ͅ8͇͆k͇͈p͈͉v͉͊3͊͋:͋6͍͌k͍͎p͎͏v͏͐3͐͑;͑4͓͒k͓͔p͔͕v͕͖4͖͗2͗2͙͘k͙͚p͚͛v͛͜4͜͝2͝:͟͞k͟͠p͠͡v͢͡4ͣ͢3ͣ8ͤͥkͥͦpͦͧvͧͨ4ͨͩ4ͩ6ͪͫkͫͬpͬͭvͭͮ4ͮͯ5ͯ4ͰͱkͱͲpͲͳvͳʹ4ʹ͵6͵2Ͷͷkͷpvͺ4ͺͻ6ͻ:ͼͽkͽ;p;ͿvͿ478ˌˏ˓˘˝ˢ˧ˬ˱˶˻̴̢̨̖̜̮̺̀̅̊̐̀͆͌͒ͤͪ͘͞ͰͶͼÄ΄΅w΅ΆkΆ·p·ќvΈΉwΉΊkΊpΌvΌќ:ΎwΎΏkΏΐpΐΑvΑΒ3Βќ8ΓΔwΔΕkΕΖpΖΗvΗΘ4Θќ6ΙΚwΚΛkΛΜpΜΝvΝΞ5Ξќ";hi._serializedATNSegment2="4ΟΠwΠΡkΡpΣvΣΤ6Τќ2ΥΦwΦΧkΧΨpΨΩvΩΪ6Ϊќ:Ϋάwάέkέήpήίvίΰ7ΰќ8αβwβγkγδpδεvεζ8ζќ6ηθwθιkικpκλvλμ9μќ4νξwξοkοπpπρvρς:ςќ2στwτυkυφpφχvχψ:ψќ:ωϊwϊϋkϋόpόύvύώ;ώќ8Ϗϐwϐϑkϑϒpϒϓvϓϔ3ϔϕ2ϕќ6ϖϗwϗϘkϘϙpϙϚvϚϛ3ϛϜ3Ϝќ4ϝϞwϞϟkϟϠpϠϡvϡϢ3Ϣϣ4ϣќ2ϤϥwϥϦkϦϧpϧϨvϨϩ3ϩϪ4Ϫќ:ϫϬwϬϭkϭϮpϮϯvϯϰ3ϰϱ5ϱќ8ϲϳwϳϴkϴϵpϵ϶v϶Ϸ3Ϸϸ6ϸќ6ϹϺwϺϻkϻϼpϼϽvϽϾ3ϾϿ7Ͽќ4ЀЁwЁЂkЂЃpЃЄvЄЅ3ЅІ8Іќ2ЇЈwЈЉkЉЊpЊЋvЋЌ3ЌЍ8Ѝќ:ЎЏwЏАkАБpБВvВГ3ГД9Дќ8ЕЖwЖЗkЗИpИЙvЙК3КЛ:Лќ6МНwНОkОПpПРvРС3СТ;Тќ4УФwФХkХЦpЦЧvЧШ4ШЩ2Щќ2ЪЫwЫЬkЬЭpЭЮvЮЯ4Яа2аќ:бвwвгkгдpдеvеж4жз3зќ8ийwйкkклpлмvмн4но4оќ6прwрсkстpтуvуф4фх5хќ4цчwчшkшщpщъvъы4ыь6ьќ2эюwюяkяѐpѐёvёђ4ђѓ6ѓќ:єѕwѕіkіїpїјvјљ4љњ7њќ8ћ΄ћΈћћΓћΙћΟћΥћΫћαћηћνћσћωћϏћϖћϝћϤћϫћϲћϹћЀћЇћЎћЕћМћУћЪћбћићпћцћэћєќÆѝўdўџ{џѠvѠѡgѡԺuѢѣdѣѤ{ѤѥvѥѦgѦѧuѧԺ3ѨѩdѩѪ{ѪѫvѫѬgѬѭuѭԺ4ѮѯdѯѰ{ѰѱvѱѲgѲѳuѳԺ5ѴѵdѵѶ{ѶѷvѷѸgѸѹuѹԺ6ѺѻdѻѼ{ѼѽvѽѾgѾѿuѿԺ7Ҁҁdҁ҂{҂҃v҃҄g҄҅u҅Ժ8҆҇d҇҈{҈҉v҉ҊgҊҋuҋԺ9ҌҍdҍҎ{ҎҏvҏҐgҐґuґԺ:ҒғdғҔ{ҔҕvҕҖgҖҗuҗԺ;ҘҙdҙҚ{ҚқvқҜgҜҝuҝҞ3ҞԺ2ҟҠdҠҡ{ҡҢvҢңgңҤuҤҥ3ҥԺ3ҦҧdҧҨ{ҨҩvҩҪgҪҫuҫҬ3ҬԺ4ҭҮdҮү{үҰvҰұgұҲuҲҳ3ҳԺ5ҴҵdҵҶ{ҶҷvҷҸgҸҹuҹҺ3ҺԺ6һҼdҼҽ{ҽҾvҾҿgҿӀuӀӁ3ӁԺ7ӂӃdӃӄ{ӄӅvӅӆgӆӇuӇӈ3ӈԺ8ӉӊdӊӋ{ӋӌvӌӍgӍӎuӎӏ3ӏԺ9ӐӑdӑӒ{ӒӓvӓӔgӔӕuӕӖ3ӖԺ:ӗӘdӘә{әӚvӚӛgӛӜuӜӝ3ӝԺ;ӞӟdӟӠ{ӠӡvӡӢgӢӣuӣӤ4ӤԺ2ӥӦdӦӧ{ӧӨvӨөgөӪuӪӫ4ӫԺ3ӬӭdӭӮ{ӮӯvӯӰgӰӱuӱӲ4ӲԺ4ӳӴdӴӵ{ӵӶvӶӷgӷӸuӸӹ4ӹԺ5ӺӻdӻӼ{ӼӽvӽӾgӾӿuӿԀ4ԀԺ6ԁԂdԂԃ{ԃԄvԄԅgԅԆuԆԇ4ԇԺ7ԈԉdԉԊ{ԊԋvԋԌgԌԍuԍԎ4ԎԺ8ԏԐdԐԑ{ԑԒvԒԓgԓԔuԔԕ4ԕԺ9ԖԗdԗԘ{ԘԙvԙԚgԚԛuԛԜ4ԜԺ:ԝԞdԞԟ{ԟԠvԠԡgԡԢuԢԣ4ԣԺ;ԤԥdԥԦ{ԦԧvԧԨgԨԩuԩԪ5ԪԺ2ԫԬdԬԭ{ԭԮvԮԯgԯuԱ5ԱԺ3ԲԳdԳԴ{ԴԵvԵԶgԶԷuԷԸ5ԸԺ4ԹѝԹѢԹѨԹѮԹѴԹѺԹҀԹ҆ԹҌԹҒԹҘԹҟԹҦԹҭԹҴԹһԹӂԹӉԹӐԹӗԹӞԹӥԹӬԹӳԹӺԹԁԹԈԹԏԹԖԹԝԹԤԹԫԹԲԺÈԻԼhԼԽkԽԾzԾԿgԿՒfՀՁhՁՂkՂՃzՃՄgՄՅfՅՇՆՈ\tՇՆՈՉՉՇՉՊՊՋՋՍzՌՎ\tՍՌՎՏՏՍՏՐՐՒՑԻՑՀՒÊՓՔwՔՕhՕՖkՖzgլfՙ՚w՚՛h՛՜k՜՝z՝՞g՞՟f՟աՠբ\tաՠբգգագդդեեէzզը\tէզըթթէթժժլիՓիՙլÌխծvծկtկհwհշgձղhղճcճմnմյuյշgնխնձշÎոտÑiչջÑiպչպջջռռս0ստÑiվովպտւրց\tցփÑiւրւփփÐք\tօևaֆօֆևևֈֈ֊\t։ֆ֊֍։Ò֍֎֏2֏\t֑Õk֑Ô֒֙Ýo֓֕a֖֖֔֓֔֕֕֘Ýo֛֚֚֗֔֘֙֗֙Ö֛֙֜֝y֝֞g֞וk֟֠i֠֡y֢֡g֢וk֣֤u֤֥|֥֦c֦֧d֧וq֨֩h֪֩k֪֫p֫֬p֭֬g֭ו{֮֯gְ֯vְֱjֱֲgֲוtֳִuִֵgֵֶeֶַqַָpָֹfֹוuֺֻoֻּkּֽpֽ־w־ֿvֿ׀g׀וuׁׂjׂ׃q׃ׄwׅׄtׅוu׆ׇfׇc{וuyggmוuא{אבgבגcגדtדוuה֜ה֟ה֣ה֨ה֮הֳהֺהׁה׆ההוØזחjחטgטיzיפךל$כםÕkלכלםםממץ$ןס)נעÕkסנסעעףףץ)פךפןץÚצקÝoקרÝoרÜשת\tתÞcduׯvׯװtװױcױײeײلv׳״c״hvgلtecuلgecveلjfghc؆w؆؇n؇لv؈؉h؉؊k؊؋p؋،c،لn؍؎k؎لp؏ؐkؐؑpؑؒnؒؓkؓؔpؔلgؕؖnؖؗgؗلvؘؙoؙؚcؚ؛v؛eلj؝؞p؞؟w؟ؠnؠلnءآqآلhأؤtؤإgإئnئاqابeبةcةتvتثcثجdجحnحلgخدuدذvذرcرزvزسkسلeشصuصضyضطkطظvظعeعلjغػvػؼtؼل{ؽؾvؾؿ{ؿـrـفgفقqقلhكك׳كككك؈ك؍ك؏كؕكؘك؝كءكأكخكشكغكؽلàمنcنهpهوqوىpىي{يًoًٌqٌٍwٍَuَâُِdِّtّْgْٓcٓٔmٔäٕٖeٖٗqٗ٘p٘ٙuٙٚvٚٛcٜٛpٜٝvٝæٟٞkٟ٠o٠١o١٢w٢٣v٣٤c٤٥d٥٦n٦٧g٧è٨٩e٩٪q٪٫p٫٬v٬٭k٭ٮpٮٯwٯٰgٰêٱٲnٲٳgٳٴcٴٵx";hi._serializedATNSegment3="ٵٶgٶìٷٸgٸٹzٹٺvٺٻgٻټtټٽpٽپcپٿnٿîڀځkځڂpڂڃfڃڄgڄڅzڅچgچڇfڇðڈډkډڊpڊڋvڋڌgڌڍtڍڎpڎڏcڏڐnڐòڑڒrڒړcړڔ{ڔڕcڕږdږڗnڗژgژôڙښrښڛtڛڜkڜڝxڝڞcڞڟvڟڠgڠöڡڢrڢڣwڣڤdڤڥnڥڦkڦڧeڧøڨکxکڪkڪګtګڬvڬڭwڭڮcڮگnگúڰڱrڱڲwڲڳtڳڴgڴüڵڶvڶڷ{ڷڸrڸڹgڹþںڻxڻڼkڼڽgڽھyھĀڿۀiۀہnہۂqۂۃdۃۄcۄۅnۅĂۆۇeۇۈqۈۉpۉۊuۊۋvۋیtیۍwۍێeێۏvۏېqېۑtۑĄےۓhۓ۔c۔ەnەۖnۖۗdۗۘcۘۙeۙۚmۚĆۛۜtۜg۞e۞۟g۟۠k۠ۡxۡۢgۢĈۣۧċۤۦčۥۤۦ۩ۧۥۧۨۨĊ۩۪ۧ۫\t۫Čۭ۬\tۭĎۮۯwۯ۰p۰۱k۱۲e۲۳q۳۴f۴۶g۵ۮ۵۶۶۷۷ۻ$۸ۺđ۹۸ۺ۽ۻ۹ۻۼۼ۾۽ۻ۾ܑ$ۿ܀w܀܁p܁܂k܂܃e܃܄q܄܅f܅܇g܆ۿ܆܇܇܈܈܌)܉܋ē܊܉܋܌܊܌܍܍܌ܑ)ܐ۵ܐ܆ܑĐܒܖ\n\bܓܔ^ܔܖ\vܕܒܕܓܖĒܗܛ\n\tܘܙ^ܙܛ\vܚܗܚܘܛĔܜܞ\tܝܜܞܟܟܝܟܠܠܡܡܣ0ܢܤ\tܣܢܤܥܥܣܥܦܦܭܧܩ0ܨܪ\tܩܨܪܫܫܩܫܬܬܮܭܧܭܮܮĖܯܱ\t\nܰܯܱܴܴܲܲܰܲܳܳܵ\bܵĘܷܶ1ܷܸ,ܸܼܹܻ\vܹܻܾܼܼܾܼܺܽܺܽܿܿ݀,݀݁1݂݂݁݃\b݃Ě݄݅1݆݅1݆݊݇݉\n\v݈݈݇݉݊݊ݍ݊ݍݎ\bݎĜ(ћԹՉՏՑգթինպվւֆ֔֙הלספكۧ۵ۻ܆܌ܐܕܚܟܥܫܭܼܲ݊\b";hi._serializedATN=ui.join([ci._serializedATNSegment0,ci._serializedATNSegment1,ci._serializedATNSegment2,ci._serializedATNSegment3],"");var di=__toModule(he());var fi=__toModule(et());var pi=__toModule(R());var mi=__toModule(Kt());var gi=__toModule(zt());var yi=__toModule(He());var _i=__toModule(Ve());var vi=__toModule(v());var bi=__toModule(M());var xi=__toModule(Q());var Ti=__toModule(C());var wi=class extends gi.Parser{get vocabulary(){return wi.VOCABULARY}get grammarFileName(){return"Solidity.g4"}get ruleNames(){return wi.ruleNames}get serializedATN(){return wi._serializedATN}createFailedPredicateException(e,t){return new pi.FailedPredicateException(this,e,t)}constructor(e){super(e);this._interp=new _i.ParserATNSimulator(wi._ATN,this)}sourceUnit(){let e=new Ei(this._ctx,this.state);this.enterRule(e,0,wi.RULE_sourceUnit);let t;try{this.enterOuterAlt(e,1);{this.state=214;this._errHandler.sync(this);t=this._input.LA(1);while((t&~31)===0&&(1<<t&(1<<wi.T__0|1<<wi.T__12|1<<wi.T__13|1<<wi.T__17|1<<wi.T__18|1<<wi.T__19|1<<wi.T__20|1<<wi.T__24|1<<wi.T__25))!==0||(t-36&~31)===0&&(1<<t-36&(1<<wi.T__35-36|1<<wi.T__37-36|1<<wi.T__40-36|1<<wi.T__43-36|1<<wi.T__45-36|1<<wi.T__49-36|1<<wi.T__61-36|1<<wi.T__62-36|1<<wi.T__63-36|1<<wi.T__64-36|1<<wi.T__65-36))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.TypeKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95|1<<wi.FallbackKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=212;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,0,this._ctx)){case 1:{this.state=202;this.pragmaDirective()}break;case 2:{this.state=203;this.importDirective()}break;case 3:{this.state=204;this.contractDefinition()}break;case 4:{this.state=205;this.enumDefinition()}break;case 5:{this.state=206;this.structDefinition()}break;case 6:{this.state=207;this.functionDefinition()}break;case 7:{this.state=208;this.fileLevelConstant()}break;case 8:{this.state=209;this.customErrorDefinition()}break;case 9:{this.state=210;this.typeDefinition()}break;case 10:{this.state=211;this.usingForDeclaration()}break}}this.state=216;this._errHandler.sync(this);t=this._input.LA(1)}this.state=217;this.match(wi.EOF)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}pragmaDirective(){let e=new Ai(this._ctx,this.state);this.enterRule(e,2,wi.RULE_pragmaDirective);try{this.enterOuterAlt(e,1);{this.state=219;this.match(wi.T__0);this.state=220;this.pragmaName();this.state=221;this.pragmaValue();this.state=222;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}pragmaName(){let e=new Ci(this._ctx,this.state);this.enterRule(e,4,wi.RULE_pragmaName);try{this.enterOuterAlt(e,1);{this.state=224;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}pragmaValue(){let e=new Ni(this._ctx,this.state);this.enterRule(e,6,wi.RULE_pragmaValue);try{this.state=229;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,2,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=226;this.match(wi.T__2)}break;case 2:this.enterOuterAlt(e,2);{this.state=227;this.version()}break;case 3:this.enterOuterAlt(e,3);{this.state=228;this.expression(0)}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}version(){let e=new Oi(this._ctx,this.state);this.enterRule(e,8,wi.RULE_version);let t;try{this.enterOuterAlt(e,1);{this.state=231;this.versionConstraint();this.state=238;this._errHandler.sync(this);t=this._input.LA(1);while((t&~31)===0&&(1<<t&(1<<wi.T__3|1<<wi.T__4|1<<wi.T__5|1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9|1<<wi.T__10))!==0||t===wi.DecimalNumber||t===wi.VersionLiteral){{{this.state=233;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__3){{this.state=232;this.match(wi.T__3)}}this.state=235;this.versionConstraint()}}this.state=240;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}versionOperator(){let e=new Ri(this._ctx,this.state);this.enterRule(e,10,wi.RULE_versionOperator);let t;try{this.enterOuterAlt(e,1);{this.state=241;t=this._input.LA(1);if(!((t&~31)===0&&(1<<t&(1<<wi.T__4|1<<wi.T__5|1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9|1<<wi.T__10))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}versionConstraint(){let e=new ki(this._ctx,this.state);this.enterRule(e,12,wi.RULE_versionConstraint);let t;try{this.state=251;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,7,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=244;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__4|1<<wi.T__5|1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9|1<<wi.T__10))!==0){{this.state=243;this.versionOperator()}}this.state=246;this.match(wi.VersionLiteral)}break;case 2:this.enterOuterAlt(e,2);{this.state=248;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__4|1<<wi.T__5|1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9|1<<wi.T__10))!==0){{this.state=247;this.versionOperator()}}this.state=250;this.match(wi.DecimalNumber)}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}importDeclaration(){let e=new Pi(this._ctx,this.state);this.enterRule(e,14,wi.RULE_importDeclaration);let t;try{this.enterOuterAlt(e,1);{this.state=253;this.identifier();this.state=256;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__11){{this.state=254;this.match(wi.T__11);this.state=255;this.identifier()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}importDirective(){let e=new Li(this._ctx,this.state);this.enterRule(e,16,wi.RULE_importDirective);let t;try{this.state=294;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,13,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=258;this.match(wi.T__12);this.state=259;this.importPath();this.state=262;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__11){{this.state=260;this.match(wi.T__11);this.state=261;this.identifier()}}this.state=264;this.match(wi.T__1)}break;case 2:this.enterOuterAlt(e,2);{this.state=266;this.match(wi.T__12);this.state=269;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__2:{this.state=267;this.match(wi.T__2)}break;case wi.T__13:case wi.T__24:case wi.T__43:case wi.T__49:case wi.T__61:case wi.T__94:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:{this.state=268;this.identifier()}break;default:throw new mi.NoViableAltException(this)}this.state=273;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__11){{this.state=271;this.match(wi.T__11);this.state=272;this.identifier()}}this.state=275;this.match(wi.T__13);this.state=276;this.importPath();this.state=277;this.match(wi.T__1)}break;case 3:this.enterOuterAlt(e,3);{this.state=279;this.match(wi.T__12);this.state=280;this.match(wi.T__14);this.state=281;this.importDeclaration();this.state=286;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=282;this.match(wi.T__15);this.state=283;this.importDeclaration()}}this.state=288;this._errHandler.sync(this);t=this._input.LA(1)}this.state=289;this.match(wi.T__16);this.state=290;this.match(wi.T__13);this.state=291;this.importPath();this.state=292;this.match(wi.T__1)}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}importPath(){let e=new Ii(this._ctx,this.state);this.enterRule(e,18,wi.RULE_importPath);try{this.enterOuterAlt(e,1);{this.state=296;this.match(wi.StringLiteralFragment)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}contractDefinition(){let e=new Mi(this._ctx,this.state);this.enterRule(e,20,wi.RULE_contractDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=299;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__17){{this.state=298;this.match(wi.T__17)}}this.state=301;t=this._input.LA(1);if(!((t&~31)===0&&(1<<t&(1<<wi.T__18|1<<wi.T__19|1<<wi.T__20))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=302;this.identifier();this.state=312;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__21){{this.state=303;this.match(wi.T__21);this.state=304;this.inheritanceSpecifier();this.state=309;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=305;this.match(wi.T__15);this.state=306;this.inheritanceSpecifier()}}this.state=311;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=314;this.match(wi.T__14);this.state=318;this._errHandler.sync(this);t=this._input.LA(1);while((t&~31)===0&&(1<<t&(1<<wi.T__13|1<<wi.T__24|1<<wi.T__25))!==0||(t-36&~31)===0&&(1<<t-36&(1<<wi.T__35-36|1<<wi.T__36-36|1<<wi.T__37-36|1<<wi.T__39-36|1<<wi.T__40-36|1<<wi.T__43-36|1<<wi.T__45-36|1<<wi.T__49-36|1<<wi.T__61-36|1<<wi.T__62-36|1<<wi.T__63-36|1<<wi.T__64-36|1<<wi.T__65-36))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.TypeKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95|1<<wi.FallbackKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{{this.state=315;this.contractPart()}}this.state=320;this._errHandler.sync(this);t=this._input.LA(1)}this.state=321;this.match(wi.T__16)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}inheritanceSpecifier(){let e=new Di(this._ctx,this.state);this.enterRule(e,22,wi.RULE_inheritanceSpecifier);let t;try{this.enterOuterAlt(e,1);{this.state=323;this.userDefinedTypeName();this.state=329;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__22){{this.state=324;this.match(wi.T__22);this.state=326;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=325;this.expressionList()}}this.state=328;this.match(wi.T__23)}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}contractPart(){let e=new Fi(this._ctx,this.state);this.enterRule(e,24,wi.RULE_contractPart);try{this.state=340;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,20,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=331;this.stateVariableDeclaration()}break;case 2:this.enterOuterAlt(e,2);{this.state=332;this.usingForDeclaration()}break;case 3:this.enterOuterAlt(e,3);{this.state=333;this.structDefinition()}break;case 4:this.enterOuterAlt(e,4);{this.state=334;this.modifierDefinition()}break;case 5:this.enterOuterAlt(e,5);{this.state=335;this.functionDefinition()}break;case 6:this.enterOuterAlt(e,6);{this.state=336;this.eventDefinition()}break;case 7:this.enterOuterAlt(e,7);{this.state=337;this.enumDefinition()}break;case 8:this.enterOuterAlt(e,8);{this.state=338;this.customErrorDefinition()}break;case 9:this.enterOuterAlt(e,9);{this.state=339;this.typeDefinition()}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}stateVariableDeclaration(){let e=new ji(this._ctx,this.state);this.enterRule(e,26,wi.RULE_stateVariableDeclaration);let t;try{this.enterOuterAlt(e,1);{this.state=342;this.typeName(0);this.state=351;this._errHandler.sync(this);t=this._input.LA(1);while((t-96&~31)===0&&(1<<t-96&(1<<wi.T__95-96|1<<wi.ConstantKeyword-96|1<<wi.ImmutableKeyword-96|1<<wi.InternalKeyword-96|1<<wi.PrivateKeyword-96|1<<wi.PublicKeyword-96))!==0){{this.state=349;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.PublicKeyword:{this.state=343;this.match(wi.PublicKeyword)}break;case wi.InternalKeyword:{this.state=344;this.match(wi.InternalKeyword)}break;case wi.PrivateKeyword:{this.state=345;this.match(wi.PrivateKeyword)}break;case wi.ConstantKeyword:{this.state=346;this.match(wi.ConstantKeyword)}break;case wi.ImmutableKeyword:{this.state=347;this.match(wi.ImmutableKeyword)}break;case wi.T__95:{this.state=348;this.overrideSpecifier()}break;default:throw new mi.NoViableAltException(this)}}this.state=353;this._errHandler.sync(this);t=this._input.LA(1)}this.state=354;this.identifier();this.state=357;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__10){{this.state=355;this.match(wi.T__10);this.state=356;this.expression(0)}}this.state=359;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}fileLevelConstant(){let e=new Bi(this._ctx,this.state);this.enterRule(e,28,wi.RULE_fileLevelConstant);try{this.enterOuterAlt(e,1);{this.state=361;this.typeName(0);this.state=362;this.match(wi.ConstantKeyword);this.state=363;this.identifier();this.state=364;this.match(wi.T__10);this.state=365;this.expression(0);this.state=366;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}customErrorDefinition(){let e=new Ui(this._ctx,this.state);this.enterRule(e,30,wi.RULE_customErrorDefinition);try{this.enterOuterAlt(e,1);{this.state=368;this.match(wi.T__24);this.state=369;this.identifier();this.state=370;this.parameterList();this.state=371;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}typeDefinition(){let e=new Hi(this._ctx,this.state);this.enterRule(e,32,wi.RULE_typeDefinition);try{this.enterOuterAlt(e,1);{this.state=373;this.match(wi.TypeKeyword);this.state=374;this.identifier();this.state=375;this.match(wi.T__21);this.state=376;this.elementaryTypeName();this.state=377;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}usingForDeclaration(){let e=new zi(this._ctx,this.state);this.enterRule(e,34,wi.RULE_usingForDeclaration);let t;try{this.enterOuterAlt(e,1);{this.state=379;this.match(wi.T__25);this.state=380;this.usingForObject();this.state=381;this.match(wi.T__26);this.state=384;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__2:{this.state=382;this.match(wi.T__2)}break;case wi.T__13:case wi.T__24:case wi.T__37:case wi.T__43:case wi.T__45:case wi.T__49:case wi.T__61:case wi.T__62:case wi.T__63:case wi.T__64:case wi.T__65:case wi.T__94:case wi.Int:case wi.Uint:case wi.Byte:case wi.Fixed:case wi.Ufixed:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:{this.state=383;this.typeName(0)}break;default:throw new mi.NoViableAltException(this)}this.state=387;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.GlobalKeyword){{this.state=386;this.match(wi.GlobalKeyword)}}this.state=389;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}usingForObject(){let e=new Ki(this._ctx,this.state);this.enterRule(e,36,wi.RULE_usingForObject);let t;try{this.state=403;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__13:case wi.T__24:case wi.T__43:case wi.T__49:case wi.T__61:case wi.T__94:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:this.enterOuterAlt(e,1);{this.state=391;this.userDefinedTypeName()}break;case wi.T__14:this.enterOuterAlt(e,2);{this.state=392;this.match(wi.T__14);this.state=393;this.usingForObjectDirective();this.state=398;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=394;this.match(wi.T__15);this.state=395;this.usingForObjectDirective()}}this.state=400;this._errHandler.sync(this);t=this._input.LA(1)}this.state=401;this.match(wi.T__16)}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}usingForObjectDirective(){let e=new Vi(this._ctx,this.state);this.enterRule(e,38,wi.RULE_usingForObjectDirective);let t;try{this.enterOuterAlt(e,1);{this.state=405;this.userDefinedTypeName();this.state=408;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__11){{this.state=406;this.match(wi.T__11);this.state=407;this.userDefinableOperators()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}userDefinableOperators(){let e=new qi(this._ctx,this.state);this.enterRule(e,40,wi.RULE_userDefinableOperators);let t;try{this.enterOuterAlt(e,1);{this.state=410;t=this._input.LA(1);if(!((t&~31)===0&&(1<<t&(1<<wi.T__2|1<<wi.T__4|1<<wi.T__5|1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9|1<<wi.T__27|1<<wi.T__28|1<<wi.T__29|1<<wi.T__30))!==0||(t-32&~31)===0&&(1<<t-32&(1<<wi.T__31-32|1<<wi.T__32-32|1<<wi.T__33-32|1<<wi.T__34-32))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}structDefinition(){let e=new Zi(this._ctx,this.state);this.enterRule(e,42,wi.RULE_structDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=412;this.match(wi.T__35);this.state=413;this.identifier();this.state=414;this.match(wi.T__14);this.state=425;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=415;this.variableDeclaration();this.state=416;this.match(wi.T__1);this.state=422;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{{this.state=417;this.variableDeclaration();this.state=418;this.match(wi.T__1)}}this.state=424;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=427;this.match(wi.T__16)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}modifierDefinition(){let e=new Gi(this._ctx,this.state);this.enterRule(e,44,wi.RULE_modifierDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=429;this.match(wi.T__36);this.state=430;this.identifier();this.state=432;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__22){{this.state=431;this.parameterList()}}this.state=438;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__95||t===wi.VirtualKeyword){{this.state=436;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.VirtualKeyword:{this.state=434;this.match(wi.VirtualKeyword)}break;case wi.T__95:{this.state=435;this.overrideSpecifier()}break;default:throw new mi.NoViableAltException(this)}}this.state=440;this._errHandler.sync(this);t=this._input.LA(1)}this.state=443;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__1:{this.state=441;this.match(wi.T__1)}break;case wi.T__14:{this.state=442;this.block()}break;default:throw new mi.NoViableAltException(this)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}modifierInvocation(){let e=new $i(this._ctx,this.state);this.enterRule(e,46,wi.RULE_modifierInvocation);let t;try{this.enterOuterAlt(e,1);{this.state=445;this.identifier();this.state=451;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__22){{this.state=446;this.match(wi.T__22);this.state=448;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=447;this.expressionList()}}this.state=450;this.match(wi.T__23)}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionDefinition(){let e=new Wi(this._ctx,this.state);this.enterRule(e,48,wi.RULE_functionDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=453;this.functionDescriptor();this.state=454;this.parameterList();this.state=455;this.modifierList();this.state=457;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__38){{this.state=456;this.returnParameters()}}this.state=461;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__1:{this.state=459;this.match(wi.T__1)}break;case wi.T__14:{this.state=460;this.block()}break;default:throw new mi.NoViableAltException(this)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionDescriptor(){let e=new Yi(this._ctx,this.state);this.enterRule(e,50,wi.RULE_functionDescriptor);let t;try{this.state=470;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__37:this.enterOuterAlt(e,1);{this.state=463;this.match(wi.T__37);this.state=465;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=464;this.identifier()}}}break;case wi.ConstructorKeyword:this.enterOuterAlt(e,2);{this.state=467;this.match(wi.ConstructorKeyword)}break;case wi.FallbackKeyword:this.enterOuterAlt(e,3);{this.state=468;this.match(wi.FallbackKeyword)}break;case wi.ReceiveKeyword:this.enterOuterAlt(e,4);{this.state=469;this.match(wi.ReceiveKeyword)}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}returnParameters(){let e=new Ji(this._ctx,this.state);this.enterRule(e,52,wi.RULE_returnParameters);try{this.enterOuterAlt(e,1);{this.state=472;this.match(wi.T__38);this.state=473;this.parameterList()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}modifierList(){let e=new Qi(this._ctx,this.state);this.enterRule(e,54,wi.RULE_modifierList);let t;try{this.enterOuterAlt(e,1);{this.state=485;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.T__95-95|1<<wi.ConstantKeyword-95|1<<wi.LeaveKeyword-95|1<<wi.ExternalKeyword-95|1<<wi.InternalKeyword-95|1<<wi.PayableKeyword-95|1<<wi.PrivateKeyword-95|1<<wi.PublicKeyword-95|1<<wi.VirtualKeyword-95|1<<wi.PureKeyword-95|1<<wi.ViewKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=483;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,41,this._ctx)){case 1:{this.state=475;this.match(wi.ExternalKeyword)}break;case 2:{this.state=476;this.match(wi.PublicKeyword)}break;case 3:{this.state=477;this.match(wi.InternalKeyword)}break;case 4:{this.state=478;this.match(wi.PrivateKeyword)}break;case 5:{this.state=479;this.match(wi.VirtualKeyword)}break;case 6:{this.state=480;this.stateMutability()}break;case 7:{this.state=481;this.modifierInvocation()}break;case 8:{this.state=482;this.overrideSpecifier()}break}}this.state=487;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}eventDefinition(){let e=new Xi(this._ctx,this.state);this.enterRule(e,56,wi.RULE_eventDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=488;this.match(wi.T__39);this.state=489;this.identifier();this.state=490;this.eventParameterList();this.state=492;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.AnonymousKeyword){{this.state=491;this.match(wi.AnonymousKeyword)}}this.state=494;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}enumValue(){let e=new en(this._ctx,this.state);this.enterRule(e,58,wi.RULE_enumValue);try{this.enterOuterAlt(e,1);{this.state=496;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}enumDefinition(){let e=new tn(this._ctx,this.state);this.enterRule(e,60,wi.RULE_enumDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=498;this.match(wi.T__40);this.state=499;this.identifier();this.state=500;this.match(wi.T__14);this.state=502;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=501;this.enumValue()}}this.state=508;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=504;this.match(wi.T__15);this.state=505;this.enumValue()}}this.state=510;this._errHandler.sync(this);t=this._input.LA(1)}this.state=511;this.match(wi.T__16)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}parameterList(){let e=new rn(this._ctx,this.state);this.enterRule(e,62,wi.RULE_parameterList);let t;try{this.enterOuterAlt(e,1);{this.state=513;this.match(wi.T__22);this.state=522;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=514;this.parameter();this.state=519;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=515;this.match(wi.T__15);this.state=516;this.parameter()}}this.state=521;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=524;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}parameter(){let e=new nn(this._ctx,this.state);this.enterRule(e,64,wi.RULE_parameter);let t;try{this.enterOuterAlt(e,1);{this.state=526;this.typeName(0);this.state=528;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,48,this._ctx)){case 1:{this.state=527;this.storageLocation()}break}this.state=531;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=530;this.identifier()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}eventParameterList(){let e=new sn(this._ctx,this.state);this.enterRule(e,66,wi.RULE_eventParameterList);let t;try{this.enterOuterAlt(e,1);{this.state=533;this.match(wi.T__22);this.state=542;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=534;this.eventParameter();this.state=539;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=535;this.match(wi.T__15);this.state=536;this.eventParameter()}}this.state=541;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=544;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}eventParameter(){let e=new on(this._ctx,this.state);this.enterRule(e,68,wi.RULE_eventParameter);let t;try{this.enterOuterAlt(e,1);{this.state=546;this.typeName(0);this.state=548;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.IndexedKeyword){{this.state=547;this.match(wi.IndexedKeyword)}}this.state=551;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=550;this.identifier()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionTypeParameterList(){let e=new an(this._ctx,this.state);this.enterRule(e,70,wi.RULE_functionTypeParameterList);let t;try{this.enterOuterAlt(e,1);{this.state=553;this.match(wi.T__22);this.state=562;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=554;this.functionTypeParameter();this.state=559;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=555;this.match(wi.T__15);this.state=556;this.functionTypeParameter()}}this.state=561;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=564;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionTypeParameter(){let e=new ln(this._ctx,this.state);this.enterRule(e,72,wi.RULE_functionTypeParameter);let t;try{this.enterOuterAlt(e,1);{this.state=566;this.typeName(0);this.state=568;this._errHandler.sync(this);t=this._input.LA(1);if((t-48&~31)===0&&(1<<t-48&(1<<wi.T__47-48|1<<wi.T__48-48|1<<wi.T__49-48))!==0){{this.state=567;this.storageLocation()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}variableDeclaration(){let e=new un(this._ctx,this.state);this.enterRule(e,74,wi.RULE_variableDeclaration);try{this.enterOuterAlt(e,1);{this.state=570;this.typeName(0);this.state=572;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,57,this._ctx)){case 1:{this.state=571;this.storageLocation()}break}this.state=574;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}typeName(e){if(e===void 0){e=0}let t=this._ctx;let r=this.state;let i=new cn(this._ctx,r);let n=i;let s=76;this.enterRecursionRule(i,76,wi.RULE_typeName,e);let o;try{let e;this.enterOuterAlt(i,1);{this.state=583;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,58,this._ctx)){case 1:{this.state=577;this.elementaryTypeName()}break;case 2:{this.state=578;this.userDefinedTypeName()}break;case 3:{this.state=579;this.mapping()}break;case 4:{this.state=580;this.functionTypeName()}break;case 5:{this.state=581;this.match(wi.T__43);this.state=582;this.match(wi.PayableKeyword)}break}this._ctx._stop=this._input.tryLT(-1);this.state=593;this._errHandler.sync(this);e=this.interpreter.adaptivePredict(this._input,60,this._ctx);while(e!==2&&e!==di.ATN.INVALID_ALT_NUMBER){if(e===1){if(this._parseListeners!=null){this.triggerExitRuleEvent()}n=i;{{i=new cn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_typeName);this.state=585;if(!this.precpred(this._ctx,3)){throw this.createFailedPredicateException("this.precpred(this._ctx, 3)")}this.state=586;this.match(wi.T__41);this.state=588;this._errHandler.sync(this);o=this._input.LA(1);if((o&~31)===0&&(1<<o&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(o-38&~31)===0&&(1<<o-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(o-71&~31)===0&&(1<<o-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(o-103&~31)===0&&(1<<o-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=587;this.expression(0)}}this.state=590;this.match(wi.T__42)}}}this.state=595;this._errHandler.sync(this);e=this.interpreter.adaptivePredict(this._input,60,this._ctx)}}}catch(e){if(e instanceof vi.RecognitionException){i.exception=e;this._errHandler.reportError(this,e);this._errHandler.recover(this,e)}else{throw e}}finally{this.unrollRecursionContexts(t)}return i}userDefinedTypeName(){let e=new hn(this._ctx,this.state);this.enterRule(e,78,wi.RULE_userDefinedTypeName);try{let t;this.enterOuterAlt(e,1);{this.state=596;this.identifier();this.state=601;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,61,this._ctx);while(t!==2&&t!==di.ATN.INVALID_ALT_NUMBER){if(t===1){{{this.state=597;this.match(wi.T__44);this.state=598;this.identifier()}}}this.state=603;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,61,this._ctx)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}mappingKey(){let e=new dn(this._ctx,this.state);this.enterRule(e,80,wi.RULE_mappingKey);try{this.state=606;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,62,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=604;this.elementaryTypeName()}break;case 2:this.enterOuterAlt(e,2);{this.state=605;this.userDefinedTypeName()}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}mapping(){let e=new fn(this._ctx,this.state);this.enterRule(e,82,wi.RULE_mapping);let t;try{this.enterOuterAlt(e,1);{this.state=608;this.match(wi.T__45);this.state=609;this.match(wi.T__22);this.state=610;this.mappingKey();this.state=612;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=611;this.mappingKeyName()}}this.state=614;this.match(wi.T__46);this.state=615;this.typeName(0);this.state=617;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=616;this.mappingValueName()}}this.state=619;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}mappingKeyName(){let e=new pn(this._ctx,this.state);this.enterRule(e,84,wi.RULE_mappingKeyName);try{this.enterOuterAlt(e,1);{this.state=621;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}mappingValueName(){let e=new mn(this._ctx,this.state);this.enterRule(e,86,wi.RULE_mappingValueName);try{this.enterOuterAlt(e,1);{this.state=623;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionTypeName(){let e=new gn(this._ctx,this.state);this.enterRule(e,88,wi.RULE_functionTypeName);try{let t;this.enterOuterAlt(e,1);{this.state=625;this.match(wi.T__37);this.state=626;this.functionTypeParameterList();this.state=632;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,66,this._ctx);while(t!==2&&t!==di.ATN.INVALID_ALT_NUMBER){if(t===1){{this.state=630;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.InternalKeyword:{this.state=627;this.match(wi.InternalKeyword)}break;case wi.ExternalKeyword:{this.state=628;this.match(wi.ExternalKeyword)}break;case wi.ConstantKeyword:case wi.PayableKeyword:case wi.PureKeyword:case wi.ViewKeyword:{this.state=629;this.stateMutability()}break;default:throw new mi.NoViableAltException(this)}}}this.state=634;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,66,this._ctx)}this.state=637;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,67,this._ctx)){case 1:{this.state=635;this.match(wi.T__38);this.state=636;this.functionTypeParameterList()}break}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}storageLocation(){let e=new yn(this._ctx,this.state);this.enterRule(e,90,wi.RULE_storageLocation);let t;try{this.enterOuterAlt(e,1);{this.state=639;t=this._input.LA(1);if(!((t-48&~31)===0&&(1<<t-48&(1<<wi.T__47-48|1<<wi.T__48-48|1<<wi.T__49-48))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}stateMutability(){let e=new _n(this._ctx,this.state);this.enterRule(e,92,wi.RULE_stateMutability);let t;try{this.enterOuterAlt(e,1);{this.state=641;t=this._input.LA(1);if(!((t-110&~31)===0&&(1<<t-110&(1<<wi.ConstantKeyword-110|1<<wi.PayableKeyword-110|1<<wi.PureKeyword-110|1<<wi.ViewKeyword-110))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}block(){let e=new vn(this._ctx,this.state);this.enterRule(e,94,wi.RULE_block);let t;try{this.enterOuterAlt(e,1);{this.state=643;this.match(wi.T__14);this.state=647;this._errHandler.sync(this);t=this._input.LA(1);while((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__14|1<<wi.T__22|1<<wi.T__24|1<<wi.T__26|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__50-38|1<<wi.T__52-38|1<<wi.T__54-38|1<<wi.T__55-38|1<<wi.T__56-38|1<<wi.T__57-38|1<<wi.T__58-38|1<<wi.T__59-38|1<<wi.T__60-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.BreakKeyword-103|1<<wi.ContinueKeyword-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{{this.state=644;this.statement()}}this.state=649;this._errHandler.sync(this);t=this._input.LA(1)}this.state=650;this.match(wi.T__16)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}statement(){let e=new bn(this._ctx,this.state);this.enterRule(e,96,wi.RULE_statement);try{this.state=667;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,69,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=652;this.ifStatement()}break;case 2:this.enterOuterAlt(e,2);{this.state=653;this.tryStatement()}break;case 3:this.enterOuterAlt(e,3);{this.state=654;this.whileStatement()}break;case 4:this.enterOuterAlt(e,4);{this.state=655;this.forStatement()}break;case 5:this.enterOuterAlt(e,5);{this.state=656;this.block()}break;case 6:this.enterOuterAlt(e,6);{this.state=657;this.inlineAssemblyStatement()}break;case 7:this.enterOuterAlt(e,7);{this.state=658;this.doWhileStatement()}break;case 8:this.enterOuterAlt(e,8);{this.state=659;this.continueStatement()}break;case 9:this.enterOuterAlt(e,9);{this.state=660;this.breakStatement()}break;case 10:this.enterOuterAlt(e,10);{this.state=661;this.returnStatement()}break;case 11:this.enterOuterAlt(e,11);{this.state=662;this.throwStatement()}break;case 12:this.enterOuterAlt(e,12);{this.state=663;this.emitStatement()}break;case 13:this.enterOuterAlt(e,13);{this.state=664;this.simpleStatement()}break;case 14:this.enterOuterAlt(e,14);{this.state=665;this.uncheckedStatement()}break;case 15:this.enterOuterAlt(e,15);{this.state=666;this.revertStatement()}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}expressionStatement(){let e=new xn(this._ctx,this.state);this.enterRule(e,98,wi.RULE_expressionStatement);try{this.enterOuterAlt(e,1);{this.state=669;this.expression(0);this.state=670;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}ifStatement(){let e=new Tn(this._ctx,this.state);this.enterRule(e,100,wi.RULE_ifStatement);try{this.enterOuterAlt(e,1);{this.state=672;this.match(wi.T__50);this.state=673;this.match(wi.T__22);this.state=674;this.expression(0);this.state=675;this.match(wi.T__23);this.state=676;this.statement();this.state=679;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,70,this._ctx)){case 1:{this.state=677;this.match(wi.T__51);this.state=678;this.statement()}break}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}tryStatement(){let e=new wn(this._ctx,this.state);this.enterRule(e,102,wi.RULE_tryStatement);let t;try{this.enterOuterAlt(e,1);{this.state=681;this.match(wi.T__52);this.state=682;this.expression(0);this.state=684;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__38){{this.state=683;this.returnParameters()}}this.state=686;this.block();this.state=688;this._errHandler.sync(this);t=this._input.LA(1);do{{{this.state=687;this.catchClause()}}this.state=690;this._errHandler.sync(this);t=this._input.LA(1)}while(t===wi.T__53)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}catchClause(){let e=new Sn(this._ctx,this.state);this.enterRule(e,104,wi.RULE_catchClause);let t;try{this.enterOuterAlt(e,1);{this.state=692;this.match(wi.T__53);this.state=697;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__13|1<<wi.T__22|1<<wi.T__24))!==0||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=694;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=693;this.identifier()}}this.state=696;this.parameterList()}}this.state=699;this.block()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}whileStatement(){let e=new En(this._ctx,this.state);this.enterRule(e,106,wi.RULE_whileStatement);try{this.enterOuterAlt(e,1);{this.state=701;this.match(wi.T__54);this.state=702;this.match(wi.T__22);this.state=703;this.expression(0);this.state=704;this.match(wi.T__23);this.state=705;this.statement()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}simpleStatement(){let e=new An(this._ctx,this.state);this.enterRule(e,108,wi.RULE_simpleStatement);try{this.enterOuterAlt(e,1);{this.state=709;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,75,this._ctx)){case 1:{this.state=707;this.variableDeclarationStatement()}break;case 2:{this.state=708;this.expressionStatement()}break}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}uncheckedStatement(){let e=new Cn(this._ctx,this.state);this.enterRule(e,110,wi.RULE_uncheckedStatement);try{this.enterOuterAlt(e,1);{this.state=711;this.match(wi.T__55);this.state=712;this.block()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}forStatement(){let e=new Nn(this._ctx,this.state);this.enterRule(e,112,wi.RULE_forStatement);let t;try{this.enterOuterAlt(e,1);{this.state=714;this.match(wi.T__26);this.state=715;this.match(wi.T__22);this.state=718;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__5:case wi.T__13:case wi.T__22:case wi.T__24:case wi.T__29:case wi.T__30:case wi.T__37:case wi.T__41:case wi.T__43:case wi.T__45:case wi.T__49:case wi.T__61:case wi.T__62:case wi.T__63:case wi.T__64:case wi.T__65:case wi.T__66:case wi.T__67:case wi.T__68:case wi.T__70:case wi.T__71:case wi.T__94:case wi.Int:case wi.Uint:case wi.Byte:case wi.Fixed:case wi.Ufixed:case wi.BooleanLiteral:case wi.DecimalNumber:case wi.HexNumber:case wi.HexLiteralFragment:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.TypeKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:case wi.StringLiteralFragment:{this.state=716;this.simpleStatement()}break;case wi.T__1:{this.state=717;this.match(wi.T__1)}break;default:throw new mi.NoViableAltException(this)}this.state=722;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__5:case wi.T__13:case wi.T__22:case wi.T__24:case wi.T__29:case wi.T__30:case wi.T__37:case wi.T__41:case wi.T__43:case wi.T__45:case wi.T__49:case wi.T__61:case wi.T__62:case wi.T__63:case wi.T__64:case wi.T__65:case wi.T__66:case wi.T__67:case wi.T__68:case wi.T__70:case wi.T__71:case wi.T__94:case wi.Int:case wi.Uint:case wi.Byte:case wi.Fixed:case wi.Ufixed:case wi.BooleanLiteral:case wi.DecimalNumber:case wi.HexNumber:case wi.HexLiteralFragment:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.TypeKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:case wi.StringLiteralFragment:{this.state=720;this.expressionStatement()}break;case wi.T__1:{this.state=721;this.match(wi.T__1)}break;default:throw new mi.NoViableAltException(this)}this.state=725;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=724;this.expression(0)}}this.state=727;this.match(wi.T__23);this.state=728;this.statement()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}inlineAssemblyStatement(){let e=new On(this._ctx,this.state);this.enterRule(e,114,wi.RULE_inlineAssemblyStatement);let t;try{this.enterOuterAlt(e,1);{this.state=730;this.match(wi.T__56);this.state=732;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.StringLiteralFragment){{this.state=731;this.match(wi.StringLiteralFragment)}}this.state=738;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__22){{this.state=734;this.match(wi.T__22);this.state=735;this.inlineAssemblyStatementFlag();this.state=736;this.match(wi.T__23)}}this.state=740;this.assemblyBlock()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}inlineAssemblyStatementFlag(){let e=new Rn(this._ctx,this.state);this.enterRule(e,116,wi.RULE_inlineAssemblyStatementFlag);try{this.enterOuterAlt(e,1);{this.state=742;this.stringLiteral()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}doWhileStatement(){let e=new kn(this._ctx,this.state);this.enterRule(e,118,wi.RULE_doWhileStatement);try{this.enterOuterAlt(e,1);{this.state=744;this.match(wi.T__57);this.state=745;this.statement();this.state=746;this.match(wi.T__54);this.state=747;this.match(wi.T__22);this.state=748;this.expression(0);this.state=749;this.match(wi.T__23);this.state=750;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}continueStatement(){let e=new Pn(this._ctx,this.state);this.enterRule(e,120,wi.RULE_continueStatement);try{this.enterOuterAlt(e,1);{this.state=752;this.match(wi.ContinueKeyword);this.state=753;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}breakStatement(){let e=new Ln(this._ctx,this.state);this.enterRule(e,122,wi.RULE_breakStatement);try{this.enterOuterAlt(e,1);{this.state=755;this.match(wi.BreakKeyword);this.state=756;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}returnStatement(){let e=new In(this._ctx,this.state);this.enterRule(e,124,wi.RULE_returnStatement);let t;try{this.enterOuterAlt(e,1);{this.state=758;this.match(wi.T__58);this.state=760;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=759;this.expression(0)}}this.state=762;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}throwStatement(){let e=new Mn(this._ctx,this.state);this.enterRule(e,126,wi.RULE_throwStatement);try{this.enterOuterAlt(e,1);{this.state=764;this.match(wi.T__59);this.state=765;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}emitStatement(){let e=new Dn(this._ctx,this.state);this.enterRule(e,128,wi.RULE_emitStatement);try{this.enterOuterAlt(e,1);{this.state=767;this.match(wi.T__60);this.state=768;this.functionCall();this.state=769;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}revertStatement(){let e=new Fn(this._ctx,this.state);this.enterRule(e,130,wi.RULE_revertStatement);try{this.enterOuterAlt(e,1);{this.state=771;this.match(wi.T__61);this.state=772;this.functionCall();this.state=773;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}variableDeclarationStatement(){let e=new jn(this._ctx,this.state);this.enterRule(e,132,wi.RULE_variableDeclarationStatement);let t;try{this.enterOuterAlt(e,1);{this.state=782;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,82,this._ctx)){case 1:{this.state=775;this.match(wi.T__62);this.state=776;this.identifierList()}break;case 2:{this.state=777;this.variableDeclaration()}break;case 3:{this.state=778;this.match(wi.T__22);this.state=779;this.variableDeclarationList();this.state=780;this.match(wi.T__23)}break}this.state=786;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__10){{this.state=784;this.match(wi.T__10);this.state=785;this.expression(0)}}this.state=788;this.match(wi.T__1)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}variableDeclarationList(){let e=new Bn(this._ctx,this.state);this.enterRule(e,134,wi.RULE_variableDeclarationList);let t;try{this.enterOuterAlt(e,1);{this.state=791;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=790;this.variableDeclaration()}}this.state=799;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=793;this.match(wi.T__15);this.state=795;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.Int-95|1<<wi.Uint-95|1<<wi.Byte-95|1<<wi.Fixed-95|1<<wi.Ufixed-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=794;this.variableDeclaration()}}}}this.state=801;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}identifierList(){let e=new Un(this._ctx,this.state);this.enterRule(e,136,wi.RULE_identifierList);let t;try{let r;this.enterOuterAlt(e,1);{this.state=802;this.match(wi.T__22);this.state=809;this._errHandler.sync(this);r=this.interpreter.adaptivePredict(this._input,88,this._ctx);while(r!==2&&r!==di.ATN.INVALID_ALT_NUMBER){if(r===1){{{this.state=804;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=803;this.identifier()}}this.state=806;this.match(wi.T__15)}}}this.state=811;this._errHandler.sync(this);r=this.interpreter.adaptivePredict(this._input,88,this._ctx)}this.state=813;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=812;this.identifier()}}this.state=815;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}elementaryTypeName(){let e=new Hn(this._ctx,this.state);this.enterRule(e,138,wi.RULE_elementaryTypeName);let t;try{this.enterOuterAlt(e,1);{this.state=817;t=this._input.LA(1);if(!((t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__62-44|1<<wi.T__63-44|1<<wi.T__64-44|1<<wi.T__65-44))!==0||(t-97&~31)===0&&(1<<t-97&(1<<wi.Int-97|1<<wi.Uint-97|1<<wi.Byte-97|1<<wi.Fixed-97|1<<wi.Ufixed-97))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}expression(e){if(e===void 0){e=0}let t=this._ctx;let r=this.state;let i=new zn(this._ctx,r);let n=i;let s=140;this.enterRecursionRule(i,140,wi.RULE_expression,e);let o;try{let e;this.enterOuterAlt(i,1);{this.state=837;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,90,this._ctx)){case 1:{this.state=820;this.match(wi.T__68);this.state=821;this.typeName(0)}break;case 2:{this.state=822;this.match(wi.T__22);this.state=823;this.expression(0);this.state=824;this.match(wi.T__23)}break;case 3:{this.state=826;o=this._input.LA(1);if(!(o===wi.T__66||o===wi.T__67)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=827;this.expression(19)}break;case 4:{this.state=828;o=this._input.LA(1);if(!(o===wi.T__29||o===wi.T__30)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=829;this.expression(18)}break;case 5:{this.state=830;this.match(wi.T__70);this.state=831;this.expression(17)}break;case 6:{this.state=832;this.match(wi.T__71);this.state=833;this.expression(16)}break;case 7:{this.state=834;this.match(wi.T__5);this.state=835;this.expression(15)}break;case 8:{this.state=836;this.primaryExpression()}break}this._ctx._stop=this._input.tryLT(-1);this.state=913;this._errHandler.sync(this);e=this.interpreter.adaptivePredict(this._input,94,this._ctx);while(e!==2&&e!==di.ATN.INVALID_ALT_NUMBER){if(e===1){if(this._parseListeners!=null){this.triggerExitRuleEvent()}n=i;{this.state=911;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,93,this._ctx)){case 1:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=839;if(!this.precpred(this._ctx,14)){throw this.createFailedPredicateException("this.precpred(this._ctx, 14)")}this.state=840;this.match(wi.T__72);this.state=841;this.expression(15)}break;case 2:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=842;if(!this.precpred(this._ctx,13)){throw this.createFailedPredicateException("this.precpred(this._ctx, 13)")}this.state=843;o=this._input.LA(1);if(!((o-3&~31)===0&&(1<<o-3&(1<<wi.T__2-3|1<<wi.T__31-3|1<<wi.T__32-3))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=844;this.expression(14)}break;case 3:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=845;if(!this.precpred(this._ctx,12)){throw this.createFailedPredicateException("this.precpred(this._ctx, 12)")}this.state=846;o=this._input.LA(1);if(!(o===wi.T__29||o===wi.T__30)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=847;this.expression(13)}break;case 4:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=848;if(!this.precpred(this._ctx,11)){throw this.createFailedPredicateException("this.precpred(this._ctx, 11)")}this.state=849;o=this._input.LA(1);if(!(o===wi.T__73||o===wi.T__74)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=850;this.expression(12)}break;case 5:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=851;if(!this.precpred(this._ctx,10)){throw this.createFailedPredicateException("this.precpred(this._ctx, 10)")}this.state=852;this.match(wi.T__28);this.state=853;this.expression(11)}break;case 6:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=854;if(!this.precpred(this._ctx,9)){throw this.createFailedPredicateException("this.precpred(this._ctx, 9)")}this.state=855;this.match(wi.T__4);this.state=856;this.expression(10)}break;case 7:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=857;if(!this.precpred(this._ctx,8)){throw this.createFailedPredicateException("this.precpred(this._ctx, 8)")}this.state=858;this.match(wi.T__27);this.state=859;this.expression(9)}break;case 8:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=860;if(!this.precpred(this._ctx,7)){throw this.createFailedPredicateException("this.precpred(this._ctx, 7)")}this.state=861;o=this._input.LA(1);if(!((o&~31)===0&&(1<<o&(1<<wi.T__6|1<<wi.T__7|1<<wi.T__8|1<<wi.T__9))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=862;this.expression(8)}break;case 9:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=863;if(!this.precpred(this._ctx,6)){throw this.createFailedPredicateException("this.precpred(this._ctx, 6)")}this.state=864;o=this._input.LA(1);if(!(o===wi.T__33||o===wi.T__34)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=865;this.expression(7)}break;case 10:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=866;if(!this.precpred(this._ctx,5)){throw this.createFailedPredicateException("this.precpred(this._ctx, 5)")}this.state=867;this.match(wi.T__75);this.state=868;this.expression(6)}break;case 11:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=869;if(!this.precpred(this._ctx,4)){throw this.createFailedPredicateException("this.precpred(this._ctx, 4)")}this.state=870;this.match(wi.T__3);this.state=871;this.expression(5)}break;case 12:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=872;if(!this.precpred(this._ctx,3)){throw this.createFailedPredicateException("this.precpred(this._ctx, 3)")}this.state=873;this.match(wi.T__76);this.state=874;this.expression(0);this.state=875;this.match(wi.T__69);this.state=876;this.expression(4)}break;case 13:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=878;if(!this.precpred(this._ctx,2)){throw this.createFailedPredicateException("this.precpred(this._ctx, 2)")}this.state=879;o=this._input.LA(1);if(!(o===wi.T__10||(o-78&~31)===0&&(1<<o-78&(1<<wi.T__77-78|1<<wi.T__78-78|1<<wi.T__79-78|1<<wi.T__80-78|1<<wi.T__81-78|1<<wi.T__82-78|1<<wi.T__83-78|1<<wi.T__84-78|1<<wi.T__85-78|1<<wi.T__86-78))!==0)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=880;this.expression(3)}break;case 14:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=881;if(!this.precpred(this._ctx,27)){throw this.createFailedPredicateException("this.precpred(this._ctx, 27)")}this.state=882;o=this._input.LA(1);if(!(o===wi.T__66||o===wi.T__67)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}break;case 15:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=883;if(!this.precpred(this._ctx,25)){throw this.createFailedPredicateException("this.precpred(this._ctx, 25)")}this.state=884;this.match(wi.T__41);this.state=885;this.expression(0);this.state=886;this.match(wi.T__42)}break;case 16:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=888;if(!this.precpred(this._ctx,24)){throw this.createFailedPredicateException("this.precpred(this._ctx, 24)")}this.state=889;this.match(wi.T__41);this.state=891;this._errHandler.sync(this);o=this._input.LA(1);if((o&~31)===0&&(1<<o&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(o-38&~31)===0&&(1<<o-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(o-71&~31)===0&&(1<<o-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(o-103&~31)===0&&(1<<o-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=890;this.expression(0)}}this.state=893;this.match(wi.T__69);this.state=895;this._errHandler.sync(this);o=this._input.LA(1);if((o&~31)===0&&(1<<o&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(o-38&~31)===0&&(1<<o-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(o-71&~31)===0&&(1<<o-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(o-103&~31)===0&&(1<<o-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=894;this.expression(0)}}this.state=897;this.match(wi.T__42)}break;case 17:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=898;if(!this.precpred(this._ctx,23)){throw this.createFailedPredicateException("this.precpred(this._ctx, 23)")}this.state=899;this.match(wi.T__44);this.state=900;this.identifier()}break;case 18:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=901;if(!this.precpred(this._ctx,22)){throw this.createFailedPredicateException("this.precpred(this._ctx, 22)")}this.state=902;this.match(wi.T__14);this.state=903;this.nameValueList();this.state=904;this.match(wi.T__16)}break;case 19:{i=new zn(t,r);this.pushNewRecursionContext(i,s,wi.RULE_expression);this.state=906;if(!this.precpred(this._ctx,21)){throw this.createFailedPredicateException("this.precpred(this._ctx, 21)")}this.state=907;this.match(wi.T__22);this.state=908;this.functionCallArguments();this.state=909;this.match(wi.T__23)}break}}}this.state=915;this._errHandler.sync(this);e=this.interpreter.adaptivePredict(this._input,94,this._ctx)}}}catch(e){if(e instanceof vi.RecognitionException){i.exception=e;this._errHandler.reportError(this,e);this._errHandler.recover(this,e)}else{throw e}}finally{this.unrollRecursionContexts(t)}return i}primaryExpression(){let e=new Kn(this._ctx,this.state);this.enterRule(e,142,wi.RULE_primaryExpression);try{this.state=925;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,95,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=916;this.match(wi.BooleanLiteral)}break;case 2:this.enterOuterAlt(e,2);{this.state=917;this.numberLiteral()}break;case 3:this.enterOuterAlt(e,3);{this.state=918;this.hexLiteral()}break;case 4:this.enterOuterAlt(e,4);{this.state=919;this.stringLiteral()}break;case 5:this.enterOuterAlt(e,5);{this.state=920;this.identifier()}break;case 6:this.enterOuterAlt(e,6);{this.state=921;this.match(wi.TypeKeyword)}break;case 7:this.enterOuterAlt(e,7);{this.state=922;this.match(wi.PayableKeyword)}break;case 8:this.enterOuterAlt(e,8);{this.state=923;this.tupleExpression()}break;case 9:this.enterOuterAlt(e,9);{this.state=924;this.typeName(0)}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}expressionList(){let e=new Vn(this._ctx,this.state);this.enterRule(e,144,wi.RULE_expressionList);let t;try{this.enterOuterAlt(e,1);{this.state=927;this.expression(0);this.state=932;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=928;this.match(wi.T__15);this.state=929;this.expression(0)}}this.state=934;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}nameValueList(){let e=new qn(this._ctx,this.state);this.enterRule(e,146,wi.RULE_nameValueList);let t;try{let r;this.enterOuterAlt(e,1);{this.state=935;this.nameValue();this.state=940;this._errHandler.sync(this);r=this.interpreter.adaptivePredict(this._input,97,this._ctx);while(r!==2&&r!==di.ATN.INVALID_ALT_NUMBER){if(r===1){{{this.state=936;this.match(wi.T__15);this.state=937;this.nameValue()}}}this.state=942;this._errHandler.sync(this);r=this.interpreter.adaptivePredict(this._input,97,this._ctx)}this.state=944;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__15){{this.state=943;this.match(wi.T__15)}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}nameValue(){let e=new Zn(this._ctx,this.state);this.enterRule(e,148,wi.RULE_nameValue);try{this.enterOuterAlt(e,1);{this.state=946;this.identifier();this.state=947;this.match(wi.T__69);this.state=948;this.expression(0)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionCallArguments(){let e=new Gn(this._ctx,this.state);this.enterRule(e,150,wi.RULE_functionCallArguments);let t;try{this.state=958;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__14:this.enterOuterAlt(e,1);{this.state=950;this.match(wi.T__14);this.state=952;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=951;this.nameValueList()}}this.state=954;this.match(wi.T__16)}break;case wi.T__5:case wi.T__13:case wi.T__22:case wi.T__23:case wi.T__24:case wi.T__29:case wi.T__30:case wi.T__37:case wi.T__41:case wi.T__43:case wi.T__45:case wi.T__49:case wi.T__61:case wi.T__62:case wi.T__63:case wi.T__64:case wi.T__65:case wi.T__66:case wi.T__67:case wi.T__68:case wi.T__70:case wi.T__71:case wi.T__94:case wi.Int:case wi.Uint:case wi.Byte:case wi.Fixed:case wi.Ufixed:case wi.BooleanLiteral:case wi.DecimalNumber:case wi.HexNumber:case wi.HexLiteralFragment:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.TypeKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:case wi.StringLiteralFragment:this.enterOuterAlt(e,2);{this.state=956;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=955;this.expressionList()}}}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}functionCall(){let e=new $n(this._ctx,this.state);this.enterRule(e,152,wi.RULE_functionCall);try{this.enterOuterAlt(e,1);{this.state=960;this.expression(0);this.state=961;this.match(wi.T__22);this.state=962;this.functionCallArguments();this.state=963;this.match(wi.T__23)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyBlock(){let e=new Wn(this._ctx,this.state);this.enterRule(e,154,wi.RULE_assemblyBlock);let t;try{this.enterOuterAlt(e,1);{this.state=965;this.match(wi.T__14);this.state=969;this._errHandler.sync(this);t=this._input.LA(1);while((t&~31)===0&&(1<<t&(1<<wi.T__13|1<<wi.T__14|1<<wi.T__22|1<<wi.T__24|1<<wi.T__26))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__43-38|1<<wi.T__49-38|1<<wi.T__50-38|1<<wi.T__58-38|1<<wi.T__61-38|1<<wi.T__65-38))!==0||(t-88&~31)===0&&(1<<t-88&(1<<wi.T__87-88|1<<wi.T__90-88|1<<wi.T__94-88|1<<wi.BooleanLiteral-88|1<<wi.DecimalNumber-88|1<<wi.HexNumber-88|1<<wi.HexLiteralFragment-88|1<<wi.BreakKeyword-88|1<<wi.ContinueKeyword-88|1<<wi.LeaveKeyword-88|1<<wi.PayableKeyword-88))!==0||(t-124&~31)===0&&(1<<t-124&(1<<wi.GlobalKeyword-124|1<<wi.ConstructorKeyword-124|1<<wi.ReceiveKeyword-124|1<<wi.Identifier-124|1<<wi.StringLiteralFragment-124))!==0){{{this.state=966;this.assemblyItem()}}this.state=971;this._errHandler.sync(this);t=this._input.LA(1)}this.state=972;this.match(wi.T__16)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyItem(){let e=new Yn(this._ctx,this.state);this.enterRule(e,156,wi.RULE_assemblyItem);try{this.state=991;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,103,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=974;this.identifier()}break;case 2:this.enterOuterAlt(e,2);{this.state=975;this.assemblyBlock()}break;case 3:this.enterOuterAlt(e,3);{this.state=976;this.assemblyExpression()}break;case 4:this.enterOuterAlt(e,4);{this.state=977;this.assemblyLocalDefinition()}break;case 5:this.enterOuterAlt(e,5);{this.state=978;this.assemblyAssignment()}break;case 6:this.enterOuterAlt(e,6);{this.state=979;this.assemblyStackAssignment()}break;case 7:this.enterOuterAlt(e,7);{this.state=980;this.labelDefinition()}break;case 8:this.enterOuterAlt(e,8);{this.state=981;this.assemblySwitch()}break;case 9:this.enterOuterAlt(e,9);{this.state=982;this.assemblyFunctionDefinition()}break;case 10:this.enterOuterAlt(e,10);{this.state=983;this.assemblyFor()}break;case 11:this.enterOuterAlt(e,11);{this.state=984;this.assemblyIf()}break;case 12:this.enterOuterAlt(e,12);{this.state=985;this.match(wi.BreakKeyword)}break;case 13:this.enterOuterAlt(e,13);{this.state=986;this.match(wi.ContinueKeyword)}break;case 14:this.enterOuterAlt(e,14);{this.state=987;this.match(wi.LeaveKeyword)}break;case 15:this.enterOuterAlt(e,15);{this.state=988;this.numberLiteral()}break;case 16:this.enterOuterAlt(e,16);{this.state=989;this.stringLiteral()}break;case 17:this.enterOuterAlt(e,17);{this.state=990;this.hexLiteral()}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyExpression(){let e=new Jn(this._ctx,this.state);this.enterRule(e,158,wi.RULE_assemblyExpression);try{this.state=996;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,104,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=993;this.assemblyCall()}break;case 2:this.enterOuterAlt(e,2);{this.state=994;this.assemblyLiteral()}break;case 3:this.enterOuterAlt(e,3);{this.state=995;this.assemblyMember()}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyMember(){let e=new Qn(this._ctx,this.state);this.enterRule(e,160,wi.RULE_assemblyMember);try{this.enterOuterAlt(e,1);{this.state=998;this.identifier();this.state=999;this.match(wi.T__44);this.state=1e3;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyCall(){let e=new Xn(this._ctx,this.state);this.enterRule(e,162,wi.RULE_assemblyCall);let t;try{this.enterOuterAlt(e,1);{this.state=1006;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,105,this._ctx)){case 1:{this.state=1002;this.match(wi.T__58)}break;case 2:{this.state=1003;this.match(wi.T__43)}break;case 3:{this.state=1004;this.match(wi.T__65)}break;case 4:{this.state=1005;this.identifier()}break}this.state=1020;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,108,this._ctx)){case 1:{this.state=1008;this.match(wi.T__22);this.state=1010;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__58-44|1<<wi.T__61-44|1<<wi.T__65-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.BooleanLiteral-95|1<<wi.DecimalNumber-95|1<<wi.HexNumber-95|1<<wi.HexLiteralFragment-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||(t-127&~31)===0&&(1<<t-127&(1<<wi.ReceiveKeyword-127|1<<wi.Identifier-127|1<<wi.StringLiteralFragment-127))!==0){{this.state=1009;this.assemblyExpression()}}this.state=1016;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=1012;this.match(wi.T__15);this.state=1013;this.assemblyExpression()}}this.state=1018;this._errHandler.sync(this);t=this._input.LA(1)}this.state=1019;this.match(wi.T__23)}break}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyLocalDefinition(){let e=new es(this._ctx,this.state);this.enterRule(e,164,wi.RULE_assemblyLocalDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=1022;this.match(wi.T__87);this.state=1023;this.assemblyIdentifierOrList();this.state=1026;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__88){{this.state=1024;this.match(wi.T__88);this.state=1025;this.assemblyExpression()}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyAssignment(){let e=new ts(this._ctx,this.state);this.enterRule(e,166,wi.RULE_assemblyAssignment);try{this.enterOuterAlt(e,1);{this.state=1028;this.assemblyIdentifierOrList();this.state=1029;this.match(wi.T__88);this.state=1030;this.assemblyExpression()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyIdentifierOrList(){let e=new rs(this._ctx,this.state);this.enterRule(e,168,wi.RULE_assemblyIdentifierOrList);try{this.state=1039;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,110,this._ctx)){case 1:this.enterOuterAlt(e,1);{this.state=1032;this.identifier()}break;case 2:this.enterOuterAlt(e,2);{this.state=1033;this.assemblyMember()}break;case 3:this.enterOuterAlt(e,3);{this.state=1034;this.assemblyIdentifierList()}break;case 4:this.enterOuterAlt(e,4);{this.state=1035;this.match(wi.T__22);this.state=1036;this.assemblyIdentifierList();this.state=1037;this.match(wi.T__23)}break}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyIdentifierList(){let e=new ns(this._ctx,this.state);this.enterRule(e,170,wi.RULE_assemblyIdentifierList);let t;try{this.enterOuterAlt(e,1);{this.state=1041;this.identifier();this.state=1046;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=1042;this.match(wi.T__15);this.state=1043;this.identifier()}}this.state=1048;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyStackAssignment(){let e=new ss(this._ctx,this.state);this.enterRule(e,172,wi.RULE_assemblyStackAssignment);try{this.enterOuterAlt(e,1);{this.state=1049;this.assemblyExpression();this.state=1050;this.match(wi.T__89);this.state=1051;this.identifier()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}labelDefinition(){let e=new os(this._ctx,this.state);this.enterRule(e,174,wi.RULE_labelDefinition);try{this.enterOuterAlt(e,1);{this.state=1053;this.identifier();this.state=1054;this.match(wi.T__69)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblySwitch(){let e=new as(this._ctx,this.state);this.enterRule(e,176,wi.RULE_assemblySwitch);let t;try{this.enterOuterAlt(e,1);{this.state=1056;this.match(wi.T__90);this.state=1057;this.assemblyExpression();this.state=1061;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__91||t===wi.T__92){{{this.state=1058;this.assemblyCase()}}this.state=1063;this._errHandler.sync(this);t=this._input.LA(1)}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyCase(){let e=new ls(this._ctx,this.state);this.enterRule(e,178,wi.RULE_assemblyCase);try{this.state=1070;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__91:this.enterOuterAlt(e,1);{this.state=1064;this.match(wi.T__91);this.state=1065;this.assemblyLiteral();this.state=1066;this.assemblyBlock()}break;case wi.T__92:this.enterOuterAlt(e,2);{this.state=1068;this.match(wi.T__92);this.state=1069;this.assemblyBlock()}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyFunctionDefinition(){let e=new us(this._ctx,this.state);this.enterRule(e,180,wi.RULE_assemblyFunctionDefinition);let t;try{this.enterOuterAlt(e,1);{this.state=1072;this.match(wi.T__37);this.state=1073;this.identifier();this.state=1074;this.match(wi.T__22);this.state=1076;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier){{this.state=1075;this.assemblyIdentifierList()}}this.state=1078;this.match(wi.T__23);this.state=1080;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__93){{this.state=1079;this.assemblyFunctionReturns()}}this.state=1082;this.assemblyBlock()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyFunctionReturns(){let e=new cs(this._ctx,this.state);this.enterRule(e,182,wi.RULE_assemblyFunctionReturns);try{this.enterOuterAlt(e,1);{{this.state=1084;this.match(wi.T__93);this.state=1085;this.assemblyIdentifierList()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyFor(){let e=new hs(this._ctx,this.state);this.enterRule(e,184,wi.RULE_assemblyFor);try{this.enterOuterAlt(e,1);{this.state=1087;this.match(wi.T__26);this.state=1090;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__14:{this.state=1088;this.assemblyBlock()}break;case wi.T__13:case wi.T__24:case wi.T__43:case wi.T__49:case wi.T__58:case wi.T__61:case wi.T__65:case wi.T__94:case wi.BooleanLiteral:case wi.DecimalNumber:case wi.HexNumber:case wi.HexLiteralFragment:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:case wi.StringLiteralFragment:{this.state=1089;this.assemblyExpression()}break;default:throw new mi.NoViableAltException(this)}this.state=1092;this.assemblyExpression();this.state=1095;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__14:{this.state=1093;this.assemblyBlock()}break;case wi.T__13:case wi.T__24:case wi.T__43:case wi.T__49:case wi.T__58:case wi.T__61:case wi.T__65:case wi.T__94:case wi.BooleanLiteral:case wi.DecimalNumber:case wi.HexNumber:case wi.HexLiteralFragment:case wi.LeaveKeyword:case wi.PayableKeyword:case wi.GlobalKeyword:case wi.ConstructorKeyword:case wi.ReceiveKeyword:case wi.Identifier:case wi.StringLiteralFragment:{this.state=1094;this.assemblyExpression()}break;default:throw new mi.NoViableAltException(this)}this.state=1097;this.assemblyBlock()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyIf(){let e=new ds(this._ctx,this.state);this.enterRule(e,186,wi.RULE_assemblyIf);try{this.enterOuterAlt(e,1);{this.state=1099;this.match(wi.T__50);this.state=1100;this.assemblyExpression();this.state=1101;this.assemblyBlock()}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}assemblyLiteral(){let e=new fs(this._ctx,this.state);this.enterRule(e,188,wi.RULE_assemblyLiteral);try{this.state=1108;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.StringLiteralFragment:this.enterOuterAlt(e,1);{this.state=1103;this.stringLiteral()}break;case wi.DecimalNumber:this.enterOuterAlt(e,2);{this.state=1104;this.match(wi.DecimalNumber)}break;case wi.HexNumber:this.enterOuterAlt(e,3);{this.state=1105;this.match(wi.HexNumber)}break;case wi.HexLiteralFragment:this.enterOuterAlt(e,4);{this.state=1106;this.hexLiteral()}break;case wi.BooleanLiteral:this.enterOuterAlt(e,5);{this.state=1107;this.match(wi.BooleanLiteral)}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}tupleExpression(){let e=new ps(this._ctx,this.state);this.enterRule(e,190,wi.RULE_tupleExpression);let t;try{this.state=1136;this._errHandler.sync(this);switch(this._input.LA(1)){case wi.T__22:this.enterOuterAlt(e,1);{this.state=1110;this.match(wi.T__22);{this.state=1112;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=1111;this.expression(0)}}this.state=1120;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=1114;this.match(wi.T__15);this.state=1116;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=1115;this.expression(0)}}}}this.state=1122;this._errHandler.sync(this);t=this._input.LA(1)}}this.state=1123;this.match(wi.T__23)}break;case wi.T__41:this.enterOuterAlt(e,2);{this.state=1124;this.match(wi.T__41);this.state=1133;this._errHandler.sync(this);t=this._input.LA(1);if((t&~31)===0&&(1<<t&(1<<wi.T__5|1<<wi.T__13|1<<wi.T__22|1<<wi.T__24|1<<wi.T__29|1<<wi.T__30))!==0||(t-38&~31)===0&&(1<<t-38&(1<<wi.T__37-38|1<<wi.T__41-38|1<<wi.T__43-38|1<<wi.T__45-38|1<<wi.T__49-38|1<<wi.T__61-38|1<<wi.T__62-38|1<<wi.T__63-38|1<<wi.T__64-38|1<<wi.T__65-38|1<<wi.T__66-38|1<<wi.T__67-38|1<<wi.T__68-38))!==0||(t-71&~31)===0&&(1<<t-71&(1<<wi.T__70-71|1<<wi.T__71-71|1<<wi.T__94-71|1<<wi.Int-71|1<<wi.Uint-71|1<<wi.Byte-71|1<<wi.Fixed-71|1<<wi.Ufixed-71|1<<wi.BooleanLiteral-71))!==0||(t-103&~31)===0&&(1<<t-103&(1<<wi.DecimalNumber-103|1<<wi.HexNumber-103|1<<wi.HexLiteralFragment-103|1<<wi.LeaveKeyword-103|1<<wi.PayableKeyword-103|1<<wi.TypeKeyword-103|1<<wi.GlobalKeyword-103|1<<wi.ConstructorKeyword-103|1<<wi.ReceiveKeyword-103|1<<wi.Identifier-103|1<<wi.StringLiteralFragment-103))!==0){{this.state=1125;this.expression(0);this.state=1130;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=1126;this.match(wi.T__15);this.state=1127;this.expression(0)}}this.state=1132;this._errHandler.sync(this);t=this._input.LA(1)}}}this.state=1135;this.match(wi.T__42)}break;default:throw new mi.NoViableAltException(this)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}numberLiteral(){let e=new ms(this._ctx,this.state);this.enterRule(e,192,wi.RULE_numberLiteral);let t;try{this.enterOuterAlt(e,1);{this.state=1138;t=this._input.LA(1);if(!(t===wi.DecimalNumber||t===wi.HexNumber)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}this.state=1140;this._errHandler.sync(this);switch(this.interpreter.adaptivePredict(this._input,125,this._ctx)){case 1:{this.state=1139;this.match(wi.NumberUnit)}break}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}identifier(){let e=new gs(this._ctx,this.state);this.enterRule(e,194,wi.RULE_identifier);let t;try{this.enterOuterAlt(e,1);{this.state=1142;t=this._input.LA(1);if(!(t===wi.T__13||t===wi.T__24||(t-44&~31)===0&&(1<<t-44&(1<<wi.T__43-44|1<<wi.T__49-44|1<<wi.T__61-44))!==0||(t-95&~31)===0&&(1<<t-95&(1<<wi.T__94-95|1<<wi.LeaveKeyword-95|1<<wi.PayableKeyword-95|1<<wi.GlobalKeyword-95|1<<wi.ConstructorKeyword-95))!==0||t===wi.ReceiveKeyword||t===wi.Identifier)){this._errHandler.recoverInline(this)}else{if(this._input.LA(1)===bi.Token.EOF){this.matchedEOF=true}this._errHandler.reportMatch(this);this.consume()}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}hexLiteral(){let e=new ys(this._ctx,this.state);this.enterRule(e,196,wi.RULE_hexLiteral);try{let t;this.enterOuterAlt(e,1);{this.state=1145;this._errHandler.sync(this);t=1;do{switch(t){case 1:{{this.state=1144;this.match(wi.HexLiteralFragment)}}break;default:throw new mi.NoViableAltException(this)}this.state=1147;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,126,this._ctx)}while(t!==2&&t!==di.ATN.INVALID_ALT_NUMBER)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}overrideSpecifier(){let e=new _s(this._ctx,this.state);this.enterRule(e,198,wi.RULE_overrideSpecifier);let t;try{this.enterOuterAlt(e,1);{this.state=1149;this.match(wi.T__95);this.state=1161;this._errHandler.sync(this);t=this._input.LA(1);if(t===wi.T__22){{this.state=1150;this.match(wi.T__22);this.state=1151;this.userDefinedTypeName();this.state=1156;this._errHandler.sync(this);t=this._input.LA(1);while(t===wi.T__15){{{this.state=1152;this.match(wi.T__15);this.state=1153;this.userDefinedTypeName()}}this.state=1158;this._errHandler.sync(this);t=this._input.LA(1)}this.state=1159;this.match(wi.T__23)}}}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}stringLiteral(){let e=new vs(this._ctx,this.state);this.enterRule(e,200,wi.RULE_stringLiteral);try{let t;this.enterOuterAlt(e,1);{this.state=1164;this._errHandler.sync(this);t=1;do{switch(t){case 1:{{this.state=1163;this.match(wi.StringLiteralFragment)}}break;default:throw new mi.NoViableAltException(this)}this.state=1166;this._errHandler.sync(this);t=this.interpreter.adaptivePredict(this._input,129,this._ctx)}while(t!==2&&t!==di.ATN.INVALID_ALT_NUMBER)}}catch(t){if(t instanceof vi.RecognitionException){e.exception=t;this._errHandler.reportError(this,t);this._errHandler.recover(this,t)}else{throw t}}finally{this.exitRule()}return e}sempred(e,t,r){switch(t){case 38:return this.typeName_sempred(e,r);case 70:return this.expression_sempred(e,r)}return true}typeName_sempred(e,t){switch(t){case 0:return this.precpred(this._ctx,3)}return true}expression_sempred(e,t){switch(t){case 1:return this.precpred(this._ctx,14);case 2:return this.precpred(this._ctx,13);case 3:return this.precpred(this._ctx,12);case 4:return this.precpred(this._ctx,11);case 5:return this.precpred(this._ctx,10);case 6:return this.precpred(this._ctx,9);case 7:return this.precpred(this._ctx,8);case 8:return this.precpred(this._ctx,7);case 9:return this.precpred(this._ctx,6);case 10:return this.precpred(this._ctx,5);case 11:return this.precpred(this._ctx,4);case 12:return this.precpred(this._ctx,3);case 13:return this.precpred(this._ctx,2);case 14:return this.precpred(this._ctx,27);case 15:return this.precpred(this._ctx,25);case 16:return this.precpred(this._ctx,24);case 17:return this.precpred(this._ctx,23);case 18:return this.precpred(this._ctx,22);case 19:return this.precpred(this._ctx,21)}return true}static get _ATN(){if(!wi.__ATN){wi.__ATN=(new fi.ATNDeserializer).deserialize(Ti.toCharArray(wi._serializedATN))}return wi.__ATN}};var Si=wi;Si.T__0=1;Si.T__1=2;Si.T__2=3;Si.T__3=4;Si.T__4=5;Si.T__5=6;Si.T__6=7;Si.T__7=8;Si.T__8=9;Si.T__9=10;Si.T__10=11;Si.T__11=12;Si.T__12=13;Si.T__13=14;Si.T__14=15;Si.T__15=16;Si.T__16=17;Si.T__17=18;Si.T__18=19;Si.T__19=20;Si.T__20=21;Si.T__21=22;Si.T__22=23;Si.T__23=24;Si.T__24=25;Si.T__25=26;Si.T__26=27;Si.T__27=28;Si.T__28=29;Si.T__29=30;Si.T__30=31;Si.T__31=32;Si.T__32=33;Si.T__33=34;Si.T__34=35;Si.T__35=36;Si.T__36=37;Si.T__37=38;Si.T__38=39;Si.T__39=40;Si.T__40=41;Si.T__41=42;Si.T__42=43;Si.T__43=44;Si.T__44=45;Si.T__45=46;Si.T__46=47;Si.T__47=48;Si.T__48=49;Si.T__49=50;Si.T__50=51;Si.T__51=52;Si.T__52=53;Si.T__53=54;Si.T__54=55;Si.T__55=56;Si.T__56=57;Si.T__57=58;Si.T__58=59;Si.T__59=60;Si.T__60=61;Si.T__61=62;Si.T__62=63;Si.T__63=64;Si.T__64=65;Si.T__65=66;Si.T__66=67;Si.T__67=68;Si.T__68=69;Si.T__69=70;Si.T__70=71;Si.T__71=72;Si.T__72=73;Si.T__73=74;Si.T__74=75;Si.T__75=76;Si.T__76=77;Si.T__77=78;Si.T__78=79;Si.T__79=80;Si.T__80=81;Si.T__81=82;Si.T__82=83;Si.T__83=84;Si.T__84=85;Si.T__85=86;Si.T__86=87;Si.T__87=88;Si.T__88=89;Si.T__89=90;Si.T__90=91;Si.T__91=92;Si.T__92=93;Si.T__93=94;Si.T__94=95;Si.T__95=96;Si.Int=97;Si.Uint=98;Si.Byte=99;Si.Fixed=100;Si.Ufixed=101;Si.BooleanLiteral=102;Si.DecimalNumber=103;Si.HexNumber=104;Si.NumberUnit=105;Si.HexLiteralFragment=106;Si.ReservedKeyword=107;Si.AnonymousKeyword=108;Si.BreakKeyword=109;Si.ConstantKeyword=110;Si.ImmutableKeyword=111;Si.ContinueKeyword=112;Si.LeaveKeyword=113;Si.ExternalKeyword=114;Si.IndexedKeyword=115;Si.InternalKeyword=116;Si.PayableKeyword=117;Si.PrivateKeyword=118;Si.PublicKeyword=119;Si.VirtualKeyword=120;Si.PureKeyword=121;Si.TypeKeyword=122;Si.ViewKeyword=123;Si.GlobalKeyword=124;Si.ConstructorKeyword=125;Si.FallbackKeyword=126;Si.ReceiveKeyword=127;Si.Identifier=128;Si.StringLiteralFragment=129;Si.VersionLiteral=130;Si.WS=131;Si.COMMENT=132;Si.LINE_COMMENT=133;Si.RULE_sourceUnit=0;Si.RULE_pragmaDirective=1;Si.RULE_pragmaName=2;Si.RULE_pragmaValue=3;Si.RULE_version=4;Si.RULE_versionOperator=5;Si.RULE_versionConstraint=6;Si.RULE_importDeclaration=7;Si.RULE_importDirective=8;Si.RULE_importPath=9;Si.RULE_contractDefinition=10;Si.RULE_inheritanceSpecifier=11;Si.RULE_contractPart=12;Si.RULE_stateVariableDeclaration=13;Si.RULE_fileLevelConstant=14;Si.RULE_customErrorDefinition=15;Si.RULE_typeDefinition=16;Si.RULE_usingForDeclaration=17;Si.RULE_usingForObject=18;Si.RULE_usingForObjectDirective=19;Si.RULE_userDefinableOperators=20;Si.RULE_structDefinition=21;Si.RULE_modifierDefinition=22;Si.RULE_modifierInvocation=23;Si.RULE_functionDefinition=24;Si.RULE_functionDescriptor=25;Si.RULE_returnParameters=26;Si.RULE_modifierList=27;Si.RULE_eventDefinition=28;Si.RULE_enumValue=29;Si.RULE_enumDefinition=30;Si.RULE_parameterList=31;Si.RULE_parameter=32;Si.RULE_eventParameterList=33;Si.RULE_eventParameter=34;Si.RULE_functionTypeParameterList=35;Si.RULE_functionTypeParameter=36;Si.RULE_variableDeclaration=37;Si.RULE_typeName=38;Si.RULE_userDefinedTypeName=39;Si.RULE_mappingKey=40;Si.RULE_mapping=41;Si.RULE_mappingKeyName=42;Si.RULE_mappingValueName=43;Si.RULE_functionTypeName=44;Si.RULE_storageLocation=45;Si.RULE_stateMutability=46;Si.RULE_block=47;Si.RULE_statement=48;Si.RULE_expressionStatement=49;Si.RULE_ifStatement=50;Si.RULE_tryStatement=51;Si.RULE_catchClause=52;Si.RULE_whileStatement=53;Si.RULE_simpleStatement=54;Si.RULE_uncheckedStatement=55;Si.RULE_forStatement=56;Si.RULE_inlineAssemblyStatement=57;Si.RULE_inlineAssemblyStatementFlag=58;Si.RULE_doWhileStatement=59;Si.RULE_continueStatement=60;Si.RULE_breakStatement=61;Si.RULE_returnStatement=62;Si.RULE_throwStatement=63;Si.RULE_emitStatement=64;Si.RULE_revertStatement=65;Si.RULE_variableDeclarationStatement=66;Si.RULE_variableDeclarationList=67;Si.RULE_identifierList=68;Si.RULE_elementaryTypeName=69;Si.RULE_expression=70;Si.RULE_primaryExpression=71;Si.RULE_expressionList=72;Si.RULE_nameValueList=73;Si.RULE_nameValue=74;Si.RULE_functionCallArguments=75;Si.RULE_functionCall=76;Si.RULE_assemblyBlock=77;Si.RULE_assemblyItem=78;Si.RULE_assemblyExpression=79;Si.RULE_assemblyMember=80;Si.RULE_assemblyCall=81;Si.RULE_assemblyLocalDefinition=82;Si.RULE_assemblyAssignment=83;Si.RULE_assemblyIdentifierOrList=84;Si.RULE_assemblyIdentifierList=85;Si.RULE_assemblyStackAssignment=86;Si.RULE_labelDefinition=87;Si.RULE_assemblySwitch=88;Si.RULE_assemblyCase=89;Si.RULE_assemblyFunctionDefinition=90;Si.RULE_assemblyFunctionReturns=91;Si.RULE_assemblyFor=92;Si.RULE_assemblyIf=93;Si.RULE_assemblyLiteral=94;Si.RULE_tupleExpression=95;Si.RULE_numberLiteral=96;Si.RULE_identifier=97;Si.RULE_hexLiteral=98;Si.RULE_overrideSpecifier=99;Si.RULE_stringLiteral=100;Si.ruleNames=["sourceUnit","pragmaDirective","pragmaName","pragmaValue","version","versionOperator","versionConstraint","importDeclaration","importDirective","importPath","contractDefinition","inheritanceSpecifier","contractPart","stateVariableDeclaration","fileLevelConstant","customErrorDefinition","typeDefinition","usingForDeclaration","usingForObject","usingForObjectDirective","userDefinableOperators","structDefinition","modifierDefinition","modifierInvocation","functionDefinition","functionDescriptor","returnParameters","modifierList","eventDefinition","enumValue","enumDefinition","parameterList","parameter","eventParameterList","eventParameter","functionTypeParameterList","functionTypeParameter","variableDeclaration","typeName","userDefinedTypeName","mappingKey","mapping","mappingKeyName","mappingValueName","functionTypeName","storageLocation","stateMutability","block","statement","expressionStatement","ifStatement","tryStatement","catchClause","whileStatement","simpleStatement","uncheckedStatement","forStatement","inlineAssemblyStatement","inlineAssemblyStatementFlag","doWhileStatement","continueStatement","breakStatement","returnStatement","throwStatement","emitStatement","revertStatement","variableDeclarationStatement","variableDeclarationList","identifierList","elementaryTypeName","expression","primaryExpression","expressionList","nameValueList","nameValue","functionCallArguments","functionCall","assemblyBlock","assemblyItem","assemblyExpression","assemblyMember","assemblyCall","assemblyLocalDefinition","assemblyAssignment","assemblyIdentifierOrList","assemblyIdentifierList","assemblyStackAssignment","labelDefinition","assemblySwitch","assemblyCase","assemblyFunctionDefinition","assemblyFunctionReturns","assemblyFor","assemblyIf","assemblyLiteral","tupleExpression","numberLiteral","identifier","hexLiteral","overrideSpecifier","stringLiteral"];Si._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];Si._SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];Si.VOCABULARY=new xi.VocabularyImpl(wi._LITERAL_NAMES,wi._SYMBOLIC_NAMES,[]);Si._serializedATNSegments=3;Si._serializedATNSegment0='줝쪺֍꾺体؇쉁ғ\t\t\t\t\t\t\b\t\b\t\t\t\n\t\n\v\t\v\f\t\f\r\t\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t !\t!"\t"#\t#$\t$%\t%&\t&\'\t\'(\t()\t)*\t*+\t+,\t,-\t-.\t./\t/0\t01\t12\t23\t34\t45\t56\t67\t78\t89\t9:\t:;\t;<\t<=\t=>\t>?\t?@\t@A\tAB\tBC\tCD\tDE\tEF\tFG\tGH\tHI\tIJ\tJK\tKL\tLM\tMN\tNO\tOP\tPQ\tQR\tRS\tST\tTU\tUV\tVW\tWX\tXY\tYZ\tZ[\t[\\\t\\]\t]^\t^_\t_`\t`a\tab\tbc\tcd\tde\tef\tf×\n\fÚ\vè\nì\nï\n\fò\v\b\b÷\n\b\b\b\bû\n\b\b\bþ\n\b\t\t\t\tă\n\t\n\n\n\n\nĉ\n\n\n\n\n\n\n\nĐ\n\n\n\n\nĔ\n\n\n\n\n\n\n\n\n\n\n\nğ\n\n\f\n\nĢ\v\n\n\n\n\n\n\nĩ\n\n\v\v\f\fĮ\n\f\f\f\f\f\f\f\fĶ\n\f\f\f\fĹ\v\f\fĻ\n\f\f\f\fĿ\n\f\f\f\fł\v\f\f\f\r\r\r\rʼn\n\r\r\rŌ\n\rŗ\nŠ\n\fţ\vŨ\nƃ\nƆ\nƏ\n\fƒ\vƖ\nƛ\nƧ\n\fƪ\vƬ\nƳ\nƷ\n\fƺ\vƾ\nǃ\ndž\nnj\nǐ\nǔ\nǙ\nǦ\n\fǩ\vǯ\n ǹ\n ǽ\n \f Ȁ\v !!!!!Ȉ\n!\f!!ȋ\v!!ȍ\n!!!"""ȓ\n"""Ȗ\n"#####Ȝ\n#\f##ȟ\v##ȡ\n###$$$ȧ\n$$$Ȫ\n$%%%%%Ȱ\n%\f%%ȳ\v%%ȵ\n%%%&&&Ȼ\n&\'\'\'ȿ\n\'\'\'((((((((Ɋ\n(((((ɏ\n(((ɒ\n(\f((ɕ\v())))ɚ\n)\f))ɝ\v)***ɡ\n*+++++ɧ\n+++++ɬ\n+++,,--......ɹ\n.\f..ɼ\v....ʀ\n.//00111ʈ\n1\f11ʋ\v1112222222222222222ʞ\n233344444444ʪ\n45555ʯ\n5555ʳ\n5\r55ʴ666ʹ\n666ʼ\n666777777888ˈ\n8999:::::ˑ\n::::˕\n:::˘\n::::;;;˟\n;;;;;;˥\n;;;<<========>>>???@@@˻\n@@@AAABBBBCCCCDDDDDDDD̑\nDDDD̕\nDDDEE̚\nEEEE̞\nEE̠\nE\fEẸ\vEFFF̧\nFFF̪\nF\fFF̭\vFFF̰\nFFFGGHHHHHHHHHHHHHHHHHHH͈\nHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH;\nHHHH\nHHHHHHHHHHHHHHHHΒ\nH\fHHΕ\vHIIIIIIIIIIΠ\nIJJJJΥ\nJ\fJJΨ\vJKKKKέ\nK\fKKΰ\vKKKγ\nKLLLLMMMλ\nMMMMο\nMMρ\nMNNNNNOOOϊ\nO\fOOύ\vOOOPPPPPPPPPPPPPPPPPPϢ\nPQQQQϧ\nQRRRRSSSSSϱ\nSSSSϵ\nSSSSϹ\nS\fSSϼ\vSSSϿ\nSTTTTTЅ\nTUUUUVVVVVVVVВ\nVWWWWЗ\nW\fWWК\vWXXXXYYYZZZZЦ\nZ\fZZЩ\vZ[[[[[[[б\n[\\\\\\\\\\з\n\\\\\\\\л\n\\\\\\]]]^^^^х\n^^^^^ъ\n^^^____``````ї\n`aaaћ\naaaaџ\naaѡ\na\faaѤ\vaaaaaaaѫ\na\faaѮ\vaaѰ\naaaѳ\nabbbѷ\nbccddѼ\nd\rddѽeeeeee҅\ne\fee҈\veeeeҌ\neffҏ\nf\rffҐfNg\b\n\f "$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~ ¢¤¦¨ª¬®°²´¶¸º¼¾ÀÂÄÆÈÊ\r\f%24ppww{{}}..ADcgEF !"#LM\t\f$%\r\rPYij\f..44@@aassww~ԓØÝâ\bç\né\fóýÿĨĪĭŅŖŘū Ų"ŷ$Ž&ƕ(Ɨ*Ɯ,ƞ.Ư0ƿ2LJ4ǘ6ǚ8ǧ:Ǫ<Dz>Ǵ@ȃBȐDȗFȤHȫJȸLȼNɉPɖRɠTɢVɯXɱZɳ\\ʁ^ʃ`ʅbʝdʟfʢhʫjʶlʿnˇpˉrˌt˜v˨x˪z˲|˵~˸˾̙̤̳͇́̅̐ΟΡΩδπςχϡ Ϧ¢Ϩ¤ϰ¦Ѐ¨ІªБ¬Г®Л°П²Т´а¶в¸оºс¼э¾іÀѲÂѴÄѸÆѻÈѿÊҎÌ×Í×\nÎ×\fÏ×> Ð×,Ñ×2Ò×Ó× Ô×"Õ×$ÖÌÖÍÖÎÖÏÖÐÖÑÖÒÖÓÖÔÖÕ×ÚØÖØÙÙÛÚØÛÜÜÝÞÞßßà\bàááâãÄcãäèåè\næèHçäçåçæè\téð\bêìëêëììííï\bîëïòðîðññ\vòðóô\tô\rõ÷\föõö÷÷øøþùû\fúùúûûüüþiýöýúþÿĂÄcĀāāăÄcĂĀĂă㥹ąĈ\vĆććĉÄcĈĆĈĉĉĊĊċċĩČďčĐĎĐÄcďčďĎĐēđĒĒĔÄcēđēĔĔĕĕĖĖė\vėĘĘĩęĚĚěěĠ\tĜĝĝğ\tĞĜğĢĠĞĠġġģĢĠģĤĤĥĥĦ\vĦħħĩĨĄĨČĨęĩĪīīĬĮĭĬĭĮĮįįİ\tİĺÄcıIJIJķ\rijĴĴĶ\rĵijĶĹķĵķĸĸĻĹķĺıĺĻĻļļŀĽĿľĽĿłŀľŀŁŁŃłŀŃńńŅŋP)ņňŇʼnJňŇňʼnʼnŊŊŌŋņŋŌŌōŗŎŗ$ŏŗ,Őŗ.őŗ2Œŗ:œŗ> Ŕŗ ŕŗ"ŖōŖŎŖŏŖŐŖőŖŒŖœŖŔŖŕŗŘšN(řŠyŚŠvśŠxŜŠpŝŠqŞŠÈeşřşŚşśşŜşŝşŞŠţšşšŢŢŤţšŤŧÄcťŦ\rŦŨHŧťŧŨŨũũŪŪūŬN(ŬŭpŭŮÄcŮů\růŰHŰűűŲųųŴÄcŴŵ@!ŵŶŶ!ŷŸ|ŸŹÄcŹźźŻGŻżż#Žžžſ&ſƂƀƃƁƃN(ƂƀƂƁƃƅƄƆ~ƅƄƅƆƆƇƇƈƈ%ƉƖP)ƊƋƋƐ(ƌƍƍƏ(ƎƌƏƒƐƎƐƑƑƓƒƐƓƔƔƖƕƉƕƊƖ\'ƗƚP)Ƙƙƙƛ*ƚƘƚƛƛ)ƜƝ\tƝ+ƞƟ&ƟƠÄcƠƫơ';Si._serializedATNSegment1="ƢL'ƢƨƣƤL'ƤƥƥƧƦƣƧƪƨƦƨƩƩƬƪƨƫơƫƬƬƭƭƮƮ-Ưư'ưƲÄcƱƳ@!ƲƱƲƳƳƸƴƷzƵƷÈeƶƴƶƵƷƺƸƶƸƹƹƽƺƸƻƾƼƾ`1ƽƻƽƼƾ/ƿDžÄcǀǂǁǃJǂǁǂǃǃDŽDŽdžDžǀDždždž1LJLj4Ljlj@!ljNj8NJnj6NjNJNjnjnjǏǍǐǎǐ`1ǏǍǏǎǐ3ǑǓ(ǒǔÄcǓǒǓǔǔǙǕǙǖǙǗǙǘǑǘǕǘǖǘǗǙ5ǚǛ)Ǜǜ@!ǜ7ǝǦtǞǦyǟǦvǠǦxǡǦzǢǦ^0ǣǦ0ǤǦÈeǥǝǥǞǥǟǥǠǥǡǥǢǥǣǥǤǦǩǧǥǧǨǨ9ǩǧǪǫ*ǫǬÄcǬǮD#ǭǯnǮǭǮǯǯǰǰDZDZ;DzdzÄcdz=Ǵǵ+ǵǶÄcǶǸǷǹ<ǸǷǸǹǹǾǺǻǻǽ<ǼǺǽȀǾǼǾǿǿȁȀǾȁȂȂ?ȃȌȄȉB\"ȅȆȆȈB\"ȇȅȈȋȉȇȉȊȊȍȋȉȌȄȌȍȍȎȎȏȏAȐȒN(ȑȓ\\/ȒȑȒȓȓȕȔȖÄcȕȔȕȖȖCȗȠȘȝF$șȚȚȜF$țșȜȟȝțȝȞȞȡȟȝȠȘȠȡȡȢȢȣȣEȤȦN(ȥȧuȦȥȦȧȧȩȨȪÄcȩȨȩȪȪGȫȴȬȱJ&ȭȮȮȰJ&ȯȭȰȳȱȯȱȲȲȵȳȱȴȬȴȵȵȶȶȷȷIȸȺN(ȹȻ\\/ȺȹȺȻȻKȼȾN(Ƚȿ\\/ȾȽȾȿȿɀɀɁÄcɁMɂɃ\b(ɃɊGɄɊP)ɅɊT+ɆɊZ.ɇɈ.ɈɊwɉɂɉɄɉɅɉɆɉɇɊɓɋɌ\fɌɎ,ɍɏHɎɍɎɏɏɐɐɒ-ɑɋɒɕɓɑɓɔɔOɕɓɖɛÄcɗɘ/ɘɚÄcəɗɚɝɛəɛɜɜQɝɛɞɡGɟɡP)ɠɞɠɟɡSɢɣ0ɣɤɤɦR*ɥɧV,ɦɥɦɧɧɨɨɩ1ɩɫN(ɪɬX-ɫɪɫɬɬɭɭɮɮUɯɰÄcɰWɱɲÄcɲYɳɴ(ɴɺH%ɵɹvɶɹtɷɹ^0ɸɵɸɶɸɷɹɼɺɸɺɻɻɿɼɺɽɾ)ɾʀH%ɿɽɿʀʀ[ʁʂ\tʂ]ʃʄ\tʄ_ʅʉʆʈb2ʇʆʈʋʉʇʉʊʊʌʋʉʌʍʍaʎʞf4ʏʞh5ʐʞl7ʑʞr:ʒʞ`1ʓʞt;ʔʞx=ʕʞz>ʖʞ|?ʗʞ~@ʘʞAʙʞBʚʞn8ʛʞp9ʜʞCʝʎʝʏʝʐʝʑʝʒʝʓʝʔʝʕʝʖʝʗʝʘʝʙʝʚʝʛʝʜʞcʟʠHʠʡʡeʢʣ5ʣʤʤʥHʥʦʦʩb2ʧʨ6ʨʪb2ʩʧʩʪʪgʫʬ7ʬʮHʭʯ6ʮʭʮʯʯʰʰʲ`1ʱʳj6ʲʱʳʴʴʲʴʵʵiʶʻ8ʷʹÄcʸʷʸʹʹʺʺʼ@!ʻʸʻʼʼʽʽʾ`1ʾkʿˀ9ˀˁˁ˂H˂˃˃˄b2˄m˅ˈDˆˈd3ˇ˅ˇˆˈoˉˊ:ˊˋ`1ˋqˌˍˍːˎˑn8ˏˑːˎːˏˑ˔˒˕d3˓˕˔˒˔˓˕˗˖˘H˗˖˗˘˘˙˙˚˚˛b2˛s˜˞;˝˟˞˝˞˟˟ˤˠˡˡˢv<ˢˣˣ˥ˤˠˤ˥˥˦˦˧O˧u˨˩Êf˩w˪˫<˫ˬb2ˬ˭9˭ˮˮ˯H˯˰˰˱˱y˲˳r˳˴˴{˵˶o˶˷˷}˸˺=˹˻H˺˹˺˻˻˼˼˽˽˾˿>˿̀̀́̂?̂̃Ñ̄̄̅̆@̆̇Ṅ̈̈
̉̊Å̑F̋̑L'̌̍̍̎E̎̏̏̑̐̉̐̋̐̌̑̔̒̓\r̓̕H̖̖̗̗̘̔̒̔̕̕̚L'̡̛̙̘̙̝̜̞̚̚L'̡̡̢̢̡̧̛̝̜̝̞̞̠̟̠̣̟̣̤̫̥Äç̧̨̨̦̥̦̪̩̦̪̭̫̩̫̬̬̯̭̫̮̰Äc̴̯̮̯̰̰̱̱̲̲̳\t̴̵̶\bH̶̷G̷͈N(̸̹̹̺H̺̻̻͈̼̽\t\b͈̽H̾̿\t\t͈̿H̀́Í͈H͂̓J͈̓Ḧ́ͅ\b͈ͅH͈͆I̵̸͇͇͇̼͇͇͇͇͇͈̾̀͂̈́͆Γ͉͊\f͊͋K͋ΒH͍͌\f͍͎\t\n͎ΒH͏͐\f͐͑\t\t͑ΒH͓͒\f\r͓͔\t\v͔ΒH͕͖\f\f͖͗͗ΒH\r͙͘\f\v͙͚͚ΒH\f͛͜\f\n͜͝͝ΒH\v͟͞\f\t͟͠\t\f͠ΒH\n͢͡\f\bͣ͢\t\rͣΒH\tͤͥ\fͥͦNͦΒH\bͧͨ\fͨͩͩΒHͪͫ\fͫͬOͬͭHͭͮHͮͯHͯΒͰͱ\fͱͲ\tͲΒHͳʹ\fʹΒ\t\b͵Ͷ\fͶͷ,ͷH-Βͺͻ\fͻͽ,ͼ;Hͽͼͽ;;ͿͿHHΒ-΄΅\f΅Ά/ΆΒÄc·Έ\fΈΉΉΊKΊΒΌ\fΎΎΏMΏΐΐΒΑ͉Α͌Α͏Α͒Α͕Α͘Α͛Α͞Α͡ΑͤΑͧΑͪΑͰΑͳΑ͵ΑͺΑ΄Α·ΑΌΒΕΓΑΓΔΔΕΓΖΠhΗΠÂbΘΠÆdΙΠÊfΚΠÄcΛΠ|ΜΠwΝΠÀaΞΠN(ΟΖΟΗΟΘΟΙΟΚΟΛΟΜΟΝΟΞΠΡΦHΣΣΥHΤΥΨΦΤΦΧΧΨΦΩήLΪΫΫέLάΪέΰήάήίίβΰήαγβαβγγδεÄcεζHζηHηθκιλKκικλλμμρνοJξνξοορπθπξρςσHσττυMυφφχϋψϊPωψϊύϋωϋόόώύϋώϏϏϐϢÄcϑϢOϒϢ QϓϢ¦TϔϢ¨UϕϢ®XϖϢ°YϗϢ²ZϘϢ¶\\ϙϢº^ϚϢ¼_ϛϢoϜϢrϝϢsϞϢÂbϟϢÊfϠϢÆdϡϐϡϑϡϒϡϓϡϔϡϕϡϖϡϗϡϘϡϙϡϚϡϛϡϜϡϝϡϞϡϟϡϠϢϣϧ¤SϤϧ¾`ϥϧ¢RϦϣϦϤϦϥϧ¡ϨϩÄcϩϪ/ϪϫÄcϫ£Ϭϱ=ϭϱ.ϮϱDϯϱÄcϰϬϰϭϰϮϰϯϱϾϲϴϳϵ QϴϳϴϵϵϺ϶ϷϷϹ Qϸ϶ϹϼϺϸϺϻϻϽϼϺϽϿϾϲϾϿϿ¥ЀЁZЁЄªVЂЃ[ЃЅ QЄЂЄЅЅ§ІЇªVЇЈ[ЈЉ QЉ©ЊВÄcЋВ¢RЌВ¬WЍЎЎЏ¬WЏААВБЊБЋБЌБЍВ«ГИÄcДЕЕЗÄcЖДЗКИЖИЙЙКИЛМ QМН\\НОÄcО¯ПРÄcРСHС±ТУ]УЧ QФЦ´[ХФЦЩЧХЧШШ³ЩЧЪЫ^ЫЬ¾`ЬЭOЭбЮЯ_ЯбOаЪаЮбµвг(гдÄcджез¬Wжежззиикйл¸]кйкллммнOн·оп`пр";Si._serializedATNSegment2="¬Wр¹сфтхOух Qфтфухццщ QчъOшъ QщчщшъыыьOь»эю5юя QяѐOѐ½ёїÊfђїiѓїjєїÆdѕїhіёіђіѓієіѕї¿јњљћHњљњћћѢќўѝџHўѝўџџѡѠќѡѤѢѠѢѣѣѥѤѢѥѳѦѯ,ѧѬHѨѩѩѫHѪѨѫѮѬѪѬѭѭѰѮѬѯѧѯѰѰѱѱѳ-ѲјѲѦѳÁѴѶ\tѵѷkѶѵѶѷѷÃѸѹ\tѹÅѺѼlѻѺѼѽѽѻѽѾѾÇѿҋbҀҁҁ҆P)҂҃҃҅P)҄҂҅҈҆҄҆҇҇҉҈҆҉ҊҊҌҋҀҋҌҌÉҍҏҎҍҏҐҐҎҐґґËÖØçëðöúýĂĈďēĠĨĭķĺŀňŋŖşšŧƂƅƐƕƚƨƫƲƶƸƽǂDžNjǏǓǘǥǧǮǸǾȉȌȒȕȝȠȦȩȱȴȺȾɉɎɓɛɠɦɫɸɺɿʉʝʩʮʴʸʻˇː˔˗˞ˤ˺̡̙̝̦̫̯͇̐̔ͽΑΓΟΦήβκξπϋϡϦϰϴϺϾЄБИЧажкфщіњўѢѬѯѲѶѽ҆ҋҐ";Si._serializedATN=Ti.join([wi._serializedATNSegment0,wi._serializedATNSegment1,wi._serializedATNSegment2],"");var Ei=class extends yi.ParserRuleContext{EOF(){return this.getToken(Si.EOF,0)}pragmaDirective(e){if(e===void 0){return this.getRuleContexts(Ai)}else{return this.getRuleContext(e,Ai)}}importDirective(e){if(e===void 0){return this.getRuleContexts(Li)}else{return this.getRuleContext(e,Li)}}contractDefinition(e){if(e===void 0){return this.getRuleContexts(Mi)}else{return this.getRuleContext(e,Mi)}}enumDefinition(e){if(e===void 0){return this.getRuleContexts(tn)}else{return this.getRuleContext(e,tn)}}structDefinition(e){if(e===void 0){return this.getRuleContexts(Zi)}else{return this.getRuleContext(e,Zi)}}functionDefinition(e){if(e===void 0){return this.getRuleContexts(Wi)}else{return this.getRuleContext(e,Wi)}}fileLevelConstant(e){if(e===void 0){return this.getRuleContexts(Bi)}else{return this.getRuleContext(e,Bi)}}customErrorDefinition(e){if(e===void 0){return this.getRuleContexts(Ui)}else{return this.getRuleContext(e,Ui)}}typeDefinition(e){if(e===void 0){return this.getRuleContexts(Hi)}else{return this.getRuleContext(e,Hi)}}usingForDeclaration(e){if(e===void 0){return this.getRuleContexts(zi)}else{return this.getRuleContext(e,zi)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_sourceUnit}enterRule(e){if(e.enterSourceUnit){e.enterSourceUnit(this)}}exitRule(e){if(e.exitSourceUnit){e.exitSourceUnit(this)}}accept(e){if(e.visitSourceUnit){return e.visitSourceUnit(this)}else{return e.visitChildren(this)}}};var Ai=class extends yi.ParserRuleContext{pragmaName(){return this.getRuleContext(0,Ci)}pragmaValue(){return this.getRuleContext(0,Ni)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_pragmaDirective}enterRule(e){if(e.enterPragmaDirective){e.enterPragmaDirective(this)}}exitRule(e){if(e.exitPragmaDirective){e.exitPragmaDirective(this)}}accept(e){if(e.visitPragmaDirective){return e.visitPragmaDirective(this)}else{return e.visitChildren(this)}}};var Ci=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_pragmaName}enterRule(e){if(e.enterPragmaName){e.enterPragmaName(this)}}exitRule(e){if(e.exitPragmaName){e.exitPragmaName(this)}}accept(e){if(e.visitPragmaName){return e.visitPragmaName(this)}else{return e.visitChildren(this)}}};var Ni=class extends yi.ParserRuleContext{version(){return this.tryGetRuleContext(0,Oi)}expression(){return this.tryGetRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_pragmaValue}enterRule(e){if(e.enterPragmaValue){e.enterPragmaValue(this)}}exitRule(e){if(e.exitPragmaValue){e.exitPragmaValue(this)}}accept(e){if(e.visitPragmaValue){return e.visitPragmaValue(this)}else{return e.visitChildren(this)}}};var Oi=class extends yi.ParserRuleContext{versionConstraint(e){if(e===void 0){return this.getRuleContexts(ki)}else{return this.getRuleContext(e,ki)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_version}enterRule(e){if(e.enterVersion){e.enterVersion(this)}}exitRule(e){if(e.exitVersion){e.exitVersion(this)}}accept(e){if(e.visitVersion){return e.visitVersion(this)}else{return e.visitChildren(this)}}};var Ri=class extends yi.ParserRuleContext{constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_versionOperator}enterRule(e){if(e.enterVersionOperator){e.enterVersionOperator(this)}}exitRule(e){if(e.exitVersionOperator){e.exitVersionOperator(this)}}accept(e){if(e.visitVersionOperator){return e.visitVersionOperator(this)}else{return e.visitChildren(this)}}};var ki=class extends yi.ParserRuleContext{VersionLiteral(){return this.tryGetToken(Si.VersionLiteral,0)}versionOperator(){return this.tryGetRuleContext(0,Ri)}DecimalNumber(){return this.tryGetToken(Si.DecimalNumber,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_versionConstraint}enterRule(e){if(e.enterVersionConstraint){e.enterVersionConstraint(this)}}exitRule(e){if(e.exitVersionConstraint){e.exitVersionConstraint(this)}}accept(e){if(e.visitVersionConstraint){return e.visitVersionConstraint(this)}else{return e.visitChildren(this)}}};var Pi=class extends yi.ParserRuleContext{identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_importDeclaration}enterRule(e){if(e.enterImportDeclaration){e.enterImportDeclaration(this)}}exitRule(e){if(e.exitImportDeclaration){e.exitImportDeclaration(this)}}accept(e){if(e.visitImportDeclaration){return e.visitImportDeclaration(this)}else{return e.visitChildren(this)}}};var Li=class extends yi.ParserRuleContext{importPath(){return this.getRuleContext(0,Ii)}identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}importDeclaration(e){if(e===void 0){return this.getRuleContexts(Pi)}else{return this.getRuleContext(e,Pi)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_importDirective}enterRule(e){if(e.enterImportDirective){e.enterImportDirective(this)}}exitRule(e){if(e.exitImportDirective){e.exitImportDirective(this)}}accept(e){if(e.visitImportDirective){return e.visitImportDirective(this)}else{return e.visitChildren(this)}}};var Ii=class extends yi.ParserRuleContext{StringLiteralFragment(){return this.getToken(Si.StringLiteralFragment,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_importPath}enterRule(e){if(e.enterImportPath){e.enterImportPath(this)}}exitRule(e){if(e.exitImportPath){e.exitImportPath(this)}}accept(e){if(e.visitImportPath){return e.visitImportPath(this)}else{return e.visitChildren(this)}}};var Mi=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}inheritanceSpecifier(e){if(e===void 0){return this.getRuleContexts(Di)}else{return this.getRuleContext(e,Di)}}contractPart(e){if(e===void 0){return this.getRuleContexts(Fi)}else{return this.getRuleContext(e,Fi)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_contractDefinition}enterRule(e){if(e.enterContractDefinition){e.enterContractDefinition(this)}}exitRule(e){if(e.exitContractDefinition){e.exitContractDefinition(this)}}accept(e){if(e.visitContractDefinition){return e.visitContractDefinition(this)}else{return e.visitChildren(this)}}};var Di=class extends yi.ParserRuleContext{userDefinedTypeName(){return this.getRuleContext(0,hn)}expressionList(){return this.tryGetRuleContext(0,Vn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_inheritanceSpecifier}enterRule(e){if(e.enterInheritanceSpecifier){e.enterInheritanceSpecifier(this)}}exitRule(e){if(e.exitInheritanceSpecifier){e.exitInheritanceSpecifier(this)}}accept(e){if(e.visitInheritanceSpecifier){return e.visitInheritanceSpecifier(this)}else{return e.visitChildren(this)}}};var Fi=class extends yi.ParserRuleContext{stateVariableDeclaration(){return this.tryGetRuleContext(0,ji)}usingForDeclaration(){return this.tryGetRuleContext(0,zi)}structDefinition(){return this.tryGetRuleContext(0,Zi)}modifierDefinition(){return this.tryGetRuleContext(0,Gi)}functionDefinition(){return this.tryGetRuleContext(0,Wi)}eventDefinition(){return this.tryGetRuleContext(0,Xi)}enumDefinition(){return this.tryGetRuleContext(0,tn)}customErrorDefinition(){return this.tryGetRuleContext(0,Ui)}typeDefinition(){return this.tryGetRuleContext(0,Hi)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_contractPart}enterRule(e){if(e.enterContractPart){e.enterContractPart(this)}}exitRule(e){if(e.exitContractPart){e.exitContractPart(this)}}accept(e){if(e.visitContractPart){return e.visitContractPart(this)}else{return e.visitChildren(this)}}};var ji=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}identifier(){return this.getRuleContext(0,gs)}PublicKeyword(e){if(e===void 0){return this.getTokens(Si.PublicKeyword)}else{return this.getToken(Si.PublicKeyword,e)}}InternalKeyword(e){if(e===void 0){return this.getTokens(Si.InternalKeyword)}else{return this.getToken(Si.InternalKeyword,e)}}PrivateKeyword(e){if(e===void 0){return this.getTokens(Si.PrivateKeyword)}else{return this.getToken(Si.PrivateKeyword,e)}}ConstantKeyword(e){if(e===void 0){return this.getTokens(Si.ConstantKeyword)}else{return this.getToken(Si.ConstantKeyword,e)}}ImmutableKeyword(e){if(e===void 0){return this.getTokens(Si.ImmutableKeyword)}else{return this.getToken(Si.ImmutableKeyword,e)}}overrideSpecifier(e){if(e===void 0){return this.getRuleContexts(_s)}else{return this.getRuleContext(e,_s)}}expression(){return this.tryGetRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_stateVariableDeclaration}enterRule(e){if(e.enterStateVariableDeclaration){e.enterStateVariableDeclaration(this)}}exitRule(e){if(e.exitStateVariableDeclaration){e.exitStateVariableDeclaration(this)}}accept(e){if(e.visitStateVariableDeclaration){return e.visitStateVariableDeclaration(this)}else{return e.visitChildren(this)}}};var Bi=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}ConstantKeyword(){return this.getToken(Si.ConstantKeyword,0)}identifier(){return this.getRuleContext(0,gs)}expression(){return this.getRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_fileLevelConstant}enterRule(e){if(e.enterFileLevelConstant){e.enterFileLevelConstant(this)}}exitRule(e){if(e.exitFileLevelConstant){e.exitFileLevelConstant(this)}}accept(e){if(e.visitFileLevelConstant){return e.visitFileLevelConstant(this)}else{return e.visitChildren(this)}}};var Ui=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}parameterList(){return this.getRuleContext(0,rn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_customErrorDefinition}enterRule(e){if(e.enterCustomErrorDefinition){e.enterCustomErrorDefinition(this)}}exitRule(e){if(e.exitCustomErrorDefinition){e.exitCustomErrorDefinition(this)}}accept(e){if(e.visitCustomErrorDefinition){return e.visitCustomErrorDefinition(this)}else{return e.visitChildren(this)}}};var Hi=class extends yi.ParserRuleContext{TypeKeyword(){return this.getToken(Si.TypeKeyword,0)}identifier(){return this.getRuleContext(0,gs)}elementaryTypeName(){return this.getRuleContext(0,Hn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_typeDefinition}enterRule(e){if(e.enterTypeDefinition){e.enterTypeDefinition(this)}}exitRule(e){if(e.exitTypeDefinition){e.exitTypeDefinition(this)}}accept(e){if(e.visitTypeDefinition){return e.visitTypeDefinition(this)}else{return e.visitChildren(this)}}};var zi=class extends yi.ParserRuleContext{usingForObject(){return this.getRuleContext(0,Ki)}typeName(){return this.tryGetRuleContext(0,cn)}GlobalKeyword(){return this.tryGetToken(Si.GlobalKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_usingForDeclaration}enterRule(e){if(e.enterUsingForDeclaration){e.enterUsingForDeclaration(this)}}exitRule(e){if(e.exitUsingForDeclaration){e.exitUsingForDeclaration(this)}}accept(e){if(e.visitUsingForDeclaration){return e.visitUsingForDeclaration(this)}else{return e.visitChildren(this)}}};var Ki=class extends yi.ParserRuleContext{userDefinedTypeName(){return this.tryGetRuleContext(0,hn)}usingForObjectDirective(e){if(e===void 0){return this.getRuleContexts(Vi)}else{return this.getRuleContext(e,Vi)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_usingForObject}enterRule(e){if(e.enterUsingForObject){e.enterUsingForObject(this)}}exitRule(e){if(e.exitUsingForObject){e.exitUsingForObject(this)}}accept(e){if(e.visitUsingForObject){return e.visitUsingForObject(this)}else{return e.visitChildren(this)}}};var Vi=class extends yi.ParserRuleContext{userDefinedTypeName(){return this.getRuleContext(0,hn)}userDefinableOperators(){return this.tryGetRuleContext(0,qi)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_usingForObjectDirective}enterRule(e){if(e.enterUsingForObjectDirective){e.enterUsingForObjectDirective(this)}}exitRule(e){if(e.exitUsingForObjectDirective){e.exitUsingForObjectDirective(this)}}accept(e){if(e.visitUsingForObjectDirective){return e.visitUsingForObjectDirective(this)}else{return e.visitChildren(this)}}};var qi=class extends yi.ParserRuleContext{constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_userDefinableOperators}enterRule(e){if(e.enterUserDefinableOperators){e.enterUserDefinableOperators(this)}}exitRule(e){if(e.exitUserDefinableOperators){e.exitUserDefinableOperators(this)}}accept(e){if(e.visitUserDefinableOperators){return e.visitUserDefinableOperators(this)}else{return e.visitChildren(this)}}};var Zi=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}variableDeclaration(e){if(e===void 0){return this.getRuleContexts(un)}else{return this.getRuleContext(e,un)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_structDefinition}enterRule(e){if(e.enterStructDefinition){e.enterStructDefinition(this)}}exitRule(e){if(e.exitStructDefinition){e.exitStructDefinition(this)}}accept(e){if(e.visitStructDefinition){return e.visitStructDefinition(this)}else{return e.visitChildren(this)}}};var Gi=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}block(){return this.tryGetRuleContext(0,vn)}parameterList(){return this.tryGetRuleContext(0,rn)}VirtualKeyword(e){if(e===void 0){return this.getTokens(Si.VirtualKeyword)}else{return this.getToken(Si.VirtualKeyword,e)}}overrideSpecifier(e){if(e===void 0){return this.getRuleContexts(_s)}else{return this.getRuleContext(e,_s)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_modifierDefinition}enterRule(e){if(e.enterModifierDefinition){e.enterModifierDefinition(this)}}exitRule(e){if(e.exitModifierDefinition){e.exitModifierDefinition(this)}}accept(e){if(e.visitModifierDefinition){return e.visitModifierDefinition(this)}else{return e.visitChildren(this)}}};var $i=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}expressionList(){return this.tryGetRuleContext(0,Vn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_modifierInvocation}enterRule(e){if(e.enterModifierInvocation){e.enterModifierInvocation(this)}}exitRule(e){if(e.exitModifierInvocation){e.exitModifierInvocation(this)}}accept(e){if(e.visitModifierInvocation){return e.visitModifierInvocation(this)}else{return e.visitChildren(this)}}};var Wi=class extends yi.ParserRuleContext{functionDescriptor(){return this.getRuleContext(0,Yi)}parameterList(){return this.getRuleContext(0,rn)}modifierList(){return this.getRuleContext(0,Qi)}block(){return this.tryGetRuleContext(0,vn)}returnParameters(){return this.tryGetRuleContext(0,Ji)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionDefinition}enterRule(e){if(e.enterFunctionDefinition){e.enterFunctionDefinition(this)}}exitRule(e){if(e.exitFunctionDefinition){e.exitFunctionDefinition(this)}}accept(e){if(e.visitFunctionDefinition){return e.visitFunctionDefinition(this)}else{return e.visitChildren(this)}}};var Yi=class extends yi.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,gs)}ConstructorKeyword(){return this.tryGetToken(Si.ConstructorKeyword,0)}FallbackKeyword(){return this.tryGetToken(Si.FallbackKeyword,0)}ReceiveKeyword(){return this.tryGetToken(Si.ReceiveKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionDescriptor}enterRule(e){if(e.enterFunctionDescriptor){e.enterFunctionDescriptor(this)}}exitRule(e){if(e.exitFunctionDescriptor){e.exitFunctionDescriptor(this)}}accept(e){if(e.visitFunctionDescriptor){return e.visitFunctionDescriptor(this)}else{return e.visitChildren(this)}}};var Ji=class extends yi.ParserRuleContext{parameterList(){return this.getRuleContext(0,rn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_returnParameters}enterRule(e){if(e.enterReturnParameters){e.enterReturnParameters(this)}}exitRule(e){if(e.exitReturnParameters){e.exitReturnParameters(this)}}accept(e){if(e.visitReturnParameters){return e.visitReturnParameters(this)}else{return e.visitChildren(this)}}};var Qi=class extends yi.ParserRuleContext{ExternalKeyword(e){if(e===void 0){return this.getTokens(Si.ExternalKeyword)}else{return this.getToken(Si.ExternalKeyword,e)}}PublicKeyword(e){if(e===void 0){return this.getTokens(Si.PublicKeyword)}else{return this.getToken(Si.PublicKeyword,e)}}InternalKeyword(e){if(e===void 0){return this.getTokens(Si.InternalKeyword)}else{return this.getToken(Si.InternalKeyword,e)}}PrivateKeyword(e){if(e===void 0){return this.getTokens(Si.PrivateKeyword)}else{return this.getToken(Si.PrivateKeyword,e)}}VirtualKeyword(e){if(e===void 0){return this.getTokens(Si.VirtualKeyword)}else{return this.getToken(Si.VirtualKeyword,e)}}stateMutability(e){if(e===void 0){return this.getRuleContexts(_n)}else{return this.getRuleContext(e,_n)}}modifierInvocation(e){if(e===void 0){return this.getRuleContexts($i)}else{return this.getRuleContext(e,$i)}}overrideSpecifier(e){if(e===void 0){return this.getRuleContexts(_s)}else{return this.getRuleContext(e,_s)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_modifierList}enterRule(e){if(e.enterModifierList){e.enterModifierList(this)}}exitRule(e){if(e.exitModifierList){e.exitModifierList(this)}}accept(e){if(e.visitModifierList){return e.visitModifierList(this)}else{return e.visitChildren(this)}}};var Xi=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}eventParameterList(){return this.getRuleContext(0,sn)}AnonymousKeyword(){return this.tryGetToken(Si.AnonymousKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_eventDefinition}enterRule(e){if(e.enterEventDefinition){e.enterEventDefinition(this)}}exitRule(e){if(e.exitEventDefinition){e.exitEventDefinition(this)}}accept(e){if(e.visitEventDefinition){return e.visitEventDefinition(this)}else{return e.visitChildren(this)}}};var en=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_enumValue}enterRule(e){if(e.enterEnumValue){e.enterEnumValue(this)}}exitRule(e){if(e.exitEnumValue){e.exitEnumValue(this)}}accept(e){if(e.visitEnumValue){return e.visitEnumValue(this)}else{return e.visitChildren(this)}}};var tn=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}enumValue(e){if(e===void 0){return this.getRuleContexts(en)}else{return this.getRuleContext(e,en)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_enumDefinition}enterRule(e){if(e.enterEnumDefinition){e.enterEnumDefinition(this)}}exitRule(e){if(e.exitEnumDefinition){e.exitEnumDefinition(this)}}accept(e){if(e.visitEnumDefinition){return e.visitEnumDefinition(this)}else{return e.visitChildren(this)}}};var rn=class extends yi.ParserRuleContext{parameter(e){if(e===void 0){return this.getRuleContexts(nn)}else{return this.getRuleContext(e,nn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_parameterList}enterRule(e){if(e.enterParameterList){e.enterParameterList(this)}}exitRule(e){if(e.exitParameterList){e.exitParameterList(this)}}accept(e){if(e.visitParameterList){return e.visitParameterList(this)}else{return e.visitChildren(this)}}};var nn=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}storageLocation(){return this.tryGetRuleContext(0,yn)}identifier(){return this.tryGetRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_parameter}enterRule(e){if(e.enterParameter){e.enterParameter(this)}}exitRule(e){if(e.exitParameter){e.exitParameter(this)}}accept(e){if(e.visitParameter){return e.visitParameter(this)}else{return e.visitChildren(this)}}};var sn=class extends yi.ParserRuleContext{eventParameter(e){if(e===void 0){return this.getRuleContexts(on)}else{return this.getRuleContext(e,on)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_eventParameterList}enterRule(e){if(e.enterEventParameterList){e.enterEventParameterList(this)}}exitRule(e){if(e.exitEventParameterList){e.exitEventParameterList(this)}}accept(e){if(e.visitEventParameterList){return e.visitEventParameterList(this)}else{return e.visitChildren(this)}}};var on=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}IndexedKeyword(){return this.tryGetToken(Si.IndexedKeyword,0)}identifier(){return this.tryGetRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_eventParameter}enterRule(e){if(e.enterEventParameter){e.enterEventParameter(this)}}exitRule(e){if(e.exitEventParameter){e.exitEventParameter(this)}}accept(e){if(e.visitEventParameter){return e.visitEventParameter(this)}else{return e.visitChildren(this)}}};var an=class extends yi.ParserRuleContext{functionTypeParameter(e){if(e===void 0){return this.getRuleContexts(ln)}else{return this.getRuleContext(e,ln)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionTypeParameterList}enterRule(e){if(e.enterFunctionTypeParameterList){e.enterFunctionTypeParameterList(this)}}exitRule(e){if(e.exitFunctionTypeParameterList){e.exitFunctionTypeParameterList(this)}}accept(e){if(e.visitFunctionTypeParameterList){return e.visitFunctionTypeParameterList(this)}else{return e.visitChildren(this)}}};var ln=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}storageLocation(){return this.tryGetRuleContext(0,yn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionTypeParameter}enterRule(e){if(e.enterFunctionTypeParameter){e.enterFunctionTypeParameter(this)}}exitRule(e){if(e.exitFunctionTypeParameter){e.exitFunctionTypeParameter(this)}}accept(e){if(e.visitFunctionTypeParameter){return e.visitFunctionTypeParameter(this)}else{return e.visitChildren(this)}}};var un=class extends yi.ParserRuleContext{typeName(){return this.getRuleContext(0,cn)}identifier(){return this.getRuleContext(0,gs)}storageLocation(){return this.tryGetRuleContext(0,yn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_variableDeclaration}enterRule(e){if(e.enterVariableDeclaration){e.enterVariableDeclaration(this)}}exitRule(e){if(e.exitVariableDeclaration){e.exitVariableDeclaration(this)}}accept(e){if(e.visitVariableDeclaration){return e.visitVariableDeclaration(this)}else{return e.visitChildren(this)}}};var cn=class extends yi.ParserRuleContext{elementaryTypeName(){return this.tryGetRuleContext(0,Hn)}userDefinedTypeName(){return this.tryGetRuleContext(0,hn)}mapping(){return this.tryGetRuleContext(0,fn)}typeName(){return this.tryGetRuleContext(0,cn)}expression(){return this.tryGetRuleContext(0,zn)}functionTypeName(){return this.tryGetRuleContext(0,gn)}PayableKeyword(){return this.tryGetToken(Si.PayableKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_typeName}enterRule(e){if(e.enterTypeName){e.enterTypeName(this)}}exitRule(e){if(e.exitTypeName){e.exitTypeName(this)}}accept(e){if(e.visitTypeName){return e.visitTypeName(this)}else{return e.visitChildren(this)}}};var hn=class extends yi.ParserRuleContext{identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_userDefinedTypeName}enterRule(e){if(e.enterUserDefinedTypeName){e.enterUserDefinedTypeName(this)}}exitRule(e){if(e.exitUserDefinedTypeName){e.exitUserDefinedTypeName(this)}}accept(e){if(e.visitUserDefinedTypeName){return e.visitUserDefinedTypeName(this)}else{return e.visitChildren(this)}}};var dn=class extends yi.ParserRuleContext{elementaryTypeName(){return this.tryGetRuleContext(0,Hn)}userDefinedTypeName(){return this.tryGetRuleContext(0,hn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_mappingKey}enterRule(e){if(e.enterMappingKey){e.enterMappingKey(this)}}exitRule(e){if(e.exitMappingKey){e.exitMappingKey(this)}}accept(e){if(e.visitMappingKey){return e.visitMappingKey(this)}else{return e.visitChildren(this)}}};var fn=class extends yi.ParserRuleContext{mappingKey(){return this.getRuleContext(0,dn)}typeName(){return this.getRuleContext(0,cn)}mappingKeyName(){return this.tryGetRuleContext(0,pn)}mappingValueName(){return this.tryGetRuleContext(0,mn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_mapping}enterRule(e){if(e.enterMapping){e.enterMapping(this)}}exitRule(e){if(e.exitMapping){e.exitMapping(this)}}accept(e){if(e.visitMapping){return e.visitMapping(this)}else{return e.visitChildren(this)}}};var pn=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_mappingKeyName}enterRule(e){if(e.enterMappingKeyName){e.enterMappingKeyName(this)}}exitRule(e){if(e.exitMappingKeyName){e.exitMappingKeyName(this)}}accept(e){if(e.visitMappingKeyName){return e.visitMappingKeyName(this)}else{return e.visitChildren(this)}}};var mn=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_mappingValueName}enterRule(e){if(e.enterMappingValueName){e.enterMappingValueName(this)}}exitRule(e){if(e.exitMappingValueName){e.exitMappingValueName(this)}}accept(e){if(e.visitMappingValueName){return e.visitMappingValueName(this)}else{return e.visitChildren(this)}}};var gn=class extends yi.ParserRuleContext{functionTypeParameterList(e){if(e===void 0){return this.getRuleContexts(an)}else{return this.getRuleContext(e,an)}}InternalKeyword(e){if(e===void 0){return this.getTokens(Si.InternalKeyword)}else{return this.getToken(Si.InternalKeyword,e)}}ExternalKeyword(e){if(e===void 0){return this.getTokens(Si.ExternalKeyword)}else{return this.getToken(Si.ExternalKeyword,e)}}stateMutability(e){if(e===void 0){return this.getRuleContexts(_n)}else{return this.getRuleContext(e,_n)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionTypeName}enterRule(e){if(e.enterFunctionTypeName){e.enterFunctionTypeName(this)}}exitRule(e){if(e.exitFunctionTypeName){e.exitFunctionTypeName(this)}}accept(e){if(e.visitFunctionTypeName){return e.visitFunctionTypeName(this)}else{return e.visitChildren(this)}}};var yn=class extends yi.ParserRuleContext{constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_storageLocation}enterRule(e){if(e.enterStorageLocation){e.enterStorageLocation(this)}}exitRule(e){if(e.exitStorageLocation){e.exitStorageLocation(this)}}accept(e){if(e.visitStorageLocation){return e.visitStorageLocation(this)}else{return e.visitChildren(this)}}};var _n=class extends yi.ParserRuleContext{PureKeyword(){return this.tryGetToken(Si.PureKeyword,0)}ConstantKeyword(){return this.tryGetToken(Si.ConstantKeyword,0)}ViewKeyword(){return this.tryGetToken(Si.ViewKeyword,0)}PayableKeyword(){return this.tryGetToken(Si.PayableKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_stateMutability}enterRule(e){if(e.enterStateMutability){e.enterStateMutability(this)}}exitRule(e){if(e.exitStateMutability){e.exitStateMutability(this)}}accept(e){if(e.visitStateMutability){return e.visitStateMutability(this)}else{return e.visitChildren(this)}}};var vn=class extends yi.ParserRuleContext{statement(e){if(e===void 0){return this.getRuleContexts(bn)}else{return this.getRuleContext(e,bn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_block}enterRule(e){if(e.enterBlock){e.enterBlock(this)}}exitRule(e){if(e.exitBlock){e.exitBlock(this)}}accept(e){if(e.visitBlock){return e.visitBlock(this)}else{return e.visitChildren(this)}}};var bn=class extends yi.ParserRuleContext{ifStatement(){return this.tryGetRuleContext(0,Tn)}tryStatement(){return this.tryGetRuleContext(0,wn)}whileStatement(){return this.tryGetRuleContext(0,En)}forStatement(){return this.tryGetRuleContext(0,Nn)}block(){return this.tryGetRuleContext(0,vn)}inlineAssemblyStatement(){return this.tryGetRuleContext(0,On)}doWhileStatement(){return this.tryGetRuleContext(0,kn)}continueStatement(){return this.tryGetRuleContext(0,Pn)}breakStatement(){return this.tryGetRuleContext(0,Ln)}returnStatement(){return this.tryGetRuleContext(0,In)}throwStatement(){return this.tryGetRuleContext(0,Mn)}emitStatement(){return this.tryGetRuleContext(0,Dn)}simpleStatement(){return this.tryGetRuleContext(0,An)}uncheckedStatement(){return this.tryGetRuleContext(0,Cn)}revertStatement(){return this.tryGetRuleContext(0,Fn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_statement}enterRule(e){if(e.enterStatement){e.enterStatement(this)}}exitRule(e){if(e.exitStatement){e.exitStatement(this)}}accept(e){if(e.visitStatement){return e.visitStatement(this)}else{return e.visitChildren(this)}}};var xn=class extends yi.ParserRuleContext{expression(){return this.getRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_expressionStatement}enterRule(e){if(e.enterExpressionStatement){e.enterExpressionStatement(this)}}exitRule(e){if(e.exitExpressionStatement){e.exitExpressionStatement(this)}}accept(e){if(e.visitExpressionStatement){return e.visitExpressionStatement(this)}else{return e.visitChildren(this)}}};var Tn=class extends yi.ParserRuleContext{expression(){return this.getRuleContext(0,zn)}statement(e){if(e===void 0){return this.getRuleContexts(bn)}else{return this.getRuleContext(e,bn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_ifStatement}enterRule(e){if(e.enterIfStatement){e.enterIfStatement(this)}}exitRule(e){if(e.exitIfStatement){e.exitIfStatement(this)}}accept(e){if(e.visitIfStatement){return e.visitIfStatement(this)}else{return e.visitChildren(this)}}};var wn=class extends yi.ParserRuleContext{expression(){return this.getRuleContext(0,zn)}block(){return this.getRuleContext(0,vn)}returnParameters(){return this.tryGetRuleContext(0,Ji)}catchClause(e){if(e===void 0){return this.getRuleContexts(Sn)}else{return this.getRuleContext(e,Sn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_tryStatement}enterRule(e){if(e.enterTryStatement){e.enterTryStatement(this)}}exitRule(e){if(e.exitTryStatement){e.exitTryStatement(this)}}accept(e){if(e.visitTryStatement){return e.visitTryStatement(this)}else{return e.visitChildren(this)}}};var Sn=class extends yi.ParserRuleContext{block(){return this.getRuleContext(0,vn)}parameterList(){return this.tryGetRuleContext(0,rn)}identifier(){return this.tryGetRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_catchClause}enterRule(e){if(e.enterCatchClause){e.enterCatchClause(this)}}exitRule(e){if(e.exitCatchClause){e.exitCatchClause(this)}}accept(e){if(e.visitCatchClause){return e.visitCatchClause(this)}else{return e.visitChildren(this)}}};var En=class extends yi.ParserRuleContext{expression(){return this.getRuleContext(0,zn)}statement(){return this.getRuleContext(0,bn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_whileStatement}enterRule(e){if(e.enterWhileStatement){e.enterWhileStatement(this)}}exitRule(e){if(e.exitWhileStatement){e.exitWhileStatement(this)}}accept(e){if(e.visitWhileStatement){return e.visitWhileStatement(this)}else{return e.visitChildren(this)}}};var An=class extends yi.ParserRuleContext{variableDeclarationStatement(){return this.tryGetRuleContext(0,jn)}expressionStatement(){return this.tryGetRuleContext(0,xn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_simpleStatement}enterRule(e){if(e.enterSimpleStatement){e.enterSimpleStatement(this)}}exitRule(e){if(e.exitSimpleStatement){e.exitSimpleStatement(this)}}accept(e){if(e.visitSimpleStatement){return e.visitSimpleStatement(this)}else{return e.visitChildren(this)}}};var Cn=class extends yi.ParserRuleContext{block(){return this.getRuleContext(0,vn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_uncheckedStatement}enterRule(e){if(e.enterUncheckedStatement){e.enterUncheckedStatement(this)}}exitRule(e){if(e.exitUncheckedStatement){e.exitUncheckedStatement(this)}}accept(e){if(e.visitUncheckedStatement){return e.visitUncheckedStatement(this)}else{return e.visitChildren(this)}}};var Nn=class extends yi.ParserRuleContext{statement(){return this.getRuleContext(0,bn)}simpleStatement(){return this.tryGetRuleContext(0,An)}expressionStatement(){return this.tryGetRuleContext(0,xn)}expression(){return this.tryGetRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_forStatement}enterRule(e){if(e.enterForStatement){e.enterForStatement(this)}}exitRule(e){if(e.exitForStatement){e.exitForStatement(this)}}accept(e){if(e.visitForStatement){return e.visitForStatement(this)}else{return e.visitChildren(this)}}};var On=class extends yi.ParserRuleContext{assemblyBlock(){return this.getRuleContext(0,Wn)}StringLiteralFragment(){return this.tryGetToken(Si.StringLiteralFragment,0)}inlineAssemblyStatementFlag(){return this.tryGetRuleContext(0,Rn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_inlineAssemblyStatement}enterRule(e){if(e.enterInlineAssemblyStatement){e.enterInlineAssemblyStatement(this)}}exitRule(e){if(e.exitInlineAssemblyStatement){e.exitInlineAssemblyStatement(this)}}accept(e){if(e.visitInlineAssemblyStatement){return e.visitInlineAssemblyStatement(this)}else{return e.visitChildren(this)}}};var Rn=class extends yi.ParserRuleContext{stringLiteral(){return this.getRuleContext(0,vs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_inlineAssemblyStatementFlag}enterRule(e){if(e.enterInlineAssemblyStatementFlag){e.enterInlineAssemblyStatementFlag(this)}}exitRule(e){if(e.exitInlineAssemblyStatementFlag){e.exitInlineAssemblyStatementFlag(this)}}accept(e){if(e.visitInlineAssemblyStatementFlag){return e.visitInlineAssemblyStatementFlag(this)}else{return e.visitChildren(this)}}};var kn=class extends yi.ParserRuleContext{statement(){return this.getRuleContext(0,bn)}expression(){return this.getRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_doWhileStatement}enterRule(e){if(e.enterDoWhileStatement){e.enterDoWhileStatement(this)}}exitRule(e){if(e.exitDoWhileStatement){e.exitDoWhileStatement(this)}}accept(e){if(e.visitDoWhileStatement){return e.visitDoWhileStatement(this)}else{return e.visitChildren(this)}}};var Pn=class extends yi.ParserRuleContext{ContinueKeyword(){return this.getToken(Si.ContinueKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_continueStatement}enterRule(e){if(e.enterContinueStatement){e.enterContinueStatement(this)}}exitRule(e){if(e.exitContinueStatement){e.exitContinueStatement(this)}}accept(e){if(e.visitContinueStatement){return e.visitContinueStatement(this)}else{return e.visitChildren(this)}}};var Ln=class extends yi.ParserRuleContext{BreakKeyword(){return this.getToken(Si.BreakKeyword,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_breakStatement}enterRule(e){if(e.enterBreakStatement){e.enterBreakStatement(this)}}exitRule(e){if(e.exitBreakStatement){e.exitBreakStatement(this)}}accept(e){if(e.visitBreakStatement){return e.visitBreakStatement(this)}else{return e.visitChildren(this)}}};var In=class extends yi.ParserRuleContext{expression(){return this.tryGetRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_returnStatement}enterRule(e){if(e.enterReturnStatement){e.enterReturnStatement(this)}}exitRule(e){if(e.exitReturnStatement){e.exitReturnStatement(this)}}accept(e){if(e.visitReturnStatement){return e.visitReturnStatement(this)}else{return e.visitChildren(this)}}};var Mn=class extends yi.ParserRuleContext{constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_throwStatement}enterRule(e){if(e.enterThrowStatement){e.enterThrowStatement(this)}}exitRule(e){if(e.exitThrowStatement){e.exitThrowStatement(this)}}accept(e){if(e.visitThrowStatement){return e.visitThrowStatement(this)}else{return e.visitChildren(this)}}};var Dn=class extends yi.ParserRuleContext{functionCall(){return this.getRuleContext(0,$n)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_emitStatement}enterRule(e){if(e.enterEmitStatement){e.enterEmitStatement(this)}}exitRule(e){if(e.exitEmitStatement){e.exitEmitStatement(this)}}accept(e){if(e.visitEmitStatement){return e.visitEmitStatement(this)}else{return e.visitChildren(this)}}};var Fn=class extends yi.ParserRuleContext{functionCall(){return this.getRuleContext(0,$n)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_revertStatement}enterRule(e){if(e.enterRevertStatement){e.enterRevertStatement(this)}}exitRule(e){if(e.exitRevertStatement){e.exitRevertStatement(this)}}accept(e){if(e.visitRevertStatement){return e.visitRevertStatement(this)}else{return e.visitChildren(this)}}};var jn=class extends yi.ParserRuleContext{identifierList(){return this.tryGetRuleContext(0,Un)}variableDeclaration(){return this.tryGetRuleContext(0,un)}variableDeclarationList(){return this.tryGetRuleContext(0,Bn)}expression(){return this.tryGetRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_variableDeclarationStatement}enterRule(e){if(e.enterVariableDeclarationStatement){e.enterVariableDeclarationStatement(this)}}exitRule(e){if(e.exitVariableDeclarationStatement){e.exitVariableDeclarationStatement(this)}}accept(e){if(e.visitVariableDeclarationStatement){return e.visitVariableDeclarationStatement(this)}else{return e.visitChildren(this)}}};var Bn=class extends yi.ParserRuleContext{variableDeclaration(e){if(e===void 0){return this.getRuleContexts(un)}else{return this.getRuleContext(e,un)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_variableDeclarationList}enterRule(e){if(e.enterVariableDeclarationList){e.enterVariableDeclarationList(this)}}exitRule(e){if(e.exitVariableDeclarationList){e.exitVariableDeclarationList(this)}}accept(e){if(e.visitVariableDeclarationList){return e.visitVariableDeclarationList(this)}else{return e.visitChildren(this)}}};var Un=class extends yi.ParserRuleContext{identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_identifierList}enterRule(e){if(e.enterIdentifierList){e.enterIdentifierList(this)}}exitRule(e){if(e.exitIdentifierList){e.exitIdentifierList(this)}}accept(e){if(e.visitIdentifierList){return e.visitIdentifierList(this)}else{return e.visitChildren(this)}}};var Hn=class extends yi.ParserRuleContext{Int(){return this.tryGetToken(Si.Int,0)}Uint(){return this.tryGetToken(Si.Uint,0)}Byte(){return this.tryGetToken(Si.Byte,0)}Fixed(){return this.tryGetToken(Si.Fixed,0)}Ufixed(){return this.tryGetToken(Si.Ufixed,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_elementaryTypeName}enterRule(e){if(e.enterElementaryTypeName){e.enterElementaryTypeName(this)}}exitRule(e){if(e.exitElementaryTypeName){e.exitElementaryTypeName(this)}}accept(e){if(e.visitElementaryTypeName){return e.visitElementaryTypeName(this)}else{return e.visitChildren(this)}}};var zn=class extends yi.ParserRuleContext{expression(e){if(e===void 0){return this.getRuleContexts(zn)}else{return this.getRuleContext(e,zn)}}typeName(){return this.tryGetRuleContext(0,cn)}identifier(){return this.tryGetRuleContext(0,gs)}nameValueList(){return this.tryGetRuleContext(0,qn)}functionCallArguments(){return this.tryGetRuleContext(0,Gn)}primaryExpression(){return this.tryGetRuleContext(0,Kn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_expression}enterRule(e){if(e.enterExpression){e.enterExpression(this)}}exitRule(e){if(e.exitExpression){e.exitExpression(this)}}accept(e){if(e.visitExpression){return e.visitExpression(this)}else{return e.visitChildren(this)}}};var Kn=class extends yi.ParserRuleContext{BooleanLiteral(){return this.tryGetToken(Si.BooleanLiteral,0)}numberLiteral(){return this.tryGetRuleContext(0,ms)}hexLiteral(){return this.tryGetRuleContext(0,ys)}stringLiteral(){return this.tryGetRuleContext(0,vs)}identifier(){return this.tryGetRuleContext(0,gs)}TypeKeyword(){return this.tryGetToken(Si.TypeKeyword,0)}PayableKeyword(){return this.tryGetToken(Si.PayableKeyword,0)}tupleExpression(){return this.tryGetRuleContext(0,ps)}typeName(){return this.tryGetRuleContext(0,cn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_primaryExpression}enterRule(e){if(e.enterPrimaryExpression){e.enterPrimaryExpression(this)}}exitRule(e){if(e.exitPrimaryExpression){e.exitPrimaryExpression(this)}}accept(e){if(e.visitPrimaryExpression){return e.visitPrimaryExpression(this)}else{return e.visitChildren(this)}}};var Vn=class extends yi.ParserRuleContext{expression(e){if(e===void 0){return this.getRuleContexts(zn)}else{return this.getRuleContext(e,zn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_expressionList}enterRule(e){if(e.enterExpressionList){e.enterExpressionList(this)}}exitRule(e){if(e.exitExpressionList){e.exitExpressionList(this)}}accept(e){if(e.visitExpressionList){return e.visitExpressionList(this)}else{return e.visitChildren(this)}}};var qn=class extends yi.ParserRuleContext{nameValue(e){if(e===void 0){return this.getRuleContexts(Zn)}else{return this.getRuleContext(e,Zn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_nameValueList}enterRule(e){if(e.enterNameValueList){e.enterNameValueList(this)}}exitRule(e){if(e.exitNameValueList){e.exitNameValueList(this)}}accept(e){if(e.visitNameValueList){return e.visitNameValueList(this)}else{return e.visitChildren(this)}}};var Zn=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}expression(){return this.getRuleContext(0,zn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_nameValue}enterRule(e){if(e.enterNameValue){e.enterNameValue(this)}}exitRule(e){if(e.exitNameValue){e.exitNameValue(this)}}accept(e){if(e.visitNameValue){return e.visitNameValue(this)}else{return e.visitChildren(this)}}};var Gn=class extends yi.ParserRuleContext{nameValueList(){return this.tryGetRuleContext(0,qn)}expressionList(){return this.tryGetRuleContext(0,Vn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionCallArguments}enterRule(e){if(e.enterFunctionCallArguments){e.enterFunctionCallArguments(this)}}exitRule(e){if(e.exitFunctionCallArguments){e.exitFunctionCallArguments(this)}}accept(e){if(e.visitFunctionCallArguments){return e.visitFunctionCallArguments(this)}else{return e.visitChildren(this)}}};var $n=class extends yi.ParserRuleContext{expression(){return this.getRuleContext(0,zn)}functionCallArguments(){return this.getRuleContext(0,Gn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_functionCall}enterRule(e){if(e.enterFunctionCall){e.enterFunctionCall(this)}}exitRule(e){if(e.exitFunctionCall){e.exitFunctionCall(this)}}accept(e){if(e.visitFunctionCall){return e.visitFunctionCall(this)}else{return e.visitChildren(this)}}};var Wn=class extends yi.ParserRuleContext{assemblyItem(e){if(e===void 0){return this.getRuleContexts(Yn)}else{return this.getRuleContext(e,Yn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyBlock}enterRule(e){if(e.enterAssemblyBlock){e.enterAssemblyBlock(this)}}exitRule(e){if(e.exitAssemblyBlock){e.exitAssemblyBlock(this)}}accept(e){if(e.visitAssemblyBlock){return e.visitAssemblyBlock(this)}else{return e.visitChildren(this)}}};var Yn=class extends yi.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,gs)}assemblyBlock(){return this.tryGetRuleContext(0,Wn)}assemblyExpression(){return this.tryGetRuleContext(0,Jn)}assemblyLocalDefinition(){return this.tryGetRuleContext(0,es)}assemblyAssignment(){return this.tryGetRuleContext(0,ts)}assemblyStackAssignment(){return this.tryGetRuleContext(0,ss)}labelDefinition(){return this.tryGetRuleContext(0,os)}assemblySwitch(){return this.tryGetRuleContext(0,as)}assemblyFunctionDefinition(){return this.tryGetRuleContext(0,us)}assemblyFor(){return this.tryGetRuleContext(0,hs)}assemblyIf(){return this.tryGetRuleContext(0,ds)}BreakKeyword(){return this.tryGetToken(Si.BreakKeyword,0)}ContinueKeyword(){return this.tryGetToken(Si.ContinueKeyword,0)}LeaveKeyword(){return this.tryGetToken(Si.LeaveKeyword,0)}numberLiteral(){return this.tryGetRuleContext(0,ms)}stringLiteral(){return this.tryGetRuleContext(0,vs)}hexLiteral(){return this.tryGetRuleContext(0,ys)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyItem}enterRule(e){if(e.enterAssemblyItem){e.enterAssemblyItem(this)}}exitRule(e){if(e.exitAssemblyItem){e.exitAssemblyItem(this)}}accept(e){if(e.visitAssemblyItem){return e.visitAssemblyItem(this)}else{return e.visitChildren(this)}}};var Jn=class extends yi.ParserRuleContext{assemblyCall(){return this.tryGetRuleContext(0,Xn)}assemblyLiteral(){return this.tryGetRuleContext(0,fs)}assemblyMember(){return this.tryGetRuleContext(0,Qn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyExpression}enterRule(e){if(e.enterAssemblyExpression){e.enterAssemblyExpression(this)}}exitRule(e){if(e.exitAssemblyExpression){e.exitAssemblyExpression(this)}}accept(e){if(e.visitAssemblyExpression){return e.visitAssemblyExpression(this)}else{return e.visitChildren(this)}}};var Qn=class extends yi.ParserRuleContext{identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyMember}enterRule(e){if(e.enterAssemblyMember){e.enterAssemblyMember(this)}}exitRule(e){if(e.exitAssemblyMember){e.exitAssemblyMember(this)}}accept(e){if(e.visitAssemblyMember){return e.visitAssemblyMember(this)}else{return e.visitChildren(this)}}};var Xn=class extends yi.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,gs)}assemblyExpression(e){if(e===void 0){return this.getRuleContexts(Jn)}else{return this.getRuleContext(e,Jn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyCall}enterRule(e){if(e.enterAssemblyCall){e.enterAssemblyCall(this)}}exitRule(e){if(e.exitAssemblyCall){e.exitAssemblyCall(this)}}accept(e){if(e.visitAssemblyCall){return e.visitAssemblyCall(this)}else{return e.visitChildren(this)}}};var es=class extends yi.ParserRuleContext{assemblyIdentifierOrList(){return this.getRuleContext(0,rs)}assemblyExpression(){return this.tryGetRuleContext(0,Jn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyLocalDefinition}enterRule(e){if(e.enterAssemblyLocalDefinition){e.enterAssemblyLocalDefinition(this)}}exitRule(e){if(e.exitAssemblyLocalDefinition){e.exitAssemblyLocalDefinition(this)}}accept(e){if(e.visitAssemblyLocalDefinition){return e.visitAssemblyLocalDefinition(this)}else{return e.visitChildren(this)}}};var ts=class extends yi.ParserRuleContext{assemblyIdentifierOrList(){return this.getRuleContext(0,rs)}assemblyExpression(){return this.getRuleContext(0,Jn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyAssignment}enterRule(e){if(e.enterAssemblyAssignment){e.enterAssemblyAssignment(this)}}exitRule(e){if(e.exitAssemblyAssignment){e.exitAssemblyAssignment(this)}}accept(e){if(e.visitAssemblyAssignment){return e.visitAssemblyAssignment(this)}else{return e.visitChildren(this)}}};var rs=class extends yi.ParserRuleContext{identifier(){return this.tryGetRuleContext(0,gs)}assemblyMember(){return this.tryGetRuleContext(0,Qn)}assemblyIdentifierList(){return this.tryGetRuleContext(0,ns)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyIdentifierOrList}enterRule(e){if(e.enterAssemblyIdentifierOrList){e.enterAssemblyIdentifierOrList(this)}}exitRule(e){if(e.exitAssemblyIdentifierOrList){e.exitAssemblyIdentifierOrList(this)}}accept(e){if(e.visitAssemblyIdentifierOrList){return e.visitAssemblyIdentifierOrList(this)}else{return e.visitChildren(this)}}};var ns=class extends yi.ParserRuleContext{identifier(e){if(e===void 0){return this.getRuleContexts(gs)}else{return this.getRuleContext(e,gs)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyIdentifierList}enterRule(e){if(e.enterAssemblyIdentifierList){e.enterAssemblyIdentifierList(this)}}exitRule(e){if(e.exitAssemblyIdentifierList){e.exitAssemblyIdentifierList(this)}}accept(e){if(e.visitAssemblyIdentifierList){return e.visitAssemblyIdentifierList(this)}else{return e.visitChildren(this)}}};var ss=class extends yi.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Jn)}identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyStackAssignment}enterRule(e){if(e.enterAssemblyStackAssignment){e.enterAssemblyStackAssignment(this)}}exitRule(e){if(e.exitAssemblyStackAssignment){e.exitAssemblyStackAssignment(this)}}accept(e){if(e.visitAssemblyStackAssignment){return e.visitAssemblyStackAssignment(this)}else{return e.visitChildren(this)}}};var os=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_labelDefinition}enterRule(e){if(e.enterLabelDefinition){e.enterLabelDefinition(this)}}exitRule(e){if(e.exitLabelDefinition){e.exitLabelDefinition(this)}}accept(e){if(e.visitLabelDefinition){return e.visitLabelDefinition(this)}else{return e.visitChildren(this)}}};var as=class extends yi.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Jn)}assemblyCase(e){if(e===void 0){return this.getRuleContexts(ls)}else{return this.getRuleContext(e,ls)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblySwitch}enterRule(e){if(e.enterAssemblySwitch){e.enterAssemblySwitch(this)}}exitRule(e){if(e.exitAssemblySwitch){e.exitAssemblySwitch(this)}}accept(e){if(e.visitAssemblySwitch){return e.visitAssemblySwitch(this)}else{return e.visitChildren(this)}}};var ls=class extends yi.ParserRuleContext{assemblyLiteral(){return this.tryGetRuleContext(0,fs)}assemblyBlock(){return this.getRuleContext(0,Wn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyCase}enterRule(e){if(e.enterAssemblyCase){e.enterAssemblyCase(this)}}exitRule(e){if(e.exitAssemblyCase){e.exitAssemblyCase(this)}}accept(e){if(e.visitAssemblyCase){return e.visitAssemblyCase(this)}else{return e.visitChildren(this)}}};var us=class extends yi.ParserRuleContext{identifier(){return this.getRuleContext(0,gs)}assemblyBlock(){return this.getRuleContext(0,Wn)}assemblyIdentifierList(){return this.tryGetRuleContext(0,ns)}assemblyFunctionReturns(){return this.tryGetRuleContext(0,cs)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyFunctionDefinition}enterRule(e){if(e.enterAssemblyFunctionDefinition){e.enterAssemblyFunctionDefinition(this)}}exitRule(e){if(e.exitAssemblyFunctionDefinition){e.exitAssemblyFunctionDefinition(this)}}accept(e){if(e.visitAssemblyFunctionDefinition){return e.visitAssemblyFunctionDefinition(this)}else{return e.visitChildren(this)}}};var cs=class extends yi.ParserRuleContext{assemblyIdentifierList(){return this.tryGetRuleContext(0,ns)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyFunctionReturns}enterRule(e){if(e.enterAssemblyFunctionReturns){e.enterAssemblyFunctionReturns(this)}}exitRule(e){if(e.exitAssemblyFunctionReturns){e.exitAssemblyFunctionReturns(this)}}accept(e){if(e.visitAssemblyFunctionReturns){return e.visitAssemblyFunctionReturns(this)}else{return e.visitChildren(this)}}};var hs=class extends yi.ParserRuleContext{assemblyExpression(e){if(e===void 0){return this.getRuleContexts(Jn)}else{return this.getRuleContext(e,Jn)}}assemblyBlock(e){if(e===void 0){return this.getRuleContexts(Wn)}else{return this.getRuleContext(e,Wn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyFor}enterRule(e){if(e.enterAssemblyFor){e.enterAssemblyFor(this)}}exitRule(e){if(e.exitAssemblyFor){e.exitAssemblyFor(this)}}accept(e){if(e.visitAssemblyFor){return e.visitAssemblyFor(this)}else{return e.visitChildren(this)}}};var ds=class extends yi.ParserRuleContext{assemblyExpression(){return this.getRuleContext(0,Jn)}assemblyBlock(){return this.getRuleContext(0,Wn)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyIf}enterRule(e){if(e.enterAssemblyIf){e.enterAssemblyIf(this)}}exitRule(e){if(e.exitAssemblyIf){e.exitAssemblyIf(this)}}accept(e){if(e.visitAssemblyIf){return e.visitAssemblyIf(this)}else{return e.visitChildren(this)}}};var fs=class extends yi.ParserRuleContext{stringLiteral(){return this.tryGetRuleContext(0,vs)}DecimalNumber(){return this.tryGetToken(Si.DecimalNumber,0)}HexNumber(){return this.tryGetToken(Si.HexNumber,0)}hexLiteral(){return this.tryGetRuleContext(0,ys)}BooleanLiteral(){return this.tryGetToken(Si.BooleanLiteral,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_assemblyLiteral}enterRule(e){if(e.enterAssemblyLiteral){e.enterAssemblyLiteral(this)}}exitRule(e){if(e.exitAssemblyLiteral){e.exitAssemblyLiteral(this)}}accept(e){if(e.visitAssemblyLiteral){return e.visitAssemblyLiteral(this)}else{return e.visitChildren(this)}}};var ps=class extends yi.ParserRuleContext{expression(e){if(e===void 0){return this.getRuleContexts(zn)}else{return this.getRuleContext(e,zn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_tupleExpression}enterRule(e){if(e.enterTupleExpression){e.enterTupleExpression(this)}}exitRule(e){if(e.exitTupleExpression){e.exitTupleExpression(this)}}accept(e){if(e.visitTupleExpression){return e.visitTupleExpression(this)}else{return e.visitChildren(this)}}};var ms=class extends yi.ParserRuleContext{DecimalNumber(){return this.tryGetToken(Si.DecimalNumber,0)}HexNumber(){return this.tryGetToken(Si.HexNumber,0)}NumberUnit(){return this.tryGetToken(Si.NumberUnit,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_numberLiteral}enterRule(e){if(e.enterNumberLiteral){e.enterNumberLiteral(this)}}exitRule(e){if(e.exitNumberLiteral){e.exitNumberLiteral(this)}}accept(e){if(e.visitNumberLiteral){return e.visitNumberLiteral(this)}else{return e.visitChildren(this)}}};var gs=class extends yi.ParserRuleContext{ReceiveKeyword(){return this.tryGetToken(Si.ReceiveKeyword,0)}GlobalKeyword(){return this.tryGetToken(Si.GlobalKeyword,0)}ConstructorKeyword(){return this.tryGetToken(Si.ConstructorKeyword,0)}PayableKeyword(){return this.tryGetToken(Si.PayableKeyword,0)}LeaveKeyword(){return this.tryGetToken(Si.LeaveKeyword,0)}Identifier(){return this.tryGetToken(Si.Identifier,0)}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_identifier}enterRule(e){if(e.enterIdentifier){e.enterIdentifier(this)}}exitRule(e){if(e.exitIdentifier){e.exitIdentifier(this)}}accept(e){if(e.visitIdentifier){return e.visitIdentifier(this)}else{return e.visitChildren(this)}}};var ys=class extends yi.ParserRuleContext{HexLiteralFragment(e){if(e===void 0){return this.getTokens(Si.HexLiteralFragment)}else{return this.getToken(Si.HexLiteralFragment,e)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_hexLiteral}enterRule(e){if(e.enterHexLiteral){e.enterHexLiteral(this)}}exitRule(e){if(e.exitHexLiteral){e.exitHexLiteral(this)}}accept(e){if(e.visitHexLiteral){return e.visitHexLiteral(this)}else{return e.visitChildren(this)}}};var _s=class extends yi.ParserRuleContext{userDefinedTypeName(e){if(e===void 0){return this.getRuleContexts(hn)}else{return this.getRuleContext(e,hn)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_overrideSpecifier}enterRule(e){if(e.enterOverrideSpecifier){e.enterOverrideSpecifier(this)}}exitRule(e){if(e.exitOverrideSpecifier){e.exitOverrideSpecifier(this)}}accept(e){if(e.visitOverrideSpecifier){return e.visitOverrideSpecifier(this)}else{return e.visitChildren(this)}}};var vs=class extends yi.ParserRuleContext{StringLiteralFragment(e){if(e===void 0){return this.getTokens(Si.StringLiteralFragment)}else{return this.getToken(Si.StringLiteralFragment,e)}}constructor(e,t){super(e,t)}get ruleIndex(){return Si.RULE_stringLiteral}enterRule(e){if(e.enterStringLiteral){e.enterStringLiteral(this)}}exitRule(e){if(e.exitStringLiteral){e.exitStringLiteral(this)}}accept(e){if(e.visitStringLiteral){return e.visitStringLiteral(this)}else{return e.visitChildren(this)}}};var bs=["SourceUnit","PragmaDirective","ImportDirective","ContractDefinition","InheritanceSpecifier","StateVariableDeclaration","UsingForDeclaration","StructDefinition","ModifierDefinition","ModifierInvocation","FunctionDefinition","EventDefinition","CustomErrorDefinition","RevertStatement","EnumValue","EnumDefinition","VariableDeclaration","UserDefinedTypeName","Mapping","ArrayTypeName","FunctionTypeName","Block","ExpressionStatement","IfStatement","WhileStatement","ForStatement","InlineAssemblyStatement","DoWhileStatement","ContinueStatement","Break","Continue","BreakStatement","ReturnStatement","EmitStatement","ThrowStatement","VariableDeclarationStatement","ElementaryTypeName","FunctionCall","AssemblyBlock","AssemblyCall","AssemblyLocalDefinition","AssemblyAssignment","AssemblyStackAssignment","LabelDefinition","AssemblySwitch","AssemblyCase","AssemblyFunctionDefinition","AssemblyFor","AssemblyIf","TupleExpression","NameValueExpression","BooleanLiteral","NumberLiteral","Identifier","BinaryOperation","UnaryOperation","NewExpression","Conditional","StringLiteral","HexLiteral","HexNumber","DecimalNumber","MemberAccess","IndexAccess","IndexRangeAccess","NameValueList","UncheckedStatement","TryStatement","CatchClause","FileLevelConstant","AssemblyMemberAccess","TypeDefinition"];var xs=["+","-","*","/","**","%","<<",">>","&&","||",",,","&",",","^","<",">","<=",">=","==","!=","=",",=","^=","&=","<<=",">>=","+=","-=","*=","/=","%=","|","|="];var Ts=["-","+","++","--","~","after","delete","!"];var ws=__toModule(lr());var Ss=__toModule(Fe());var Es=class extends ws.AbstractParseTreeVisitor{constructor(e){super();this.options=e;this.result=null}defaultResult(){throw new Error("Unknown node")}aggregateResult(){return{type:""}}visitSourceUnit(e){var t;const r=((t=e.children)!=null?t:[]).filter((e=>!(e instanceof Ss.ErrorNode)));const i={type:"SourceUnit",children:r.slice(0,-1).map((e=>this.visit(e)))};const n=this._addMeta(i,e);this.result=n;return n}visitContractPart(e){return this.visit(e.getChild(0))}visitContractDefinition(e){const t=this._toText(e.identifier());const r=this._toText(e.getChild(0));this._currentContract=t;const i={type:"ContractDefinition",name:t,baseContracts:e.inheritanceSpecifier().map((e=>this.visitInheritanceSpecifier(e))),subNodes:e.contractPart().map((e=>this.visit(e))),kind:r};return this._addMeta(i,e)}visitStateVariableDeclaration(e){const t=this.visitTypeName(e.typeName());const r=e.identifier();const i=this._toText(r);let n=null;const s=e.expression();if(s){n=this.visitExpression(s)}let o="default";if(e.InternalKeyword().length>0){o="internal"}else if(e.PublicKeyword().length>0){o="public"}else if(e.PrivateKeyword().length>0){o="private"}let a=false;if(e.ConstantKeyword().length>0){a=true}let l;const u=e.overrideSpecifier();if(u.length===0){l=null}else{l=u[0].userDefinedTypeName().map((e=>this.visitUserDefinedTypeName(e)))}let c=false;if(e.ImmutableKeyword().length>0){c=true}const h={type:"VariableDeclaration",typeName:t,name:i,identifier:this.visitIdentifier(r),expression:n,visibility:o,isStateVar:true,isDeclaredConst:a,isIndexed:false,isImmutable:c,override:l,storageLocation:null};const d={type:"StateVariableDeclaration",variables:[this._addMeta(h,e)],initialValue:n};return this._addMeta(d,e)}visitVariableDeclaration(e){let t=null;const r=e.storageLocation();if(r){t=this._toText(r)}const i=e.identifier();const n={type:"VariableDeclaration",typeName:this.visitTypeName(e.typeName()),name:this._toText(i),identifier:this.visitIdentifier(i),storageLocation:t,isStateVar:false,isIndexed:false,expression:null};return this._addMeta(n,e)}visitVariableDeclarationStatement(e){let t=[];const r=e.variableDeclaration();const i=e.identifierList();const n=e.variableDeclarationList();if(r!==void 0){t=[this.visitVariableDeclaration(r)]}else if(i!==void 0){t=this.buildIdentifierList(i)}else if(n){t=this.buildVariableDeclarationList(n)}let s=null;const o=e.expression();if(o){s=this.visitExpression(o)}const a={type:"VariableDeclarationStatement",variables:t,initialValue:s};return this._addMeta(a,e)}visitStatement(e){return this.visit(e.getChild(0))}visitSimpleStatement(e){return this.visit(e.getChild(0))}visitEventDefinition(e){const t=e.eventParameterList().eventParameter().map((e=>{const t=this.visitTypeName(e.typeName());let r=null;const i=e.identifier();if(i){r=this._toText(i)}const n={type:"VariableDeclaration",typeName:t,name:r,identifier:i!==void 0?this.visitIdentifier(i):null,isStateVar:false,isIndexed:e.IndexedKeyword()!==void 0,storageLocation:null,expression:null};return this._addMeta(n,e)}));const r={type:"EventDefinition",name:this._toText(e.identifier()),parameters:t,isAnonymous:e.AnonymousKeyword()!==void 0};return this._addMeta(r,e)}visitBlock(e){const t={type:"Block",statements:e.statement().map((e=>this.visitStatement(e)))};return this._addMeta(t,e)}visitParameter(e){let t=null;const r=e.storageLocation();if(r!==void 0){t=this._toText(r)}let i=null;const n=e.identifier();if(n!==void 0){i=this._toText(n)}const s={type:"VariableDeclaration",typeName:this.visitTypeName(e.typeName()),name:i,identifier:n!==void 0?this.visitIdentifier(n):null,storageLocation:t,isStateVar:false,isIndexed:false,expression:null};return this._addMeta(s,e)}visitFunctionDefinition(e){let t=false;let r=false;let i=false;let n=false;let s=null;let o=[];let a=null;let l="default";let u=null;const c=e.block();if(c!==void 0){u=this.visitBlock(c)}const h=e.modifierList().modifierInvocation().map((e=>this.visitModifierInvocation(e)));let d=null;if(e.modifierList().stateMutability().length>0){d=this._stateMutabilityToText(e.modifierList().stateMutability(0))}const p=e.returnParameters();switch(this._toText(e.functionDescriptor().getChild(0))){case"constructor":o=e.parameterList().parameter().map((e=>this.visit(e)));if(e.modifierList().InternalKeyword().length>0){l="internal"}else if(e.modifierList().PublicKeyword().length>0){l="public"}else{l="default"}t=true;break;case"fallback":o=e.parameterList().parameter().map((e=>this.visit(e)));a=p!==void 0?this.visitReturnParameters(p):null;l="external";r=true;break;case"receive":l="external";i=true;break;case"function":{const i=e.functionDescriptor().identifier();s=i!==void 0?this._toText(i):"";o=e.parameterList().parameter().map((e=>this.visit(e)));a=p!==void 0?this.visitReturnParameters(p):null;if(e.modifierList().ExternalKeyword().length>0){l="external"}else if(e.modifierList().InternalKeyword().length>0){l="internal"}else if(e.modifierList().PublicKeyword().length>0){l="public"}else if(e.modifierList().PrivateKeyword().length>0){l="private"}t=s===this._currentContract;r=s==="";break}}if(e.modifierList().VirtualKeyword().length>0){n=true}let m;const g=e.modifierList().overrideSpecifier();if(g.length===0){m=null}else{m=g[0].userDefinedTypeName().map((e=>this.visitUserDefinedTypeName(e)))}const y={type:"FunctionDefinition",name:s,parameters:o,returnParameters:a,body:u,visibility:l,modifiers:h,override:m,isConstructor:t,isReceiveEther:i,isFallback:r,isVirtual:n,stateMutability:d};return this._addMeta(y,e)}visitEnumDefinition(e){const t={type:"EnumDefinition",name:this._toText(e.identifier()),members:e.enumValue().map((e=>this.visitEnumValue(e)))};return this._addMeta(t,e)}visitEnumValue(e){const t={type:"EnumValue",name:this._toText(e.identifier())};return this._addMeta(t,e)}visitElementaryTypeName(e){const t={type:"ElementaryTypeName",name:this._toText(e),stateMutability:null};return this._addMeta(t,e)}visitIdentifier(e){const t={type:"Identifier",name:this._toText(e)};return this._addMeta(t,e)}visitTypeName(e){var t;if(e.children!==void 0&&e.children.length>2){let t=null;if(e.children.length===4){const r=e.expression();if(r===void 0){throw new Error("Assertion error: a typeName with 4 children should have an expression")}t=this.visitExpression(r)}const r=e.typeName();const i={type:"ArrayTypeName",baseTypeName:this.visitTypeName(r),length:t};return this._addMeta(i,e)}if(((t=e.children)==null?void 0:t.length)===2){const t={type:"ElementaryTypeName",name:this._toText(e.getChild(0)),stateMutability:this._toText(e.getChild(1))};return this._addMeta(t,e)}if(e.elementaryTypeName()!==void 0){return this.visitElementaryTypeName(e.elementaryTypeName())}if(e.userDefinedTypeName()!==void 0){return this.visitUserDefinedTypeName(e.userDefinedTypeName())}if(e.mapping()!==void 0){return this.visitMapping(e.mapping())}if(e.functionTypeName()!==void 0){return this.visitFunctionTypeName(e.functionTypeName())}throw new Error("Assertion error: unhandled type name case")}visitUserDefinedTypeName(e){const t={type:"UserDefinedTypeName",namePath:this._toText(e)};return this._addMeta(t,e)}visitUsingForDeclaration(e){let t=null;const r=e.typeName();if(r!==void 0){t=this.visitTypeName(r)}const i=e.GlobalKeyword()!==void 0;const n=e.usingForObject();const s=n.userDefinedTypeName();let o;if(s!==void 0){o={type:"UsingForDeclaration",isGlobal:i,typeName:t,libraryName:this._toText(s),functions:[],operators:[]}}else{const e=n.usingForObjectDirective();const r=[];const s=[];for(const t of e){r.push(this._toText(t.userDefinedTypeName()));const e=t.userDefinableOperators();if(e!==void 0){s.push(this._toText(e))}else{s.push(null)}}o={type:"UsingForDeclaration",isGlobal:i,typeName:t,libraryName:null,functions:r,operators:s}}return this._addMeta(o,e)}visitPragmaDirective(e){const t=e.pragmaValue().version();let r=this._toText(e.pragmaValue());if((t==null?void 0:t.children)!==void 0){r=t.children.map((e=>this._toText(e))).join(" ")}const i={type:"PragmaDirective",name:this._toText(e.pragmaName()),value:r};return this._addMeta(i,e)}visitInheritanceSpecifier(e){const t=e.expressionList();const r=t!==void 0?t.expression().map((e=>this.visitExpression(e))):[];const i={type:"InheritanceSpecifier",baseName:this.visitUserDefinedTypeName(e.userDefinedTypeName()),arguments:r};return this._addMeta(i,e)}visitModifierInvocation(e){const t=e.expressionList();let r;if(t!=null){r=t.expression().map((e=>this.visit(e)))}else if(e.children!==void 0&&e.children.length>1){r=[]}else{r=null}const i={type:"ModifierInvocation",name:this._toText(e.identifier()),arguments:r};return this._addMeta(i,e)}visitFunctionTypeName(e){const t=e.functionTypeParameterList(0).functionTypeParameter().map((e=>this.visitFunctionTypeParameter(e)));let r=[];if(e.functionTypeParameterList().length>1){r=e.functionTypeParameterList(1).functionTypeParameter().map((e=>this.visitFunctionTypeParameter(e)))}let i="default";if(e.InternalKeyword().length>0){i="internal"}else if(e.ExternalKeyword().length>0){i="external"}let n=null;if(e.stateMutability().length>0){n=this._toText(e.stateMutability(0))}const s={type:"FunctionTypeName",parameterTypes:t,returnTypes:r,visibility:i,stateMutability:n};return this._addMeta(s,e)}visitFunctionTypeParameter(e){let t=null;if(e.storageLocation()){t=this._toText(e.storageLocation())}const r={type:"VariableDeclaration",typeName:this.visitTypeName(e.typeName()),name:null,identifier:null,storageLocation:t,isStateVar:false,isIndexed:false,expression:null};return this._addMeta(r,e)}visitThrowStatement(e){const t={type:"ThrowStatement"};return this._addMeta(t,e)}visitReturnStatement(e){let t=null;const r=e.expression();if(r){t=this.visitExpression(r)}const i={type:"ReturnStatement",expression:t};return this._addMeta(i,e)}visitEmitStatement(e){const t={type:"EmitStatement",eventCall:this.visitFunctionCall(e.functionCall())};return this._addMeta(t,e)}visitCustomErrorDefinition(e){const t={type:"CustomErrorDefinition",name:this._toText(e.identifier()),parameters:this.visitParameterList(e.parameterList())};return this._addMeta(t,e)}visitTypeDefinition(e){const t={type:"TypeDefinition",name:this._toText(e.identifier()),definition:this.visitElementaryTypeName(e.elementaryTypeName())};return this._addMeta(t,e)}visitRevertStatement(e){const t={type:"RevertStatement",revertCall:this.visitFunctionCall(e.functionCall())};return this._addMeta(t,e)}visitFunctionCall(e){let t=[];const r=[];const i=[];const n=e.functionCallArguments();const s=n.expressionList();const o=n.nameValueList();if(s){t=s.expression().map((e=>this.visitExpression(e)))}else if(o){for(const e of o.nameValue()){t.push(this.visitExpression(e.expression()));r.push(this._toText(e.identifier()));i.push(this.visitIdentifier(e.identifier()))}}const a={type:"FunctionCall",expression:this.visitExpression(e.expression()),arguments:t,names:r,identifiers:i};return this._addMeta(a,e)}visitStructDefinition(e){const t={type:"StructDefinition",name:this._toText(e.identifier()),members:e.variableDeclaration().map((e=>this.visitVariableDeclaration(e)))};return this._addMeta(t,e)}visitWhileStatement(e){const t={type:"WhileStatement",condition:this.visitExpression(e.expression()),body:this.visitStatement(e.statement())};return this._addMeta(t,e)}visitDoWhileStatement(e){const t={type:"DoWhileStatement",condition:this.visitExpression(e.expression()),body:this.visitStatement(e.statement())};return this._addMeta(t,e)}visitIfStatement(e){const t=this.visitStatement(e.statement(0));let r=null;if(e.statement().length>1){r=this.visitStatement(e.statement(1))}const i={type:"IfStatement",condition:this.visitExpression(e.expression()),trueBody:t,falseBody:r};return this._addMeta(i,e)}visitTryStatement(e){let t=null;const r=e.returnParameters();if(r!==void 0){t=this.visitReturnParameters(r)}const i=e.catchClause().map((e=>this.visitCatchClause(e)));const n={type:"TryStatement",expression:this.visitExpression(e.expression()),returnParameters:t,body:this.visitBlock(e.block()),catchClauses:i};return this._addMeta(n,e)}visitCatchClause(e){let t=null;if(e.parameterList()){t=this.visitParameterList(e.parameterList())}if(e.identifier()&&this._toText(e.identifier())!=="Error"&&this._toText(e.identifier())!=="Panic"){throw new Error('Expected "Error" or "Panic" identifier in catch clause')}let r=null;const i=e.identifier();if(i!==void 0){r=this._toText(i)}const n={type:"CatchClause",isReasonStringType:r==="Error",kind:r,parameters:t,body:this.visitBlock(e.block())};return this._addMeta(n,e)}visitExpressionStatement(e){if(!e){return null}const t={type:"ExpressionStatement",expression:this.visitExpression(e.expression())};return this._addMeta(t,e)}visitNumberLiteral(e){var t;const r=this._toText(e.getChild(0));let i=null;if(((t=e.children)==null?void 0:t.length)===2){i=this._toText(e.getChild(1))}const n={type:"NumberLiteral",number:r,subdenomination:i};return this._addMeta(n,e)}visitMappingKey(e){if(e.elementaryTypeName()){return this.visitElementaryTypeName(e.elementaryTypeName())}else if(e.userDefinedTypeName()){return this.visitUserDefinedTypeName(e.userDefinedTypeName())}else{throw new Error("Expected MappingKey to have either elementaryTypeName or userDefinedTypeName")}}visitMapping(e){const t=e.mappingKeyName();const r=e.mappingValueName();const i={type:"Mapping",keyType:this.visitMappingKey(e.mappingKey()),keyName:t===void 0?null:this.visitIdentifier(t.identifier()),valueType:this.visitTypeName(e.typeName()),valueName:r===void 0?null:this.visitIdentifier(r.identifier())};return this._addMeta(i,e)}visitModifierDefinition(e){let t=null;if(e.parameterList()){t=this.visitParameterList(e.parameterList())}let r=false;if(e.VirtualKeyword().length>0){r=true}let i;const n=e.overrideSpecifier();if(n.length===0){i=null}else{i=n[0].userDefinedTypeName().map((e=>this.visitUserDefinedTypeName(e)))}let s=null;const o=e.block();if(o!==void 0){s=this.visitBlock(o)}const a={type:"ModifierDefinition",name:this._toText(e.identifier()),parameters:t,body:s,isVirtual:r,override:i};return this._addMeta(a,e)}visitUncheckedStatement(e){const t={type:"UncheckedStatement",block:this.visitBlock(e.block())};return this._addMeta(t,e)}visitExpression(e){let t;switch(e.children.length){case 1:{const t=e.tryGetRuleContext(0,Kn);if(t===void 0){throw new Error("Assertion error: primary expression should exist when children length is 1")}return this.visitPrimaryExpression(t)}case 2:t=this._toText(e.getChild(0));if(t==="new"){const t={type:"NewExpression",typeName:this.visitTypeName(e.typeName())};return this._addMeta(t,e)}if(Ts.includes(t)){const r={type:"UnaryOperation",operator:t,subExpression:this.visitExpression(e.getRuleContext(0,zn)),isPrefix:true};return this._addMeta(r,e)}t=this._toText(e.getChild(1));if(["++","--"].includes(t)){const r={type:"UnaryOperation",operator:t,subExpression:this.visitExpression(e.getRuleContext(0,zn)),isPrefix:false};return this._addMeta(r,e)}break;case 3:if(this._toText(e.getChild(0))==="("&&this._toText(e.getChild(2))===")"){const t={type:"TupleExpression",components:[this.visitExpression(e.getRuleContext(0,zn))],isArray:false};return this._addMeta(t,e)}t=this._toText(e.getChild(1));if(t==="."){const t={type:"MemberAccess",expression:this.visitExpression(e.expression(0)),memberName:this._toText(e.identifier())};return this._addMeta(t,e)}if(isBinOp(t)){const r={type:"BinaryOperation",operator:t,left:this.visitExpression(e.expression(0)),right:this.visitExpression(e.expression(1))};return this._addMeta(r,e)}break;case 4:if(this._toText(e.getChild(1))==="("&&this._toText(e.getChild(3))===")"){let t=[];const r=[];const i=[];const n=e.functionCallArguments();if(n.expressionList()){t=n.expressionList().expression().map((e=>this.visitExpression(e)))}else if(n.nameValueList()){for(const e of n.nameValueList().nameValue()){t.push(this.visitExpression(e.expression()));r.push(this._toText(e.identifier()));i.push(this.visitIdentifier(e.identifier()))}}const s={type:"FunctionCall",expression:this.visitExpression(e.expression(0)),arguments:t,names:r,identifiers:i};return this._addMeta(s,e)}if(this._toText(e.getChild(1))==="["&&this._toText(e.getChild(3))==="]"){if(e.getChild(2).text===":"){const t={type:"IndexRangeAccess",base:this.visitExpression(e.expression(0))};return this._addMeta(t,e)}const t={type:"IndexAccess",base:this.visitExpression(e.expression(0)),index:this.visitExpression(e.expression(1))};return this._addMeta(t,e)}if(this._toText(e.getChild(1))==="{"&&this._toText(e.getChild(3))==="}"){const t={type:"NameValueExpression",expression:this.visitExpression(e.expression(0)),arguments:this.visitNameValueList(e.nameValueList())};return this._addMeta(t,e)}break;case 5:if(this._toText(e.getChild(1))==="?"&&this._toText(e.getChild(3))===":"){const t={type:"Conditional",condition:this.visitExpression(e.expression(0)),trueExpression:this.visitExpression(e.expression(1)),falseExpression:this.visitExpression(e.expression(2))};return this._addMeta(t,e)}if(this._toText(e.getChild(1))==="["&&this._toText(e.getChild(2))===":"&&this._toText(e.getChild(4))==="]"){const t={type:"IndexRangeAccess",base:this.visitExpression(e.expression(0)),indexEnd:this.visitExpression(e.expression(1))};return this._addMeta(t,e)}else if(this._toText(e.getChild(1))==="["&&this._toText(e.getChild(3))===":"&&this._toText(e.getChild(4))==="]"){const t={type:"IndexRangeAccess",base:this.visitExpression(e.expression(0)),indexStart:this.visitExpression(e.expression(1))};return this._addMeta(t,e)}break;case 6:if(this._toText(e.getChild(1))==="["&&this._toText(e.getChild(3))===":"&&this._toText(e.getChild(5))==="]"){const t={type:"IndexRangeAccess",base:this.visitExpression(e.expression(0)),indexStart:this.visitExpression(e.expression(1)),indexEnd:this.visitExpression(e.expression(2))};return this._addMeta(t,e)}break}throw new Error("Unrecognized expression")}visitNameValueList(e){const t=[];const r=[];const i=[];for(const n of e.nameValue()){t.push(this._toText(n.identifier()));r.push(this.visitIdentifier(n.identifier()));i.push(this.visitExpression(n.expression()))}const n={type:"NameValueList",names:t,identifiers:r,arguments:i};return this._addMeta(n,e)}visitFileLevelConstant(e){const t=this.visitTypeName(e.typeName());const r=e.identifier();const i=this._toText(r);const n=this.visitExpression(e.expression());const s={type:"FileLevelConstant",typeName:t,name:i,initialValue:n,isDeclaredConst:true,isImmutable:false};return this._addMeta(s,e)}visitForStatement(e){let t=this.visitExpressionStatement(e.expressionStatement());if(t){t=t.expression}const r={type:"ForStatement",initExpression:e.simpleStatement()?this.visitSimpleStatement(e.simpleStatement()):null,conditionExpression:t,loopExpression:{type:"ExpressionStatement",expression:e.expression()!==void 0?this.visitExpression(e.expression()):null},body:this.visitStatement(e.statement())};return this._addMeta(r,e)}visitHexLiteral(e){const t=e.HexLiteralFragment().map((e=>this._toText(e))).map((e=>e.substring(4,e.length-1)));const r={type:"HexLiteral",value:t.join(""),parts:t};return this._addMeta(r,e)}visitPrimaryExpression(e){if(e.BooleanLiteral()){const t={type:"BooleanLiteral",value:this._toText(e.BooleanLiteral())==="true"};return this._addMeta(t,e)}if(e.hexLiteral()){return this.visitHexLiteral(e.hexLiteral())}if(e.stringLiteral()){const t=e.stringLiteral().StringLiteralFragment().map((e=>{let t=this._toText(e);const r=t.slice(0,7)==="unicode";if(r){t=t.slice(7)}const i=t[0]==="'";const n=t.substring(1,t.length-1);const s=i?n.replace(new RegExp("\\\\'","g"),"'"):n.replace(new RegExp('\\\\"',"g"),'"');return{value:s,isUnicode:r}}));const r=t.map((e=>e.value));const i={type:"StringLiteral",value:r.join(""),parts:r,isUnicode:t.map((e=>e.isUnicode))};return this._addMeta(i,e)}if(e.numberLiteral()){return this.visitNumberLiteral(e.numberLiteral())}if(e.TypeKeyword()){const t={type:"Identifier",name:"type"};return this._addMeta(t,e)}if(e.typeName()){return this.visitTypeName(e.typeName())}return this.visit(e.getChild(0))}visitTupleExpression(e){const t=e.children.slice(1,-1);const r=this._mapCommasToNulls(t).map((e=>{if(e===null){return null}return this.visit(e)}));const i={type:"TupleExpression",components:r,isArray:this._toText(e.getChild(0))==="["};return this._addMeta(i,e)}buildIdentifierList(e){const t=e.children.slice(1,-1);const r=e.identifier();let i=0;return this._mapCommasToNulls(t).map((e=>{if(!e){return null}const t=r[i];i++;const n={type:"VariableDeclaration",name:this._toText(t),identifier:this.visitIdentifier(t),isStateVar:false,isIndexed:false,typeName:null,storageLocation:null,expression:null};return this._addMeta(n,t)}))}buildVariableDeclarationList(e){var t;const r=e.variableDeclaration();let i=0;return this._mapCommasToNulls((t=e.children)!=null?t:[]).map((e=>{if(!e){return null}const t=r[i];i++;let n=null;if(t.storageLocation()){n=this._toText(t.storageLocation())}const s=t.identifier();const o={type:"VariableDeclaration",name:this._toText(s),identifier:this.visitIdentifier(s),typeName:this.visitTypeName(t.typeName()),storageLocation:n,isStateVar:false,isIndexed:false,expression:null};return this._addMeta(o,t)}))}visitImportDirective(e){const t=this._toText(e.importPath());let r=null;let i=null;let n=null;let s=null;if(e.importDeclaration().length>0){n=e.importDeclaration().map((e=>{const t=this._toText(e.identifier(0));let r=null;if(e.identifier().length>1){r=this._toText(e.identifier(1))}return[t,r]}));s=e.importDeclaration().map((e=>{const t=this.visitIdentifier(e.identifier(0));let r=null;if(e.identifier().length>1){r=this.visitIdentifier(e.identifier(1))}return[t,r]}))}else{const t=e.identifier();if(t.length===0){}else if(t.length===1){const t=e.identifier(0);r=this._toText(t);i=this.visitIdentifier(t)}else if(t.length===2){const t=e.identifier(1);r=this._toText(t);i=this.visitIdentifier(t)}else{throw new Error("Assertion error: an import should have one or two identifiers")}}const o=t.substring(1,t.length-1);const a={type:"StringLiteral",value:o,parts:[o],isUnicode:[false]};const l={type:"ImportDirective",path:o,pathLiteral:this._addMeta(a,e.importPath()),unitAlias:r,unitAliasIdentifier:i,symbolAliases:n,symbolAliasesIdentifiers:s};return this._addMeta(l,e)}buildEventParameterList(e){return e.eventParameter().map((e=>{const t=this.visit(e.typeName());let r=null;if(e.identifier()){r=this._toText(e.identifier())}return{type:"VariableDeclaration",typeName:t,name:r,isStateVar:false,isIndexed:!!e.IndexedKeyword(0)}}))}visitReturnParameters(e){return this.visitParameterList(e.parameterList())}visitParameterList(e){return e.parameter().map((e=>this.visitParameter(e)))}visitInlineAssemblyStatement(e){let t=null;if(e.StringLiteralFragment()){t=this._toText(e.StringLiteralFragment());t=t.substring(1,t.length-1)}const r=[];const i=e.inlineAssemblyStatementFlag();if(i!==void 0){const e=this._toText(i.stringLiteral());r.push(e.slice(1,e.length-1))}const n={type:"InlineAssemblyStatement",language:t,flags:r,body:this.visitAssemblyBlock(e.assemblyBlock())};return this._addMeta(n,e)}visitAssemblyBlock(e){const t=e.assemblyItem().map((e=>this.visitAssemblyItem(e)));const r={type:"AssemblyBlock",operations:t};return this._addMeta(r,e)}visitAssemblyItem(e){let t;if(e.hexLiteral()){return this.visitHexLiteral(e.hexLiteral())}if(e.stringLiteral()){t=this._toText(e.stringLiteral());const r=t.substring(1,t.length-1);const i={type:"StringLiteral",value:r,parts:[r],isUnicode:[false]};return this._addMeta(i,e)}if(e.BreakKeyword()){const t={type:"Break"};return this._addMeta(t,e)}if(e.ContinueKeyword()){const t={type:"Continue"};return this._addMeta(t,e)}return this.visit(e.getChild(0))}visitAssemblyExpression(e){return this.visit(e.getChild(0))}visitAssemblyCall(e){const t=this._toText(e.getChild(0));const r=e.assemblyExpression().map((e=>this.visitAssemblyExpression(e)));const i={type:"AssemblyCall",functionName:t,arguments:r};return this._addMeta(i,e)}visitAssemblyLiteral(e){let t;if(e.stringLiteral()){t=this._toText(e);const r=t.substring(1,t.length-1);const i={type:"StringLiteral",value:r,parts:[r],isUnicode:[false]};return this._addMeta(i,e)}if(e.BooleanLiteral()){const t={type:"BooleanLiteral",value:this._toText(e.BooleanLiteral())==="true"};return this._addMeta(t,e)}if(e.DecimalNumber()){const t={type:"DecimalNumber",value:this._toText(e)};return this._addMeta(t,e)}if(e.HexNumber()){const t={type:"HexNumber",value:this._toText(e)};return this._addMeta(t,e)}if(e.hexLiteral()){return this.visitHexLiteral(e.hexLiteral())}throw new Error("Should never reach here")}visitAssemblySwitch(e){const t={type:"AssemblySwitch",expression:this.visitAssemblyExpression(e.assemblyExpression()),cases:e.assemblyCase().map((e=>this.visitAssemblyCase(e)))};return this._addMeta(t,e)}visitAssemblyCase(e){let t=null;if(this._toText(e.getChild(0))==="case"){t=this.visitAssemblyLiteral(e.assemblyLiteral())}const r={type:"AssemblyCase",block:this.visitAssemblyBlock(e.assemblyBlock()),value:t,default:t===null};return this._addMeta(r,e)}visitAssemblyLocalDefinition(e){const t=e.assemblyIdentifierOrList();let r;if(t.identifier()){r=[this.visitIdentifier(t.identifier())]}else if(t.assemblyMember()){r=[this.visitAssemblyMember(t.assemblyMember())]}else{r=t.assemblyIdentifierList().identifier().map((e=>this.visitIdentifier(e)))}let i=null;if(e.assemblyExpression()!==void 0){i=this.visitAssemblyExpression(e.assemblyExpression())}const n={type:"AssemblyLocalDefinition",names:r,expression:i};return this._addMeta(n,e)}visitAssemblyFunctionDefinition(e){const t=e.assemblyIdentifierList();const r=t!==void 0?t.identifier().map((e=>this.visitIdentifier(e))):[];const i=e.assemblyFunctionReturns();const n=i?i.assemblyIdentifierList().identifier().map((e=>this.visitIdentifier(e))):[];const s={type:"AssemblyFunctionDefinition",name:this._toText(e.identifier()),arguments:r,returnArguments:n,body:this.visitAssemblyBlock(e.assemblyBlock())};return this._addMeta(s,e)}visitAssemblyAssignment(e){const t=e.assemblyIdentifierOrList();let r;if(t.identifier()){r=[this.visitIdentifier(t.identifier())]}else if(t.assemblyMember()){r=[this.visitAssemblyMember(t.assemblyMember())]}else{r=t.assemblyIdentifierList().identifier().map((e=>this.visitIdentifier(e)))}const i={type:"AssemblyAssignment",names:r,expression:this.visitAssemblyExpression(e.assemblyExpression())};return this._addMeta(i,e)}visitAssemblyMember(e){const[t,r]=e.identifier();const i={type:"AssemblyMemberAccess",expression:this.visitIdentifier(t),memberName:this.visitIdentifier(r)};return this._addMeta(i,e)}visitLabelDefinition(e){const t={type:"LabelDefinition",name:this._toText(e.identifier())};return this._addMeta(t,e)}visitAssemblyStackAssignment(e){const t={type:"AssemblyStackAssignment",name:this._toText(e.identifier()),expression:this.visitAssemblyExpression(e.assemblyExpression())};return this._addMeta(t,e)}visitAssemblyFor(e){const t={type:"AssemblyFor",pre:this.visit(e.getChild(1)),condition:this.visit(e.getChild(2)),post:this.visit(e.getChild(3)),body:this.visit(e.getChild(4))};return this._addMeta(t,e)}visitAssemblyIf(e){const t={type:"AssemblyIf",condition:this.visitAssemblyExpression(e.assemblyExpression()),body:this.visitAssemblyBlock(e.assemblyBlock())};return this._addMeta(t,e)}visitContinueStatement(e){const t={type:"ContinueStatement"};return this._addMeta(t,e)}visitBreakStatement(e){const t={type:"BreakStatement"};return this._addMeta(t,e)}_toText(e){const t=e.text;if(t===void 0){throw new Error("Assertion error: text should never be undefiend")}return t}_stateMutabilityToText(e){if(e.PureKeyword()!==void 0){return"pure"}if(e.ConstantKeyword()!==void 0){return"constant"}if(e.PayableKeyword()!==void 0){return"payable"}if(e.ViewKeyword()!==void 0){return"view"}throw new Error("Assertion error: non-exhaustive stateMutability check")}_loc(e){const t={start:{line:e.start.line,column:e.start.charPositionInLine},end:{line:e.stop?e.stop.line:e.start.line,column:e.stop?e.stop.charPositionInLine:e.start.charPositionInLine}};return t}_range(e){var t,r;return[e.start.startIndex,(r=(t=e.stop)==null?void 0:t.stopIndex)!=null?r:e.start.startIndex]}_addMeta(e,t){const r={type:e.type};if(this.options.loc===true){e.loc=this._loc(t)}if(this.options.range===true){e.range=this._range(t)}return __objSpread(__objSpread({},r),e)}_mapCommasToNulls(e){if(e.length===0){return[]}const t=[];let r=true;for(const i of e){if(r){if(this._toText(i)===","){t.push(null)}else{t.push(i);r=false}}else{if(this._toText(i)!==","){throw new Error("expected comma")}r=true}}if(r){t.push(null)}return t}};function isBinOp(e){return xs.includes(e)}var As=__toModule(ti());var Cs=class extends As.default.error.ErrorListener{constructor(){super();this._errors=[]}syntaxError(e,t,r,i,n){this._errors.push({message:n,line:r,column:i})}getErrors(){return this._errors}hasErrors(){return this._errors.length>0}};var Ns=Cs;var Os=__toModule(ii());var Rs=Os.default;var ks=["var","bool","address","string","Int","Uint","Byte","Fixed","UFixed"];function rsplit(e,t){const r=e.lastIndexOf(t);return[e.substring(0,r),e.substring(r+1,e.length)]}function normalizeTokenType(e){if(e.endsWith("'")){e=e.substring(0,e.length-1)}if(e.startsWith("'")){e=e.substring(1,e.length)}return e}function getTokenType(e){if(e==="Identifier"||e==="from"){return"Identifier"}else if(e==="TrueLiteral"||e==="FalseLiteral"){return"Boolean"}else if(e==="VersionLiteral"){return"Version"}else if(e==="StringLiteral"){return"String"}else if(ks.includes(e)){return"Type"}else if(e==="NumberUnit"){return"Subdenomination"}else if(e==="DecimalNumber"){return"Numeric"}else if(e==="HexLiteral"){return"Hex"}else if(e==="ReservedKeyword"){return"Reserved"}else if(/^\W+$/.test(e)){return"Punctuator"}else{return"Keyword"}}function getTokenTypeMap(){return Rs.split("\n").map((e=>rsplit(e,"="))).reduce(((e,[t,r])=>{e[parseInt(r,10)]=normalizeTokenType(t);return e}),{})}function buildTokenList(e,t){const r=getTokenTypeMap();const i=e.map((e=>{var i,n;const s=getTokenType(r[e.type]);const o={type:s,value:e.text};if(t.range===true){o.range=[e.startIndex,e.stopIndex+1]}if(t.loc===true){o.loc={start:{line:e.line,column:e.charPositionInLine},end:{line:e.line,column:e.charPositionInLine+((n=(i=e.text)==null?void 0:i.length)!=null?n:0)}}}return o}));return i}var Ps=class extends Error{constructor(e){super();const{message:t,line:r,column:i}=e.errors[0];this.message=`${t} (${r}:${i})`;this.errors=e.errors;if(Error.captureStackTrace!==void 0){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}}};function tokenize(e,t={}){const r=new ni.ANTLRInputStream(e);const i=new hi(r);return buildTokenList(i.getAllTokens(),t)}function parse(e,t={}){const r=new ni.ANTLRInputStream(e);const i=new hi(r);const n=new ni.CommonTokenStream(i);const s=new Si(n);const o=new Ns;i.removeErrorListeners();i.addErrorListener(o);s.removeErrorListeners();s.addErrorListener(o);s.buildParseTree=true;const a=s.sourceUnit();const l=new Es(t);l.visit(a);const u=l.result;if(u===null){throw new Error("ast should never be null")}let c=[];if(t.tokens===true){c=buildTokenList(n.getTokens(),t)}if(t.tolerant!==true&&o.hasErrors()){throw new Ps({errors:o.getErrors()})}if(t.tolerant===true&&o.hasErrors()){u.errors=o.getErrors()}if(t.tokens===true){u.tokens=c}return u}function _isASTNode(e){if(typeof e!=="object"||e===null){return false}const t=e;if(Object.prototype.hasOwnProperty.call(t,"type")&&typeof t.type==="string"){return bs.includes(t.type)}return false}function visit(e,t,r){if(Array.isArray(e)){e.forEach((e=>visit(e,t,r)))}if(!_isASTNode(e))return;let i=true;if(t[e.type]!==void 0){i=t[e.type](e,r)}if(i===false)return;for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){visit(e[r],t,e)}}const n=e.type+":exit";if(t[n]!==void 0){t[n](e,r)}}0&&0;
|
|
3
|
-
/*!
|
|
4
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
5
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
6
|
-
*/
|
|
7
|
-
/*! https://mths.be/codepointat v0.2.0 by @mathias */
|
|
8
|
-
/*! https://mths.be/fromcodepoint v0.2.1 by @mathias */},2068:(e,t,r)=>{"use strict";e=r.nmd(e);const wrapAnsi16=(e,t)=>(...r)=>{const i=e(...r);return`[${i+t}m`};const wrapAnsi256=(e,t)=>(...r)=>{const i=e(...r);return`[${38+t};5;${i}m`};const wrapAnsi16m=(e,t)=>(...r)=>{const i=e(...r);return`[${38+t};2;${i[0]};${i[1]};${i[2]}m`};const ansi2ansi=e=>e;const rgb2rgb=(e,t,r)=>[e,t,r];const setLazyProperty=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const i=r();Object.defineProperty(e,t,{value:i,enumerable:true,configurable:true});return i},enumerable:true,configurable:true})};let i;const makeDynamicStyles=(e,t,n,s)=>{if(i===undefined){i=r(3053)}const o=s?10:0;const a={};for(const[r,s]of Object.entries(i)){const i=r==="ansi16"?"ansi":r;if(r===t){a[i]=e(n,o)}else if(typeof s==="object"){a[i]=e(s[t],o)}}return a};function assembleStyles(){const e=new Map;const t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright;t.bgColor.bgGray=t.bgColor.bgBlackBright;t.color.grey=t.color.blackBright;t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,i]of Object.entries(t)){for(const[r,n]of Object.entries(i)){t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`};i[r]=t[r];e.set(n[0],n[1])}Object.defineProperty(t,r,{value:i,enumerable:false})}Object.defineProperty(t,"codes",{value:e,enumerable:false});t.color.close="[39m";t.bgColor.close="[49m";setLazyProperty(t.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(t.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(t.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(t.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(t.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return t}Object.defineProperty(e,"exports",{enumerable:true,get:assembleStyles})},7294:(e,t,r)=>{const i=r(8510);const n={};for(const e of Object.keys(i)){n[i[e]]=e}const s={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=s;for(const e of Object.keys(s)){if(!("channels"in s[e])){throw new Error("missing channels property: "+e)}if(!("labels"in s[e])){throw new Error("missing channel labels property: "+e)}if(s[e].labels.length!==s[e].channels){throw new Error("channel and label counts mismatch: "+e)}const{channels:t,labels:r}=s[e];delete s[e].channels;delete s[e].labels;Object.defineProperty(s[e],"channels",{value:t});Object.defineProperty(s[e],"labels",{value:r})}s.rgb.hsl=function(e){const t=e[0]/255;const r=e[1]/255;const i=e[2]/255;const n=Math.min(t,r,i);const s=Math.max(t,r,i);const o=s-n;let a;let l;if(s===n){a=0}else if(t===s){a=(r-i)/o}else if(r===s){a=2+(i-t)/o}else if(i===s){a=4+(t-r)/o}a=Math.min(a*60,360);if(a<0){a+=360}const u=(n+s)/2;if(s===n){l=0}else if(u<=.5){l=o/(s+n)}else{l=o/(2-s-n)}return[a,l*100,u*100]};s.rgb.hsv=function(e){let t;let r;let i;let n;let s;const o=e[0]/255;const a=e[1]/255;const l=e[2]/255;const u=Math.max(o,a,l);const c=u-Math.min(o,a,l);const diffc=function(e){return(u-e)/6/c+1/2};if(c===0){n=0;s=0}else{s=c/u;t=diffc(o);r=diffc(a);i=diffc(l);if(o===u){n=i-r}else if(a===u){n=1/3+t-i}else if(l===u){n=2/3+r-t}if(n<0){n+=1}else if(n>1){n-=1}}return[n*360,s*100,u*100]};s.rgb.hwb=function(e){const t=e[0];const r=e[1];let i=e[2];const n=s.rgb.hsl(e)[0];const o=1/255*Math.min(t,Math.min(r,i));i=1-1/255*Math.max(t,Math.max(r,i));return[n,o*100,i*100]};s.rgb.cmyk=function(e){const t=e[0]/255;const r=e[1]/255;const i=e[2]/255;const n=Math.min(1-t,1-r,1-i);const s=(1-t-n)/(1-n)||0;const o=(1-r-n)/(1-n)||0;const a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}s.rgb.keyword=function(e){const t=n[e];if(t){return t}let r=Infinity;let s;for(const t of Object.keys(i)){const n=i[t];const o=comparativeDistance(e,n);if(o<r){r=o;s=t}}return s};s.keyword.rgb=function(e){return i[e]};s.rgb.xyz=function(e){let t=e[0]/255;let r=e[1]/255;let i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;const n=t*.4124+r*.3576+i*.1805;const s=t*.2126+r*.7152+i*.0722;const o=t*.0193+r*.1192+i*.9505;return[n*100,s*100,o*100]};s.rgb.lab=function(e){const t=s.rgb.xyz(e);let r=t[0];let i=t[1];let n=t[2];r/=95.047;i/=100;n/=108.883;r=r>.008856?r**(1/3):7.787*r+16/116;i=i>.008856?i**(1/3):7.787*i+16/116;n=n>.008856?n**(1/3):7.787*n+16/116;const o=116*i-16;const a=500*(r-i);const l=200*(i-n);return[o,a,l]};s.hsl.rgb=function(e){const t=e[0]/360;const r=e[1]/100;const i=e[2]/100;let n;let s;let o;if(r===0){o=i*255;return[o,o,o]}if(i<.5){n=i*(1+r)}else{n=i+r-i*r}const a=2*i-n;const l=[0,0,0];for(let e=0;e<3;e++){s=t+1/3*-(e-1);if(s<0){s++}if(s>1){s--}if(6*s<1){o=a+(n-a)*6*s}else if(2*s<1){o=n}else if(3*s<2){o=a+(n-a)*(2/3-s)*6}else{o=a}l[e]=o*255}return l};s.hsl.hsv=function(e){const t=e[0];let r=e[1]/100;let i=e[2]/100;let n=r;const s=Math.max(i,.01);i*=2;r*=i<=1?i:2-i;n*=s<=1?s:2-s;const o=(i+r)/2;const a=i===0?2*n/(s+n):2*r/(i+r);return[t,a*100,o*100]};s.hsv.rgb=function(e){const t=e[0]/60;const r=e[1]/100;let i=e[2]/100;const n=Math.floor(t)%6;const s=t-Math.floor(t);const o=255*i*(1-r);const a=255*i*(1-r*s);const l=255*i*(1-r*(1-s));i*=255;switch(n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};s.hsv.hsl=function(e){const t=e[0];const r=e[1]/100;const i=e[2]/100;const n=Math.max(i,.01);let s;let o;o=(2-r)*i;const a=(2-r)*n;s=r*n;s/=a<=1?a:2-a;s=s||0;o/=2;return[t,s*100,o*100]};s.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100;let i=e[2]/100;const n=r+i;let s;if(n>1){r/=n;i/=n}const o=Math.floor(6*t);const a=1-i;s=6*t-o;if((o&1)!==0){s=1-s}const l=r+s*(a-r);let u;let c;let h;switch(o){default:case 6:case 0:u=a;c=l;h=r;break;case 1:u=l;c=a;h=r;break;case 2:u=r;c=a;h=l;break;case 3:u=r;c=l;h=a;break;case 4:u=l;c=r;h=a;break;case 5:u=a;c=r;h=l;break}return[u*255,c*255,h*255]};s.cmyk.rgb=function(e){const t=e[0]/100;const r=e[1]/100;const i=e[2]/100;const n=e[3]/100;const s=1-Math.min(1,t*(1-n)+n);const o=1-Math.min(1,r*(1-n)+n);const a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};s.xyz.rgb=function(e){const t=e[0]/100;const r=e[1]/100;const i=e[2]/100;let n;let s;let o;n=t*3.2406+r*-1.5372+i*-.4986;s=t*-.9689+r*1.8758+i*.0415;o=t*.0557+r*-.204+i*1.057;n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92;s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92;o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92;n=Math.min(Math.max(0,n),1);s=Math.min(Math.max(0,s),1);o=Math.min(Math.max(0,o),1);return[n*255,s*255,o*255]};s.xyz.lab=function(e){let t=e[0];let r=e[1];let i=e[2];t/=95.047;r/=100;i/=108.883;t=t>.008856?t**(1/3):7.787*t+16/116;r=r>.008856?r**(1/3):7.787*r+16/116;i=i>.008856?i**(1/3):7.787*i+16/116;const n=116*r-16;const s=500*(t-r);const o=200*(r-i);return[n,s,o]};s.lab.xyz=function(e){const t=e[0];const r=e[1];const i=e[2];let n;let s;let o;s=(t+16)/116;n=r/500+s;o=s-i/200;const a=s**3;const l=n**3;const u=o**3;s=a>.008856?a:(s-16/116)/7.787;n=l>.008856?l:(n-16/116)/7.787;o=u>.008856?u:(o-16/116)/7.787;n*=95.047;s*=100;o*=108.883;return[n,s,o]};s.lab.lch=function(e){const t=e[0];const r=e[1];const i=e[2];let n;const s=Math.atan2(i,r);n=s*360/2/Math.PI;if(n<0){n+=360}const o=Math.sqrt(r*r+i*i);return[t,o,n]};s.lch.lab=function(e){const t=e[0];const r=e[1];const i=e[2];const n=i/360*2*Math.PI;const s=r*Math.cos(n);const o=r*Math.sin(n);return[t,s,o]};s.rgb.ansi16=function(e,t=null){const[r,i,n]=e;let o=t===null?s.rgb.hsv(e)[2]:t;o=Math.round(o/50);if(o===0){return 30}let a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));if(o===2){a+=60}return a};s.hsv.ansi16=function(e){return s.rgb.ansi16(s.hsv.rgb(e),e[2])};s.rgb.ansi256=function(e){const t=e[0];const r=e[1];const i=e[2];if(t===r&&r===i){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}const n=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};s.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}const r=(~~(e>50)+1)*.5;const i=(t&1)*r*255;const n=(t>>1&1)*r*255;const s=(t>>2&1)*r*255;return[i,n,s]};s.ansi256.rgb=function(e){if(e>=232){const t=(e-232)*10+8;return[t,t,t]}e-=16;let t;const r=Math.floor(e/36)/5*255;const i=Math.floor((t=e%36)/6)/5*255;const n=t%6/5*255;return[r,i,n]};s.rgb.hex=function(e){const t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);const r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};s.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}let r=t[0];if(t[0].length===3){r=r.split("").map((e=>e+e)).join("")}const i=parseInt(r,16);const n=i>>16&255;const s=i>>8&255;const o=i&255;return[n,s,o]};s.rgb.hcg=function(e){const t=e[0]/255;const r=e[1]/255;const i=e[2]/255;const n=Math.max(Math.max(t,r),i);const s=Math.min(Math.min(t,r),i);const o=n-s;let a;let l;if(o<1){a=s/(1-o)}else{a=0}if(o<=0){l=0}else if(n===t){l=(r-i)/o%6}else if(n===r){l=2+(i-t)/o}else{l=4+(t-r)/o}l/=6;l%=1;return[l*360,o*100,a*100]};s.hsl.hcg=function(e){const t=e[1]/100;const r=e[2]/100;const i=r<.5?2*t*r:2*t*(1-r);let n=0;if(i<1){n=(r-.5*i)/(1-i)}return[e[0],i*100,n*100]};s.hsv.hcg=function(e){const t=e[1]/100;const r=e[2]/100;const i=t*r;let n=0;if(i<1){n=(r-i)/(1-i)}return[e[0],i*100,n*100]};s.hcg.rgb=function(e){const t=e[0]/360;const r=e[1]/100;const i=e[2]/100;if(r===0){return[i*255,i*255,i*255]}const n=[0,0,0];const s=t%1*6;const o=s%1;const a=1-o;let l=0;switch(Math.floor(s)){case 0:n[0]=1;n[1]=o;n[2]=0;break;case 1:n[0]=a;n[1]=1;n[2]=0;break;case 2:n[0]=0;n[1]=1;n[2]=o;break;case 3:n[0]=0;n[1]=a;n[2]=1;break;case 4:n[0]=o;n[1]=0;n[2]=1;break;default:n[0]=1;n[1]=0;n[2]=a}l=(1-r)*i;return[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};s.hcg.hsv=function(e){const t=e[1]/100;const r=e[2]/100;const i=t+r*(1-t);let n=0;if(i>0){n=t/i}return[e[0],n*100,i*100]};s.hcg.hsl=function(e){const t=e[1]/100;const r=e[2]/100;const i=r*(1-t)+.5*t;let n=0;if(i>0&&i<.5){n=t/(2*i)}else if(i>=.5&&i<1){n=t/(2*(1-i))}return[e[0],n*100,i*100]};s.hcg.hwb=function(e){const t=e[1]/100;const r=e[2]/100;const i=t+r*(1-t);return[e[0],(i-t)*100,(1-i)*100]};s.hwb.hcg=function(e){const t=e[1]/100;const r=e[2]/100;const i=1-r;const n=i-t;let s=0;if(n<1){s=(i-n)/(1-n)}return[e[0],n*100,s*100]};s.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};s.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};s.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};s.gray.hsl=function(e){return[0,0,e[0]]};s.gray.hsv=s.gray.hsl;s.gray.hwb=function(e){return[0,100,e[0]]};s.gray.cmyk=function(e){return[0,0,0,e[0]]};s.gray.lab=function(e){return[e[0],0,0]};s.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255;const r=(t<<16)+(t<<8)+t;const i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};s.rgb.gray=function(e){const t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},3053:(e,t,r)=>{const i=r(7294);const n=r(6586);const s={};const o=Object.keys(i);function wrapRaw(e){const wrappedFn=function(...t){const r=t[0];if(r===undefined||r===null){return r}if(r.length>1){t=r}return e(t)};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}function wrapRounded(e){const wrappedFn=function(...t){const r=t[0];if(r===undefined||r===null){return r}if(r.length>1){t=r}const i=e(t);if(typeof i==="object"){for(let e=i.length,t=0;t<e;t++){i[t]=Math.round(i[t])}}return i};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}o.forEach((e=>{s[e]={};Object.defineProperty(s[e],"channels",{value:i[e].channels});Object.defineProperty(s[e],"labels",{value:i[e].labels});const t=n(e);const r=Object.keys(t);r.forEach((r=>{const i=t[r];s[e][r]=wrapRounded(i);s[e][r].raw=wrapRaw(i)}))}));e.exports=s},6586:(e,t,r)=>{const i=r(7294);function buildGraph(){const e={};const t=Object.keys(i);for(let r=t.length,i=0;i<r;i++){e[t[i]]={distance:-1,parent:null}}return e}function deriveBFS(e){const t=buildGraph();const r=[e];t[e].distance=0;while(r.length){const e=r.pop();const n=Object.keys(i[e]);for(let i=n.length,s=0;s<i;s++){const i=n[s];const o=t[i];if(o.distance===-1){o.distance=t[e].distance+1;o.parent=e;r.unshift(i)}}}return t}function link(e,t){return function(r){return t(e(r))}}function wrapConversion(e,t){const r=[t[e].parent,e];let n=i[t[e].parent][e];let s=t[e].parent;while(t[s].parent){r.unshift(t[s].parent);n=link(i[t[s].parent][s],n);s=t[s].parent}n.conversion=r;return n}e.exports=function(e){const t=deriveBFS(e);const r={};const i=Object.keys(t);for(let e=i.length,n=0;n<e;n++){const e=i[n];const s=t[e];if(s.parent===null){continue}r[e]=wrapConversion(e,t)}return r}},991:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=asyncify;var i=r(9658);var n=_interopRequireDefault(i);var s=r(729);var o=_interopRequireDefault(s);var a=r(7456);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncify(e){if((0,a.isAsync)(e)){return function(...t){const r=t.pop();const i=e.apply(this,t);return handlePromise(i,r)}}return(0,n.default)((function(t,r){var i;try{i=e.apply(this,t)}catch(e){return r(e)}if(i&&typeof i.then==="function"){return handlePromise(i,r)}else{r(null,i)}}))}function handlePromise(e,t){return e.then((e=>{invokeCallback(t,null,e)}),(e=>{invokeCallback(t,e&&e.message?e:new Error(e))}))}function invokeCallback(e,t,r){try{e(t,r)}catch(e){(0,o.default)((e=>{throw e}),e)}}e.exports=t["default"]},5460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(7157);var n=_interopRequireDefault(i);var s=r(8810);var o=_interopRequireDefault(s);var a=r(9342);var l=_interopRequireDefault(a);var u=r(7260);var c=_interopRequireDefault(u);var h=r(1990);var d=_interopRequireDefault(h);var p=r(7456);var m=_interopRequireDefault(p);var g=r(3887);var y=_interopRequireDefault(g);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function eachOfArrayLike(e,t,r){r=(0,c.default)(r);var i=0,n=0,{length:s}=e,a=false;if(s===0){r(null)}function iteratorCallback(e,t){if(e===false){a=true}if(a===true)return;if(e){r(e)}else if(++n===s||t===o.default){r(null)}}for(;i<s;i++){t(e[i],i,(0,d.default)(iteratorCallback))}}function eachOfGeneric(e,t,r){return(0,l.default)(e,Infinity,t,r)}function eachOf(e,t,r){var i=(0,n.default)(e)?eachOfArrayLike:eachOfGeneric;return i(e,(0,m.default)(t),r)}t["default"]=(0,y.default)(eachOf,3);e.exports=t["default"]},9342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(6658);var n=_interopRequireDefault(i);var s=r(7456);var o=_interopRequireDefault(s);var a=r(3887);var l=_interopRequireDefault(a);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function eachOfLimit(e,t,r,i){return(0,n.default)(t)(e,(0,o.default)(r),i)}t["default"]=(0,l.default)(eachOfLimit,4);e.exports=t["default"]},1336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(9342);var n=_interopRequireDefault(i);var s=r(3887);var o=_interopRequireDefault(s);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function eachOfSeries(e,t,r){return(0,n.default)(e,1,t,r)}t["default"]=(0,o.default)(eachOfSeries,3);e.exports=t["default"]},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(5460);var n=_interopRequireDefault(i);var s=r(4674);var o=_interopRequireDefault(s);var a=r(7456);var l=_interopRequireDefault(a);var u=r(3887);var c=_interopRequireDefault(u);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function eachLimit(e,t,r){return(0,n.default)(e,(0,o.default)((0,l.default)(t)),r)}t["default"]=(0,c.default)(eachLimit,3);e.exports=t["default"]},2718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=asyncEachOfLimit;var i=r(8810);var n=_interopRequireDefault(i);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function asyncEachOfLimit(e,t,r,i){let s=false;let o=false;let a=false;let l=0;let u=0;function replenish(){if(l>=t||a||s)return;a=true;e.next().then((({value:e,done:t})=>{if(o||s)return;a=false;if(t){s=true;if(l<=0){i(null)}return}l++;r(e,u,iterateeCallback);u++;replenish()})).catch(handleError)}function iterateeCallback(e,t){l-=1;if(o)return;if(e)return handleError(e);if(e===false){s=true;o=true;return}if(t===n.default||s&&l<=0){s=true;return i(null)}replenish()}function handleError(e){if(o)return;a=false;s=true;i(e)}replenish()}e.exports=t["default"]},3887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=awaitify;function awaitify(e,t=e.length){if(!t)throw new Error("arity is undefined");function awaitable(...r){if(typeof r[t-1]==="function"){return e.apply(this,r)}return new Promise(((i,n)=>{r[t-1]=(e,...t)=>{if(e)return n(e);i(t.length>1?t:t[0])};e.apply(this,r)}))}return awaitable}e.exports=t["default"]},8810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r={};t["default"]=r;e.exports=t["default"]},6658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(7260);var n=_interopRequireDefault(i);var s=r(1420);var o=_interopRequireDefault(s);var a=r(1990);var l=_interopRequireDefault(a);var u=r(7456);var c=r(2718);var h=_interopRequireDefault(c);var d=r(8810);var p=_interopRequireDefault(d);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t["default"]=e=>(t,r,i)=>{i=(0,n.default)(i);if(e<=0){throw new RangeError("concurrency limit cannot be less than 1")}if(!t){return i(null)}if((0,u.isAsyncGenerator)(t)){return(0,h.default)(t,e,r,i)}if((0,u.isAsyncIterable)(t)){return(0,h.default)(t[Symbol.asyncIterator](),e,r,i)}var s=(0,o.default)(t);var a=false;var c=false;var d=0;var m=false;function iterateeCallback(e,t){if(c)return;d-=1;if(e){a=true;i(e)}else if(e===false){a=true;c=true}else if(t===p.default||a&&d<=0){a=true;return i(null)}else if(!m){replenish()}}function replenish(){m=true;while(d<e&&!a){var t=s();if(t===null){a=true;if(d<=0){i(null)}return}d+=1;r(t.value,t.key,(0,l.default)(iterateeCallback))}m=false}replenish()};e.exports=t["default"]},7645:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()};e.exports=t["default"]},9658:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=function(e){return function(...t){var r=t.pop();return e.call(this,t,r)}};e.exports=t["default"]},7157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isArrayLike;function isArrayLike(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}e.exports=t["default"]},1420:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=createIterator;var i=r(7157);var n=_interopRequireDefault(i);var s=r(7645);var o=_interopRequireDefault(s);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function createArrayIterator(e){var t=-1;var r=e.length;return function next(){return++t<r?{value:e[t],key:t}:null}}function createES2015Iterator(e){var t=-1;return function next(){var r=e.next();if(r.done)return null;t++;return{value:r.value,key:t}}}function createObjectIterator(e){var t=e?Object.keys(e):[];var r=-1;var i=t.length;return function next(){var n=t[++r];if(n==="__proto__"){return next()}return r<i?{value:e[n],key:n}:null}}function createIterator(e){if((0,n.default)(e)){return createArrayIterator(e)}var t=(0,o.default)(e);return t?createES2015Iterator(t):createObjectIterator(e)}e.exports=t["default"]},7260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=once;function once(e){function wrapper(...t){if(e===null)return;var r=e;e=null;r.apply(this,t)}Object.assign(wrapper,e);return wrapper}e.exports=t["default"]},1990:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=onlyOnce;function onlyOnce(e){return function(...t){if(e===null)throw new Error("Callback was already called.");var r=e;e=null;r.apply(this,t)}}e.exports=t["default"]},3221:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var i=r(7157);var n=_interopRequireDefault(i);var s=r(7456);var o=_interopRequireDefault(s);var a=r(3887);var l=_interopRequireDefault(a);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}t["default"]=(0,l.default)(((e,t,r)=>{var i=(0,n.default)(t)?[]:{};e(t,((e,t,r)=>{(0,o.default)(e)(((e,...n)=>{if(n.length<2){[n]=n}i[t]=n;r(e)}))}),(e=>r(e,i)))}),3);e.exports=t["default"]},729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fallback=fallback;t.wrap=wrap;var r=t.hasQueueMicrotask=typeof queueMicrotask==="function"&&queueMicrotask;var i=t.hasSetImmediate=typeof setImmediate==="function"&&setImmediate;var n=t.hasNextTick=typeof process==="object"&&typeof process.nextTick==="function";function fallback(e){setTimeout(e,0)}function wrap(e){return(t,...r)=>e((()=>t(...r)))}var s;if(r){s=queueMicrotask}else if(i){s=setImmediate}else if(n){s=process.nextTick}else{s=fallback}t["default"]=wrap(s)},4674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_withoutIndex;function _withoutIndex(e){return(t,r,i)=>e(t,i)}e.exports=t["default"]},7456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=undefined;var i=r(991);var n=_interopRequireDefault(i);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function isAsync(e){return e[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(e){return typeof e[Symbol.asyncIterator]==="function"}function wrapAsync(e){if(typeof e!=="function")throw new Error("expected a function");return isAsync(e)?(0,n.default)(e):e}t["default"]=wrapAsync;t.isAsync=isAsync;t.isAsyncGenerator=isAsyncGenerator;t.isAsyncIterable=isAsyncIterable},9619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=series;var i=r(3221);var n=_interopRequireDefault(i);var s=r(1336);var o=_interopRequireDefault(s);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function series(e,t){return(0,n.default)(o.default,e,t)}e.exports=t["default"]},6641:function(e,t,r){e=r.nmd(e);(function(e,t){"use strict";function assert(e,t){if(!e)throw new Error(t||"Assertion failed")}function inherits(e,t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}function BN(e,t,r){if(BN.isBN(e)){return e}this.negative=0;this.words=null;this.length=0;this.red=null;if(e!==null){if(t==="le"||t==="be"){r=t;t=10}this._init(e||0,t||10,r||"be")}}if(typeof e==="object"){e.exports=BN}else{t.BN=BN}BN.BN=BN;BN.wordSize=26;var i;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined"){i=window.Buffer}else{i=r(4300).Buffer}}catch(e){}BN.isBN=function isBN(e){if(e instanceof BN){return true}return e!==null&&typeof e==="object"&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)};BN.max=function max(e,t){if(e.cmp(t)>0)return e;return t};BN.min=function min(e,t){if(e.cmp(t)<0)return e;return t};BN.prototype._init=function init(e,t,r){if(typeof e==="number"){return this._initNumber(e,t,r)}if(typeof e==="object"){return this._initArray(e,t,r)}if(t==="hex"){t=16}assert(t===(t|0)&&t>=2&&t<=36);e=e.toString().replace(/\s+/g,"");var i=0;if(e[0]==="-"){i++;this.negative=1}if(i<e.length){if(t===16){this._parseHex(e,i,r)}else{this._parseBase(e,t,i);if(r==="le"){this._initArray(this.toArray(),t,r)}}}};BN.prototype._initNumber=function _initNumber(e,t,r){if(e<0){this.negative=1;e=-e}if(e<67108864){this.words=[e&67108863];this.length=1}else if(e<4503599627370496){this.words=[e&67108863,e/67108864&67108863];this.length=2}else{assert(e<9007199254740992);this.words=[e&67108863,e/67108864&67108863,1];this.length=3}if(r!=="le")return;this._initArray(this.toArray(),t,r)};BN.prototype._initArray=function _initArray(e,t,r){assert(typeof e.length==="number");if(e.length<=0){this.words=[0];this.length=1;return this}this.length=Math.ceil(e.length/3);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var n,s;var o=0;if(r==="be"){for(i=e.length-1,n=0;i>=0;i-=3){s=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[n]|=s<<o&67108863;this.words[n+1]=s>>>26-o&67108863;o+=24;if(o>=26){o-=26;n++}}}else if(r==="le"){for(i=0,n=0;i<e.length;i+=3){s=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[n]|=s<<o&67108863;this.words[n+1]=s>>>26-o&67108863;o+=24;if(o>=26){o-=26;n++}}}return this._strip()};function parseHex4Bits(e,t){var r=e.charCodeAt(t);if(r>=48&&r<=57){return r-48}else if(r>=65&&r<=70){return r-55}else if(r>=97&&r<=102){return r-87}else{assert(false,"Invalid character in "+e)}}function parseHexByte(e,t,r){var i=parseHex4Bits(e,r);if(r-1>=t){i|=parseHex4Bits(e,r-1)<<4}return i}BN.prototype._parseHex=function _parseHex(e,t,r){this.length=Math.ceil((e.length-t)/6);this.words=new Array(this.length);for(var i=0;i<this.length;i++){this.words[i]=0}var n=0;var s=0;var o;if(r==="be"){for(i=e.length-1;i>=t;i-=2){o=parseHexByte(e,t,i)<<n;this.words[s]|=o&67108863;if(n>=18){n-=18;s+=1;this.words[s]|=o>>>26}else{n+=8}}}else{var a=e.length-t;for(i=a%2===0?t+1:t;i<e.length;i+=2){o=parseHexByte(e,t,i)<<n;this.words[s]|=o&67108863;if(n>=18){n-=18;s+=1;this.words[s]|=o>>>26}else{n+=8}}}this._strip()};function parseBase(e,t,r,i){var n=0;var s=0;var o=Math.min(e.length,r);for(var a=t;a<o;a++){var l=e.charCodeAt(a)-48;n*=i;if(l>=49){s=l-49+10}else if(l>=17){s=l-17+10}else{s=l}assert(l>=0&&s<i,"Invalid character");n+=s}return n}BN.prototype._parseBase=function _parseBase(e,t,r){this.words=[0];this.length=1;for(var i=0,n=1;n<=67108863;n*=t){i++}i--;n=n/t|0;var s=e.length-r;var o=s%i;var a=Math.min(s,s-o)+r;var l=0;for(var u=r;u<a;u+=i){l=parseBase(e,u,u+i,t);this.imuln(n);if(this.words[0]+l<67108864){this.words[0]+=l}else{this._iaddn(l)}}if(o!==0){var c=1;l=parseBase(e,u,e.length,t);for(u=0;u<o;u++){c*=t}this.imuln(c);if(this.words[0]+l<67108864){this.words[0]+=l}else{this._iaddn(l)}}this._strip()};BN.prototype.copy=function copy(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++){e.words[t]=this.words[t]}e.length=this.length;e.negative=this.negative;e.red=this.red};function move(e,t){e.words=t.words;e.length=t.length;e.negative=t.negative;e.red=t.red}BN.prototype._move=function _move(e){move(e,this)};BN.prototype.clone=function clone(){var e=new BN(null);this.copy(e);return e};BN.prototype._expand=function _expand(e){while(this.length<e){this.words[this.length++]=0}return this};BN.prototype._strip=function strip(){while(this.length>1&&this.words[this.length-1]===0){this.length--}return this._normSign()};BN.prototype._normSign=function _normSign(){if(this.length===1&&this.words[0]===0){this.negative=0}return this};if(typeof Symbol!=="undefined"&&typeof Symbol.for==="function"){try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(e){BN.prototype.inspect=inspect}}else{BN.prototype.inspect=inspect}function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var n=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"];var s=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];var o=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(e,t){e=e||10;t=t|0||1;var r;if(e===16||e==="hex"){r="";var i=0;var a=0;for(var l=0;l<this.length;l++){var u=this.words[l];var c=((u<<i|a)&16777215).toString(16);a=u>>>24-i&16777215;i+=2;if(i>=26){i-=26;l--}if(a!==0||l!==this.length-1){r=n[6-c.length]+c+r}else{r=c+r}}if(a!==0){r=a.toString(16)+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}if(e===(e|0)&&e>=2&&e<=36){var h=s[e];var d=o[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modrn(d).toString(e);p=p.idivn(d);if(!p.isZero()){r=n[h-m.length]+m+r}else{r=m+r}}if(this.isZero()){r="0"+r}while(r.length%t!==0){r="0"+r}if(this.negative!==0){r="-"+r}return r}assert(false,"Base should be between 2 and 36")};BN.prototype.toNumber=function toNumber(){var e=this.words[0];if(this.length===2){e+=this.words[1]*67108864}else if(this.length===3&&this.words[2]===1){e+=4503599627370496+this.words[1]*67108864}else if(this.length>2){assert(false,"Number can only safely store up to 53 bits")}return this.negative!==0?-e:e};BN.prototype.toJSON=function toJSON(){return this.toString(16,2)};if(i){BN.prototype.toBuffer=function toBuffer(e,t){return this.toArrayLike(i,e,t)}}BN.prototype.toArray=function toArray(e,t){return this.toArrayLike(Array,e,t)};var a=function allocate(e,t){if(e.allocUnsafe){return e.allocUnsafe(t)}return new e(t)};BN.prototype.toArrayLike=function toArrayLike(e,t,r){this._strip();var i=this.byteLength();var n=r||Math.max(1,i);assert(i<=n,"byte array longer than desired length");assert(n>0,"Requested array length <= 0");var s=a(e,n);var o=t==="le"?"LE":"BE";this["_toArrayLike"+o](s,i);return s};BN.prototype._toArrayLikeLE=function _toArrayLikeLE(e,t){var r=0;var i=0;for(var n=0,s=0;n<this.length;n++){var o=this.words[n]<<s|i;e[r++]=o&255;if(r<e.length){e[r++]=o>>8&255}if(r<e.length){e[r++]=o>>16&255}if(s===6){if(r<e.length){e[r++]=o>>24&255}i=0;s=0}else{i=o>>>24;s+=2}}if(r<e.length){e[r++]=i;while(r<e.length){e[r++]=0}}};BN.prototype._toArrayLikeBE=function _toArrayLikeBE(e,t){var r=e.length-1;var i=0;for(var n=0,s=0;n<this.length;n++){var o=this.words[n]<<s|i;e[r--]=o&255;if(r>=0){e[r--]=o>>8&255}if(r>=0){e[r--]=o>>16&255}if(s===6){if(r>=0){e[r--]=o>>24&255}i=0;s=0}else{i=o>>>24;s+=2}}if(r>=0){e[r--]=i;while(r>=0){e[r--]=0}}};if(Math.clz32){BN.prototype._countBits=function _countBits(e){return 32-Math.clz32(e)}}else{BN.prototype._countBits=function _countBits(e){var t=e;var r=0;if(t>=4096){r+=13;t>>>=13}if(t>=64){r+=7;t>>>=7}if(t>=8){r+=4;t>>>=4}if(t>=2){r+=2;t>>>=2}return r+t}}BN.prototype._zeroBits=function _zeroBits(e){if(e===0)return 26;var t=e;var r=0;if((t&8191)===0){r+=13;t>>>=13}if((t&127)===0){r+=7;t>>>=7}if((t&15)===0){r+=4;t>>>=4}if((t&3)===0){r+=2;t>>>=2}if((t&1)===0){r++}return r};BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1];var t=this._countBits(e);return(this.length-1)*26+t};function toBitArray(e){var t=new Array(e.bitLength());for(var r=0;r<t.length;r++){var i=r/26|0;var n=r%26;t[r]=e.words[i]>>>n&1}return t}BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;var e=0;for(var t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);e+=r;if(r!==26)break}return e};BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)};BN.prototype.toTwos=function toTwos(e){if(this.negative!==0){return this.abs().inotn(e).iaddn(1)}return this.clone()};BN.prototype.fromTwos=function fromTwos(e){if(this.testn(e-1)){return this.notn(e).iaddn(1).ineg()}return this.clone()};BN.prototype.isNeg=function isNeg(){return this.negative!==0};BN.prototype.neg=function neg(){return this.clone().ineg()};BN.prototype.ineg=function ineg(){if(!this.isZero()){this.negative^=1}return this};BN.prototype.iuor=function iuor(e){while(this.length<e.length){this.words[this.length++]=0}for(var t=0;t<e.length;t++){this.words[t]=this.words[t]|e.words[t]}return this._strip()};BN.prototype.ior=function ior(e){assert((this.negative|e.negative)===0);return this.iuor(e)};BN.prototype.or=function or(e){if(this.length>e.length)return this.clone().ior(e);return e.clone().ior(this)};BN.prototype.uor=function uor(e){if(this.length>e.length)return this.clone().iuor(e);return e.clone().iuor(this)};BN.prototype.iuand=function iuand(e){var t;if(this.length>e.length){t=e}else{t=this}for(var r=0;r<t.length;r++){this.words[r]=this.words[r]&e.words[r]}this.length=t.length;return this._strip()};BN.prototype.iand=function iand(e){assert((this.negative|e.negative)===0);return this.iuand(e)};BN.prototype.and=function and(e){if(this.length>e.length)return this.clone().iand(e);return e.clone().iand(this)};BN.prototype.uand=function uand(e){if(this.length>e.length)return this.clone().iuand(e);return e.clone().iuand(this)};BN.prototype.iuxor=function iuxor(e){var t;var r;if(this.length>e.length){t=this;r=e}else{t=e;r=this}for(var i=0;i<r.length;i++){this.words[i]=t.words[i]^r.words[i]}if(this!==t){for(;i<t.length;i++){this.words[i]=t.words[i]}}this.length=t.length;return this._strip()};BN.prototype.ixor=function ixor(e){assert((this.negative|e.negative)===0);return this.iuxor(e)};BN.prototype.xor=function xor(e){if(this.length>e.length)return this.clone().ixor(e);return e.clone().ixor(this)};BN.prototype.uxor=function uxor(e){if(this.length>e.length)return this.clone().iuxor(e);return e.clone().iuxor(this)};BN.prototype.inotn=function inotn(e){assert(typeof e==="number"&&e>=0);var t=Math.ceil(e/26)|0;var r=e%26;this._expand(t);if(r>0){t--}for(var i=0;i<t;i++){this.words[i]=~this.words[i]&67108863}if(r>0){this.words[i]=~this.words[i]&67108863>>26-r}return this._strip()};BN.prototype.notn=function notn(e){return this.clone().inotn(e)};BN.prototype.setn=function setn(e,t){assert(typeof e==="number"&&e>=0);var r=e/26|0;var i=e%26;this._expand(r+1);if(t){this.words[r]=this.words[r]|1<<i}else{this.words[r]=this.words[r]&~(1<<i)}return this._strip()};BN.prototype.iadd=function iadd(e){var t;if(this.negative!==0&&e.negative===0){this.negative=0;t=this.isub(e);this.negative^=1;return this._normSign()}else if(this.negative===0&&e.negative!==0){e.negative=0;t=this.isub(e);e.negative=1;return t._normSign()}var r,i;if(this.length>e.length){r=this;i=e}else{r=e;i=this}var n=0;for(var s=0;s<i.length;s++){t=(r.words[s]|0)+(i.words[s]|0)+n;this.words[s]=t&67108863;n=t>>>26}for(;n!==0&&s<r.length;s++){t=(r.words[s]|0)+n;this.words[s]=t&67108863;n=t>>>26}this.length=r.length;if(n!==0){this.words[this.length]=n;this.length++}else if(r!==this){for(;s<r.length;s++){this.words[s]=r.words[s]}}return this};BN.prototype.add=function add(e){var t;if(e.negative!==0&&this.negative===0){e.negative=0;t=this.sub(e);e.negative^=1;return t}else if(e.negative===0&&this.negative!==0){this.negative=0;t=e.sub(this);this.negative=1;return t}if(this.length>e.length)return this.clone().iadd(e);return e.clone().iadd(this)};BN.prototype.isub=function isub(e){if(e.negative!==0){e.negative=0;var t=this.iadd(e);e.negative=1;return t._normSign()}else if(this.negative!==0){this.negative=0;this.iadd(e);this.negative=1;return this._normSign()}var r=this.cmp(e);if(r===0){this.negative=0;this.length=1;this.words[0]=0;return this}var i,n;if(r>0){i=this;n=e}else{i=e;n=this}var s=0;for(var o=0;o<n.length;o++){t=(i.words[o]|0)-(n.words[o]|0)+s;s=t>>26;this.words[o]=t&67108863}for(;s!==0&&o<i.length;o++){t=(i.words[o]|0)+s;s=t>>26;this.words[o]=t&67108863}if(s===0&&o<i.length&&i!==this){for(;o<i.length;o++){this.words[o]=i.words[o]}}this.length=Math.max(this.length,o);if(i!==this){this.negative=1}return this._strip()};BN.prototype.sub=function sub(e){return this.clone().isub(e)};function smallMulTo(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i;i=i-1|0;var n=e.words[0]|0;var s=t.words[0]|0;var o=n*s;var a=o&67108863;var l=o/67108864|0;r.words[0]=a;for(var u=1;u<i;u++){var c=l>>>26;var h=l&67108863;var d=Math.min(u,t.length-1);for(var p=Math.max(0,u-e.length+1);p<=d;p++){var m=u-p|0;n=e.words[m]|0;s=t.words[p]|0;o=n*s+h;c+=o/67108864|0;h=o&67108863}r.words[u]=h|0;l=c|0}if(l!==0){r.words[u]=l|0}else{r.length--}return r._strip()}var l=function comb10MulTo(e,t,r){var i=e.words;var n=t.words;var s=r.words;var o=0;var a;var l;var u;var c=i[0]|0;var h=c&8191;var d=c>>>13;var p=i[1]|0;var m=p&8191;var g=p>>>13;var y=i[2]|0;var _=y&8191;var v=y>>>13;var b=i[3]|0;var x=b&8191;var T=b>>>13;var w=i[4]|0;var S=w&8191;var E=w>>>13;var A=i[5]|0;var C=A&8191;var N=A>>>13;var O=i[6]|0;var R=O&8191;var k=O>>>13;var P=i[7]|0;var L=P&8191;var I=P>>>13;var M=i[8]|0;var D=M&8191;var F=M>>>13;var j=i[9]|0;var B=j&8191;var U=j>>>13;var H=n[0]|0;var z=H&8191;var K=H>>>13;var V=n[1]|0;var q=V&8191;var Z=V>>>13;var G=n[2]|0;var $=G&8191;var W=G>>>13;var Y=n[3]|0;var J=Y&8191;var Q=Y>>>13;var X=n[4]|0;var ee=X&8191;var te=X>>>13;var re=n[5]|0;var ie=re&8191;var ne=re>>>13;var se=n[6]|0;var oe=se&8191;var ae=se>>>13;var le=n[7]|0;var ue=le&8191;var ce=le>>>13;var he=n[8]|0;var de=he&8191;var fe=he>>>13;var pe=n[9]|0;var me=pe&8191;var ge=pe>>>13;r.negative=e.negative^t.negative;r.length=19;a=Math.imul(h,z);l=Math.imul(h,K);l=l+Math.imul(d,z)|0;u=Math.imul(d,K);var ye=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(ye>>>26)|0;ye&=67108863;a=Math.imul(m,z);l=Math.imul(m,K);l=l+Math.imul(g,z)|0;u=Math.imul(g,K);a=a+Math.imul(h,q)|0;l=l+Math.imul(h,Z)|0;l=l+Math.imul(d,q)|0;u=u+Math.imul(d,Z)|0;var _e=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(_e>>>26)|0;_e&=67108863;a=Math.imul(_,z);l=Math.imul(_,K);l=l+Math.imul(v,z)|0;u=Math.imul(v,K);a=a+Math.imul(m,q)|0;l=l+Math.imul(m,Z)|0;l=l+Math.imul(g,q)|0;u=u+Math.imul(g,Z)|0;a=a+Math.imul(h,$)|0;l=l+Math.imul(h,W)|0;l=l+Math.imul(d,$)|0;u=u+Math.imul(d,W)|0;var ve=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(ve>>>26)|0;ve&=67108863;a=Math.imul(x,z);l=Math.imul(x,K);l=l+Math.imul(T,z)|0;u=Math.imul(T,K);a=a+Math.imul(_,q)|0;l=l+Math.imul(_,Z)|0;l=l+Math.imul(v,q)|0;u=u+Math.imul(v,Z)|0;a=a+Math.imul(m,$)|0;l=l+Math.imul(m,W)|0;l=l+Math.imul(g,$)|0;u=u+Math.imul(g,W)|0;a=a+Math.imul(h,J)|0;l=l+Math.imul(h,Q)|0;l=l+Math.imul(d,J)|0;u=u+Math.imul(d,Q)|0;var be=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(be>>>26)|0;be&=67108863;a=Math.imul(S,z);l=Math.imul(S,K);l=l+Math.imul(E,z)|0;u=Math.imul(E,K);a=a+Math.imul(x,q)|0;l=l+Math.imul(x,Z)|0;l=l+Math.imul(T,q)|0;u=u+Math.imul(T,Z)|0;a=a+Math.imul(_,$)|0;l=l+Math.imul(_,W)|0;l=l+Math.imul(v,$)|0;u=u+Math.imul(v,W)|0;a=a+Math.imul(m,J)|0;l=l+Math.imul(m,Q)|0;l=l+Math.imul(g,J)|0;u=u+Math.imul(g,Q)|0;a=a+Math.imul(h,ee)|0;l=l+Math.imul(h,te)|0;l=l+Math.imul(d,ee)|0;u=u+Math.imul(d,te)|0;var xe=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(xe>>>26)|0;xe&=67108863;a=Math.imul(C,z);l=Math.imul(C,K);l=l+Math.imul(N,z)|0;u=Math.imul(N,K);a=a+Math.imul(S,q)|0;l=l+Math.imul(S,Z)|0;l=l+Math.imul(E,q)|0;u=u+Math.imul(E,Z)|0;a=a+Math.imul(x,$)|0;l=l+Math.imul(x,W)|0;l=l+Math.imul(T,$)|0;u=u+Math.imul(T,W)|0;a=a+Math.imul(_,J)|0;l=l+Math.imul(_,Q)|0;l=l+Math.imul(v,J)|0;u=u+Math.imul(v,Q)|0;a=a+Math.imul(m,ee)|0;l=l+Math.imul(m,te)|0;l=l+Math.imul(g,ee)|0;u=u+Math.imul(g,te)|0;a=a+Math.imul(h,ie)|0;l=l+Math.imul(h,ne)|0;l=l+Math.imul(d,ie)|0;u=u+Math.imul(d,ne)|0;var Te=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Te>>>26)|0;Te&=67108863;a=Math.imul(R,z);l=Math.imul(R,K);l=l+Math.imul(k,z)|0;u=Math.imul(k,K);a=a+Math.imul(C,q)|0;l=l+Math.imul(C,Z)|0;l=l+Math.imul(N,q)|0;u=u+Math.imul(N,Z)|0;a=a+Math.imul(S,$)|0;l=l+Math.imul(S,W)|0;l=l+Math.imul(E,$)|0;u=u+Math.imul(E,W)|0;a=a+Math.imul(x,J)|0;l=l+Math.imul(x,Q)|0;l=l+Math.imul(T,J)|0;u=u+Math.imul(T,Q)|0;a=a+Math.imul(_,ee)|0;l=l+Math.imul(_,te)|0;l=l+Math.imul(v,ee)|0;u=u+Math.imul(v,te)|0;a=a+Math.imul(m,ie)|0;l=l+Math.imul(m,ne)|0;l=l+Math.imul(g,ie)|0;u=u+Math.imul(g,ne)|0;a=a+Math.imul(h,oe)|0;l=l+Math.imul(h,ae)|0;l=l+Math.imul(d,oe)|0;u=u+Math.imul(d,ae)|0;var we=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(we>>>26)|0;we&=67108863;a=Math.imul(L,z);l=Math.imul(L,K);l=l+Math.imul(I,z)|0;u=Math.imul(I,K);a=a+Math.imul(R,q)|0;l=l+Math.imul(R,Z)|0;l=l+Math.imul(k,q)|0;u=u+Math.imul(k,Z)|0;a=a+Math.imul(C,$)|0;l=l+Math.imul(C,W)|0;l=l+Math.imul(N,$)|0;u=u+Math.imul(N,W)|0;a=a+Math.imul(S,J)|0;l=l+Math.imul(S,Q)|0;l=l+Math.imul(E,J)|0;u=u+Math.imul(E,Q)|0;a=a+Math.imul(x,ee)|0;l=l+Math.imul(x,te)|0;l=l+Math.imul(T,ee)|0;u=u+Math.imul(T,te)|0;a=a+Math.imul(_,ie)|0;l=l+Math.imul(_,ne)|0;l=l+Math.imul(v,ie)|0;u=u+Math.imul(v,ne)|0;a=a+Math.imul(m,oe)|0;l=l+Math.imul(m,ae)|0;l=l+Math.imul(g,oe)|0;u=u+Math.imul(g,ae)|0;a=a+Math.imul(h,ue)|0;l=l+Math.imul(h,ce)|0;l=l+Math.imul(d,ue)|0;u=u+Math.imul(d,ce)|0;var Se=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Se>>>26)|0;Se&=67108863;a=Math.imul(D,z);l=Math.imul(D,K);l=l+Math.imul(F,z)|0;u=Math.imul(F,K);a=a+Math.imul(L,q)|0;l=l+Math.imul(L,Z)|0;l=l+Math.imul(I,q)|0;u=u+Math.imul(I,Z)|0;a=a+Math.imul(R,$)|0;l=l+Math.imul(R,W)|0;l=l+Math.imul(k,$)|0;u=u+Math.imul(k,W)|0;a=a+Math.imul(C,J)|0;l=l+Math.imul(C,Q)|0;l=l+Math.imul(N,J)|0;u=u+Math.imul(N,Q)|0;a=a+Math.imul(S,ee)|0;l=l+Math.imul(S,te)|0;l=l+Math.imul(E,ee)|0;u=u+Math.imul(E,te)|0;a=a+Math.imul(x,ie)|0;l=l+Math.imul(x,ne)|0;l=l+Math.imul(T,ie)|0;u=u+Math.imul(T,ne)|0;a=a+Math.imul(_,oe)|0;l=l+Math.imul(_,ae)|0;l=l+Math.imul(v,oe)|0;u=u+Math.imul(v,ae)|0;a=a+Math.imul(m,ue)|0;l=l+Math.imul(m,ce)|0;l=l+Math.imul(g,ue)|0;u=u+Math.imul(g,ce)|0;a=a+Math.imul(h,de)|0;l=l+Math.imul(h,fe)|0;l=l+Math.imul(d,de)|0;u=u+Math.imul(d,fe)|0;var Ee=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Ee>>>26)|0;Ee&=67108863;a=Math.imul(B,z);l=Math.imul(B,K);l=l+Math.imul(U,z)|0;u=Math.imul(U,K);a=a+Math.imul(D,q)|0;l=l+Math.imul(D,Z)|0;l=l+Math.imul(F,q)|0;u=u+Math.imul(F,Z)|0;a=a+Math.imul(L,$)|0;l=l+Math.imul(L,W)|0;l=l+Math.imul(I,$)|0;u=u+Math.imul(I,W)|0;a=a+Math.imul(R,J)|0;l=l+Math.imul(R,Q)|0;l=l+Math.imul(k,J)|0;u=u+Math.imul(k,Q)|0;a=a+Math.imul(C,ee)|0;l=l+Math.imul(C,te)|0;l=l+Math.imul(N,ee)|0;u=u+Math.imul(N,te)|0;a=a+Math.imul(S,ie)|0;l=l+Math.imul(S,ne)|0;l=l+Math.imul(E,ie)|0;u=u+Math.imul(E,ne)|0;a=a+Math.imul(x,oe)|0;l=l+Math.imul(x,ae)|0;l=l+Math.imul(T,oe)|0;u=u+Math.imul(T,ae)|0;a=a+Math.imul(_,ue)|0;l=l+Math.imul(_,ce)|0;l=l+Math.imul(v,ue)|0;u=u+Math.imul(v,ce)|0;a=a+Math.imul(m,de)|0;l=l+Math.imul(m,fe)|0;l=l+Math.imul(g,de)|0;u=u+Math.imul(g,fe)|0;a=a+Math.imul(h,me)|0;l=l+Math.imul(h,ge)|0;l=l+Math.imul(d,me)|0;u=u+Math.imul(d,ge)|0;var Ae=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Ae>>>26)|0;Ae&=67108863;a=Math.imul(B,q);l=Math.imul(B,Z);l=l+Math.imul(U,q)|0;u=Math.imul(U,Z);a=a+Math.imul(D,$)|0;l=l+Math.imul(D,W)|0;l=l+Math.imul(F,$)|0;u=u+Math.imul(F,W)|0;a=a+Math.imul(L,J)|0;l=l+Math.imul(L,Q)|0;l=l+Math.imul(I,J)|0;u=u+Math.imul(I,Q)|0;a=a+Math.imul(R,ee)|0;l=l+Math.imul(R,te)|0;l=l+Math.imul(k,ee)|0;u=u+Math.imul(k,te)|0;a=a+Math.imul(C,ie)|0;l=l+Math.imul(C,ne)|0;l=l+Math.imul(N,ie)|0;u=u+Math.imul(N,ne)|0;a=a+Math.imul(S,oe)|0;l=l+Math.imul(S,ae)|0;l=l+Math.imul(E,oe)|0;u=u+Math.imul(E,ae)|0;a=a+Math.imul(x,ue)|0;l=l+Math.imul(x,ce)|0;l=l+Math.imul(T,ue)|0;u=u+Math.imul(T,ce)|0;a=a+Math.imul(_,de)|0;l=l+Math.imul(_,fe)|0;l=l+Math.imul(v,de)|0;u=u+Math.imul(v,fe)|0;a=a+Math.imul(m,me)|0;l=l+Math.imul(m,ge)|0;l=l+Math.imul(g,me)|0;u=u+Math.imul(g,ge)|0;var Ce=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Ce>>>26)|0;Ce&=67108863;a=Math.imul(B,$);l=Math.imul(B,W);l=l+Math.imul(U,$)|0;u=Math.imul(U,W);a=a+Math.imul(D,J)|0;l=l+Math.imul(D,Q)|0;l=l+Math.imul(F,J)|0;u=u+Math.imul(F,Q)|0;a=a+Math.imul(L,ee)|0;l=l+Math.imul(L,te)|0;l=l+Math.imul(I,ee)|0;u=u+Math.imul(I,te)|0;a=a+Math.imul(R,ie)|0;l=l+Math.imul(R,ne)|0;l=l+Math.imul(k,ie)|0;u=u+Math.imul(k,ne)|0;a=a+Math.imul(C,oe)|0;l=l+Math.imul(C,ae)|0;l=l+Math.imul(N,oe)|0;u=u+Math.imul(N,ae)|0;a=a+Math.imul(S,ue)|0;l=l+Math.imul(S,ce)|0;l=l+Math.imul(E,ue)|0;u=u+Math.imul(E,ce)|0;a=a+Math.imul(x,de)|0;l=l+Math.imul(x,fe)|0;l=l+Math.imul(T,de)|0;u=u+Math.imul(T,fe)|0;a=a+Math.imul(_,me)|0;l=l+Math.imul(_,ge)|0;l=l+Math.imul(v,me)|0;u=u+Math.imul(v,ge)|0;var Ne=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Ne>>>26)|0;Ne&=67108863;a=Math.imul(B,J);l=Math.imul(B,Q);l=l+Math.imul(U,J)|0;u=Math.imul(U,Q);a=a+Math.imul(D,ee)|0;l=l+Math.imul(D,te)|0;l=l+Math.imul(F,ee)|0;u=u+Math.imul(F,te)|0;a=a+Math.imul(L,ie)|0;l=l+Math.imul(L,ne)|0;l=l+Math.imul(I,ie)|0;u=u+Math.imul(I,ne)|0;a=a+Math.imul(R,oe)|0;l=l+Math.imul(R,ae)|0;l=l+Math.imul(k,oe)|0;u=u+Math.imul(k,ae)|0;a=a+Math.imul(C,ue)|0;l=l+Math.imul(C,ce)|0;l=l+Math.imul(N,ue)|0;u=u+Math.imul(N,ce)|0;a=a+Math.imul(S,de)|0;l=l+Math.imul(S,fe)|0;l=l+Math.imul(E,de)|0;u=u+Math.imul(E,fe)|0;a=a+Math.imul(x,me)|0;l=l+Math.imul(x,ge)|0;l=l+Math.imul(T,me)|0;u=u+Math.imul(T,ge)|0;var Oe=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Oe>>>26)|0;Oe&=67108863;a=Math.imul(B,ee);l=Math.imul(B,te);l=l+Math.imul(U,ee)|0;u=Math.imul(U,te);a=a+Math.imul(D,ie)|0;l=l+Math.imul(D,ne)|0;l=l+Math.imul(F,ie)|0;u=u+Math.imul(F,ne)|0;a=a+Math.imul(L,oe)|0;l=l+Math.imul(L,ae)|0;l=l+Math.imul(I,oe)|0;u=u+Math.imul(I,ae)|0;a=a+Math.imul(R,ue)|0;l=l+Math.imul(R,ce)|0;l=l+Math.imul(k,ue)|0;u=u+Math.imul(k,ce)|0;a=a+Math.imul(C,de)|0;l=l+Math.imul(C,fe)|0;l=l+Math.imul(N,de)|0;u=u+Math.imul(N,fe)|0;a=a+Math.imul(S,me)|0;l=l+Math.imul(S,ge)|0;l=l+Math.imul(E,me)|0;u=u+Math.imul(E,ge)|0;var Re=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Re>>>26)|0;Re&=67108863;a=Math.imul(B,ie);l=Math.imul(B,ne);l=l+Math.imul(U,ie)|0;u=Math.imul(U,ne);a=a+Math.imul(D,oe)|0;l=l+Math.imul(D,ae)|0;l=l+Math.imul(F,oe)|0;u=u+Math.imul(F,ae)|0;a=a+Math.imul(L,ue)|0;l=l+Math.imul(L,ce)|0;l=l+Math.imul(I,ue)|0;u=u+Math.imul(I,ce)|0;a=a+Math.imul(R,de)|0;l=l+Math.imul(R,fe)|0;l=l+Math.imul(k,de)|0;u=u+Math.imul(k,fe)|0;a=a+Math.imul(C,me)|0;l=l+Math.imul(C,ge)|0;l=l+Math.imul(N,me)|0;u=u+Math.imul(N,ge)|0;var ke=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(ke>>>26)|0;ke&=67108863;a=Math.imul(B,oe);l=Math.imul(B,ae);l=l+Math.imul(U,oe)|0;u=Math.imul(U,ae);a=a+Math.imul(D,ue)|0;l=l+Math.imul(D,ce)|0;l=l+Math.imul(F,ue)|0;u=u+Math.imul(F,ce)|0;a=a+Math.imul(L,de)|0;l=l+Math.imul(L,fe)|0;l=l+Math.imul(I,de)|0;u=u+Math.imul(I,fe)|0;a=a+Math.imul(R,me)|0;l=l+Math.imul(R,ge)|0;l=l+Math.imul(k,me)|0;u=u+Math.imul(k,ge)|0;var Pe=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Pe>>>26)|0;Pe&=67108863;a=Math.imul(B,ue);l=Math.imul(B,ce);l=l+Math.imul(U,ue)|0;u=Math.imul(U,ce);a=a+Math.imul(D,de)|0;l=l+Math.imul(D,fe)|0;l=l+Math.imul(F,de)|0;u=u+Math.imul(F,fe)|0;a=a+Math.imul(L,me)|0;l=l+Math.imul(L,ge)|0;l=l+Math.imul(I,me)|0;u=u+Math.imul(I,ge)|0;var Le=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Le>>>26)|0;Le&=67108863;a=Math.imul(B,de);l=Math.imul(B,fe);l=l+Math.imul(U,de)|0;u=Math.imul(U,fe);a=a+Math.imul(D,me)|0;l=l+Math.imul(D,ge)|0;l=l+Math.imul(F,me)|0;u=u+Math.imul(F,ge)|0;var Ie=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Ie>>>26)|0;Ie&=67108863;a=Math.imul(B,me);l=Math.imul(B,ge);l=l+Math.imul(U,me)|0;u=Math.imul(U,ge);var Me=(o+a|0)+((l&8191)<<13)|0;o=(u+(l>>>13)|0)+(Me>>>26)|0;Me&=67108863;s[0]=ye;s[1]=_e;s[2]=ve;s[3]=be;s[4]=xe;s[5]=Te;s[6]=we;s[7]=Se;s[8]=Ee;s[9]=Ae;s[10]=Ce;s[11]=Ne;s[12]=Oe;s[13]=Re;s[14]=ke;s[15]=Pe;s[16]=Le;s[17]=Ie;s[18]=Me;if(o!==0){s[19]=o;r.length++}return r};if(!Math.imul){l=smallMulTo}function bigMulTo(e,t,r){r.negative=t.negative^e.negative;r.length=e.length+t.length;var i=0;var n=0;for(var s=0;s<r.length-1;s++){var o=n;n=0;var a=i&67108863;var l=Math.min(s,t.length-1);for(var u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u;var h=e.words[c]|0;var d=t.words[u]|0;var p=h*d;var m=p&67108863;o=o+(p/67108864|0)|0;m=m+a|0;a=m&67108863;o=o+(m>>>26)|0;n+=o>>>26;o&=67108863}r.words[s]=a;i=o;o=n}if(i!==0){r.words[s]=i}else{r.length--}return r._strip()}function jumboMulTo(e,t,r){return bigMulTo(e,t,r)}BN.prototype.mulTo=function mulTo(e,t){var r;var i=this.length+e.length;if(this.length===10&&e.length===10){r=l(this,e,t)}else if(i<63){r=smallMulTo(this,e,t)}else if(i<1024){r=bigMulTo(this,e,t)}else{r=jumboMulTo(this,e,t)}return r};function FFTM(e,t){this.x=e;this.y=t}FFTM.prototype.makeRBT=function makeRBT(e){var t=new Array(e);var r=BN.prototype._countBits(e)-1;for(var i=0;i<e;i++){t[i]=this.revBin(i,r,e)}return t};FFTM.prototype.revBin=function revBin(e,t,r){if(e===0||e===r-1)return e;var i=0;for(var n=0;n<t;n++){i|=(e&1)<<t-n-1;e>>=1}return i};FFTM.prototype.permute=function permute(e,t,r,i,n,s){for(var o=0;o<s;o++){i[o]=t[e[o]];n[o]=r[e[o]]}};FFTM.prototype.transform=function transform(e,t,r,i,n,s){this.permute(s,e,t,r,i,n);for(var o=1;o<n;o<<=1){var a=o<<1;var l=Math.cos(2*Math.PI/a);var u=Math.sin(2*Math.PI/a);for(var c=0;c<n;c+=a){var h=l;var d=u;for(var p=0;p<o;p++){var m=r[c+p];var g=i[c+p];var y=r[c+p+o];var _=i[c+p+o];var v=h*y-d*_;_=h*_+d*y;y=v;r[c+p]=m+y;i[c+p]=g+_;r[c+p+o]=m-y;i[c+p+o]=g-_;if(p!==a){v=l*h-u*d;d=l*d+u*h;h=v}}}}};FFTM.prototype.guessLen13b=function guessLen13b(e,t){var r=Math.max(t,e)|1;var i=r&1;var n=0;for(r=r/2|0;r;r=r>>>1){n++}return 1<<n+1+i};FFTM.prototype.conjugate=function conjugate(e,t,r){if(r<=1)return;for(var i=0;i<r/2;i++){var n=e[i];e[i]=e[r-i-1];e[r-i-1]=n;n=t[i];t[i]=-t[r-i-1];t[r-i-1]=-n}};FFTM.prototype.normalize13b=function normalize13b(e,t){var r=0;for(var i=0;i<t/2;i++){var n=Math.round(e[2*i+1]/t)*8192+Math.round(e[2*i]/t)+r;e[i]=n&67108863;if(n<67108864){r=0}else{r=n/67108864|0}}return e};FFTM.prototype.convert13b=function convert13b(e,t,r,i){var n=0;for(var s=0;s<t;s++){n=n+(e[s]|0);r[2*s]=n&8191;n=n>>>13;r[2*s+1]=n&8191;n=n>>>13}for(s=2*t;s<i;++s){r[s]=0}assert(n===0);assert((n&~8191)===0)};FFTM.prototype.stub=function stub(e){var t=new Array(e);for(var r=0;r<e;r++){t[r]=0}return t};FFTM.prototype.mulp=function mulp(e,t,r){var i=2*this.guessLen13b(e.length,t.length);var n=this.makeRBT(i);var s=this.stub(i);var o=new Array(i);var a=new Array(i);var l=new Array(i);var u=new Array(i);var c=new Array(i);var h=new Array(i);var d=r.words;d.length=i;this.convert13b(e.words,e.length,o,i);this.convert13b(t.words,t.length,u,i);this.transform(o,s,a,l,i,n);this.transform(u,s,c,h,i,n);for(var p=0;p<i;p++){var m=a[p]*c[p]-l[p]*h[p];l[p]=a[p]*h[p]+l[p]*c[p];a[p]=m}this.conjugate(a,l,i);this.transform(a,l,d,s,i,n);this.conjugate(d,s,i);this.normalize13b(d,i);r.negative=e.negative^t.negative;r.length=e.length+t.length;return r._strip()};BN.prototype.mul=function mul(e){var t=new BN(null);t.words=new Array(this.length+e.length);return this.mulTo(e,t)};BN.prototype.mulf=function mulf(e){var t=new BN(null);t.words=new Array(this.length+e.length);return jumboMulTo(this,e,t)};BN.prototype.imul=function imul(e){return this.clone().mulTo(e,this)};BN.prototype.imuln=function imuln(e){var t=e<0;if(t)e=-e;assert(typeof e==="number");assert(e<67108864);var r=0;for(var i=0;i<this.length;i++){var n=(this.words[i]|0)*e;var s=(n&67108863)+(r&67108863);r>>=26;r+=n/67108864|0;r+=s>>>26;this.words[i]=s&67108863}if(r!==0){this.words[i]=r;this.length++}return t?this.ineg():this};BN.prototype.muln=function muln(e){return this.clone().imuln(e)};BN.prototype.sqr=function sqr(){return this.mul(this)};BN.prototype.isqr=function isqr(){return this.imul(this.clone())};BN.prototype.pow=function pow(e){var t=toBitArray(e);if(t.length===0)return new BN(1);var r=this;for(var i=0;i<t.length;i++,r=r.sqr()){if(t[i]!==0)break}if(++i<t.length){for(var n=r.sqr();i<t.length;i++,n=n.sqr()){if(t[i]===0)continue;r=r.mul(n)}}return r};BN.prototype.iushln=function iushln(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=67108863>>>26-t<<26-t;var n;if(t!==0){var s=0;for(n=0;n<this.length;n++){var o=this.words[n]&i;var a=(this.words[n]|0)-o<<t;this.words[n]=a|s;s=o>>>26-t}if(s){this.words[n]=s;this.length++}}if(r!==0){for(n=this.length-1;n>=0;n--){this.words[n+r]=this.words[n]}for(n=0;n<r;n++){this.words[n]=0}this.length+=r}return this._strip()};BN.prototype.ishln=function ishln(e){assert(this.negative===0);return this.iushln(e)};BN.prototype.iushrn=function iushrn(e,t,r){assert(typeof e==="number"&&e>=0);var i;if(t){i=(t-t%26)/26}else{i=0}var n=e%26;var s=Math.min((e-n)/26,this.length);var o=67108863^67108863>>>n<<n;var a=r;i-=s;i=Math.max(0,i);if(a){for(var l=0;l<s;l++){a.words[l]=this.words[l]}a.length=s}if(s===0){}else if(this.length>s){this.length-=s;for(l=0;l<this.length;l++){this.words[l]=this.words[l+s]}}else{this.words[0]=0;this.length=1}var u=0;for(l=this.length-1;l>=0&&(u!==0||l>=i);l--){var c=this.words[l]|0;this.words[l]=u<<26-n|c>>>n;u=c&o}if(a&&u!==0){a.words[a.length++]=u}if(this.length===0){this.words[0]=0;this.length=1}return this._strip()};BN.prototype.ishrn=function ishrn(e,t,r){assert(this.negative===0);return this.iushrn(e,t,r)};BN.prototype.shln=function shln(e){return this.clone().ishln(e)};BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)};BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)};BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)};BN.prototype.testn=function testn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;var i=1<<t;if(this.length<=r)return false;var n=this.words[r];return!!(n&i)};BN.prototype.imaskn=function imaskn(e){assert(typeof e==="number"&&e>=0);var t=e%26;var r=(e-t)/26;assert(this.negative===0,"imaskn works only with positive numbers");if(this.length<=r){return this}if(t!==0){r++}this.length=Math.min(r,this.length);if(t!==0){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()};BN.prototype.maskn=function maskn(e){return this.clone().imaskn(e)};BN.prototype.iaddn=function iaddn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.isubn(-e);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=e){this.words[0]=e-(this.words[0]|0);this.negative=0;return this}this.negative=0;this.isubn(e);this.negative=1;return this}return this._iaddn(e)};BN.prototype._iaddn=function _iaddn(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++){this.words[t]-=67108864;if(t===this.length-1){this.words[t+1]=1}else{this.words[t+1]++}}this.length=Math.max(this.length,t+1);return this};BN.prototype.isubn=function isubn(e){assert(typeof e==="number");assert(e<67108864);if(e<0)return this.iaddn(-e);if(this.negative!==0){this.negative=0;this.iaddn(e);this.negative=1;return this}this.words[0]-=e;if(this.length===1&&this.words[0]<0){this.words[0]=-this.words[0];this.negative=1}else{for(var t=0;t<this.length&&this.words[t]<0;t++){this.words[t]+=67108864;this.words[t+1]-=1}}return this._strip()};BN.prototype.addn=function addn(e){return this.clone().iaddn(e)};BN.prototype.subn=function subn(e){return this.clone().isubn(e)};BN.prototype.iabs=function iabs(){this.negative=0;return this};BN.prototype.abs=function abs(){return this.clone().iabs()};BN.prototype._ishlnsubmul=function _ishlnsubmul(e,t,r){var i=e.length+r;var n;this._expand(i);var s;var o=0;for(n=0;n<e.length;n++){s=(this.words[n+r]|0)+o;var a=(e.words[n]|0)*t;s-=a&67108863;o=(s>>26)-(a/67108864|0);this.words[n+r]=s&67108863}for(;n<this.length-r;n++){s=(this.words[n+r]|0)+o;o=s>>26;this.words[n+r]=s&67108863}if(o===0)return this._strip();assert(o===-1);o=0;for(n=0;n<this.length;n++){s=-(this.words[n]|0)+o;o=s>>26;this.words[n]=s&67108863}this.negative=1;return this._strip()};BN.prototype._wordDiv=function _wordDiv(e,t){var r=this.length-e.length;var i=this.clone();var n=e;var s=n.words[n.length-1]|0;var o=this._countBits(s);r=26-o;if(r!==0){n=n.ushln(r);i.iushln(r);s=n.words[n.length-1]|0}var a=i.length-n.length;var l;if(t!=="mod"){l=new BN(null);l.length=a+1;l.words=new Array(l.length);for(var u=0;u<l.length;u++){l.words[u]=0}}var c=i.clone()._ishlnsubmul(n,1,a);if(c.negative===0){i=c;if(l){l.words[a]=1}}for(var h=a-1;h>=0;h--){var d=(i.words[n.length+h]|0)*67108864+(i.words[n.length+h-1]|0);d=Math.min(d/s|0,67108863);i._ishlnsubmul(n,d,h);while(i.negative!==0){d--;i.negative=0;i._ishlnsubmul(n,1,h);if(!i.isZero()){i.negative^=1}}if(l){l.words[h]=d}}if(l){l._strip()}i._strip();if(t!=="div"&&r!==0){i.iushrn(r)}return{div:l||null,mod:i}};BN.prototype.divmod=function divmod(e,t,r){assert(!e.isZero());if(this.isZero()){return{div:new BN(0),mod:new BN(0)}}var i,n,s;if(this.negative!==0&&e.negative===0){s=this.neg().divmod(e,t);if(t!=="mod"){i=s.div.neg()}if(t!=="div"){n=s.mod.neg();if(r&&n.negative!==0){n.iadd(e)}}return{div:i,mod:n}}if(this.negative===0&&e.negative!==0){s=this.divmod(e.neg(),t);if(t!=="mod"){i=s.div.neg()}return{div:i,mod:s.mod}}if((this.negative&e.negative)!==0){s=this.neg().divmod(e.neg(),t);if(t!=="div"){n=s.mod.neg();if(r&&n.negative!==0){n.isub(e)}}return{div:s.div,mod:n}}if(e.length>this.length||this.cmp(e)<0){return{div:new BN(0),mod:this}}if(e.length===1){if(t==="div"){return{div:this.divn(e.words[0]),mod:null}}if(t==="mod"){return{div:null,mod:new BN(this.modrn(e.words[0]))}}return{div:this.divn(e.words[0]),mod:new BN(this.modrn(e.words[0]))}}return this._wordDiv(e,t)};BN.prototype.div=function div(e){return this.divmod(e,"div",false).div};BN.prototype.mod=function mod(e){return this.divmod(e,"mod",false).mod};BN.prototype.umod=function umod(e){return this.divmod(e,"mod",true).mod};BN.prototype.divRound=function divRound(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=t.div.negative!==0?t.mod.isub(e):t.mod;var i=e.ushrn(1);var n=e.andln(1);var s=r.cmp(i);if(s<0||n===1&&s===0)return t.div;return t.div.negative!==0?t.div.isubn(1):t.div.iaddn(1)};BN.prototype.modrn=function modrn(e){var t=e<0;if(t)e=-e;assert(e<=67108863);var r=(1<<26)%e;var i=0;for(var n=this.length-1;n>=0;n--){i=(r*i+(this.words[n]|0))%e}return t?-i:i};BN.prototype.modn=function modn(e){return this.modrn(e)};BN.prototype.idivn=function idivn(e){var t=e<0;if(t)e=-e;assert(e<=67108863);var r=0;for(var i=this.length-1;i>=0;i--){var n=(this.words[i]|0)+r*67108864;this.words[i]=n/e|0;r=n%e}this._strip();return t?this.ineg():this};BN.prototype.divn=function divn(e){return this.clone().idivn(e)};BN.prototype.egcd=function egcd(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var s=new BN(0);var o=new BN(1);var a=0;while(t.isEven()&&r.isEven()){t.iushrn(1);r.iushrn(1);++a}var l=r.clone();var u=t.clone();while(!t.isZero()){for(var c=0,h=1;(t.words[0]&h)===0&&c<26;++c,h<<=1);if(c>0){t.iushrn(c);while(c-- >0){if(i.isOdd()||n.isOdd()){i.iadd(l);n.isub(u)}i.iushrn(1);n.iushrn(1)}}for(var d=0,p=1;(r.words[0]&p)===0&&d<26;++d,p<<=1);if(d>0){r.iushrn(d);while(d-- >0){if(s.isOdd()||o.isOdd()){s.iadd(l);o.isub(u)}s.iushrn(1);o.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(s);n.isub(o)}else{r.isub(t);s.isub(i);o.isub(n)}}return{a:s,b:o,gcd:r.iushln(a)}};BN.prototype._invmp=function _invmp(e){assert(e.negative===0);assert(!e.isZero());var t=this;var r=e.clone();if(t.negative!==0){t=t.umod(e)}else{t=t.clone()}var i=new BN(1);var n=new BN(0);var s=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var o=0,a=1;(t.words[0]&a)===0&&o<26;++o,a<<=1);if(o>0){t.iushrn(o);while(o-- >0){if(i.isOdd()){i.iadd(s)}i.iushrn(1)}}for(var l=0,u=1;(r.words[0]&u)===0&&l<26;++l,u<<=1);if(l>0){r.iushrn(l);while(l-- >0){if(n.isOdd()){n.iadd(s)}n.iushrn(1)}}if(t.cmp(r)>=0){t.isub(r);i.isub(n)}else{r.isub(t);n.isub(i)}}var c;if(t.cmpn(1)===0){c=i}else{c=n}if(c.cmpn(0)<0){c.iadd(e)}return c};BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone();var r=e.clone();t.negative=0;r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++){t.iushrn(1);r.iushrn(1)}do{while(t.isEven()){t.iushrn(1)}while(r.isEven()){r.iushrn(1)}var n=t.cmp(r);if(n<0){var s=t;t=r;r=s}else if(n===0||r.cmpn(1)===0){break}t.isub(r)}while(true);return r.iushln(i)};BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)};BN.prototype.isEven=function isEven(){return(this.words[0]&1)===0};BN.prototype.isOdd=function isOdd(){return(this.words[0]&1)===1};BN.prototype.andln=function andln(e){return this.words[0]&e};BN.prototype.bincn=function bincn(e){assert(typeof e==="number");var t=e%26;var r=(e-t)/26;var i=1<<t;if(this.length<=r){this._expand(r+1);this.words[r]|=i;return this}var n=i;for(var s=r;n!==0&&s<this.length;s++){var o=this.words[s]|0;o+=n;n=o>>>26;o&=67108863;this.words[s]=o}if(n!==0){this.words[s]=n;this.length++}return this};BN.prototype.isZero=function isZero(){return this.length===1&&this.words[0]===0};BN.prototype.cmpn=function cmpn(e){var t=e<0;if(this.negative!==0&&!t)return-1;if(this.negative===0&&t)return 1;this._strip();var r;if(this.length>1){r=1}else{if(t){e=-e}assert(e<=67108863,"Number is too big");var i=this.words[0]|0;r=i===e?0:i<e?-1:1}if(this.negative!==0)return-r|0;return r};BN.prototype.cmp=function cmp(e){if(this.negative!==0&&e.negative===0)return-1;if(this.negative===0&&e.negative!==0)return 1;var t=this.ucmp(e);if(this.negative!==0)return-t|0;return t};BN.prototype.ucmp=function ucmp(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;var t=0;for(var r=this.length-1;r>=0;r--){var i=this.words[r]|0;var n=e.words[r]|0;if(i===n)continue;if(i<n){t=-1}else if(i>n){t=1}break}return t};BN.prototype.gtn=function gtn(e){return this.cmpn(e)===1};BN.prototype.gt=function gt(e){return this.cmp(e)===1};BN.prototype.gten=function gten(e){return this.cmpn(e)>=0};BN.prototype.gte=function gte(e){return this.cmp(e)>=0};BN.prototype.ltn=function ltn(e){return this.cmpn(e)===-1};BN.prototype.lt=function lt(e){return this.cmp(e)===-1};BN.prototype.lten=function lten(e){return this.cmpn(e)<=0};BN.prototype.lte=function lte(e){return this.cmp(e)<=0};BN.prototype.eqn=function eqn(e){return this.cmpn(e)===0};BN.prototype.eq=function eq(e){return this.cmp(e)===0};BN.red=function red(e){return new Red(e)};BN.prototype.toRed=function toRed(e){assert(!this.red,"Already a number in reduction context");assert(this.negative===0,"red works only with positives");return e.convertTo(this)._forceRed(e)};BN.prototype.fromRed=function fromRed(){assert(this.red,"fromRed works only with numbers in reduction context");return this.red.convertFrom(this)};BN.prototype._forceRed=function _forceRed(e){this.red=e;return this};BN.prototype.forceRed=function forceRed(e){assert(!this.red,"Already a number in reduction context");return this._forceRed(e)};BN.prototype.redAdd=function redAdd(e){assert(this.red,"redAdd works only with red numbers");return this.red.add(this,e)};BN.prototype.redIAdd=function redIAdd(e){assert(this.red,"redIAdd works only with red numbers");return this.red.iadd(this,e)};BN.prototype.redSub=function redSub(e){assert(this.red,"redSub works only with red numbers");return this.red.sub(this,e)};BN.prototype.redISub=function redISub(e){assert(this.red,"redISub works only with red numbers");return this.red.isub(this,e)};BN.prototype.redShl=function redShl(e){assert(this.red,"redShl works only with red numbers");return this.red.shl(this,e)};BN.prototype.redMul=function redMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.mul(this,e)};BN.prototype.redIMul=function redIMul(e){assert(this.red,"redMul works only with red numbers");this.red._verify2(this,e);return this.red.imul(this,e)};BN.prototype.redSqr=function redSqr(){assert(this.red,"redSqr works only with red numbers");this.red._verify1(this);return this.red.sqr(this)};BN.prototype.redISqr=function redISqr(){assert(this.red,"redISqr works only with red numbers");this.red._verify1(this);return this.red.isqr(this)};BN.prototype.redSqrt=function redSqrt(){assert(this.red,"redSqrt works only with red numbers");this.red._verify1(this);return this.red.sqrt(this)};BN.prototype.redInvm=function redInvm(){assert(this.red,"redInvm works only with red numbers");this.red._verify1(this);return this.red.invm(this)};BN.prototype.redNeg=function redNeg(){assert(this.red,"redNeg works only with red numbers");this.red._verify1(this);return this.red.neg(this)};BN.prototype.redPow=function redPow(e){assert(this.red&&!e.red,"redPow(normalNum)");this.red._verify1(this);return this.red.pow(this,e)};var u={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,t){this.name=e;this.p=new BN(t,16);this.n=this.p.bitLength();this.k=new BN(1).iushln(this.n).isub(this.p);this.tmp=this._tmp()}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);e.words=new Array(Math.ceil(this.n/13));return e};MPrime.prototype.ireduce=function ireduce(e){var t=e;var r;do{this.split(t,this.tmp);t=this.imulK(t);t=t.iadd(this.tmp);r=t.bitLength()}while(r>this.n);var i=r<this.n?-1:t.ucmp(this.p);if(i===0){t.words[0]=0;t.length=1}else if(i>0){t.isub(this.p)}else{if(t.strip!==undefined){t.strip()}else{t._strip()}}return t};MPrime.prototype.split=function split(e,t){e.iushrn(this.n,0,t)};MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)};function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}inherits(K256,MPrime);K256.prototype.split=function split(e,t){var r=4194303;var i=Math.min(e.length,9);for(var n=0;n<i;n++){t.words[n]=e.words[n]}t.length=i;if(e.length<=9){e.words[0]=0;e.length=1;return}var s=e.words[9];t.words[t.length++]=s&r;for(n=10;n<e.length;n++){var o=e.words[n]|0;e.words[n-10]=(o&r)<<4|s>>>22;s=o}s>>>=22;e.words[n-10]=s;if(s===0&&e.length>10){e.length-=10}else{e.length-=9}};K256.prototype.imulK=function imulK(e){e.words[e.length]=0;e.words[e.length+1]=0;e.length+=2;var t=0;for(var r=0;r<e.length;r++){var i=e.words[r]|0;t+=i*977;e.words[r]=t&67108863;t=i*64+(t/67108864|0)}if(e.words[e.length-1]===0){e.length--;if(e.words[e.length-1]===0){e.length--}}return e};function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}inherits(P224,MPrime);function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}inherits(P192,MPrime);function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}inherits(P25519,MPrime);P25519.prototype.imulK=function imulK(e){var t=0;for(var r=0;r<e.length;r++){var i=(e.words[r]|0)*19+t;var n=i&67108863;i>>>=26;e.words[r]=n;t=i}if(t!==0){e.words[e.length++]=t}return e};BN._prime=function prime(e){if(u[e])return u[e];var prime;if(e==="k256"){prime=new K256}else if(e==="p224"){prime=new P224}else if(e==="p192"){prime=new P192}else if(e==="p25519"){prime=new P25519}else{throw new Error("Unknown prime "+e)}u[e]=prime;return prime};function Red(e){if(typeof e==="string"){var t=BN._prime(e);this.m=t.p;this.prime=t}else{assert(e.gtn(1),"modulus must be greater than 1");this.m=e;this.prime=null}}Red.prototype._verify1=function _verify1(e){assert(e.negative===0,"red works only with positives");assert(e.red,"red works only with red numbers")};Red.prototype._verify2=function _verify2(e,t){assert((e.negative|t.negative)===0,"red works only with positives");assert(e.red&&e.red===t.red,"red works only with red numbers")};Red.prototype.imod=function imod(e){if(this.prime)return this.prime.ireduce(e)._forceRed(this);move(e,e.umod(this.m)._forceRed(this));return e};Red.prototype.neg=function neg(e){if(e.isZero()){return e.clone()}return this.m.sub(e)._forceRed(this)};Red.prototype.add=function add(e,t){this._verify2(e,t);var r=e.add(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r._forceRed(this)};Red.prototype.iadd=function iadd(e,t){this._verify2(e,t);var r=e.iadd(t);if(r.cmp(this.m)>=0){r.isub(this.m)}return r};Red.prototype.sub=function sub(e,t){this._verify2(e,t);var r=e.sub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r._forceRed(this)};Red.prototype.isub=function isub(e,t){this._verify2(e,t);var r=e.isub(t);if(r.cmpn(0)<0){r.iadd(this.m)}return r};Red.prototype.shl=function shl(e,t){this._verify1(e);return this.imod(e.ushln(t))};Red.prototype.imul=function imul(e,t){this._verify2(e,t);return this.imod(e.imul(t))};Red.prototype.mul=function mul(e,t){this._verify2(e,t);return this.imod(e.mul(t))};Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())};Red.prototype.sqr=function sqr(e){return this.mul(e,e)};Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var t=this.m.andln(3);assert(t%2===1);if(t===3){var r=this.m.add(new BN(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1);var n=0;while(!i.isZero()&&i.andln(1)===0){n++;i.iushrn(1)}assert(!i.isZero());var s=new BN(1).toRed(this);var o=s.redNeg();var a=this.m.subn(1).iushrn(1);var l=this.m.bitLength();l=new BN(2*l*l).toRed(this);while(this.pow(l,a).cmp(o)!==0){l.redIAdd(o)}var u=this.pow(l,i);var c=this.pow(e,i.addn(1).iushrn(1));var h=this.pow(e,i);var d=n;while(h.cmp(s)!==0){var p=h;for(var m=0;p.cmp(s)!==0;m++){p=p.redSqr()}assert(m<d);var g=this.pow(u,new BN(1).iushln(d-m-1));c=c.redMul(g);u=g.redSqr();h=h.redMul(u);d=m}return c};Red.prototype.invm=function invm(e){var t=e._invmp(this.m);if(t.negative!==0){t.negative=0;return this.imod(t).redNeg()}else{return this.imod(t)}};Red.prototype.pow=function pow(e,t){if(t.isZero())return new BN(1).toRed(this);if(t.cmpn(1)===0)return e.clone();var r=4;var i=new Array(1<<r);i[0]=new BN(1).toRed(this);i[1]=e;for(var n=2;n<i.length;n++){i[n]=this.mul(i[n-1],e)}var s=i[0];var o=0;var a=0;var l=t.bitLength()%26;if(l===0){l=26}for(n=t.length-1;n>=0;n--){var u=t.words[n];for(var c=l-1;c>=0;c--){var h=u>>c&1;if(s!==i[0]){s=this.sqr(s)}if(h===0&&o===0){a=0;continue}o<<=1;o|=h;a++;if(a!==r&&(n!==0||c!==0))continue;s=this.mul(s,i[o]);a=0;o=0}l=26}return s};Red.prototype.convertTo=function convertTo(e){var t=e.umod(this.m);return t===e?t.clone():t};Red.prototype.convertFrom=function convertFrom(e){var t=e.clone();t.red=null;return t};BN.mont=function mont(e){return new Mont(e)};function Mont(e){Red.call(this,e);this.shift=this.m.bitLength();if(this.shift%26!==0){this.shift+=26-this.shift%26}this.r=new BN(1).iushln(this.shift);this.r2=this.imod(this.r.sqr());this.rinv=this.r._invmp(this.m);this.minv=this.rinv.mul(this.r).isubn(1).div(this.m);this.minv=this.minv.umod(this.r);this.minv=this.r.sub(this.minv)}inherits(Mont,Red);Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))};Mont.prototype.convertFrom=function convertFrom(e){var t=this.imod(e.mul(this.rinv));t.red=null;return t};Mont.prototype.imul=function imul(e,t){if(e.isZero()||t.isZero()){e.words[0]=0;e.length=1;return e}var r=e.imul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var s=n;if(n.cmp(this.m)>=0){s=n.isub(this.m)}else if(n.cmpn(0)<0){s=n.iadd(this.m)}return s._forceRed(this)};Mont.prototype.mul=function mul(e,t){if(e.isZero()||t.isZero())return new BN(0)._forceRed(this);var r=e.mul(t);var i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);var n=r.isub(i).iushrn(this.shift);var s=n;if(n.cmp(this.m)>=0){s=n.isub(this.m)}else if(n.cmpn(0)<0){s=n.iadd(this.m)}return s._forceRed(this)};Mont.prototype.invm=function invm(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(false||e,this)},8818:(e,t,r)=>{"use strict";const i=r(2068);const{stdout:n,stderr:s}=r(9318);const{stringReplaceAll:o,stringEncaseCRLFWithFirstIndex:a}=r(2415);const{isArray:l}=Array;const u=["ansi","ansi","ansi256","ansi16m"];const c=Object.create(null);const applyOptions=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const r=n?n.level:0;e.level=t.level===undefined?r:t.level};class ChalkClass{constructor(e){return chalkFactory(e)}}const chalkFactory=e=>{const t={};applyOptions(t,e);t.template=(...e)=>chalkTag(t.template,...e);Object.setPrototypeOf(t,Chalk.prototype);Object.setPrototypeOf(t.template,t);t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};t.template.Instance=ChalkClass;return t.template};function Chalk(e){return chalkFactory(e)}for(const[e,t]of Object.entries(i)){c[e]={get(){const r=createBuilder(this,createStyler(t.open,t.close,this._styler),this._isEmpty);Object.defineProperty(this,e,{value:r});return r}}}c.visible={get(){const e=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:e});return e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h){c[e]={get(){const{level:t}=this;return function(...r){const n=createStyler(i.color[u[t]][e](...r),i.color.close,this._styler);return createBuilder(this,n,this._isEmpty)}}}}for(const e of h){const t="bg"+e[0].toUpperCase()+e.slice(1);c[t]={get(){const{level:t}=this;return function(...r){const n=createStyler(i.bgColor[u[t]][e](...r),i.bgColor.close,this._styler);return createBuilder(this,n,this._isEmpty)}}}}const d=Object.defineProperties((()=>{}),{...c,level:{enumerable:true,get(){return this._generator.level},set(e){this._generator.level=e}}});const createStyler=(e,t,r)=>{let i;let n;if(r===undefined){i=e;n=t}else{i=r.openAll+e;n=t+r.closeAll}return{open:e,close:t,openAll:i,closeAll:n,parent:r}};const createBuilder=(e,t,r)=>{const builder=(...e)=>{if(l(e[0])&&l(e[0].raw)){return applyStyle(builder,chalkTag(builder,...e))}return applyStyle(builder,e.length===1?""+e[0]:e.join(" "))};Object.setPrototypeOf(builder,d);builder._generator=e;builder._styler=t;builder._isEmpty=r;return builder};const applyStyle=(e,t)=>{if(e.level<=0||!t){return e._isEmpty?"":t}let r=e._styler;if(r===undefined){return t}const{openAll:i,closeAll:n}=r;if(t.indexOf("")!==-1){while(r!==undefined){t=o(t,r.close,r.open);r=r.parent}}const s=t.indexOf("\n");if(s!==-1){t=a(t,n,i,s)}return i+t+n};let p;const chalkTag=(e,...t)=>{const[i]=t;if(!l(i)||!l(i.raw)){return t.join(" ")}const n=t.slice(1);const s=[i.raw[0]];for(let e=1;e<i.length;e++){s.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&"),String(i.raw[e]))}if(p===undefined){p=r(500)}return p(e,s.join(""))};Object.defineProperties(Chalk.prototype,c);const m=Chalk();m.supportsColor=n;m.stderr=Chalk({level:s?s.level:0});m.stderr.supportsColor=s;e.exports=m},500:e=>{"use strict";const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function unescape(e){const t=e[0]==="u";const r=e[1]==="{";if(t&&!r&&e.length===5||e[0]==="x"&&e.length===3){return String.fromCharCode(parseInt(e.slice(1),16))}if(t&&r){return String.fromCodePoint(parseInt(e.slice(2,-1),16))}return s.get(e)||e}function parseArguments(e,t){const r=[];const s=t.trim().split(/\s*,\s*/g);let o;for(const t of s){const s=Number(t);if(!Number.isNaN(s)){r.push(s)}else if(o=t.match(i)){r.push(o[2].replace(n,((e,t,r)=>t?unescape(t):r)))}else{throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`)}}return r}function parseStyle(e){r.lastIndex=0;const t=[];let i;while((i=r.exec(e))!==null){const e=i[1];if(i[2]){const r=parseArguments(e,i[2]);t.push([e].concat(r))}else{t.push([e])}}return t}function buildStyle(e,t){const r={};for(const e of t){for(const t of e.styles){r[t[0]]=e.inverse?null:t.slice(1)}}let i=e;for(const[e,t]of Object.entries(r)){if(!Array.isArray(t)){continue}if(!(e in i)){throw new Error(`Unknown Chalk style: ${e}`)}i=t.length>0?i[e](...t):i[e]}return i}e.exports=(e,r)=>{const i=[];const n=[];let s=[];r.replace(t,((t,r,o,a,l,u)=>{if(r){s.push(unescape(r))}else if(a){const t=s.join("");s=[];n.push(i.length===0?t:buildStyle(e,i)(t));i.push({inverse:o,styles:parseStyle(a)})}else if(l){if(i.length===0){throw new Error("Found extraneous } in Chalk template literal")}n.push(buildStyle(e,i)(s.join("")));s=[];i.pop()}else{s.push(u)}}));n.push(s.join(""));if(i.length>0){const e=`Chalk template literal is missing ${i.length} closing bracket${i.length===1?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},2415:e=>{"use strict";const stringReplaceAll=(e,t,r)=>{let i=e.indexOf(t);if(i===-1){return e}const n=t.length;let s=0;let o="";do{o+=e.substr(s,i-s)+t+r;s=i+n;i=e.indexOf(t,s)}while(i!==-1);o+=e.substr(s);return o};const stringEncaseCRLFWithFirstIndex=(e,t,r,i)=>{let n=0;let s="";do{const o=e[i-1]==="\r";s+=e.substr(n,(o?i-1:i)-n)+t+(o?"\r\n":"\n")+r;n=i+1;i=e.indexOf("\n",n)}while(i!==-1);s+=e.substr(n);return s};e.exports={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}},7391:(e,t,r)=>{var i=r(188);var n={};for(var s in i){if(i.hasOwnProperty(s)){n[i[s]]=s}}var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o){if(o.hasOwnProperty(a)){if(!("channels"in o[a])){throw new Error("missing channels property: "+a)}if(!("labels"in o[a])){throw new Error("missing channel labels property: "+a)}if(o[a].labels.length!==o[a].channels){throw new Error("channel and label counts mismatch: "+a)}var l=o[a].channels;var u=o[a].labels;delete o[a].channels;delete o[a].labels;Object.defineProperty(o[a],"channels",{value:l});Object.defineProperty(o[a],"labels",{value:u})}}o.rgb.hsl=function(e){var t=e[0]/255;var r=e[1]/255;var i=e[2]/255;var n=Math.min(t,r,i);var s=Math.max(t,r,i);var o=s-n;var a;var l;var u;if(s===n){a=0}else if(t===s){a=(r-i)/o}else if(r===s){a=2+(i-t)/o}else if(i===s){a=4+(t-r)/o}a=Math.min(a*60,360);if(a<0){a+=360}u=(n+s)/2;if(s===n){l=0}else if(u<=.5){l=o/(s+n)}else{l=o/(2-s-n)}return[a,l*100,u*100]};o.rgb.hsv=function(e){var t;var r;var i;var n;var s;var o=e[0]/255;var a=e[1]/255;var l=e[2]/255;var u=Math.max(o,a,l);var c=u-Math.min(o,a,l);var diffc=function(e){return(u-e)/6/c+1/2};if(c===0){n=s=0}else{s=c/u;t=diffc(o);r=diffc(a);i=diffc(l);if(o===u){n=i-r}else if(a===u){n=1/3+t-i}else if(l===u){n=2/3+r-t}if(n<0){n+=1}else if(n>1){n-=1}}return[n*360,s*100,u*100]};o.rgb.hwb=function(e){var t=e[0];var r=e[1];var i=e[2];var n=o.rgb.hsl(e)[0];var s=1/255*Math.min(t,Math.min(r,i));i=1-1/255*Math.max(t,Math.max(r,i));return[n,s*100,i*100]};o.rgb.cmyk=function(e){var t=e[0]/255;var r=e[1]/255;var i=e[2]/255;var n;var s;var o;var a;a=Math.min(1-t,1-r,1-i);n=(1-t-a)/(1-a)||0;s=(1-r-a)/(1-a)||0;o=(1-i-a)/(1-a)||0;return[n*100,s*100,o*100,a*100]};function comparativeDistance(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}o.rgb.keyword=function(e){var t=n[e];if(t){return t}var r=Infinity;var s;for(var o in i){if(i.hasOwnProperty(o)){var a=i[o];var l=comparativeDistance(e,a);if(l<r){r=l;s=o}}}return s};o.keyword.rgb=function(e){return i[e]};o.rgb.xyz=function(e){var t=e[0]/255;var r=e[1]/255;var i=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=t*.4124+r*.3576+i*.1805;var s=t*.2126+r*.7152+i*.0722;var o=t*.0193+r*.1192+i*.9505;return[n*100,s*100,o*100]};o.rgb.lab=function(e){var t=o.rgb.xyz(e);var r=t[0];var i=t[1];var n=t[2];var s;var a;var l;r/=95.047;i/=100;n/=108.883;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;n=n>.008856?Math.pow(n,1/3):7.787*n+16/116;s=116*i-16;a=500*(r-i);l=200*(i-n);return[s,a,l]};o.hsl.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var i=e[2]/100;var n;var s;var o;var a;var l;if(r===0){l=i*255;return[l,l,l]}if(i<.5){s=i*(1+r)}else{s=i+r-i*r}n=2*i-s;a=[0,0,0];for(var u=0;u<3;u++){o=t+1/3*-(u-1);if(o<0){o++}if(o>1){o--}if(6*o<1){l=n+(s-n)*6*o}else if(2*o<1){l=s}else if(3*o<2){l=n+(s-n)*(2/3-o)*6}else{l=n}a[u]=l*255}return a};o.hsl.hsv=function(e){var t=e[0];var r=e[1]/100;var i=e[2]/100;var n=r;var s=Math.max(i,.01);var o;var a;i*=2;r*=i<=1?i:2-i;n*=s<=1?s:2-s;a=(i+r)/2;o=i===0?2*n/(s+n):2*r/(i+r);return[t,o*100,a*100]};o.hsv.rgb=function(e){var t=e[0]/60;var r=e[1]/100;var i=e[2]/100;var n=Math.floor(t)%6;var s=t-Math.floor(t);var o=255*i*(1-r);var a=255*i*(1-r*s);var l=255*i*(1-r*(1-s));i*=255;switch(n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};o.hsv.hsl=function(e){var t=e[0];var r=e[1]/100;var i=e[2]/100;var n=Math.max(i,.01);var s;var o;var a;a=(2-r)*i;s=(2-r)*n;o=r*n;o/=s<=1?s:2-s;o=o||0;a/=2;return[t,o*100,a*100]};o.hwb.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var i=e[2]/100;var n=r+i;var s;var o;var a;var l;if(n>1){r/=n;i/=n}s=Math.floor(6*t);o=1-i;a=6*t-s;if((s&1)!==0){a=1-a}l=r+a*(o-r);var u;var c;var h;switch(s){default:case 6:case 0:u=o;c=l;h=r;break;case 1:u=l;c=o;h=r;break;case 2:u=r;c=o;h=l;break;case 3:u=r;c=l;h=o;break;case 4:u=l;c=r;h=o;break;case 5:u=o;c=r;h=l;break}return[u*255,c*255,h*255]};o.cmyk.rgb=function(e){var t=e[0]/100;var r=e[1]/100;var i=e[2]/100;var n=e[3]/100;var s;var o;var a;s=1-Math.min(1,t*(1-n)+n);o=1-Math.min(1,r*(1-n)+n);a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};o.xyz.rgb=function(e){var t=e[0]/100;var r=e[1]/100;var i=e[2]/100;var n;var s;var o;n=t*3.2406+r*-1.5372+i*-.4986;s=t*-.9689+r*1.8758+i*.0415;o=t*.0557+r*-.204+i*1.057;n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92;s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92;o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92;n=Math.min(Math.max(0,n),1);s=Math.min(Math.max(0,s),1);o=Math.min(Math.max(0,o),1);return[n*255,s*255,o*255]};o.xyz.lab=function(e){var t=e[0];var r=e[1];var i=e[2];var n;var s;var o;t/=95.047;r/=100;i/=108.883;t=t>.008856?Math.pow(t,1/3):7.787*t+16/116;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116;i=i>.008856?Math.pow(i,1/3):7.787*i+16/116;n=116*r-16;s=500*(t-r);o=200*(r-i);return[n,s,o]};o.lab.xyz=function(e){var t=e[0];var r=e[1];var i=e[2];var n;var s;var o;s=(t+16)/116;n=r/500+s;o=s-i/200;var a=Math.pow(s,3);var l=Math.pow(n,3);var u=Math.pow(o,3);s=a>.008856?a:(s-16/116)/7.787;n=l>.008856?l:(n-16/116)/7.787;o=u>.008856?u:(o-16/116)/7.787;n*=95.047;s*=100;o*=108.883;return[n,s,o]};o.lab.lch=function(e){var t=e[0];var r=e[1];var i=e[2];var n;var s;var o;n=Math.atan2(i,r);s=n*360/2/Math.PI;if(s<0){s+=360}o=Math.sqrt(r*r+i*i);return[t,o,s]};o.lch.lab=function(e){var t=e[0];var r=e[1];var i=e[2];var n;var s;var o;o=i/360*2*Math.PI;n=r*Math.cos(o);s=r*Math.sin(o);return[t,n,s]};o.rgb.ansi16=function(e){var t=e[0];var r=e[1];var i=e[2];var n=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];n=Math.round(n/50);if(n===0){return 30}var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(t/255));if(n===2){s+=60}return s};o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])};o.rgb.ansi256=function(e){var t=e[0];var r=e[1];var i=e[2];if(t===r&&r===i){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}var n=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};o.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7){if(e>50){t+=3.5}t=t/10.5*255;return[t,t,t]}var r=(~~(e>50)+1)*.5;var i=(t&1)*r*255;var n=(t>>1&1)*r*255;var s=(t>>2&1)*r*255;return[i,n,s]};o.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var r;var i=Math.floor(e/36)/5*255;var n=Math.floor((r=e%36)/6)/5*255;var s=r%6/5*255;return[i,n,s]};o.rgb.hex=function(e){var t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255);var r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t){return[0,0,0]}var r=t[0];if(t[0].length===3){r=r.split("").map((function(e){return e+e})).join("")}var i=parseInt(r,16);var n=i>>16&255;var s=i>>8&255;var o=i&255;return[n,s,o]};o.rgb.hcg=function(e){var t=e[0]/255;var r=e[1]/255;var i=e[2]/255;var n=Math.max(Math.max(t,r),i);var s=Math.min(Math.min(t,r),i);var o=n-s;var a;var l;if(o<1){a=s/(1-o)}else{a=0}if(o<=0){l=0}else if(n===t){l=(r-i)/o%6}else if(n===r){l=2+(i-t)/o}else{l=4+(t-r)/o+4}l/=6;l%=1;return[l*360,o*100,a*100]};o.hsl.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var i=1;var n=0;if(r<.5){i=2*t*r}else{i=2*t*(1-r)}if(i<1){n=(r-.5*i)/(1-i)}return[e[0],i*100,n*100]};o.hsv.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var i=t*r;var n=0;if(i<1){n=(r-i)/(1-i)}return[e[0],i*100,n*100]};o.hcg.rgb=function(e){var t=e[0]/360;var r=e[1]/100;var i=e[2]/100;if(r===0){return[i*255,i*255,i*255]}var n=[0,0,0];var s=t%1*6;var o=s%1;var a=1-o;var l=0;switch(Math.floor(s)){case 0:n[0]=1;n[1]=o;n[2]=0;break;case 1:n[0]=a;n[1]=1;n[2]=0;break;case 2:n[0]=0;n[1]=1;n[2]=o;break;case 3:n[0]=0;n[1]=a;n[2]=1;break;case 4:n[0]=o;n[1]=0;n[2]=1;break;default:n[0]=1;n[1]=0;n[2]=a}l=(1-r)*i;return[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};o.hcg.hsv=function(e){var t=e[1]/100;var r=e[2]/100;var i=t+r*(1-t);var n=0;if(i>0){n=t/i}return[e[0],n*100,i*100]};o.hcg.hsl=function(e){var t=e[1]/100;var r=e[2]/100;var i=r*(1-t)+.5*t;var n=0;if(i>0&&i<.5){n=t/(2*i)}else if(i>=.5&&i<1){n=t/(2*(1-i))}return[e[0],n*100,i*100]};o.hcg.hwb=function(e){var t=e[1]/100;var r=e[2]/100;var i=t+r*(1-t);return[e[0],(i-t)*100,(1-i)*100]};o.hwb.hcg=function(e){var t=e[1]/100;var r=e[2]/100;var i=1-r;var n=i-t;var s=0;if(n<1){s=(i-n)/(1-n)}return[e[0],n*100,s*100]};o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]};o.gray.hwb=function(e){return[0,100,e[0]]};o.gray.cmyk=function(e){return[0,0,0,e[0]]};o.gray.lab=function(e){return[e[0],0,0]};o.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255;var r=(t<<16)+(t<<8)+t;var i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};o.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]}},6931:(e,t,r)=>{var i=r(7391);var n=r(880);var s={};var o=Object.keys(i);function wrapRaw(e){var wrappedFn=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}return e(t)};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}function wrapRounded(e){var wrappedFn=function(t){if(t===undefined||t===null){return t}if(arguments.length>1){t=Array.prototype.slice.call(arguments)}var r=e(t);if(typeof r==="object"){for(var i=r.length,n=0;n<i;n++){r[n]=Math.round(r[n])}}return r};if("conversion"in e){wrappedFn.conversion=e.conversion}return wrappedFn}o.forEach((function(e){s[e]={};Object.defineProperty(s[e],"channels",{value:i[e].channels});Object.defineProperty(s[e],"labels",{value:i[e].labels});var t=n(e);var r=Object.keys(t);r.forEach((function(r){var i=t[r];s[e][r]=wrapRounded(i);s[e][r].raw=wrapRaw(i)}))}));e.exports=s},188:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},880:(e,t,r)=>{var i=r(7391);function buildGraph(){var e={};var t=Object.keys(i);for(var r=t.length,n=0;n<r;n++){e[t[n]]={distance:-1,parent:null}}return e}function deriveBFS(e){var t=buildGraph();var r=[e];t[e].distance=0;while(r.length){var n=r.pop();var s=Object.keys(i[n]);for(var o=s.length,a=0;a<o;a++){var l=s[a];var u=t[l];if(u.distance===-1){u.distance=t[n].distance+1;u.parent=n;r.unshift(l)}}}return t}function link(e,t){return function(r){return t(e(r))}}function wrapConversion(e,t){var r=[t[e].parent,e];var n=i[t[e].parent][e];var s=t[e].parent;while(t[s].parent){r.unshift(t[s].parent);n=link(i[t[s].parent][s],n);s=t[s].parent}n.conversion=r;return n}e.exports=function(e){var t=deriveBFS(e);var r={};var i=Object.keys(t);for(var n=i.length,s=0;s<n;s++){var o=i[s];var a=t[o];if(a.parent===null){continue}r[o]=wrapConversion(o,t)}return r}},8510:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},1069:(e,t,r)=>{var i=r(8510);var n=r(8679);var s=Object.hasOwnProperty;var o=Object.create(null);for(var a in i){if(s.call(i,a)){o[i[a]]=a}}var l=e.exports={to:{},get:{}};l.get=function(e){var t=e.substring(0,3).toLowerCase();var r;var i;switch(t){case"hsl":r=l.get.hsl(e);i="hsl";break;case"hwb":r=l.get.hwb(e);i="hwb";break;default:r=l.get.rgb(e);i="rgb";break}if(!r){return null}return{model:i,value:r}};l.get.rgb=function(e){if(!e){return null}var t=/^#([a-f0-9]{3,4})$/i;var r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i;var n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;var o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;var a=/^(\w+)$/;var l=[0,0,0,1];var u;var c;var h;if(u=e.match(r)){h=u[2];u=u[1];for(c=0;c<3;c++){var d=c*2;l[c]=parseInt(u.slice(d,d+2),16)}if(h){l[3]=parseInt(h,16)/255}}else if(u=e.match(t)){u=u[1];h=u[3];for(c=0;c<3;c++){l[c]=parseInt(u[c]+u[c],16)}if(h){l[3]=parseInt(h+h,16)/255}}else if(u=e.match(n)){for(c=0;c<3;c++){l[c]=parseInt(u[c+1],0)}if(u[4]){if(u[5]){l[3]=parseFloat(u[4])*.01}else{l[3]=parseFloat(u[4])}}}else if(u=e.match(o)){for(c=0;c<3;c++){l[c]=Math.round(parseFloat(u[c+1])*2.55)}if(u[4]){if(u[5]){l[3]=parseFloat(u[4])*.01}else{l[3]=parseFloat(u[4])}}}else if(u=e.match(a)){if(u[1]==="transparent"){return[0,0,0,0]}if(!s.call(i,u[1])){return null}l=i[u[1]];l[3]=1;return l}else{return null}for(c=0;c<3;c++){l[c]=clamp(l[c],0,255)}l[3]=clamp(l[3],0,1);return l};l.get.hsl=function(e){if(!e){return null}var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;var r=e.match(t);if(r){var i=parseFloat(r[4]);var n=(parseFloat(r[1])%360+360)%360;var s=clamp(parseFloat(r[2]),0,100);var o=clamp(parseFloat(r[3]),0,100);var a=clamp(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};l.get.hwb=function(e){if(!e){return null}var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;var r=e.match(t);if(r){var i=parseFloat(r[4]);var n=(parseFloat(r[1])%360+360)%360;var s=clamp(parseFloat(r[2]),0,100);var o=clamp(parseFloat(r[3]),0,100);var a=clamp(isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};l.to.hex=function(){var e=n(arguments);return"#"+hexDouble(e[0])+hexDouble(e[1])+hexDouble(e[2])+(e[3]<1?hexDouble(Math.round(e[3]*255)):"")};l.to.rgb=function(){var e=n(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};l.to.rgb.percent=function(){var e=n(arguments);var t=Math.round(e[0]/255*100);var r=Math.round(e[1]/255*100);var i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};l.to.hsl=function(){var e=n(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};l.to.hwb=function(){var e=n(arguments);var t="";if(e.length>=4&&e[3]!==1){t=", "+e[3]}return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};l.to.keyword=function(e){return o[e.slice(0,3)]};function clamp(e,t,r){return Math.min(Math.max(t,e),r)}function hexDouble(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}},7177:(e,t,r)=>{"use strict";var i=r(1069);var n=r(6931);var s=[].slice;var o=["keyword","gray","hex"];var a={};Object.keys(n).forEach((function(e){a[s.call(n[e].labels).sort().join("")]=e}));var l={};function Color(e,t){if(!(this instanceof Color)){return new Color(e,t)}if(t&&t in o){t=null}if(t&&!(t in n)){throw new Error("Unknown model: "+t)}var r;var u;if(e==null){this.model="rgb";this.color=[0,0,0];this.valpha=1}else if(e instanceof Color){this.model=e.model;this.color=e.color.slice();this.valpha=e.valpha}else if(typeof e==="string"){var c=i.get(e);if(c===null){throw new Error("Unable to parse color from string: "+e)}this.model=c.model;u=n[this.model].channels;this.color=c.value.slice(0,u);this.valpha=typeof c.value[u]==="number"?c.value[u]:1}else if(e.length){this.model=t||"rgb";u=n[this.model].channels;var h=s.call(e,0,u);this.color=zeroArray(h,u);this.valpha=typeof e[u]==="number"?e[u]:1}else if(typeof e==="number"){e&=16777215;this.model="rgb";this.color=[e>>16&255,e>>8&255,e&255];this.valpha=1}else{this.valpha=1;var d=Object.keys(e);if("alpha"in e){d.splice(d.indexOf("alpha"),1);this.valpha=typeof e.alpha==="number"?e.alpha:0}var p=d.sort().join("");if(!(p in a)){throw new Error("Unable to parse color from object: "+JSON.stringify(e))}this.model=a[p];var m=n[this.model].labels;var g=[];for(r=0;r<m.length;r++){g.push(e[m[r]])}this.color=zeroArray(g)}if(l[this.model]){u=n[this.model].channels;for(r=0;r<u;r++){var y=l[this.model][r];if(y){this.color[r]=y(this.color[r])}}}this.valpha=Math.max(0,Math.min(1,this.valpha));if(Object.freeze){Object.freeze(this)}}Color.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in i.to?this:this.rgb();t=t.round(typeof e==="number"?e:1);var r=t.valpha===1?t.color:t.color.concat(this.valpha);return i.to[t.model](r)},percentString:function(e){var t=this.rgb().round(typeof e==="number"?e:1);var r=t.valpha===1?t.color:t.color.concat(this.valpha);return i.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){var e={};var t=n[this.model].channels;var r=n[this.model].labels;for(var i=0;i<t;i++){e[r[i]]=this.color[i]}if(this.valpha!==1){e.alpha=this.valpha}return e},unitArray:function(){var e=this.rgb().color;e[0]/=255;e[1]/=255;e[2]/=255;if(this.valpha!==1){e.push(this.valpha)}return e},unitObject:function(){var e=this.rgb().object();e.r/=255;e.g/=255;e.b/=255;if(this.valpha!==1){e.alpha=this.valpha}return e},round:function(e){e=Math.max(e||0,0);return new Color(this.color.map(roundToPlace(e)).concat(this.valpha),this.model)},alpha:function(e){if(arguments.length){return new Color(this.color.concat(Math.max(0,Math.min(1,e))),this.model)}return this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(100)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(100)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword:function(e){if(arguments.length){return new Color(e)}return n[this.model].keyword(this.color)},hex:function(e){if(arguments.length){return new Color(e)}return i.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity:function(){var e=this.rgb().color;var t=[];for(var r=0;r<e.length;r++){var i=e[r]/255;t[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity();var r=e.luminosity();if(t>r){return(t+.05)/(r+.05)}return(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);if(t>=7.1){return"AAA"}return t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;var t=(e[0]*299+e[1]*587+e[2]*114)/1e3;return t<128},isLight:function(){return!this.isDark()},negate:function(){var e=this.rgb();for(var t=0;t<3;t++){e.color[t]=255-e.color[t]}return e},lighten:function(e){var t=this.hsl();t.color[2]+=t.color[2]*e;return t},darken:function(e){var t=this.hsl();t.color[2]-=t.color[2]*e;return t},saturate:function(e){var t=this.hsl();t.color[1]+=t.color[1]*e;return t},desaturate:function(e){var t=this.hsl();t.color[1]-=t.color[1]*e;return t},whiten:function(e){var t=this.hwb();t.color[1]+=t.color[1]*e;return t},blacken:function(e){var t=this.hwb();t.color[2]+=t.color[2]*e;return t},grayscale:function(){var e=this.rgb().color;var t=e[0]*.3+e[1]*.59+e[2]*.11;return Color.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl();var r=t.color[0];r=(r+e)%360;r=r<0?360+r:r;t.color[0]=r;return t},mix:function(e,t){if(!e||!e.rgb){throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e)}var r=e.rgb();var i=this.rgb();var n=t===undefined?.5:t;var s=2*n-1;var o=r.alpha()-i.alpha();var a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2;var l=1-a;return Color.rgb(a*r.red()+l*i.red(),a*r.green()+l*i.green(),a*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(n).forEach((function(e){if(o.indexOf(e)!==-1){return}var t=n[e].channels;Color.prototype[e]=function(){if(this.model===e){return new Color(this)}if(arguments.length){return new Color(arguments,e)}var r=typeof arguments[t]==="number"?t:this.valpha;return new Color(assertArray(n[this.model][e].raw(this.color)).concat(r),e)};Color[e]=function(r){if(typeof r==="number"){r=zeroArray(s.call(arguments),t)}return new Color(r,e)}}));function roundTo(e,t){return Number(e.toFixed(t))}function roundToPlace(e){return function(t){return roundTo(t,e)}}function getset(e,t,r){e=Array.isArray(e)?e:[e];e.forEach((function(e){(l[e]||(l[e]=[]))[t]=r}));e=e[0];return function(i){var n;if(arguments.length){if(r){i=r(i)}n=this[e]();n.color[t]=i;return n}n=this[e]().color[t];if(r){n=r(n)}return n}}function maxfn(e){return function(t){return Math.max(0,Math.min(e,t))}}function assertArray(e){return Array.isArray(e)?e:[e]}function zeroArray(e,t){for(var r=0;r<t;r++){if(typeof e[r]!=="number"){e[r]=0}}return e}e.exports=Color},5917:(e,t,r)=>{"use strict";var i=r(7177),n=r(7014);e.exports=function colorspace(e,t){var r=e.split(t||":");var s=n(r[0]);if(!r.length)return s;for(var o=0,a=r.length-1;o<a;o++){s=i(s).mix(i(n(r[o+1]))).saturate(1).hex()}return s}},2391:(e,t,r)=>{"use strict";const{Transform:i,PassThrough:n}=r(2781);const s=r(9796);const o=r(2610);e.exports=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t)){return e}const r=t==="br";if(r&&typeof s.createBrotliDecompress!=="function"){e.destroy(new Error("Brotli is not supported on Node.js < 12"));return e}let a=true;const l=new i({transform(e,t,r){a=false;r(null,e)},flush(e){e()}});const u=new n({autoDestroy:false,destroy(t,r){e.destroy();r(t)}});const c=r?s.createBrotliDecompress():s.createUnzip();c.once("error",(t=>{if(a&&!e.readable){u.end();return}u.destroy(t)}));o(e,u);e.pipe(l).pipe(c).pipe(u);return u}},6214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isTLSSocket(e){return e.encrypted}const deferToConnect=(e,t)=>{let r;if(typeof t==="function"){const e=t;r={connect:e}}else{r=t}const i=typeof r.connect==="function";const n=typeof r.secureConnect==="function";const s=typeof r.close==="function";const onConnect=()=>{if(i){r.connect()}if(isTLSSocket(e)&&n){if(e.authorized){r.secureConnect()}else if(!e.authorizationError){e.once("secureConnect",r.secureConnect)}}if(s){e.once("close",r.close)}};if(e.writable&&!e.connecting){onConnect()}else if(e.connecting){e.once("connect",onConnect)}else if(e.destroyed&&s){r.close(e._hadError)}};t["default"]=deferToConnect;e.exports=deferToConnect;e.exports["default"]=deferToConnect},3495:e=>{"use strict";e.exports=function enabled(e,t){if(!t)return false;var r=t.split(/[\s,]+/),i=0;for(;i<r.length;i++){t=r[i].replace("*",".*?");if("-"===t.charAt(0)){if(new RegExp("^"+t.substr(1)+"$").test(e)){return false}continue}if(new RegExp("^"+t+"$").test(e)){return true}}return false}},4513:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";var t=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;var r="\\d\\d?";var i="\\d\\d";var n="\\d{3}";var s="\\d{4}";var o="[^\\s]+";var a=/\[([^]*?)\]/gm;function shorten(e,t){var r=[];for(var i=0,n=e.length;i<n;i++){r.push(e[i].substr(0,t))}return r}var monthUpdate=function(e){return function(t,r){var i=r[e].map((function(e){return e.toLowerCase()}));var n=i.indexOf(t.toLowerCase());if(n>-1){return n}return null}};function assign(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}for(var i=0,n=t;i<n.length;i++){var s=n[i];for(var o in s){e[o]=s[o]}}return e}var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var u=["January","February","March","April","May","June","July","August","September","October","November","December"];var c=shorten(u,3);var h=shorten(l,3);var d={dayNamesShort:h,dayNames:l,monthNamesShort:c,monthNames:u,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}};var p=assign({},d);var setGlobalDateI18n=function(e){return p=assign(p,e)};var regexEscape=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")};var pad=function(e,t){if(t===void 0){t=2}e=String(e);while(e.length<t){e="0"+e}return e};var m={D:function(e){return String(e.getDate())},DD:function(e){return pad(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return pad(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return pad(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return pad(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return pad(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return pad(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return pad(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return pad(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return pad(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return pad(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return pad(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+pad(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+pad(Math.floor(Math.abs(t)/60),2)+":"+pad(Math.abs(t)%60,2)}};var monthParse=function(e){return+e-1};var g=[null,r];var y=[null,o];var _=["isPm",o,function(e,t){var r=e.toLowerCase();if(r===t.amPm[0]){return 0}else if(r===t.amPm[1]){return 1}return null}];var v=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var r=+t[1]*60+parseInt(t[2],10);return t[0]==="+"?r:-r}return 0}];var b={D:["day",r],DD:["day",i],Do:["day",r+o,function(e){return parseInt(e,10)}],M:["month",r,monthParse],MM:["month",i,monthParse],YY:["year",i,function(e){var t=new Date;var r=+(""+t.getFullYear()).substr(0,2);return+(""+(+e>68?r-1:r)+e)}],h:["hour",r,undefined,"isPm"],hh:["hour",i,undefined,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(e){return+e*100}],SS:["millisecond",i,function(e){return+e*10}],SSS:["millisecond",n],d:g,dd:g,ddd:y,dddd:y,MMM:["month",o,monthUpdate("monthNamesShort")],MMMM:["month",o,monthUpdate("monthNames")],a:_,A:_,ZZ:v,Z:v};var x={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};var setGlobalDateMasks=function(e){return assign(x,e)};var format=function(e,r,i){if(r===void 0){r=x["default"]}if(i===void 0){i={}}if(typeof e==="number"){e=new Date(e)}if(Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime())){throw new Error("Invalid Date pass to format")}r=x[r]||r;var n=[];r=r.replace(a,(function(e,t){n.push(t);return"@@@"}));var s=assign(assign({},p),i);r=r.replace(t,(function(t){return m[t](e,s)}));return r.replace(/@@@/g,(function(){return n.shift()}))};function parse(e,r,i){if(i===void 0){i={}}if(typeof r!=="string"){throw new Error("Invalid format in fecha parse")}r=x[r]||r;if(e.length>1e3){return null}var n=new Date;var s={year:n.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null};var o=[];var l=[];var u=r.replace(a,(function(e,t){l.push(regexEscape(t));return"@@@"}));var c={};var h={};u=regexEscape(u).replace(t,(function(e){var t=b[e];var r=t[0],i=t[1],n=t[3];if(c[r]){throw new Error("Invalid format. "+r+" specified twice in format")}c[r]=true;if(n){h[n]=true}o.push(t);return"("+i+")"}));Object.keys(h).forEach((function(e){if(!c[e]){throw new Error("Invalid format. "+e+" is required in specified format")}}));u=u.replace(/@@@/g,(function(){return l.shift()}));var d=e.match(new RegExp(u,"i"));if(!d){return null}var m=assign(assign({},p),i);for(var g=1;g<d.length;g++){var y=o[g-1],_=y[0],v=y[2];var T=v?v(d[g],m):+d[g];if(T==null){return null}s[_]=T}if(s.isPm===1&&s.hour!=null&&+s.hour!==12){s.hour=+s.hour+12}else if(s.isPm===0&&+s.hour===12){s.hour=0}var w;if(s.timezoneOffset==null){w=new Date(s.year,s.month,s.day,s.hour,s.minute,s.second,s.millisecond);var S=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]];for(var g=0,E=S.length;g<E;g++){if(c[S[g][0]]&&s[S[g][0]]!==w[S[g][1]]()){return null}}}else{w=new Date(Date.UTC(s.year,s.month,s.day,s.hour,s.minute-s.timezoneOffset,s.second,s.millisecond));if(s.month>11||s.month<0||s.day>31||s.day<1||s.hour>23||s.hour<0||s.minute>59||s.minute<0||s.second>59||s.second<0){return null}}return w}var T={format:format,parse:parse,defaultI18n:d,setGlobalDateI18n:setGlobalDateI18n,setGlobalDateMasks:setGlobalDateMasks};e.assign=assign;e.default=T;e.format=format;e.parse=parse;e.defaultI18n=d;e.setGlobalDateI18n=setGlobalDateI18n;e.setGlobalDateMasks=setGlobalDateMasks;Object.defineProperty(e,"__esModule",{value:true})}))},2743:e=>{"use strict";var t=Object.prototype.toString;e.exports=function name(e){if("string"===typeof e.displayName&&e.constructor.name){return e.displayName}else if("string"===typeof e.name&&e.name){return e.name}if("object"===typeof e&&e.constructor&&"string"===typeof e.constructor.name)return e.constructor.name;var r=e.toString(),i=t.call(e).slice(8,-1);if("Function"===i){r=r.substring(r.indexOf("(")+1,r.indexOf(")"))}else{r=i}return r||"anonymous"}},1585:(e,t,r)=>{"use strict";const{PassThrough:i}=r(2781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n=r==="buffer";let s=false;if(t){s=!(r||n)}else{r=r||"utf8"}if(n){r=null}const o=new i({objectMode:s});if(r){o.setEncoding(r)}let a=0;const l=[];o.on("data",(e=>{l.push(e);if(s){a=l.length}else{a+=e.length}}));o.getBufferedValue=()=>{if(t){return l}return n?Buffer.concat(l,a):l.join("")};o.getBufferedLength=()=>a;return o}},1766:(e,t,r)=>{"use strict";const{constants:i}=r(4300);const n=r(2781);const{promisify:s}=r(3837);const o=r(1585);const a=s(n.pipeline);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){throw new Error("Expected a stream")}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;const n=o(t);await new Promise(((t,s)=>{const rejectPromise=e=>{if(e&&n.getBufferedLength()<=i.MAX_LENGTH){e.bufferedData=n.getBufferedValue()}s(e)};(async()=>{try{await a(e,n);t()}catch(e){rejectPromise(e)}})();n.on("data",(()=>{if(n.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return n.getBufferedValue()}e.exports=getStream;e.exports.buffer=(e,t)=>getStream(e,{...t,encoding:"buffer"});e.exports.array=(e,t)=>getStream(e,{...t,array:true});e.exports.MaxBufferError=MaxBufferError},1621:e=>{"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=t.indexOf(r+e);const n=t.indexOf("--");return i!==-1&&(n===-1||i<n)}},1002:e=>{"use strict";const t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]);const r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]);const i=new Set([500,502,503,504]);const n={date:true,connection:true,"keep-alive":true,"proxy-authenticate":true,"proxy-authorization":true,te:true,trailer:true,"transfer-encoding":true,upgrade:true};const s={"content-length":true,"content-encoding":true,"transfer-encoding":true,"content-range":true};function toNumberOrZero(e){const t=parseInt(e,10);return isFinite(t)?t:0}function isErrorResponse(e){if(!e){return true}return i.has(e.status)}function parseCacheControl(e){const t={};if(!e)return t;const r=e.trim().split(/,/);for(const e of r){const[r,i]=e.split(/=/,2);t[r.trim()]=i===undefined?true:i.trim().replace(/^"|"$/g,"")}return t}function formatCacheControl(e){let t=[];for(const r in e){const i=e[r];t.push(i===true?r:r+"="+i)}if(!t.length){return undefined}return t.join(", ")}e.exports=class CachePolicy{constructor(e,t,{shared:r,cacheHeuristic:i,immutableMinTimeToLive:n,ignoreCargoCult:s,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!t||!t.headers){throw Error("Response headers missing")}this._assertRequestHasHeaders(e);this._responseTime=this.now();this._isShared=r!==false;this._cacheHeuristic=undefined!==i?i:.1;this._immutableMinTtl=undefined!==n?n:24*3600*1e3;this._status="status"in t?t.status:200;this._resHeaders=t.headers;this._rescc=parseCacheControl(t.headers["cache-control"]);this._method="method"in e?e.method:"GET";this._url=e.url;this._host=e.headers.host;this._noAuthorization=!e.headers.authorization;this._reqHeaders=t.headers.vary?e.headers:null;this._reqcc=parseCacheControl(e.headers["cache-control"]);if(s&&"pre-check"in this._rescc&&"post-check"in this._rescc){delete this._rescc["pre-check"];delete this._rescc["post-check"];delete this._rescc["no-cache"];delete this._rescc["no-store"];delete this._rescc["must-revalidate"];this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":formatCacheControl(this._rescc)});delete this._resHeaders.expires;delete this._resHeaders.pragma}if(t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)){this._rescc["no-cache"]=true}}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())&&r.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers){throw Error("Request headers missing")}}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=parseCacheControl(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma)){return false}if(t["max-age"]&&this.age()>t["max-age"]){return false}if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]){return false}if(this.stale()){const e=t["max-stale"]&&!this._rescc["must-revalidate"]&&(true===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge());if(!e){return false}}return this._requestMatches(e,false)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary){return true}if(this._resHeaders.vary==="*"){return false}const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t){if(e.headers[r]!==this._reqHeaders[r])return false}return true}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e){if(n[r])continue;t[r]=e[r]}if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r){delete t[e]}}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));if(!e.length){delete t.warning}else{t.warning=e.join(",").trim()}}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders);const t=this.age();if(t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24){e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'}e.age=`${Math.round(t)}`;e.date=new Date(this.now()).toUTCString();return e}date(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){return e}return this._responseTime}age(){let e=this._ageValue();const t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return toNumberOrZero(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]){return 0}if(this._isShared&&(this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)){return 0}if(this._resHeaders.vary==="*"){return 0}if(this._isShared){if(this._rescc["proxy-revalidate"]){return 0}if(this._rescc["s-maxage"]){return toNumberOrZero(this._rescc["s-maxage"])}}if(this._rescc["max-age"]){return toNumberOrZero(this._rescc["max-age"])}const e=this._rescc.immutable?this._immutableMinTtl:0;const t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);if(Number.isNaN(r)||r<t){return 0}return Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){const r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r){return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}}return e}timeToLive(){const e=this.maxAge()-this.age();const t=e+toNumberOrZero(this._rescc["stale-if-error"]);const r=e+toNumberOrZero(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,r)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+toNumberOrZero(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+toNumberOrZero(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(undefined,undefined,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t;this._isShared=e.sh;this._cacheHeuristic=e.ch;this._immutableMinTtl=e.imm!==undefined?e.imm:24*3600*1e3;this._status=e.st;this._resHeaders=e.resh;this._rescc=e.rescc;this._method=e.m;this._url=e.u;this._host=e.h;this._noAuthorization=e.a;this._reqHeaders=e.reqh;this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);delete t["if-range"];if(!this._requestMatches(e,true)||!this.storable()){delete t["if-none-match"];delete t["if-modified-since"];return t}if(this._resHeaders.etag){t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag}const r=t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET";if(r){delete t["if-modified-since"];if(t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));if(!e.length){delete t["if-none-match"]}else{t["if-none-match"]=e.join(",").trim()}}}else if(this._resHeaders["last-modified"]&&!t["if-modified-since"]){t["if-modified-since"]=this._resHeaders["last-modified"]}return t}revalidatedPolicy(e,t){this._assertRequestHasHeaders(e);if(this._useStaleIfError()&&isErrorResponse(t)){return{modified:false,matches:false,policy:this}}if(!t||!t.headers){throw Error("Response headers missing")}let r=false;if(t.status!==undefined&&t.status!=304){r=false}else if(t.headers.etag&&!/^\s*W\//.test(t.headers.etag)){r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag}else if(this._resHeaders.etag&&t.headers.etag){r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,"")}else if(this._resHeaders["last-modified"]){r=this._resHeaders["last-modified"]===t.headers["last-modified"]}else{if(!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]){r=true}}if(!r){return{policy:new this.constructor(e,t),modified:t.status!=304,matches:false}}const i={};for(const e in this._resHeaders){i[e]=e in t.headers&&!s[e]?t.headers[e]:this._resHeaders[e]}const n=Object.assign({},t,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:false,matches:true}}}},9898:(e,t,r)=>{"use strict";const{URL:i}=r(7310);const n=r(2361);const s=r(4404);const o=r(5158);const a=r(9273);const l=r(9237);const u=Symbol("currentStreamCount");const c=Symbol("request");const h=Symbol("cachedOriginSet");const d=Symbol("gracefullyClosing");const p=Symbol("length");const m=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"];const getSortedIndex=(e,t,r)=>{let i=0;let n=e.length;while(i<n){const s=i+n>>>1;if(r(e[s],t)){i=s+1}else{n=s}}return i};const compareSessions=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams;const closeCoveredSessions=(e,t)=>{for(let r=0;r<e.length;r++){const i=e[r];if(i[h].length>0&&i[h].length<t[h].length&&i[h].every((e=>t[h].includes(e)))&&i[u]+t[u]<=t.remoteSettings.maxConcurrentStreams){gracefullyClose(i)}}};const closeSessionIfCovered=(e,t)=>{for(let r=0;r<e.length;r++){const i=e[r];if(t[h].length>0&&t[h].length<i[h].length&&t[h].every((e=>i[h].includes(e)))&&t[u]+i[u]<=i.remoteSettings.maxConcurrentStreams){gracefullyClose(t);return true}}return false};const gracefullyClose=e=>{e[d]=true;if(e[u]===0){e.close()}};class Agent extends n{constructor({timeout:e=0,maxSessions:t=Number.POSITIVE_INFINITY,maxEmptySessions:r=10,maxCachedTlsSessions:i=100}={}){super();this.sessions={};this.queue={};this.timeout=e;this.maxSessions=t;this.maxEmptySessions=r;this._emptySessionCount=0;this._sessionCount=0;this.settings={enablePush:false,initialWindowSize:1024*1024*32};this.tlsSessionCache=new a({maxSize:i})}get protocol(){return"https:"}normalizeOptions(e){let t="";for(let r=0;r<m.length;r++){const i=m[r];t+=":";if(e&&e[i]!==undefined){t+=e[i]}}return t}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(const e in this.queue){for(const t in this.queue[e]){const r=this.queue[e][t];if(!r.completed){r.completed=true;r()}}}}_isBetterSession(e,t){return e>t}_accept(e,t,r,i){let n=0;while(n<t.length&&e[u]<e.remoteSettings.maxConcurrentStreams){t[n].resolve(e);n++}t.splice(0,n);if(t.length>0){this.getSession(r,i,t);t.length=0}}getSession(e,t,r){return new Promise(((n,s)=>{if(Array.isArray(r)&&r.length>0){r=[...r];n()}else{r=[{resolve:n,reject:s}]}try{if(typeof e==="string"){e=new i(e)}else if(!(e instanceof i)){throw new TypeError("The `origin` argument needs to be a string or an URL object")}if(t){const{servername:r}=t;const{hostname:i}=e;if(r&&i!==r){throw new Error(`Origin ${i} differs from servername ${r}`)}}}catch(e){for(let t=0;t<r.length;t++){r[t].reject(e)}return}const a=this.normalizeOptions(t);const l=e.origin;if(a in this.sessions){const e=this.sessions[a];let i=-1;let n=-1;let s;for(let t=0;t<e.length;t++){const r=e[t];const o=r.remoteSettings.maxConcurrentStreams;if(o<i){break}if(!r[h].includes(l)){continue}const a=r[u];if(a>=o||r[d]||r.destroyed){continue}if(!s){i=o}if(this._isBetterSession(a,n)){s=r;n=a}}if(s){this._accept(s,r,l,t);return}}if(a in this.queue){if(l in this.queue[a]){this.queue[a][l].listeners.push(...r);return}}else{this.queue[a]={[p]:0}}const removeFromQueue=()=>{if(a in this.queue&&this.queue[a][l]===entry){delete this.queue[a][l];if(--this.queue[a][p]===0){delete this.queue[a]}}};const entry=async()=>{this._sessionCount++;const i=`${l}:${a}`;let n=false;let s;try{const m={...t};if(m.settings===undefined){m.settings=this.settings}if(m.session===undefined){m.session=this.tlsSessionCache.get(i)}const g=m.createConnection||this.createConnection;s=await g.call(this,e,m);m.createConnection=()=>s;const y=o.connect(e,m);y[u]=0;y[d]=false;const getOriginSet=()=>{const{socket:e}=y;let t;if(e.servername===false){e.servername=e.remoteAddress;t=y.originSet;e.servername=false}else{t=y.originSet}return t};const isFree=()=>y[u]<y.remoteSettings.maxConcurrentStreams;y.socket.once("session",(e=>{this.tlsSessionCache.set(i,e)}));y.once("error",(e=>{for(let t=0;t<r.length;t++){r[t].reject(e)}this.tlsSessionCache.delete(i)}));y.setTimeout(this.timeout,(()=>{y.destroy()}));y.once("close",(()=>{this._sessionCount--;if(n){this._emptySessionCount--;const e=this.sessions[a];if(e.length===1){delete this.sessions[a]}else{e.splice(e.indexOf(y),1)}}else{removeFromQueue();const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(let t=0;t<r.length;t++){r[t].reject(e)}}this._processQueue()}));const processListeners=()=>{const e=this.queue[a];if(!e){return}const t=y[h];for(let r=0;r<t.length;r++){const i=t[r];if(i in e){const{listeners:t,completed:r}=e[i];let n=0;while(n<t.length&&isFree()){t[n].resolve(y);n++}e[i].listeners.splice(0,n);if(e[i].listeners.length===0&&!r){delete e[i];if(--e[p]===0){delete this.queue[a];break}}if(!isFree()){break}}}};y.on("origin",(()=>{y[h]=getOriginSet()||[];y[d]=false;closeSessionIfCovered(this.sessions[a],y);if(y[d]||!isFree()){return}processListeners();if(!isFree()){return}closeCoveredSessions(this.sessions[a],y)}));y.once("remoteSettings",(()=>{if(entry.destroyed){const e=new Error("Agent has been destroyed");for(let t=0;t<r.length;t++){r[t].reject(e)}y.destroy();return}if(y.setLocalWindowSize){y.setLocalWindowSize(1024*1024*4)}y[h]=getOriginSet()||[];if(y.socket.encrypted){const e=y[h][0];if(e!==l){const t=new Error(`Requested origin ${l} does not match server ${e}`);for(let e=0;e<r.length;e++){r[e].reject(t)}y.destroy();return}}removeFromQueue();{const e=this.sessions;if(a in e){const t=e[a];t.splice(getSortedIndex(t,y,compareSessions),0,y)}else{e[a]=[y]}}n=true;this._emptySessionCount++;this.emit("session",y);this._accept(y,r,l,t);if(y[u]===0&&this._emptySessionCount>this.maxEmptySessions){this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions)}y.on("remoteSettings",(()=>{if(!isFree()){return}processListeners();if(!isFree()){return}closeCoveredSessions(this.sessions[a],y)}))}));y[c]=y.request;y.request=(e,t)=>{if(y[d]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=y[c](e,t);y.ref();if(y[u]++===0){this._emptySessionCount--}r.once("close",(()=>{if(--y[u]===0){this._emptySessionCount++;y.unref();if(this._emptySessionCount>this.maxEmptySessions||y[d]){y.close();return}}if(y.destroyed||y.closed){return}if(isFree()&&!closeSessionIfCovered(this.sessions[a],y)){closeCoveredSessions(this.sessions[a],y);processListeners();if(y[u]===0){this._processQueue()}}}));return r}}catch(e){removeFromQueue();this._sessionCount--;for(let t=0;t<r.length;t++){r[t].reject(e)}}};entry.listeners=r;entry.completed=false;entry.destroyed=false;this.queue[a][l]=entry;this.queue[a][p]++;this._processQueue()}))}request(e,t,r,i){return new Promise(((n,s)=>{this.getSession(e,t,[{reject:s,resolve:e=>{try{const t=e.request(r,i);l(t);n(t)}catch(e){s(e)}}}])}))}async createConnection(e,t){return Agent.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443;const i=e.hostname;if(typeof t.servername==="undefined"){t.servername=i}const n=s.connect(r,i,t);if(t.socket){n._peername={family:undefined,address:undefined,port:r}}return n}closeEmptySessions(e=Number.POSITIVE_INFINITY){let t=0;const{sessions:r}=this;for(const i in r){const n=r[i];for(let r=0;r<n.length;r++){const i=n[r];if(i[u]===0){t++;i.close();if(t>=e){return t}}}}return t}destroy(e){const{sessions:t,queue:r}=this;for(const r in t){const i=t[r];for(let t=0;t<i.length;t++){i[t].destroy(e)}}for(const e in r){const t=r[e];for(const e in t){t[e].destroyed=true}}this.queue={};this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}}Agent.kCurrentStreamCount=u;Agent.kGracefullyClosing=d;e.exports={Agent:Agent,globalAgent:new Agent}},7167:(e,t,r)=>{"use strict";const{URL:i,urlToHttpOptions:n}=r(7310);const s=r(3685);const o=r(5687);const a=r(6624);const l=r(9273);const{Agent:u,globalAgent:c}=r(9898);const h=r(9632);const d=r(1982);const p=r(9237);const m=new l({maxSize:100});const g=new Map;const installSocket=(e,t,r)=>{t._httpMessage={shouldKeepAlive:true};const onFree=()=>{e.emit("free",t,r)};t.on("free",onFree);const onClose=()=>{e.removeSocket(t,r)};t.on("close",onClose);const onTimeout=()=>{const{freeSockets:r}=e;for(const e of Object.values(r)){if(e.includes(t)){t.destroy();return}}};t.on("timeout",onTimeout);const onRemove=()=>{e.removeSocket(t,r);t.off("close",onClose);t.off("free",onFree);t.off("timeout",onTimeout);t.off("agentRemove",onRemove)};t.on("agentRemove",onRemove);e.emit("free",t,r)};const createResolveProtocol=(e,t=new Map,r=undefined)=>async i=>{const n=`${i.host}:${i.port}:${i.ALPNProtocols.sort()}`;if(!e.has(n)){if(t.has(n)){const e=await t.get(n);return{alpnProtocol:e.alpnProtocol}}const{path:s}=i;i.path=i.socketPath;const o=a(i,r);t.set(n,o);try{const r=await o;e.set(n,r.alpnProtocol);t.delete(n);i.path=s;return r}catch(e){t.delete(n);i.path=s;throw e}}return{alpnProtocol:e.get(n)}};const y=createResolveProtocol(m,g);e.exports=async(e,t,r)=>{if(typeof e==="string"){e=n(new i(e))}else if(e instanceof i){e=n(e)}else{e={...e}}if(typeof t==="function"||t===undefined){r=t;t=e}else{t=Object.assign(e,t)}t.ALPNProtocols=t.ALPNProtocols||["h2","http/1.1"];if(!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0){throw new Error("The `ALPNProtocols` option must be an Array with at least one entry")}t.protocol=t.protocol||"https:";const a=t.protocol==="https:";t.host=t.hostname||t.host||"localhost";t.session=t.tlsSession;t.servername=t.servername||d(t.headers&&t.headers.host||t.host);t.port=t.port||(a?443:80);t._defaultAgent=a?o.globalAgent:s.globalAgent;const l=t.resolveProtocol||y;let{agent:m}=t;if(m!==undefined&&m!==false&&m.constructor.name!=="Object"){throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties")}if(a){t.resolveSocket=true;let{socket:e,alpnProtocol:i,timeout:n}=await l(t);if(n){if(e){e.destroy()}const r=new Error(`Timed out resolving ALPN: ${t.timeout} ms`);r.code="ETIMEDOUT";r.ms=t.timeout;throw r}if(e&&t.createConnection){e.destroy();e=undefined}delete t.resolveSocket;const s=i==="h2";if(m){m=s?m.http2:m.https;t.agent=m}if(m===undefined){m=s?c:o.globalAgent}if(e){if(m===false){e.destroy()}else{const r=(s?u:o.Agent).prototype.createConnection;if(m.createConnection===r){if(s){t._reuseSocket=e}else{installSocket(m,e,t)}}else{e.destroy()}}}if(s){return p(new h(t,r))}}else if(m){t.agent=m.http}return p(s.request(t,r))};e.exports.protocolCache=m;e.exports.resolveProtocol=y;e.exports.createResolveProtocol=createResolveProtocol},9632:(e,t,r)=>{"use strict";const{URL:i,urlToHttpOptions:n}=r(7310);const s=r(5158);const{Writable:o}=r(2781);const{Agent:a,globalAgent:l}=r(9898);const u=r(2575);const c=r(1818);const{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_PROTOCOL:d,ERR_HTTP_HEADERS_SENT:p}=r(7087);const m=r(4592);const g=r(3549);const y=r(9404);const{HTTP2_HEADER_STATUS:_,HTTP2_HEADER_METHOD:v,HTTP2_HEADER_PATH:b,HTTP2_HEADER_AUTHORITY:x,HTTP2_METHOD_CONNECT:T}=s.constants;const w=Symbol("headers");const S=Symbol("origin");const E=Symbol("session");const A=Symbol("options");const C=Symbol("flushedHeaders");const N=Symbol("jobs");const O=Symbol("pendingAgentPromise");class ClientRequest extends o{constructor(e,t,r){super({autoDestroy:false,emitClose:false});if(typeof e==="string"){e=n(new i(e))}else if(e instanceof i){e=n(e)}else{e={...e}}if(typeof t==="function"||t===undefined){r=t;t=e}else{t=Object.assign(e,t)}if(t.h2session){this[E]=t.h2session;if(this[E].destroyed){throw new Error("The session has been closed already")}this.protocol=this[E].socket.encrypted?"https:":"http:"}else if(t.agent===false){this.agent=new a({maxEmptySessions:0})}else if(typeof t.agent==="undefined"||t.agent===null){this.agent=l}else if(typeof t.agent.request==="function"){this.agent=t.agent}else{throw new h("options.agent",["http2wrapper.Agent-like Object","undefined","false"],t.agent)}if(this.agent){this.protocol=this.agent.protocol}if(t.protocol&&t.protocol!==this.protocol){throw new d(t.protocol,this.protocol)}if(!t.port){t.port=t.defaultPort||this.agent&&this.agent.defaultPort||443}t.host=t.hostname||t.host||"localhost";delete t.hostname;const{timeout:s}=t;t.timeout=undefined;this[w]=Object.create(null);this[N]=[];this[O]=undefined;this.socket=null;this.connection=null;this.method=t.method||"GET";if(!(this.method==="CONNECT"&&(t.path==="/"||t.path===undefined))){this.path=t.path}this.res=null;this.aborted=false;this.reusedSocket=false;const{headers:o}=t;if(o){for(const e in o){this.setHeader(e,o[e])}}if(t.auth&&!("authorization"in this[w])){this[w].authorization="Basic "+Buffer.from(t.auth).toString("base64")}t.session=t.tlsSession;t.path=t.socketPath;this[A]=t;this[S]=new i(`${this.protocol}//${t.servername||t.host}:${t.port}`);const u=t._reuseSocket;if(u){t.createConnection=(...e)=>{if(u.destroyed){return this.agent.createConnection(...e)}return u};this.agent.getSession(this[S],this[A]).catch((()=>{}))}if(s){this.setTimeout(s)}if(r){this.once("response",r)}this[C]=false}get method(){return this[w][v]}set method(e){if(e){this[w][v]=e.toUpperCase()}}get path(){const e=this.method==="CONNECT"?x:b;return this[w][e]}set path(e){if(e){const t=this.method==="CONNECT"?x:b;this[w][t]=e}}get host(){return this[S].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,r){if(this._mustNotHaveABody){r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const callWrite=()=>this._request.write(e,t,r);if(this._request){callWrite()}else{this[N].push(callWrite)}}_final(e){this.flushHeaders();const callEnd=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e)};if(this._request){callEnd()}else{this[N].push(callEnd)}}abort(){if(this.res&&this.res.complete){return}if(!this.aborted){process.nextTick((()=>this.emit("abort")))}this.aborted=true;this.destroy()}async _destroy(e,t){if(this.res){this.res._dump()}if(this._request){this._request.destroy()}else{process.nextTick((()=>{this.emit("close")}))}try{await this[O]}catch(t){if(this.aborted){e=t}}t(e)}async flushHeaders(){if(this[C]||this.destroyed){return}this[C]=true;const e=this.method===T;const onStream=t=>{this._request=t;if(this.destroyed){t.destroy();return}if(!e){c(t,this,["timeout","continue"])}t.once("error",(e=>{this.destroy(e)}));t.once("aborted",(()=>{const{res:e}=this;if(e){e.aborted=true;e.emit("aborted");e.destroy()}else{this.destroy(new Error("The server aborted the HTTP/2 stream"))}}));const onResponse=(r,i,n)=>{const s=new u(this.socket,t.readableHighWaterMark);this.res=s;s.url=`${this[S].origin}${this.path}`;s.req=this;s.statusCode=r[_];s.headers=r;s.rawHeaders=n;s.once("end",(()=>{s.complete=true;s.socket=null;s.connection=null}));if(e){s.upgrade=true;if(this.emit("connect",s,t,Buffer.alloc(0))){this.emit("close")}else{t.destroy()}}else{t.on("data",(e=>{if(!s._dumped&&!s.push(e)){t.pause()}}));t.once("end",(()=>{if(!this.aborted){s.push(null)}}));if(!this.emit("response",s)){s._dump()}}};t.once("response",onResponse);t.once("headers",(e=>this.emit("information",{statusCode:e[_]})));t.once("trailers",((e,t,r)=>{const{res:i}=this;if(i===null){onResponse(e,t,r);return}i.trailers=e;i.rawTrailers=r}));t.once("close",(()=>{const{aborted:e,res:t}=this;if(t){if(e){t.aborted=true;t.emit("aborted");t.destroy()}const finish=()=>{t.emit("close");this.destroy();this.emit("close")};if(t.readable){t.once("end",finish)}else{finish()}return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated"));this.emit("close");return}this.destroy();this.emit("close")}));this.socket=new Proxy(t,y);for(const e of this[N]){e()}this[N].length=0;this.emit("socket",this.socket)};if(!(x in this[w])&&!e){this[w][x]=this[S].host}if(this[E]){try{onStream(this[E].request(this[w]))}catch(e){this.destroy(e)}}else{this.reusedSocket=true;try{const e=this.agent.request(this[S],this[A],this[w]);this[O]=e;onStream(await e);this[O]=false}catch(e){this[O]=false;this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[w])}hasHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}return Boolean(this[w][e.toLowerCase()])}getHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}return this[w][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}m(e);g(e,t);const r=e.toLowerCase();if(r==="connection"){if(t.toLowerCase()==="keep-alive"){return}throw new Error(`Invalid 'connection' header: ${t}`)}if(r==="host"&&this.method==="CONNECT"){this[w][x]=t}else{this[w][r]=t}}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[N].push(applyTimeout)}return this}get maxHeadersCount(){if(!this.destroyed&&this._request){return this._request.session.localSettings.maxHeaderListSize}return undefined}set maxHeadersCount(e){}}e.exports=ClientRequest},2575:(e,t,r)=>{"use strict";const{Readable:i}=r(2781);class IncomingMessage extends i{constructor(e,t){super({emitClose:false,autoDestroy:true,highWaterMark:t});this.statusCode=null;this.statusMessage="";this.httpVersion="2.0";this.httpVersionMajor=2;this.httpVersionMinor=0;this.headers={};this.trailers={};this.req=null;this.aborted=false;this.complete=false;this.upgrade=null;this.rawHeaders=[];this.rawTrailers=[];this.socket=e;this._dumped=false}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){if(!this.readableEnded){this.aborted=true}t();this.req._request.destroy(e)}setTimeout(e,t){this.req.setTimeout(e,t);return this}_dump(){if(!this._dumped){this._dumped=true;this.removeAllListeners("data");this.resume()}}_read(){if(this.req){this.req._request.resume()}}}e.exports=IncomingMessage},4645:(e,t,r)=>{"use strict";const i=r(5158);const{Agent:n,globalAgent:s}=r(9898);const o=r(9632);const a=r(2575);const l=r(7167);const{HttpOverHttp2:u,HttpsOverHttp2:c}=r(8795);const h=r(8553);const{Http2OverHttp:d,Http2OverHttps:p}=r(9794);const m=r(4592);const g=r(3549);const request=(e,t,r)=>new o(e,t,r);const get=(e,t,r)=>{const i=new o(e,t,r);i.end();return i};e.exports={...i,ClientRequest:o,IncomingMessage:a,Agent:n,globalAgent:s,request:request,get:get,auto:l,proxies:{HttpOverHttp2:u,HttpsOverHttp2:c,Http2OverHttp2:h,Http2OverHttp:d,Http2OverHttps:p},validateHeaderName:m,validateHeaderValue:g}},7885:e=>{"use strict";e.exports=e=>{const{username:t,password:r}=e.proxyOptions.url;if(t||r){const e=`${t}:${r}`;const i=`Basic ${Buffer.from(e).toString("base64")}`;return{"proxy-authorization":i,authorization:i}}return{}}},8795:(e,t,r)=>{"use strict";const i=r(4404);const n=r(3685);const s=r(5687);const o=r(1564);const{globalAgent:a}=r(9898);const l=r(6203);const u=r(1089);const c=r(7885);const createConnection=(e,t,r)=>{(async()=>{try{const{proxyOptions:n}=e;const{url:u,headers:h,raw:d}=n;const p=await a.request(u,n,{...c(e),...h,":method":"CONNECT",":authority":`${t.host}:${t.port}`});p.once("error",r);p.once("response",(n=>{const a=n[":status"];if(a!==200){r(new l(a,""));return}const u=e instanceof s.Agent;if(d&&u){t.socket=p;const e=i.connect(t);e.once("close",(()=>{p.destroy()}));r(null,e);return}const c=new o(p);c.encrypted=false;c._handle.getpeername=e=>{e.family=undefined;e.address=undefined;e.port=undefined};r(null,c)}))}catch(e){r(e)}})()};class HttpOverHttp2 extends n.Agent{constructor(e){super(e);u(this,e.proxyOptions)}createConnection(e,t){createConnection(this,e,t)}}class HttpsOverHttp2 extends s.Agent{constructor(e){super(e);u(this,e.proxyOptions)}createConnection(e,t){createConnection(this,e,t)}}e.exports={HttpOverHttp2:HttpOverHttp2,HttpsOverHttp2:HttpsOverHttp2}},9794:(e,t,r)=>{"use strict";const i=r(3685);const n=r(5687);const s=r(1857);const o=r(7885);const getStream=e=>new Promise(((t,r)=>{const onConnect=(i,n,s)=>{n.unshift(s);e.off("error",r);t([n,i.statusCode,i.statusMessage])};e.once("error",r);e.once("connect",onConnect)}));class Http2OverHttp extends s{async _getProxyStream(e){const{proxyOptions:t}=this;const{url:r,headers:s}=this.proxyOptions;const a=r.protocol==="https:"?n:i;const l=a.request({...t,hostname:r.hostname,port:r.port,path:e,headers:{...o(this),...s,host:e},method:"CONNECT"}).end();return getStream(l)}}e.exports={Http2OverHttp:Http2OverHttp,Http2OverHttps:Http2OverHttp}},8553:(e,t,r)=>{"use strict";const{globalAgent:i}=r(9898);const n=r(1857);const s=r(7885);const getStatusCode=e=>new Promise(((t,r)=>{e.once("error",r);e.once("response",(i=>{e.off("error",r);t(i[":status"])}))}));class Http2OverHttp2 extends n{async _getProxyStream(e){const{proxyOptions:t}=this;const r={...s(this),...t.headers,":method":"CONNECT",":authority":e};const n=await i.request(t.url,t,r);const o=await getStatusCode(n);return[n,o,""]}}e.exports=Http2OverHttp2},1857:(e,t,r)=>{"use strict";const{Agent:i}=r(9898);const n=r(1564);const s=r(6203);const o=r(1089);class Http2OverHttpX extends i{constructor(e){super(e);o(this,e.proxyOptions)}async createConnection(e,t){const r=`${e.hostname}:${e.port||443}`;const[i,o,a]=await this._getProxyStream(r);if(o!==200){throw new s(o,a)}if(this.proxyOptions.raw){t.socket=i}else{const e=new n(i);e.encrypted=false;e._handle.getpeername=e=>{e.family=undefined;e.address=undefined;e.port=undefined};return e}return super.createConnection(e,t)}}e.exports=Http2OverHttpX},1089:(e,t,r)=>{"use strict";const{URL:i}=r(7310);const n=r(3453);e.exports=(e,t)=>{n("proxyOptions",t,["object"]);n("proxyOptions.headers",t.headers,["object","undefined"]);n("proxyOptions.raw",t.raw,["boolean","undefined"]);n("proxyOptions.url",t.url,[i,"string"]);const r=new i(t.url);e.proxyOptions={raw:true,...t,headers:{...t.headers},url:r}}},6203:e=>{"use strict";class UnexpectedStatusCodeError extends Error{constructor(e,t=""){super(`The proxy server rejected the request with status code ${e} (${t||"empty status message"})`);this.statusCode=e;this.statusMessage=t}}e.exports=UnexpectedStatusCodeError},1982:(e,t,r)=>{"use strict";const{isIP:i}=r(1808);const n=r(9491);const getHost=e=>{if(e[0]==="["){const t=e.indexOf("]");n(t!==-1);return e.slice(1,t)}const t=e.indexOf(":");if(t===-1){return e}return e.slice(0,t)};e.exports=e=>{const t=getHost(e);if(i(t)){return""}return t}},3453:e=>{"use strict";const checkType=(e,t,r)=>{const i=r.some((e=>{const r=typeof e;if(r==="string"){return typeof t===e}return t instanceof e}));if(!i){const i=r.map((e=>typeof e==="string"?e:e.name));throw new TypeError(`Expected '${e}' to be a type of ${i.join(" or ")}, got ${typeof t}`)}};e.exports=checkType},9237:e=>{"use strict";e.exports=e=>{if(e.listenerCount("error")!==0){return e}e.__destroy=e._destroy;e._destroy=(...t)=>{const r=t.pop();e.__destroy(...t,(async e=>{await Promise.resolve();r(e)}))};const onError=t=>{Promise.resolve().then((()=>{e.emit("error",t)}))};e.once("error",onError);Promise.resolve().then((()=>{e.off("error",onError)}));return e}},7087:e=>{"use strict";const makeError=(t,r,i)=>{e.exports[r]=class NodeError extends t{constructor(...e){super(typeof i==="string"?i:i(e));this.name=`${super.name} [${r}]`;this.code=r}}};makeError(TypeError,"ERR_INVALID_ARG_TYPE",(e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const i=Array.isArray(r);if(i){r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`}return`The "${e[0]}" ${t} must be ${i?"one of":"of"} type ${r}. Received ${typeof e[2]}`}));makeError(TypeError,"ERR_INVALID_PROTOCOL",(e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`));makeError(Error,"ERR_HTTP_HEADERS_SENT",(e=>`Cannot ${e[0]} headers after they are sent to the client`));makeError(TypeError,"ERR_INVALID_HTTP_TOKEN",(e=>`${e[0]} must be a valid HTTP token [${e[1]}]`));makeError(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",(e=>`Invalid value "${e[0]} for header "${e[1]}"`));makeError(TypeError,"ERR_INVALID_CHAR",(e=>`Invalid character in ${e[0]} [${e[1]}]`));makeError(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")},1199:e=>{"use strict";e.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return true;default:return false}}},1564:(e,t,r)=>{"use strict";const i=r(2781);const n=r(4404);const s=new n.TLSSocket(new i.PassThrough)._handle._parentWrap.constructor;e.exports=s},1818:e=>{"use strict";e.exports=(e,t,r)=>{for(const i of r){e.on(i,((...e)=>t.emit(i,...e)))}}},9404:(e,t,r)=>{"use strict";const{ERR_HTTP2_NO_SOCKET_MANIPULATION:i}=r(7087);const n={has(e,t){const r=e.session===undefined?e:e.session.socket;return t in e||t in r},get(e,t){switch(t){case"on":case"once":case"end":case"emit":case"destroy":return e[t].bind(e);case"writable":case"destroyed":return e[t];case"readable":if(e.destroyed){return false}return e.readable;case"setTimeout":{const{session:t}=e;if(t!==undefined){return t.setTimeout.bind(t)}return e.setTimeout.bind(e)}case"write":case"read":case"pause":case"resume":throw new i;default:{const r=e.session===undefined?e:e.session.socket;const i=r[t];return typeof i==="function"?i.bind(r):i}}},getPrototypeOf(e){if(e.session!==undefined){return Reflect.getPrototypeOf(e.session.socket)}return Reflect.getPrototypeOf(e)},set(e,t,r){switch(t){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":e[t]=r;return true;case"setTimeout":{const{session:t}=e;if(t===undefined){e.setTimeout=r}else{t.setTimeout=r}return true}case"write":case"read":case"pause":case"resume":throw new i;default:{const i=e.session===undefined?e:e.session.socket;i[t]=r;return true}}}};e.exports=n},4592:(e,t,r)=>{"use strict";const{ERR_INVALID_HTTP_TOKEN:i}=r(7087);const n=r(1199);const s=/^[\^`\-\w!#$%&*+.|~]+$/;e.exports=e=>{if(typeof e!=="string"||!s.test(e)&&!n(e)){throw new i("Header name",e)}}},3549:(e,t,r)=>{"use strict";const{ERR_HTTP_INVALID_HEADER_VALUE:i,ERR_INVALID_CHAR:n}=r(7087);const s=/[^\t\u0020-\u007E\u0080-\u00FF]/;e.exports=(e,t)=>{if(typeof t==="undefined"){throw new i(t,e)}if(s.test(t)){throw new n("header content",e)}}},4124:(e,t,r)=>{try{var i=r(3837);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(t){e.exports=r(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},1554:e=>{"use strict";const isStream=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";isStream.writable=e=>isStream(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object";isStream.readable=e=>isStream(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object";isStream.duplex=e=>isStream.writable(e)&&isStream.readable(e);isStream.transform=e=>isStream.duplex(e)&&typeof e._transform==="function";e.exports=isStream},1434:e=>{
|
|
9
|
-
/**
|
|
10
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
11
|
-
*
|
|
12
|
-
* @version 0.8.0
|
|
13
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
14
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
15
|
-
* @license MIT
|
|
16
|
-
*/
|
|
17
|
-
(function(){"use strict";var t="input is invalid type";var r="finalize already called";var i=typeof window==="object";var n=i?window:{};if(n.JS_SHA3_NO_WINDOW){i=false}var s=!i&&typeof self==="object";var o=!n.JS_SHA3_NO_NODE_JS&&typeof process==="object"&&process.versions&&process.versions.node;if(o){n=global}else if(s){n=self}var a=!n.JS_SHA3_NO_COMMON_JS&&"object"==="object"&&e.exports;var l=typeof define==="function"&&define.amd;var u=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var c="0123456789abcdef".split("");var h=[31,7936,2031616,520093696];var d=[4,1024,262144,67108864];var p=[1,256,65536,16777216];var m=[6,1536,393216,100663296];var g=[0,8,16,24];var y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];var _=[224,256,384,512];var v=[128,256];var b=["hex","buffer","arrayBuffer","array","digest"];var x={128:168,256:136};if(n.JS_SHA3_NO_NODE_JS||!Array.isArray){Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}}if(u&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(e){return typeof e==="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer}}var createOutputMethod=function(e,t,r){return function(i){return new Keccak(e,t,e).update(i)[r]()}};var createShakeOutputMethod=function(e,t,r){return function(i,n){return new Keccak(e,t,n).update(i)[r]()}};var createCshakeOutputMethod=function(e,t,r){return function(t,i,n,s){return w["cshake"+e].update(t,i,n,s)[r]()}};var createKmacOutputMethod=function(e,t,r){return function(t,i,n,s){return w["kmac"+e].update(t,i,n,s)[r]()}};var createOutputMethods=function(e,t,r,i){for(var n=0;n<b.length;++n){var s=b[n];e[s]=t(r,i,s)}return e};var createMethod=function(e,t){var r=createOutputMethod(e,t,"hex");r.create=function(){return new Keccak(e,t,e)};r.update=function(e){return r.create().update(e)};return createOutputMethods(r,createOutputMethod,e,t)};var createShakeMethod=function(e,t){var r=createShakeOutputMethod(e,t,"hex");r.create=function(r){return new Keccak(e,t,r)};r.update=function(e,t){return r.create(t).update(e)};return createOutputMethods(r,createShakeOutputMethod,e,t)};var createCshakeMethod=function(e,t){var r=x[e];var i=createCshakeOutputMethod(e,t,"hex");i.create=function(i,n,s){if(!n&&!s){return w["shake"+e].create(i)}else{return new Keccak(e,t,i).bytepad([n,s],r)}};i.update=function(e,t,r,n){return i.create(t,r,n).update(e)};return createOutputMethods(i,createCshakeOutputMethod,e,t)};var createKmacMethod=function(e,t){var r=x[e];var i=createKmacOutputMethod(e,t,"hex");i.create=function(i,n,s){return new Kmac(e,t,n).bytepad(["KMAC",s],r).bytepad([i],r)};i.update=function(e,t,r,n){return i.create(e,r,n).update(t)};return createOutputMethods(i,createKmacOutputMethod,e,t)};var T=[{name:"keccak",padding:p,bits:_,createMethod:createMethod},{name:"sha3",padding:m,bits:_,createMethod:createMethod},{name:"shake",padding:h,bits:v,createMethod:createShakeMethod},{name:"cshake",padding:d,bits:v,createMethod:createCshakeMethod},{name:"kmac",padding:d,bits:v,createMethod:createKmacMethod}];var w={},S=[];for(var E=0;E<T.length;++E){var A=T[E];var C=A.bits;for(var N=0;N<C.length;++N){var O=A.name+"_"+C[N];S.push(O);w[O]=A.createMethod(C[N],A.padding);if(A.name!=="sha3"){var R=A.name+C[N];S.push(R);w[R]=w[O]}}}function Keccak(e,t,r){this.blocks=[];this.s=[];this.padding=t;this.outputBits=r;this.reset=true;this.finalized=false;this.block=0;this.start=0;this.blockCount=1600-(e<<1)>>5;this.byteCount=this.blockCount<<2;this.outputBlocks=r>>5;this.extraBytes=(r&31)>>3;for(var i=0;i<50;++i){this.s[i]=0}}Keccak.prototype.update=function(e){if(this.finalized){throw new Error(r)}var i,n=typeof e;if(n!=="string"){if(n==="object"){if(e===null){throw new Error(t)}else if(u&&e.constructor===ArrayBuffer){e=new Uint8Array(e)}else if(!Array.isArray(e)){if(!u||!ArrayBuffer.isView(e)){throw new Error(t)}}}else{throw new Error(t)}i=true}var s=this.blocks,o=this.byteCount,a=e.length,l=this.blockCount,c=0,h=this.s,d,p;while(c<a){if(this.reset){this.reset=false;s[0]=this.block;for(d=1;d<l+1;++d){s[d]=0}}if(i){for(d=this.start;c<a&&d<o;++c){s[d>>2]|=e[c]<<g[d++&3]}}else{for(d=this.start;c<a&&d<o;++c){p=e.charCodeAt(c);if(p<128){s[d>>2]|=p<<g[d++&3]}else if(p<2048){s[d>>2]|=(192|p>>6)<<g[d++&3];s[d>>2]|=(128|p&63)<<g[d++&3]}else if(p<55296||p>=57344){s[d>>2]|=(224|p>>12)<<g[d++&3];s[d>>2]|=(128|p>>6&63)<<g[d++&3];s[d>>2]|=(128|p&63)<<g[d++&3]}else{p=65536+((p&1023)<<10|e.charCodeAt(++c)&1023);s[d>>2]|=(240|p>>18)<<g[d++&3];s[d>>2]|=(128|p>>12&63)<<g[d++&3];s[d>>2]|=(128|p>>6&63)<<g[d++&3];s[d>>2]|=(128|p&63)<<g[d++&3]}}}this.lastByteIndex=d;if(d>=o){this.start=d-o;this.block=s[l];for(d=0;d<l;++d){h[d]^=s[d]}f(h);this.reset=true}else{this.start=d}}return this};Keccak.prototype.encode=function(e,t){var r=e&255,i=1;var n=[r];e=e>>8;r=e&255;while(r>0){n.unshift(r);e=e>>8;r=e&255;++i}if(t){n.push(i)}else{n.unshift(i)}this.update(n);return n.length};Keccak.prototype.encodeString=function(e){var r,i=typeof e;if(i!=="string"){if(i==="object"){if(e===null){throw new Error(t)}else if(u&&e.constructor===ArrayBuffer){e=new Uint8Array(e)}else if(!Array.isArray(e)){if(!u||!ArrayBuffer.isView(e)){throw new Error(t)}}}else{throw new Error(t)}r=true}var n=0,s=e.length;if(r){n=s}else{for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a<128){n+=1}else if(a<2048){n+=2}else if(a<55296||a>=57344){n+=3}else{a=65536+((a&1023)<<10|e.charCodeAt(++o)&1023);n+=4}}}n+=this.encode(n*8);this.update(e);return n};Keccak.prototype.bytepad=function(e,t){var r=this.encode(t);for(var i=0;i<e.length;++i){r+=this.encodeString(e[i])}var n=t-r%t;var s=[];s.length=n;this.update(s);return this};Keccak.prototype.finalize=function(){if(this.finalized){return}this.finalized=true;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,i=this.s;e[t>>2]|=this.padding[t&3];if(this.lastByteIndex===this.byteCount){e[0]=e[r];for(t=1;t<r+1;++t){e[t]=0}}e[r-1]|=2147483648;for(t=0;t<r;++t){i[t]^=e[t]}f(i)};Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();var e=this.blockCount,t=this.s,r=this.outputBlocks,i=this.extraBytes,n=0,s=0;var o="",a;while(s<r){for(n=0;n<e&&s<r;++n,++s){a=t[n];o+=c[a>>4&15]+c[a&15]+c[a>>12&15]+c[a>>8&15]+c[a>>20&15]+c[a>>16&15]+c[a>>28&15]+c[a>>24&15]}if(s%e===0){f(t);n=0}}if(i){a=t[n];o+=c[a>>4&15]+c[a&15];if(i>1){o+=c[a>>12&15]+c[a>>8&15]}if(i>2){o+=c[a>>20&15]+c[a>>16&15]}}return o};Keccak.prototype.arrayBuffer=function(){this.finalize();var e=this.blockCount,t=this.s,r=this.outputBlocks,i=this.extraBytes,n=0,s=0;var o=this.outputBits>>3;var a;if(i){a=new ArrayBuffer(r+1<<2)}else{a=new ArrayBuffer(o)}var l=new Uint32Array(a);while(s<r){for(n=0;n<e&&s<r;++n,++s){l[s]=t[n]}if(s%e===0){f(t)}}if(i){l[n]=t[n];a=a.slice(0,o)}return a};Keccak.prototype.buffer=Keccak.prototype.arrayBuffer;Keccak.prototype.digest=Keccak.prototype.array=function(){this.finalize();var e=this.blockCount,t=this.s,r=this.outputBlocks,i=this.extraBytes,n=0,s=0;var o=[],a,l;while(s<r){for(n=0;n<e&&s<r;++n,++s){a=s<<2;l=t[n];o[a]=l&255;o[a+1]=l>>8&255;o[a+2]=l>>16&255;o[a+3]=l>>24&255}if(s%e===0){f(t)}}if(i){a=s<<2;l=t[n];o[a]=l&255;if(i>1){o[a+1]=l>>8&255}if(i>2){o[a+2]=l>>16&255}}return o};function Kmac(e,t,r){Keccak.call(this,e,t,r)}Kmac.prototype=new Keccak;Kmac.prototype.finalize=function(){this.encode(this.outputBits,true);return Keccak.prototype.finalize.call(this)};var f=function(e){var t,r,i,n,s,o,a,l,u,c,h,d,p,m,g,_,v,b,x,T,w,S,E,A,C,N,O,R,k,P,L,I,M,D,F,j,B,U,H,z,K,V,q,Z,G,$,W,Y,J,Q,X,ee,te,re,ie,ne,se,oe,ae,le,ue,ce,he;for(i=0;i<48;i+=2){n=e[0]^e[10]^e[20]^e[30]^e[40];s=e[1]^e[11]^e[21]^e[31]^e[41];o=e[2]^e[12]^e[22]^e[32]^e[42];a=e[3]^e[13]^e[23]^e[33]^e[43];l=e[4]^e[14]^e[24]^e[34]^e[44];u=e[5]^e[15]^e[25]^e[35]^e[45];c=e[6]^e[16]^e[26]^e[36]^e[46];h=e[7]^e[17]^e[27]^e[37]^e[47];d=e[8]^e[18]^e[28]^e[38]^e[48];p=e[9]^e[19]^e[29]^e[39]^e[49];t=d^(o<<1|a>>>31);r=p^(a<<1|o>>>31);e[0]^=t;e[1]^=r;e[10]^=t;e[11]^=r;e[20]^=t;e[21]^=r;e[30]^=t;e[31]^=r;e[40]^=t;e[41]^=r;t=n^(l<<1|u>>>31);r=s^(u<<1|l>>>31);e[2]^=t;e[3]^=r;e[12]^=t;e[13]^=r;e[22]^=t;e[23]^=r;e[32]^=t;e[33]^=r;e[42]^=t;e[43]^=r;t=o^(c<<1|h>>>31);r=a^(h<<1|c>>>31);e[4]^=t;e[5]^=r;e[14]^=t;e[15]^=r;e[24]^=t;e[25]^=r;e[34]^=t;e[35]^=r;e[44]^=t;e[45]^=r;t=l^(d<<1|p>>>31);r=u^(p<<1|d>>>31);e[6]^=t;e[7]^=r;e[16]^=t;e[17]^=r;e[26]^=t;e[27]^=r;e[36]^=t;e[37]^=r;e[46]^=t;e[47]^=r;t=c^(n<<1|s>>>31);r=h^(s<<1|n>>>31);e[8]^=t;e[9]^=r;e[18]^=t;e[19]^=r;e[28]^=t;e[29]^=r;e[38]^=t;e[39]^=r;e[48]^=t;e[49]^=r;m=e[0];g=e[1];$=e[11]<<4|e[10]>>>28;W=e[10]<<4|e[11]>>>28;R=e[20]<<3|e[21]>>>29;k=e[21]<<3|e[20]>>>29;le=e[31]<<9|e[30]>>>23;ue=e[30]<<9|e[31]>>>23;V=e[40]<<18|e[41]>>>14;q=e[41]<<18|e[40]>>>14;D=e[2]<<1|e[3]>>>31;F=e[3]<<1|e[2]>>>31;_=e[13]<<12|e[12]>>>20;v=e[12]<<12|e[13]>>>20;Y=e[22]<<10|e[23]>>>22;J=e[23]<<10|e[22]>>>22;P=e[33]<<13|e[32]>>>19;L=e[32]<<13|e[33]>>>19;ce=e[42]<<2|e[43]>>>30;he=e[43]<<2|e[42]>>>30;re=e[5]<<30|e[4]>>>2;ie=e[4]<<30|e[5]>>>2;j=e[14]<<6|e[15]>>>26;B=e[15]<<6|e[14]>>>26;b=e[25]<<11|e[24]>>>21;x=e[24]<<11|e[25]>>>21;Q=e[34]<<15|e[35]>>>17;X=e[35]<<15|e[34]>>>17;I=e[45]<<29|e[44]>>>3;M=e[44]<<29|e[45]>>>3;A=e[6]<<28|e[7]>>>4;C=e[7]<<28|e[6]>>>4;ne=e[17]<<23|e[16]>>>9;se=e[16]<<23|e[17]>>>9;U=e[26]<<25|e[27]>>>7;H=e[27]<<25|e[26]>>>7;T=e[36]<<21|e[37]>>>11;w=e[37]<<21|e[36]>>>11;ee=e[47]<<24|e[46]>>>8;te=e[46]<<24|e[47]>>>8;Z=e[8]<<27|e[9]>>>5;G=e[9]<<27|e[8]>>>5;N=e[18]<<20|e[19]>>>12;O=e[19]<<20|e[18]>>>12;oe=e[29]<<7|e[28]>>>25;ae=e[28]<<7|e[29]>>>25;z=e[38]<<8|e[39]>>>24;K=e[39]<<8|e[38]>>>24;S=e[48]<<14|e[49]>>>18;E=e[49]<<14|e[48]>>>18;e[0]=m^~_&b;e[1]=g^~v&x;e[10]=A^~N&R;e[11]=C^~O&k;e[20]=D^~j&U;e[21]=F^~B&H;e[30]=Z^~$&Y;e[31]=G^~W&J;e[40]=re^~ne&oe;e[41]=ie^~se&ae;e[2]=_^~b&T;e[3]=v^~x&w;e[12]=N^~R&P;e[13]=O^~k&L;e[22]=j^~U&z;e[23]=B^~H&K;e[32]=$^~Y&Q;e[33]=W^~J&X;e[42]=ne^~oe≤e[43]=se^~ae&ue;e[4]=b^~T&S;e[5]=x^~w&E;e[14]=R^~P&I;e[15]=k^~L&M;e[24]=U^~z&V;e[25]=H^~K&q;e[34]=Y^~Qⅇe[35]=J^~X&te;e[44]=oe^~le&ce;e[45]=ae^~ue&he;e[6]=T^~S&m;e[7]=w^~E&g;e[16]=P^~I&A;e[17]=L^~M&C;e[26]=z^~V&D;e[27]=K^~q&F;e[36]=Q^~ee&Z;e[37]=X^~te&G;e[46]=le^~ce&re;e[47]=ue^~he&ie;e[8]=S^~m&_;e[9]=E^~g&v;e[18]=I^~A&N;e[19]=M^~C&O;e[28]=V^~D&j;e[29]=q^~F&B;e[38]=ee^~Z&$;e[39]=te^~G&W;e[48]=ce^~re≠e[49]=he^~ie&se;e[0]^=y[i];e[1]^=y[i+1]}};if(a){e.exports=w}else{for(E=0;E<S.length;++E){n[S[E]]=w[S[E]]}if(l){define((function(){return w}))}}})()},2820:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var i=true;for(var n in e){var s="function"==typeof e[n]||!r&&"undefined"===typeof e[n];if(Object.hasOwnProperty.call(e,n)&&!s){if(!i)t+=",";i=false;if(r){if(e[n]==undefined)t+="null";else t+=stringify(e[n])}else if(e[n]!==void 0){t+=stringify(n)+":"+stringify(e[n])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,(function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t}))}},1531:(e,t,r)=>{"use strict";const i=r(2361);const n=r(2820);const loadStore=e=>{const t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const s=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends i{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;this.opts.serialize=e.serialize.bind(e);this.opts.deserialize=e.deserialize.bind(e)}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=await this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return s.includes(this.opts.store.opts.dialect)||s.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const i=Array.isArray(e);const n=i?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(i&&r.getMany===undefined){const e=[];for(const i of n){e.push(Promise.resolve().then((()=>r.get(i))).then((e=>typeof e==="string"?this.opts.deserialize(e):this.opts.compression?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(i).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>i?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):this.opts.compression?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(i){const i=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){i.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));i.push(undefined)}else{i.push(t&&t.raw?n:n.value)}}return i}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>undefined))}return t&&t.raw?r:r.value}))}set(e,t,r){const i=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:n}=this.opts;return Promise.resolve().then((()=>{const e=typeof r==="number"?Date.now()+r:null;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(i,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const i of r){e.push(t.delete(i))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}e.exports=Keyv},6287:e=>{"use strict";function Kuler(e,t){if(t)return new Kuler(e).style(t);if(!(this instanceof Kuler))return new Kuler(e);this.text=e}Kuler.prototype.prefix="[";Kuler.prototype.suffix="m";Kuler.prototype.hex=function hex(e){e=e[0]==="#"?e.substring(1):e;if(e.length===3){e=e.split("");e[5]=e[2];e[4]=e[2];e[3]=e[1];e[2]=e[1];e[1]=e[0];e=e.join("")}var t=e.substring(0,2),r=e.substring(2,4),i=e.substring(4,6);return[parseInt(t,16),parseInt(r,16),parseInt(i,16)]};Kuler.prototype.rgb=function rgb(e,t,r){var i=e/255*5,n=t/255*5,s=r/255*5;return this.ansi(i,n,s)};Kuler.prototype.ansi=function ansi(e,t,r){var i=Math.round(e),n=Math.round(t),s=Math.round(r);return 16+i*36+n*6+s};Kuler.prototype.reset=function reset(){return this.prefix+"39;49"+this.suffix};Kuler.prototype.style=function style(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};e.exports=Kuler},9748:(e,t,r)=>{"use strict";const i=r(3791);e.exports=i((e=>{e.message=`\t${e.message}`;return e}))},6811:(e,t,r)=>{"use strict";const{Colorizer:i}=r(3848);const{Padder:n}=r(7033);const{configs:s,MESSAGE:o}=r(3937);class CliFormat{constructor(e={}){if(!e.levels){e.levels=s.cli.levels}this.colorizer=new i(e);this.padder=new n(e);this.options=e}transform(e,t){this.colorizer.transform(this.padder.transform(e,t),t);e[o]=`${e.level}:${e.message}`;return e}}e.exports=e=>new CliFormat(e);e.exports.Format=CliFormat},3848:(e,t,r)=>{"use strict";const i=r(9256);const{LEVEL:n,MESSAGE:s}=r(3937);i.enabled=true;const o=/\s+/;class Colorizer{constructor(e={}){if(e.colors){this.addColors(e.colors)}this.options=e}static addColors(e){const t=Object.keys(e).reduce(((t,r)=>{t[r]=o.test(e[r])?e[r].split(o):e[r];return t}),{});Colorizer.allColors=Object.assign({},Colorizer.allColors||{},t);return Colorizer.allColors}addColors(e){return Colorizer.addColors(e)}colorize(e,t,r){if(typeof r==="undefined"){r=t}if(!Array.isArray(Colorizer.allColors[e])){return i[Colorizer.allColors[e]](r)}for(let t=0,n=Colorizer.allColors[e].length;t<n;t++){r=i[Colorizer.allColors[e][t]](r)}return r}transform(e,t){if(t.all&&typeof e[s]==="string"){e[s]=this.colorize(e[n],e.level,e[s])}if(t.level||t.all||!t.message){e.level=this.colorize(e[n],e.level)}if(t.all||t.message){e.message=this.colorize(e[n],e.level,e.message)}return e}}e.exports=e=>new Colorizer(e);e.exports.Colorizer=e.exports.Format=Colorizer},7315:(e,t,r)=>{"use strict";const i=r(3791);function cascade(e){if(!e.every(isValidFormat)){return}return t=>{let r=t;for(let t=0;t<e.length;t++){r=e[t].transform(r,e[t].options);if(!r){return false}}return r}}function isValidFormat(e){if(typeof e.transform!=="function"){throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"))}return true}e.exports=(...e)=>{const t=i(cascade(e));const r=t();r.Format=t.Format;return r};e.exports.cascade=cascade},2397:(e,t,r)=>{"use strict";const i=r(3791);const{LEVEL:n,MESSAGE:s}=r(3937);e.exports=i(((e,{stack:t,cause:r})=>{if(e instanceof Error){const i=Object.assign({},e,{level:e.level,[n]:e[n]||e.level,message:e.message,[s]:e[s]||e.message});if(t)i.stack=e.stack;if(r)i.cause=e.cause;return i}if(!(e.message instanceof Error))return e;const i=e.message;Object.assign(e,i);e.message=i.message;e[s]=i.message;if(t)e.stack=i.stack;if(r)e.cause=i.cause;return e}))},3791:e=>{"use strict";class InvalidFormatError extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${e.toString().split("\n")[0]}\n`);Error.captureStackTrace(this,InvalidFormatError)}}e.exports=e=>{if(e.length>2){throw new InvalidFormatError(e)}function Format(e={}){this.options=e}Format.prototype.transform=e;function createFormatWrap(e){return new Format(e)}createFormatWrap.Format=Format;return createFormatWrap}},2955:(e,t,r)=>{"use strict";const i=t.format=r(3791);t.levels=r(3180);function exposeFormat(e,t){Object.defineProperty(i,e,{get(){return t()},configurable:true})}exposeFormat("align",(function(){return r(9748)}));exposeFormat("errors",(function(){return r(2397)}));exposeFormat("cli",(function(){return r(6811)}));exposeFormat("combine",(function(){return r(7315)}));exposeFormat("colorize",(function(){return r(3848)}));exposeFormat("json",(function(){return r(5669)}));exposeFormat("label",(function(){return r(6941)}));exposeFormat("logstash",(function(){return r(4772)}));exposeFormat("metadata",(function(){return r(9760)}));exposeFormat("ms",(function(){return r(4734)}));exposeFormat("padLevels",(function(){return r(7033)}));exposeFormat("prettyPrint",(function(){return r(6182)}));exposeFormat("printf",(function(){return r(1843)}));exposeFormat("simple",(function(){return r(5313)}));exposeFormat("splat",(function(){return r(7081)}));exposeFormat("timestamp",(function(){return r(8381)}));exposeFormat("uncolorize",(function(){return r(6420)}))},5669:(e,t,r)=>{"use strict";const i=r(3791);const{MESSAGE:n}=r(3937);const s=r(7560);function replacer(e,t){if(typeof t==="bigint")return t.toString();return t}e.exports=i(((e,t)=>{const r=s.configure(t);e[n]=r(e,t.replacer||replacer,t.space);return e}))},6941:(e,t,r)=>{"use strict";const i=r(3791);e.exports=i(((e,t)=>{if(t.message){e.message=`[${t.label}] ${e.message}`;return e}e.label=t.label;return e}))},3180:(e,t,r)=>{"use strict";const{Colorizer:i}=r(3848);e.exports=e=>{i.addColors(e.colors||e);return e}},4772:(e,t,r)=>{"use strict";const i=r(3791);const{MESSAGE:n}=r(3937);const s=r(7560);e.exports=i((e=>{const t={};if(e.message){t["@message"]=e.message;delete e.message}if(e.timestamp){t["@timestamp"]=e.timestamp;delete e.timestamp}t["@fields"]=e;e[n]=s(t);return e}))},9760:(e,t,r)=>{"use strict";const i=r(3791);function fillExcept(e,t,r){const i=t.reduce(((t,r)=>{t[r]=e[r];delete e[r];return t}),{});const n=Object.keys(e).reduce(((t,r)=>{t[r]=e[r];delete e[r];return t}),{});Object.assign(e,i,{[r]:n});return e}function fillWith(e,t,r){e[r]=t.reduce(((t,r)=>{t[r]=e[r];delete e[r];return t}),{});return e}e.exports=i(((e,t={})=>{let r="metadata";if(t.key){r=t.key}let i=[];if(!t.fillExcept&&!t.fillWith){i.push("level");i.push("message")}if(t.fillExcept){i=t.fillExcept}if(i.length>0){return fillExcept(e,i,r)}if(t.fillWith){return fillWith(e,t.fillWith,r)}return e}))},4734:function(e,t,r){"use strict";const i=r(3791);const n=r(9983);e.exports=i((e=>{const t=+new Date;this.diff=t-(this.prevTime||t);this.prevTime=t;e.ms=`+${n(this.diff)}`;return e}))},9983:e=>{var t=1e3;var r=t*60;var i=r*60;var n=i*24;var s=n*7;var o=n*365.25;e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0){return parse(e)}else if(r==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a){return}var l=parseFloat(a[1]);var u=(a[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return l*o;case"weeks":case"week":case"w":return l*s;case"days":case"day":case"d":return l*n;case"hours":case"hour":case"hrs":case"hr":case"h":return l*i;case"minutes":case"minute":case"mins":case"min":case"m":return l*r;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return undefined}}function fmtShort(e){var s=Math.abs(e);if(s>=n){return Math.round(e/n)+"d"}if(s>=i){return Math.round(e/i)+"h"}if(s>=r){return Math.round(e/r)+"m"}if(s>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var s=Math.abs(e);if(s>=n){return plural(e,s,n,"day")}if(s>=i){return plural(e,s,i,"hour")}if(s>=r){return plural(e,s,r,"minute")}if(s>=t){return plural(e,s,t,"second")}return e+" ms"}function plural(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}},7033:(e,t,r)=>{"use strict";const{configs:i,LEVEL:n,MESSAGE:s}=r(3937);class Padder{constructor(e={levels:i.npm.levels}){this.paddings=Padder.paddingForLevels(e.levels,e.filler);this.options=e}static getLongestLevel(e){const t=Object.keys(e).map((e=>e.length));return Math.max(...t)}static paddingForLevel(e,t,r){const i=r+1-e.length;const n=Math.floor(i/t.length);const s=`${t}${t.repeat(n)}`;return s.slice(0,i)}static paddingForLevels(e,t=" "){const r=Padder.getLongestLevel(e);return Object.keys(e).reduce(((e,i)=>{e[i]=Padder.paddingForLevel(i,t,r);return e}),{})}transform(e,t){e.message=`${this.paddings[e[n]]}${e.message}`;if(e[s]){e[s]=`${this.paddings[e[n]]}${e[s]}`}return e}}e.exports=e=>new Padder(e);e.exports.Padder=e.exports.Format=Padder},6182:(e,t,r)=>{"use strict";const i=r(3837).inspect;const n=r(3791);const{LEVEL:s,MESSAGE:o,SPLAT:a}=r(3937);e.exports=n(((e,t={})=>{const r=Object.assign({},e);delete r[s];delete r[o];delete r[a];e[o]=i(r,false,t.depth||null,t.colorize);return e}))},1843:(e,t,r)=>{"use strict";const{MESSAGE:i}=r(3937);class Printf{constructor(e){this.template=e}transform(e){e[i]=this.template(e);return e}}e.exports=e=>new Printf(e);e.exports.Printf=e.exports.Format=Printf},5313:(e,t,r)=>{"use strict";const i=r(3791);const{MESSAGE:n}=r(3937);const s=r(7560);e.exports=i((e=>{const t=s(Object.assign({},e,{level:undefined,message:undefined,splat:undefined}));const r=e.padding&&e.padding[e.level]||"";if(t!=="{}"){e[n]=`${e.level}:${r} ${e.message} ${t}`}else{e[n]=`${e.level}:${r} ${e.message}`}return e}))},7081:(e,t,r)=>{"use strict";const i=r(3837);const{SPLAT:n}=r(3937);const s=/%[scdjifoO%]/g;const o=/%%/g;class Splatter{constructor(e){this.options=e}_splat(e,t){const r=e.message;const s=e[n]||e.splat||[];const a=r.match(o);const l=a&&a.length||0;const u=t.length-l;const c=u-s.length;const h=c<0?s.splice(c,-1*c):[];const d=h.length;if(d){for(let t=0;t<d;t++){Object.assign(e,h[t])}}e.message=i.format(r,...s);return e}transform(e){const t=e.message;const r=e[n]||e.splat;if(!r||!r.length){return e}const i=t&&t.match&&t.match(s);if(!i&&(r||r.length)){const t=r.length>1?r.splice(0):r;const i=t.length;if(i){for(let r=0;r<i;r++){Object.assign(e,t[r])}}return e}if(i){return this._splat(e,i)}return e}}e.exports=e=>new Splatter(e)},8381:(e,t,r)=>{"use strict";const i=r(4513);const n=r(3791);e.exports=n(((e,t={})=>{if(t.format){e.timestamp=typeof t.format==="function"?t.format():i.format(new Date,t.format)}if(!e.timestamp){e.timestamp=(new Date).toISOString()}if(t.alias){e[t.alias]=e.timestamp}return e}))},6420:(e,t,r)=>{"use strict";const i=r(9256);const n=r(3791);const{MESSAGE:s}=r(3937);e.exports=n(((e,t)=>{if(t.level!==false){e.level=i.strip(e.level)}if(t.message!==false){e.message=i.strip(String(e.message))}if(t.raw!==false&&e[s]){e[s]=i.strip(String(e[s]))}return e}))},2610:e=>{"use strict";const t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{if(r._readableState.autoDestroy){throw new Error("The second stream must have the `autoDestroy` option set to `false`")}const i=new Set(Object.keys(e).concat(t));const n={};for(const t of i){if(t in r){continue}n[t]={get(){const r=e[t];const i=typeof r==="function";return i?r.bind(e):r},set(r){e[t]=r},enumerable:true,configurable:false}}Object.defineProperties(r,n);e.once("aborted",(()=>{r.destroy();r.emit("aborted")}));e.once("close",(()=>{if(e.complete){if(r.readable){r.once("end",(()=>{r.emit("close")}))}else{r.emit("close")}}else{r.emit("close")}}));return r}},4118:(e,t,r)=>{"use strict";var i=r(2743);e.exports=function one(e){var t=0,r;function onetime(){if(t)return r;t=1;r=e.apply(this,arguments);e=null;return r}onetime.displayName=i(e);return onetime}},9273:e=>{"use strict";class QuickLRU{constructor(e={}){if(!(e.maxSize&&e.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}this.maxSize=e.maxSize;this.onEviction=e.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_set(e,t){this.cache.set(e,t);this._size++;if(this._size>=this.maxSize){this._size=0;if(typeof this.onEviction==="function"){for(const[e,t]of this.oldCache.entries()){this.onEviction(e,t)}}this.oldCache=this.cache;this.cache=new Map}}get(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);this.oldCache.delete(e);this._set(e,t);return t}}set(e,t){if(this.cache.has(e)){this.cache.set(e,t)}else{this._set(e,t)}return this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){return this.oldCache.get(e)}}delete(e){const t=this.cache.delete(e);if(t){this._size--}return this.oldCache.delete(e)||t}clear(){this.cache.clear();this.oldCache.clear();this._size=0}*keys(){for(const[e]of this){yield e}}*values(){for(const[,e]of this){yield e}}*[Symbol.iterator](){for(const e of this.cache){yield e}for(const e of this.oldCache){const[t]=e;if(!this.cache.has(t)){yield e}}}get size(){let e=0;for(const t of this.oldCache.keys()){if(!this.cache.has(t)){e++}}return Math.min(this._size+e,this.maxSize)}}e.exports=QuickLRU},7214:e=>{"use strict";const t={};function createErrorType(e,r,i){if(!i){i=Error}function getMessage(e,t,i){if(typeof r==="string"){return r}else{return r(e,t,i)}}class NodeError extends i{constructor(e,t,r){super(getMessage(e,t,r))}}NodeError.prototype.name=i.name;NodeError.prototype.code=e;t[e]=NodeError}function oneOf(e,t){if(Array.isArray(e)){const r=e.length;e=e.map((e=>String(e)));if(r>2){return`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]}else if(r===2){return`one of ${t} ${e[0]} or ${e[1]}`}else{return`of ${t} ${e[0]}`}}else{return`of ${t} ${String(e)}`}}function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function endsWith(e,t,r){if(r===undefined||r>e.length){r=e.length}return e.substring(r-t.length,r)===t}function includes(e,t,r){if(typeof r!=="number"){r=0}if(r+t.length>e.length){return false}else{return e.indexOf(t,r)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(e,t,r){let i;if(typeof t==="string"&&startsWith(t,"not ")){i="must not be";t=t.replace(/^not /,"")}else{i="must be"}let n;if(endsWith(e," argument")){n=`The ${e} ${i} ${oneOf(t,"type")}`}else{const r=includes(e,".")?"property":"argument";n=`The "${e}" ${r} ${i} ${oneOf(t,"type")}`}n+=`. Received type ${typeof r}`;return n}),TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"}));createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"}));createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");e.exports.q=t},1359:(e,t,r)=>{"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=Duplex;var n=r(1433);var s=r(6993);r(4124)(Duplex,n);{var o=i(s.prototype);for(var a=0;a<o.length;a++){var l=o[a];if(!Duplex.prototype[l])Duplex.prototype[l]=s.prototype[l]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);n.call(this,e);s.call(this,e);this.allowHalfOpen=true;if(e){if(e.readable===false)this.readable=false;if(e.writable===false)this.writable=false;if(e.allowHalfOpen===false){this.allowHalfOpen=false;this.once("end",onend)}}}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function onend(){if(this._writableState.ended)return;process.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function set(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}})},1542:(e,t,r)=>{"use strict";e.exports=PassThrough;var i=r(4415);r(4124)(PassThrough,i);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);i.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},1433:(e,t,r)=>{"use strict";e.exports=Readable;var i;Readable.ReadableState=ReadableState;var n=r(2361).EventEmitter;var s=function EElistenerCount(e,t){return e.listeners(t).length};var o=r(2387);var a=r(4300).Buffer;var l=(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(e){return a.from(e)}function _isUint8Array(e){return a.isBuffer(e)||e instanceof l}var u=r(3837);var c;if(u&&u.debuglog){c=u.debuglog("stream")}else{c=function debug(){}}var h=r(2746);var d=r(7049);var p=r(9948),m=p.getHighWaterMark;var g=r(7214).q,y=g.ERR_INVALID_ARG_TYPE,_=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var x;var T;var w;r(4124)(Readable,o);var S=d.errorOrDestroy;var E=["error","close","destroy","pause","resume"];function prependListener(e,t,r){if(typeof e.prependListener==="function")return e.prependListener(t,r);if(!e._events||!e._events[t])e.on(t,r);else if(Array.isArray(e._events[t]))e._events[t].unshift(r);else e._events[t]=[r,e._events[t]]}function ReadableState(e,t,n){i=i||r(1359);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.readableObjectMode;this.highWaterMark=m(this,e,"readableHighWaterMark",n);this.buffer=new h;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!x)x=r(4841).s;this.decoder=new x(e.encoding);this.encoding=e.encoding}}function Readable(e){i=i||r(1359);if(!(this instanceof Readable))return new Readable(e);var t=this instanceof i;this._readableState=new ReadableState(e,this,t);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}o.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=d.destroy;Readable.prototype._undestroy=d.undestroy;Readable.prototype._destroy=function(e,t){t(e)};Readable.prototype.push=function(e,t){var r=this._readableState;var i;if(!r.objectMode){if(typeof e==="string"){t=t||r.defaultEncoding;if(t!==r.encoding){e=a.from(e,t);t=""}i=true}}else{i=true}return readableAddChunk(this,e,t,false,i)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,r,i,n){c("readableAddChunk",t);var s=e._readableState;if(t===null){s.reading=false;onEofChunk(e,s)}else{var o;if(!n)o=chunkInvalid(s,t);if(o){S(e,o)}else if(s.objectMode||t&&t.length>0){if(typeof t!=="string"&&!s.objectMode&&Object.getPrototypeOf(t)!==a.prototype){t=_uint8ArrayToBuffer(t)}if(i){if(s.endEmitted)S(e,new b);else addChunk(e,s,t,true)}else if(s.ended){S(e,new _)}else if(s.destroyed){return false}else{s.reading=false;if(s.decoder&&!r){t=s.decoder.write(t);if(s.objectMode||t.length!==0)addChunk(e,s,t,false);else maybeReadMore(e,s)}else{addChunk(e,s,t,false)}}}else if(!i){s.reading=false;maybeReadMore(e,s)}}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function addChunk(e,t,r,i){if(t.flowing&&t.length===0&&!t.sync){t.awaitDrain=0;e.emit("data",r)}else{t.length+=t.objectMode?1:r.length;if(i)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new y("chunk",["string","Buffer","Uint8Array"],t)}return r}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!x)x=r(4841).s;var t=new x(e);this._readableState.decoder=t;this._readableState.encoding=this._readableState.decoder.encoding;var i=this._readableState.buffer.head;var n="";while(i!==null){n+=t.write(i.data);i=i.next}this._readableState.buffer.clear();if(n!=="")this._readableState.buffer.push(n);this._readableState.length=n.length;return this};var A=1073741824;function computeNewHighWaterMark(e){if(e>=A){e=A}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var i=t.needReadable;c("need readable",i);if(t.length===0||t.length-e<t.highWaterMark){i=true;c("length less than watermark",i)}if(t.ended||t.reading){i=false;c("reading or ended",i)}else if(i){c("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(r,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=t.length<=t.highWaterMark;e=0}else{t.length-=e;t.awaitDrain=0}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){c("onEofChunk");if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;if(t.sync){emitReadable(e)}else{t.needReadable=false;if(!t.emittedReadable){t.emittedReadable=true;emitReadable_(e)}}}function emitReadable(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable);t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;process.nextTick(emitReadable_,e)}}function emitReadable_(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended);if(!t.destroyed&&(t.length||t.ended)){e.emit("readable");t.emittedReadable=false}t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark;flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;process.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0)){var r=t.length;c("maybeReadMore read 0");e.read(0);if(r===t.length)break}t.readingMore=false}Readable.prototype._read=function(e){S(this,new v("_read()"))};Readable.prototype.pipe=function(e,t){var r=this;var i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1;c("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var o=n?onend:unpipe;if(i.endEmitted)process.nextTick(o);else r.once("end",o);e.on("unpipe",onunpipe);function onunpipe(e,t){c("onunpipe");if(e===r){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){c("onend");e.end()}var a=pipeOnDrain(r);e.on("drain",a);var l=false;function cleanup(){c("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",a);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);r.removeListener("end",onend);r.removeListener("end",unpipe);r.removeListener("data",ondata);l=true;if(i.awaitDrain&&(!e._writableState||e._writableState.needDrain))a()}r.on("data",ondata);function ondata(t){c("ondata");var n=e.write(t);c("dest.write",n);if(n===false){if((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&indexOf(i.pipes,e)!==-1)&&!l){c("false write response, pause",i.awaitDrain);i.awaitDrain++}r.pause()}}function onerror(t){c("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)S(e,t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){c("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var i=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:false});return this}var o=indexOf(t.pipes,e);if(o===-1)return this;t.pipes.splice(o,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,r);return this};Readable.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t);var i=this._readableState;if(e==="data"){i.readableListening=this.listenerCount("readable")>0;if(i.flowing!==false)this.resume()}else if(e==="readable"){if(!i.endEmitted&&!i.readableListening){i.readableListening=i.needReadable=true;i.flowing=false;i.emittedReadable=false;c("on readable",i.length,i.reading);if(i.length){emitReadable(this)}else if(!i.reading){process.nextTick(nReadingNextTick,this)}}}return r};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);if(e==="readable"){process.nextTick(updateReadableListening,this)}return r};Readable.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);if(e==="readable"||e===undefined){process.nextTick(updateReadableListening,this)}return t};function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0;if(t.resumeScheduled&&!t.paused){t.flowing=true}else if(e.listenerCount("data")>0){e.resume()}}function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=!e.readableListening;resume(this,e)}e.paused=false;return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;process.nextTick(resume_,e,t)}}function resume_(e,t){c("resume",t.reading);if(!t.reading){e.read(0)}t.resumeScheduled=false;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){c("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(e){var t=e._readableState;c("flow",t.flowing);while(t.flowing&&e.read()!==null);}Readable.prototype.wrap=function(e){var t=this;var r=this._readableState;var i=false;e.on("end",(function(){c("wrapped end");if(r.decoder&&!r.ended){var e=r.decoder.end();if(e&&e.length)t.push(e)}t.push(null)}));e.on("data",(function(n){c("wrapped data");if(r.decoder)n=r.decoder.write(n);if(r.objectMode&&(n===null||n===undefined))return;else if(!r.objectMode&&(!n||!n.length))return;var s=t.push(n);if(!s){i=true;e.pause()}}));for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(n)}}for(var s=0;s<E.length;s++){e.on(E[s],this.emit.bind(this,E[s]))}this._read=function(t){c("wrapped _read",t);if(i){i=false;e.resume()}};return this};if(typeof Symbol==="function"){Readable.prototype[Symbol.asyncIterator]=function(){if(T===undefined){T=r(3306)}return T(this)}}Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function get(){return this._readableState.highWaterMark}});Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:false,get:function get(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:false,get:function get(){return this._readableState.flowing},set:function set(e){if(this._readableState){this._readableState.flowing=e}}});Readable._fromList=fromList;Object.defineProperty(Readable.prototype,"readableLength",{enumerable:false,get:function get(){return this._readableState.length}});function fromList(e,t){if(t.length===0)return null;var r;if(t.objectMode)r=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.first();else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=t.buffer.consume(e,t.decoder)}return r}function endReadable(e){var t=e._readableState;c("endReadable",t.endEmitted);if(!t.endEmitted){t.ended=true;process.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){c("endReadableNT",e.endEmitted,e.length);if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end");if(e.autoDestroy){var r=t._writableState;if(!r||r.autoDestroy&&r.finished){t.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(e,t){if(w===undefined){w=r(9082)}return w(Readable,e,t)}}function indexOf(e,t){for(var r=0,i=e.length;r<i;r++){if(e[r]===t)return r}return-1}},4415:(e,t,r)=>{"use strict";e.exports=Transform;var i=r(7214).q,n=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,o=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=i.ERR_TRANSFORM_WITH_LENGTH_0;var l=r(1359);r(4124)(Transform,l);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(i===null){return this.emit("error",new s)}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);i(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);l.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"&&!this._readableState.destroyed){this._flush((function(t,r){done(e,t,r)}))}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return l.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,r){r(new n("_transform()"))};Transform.prototype._write=function(e,t,r){var i=this._transformState;i.writecb=r;i.writechunk=e;i.writeencoding=t;if(!i.transforming){var n=this._readableState;if(i.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))};function done(e,t,r){if(t)return e.emit("error",t);if(r!=null)e.push(r);if(e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}},6993:(e,t,r)=>{"use strict";e.exports=Writable;function WriteReq(e,t,r){this.chunk=e;this.encoding=t;this.callback=r;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var i;Writable.WritableState=WritableState;var n={deprecate:r(5278)};var s=r(2387);var o=r(4300).Buffer;var a=(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(e){return o.from(e)}function _isUint8Array(e){return o.isBuffer(e)||e instanceof a}var l=r(7049);var u=r(9948),c=u.getHighWaterMark;var h=r(7214).q,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_MULTIPLE_CALLBACK,g=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,_=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,b=h.ERR_UNKNOWN_ENCODING;var x=l.errorOrDestroy;r(4124)(Writable,s);function nop(){}function WritableState(e,t,n){i=i||r(1359);e=e||{};if(typeof n!=="boolean")n=t instanceof i;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.writableObjectMode;this.highWaterMark=c(this,e,"writableHighWaterMark",n);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var s=e.decodeStrings===false;this.decodeStrings=!s;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=e.emitClose!==false;this.autoDestroy=!!e.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:n.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var T;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){T=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){if(T.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{T=function realHasInstance(e){return e instanceof this}}function Writable(e){i=i||r(1359);var t=this instanceof i;if(!t&&!T.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}s.call(this)}Writable.prototype.pipe=function(){x(this,new g)};function writeAfterEnd(e,t){var r=new v;x(e,r);process.nextTick(t,r)}function validChunk(e,t,r,i){var n;if(r===null){n=new _}else if(typeof r!=="string"&&!t.objectMode){n=new d("chunk",["string","Buffer"],r)}if(n){x(e,n);process.nextTick(i,n);return false}return true}Writable.prototype.write=function(e,t,r){var i=this._writableState;var n=false;var s=!i.objectMode&&_isUint8Array(e);if(s&&!o.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(s)t="buffer";else if(!t)t=i.defaultEncoding;if(typeof r!=="function")r=nop;if(i.ending)writeAfterEnd(this,r);else if(s||validChunk(this,i,e,r)){i.pendingcb++;n=writeOrBuffer(this,i,s,e,t,r)}return n};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);this._writableState.defaultEncoding=e;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=o.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,i,n,s){if(!r){var o=decodeChunk(t,i,n);if(i!==o){r=true;n="buffer";i=o}}var a=t.objectMode?1:i.length;t.length+=a;var l=t.length<t.highWaterMark;if(!l)t.needDrain=true;if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null};if(u){u.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,a,i,n,s)}return l}function doWrite(e,t,r,i,n,s,o){t.writelen=i;t.writecb=o;t.writing=true;t.sync=true;if(t.destroyed)t.onwrite(new y("write"));else if(r)e._writev(n,t.onwrite);else e._write(n,s,t.onwrite);t.sync=false}function onwriteError(e,t,r,i,n){--t.pendingcb;if(r){process.nextTick(n,i);process.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;x(e,i)}else{n(i);e._writableState.errorEmitted=true;x(e,i);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var r=e._writableState;var i=r.sync;var n=r.writecb;if(typeof n!=="function")throw new m;onwriteStateUpdate(r);if(t)onwriteError(e,r,i,t,n);else{var s=needFinish(r)||e.destroyed;if(!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest){clearBuffer(e,r)}if(i){process.nextTick(afterWrite,e,r,s,n)}else{afterWrite(e,r,s,n)}}}function afterWrite(e,t,r,i){if(!r)onwriteDrain(e,t);t.pendingcb--;i();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount;var n=new Array(i);var s=t.corkedRequestsFree;s.entry=r;var o=0;var a=true;while(r){n[o]=r;if(!r.isBuf)a=false;r=r.next;o+=1}n.allBuffers=a;doWrite(e,t,true,t.length,n,"",s.finish);t.pendingcb++;t.lastBufferedRequest=null;if(s.next){t.corkedRequestsFree=s.next;s.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(r){var l=r.chunk;var u=r.encoding;var c=r.callback;var h=t.objectMode?1:l.length;doWrite(e,t,false,h,l,u,c);r=r.next;t.bufferedRequestCount--;if(t.writing){break}}if(r===null)t.lastBufferedRequest=null}t.bufferedRequest=r;t.bufferProcessing=false}Writable.prototype._write=function(e,t,r){r(new p("_write()"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,r){var i=this._writableState;if(typeof e==="function"){r=e;e=null;t=null}else if(typeof t==="function"){r=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(i.corked){i.corked=1;this.uncork()}if(!i.ending)endWritable(this,i,r);return this};Object.defineProperty(Writable.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final((function(r){t.pendingcb--;if(r){x(e,r)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)}))}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"&&!t.destroyed){t.pendingcb++;t.finalCalled=true;process.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var r=needFinish(t);if(r){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish");if(t.autoDestroy){var i=e._readableState;if(!i||i.autoDestroy&&i.endEmitted){e.destroy()}}}}return r}function endWritable(e,t,r){t.ending=true;finishMaybe(e,t);if(r){if(t.finished)process.nextTick(r);else e.once("finish",r)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,r){var i=e.entry;e.entry=null;while(i){var n=i.callback;t.pendingcb--;n(r);i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function set(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=l.destroy;Writable.prototype._undestroy=l.undestroy;Writable.prototype._destroy=function(e,t){t(e)}},3306:(e,t,r)=>{"use strict";var i;function _defineProperty(e,t,r){t=_toPropertyKey(t);if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return typeof t==="symbol"?t:String(t)}function _toPrimitive(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var n=r(6080);var s=Symbol("lastResolve");var o=Symbol("lastReject");var a=Symbol("error");var l=Symbol("ended");var u=Symbol("lastPromise");var c=Symbol("handlePromise");var h=Symbol("stream");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[s];if(t!==null){var r=e[h].read();if(r!==null){e[u]=null;e[s]=null;e[o]=null;t(createIterResult(r,false))}}}function onReadable(e){process.nextTick(readAndResolve,e)}function wrapForNext(e,t){return function(r,i){e.then((function(){if(t[l]){r(createIterResult(undefined,true));return}t[c](r,i)}),i)}}var d=Object.getPrototypeOf((function(){}));var p=Object.setPrototypeOf((i={get stream(){return this[h]},next:function next(){var e=this;var t=this[a];if(t!==null){return Promise.reject(t)}if(this[l]){return Promise.resolve(createIterResult(undefined,true))}if(this[h].destroyed){return new Promise((function(t,r){process.nextTick((function(){if(e[a]){r(e[a])}else{t(createIterResult(undefined,true))}}))}))}var r=this[u];var i;if(r){i=new Promise(wrapForNext(r,this))}else{var n=this[h].read();if(n!==null){return Promise.resolve(createIterResult(n,false))}i=new Promise(this[c])}this[u]=i;return i}},_defineProperty(i,Symbol.asyncIterator,(function(){return this})),_defineProperty(i,"return",(function _return(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){if(e){r(e);return}t(createIterResult(undefined,true))}))}))})),i),d);var m=function createReadableStreamAsyncIterator(e){var t;var r=Object.create(p,(t={},_defineProperty(t,h,{value:e,writable:true}),_defineProperty(t,s,{value:null,writable:true}),_defineProperty(t,o,{value:null,writable:true}),_defineProperty(t,a,{value:null,writable:true}),_defineProperty(t,l,{value:e._readableState.endEmitted,writable:true}),_defineProperty(t,c,{value:function value(e,t){var i=r[h].read();if(i){r[u]=null;r[s]=null;r[o]=null;e(createIterResult(i,false))}else{r[s]=e;r[o]=t}},writable:true}),t));r[u]=null;n(e,(function(e){if(e&&e.code!=="ERR_STREAM_PREMATURE_CLOSE"){var t=r[o];if(t!==null){r[u]=null;r[s]=null;r[o]=null;t(e)}r[a]=e;return}var i=r[s];if(i!==null){r[u]=null;r[s]=null;r[o]=null;i(createIterResult(undefined,true))}r[l]=true}));e.on("readable",onReadable.bind(null,r));return r};e.exports=m},2746:(e,t,r)=>{"use strict";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){t=_toPropertyKey(t);if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,t,r){if(t)_defineProperties(e.prototype,t);if(r)_defineProperties(e,r);Object.defineProperty(e,"prototype",{writable:false});return e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return typeof t==="symbol"?t:String(t)}function _toPrimitive(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=r(4300),n=i.Buffer;var s=r(3837),o=s.inspect;var a=o&&o.custom||"inspect";function copyBuffer(e,t,r){n.prototype.copy.call(e,t,r)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}_createClass(BufferList,[{key:"push",value:function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length}},{key:"unshift",value:function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next)r+=e+t.data;return r}},{key:"concat",value:function concat(e){if(this.length===0)return n.alloc(0);var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t}},{key:"consume",value:function consume(e,t){var r;if(e<this.head.data.length){r=this.head.data.slice(0,e);this.head.data=this.head.data.slice(e)}else if(e===this.head.data.length){r=this.shift()}else{r=t?this._getString(e):this._getBuffer(e)}return r}},{key:"first",value:function first(){return this.head.data}},{key:"_getString",value:function _getString(e){var t=this.head;var r=1;var i=t.data;e-=i.length;while(t=t.next){var n=t.data;var s=e>n.length?n.length:e;if(s===n.length)i+=n;else i+=n.slice(0,e);e-=s;if(e===0){if(s===n.length){++r;if(t.next)this.head=t.next;else this.head=this.tail=null}else{this.head=t;t.data=n.slice(s)}break}++r}this.length-=r;return i}},{key:"_getBuffer",value:function _getBuffer(e){var t=n.allocUnsafe(e);var r=this.head;var i=1;r.data.copy(t);e-=r.data.length;while(r=r.next){var s=r.data;var o=e>s.length?s.length:e;s.copy(t,t.length-e,0,o);e-=o;if(e===0){if(o===s.length){++i;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=s.slice(o)}break}++i}this.length-=i;return t}},{key:a,value:function value(e,t){return o(this,_objectSpread(_objectSpread({},t),{},{depth:0,customInspect:false}))}}]);return BufferList}()},7049:e=>{"use strict";function destroy(e,t){var r=this;var i=this._readableState&&this._readableState.destroyed;var n=this._writableState&&this._writableState.destroyed;if(i||n){if(t){t(e)}else if(e){if(!this._writableState){process.nextTick(emitErrorNT,this,e)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,e)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,(function(e){if(!t&&e){if(!r._writableState){process.nextTick(emitErrorAndCloseNT,r,e)}else if(!r._writableState.errorEmitted){r._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,r,e)}else{process.nextTick(emitCloseNT,r)}}else if(t){process.nextTick(emitCloseNT,r);t(e)}else{process.nextTick(emitCloseNT,r)}}));return this}function emitErrorAndCloseNT(e,t){emitErrorNT(e,t);emitCloseNT(e)}function emitCloseNT(e){if(e._writableState&&!e._writableState.emitClose)return;if(e._readableState&&!e._readableState.emitClose)return;e.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}function errorOrDestroy(e,t){var r=e._readableState;var i=e._writableState;if(r&&r.autoDestroy||i&&i.autoDestroy)e.destroy(t);else e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},6080:(e,t,r)=>{"use strict";var i=r(7214).q.ERR_STREAM_PREMATURE_CLOSE;function once(e){var t=false;return function(){if(t)return;t=true;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++){i[n]=arguments[n]}e.apply(this,i)}}function noop(){}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function eos(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=once(r||noop);var n=t.readable||t.readable!==false&&e.readable;var s=t.writable||t.writable!==false&&e.writable;var o=function onlegacyfinish(){if(!e.writable)l()};var a=e._writableState&&e._writableState.finished;var l=function onfinish(){s=false;a=true;if(!n)r.call(e)};var u=e._readableState&&e._readableState.endEmitted;var c=function onend(){n=false;u=true;if(!s)r.call(e)};var h=function onerror(t){r.call(e,t)};var d=function onclose(){var t;if(n&&!u){if(!e._readableState||!e._readableState.ended)t=new i;return r.call(e,t)}if(s&&!a){if(!e._writableState||!e._writableState.ended)t=new i;return r.call(e,t)}};var p=function onrequest(){e.req.on("finish",l)};if(isRequest(e)){e.on("complete",l);e.on("abort",d);if(e.req)p();else e.on("request",p)}else if(s&&!e._writableState){e.on("end",o);e.on("close",o)}e.on("end",c);e.on("finish",l);if(t.error!==false)e.on("error",h);e.on("close",d);return function(){e.removeListener("complete",l);e.removeListener("abort",d);e.removeListener("request",p);if(e.req)e.req.removeListener("finish",l);e.removeListener("end",o);e.removeListener("close",o);e.removeListener("finish",l);e.removeListener("end",c);e.removeListener("error",h);e.removeListener("close",d)}}e.exports=eos},9082:(e,t,r)=>{"use strict";function asyncGeneratorStep(e,t,r,i,n,s,o){try{var a=e[s](o);var l=a.value}catch(e){r(e);return}if(a.done){t(l)}else{Promise.resolve(l).then(i,n)}}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(i,n){var s=e.apply(t,r);function _next(e){asyncGeneratorStep(s,i,n,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(s,i,n,_next,_throw,"throw",e)}_next(undefined)}))}}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){t=_toPropertyKey(t);if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return typeof t==="symbol"?t:String(t)}function _toPrimitive(e,t){if(typeof e!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var i=r.call(e,t||"default");if(typeof i!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=r(7214).q.ERR_INVALID_ARG_TYPE;function from(e,t,r){var n;if(t&&typeof t.next==="function"){n=t}else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new i("iterable",["Iterable"],t);var s=new e(_objectSpread({objectMode:true},r));var o=false;s._read=function(){if(!o){o=true;next()}};function next(){return _next2.apply(this,arguments)}function _next2(){_next2=_asyncToGenerator((function*(){try{var e=yield n.next(),t=e.value,r=e.done;if(r){s.push(null)}else if(s.push(yield t)){next()}else{o=false}}catch(e){s.destroy(e)}}));return _next2.apply(this,arguments)}return s}e.exports=from},6989:(e,t,r)=>{"use strict";var i;function once(e){var t=false;return function(){if(t)return;t=true;e.apply(void 0,arguments)}}var n=r(7214).q,s=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function isRequest(e){return e.setHeader&&typeof e.abort==="function"}function destroyer(e,t,n,s){s=once(s);var a=false;e.on("close",(function(){a=true}));if(i===undefined)i=r(6080);i(e,{readable:t,writable:n},(function(e){if(e)return s(e);a=true;s()}));var l=false;return function(t){if(a)return;if(l)return;l=true;if(isRequest(e))return e.abort();if(typeof e.destroy==="function")return e.destroy();s(t||new o("pipe"))}}function call(e){e()}function pipe(e,t){return e.pipe(t)}function popCallback(e){if(!e.length)return noop;if(typeof e[e.length-1]!=="function")return noop;return e.pop()}function pipeline(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var i=popCallback(t);if(Array.isArray(t[0]))t=t[0];if(t.length<2){throw new s("streams")}var n;var o=t.map((function(e,r){var s=r<t.length-1;var a=r>0;return destroyer(e,s,a,(function(e){if(!n)n=e;if(e)o.forEach(call);if(s)return;o.forEach(call);i(n)}))}));return t.reduce(pipe)}e.exports=pipeline},9948:(e,t,r)=>{"use strict";var i=r(7214).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function getHighWaterMark(e,t,r,n){var s=highWaterMarkFrom(t,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var o=n?r:"highWaterMark";throw new i(o,s)}return Math.floor(s)}return e.objectMode?16:16*1024}e.exports={getHighWaterMark:getHighWaterMark}},2387:(e,t,r)=>{e.exports=r(2781)},1642:(e,t,r)=>{var i=r(2781);if(process.env.READABLE_STREAM==="disable"&&i){e.exports=i.Readable;Object.assign(e.exports,i);e.exports.Stream=i}else{t=e.exports=r(1433);t.Stream=i||t;t.Readable=t;t.Writable=r(6993);t.Duplex=r(1359);t.Transform=r(4415);t.PassThrough=r(1542);t.finished=r(6080);t.pipeline=r(6989)}},6624:(e,t,r)=>{"use strict";const i=r(4404);e.exports=(e={},t=i.connect)=>new Promise(((r,i)=>{let n=false;let s;const callback=async()=>{await o;s.off("timeout",onTimeout);s.off("error",i);if(e.resolveSocket){r({alpnProtocol:s.alpnProtocol,socket:s,timeout:n});if(n){await Promise.resolve();s.emit("timeout")}}else{s.destroy();r({alpnProtocol:s.alpnProtocol,timeout:n})}};const onTimeout=async()=>{n=true;callback()};const o=(async()=>{try{s=await t(e,callback);s.on("error",i);s.once("timeout",onTimeout)}catch(e){i(e)}})()}))},1867:(e,t,r)=>{
|
|
18
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19
|
-
var i=r(4300);var n=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return n(e,t,r)}SafeBuffer.prototype=Object.create(n.prototype);copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=n(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},7560:(e,t)=>{"use strict";const{hasOwnProperty:r}=Object.prototype;const i=configure();i.configure=configure;i.stringify=i;i.default=i;t.stringify=i;t.configure=configure;e.exports=i;const n=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function strEscape(e){if(e.length<5e3&&!n.test(e)){return`"${e}"`}return JSON.stringify(e)}function insertSort(e){if(e.length>200){return e.sort()}for(let t=1;t<e.length;t++){const r=e[t];let i=t;while(i!==0&&e[i-1]>r){e[i]=e[i-1];i--}e[i]=r}return e}const s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function isTypedArrayWithEntries(e){return s.call(e)!==undefined&&e.length!==0}function stringifyTypedArray(e,t,r){if(e.length<r){r=e.length}const i=t===","?"":" ";let n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++){n+=`${t}"${s}":${i}${e[s]}`}return n}function getCircularValueOption(e){if(r.call(e,"circularValue")){const t=e.circularValue;if(typeof t==="string"){return`"${t}"`}if(t==null){return t}if(t===Error||t===TypeError){return{toString(){throw new TypeError("Converting circular structure to JSON")}}}throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function getBooleanOption(e,t){let i;if(r.call(e,t)){i=e[t];if(typeof i!=="boolean"){throw new TypeError(`The "${t}" argument must be of type boolean`)}}return i===undefined?true:i}function getPositiveIntegerOption(e,t){let i;if(r.call(e,t)){i=e[t];if(typeof i!=="number"){throw new TypeError(`The "${t}" argument must be of type number`)}if(!Number.isInteger(i)){throw new TypeError(`The "${t}" argument must be an integer`)}if(i<1){throw new RangeError(`The "${t}" argument must be >= 1`)}}return i===undefined?Infinity:i}function getItemCount(e){if(e===1){return"1 item"}return`${e} items`}function getUniqueReplacerSet(e){const t=new Set;for(const r of e){if(typeof r==="string"||typeof r==="number"){t.add(String(r))}}return t}function getStrictOption(e){if(r.call(e,"strict")){const t=e.strict;if(typeof t!=="boolean"){throw new TypeError('The "strict" argument must be of type boolean')}if(t){return e=>{let t=`Object can not safely be stringified. Received type ${typeof e}`;if(typeof e!=="function")t+=` (${e.toString()})`;throw new Error(t)}}}}function configure(e){e={...e};const t=getStrictOption(e);if(t){if(e.bigint===undefined){e.bigint=false}if(!("circularValue"in e)){e.circularValue=Error}}const r=getCircularValueOption(e);const i=getBooleanOption(e,"bigint");const n=getBooleanOption(e,"deterministic");const s=getPositiveIntegerOption(e,"maximumDepth");const o=getPositiveIntegerOption(e,"maximumBreadth");function stringifyFnReplacer(e,a,l,u,c,h){let d=a[e];if(typeof d==="object"&&d!==null&&typeof d.toJSON==="function"){d=d.toJSON(e)}d=u.call(a,e,d);switch(typeof d){case"string":return strEscape(d);case"object":{if(d===null){return"null"}if(l.indexOf(d)!==-1){return r}let e="";let t=",";const i=h;if(Array.isArray(d)){if(d.length===0){return"[]"}if(s<l.length+1){return'"[Array]"'}l.push(d);if(c!==""){h+=c;e+=`\n${h}`;t=`,\n${h}`}const r=Math.min(d.length,o);let n=0;for(;n<r-1;n++){const r=stringifyFnReplacer(String(n),d,l,u,c,h);e+=r!==undefined?r:"null";e+=t}const a=stringifyFnReplacer(String(n),d,l,u,c,h);e+=a!==undefined?a:"null";if(d.length-1>o){const r=d.length-o-1;e+=`${t}"... ${getItemCount(r)} not stringified"`}if(c!==""){e+=`\n${i}`}l.pop();return`[${e}]`}let a=Object.keys(d);const p=a.length;if(p===0){return"{}"}if(s<l.length+1){return'"[Object]"'}let m="";let g="";if(c!==""){h+=c;t=`,\n${h}`;m=" "}const y=Math.min(p,o);if(n&&!isTypedArrayWithEntries(d)){a=insertSort(a)}l.push(d);for(let r=0;r<y;r++){const i=a[r];const n=stringifyFnReplacer(i,d,l,u,c,h);if(n!==undefined){e+=`${g}${strEscape(i)}:${m}${n}`;g=t}}if(p>o){const r=p-o;e+=`${g}"...":${m}"${getItemCount(r)} not stringified"`;g=t}if(c!==""&&g.length>1){e=`\n${h}${e}\n${i}`}l.pop();return`{${e}}`}case"number":return isFinite(d)?String(d):t?t(d):"null";case"boolean":return d===true?"true":"false";case"undefined":return undefined;case"bigint":if(i){return String(d)}default:return t?t(d):undefined}}function stringifyArrayReplacer(e,n,a,l,u,c){if(typeof n==="object"&&n!==null&&typeof n.toJSON==="function"){n=n.toJSON(e)}switch(typeof n){case"string":return strEscape(n);case"object":{if(n===null){return"null"}if(a.indexOf(n)!==-1){return r}const e=c;let t="";let i=",";if(Array.isArray(n)){if(n.length===0){return"[]"}if(s<a.length+1){return'"[Array]"'}a.push(n);if(u!==""){c+=u;t+=`\n${c}`;i=`,\n${c}`}const r=Math.min(n.length,o);let h=0;for(;h<r-1;h++){const e=stringifyArrayReplacer(String(h),n[h],a,l,u,c);t+=e!==undefined?e:"null";t+=i}const d=stringifyArrayReplacer(String(h),n[h],a,l,u,c);t+=d!==undefined?d:"null";if(n.length-1>o){const e=n.length-o-1;t+=`${i}"... ${getItemCount(e)} not stringified"`}if(u!==""){t+=`\n${e}`}a.pop();return`[${t}]`}a.push(n);let h="";if(u!==""){c+=u;i=`,\n${c}`;h=" "}let d="";for(const e of l){const r=stringifyArrayReplacer(e,n[e],a,l,u,c);if(r!==undefined){t+=`${d}${strEscape(e)}:${h}${r}`;d=i}}if(u!==""&&d.length>1){t=`\n${c}${t}\n${e}`}a.pop();return`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return n===true?"true":"false";case"undefined":return undefined;case"bigint":if(i){return String(n)}default:return t?t(n):undefined}}function stringifyIndent(e,a,l,u,c){switch(typeof a){case"string":return strEscape(a);case"object":{if(a===null){return"null"}if(typeof a.toJSON==="function"){a=a.toJSON(e);if(typeof a!=="object"){return stringifyIndent(e,a,l,u,c)}if(a===null){return"null"}}if(l.indexOf(a)!==-1){return r}const t=c;if(Array.isArray(a)){if(a.length===0){return"[]"}if(s<l.length+1){return'"[Array]"'}l.push(a);c+=u;let e=`\n${c}`;const r=`,\n${c}`;const i=Math.min(a.length,o);let n=0;for(;n<i-1;n++){const t=stringifyIndent(String(n),a[n],l,u,c);e+=t!==undefined?t:"null";e+=r}const h=stringifyIndent(String(n),a[n],l,u,c);e+=h!==undefined?h:"null";if(a.length-1>o){const t=a.length-o-1;e+=`${r}"... ${getItemCount(t)} not stringified"`}e+=`\n${t}`;l.pop();return`[${e}]`}let i=Object.keys(a);const h=i.length;if(h===0){return"{}"}if(s<l.length+1){return'"[Object]"'}c+=u;const d=`,\n${c}`;let p="";let m="";let g=Math.min(h,o);if(isTypedArrayWithEntries(a)){p+=stringifyTypedArray(a,d,o);i=i.slice(a.length);g-=a.length;m=d}if(n){i=insertSort(i)}l.push(a);for(let e=0;e<g;e++){const t=i[e];const r=stringifyIndent(t,a[t],l,u,c);if(r!==undefined){p+=`${m}${strEscape(t)}: ${r}`;m=d}}if(h>o){const e=h-o;p+=`${m}"...": "${getItemCount(e)} not stringified"`;m=d}if(m!==""){p=`\n${c}${p}\n${t}`}l.pop();return`{${p}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===true?"true":"false";case"undefined":return undefined;case"bigint":if(i){return String(a)}default:return t?t(a):undefined}}function stringifySimple(e,a,l){switch(typeof a){case"string":return strEscape(a);case"object":{if(a===null){return"null"}if(typeof a.toJSON==="function"){a=a.toJSON(e);if(typeof a!=="object"){return stringifySimple(e,a,l)}if(a===null){return"null"}}if(l.indexOf(a)!==-1){return r}let t="";if(Array.isArray(a)){if(a.length===0){return"[]"}if(s<l.length+1){return'"[Array]"'}l.push(a);const e=Math.min(a.length,o);let r=0;for(;r<e-1;r++){const e=stringifySimple(String(r),a[r],l);t+=e!==undefined?e:"null";t+=","}const i=stringifySimple(String(r),a[r],l);t+=i!==undefined?i:"null";if(a.length-1>o){const e=a.length-o-1;t+=`,"... ${getItemCount(e)} not stringified"`}l.pop();return`[${t}]`}let i=Object.keys(a);const u=i.length;if(u===0){return"{}"}if(s<l.length+1){return'"[Object]"'}let c="";let h=Math.min(u,o);if(isTypedArrayWithEntries(a)){t+=stringifyTypedArray(a,",",o);i=i.slice(a.length);h-=a.length;c=","}if(n){i=insertSort(i)}l.push(a);for(let e=0;e<h;e++){const r=i[e];const n=stringifySimple(r,a[r],l);if(n!==undefined){t+=`${c}${strEscape(r)}:${n}`;c=","}}if(u>o){const e=u-o;t+=`${c}"...":"${getItemCount(e)} not stringified"`}l.pop();return`{${t}}`}case"number":return isFinite(a)?String(a):t?t(a):"null";case"boolean":return a===true?"true":"false";case"undefined":return undefined;case"bigint":if(i){return String(a)}default:return t?t(a):undefined}}function stringify(e,t,r){if(arguments.length>1){let i="";if(typeof r==="number"){i=" ".repeat(Math.min(r,10))}else if(typeof r==="string"){i=r.slice(0,10)}if(t!=null){if(typeof t==="function"){return stringifyFnReplacer("",{"":e},[],t,i,"")}if(Array.isArray(t)){return stringifyArrayReplacer("",e,[],getUniqueReplacerSet(t),i,"")}}if(i.length!==0){return stringifyIndent("",e,[],i,"")}}return stringifySimple("",e,[])}return stringify}},8679:(e,t,r)=>{"use strict";var i=r(8542);var n=Array.prototype.concat;var s=Array.prototype.slice;var o=e.exports=function swizzle(e){var t=[];for(var r=0,o=e.length;r<o;r++){var a=e[r];if(i(a)){t=n.call(t,s.call(a))}else{t.push(a)}}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},8542:e=>{e.exports=function isArrayish(e){if(!e||typeof e==="string"){return false}return e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}},5315:(e,t)=>{t.get=function(e){var r=Error.stackTraceLimit;Error.stackTraceLimit=Infinity;var i={};var n=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};Error.captureStackTrace(i,e||t.get);var s=i.stack;Error.prepareStackTrace=n;Error.stackTraceLimit=r;return s};t.parse=function(e){if(!e.stack){return[]}var t=this;var r=e.stack.split("\n").slice(1);return r.map((function(e){if(e.match(/^\s*[-]{4,}$/)){return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null})}var r=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!r){return}var i=null;var n=null;var s=null;var o=null;var a=null;var l=r[5]==="native";if(r[1]){s=r[1];var u=s.lastIndexOf(".");if(s[u-1]==".")u--;if(u>0){i=s.substr(0,u);n=s.substr(u+1);var c=i.indexOf(".Module");if(c>0){s=s.substr(c+1);i=i.substr(0,c)}}o=null}if(n){o=i;a=n}if(n==="<anonymous>"){a=null;s=null}var h={fileName:r[2]||null,lineNumber:parseInt(r[3],10)||null,functionName:s,typeName:o,methodName:a,columnNumber:parseInt(r[4],10)||null,native:l};return t._createParsedCallSite(h)})).filter((function(e){return!!e}))};function CallSite(e){for(var t in e){this[t]=e[t]}}var r=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"];var i=["topLevel","eval","native","constructor"];r.forEach((function(e){CallSite.prototype[e]=null;CallSite.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}}));i.forEach((function(e){CallSite.prototype[e]=false;CallSite.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}}));t._createParsedCallSite=function(e){return new CallSite(e)}},4841:(e,t,r)=>{"use strict";var i=r(1867).Buffer;var n=i.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=i.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r<e.length)return t?t+this.text(e,r):this.text(e,r);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var i=t.length-1;if(i<r)return 0;var n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--i<r||n===-2)return 0;n=utf8CheckByte(t[i]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,i);return e.toString("utf8",t,i)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},9318:(e,t,r)=>{"use strict";const i=r(2037);const n=r(6224);const s=r(1621);const{env:o}=process;let a;if(s("no-color")||s("no-colors")||s("color=false")||s("color=never")){a=0}else if(s("color")||s("colors")||s("color=true")||s("color=always")){a=1}if("FORCE_COLOR"in o){if(o.FORCE_COLOR==="true"){a=1}else if(o.FORCE_COLOR==="false"){a=0}else{a=o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(a===0){return 0}if(s("color=16m")||s("color=full")||s("color=truecolor")){return 3}if(s("color=256")){return 2}if(e&&!t&&a===undefined){return 0}const r=a||0;if(o.TERM==="dumb"){return r}if(process.platform==="win32"){const e=i.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in o){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||o.CI_NAME==="codeship"){return 1}return r}if("TEAMCITY_VERSION"in o){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0}if(o.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(o.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)){return 1}if("COLORTERM"in o){return 1}return r}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,n.isatty(1))),stderr:translateLevel(supportsColor(true,n.isatty(2)))}},7014:e=>{"use strict";e.exports=function hex(e){for(var t=0,r=0;t<e.length;r=e.charCodeAt(t++)+((r<<5)-r));var i=Math.floor(Math.abs(Math.sin(r)*1e4%1*16777216)).toString(16);return"#"+Array(6-i.length+1).join("0")+i}},1416:(e,t)=>{"use strict";t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},7113:(e,t,r)=>{"use strict";Object.defineProperty(t,"cli",{value:r(1416)});Object.defineProperty(t,"npm",{value:r(3568)});Object.defineProperty(t,"syslog",{value:r(6990)})},3568:(e,t)=>{"use strict";t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},6990:(e,t)=>{"use strict";t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},3937:(e,t,r)=>{"use strict";Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(t,"configs",{value:r(7113)})},5278:(e,t,r)=>{e.exports=r(3837).deprecate},7281:(e,t,r)=>{"use strict";const i=r(3837);const n=r(6993);const{LEVEL:s}=r(3937);const o=e.exports=function TransportStream(e={}){n.call(this,{objectMode:true,highWaterMark:e.highWaterMark});this.format=e.format;this.level=e.level;this.handleExceptions=e.handleExceptions;this.handleRejections=e.handleRejections;this.silent=e.silent;if(e.log)this.log=e.log;if(e.logv)this.logv=e.logv;if(e.close)this.close=e.close;this.once("pipe",(e=>{this.levels=e.levels;this.parent=e}));this.once("unpipe",(e=>{if(e===this.parent){this.parent=null;if(this.close){this.close()}}}))};i.inherits(o,n);o.prototype._write=function _write(e,t,r){if(this.silent||e.exception===true&&!this.handleExceptions){return r(null)}const i=this.level||this.parent&&this.parent.level;if(!i||this.levels[i]>=this.levels[e[s]]){if(e&&!this.format){return this.log(e,r)}let t;let i;try{i=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!i){r();if(t)throw t;return}return this.log(i,r)}this._writableState.sync=false;return r(null)};o.prototype._writev=function _writev(e,t){if(this.logv){const r=e.filter(this._accept,this);if(!r.length){return t(null)}return this.logv(r,t)}for(let r=0;r<e.length;r++){if(!this._accept(e[r]))continue;if(e[r].chunk&&!this.format){this.log(e[r].chunk,e[r].callback);continue}let i;let n;try{n=this.format.transform(Object.assign({},e[r].chunk),this.format.options)}catch(e){i=e}if(i||!n){e[r].callback();if(i){t(null);throw i}}else{this.log(n,e[r].callback)}}return t(null)};o.prototype._accept=function _accept(e){const t=e.chunk;if(this.silent){return false}const r=this.level||this.parent&&this.parent.level;if(t.exception===true||!r||this.levels[r]>=this.levels[t[s]]){if(this.handleExceptions||t.exception!==true){return true}}return false};o.prototype._nop=function _nop(){return void undefined};e.exports.LegacyTransportStream=r(6201)},6201:(e,t,r)=>{"use strict";const i=r(3837);const{LEVEL:n}=r(3937);const s=r(7281);const o=e.exports=function LegacyTransportStream(e={}){s.call(this,e);if(!e.transport||typeof e.transport.log!=="function"){throw new Error("Invalid transport, must be an object with a log method.")}this.transport=e.transport;this.level=this.level||e.transport.level;this.handleExceptions=this.handleExceptions||e.transport.handleExceptions;this._deprecated();function transportError(e){this.emit("error",e,this.transport)}if(!this.transport.__winstonError){this.transport.__winstonError=transportError.bind(this);this.transport.on("error",this.transport.__winstonError)}};i.inherits(o,s);o.prototype._write=function _write(e,t,r){if(this.silent||e.exception===true&&!this.handleExceptions){return r(null)}if(!this.level||this.levels[this.level]>=this.levels[e[n]]){this.transport.log(e[n],e.message,e,this._nop)}r(null)};o.prototype._writev=function _writev(e,t){for(let t=0;t<e.length;t++){if(this._accept(e[t])){this.transport.log(e[t].chunk[n],e[t].chunk.message,e[t].chunk,this._nop);e[t].callback()}}return t(null)};o.prototype._deprecated=function _deprecated(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))};o.prototype.close=function close(){if(this.transport.close){this.transport.close()}if(this.transport.__winstonError){this.transport.removeListener("error",this.transport.__winstonError);this.transport.__winstonError=null}}},4158:(e,t,r)=>{"use strict";const i=r(2955);const{warn:n}=r(8043);t.version=r(2561).version;t.transports=r(7804);t.config=r(4325);t.addColors=i.levels;t.format=i.format;t.createLogger=r(2878);t.Logger=r(5234);t.ExceptionHandler=r(7891);t.RejectionHandler=r(1080);t.Container=r(7184);t.Transport=r(7281);t.loggers=new t.Container;const s=t.createLogger();Object.keys(t.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((e=>t[e]=(...t)=>s[e](...t)));Object.defineProperty(t,"level",{get(){return s.level},set(e){s.level=e}});Object.defineProperty(t,"exceptions",{get(){return s.exceptions}});["exitOnError"].forEach((e=>{Object.defineProperty(t,e,{get(){return s[e]},set(t){s[e]=t}})}));Object.defineProperty(t,"default",{get(){return{exceptionHandlers:s.exceptionHandlers,rejectionHandlers:s.rejectionHandlers,transports:s.transports}}});n.deprecated(t,"setLevels");n.forFunctions(t,"useFormat",["cli"]);n.forProperties(t,"useFormat",["padLevels","stripColors"]);n.forFunctions(t,"deprecated",["addRewriter","addFilter","clone","extend"]);n.forProperties(t,"deprecated",["emitErrs","levelLength"])},8043:(e,t,r)=>{"use strict";const{format:i}=r(3837);t.warn={deprecated(e){return()=>{throw new Error(i("{ %s } was removed in winston@3.0.0.",e))}},useFormat(e){return()=>{throw new Error([i("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions(e,r,i){i.forEach((i=>{e[i]=t.warn[r](i)}))},forProperties(e,r,i){i.forEach((i=>{const n=t.warn[r](i);Object.defineProperty(e,i,{get:n,set:n})}))}}},4325:(e,t,r)=>{"use strict";const i=r(2955);const{configs:n}=r(3937);t.cli=i.levels(n.cli);t.npm=i.levels(n.npm);t.syslog=i.levels(n.syslog);t.addColors=i.levels},7184:(e,t,r)=>{"use strict";const i=r(2878);e.exports=class Container{constructor(e={}){this.loggers=new Map;this.options=e}add(e,t){if(!this.loggers.has(e)){t=Object.assign({},t||this.options);const r=t.transports||this.options.transports;if(r){t.transports=Array.isArray(r)?r.slice():[r]}else{t.transports=[]}const n=i(t);n.on("close",(()=>this._delete(e)));this.loggers.set(e,n)}return this.loggers.get(e)}get(e,t){return this.add(e,t)}has(e){return!!this.loggers.has(e)}close(e){if(e){return this._removeLogger(e)}this.loggers.forEach(((e,t)=>this._removeLogger(t)))}_removeLogger(e){if(!this.loggers.has(e)){return}const t=this.loggers.get(e);t.close();this._delete(e)}_delete(e){this.loggers.delete(e)}}},2878:(e,t,r)=>{"use strict";const{LEVEL:i}=r(3937);const n=r(4325);const s=r(5234);const o=r(3170)("winston:create-logger");function isLevelEnabledFunctionName(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}e.exports=function(e={}){e.levels=e.levels||n.npm.levels;class DerivedLogger extends s{constructor(e){super(e)}}const t=new DerivedLogger(e);Object.keys(e.levels).forEach((function(e){o('Define prototype method for "%s"',e);if(e==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}DerivedLogger.prototype[e]=function(...r){const n=this||t;if(r.length===1){const[s]=r;const o=s&&s.message&&s||{message:s};o.level=o[i]=e;n._addDefaultMeta(o);n.write(o);return this||t}if(r.length===0){n.log(e,"");return n}return n.log(e,...r)};DerivedLogger.prototype[isLevelEnabledFunctionName(e)]=function(){return(this||t).isLevelEnabled(e)}}));return t}},7891:(e,t,r)=>{"use strict";const i=r(2037);const n=r(1216);const s=r(3170)("winston:exception");const o=r(4118);const a=r(5315);const l=r(6268);e.exports=class ExceptionHandler{constructor(e){if(!e){throw new Error("Logger is required to handle exceptions")}this.logger=e;this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e)){return e.forEach((e=>this._addHandler(e)))}this._addHandler(e)}));if(!this.catcher){this.catcher=this._uncaughtException.bind(this);process.on("uncaughtException",this.catcher)}}unhandle(){if(this.catcher){process.removeListener("uncaughtException",this.catcher);this.catcher=false;Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e)))}}getAllInfo(e){let t=null;if(e){t=typeof e==="string"?e:e.message}return{error:e,level:"error",message:[`uncaughtException: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:true,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:i.loadavg(),uptime:i.uptime()}}getTrace(e){const t=e?a.parse(e):a.get();return t.map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=true;const t=new l(e);this.handlers.set(e,t);this.logger.pipe(t)}}_uncaughtException(e){const t=this.getAllInfo(e);const r=this._getExceptionHandlers();let i=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(e):this.logger.exitOnError;let a;if(!r.length&&i){console.warn("winston: exitOnError cannot be true with no exception handlers.");console.warn("winston: not exiting process.");i=false}function gracefulExit(){s("doExit",i);s("process._exiting",process._exiting);if(i&&!process._exiting){if(a){clearTimeout(a)}process.exit(1)}}if(!r||r.length===0){return process.nextTick(gracefulExit)}n(r,((e,t)=>{const r=o(t);const i=e.transport||e;function onDone(e){return()=>{s(e);r()}}i._ending=true;i.once("finish",onDone("finished"));i.once("error",onDone("error"))}),(()=>i&&gracefulExit()));this.logger.log(t);if(i){a=setTimeout(gracefulExit,3e3)}}_getExceptionHandlers(){return this.logger.transports.filter((e=>{const t=e.transport||e;return t.handleExceptions}))}}},6268:(e,t,r)=>{"use strict";const{Writable:i}=r(1642);e.exports=class ExceptionStream extends i{constructor(e){super({objectMode:true});if(!e){throw new Error("ExceptionStream requires a TransportStream instance.")}this.handleExceptions=true;this.transport=e}_write(e,t,r){if(e.exception){return this.transport.log(e,r)}r();return true}}},5234:(e,t,r)=>{"use strict";const{Stream:i,Transform:n}=r(1642);const s=r(1216);const{LEVEL:o,SPLAT:a}=r(3937);const l=r(1554);const u=r(7891);const c=r(1080);const h=r(6201);const d=r(6959);const{warn:p}=r(8043);const m=r(4325);const g=/%[scdjifoO%]/g;class Logger extends n{constructor(e){super({objectMode:true});this.configure(e)}child(e){const t=this;return Object.create(t,{write:{value:function(r){const i=Object.assign({},e,r);if(r instanceof Error){i.stack=r.stack;i.message=r.message}t.write(i)}}})}configure({silent:e,format:t,defaultMeta:i,levels:n,level:s="info",exitOnError:o=true,transports:a,colors:l,emitErrs:h,formatters:d,padLevels:p,rewriters:g,stripColors:y,exceptionHandlers:_,rejectionHandlers:v}={}){if(this.transports.length){this.clear()}this.silent=e;this.format=t||this.format||r(5669)();this.defaultMeta=i||null;this.levels=n||this.levels||m.npm.levels;this.level=s;if(this.exceptions){this.exceptions.unhandle()}if(this.rejections){this.rejections.unhandle()}this.exceptions=new u(this);this.rejections=new c(this);this.profilers={};this.exitOnError=o;if(a){a=Array.isArray(a)?a:[a];a.forEach((e=>this.add(e)))}if(l||h||d||p||g||y){throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}if(_){this.exceptions.handle(_)}if(v){this.rejections.handle(v)}}isLevelEnabled(e){const t=getLevelValue(this.levels,e);if(t===null){return false}const r=getLevelValue(this.levels,this.level);if(r===null){return false}if(!this.transports||this.transports.length===0){return r>=t}const i=this.transports.findIndex((e=>{let i=getLevelValue(this.levels,e.level);if(i===null){i=r}return i>=t}));return i!==-1}log(e,t,...r){if(arguments.length===1){e[o]=e.level;this._addDefaultMeta(e);this.write(e);return this}if(arguments.length===2){if(t&&typeof t==="object"){t[o]=t.level=e;this._addDefaultMeta(t);this.write(t);return this}t={[o]:e,level:e,message:t};this._addDefaultMeta(t);this.write(t);return this}const[i]=r;if(typeof i==="object"&&i!==null){const n=t&&t.match&&t.match(g);if(!n){const n=Object.assign({},this.defaultMeta,i,{[o]:e,[a]:r,level:e,message:t});if(i.message)n.message=`${n.message} ${i.message}`;if(i.stack)n.stack=i.stack;this.write(n);return this}}this.write(Object.assign({},this.defaultMeta,{[o]:e,[a]:r,level:e,message:t}));return this}_transform(e,t,r){if(this.silent){return r()}if(!e[o]){e[o]=e.level}if(!this.levels[e[o]]&&this.levels[e[o]]!==0){console.error("[winston] Unknown logger level: %s",e[o])}if(!this._readableState.pipes){console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e)}try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=false;r()}}_final(e){const t=this.transports.slice();s(t,((e,t)=>{if(!e||e.finished)return setImmediate(t);e.once("finish",t);e.end()}),e)}add(e){const t=!l(e)||e.log.length>2?new h({transport:e}):e;if(!t._writableState||!t._writableState.objectMode){throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.")}this._onEvent("error",t);this._onEvent("warn",t);this.pipe(t);if(e.handleExceptions){this.exceptions.handle()}if(e.handleRejections){this.rejections.handle()}return this}remove(e){if(!e)return this;let t=e;if(!l(e)||e.log.length>2){t=this.transports.filter((t=>t.transport===e))[0]}if(t){this.unpipe(t)}return this}clear(){this.unpipe();return this}close(){this.exceptions.unhandle();this.rejections.unhandle();this.clear();this.emit("close");return this}setLevels(){p.deprecated("setLevels")}query(e,t){if(typeof e==="function"){t=e;e={}}e=e||{};const r={};const i=Object.assign({},e.query||{});function queryTransport(t,r){if(e.query&&typeof t.formatQuery==="function"){e.query=t.formatQuery(i)}t.query(e,((i,n)=>{if(i){return r(i)}if(typeof t.formatResults==="function"){n=t.formatResults(n,e.format)}r(null,n)}))}function addResults(e,t){queryTransport(e,((i,n)=>{if(t){n=i||n;if(n){r[e.name]=n}t()}t=null}))}s(this.transports.filter((e=>!!e.query)),addResults,(()=>t(null,r)))}stream(e={}){const t=new i;const r=[];t._streams=r;t.destroy=()=>{let e=r.length;while(e--){r[e].destroy()}};this.transports.filter((e=>!!e.stream)).forEach((i=>{const n=i.stream(e);if(!n){return}r.push(n);n.on("log",(e=>{e.transport=e.transport||[];e.transport.push(i.name);t.emit("log",e)}));n.on("error",(e=>{e.transport=e.transport||[];e.transport.push(i.name);t.emit("error",e)}))}));return t}startTimer(){return new d(this)}profile(e,...t){const r=Date.now();if(this.profilers[e]){const i=this.profilers[e];delete this.profilers[e];if(typeof t[t.length-2]==="function"){console.warn("Callback function no longer supported as of winston@3.0.0");t.pop()}const n=typeof t[t.length-1]==="object"?t.pop():{};n.level=n.level||"info";n.durationMs=r-i;n.message=n.message||e;return this.write(n)}this.profilers[e]=r;return this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()");this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()");this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}_onEvent(e,t){function transportEvent(r){if(e==="error"&&!this.transports.includes(t)){this.add(t)}this.emit(e,r,t)}if(!t["__winston"+e]){t["__winston"+e]=transportEvent.bind(this);t.on(e,t["__winston"+e])}}_addDefaultMeta(e){if(this.defaultMeta){Object.assign(e,this.defaultMeta)}}}function getLevelValue(e,t){const r=e[t];if(!r&&r!==0){return null}return r}Object.defineProperty(Logger.prototype,"transports",{configurable:false,enumerable:true,get(){const{pipes:e}=this._readableState;return!Array.isArray(e)?[e].filter(Boolean):e}});e.exports=Logger},6959:e=>{"use strict";e.exports=class Profiler{constructor(e){if(!e){throw new Error("Logger is required for profiling.")}this.logger=e;this.start=Date.now()}done(...e){if(typeof e[e.length-1]==="function"){console.warn("Callback function no longer supported as of winston@3.0.0");e.pop()}const t=typeof e[e.length-1]==="object"?e.pop():{};t.level=t.level||"info";t.durationMs=Date.now()-this.start;return this.logger.write(t)}}},1080:(e,t,r)=>{"use strict";const i=r(2037);const n=r(1216);const s=r(3170)("winston:rejection");const o=r(4118);const a=r(5315);const l=r(6268);e.exports=class RejectionHandler{constructor(e){if(!e){throw new Error("Logger is required to handle rejections")}this.logger=e;this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e)){return e.forEach((e=>this._addHandler(e)))}this._addHandler(e)}));if(!this.catcher){this.catcher=this._unhandledRejection.bind(this);process.on("unhandledRejection",this.catcher)}}unhandle(){if(this.catcher){process.removeListener("unhandledRejection",this.catcher);this.catcher=false;Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e)))}}getAllInfo(e){let t=null;if(e){t=typeof e==="string"?e:e.message}return{error:e,level:"error",message:[`unhandledRejection: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:true,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:i.loadavg(),uptime:i.uptime()}}getTrace(e){const t=e?a.parse(e):a.get();return t.map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=true;const t=new l(e);this.handlers.set(e,t);this.logger.pipe(t)}}_unhandledRejection(e){const t=this.getAllInfo(e);const r=this._getRejectionHandlers();let i=typeof this.logger.exitOnError==="function"?this.logger.exitOnError(e):this.logger.exitOnError;let a;if(!r.length&&i){console.warn("winston: exitOnError cannot be true with no rejection handlers.");console.warn("winston: not exiting process.");i=false}function gracefulExit(){s("doExit",i);s("process._exiting",process._exiting);if(i&&!process._exiting){if(a){clearTimeout(a)}process.exit(1)}}if(!r||r.length===0){return process.nextTick(gracefulExit)}n(r,((e,t)=>{const r=o(t);const i=e.transport||e;function onDone(e){return()=>{s(e);r()}}i._ending=true;i.once("finish",onDone("finished"));i.once("error",onDone("error"))}),(()=>i&&gracefulExit()));this.logger.log(t);if(i){a=setTimeout(gracefulExit,3e3)}}_getRejectionHandlers(){return this.logger.transports.filter((e=>{const t=e.transport||e;return t.handleRejections}))}}},1965:(e,t,r)=>{"use strict";const i=r(7147);const{StringDecoder:n}=r(1576);const{Stream:s}=r(1642);function noop(){}e.exports=(e,t)=>{const r=Buffer.alloc(64*1024);const o=new n("utf8");const a=new s;let l="";let u=0;let c=0;if(e.start===-1){delete e.start}a.readable=true;a.destroy=()=>{a.destroyed=true;a.emit("end");a.emit("close")};i.open(e.file,"a+","0644",((n,s)=>{if(n){if(!t){a.emit("error",n)}else{t(n)}a.destroy();return}(function read(){if(a.destroyed){i.close(s,noop);return}return i.read(s,r,0,r.length,u,((i,n)=>{if(i){if(!t){a.emit("error",i)}else{t(i)}a.destroy();return}if(!n){if(l){if(e.start==null||c>e.start){if(!t){a.emit("line",l)}else{t(null,l)}}c++;l=""}return setTimeout(read,1e3)}let s=o.write(r.slice(0,n));if(!t){a.emit("data",s)}s=(l+s).split(/\n+/);const h=s.length-1;let d=0;for(;d<h;d++){if(e.start==null||c>e.start){if(!t){a.emit("line",s[d])}else{t(null,s[d])}}c++}l=s[h];u+=n;return read()}))})()}));if(!t){return a}return a.destroy}},7501:(e,t,r)=>{"use strict";const i=r(2037);const{LEVEL:n,MESSAGE:s}=r(3937);const o=r(7281);e.exports=class Console extends o{constructor(e={}){super(e);this.name=e.name||"console";this.stderrLevels=this._stringArrayToSet(e.stderrLevels);this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels);this.eol=typeof e.eol==="string"?e.eol:i.EOL;this.setMaxListeners(30)}log(e,t){setImmediate((()=>this.emit("logged",e)));if(this.stderrLevels[e[n]]){if(console._stderr){console._stderr.write(`${e[s]}${this.eol}`)}else{console.error(e[s])}if(t){t()}return}else if(this.consoleWarnLevels[e[n]]){if(console._stderr){console._stderr.write(`${e[s]}${this.eol}`)}else{console.warn(e[s])}if(t){t()}return}if(console._stdout){console._stdout.write(`${e[s]}${this.eol}`)}else{console.log(e[s])}if(t){t()}}_stringArrayToSet(e,t){if(!e)return{};t=t||"Cannot make set from type other than Array of string elements";if(!Array.isArray(e)){throw new Error(t)}return e.reduce(((e,r)=>{if(typeof r!=="string"){throw new Error(t)}e[r]=true;return e}),{})}}},2478:(e,t,r)=>{"use strict";const i=r(7147);const n=r(1017);const s=r(9619);const o=r(9796);const{MESSAGE:a}=r(3937);const{Stream:l,PassThrough:u}=r(1642);const c=r(7281);const h=r(3170)("winston:file");const d=r(2037);const p=r(1965);e.exports=class File extends c{constructor(e={}){super(e);this.name=e.name||"file";function throwIf(t,...r){r.slice(1).forEach((r=>{if(e[r]){throw new Error(`Cannot set ${r} and ${t} together`)}}))}this._stream=new u;this._stream.setMaxListeners(30);this._onError=this._onError.bind(this);if(e.filename||e.dirname){throwIf("filename or dirname","stream");this._basename=this.filename=e.filename?n.basename(e.filename):"winston.log";this.dirname=e.dirname||n.dirname(e.filename);this.options=e.options||{flags:"a"}}else if(e.stream){console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream");throwIf("stream","filename","maxsize");this._dest=this._stream.pipe(this._setupStream(e.stream));this.dirname=n.dirname(this._dest.path)}else{throw new Error("Cannot log to file without filename or stream.")}this.maxsize=e.maxsize||null;this.rotationFormat=e.rotationFormat||false;this.zippedArchive=e.zippedArchive||false;this.maxFiles=e.maxFiles||null;this.eol=typeof e.eol==="string"?e.eol:d.EOL;this.tailable=e.tailable||false;this.lazy=e.lazy||false;this._size=0;this._pendingSize=0;this._created=0;this._drain=false;this._opening=false;this._ending=false;this._fileExist=false;if(this.dirname)this._createLogDirIfNotExist(this.dirname);if(!this.lazy)this.open()}finishIfEnding(){if(this._ending){if(this._opening){this.once("open",(()=>{this._stream.once("finish",(()=>this.emit("finish")));setImmediate((()=>this._stream.end()))}))}else{this._stream.once("finish",(()=>this.emit("finish")));setImmediate((()=>this._stream.end()))}}}log(e,t=(()=>{})){if(this.silent){t();return true}if(this._drain){this._stream.once("drain",(()=>{this._drain=false;this.log(e,t)}));return}if(this._rotate){this._stream.once("rotate",(()=>{this._rotate=false;this.log(e,t)}));return}if(this.lazy){if(!this._fileExist){if(!this._opening){this.open()}this.once("open",(()=>{this._fileExist=true;this.log(e,t);return}));return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",(()=>{if(!this._opening){this.open()}this.once("open",(()=>{this.log(e,t);return}));return}));return}}const r=`${e[a]}${this.eol}`;const i=Buffer.byteLength(r);function logged(){this._size+=i;this._pendingSize-=i;h("logged %s %s",this._size,r);this.emit("logged",e);if(this._rotate){return}if(this._opening){return}if(!this._needsNewFile()){return}if(this.lazy){this._endStream((()=>{this.emit("fileclosed")}));return}this._rotate=true;this._endStream((()=>this._rotateFile()))}this._pendingSize+=i;if(this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)){this.rotatedWhileOpening=true}const n=this._stream.write(r,logged.bind(this));if(!n){this._drain=true;this._stream.once("drain",(()=>{this._drain=false;t()}))}else{t()}h("written",n,this._drain);this.finishIfEnding();return n}query(e,t){if(typeof e==="function"){t=e;e={}}e=normalizeQuery(e);const r=n.join(this.dirname,this.filename);let s="";let o=[];let a=0;const l=i.createReadStream(r,{encoding:"utf8"});l.on("error",(e=>{if(l.readable){l.destroy()}if(!t){return}return e.code!=="ENOENT"?t(e):t(null,o)}));l.on("data",(t=>{t=(s+t).split(/\n+/);const r=t.length-1;let i=0;for(;i<r;i++){if(!e.start||a>=e.start){add(t[i])}a++}s=t[r]}));l.on("close",(()=>{if(s){add(s,true)}if(e.order==="desc"){o=o.reverse()}if(t)t(null,o)}));function add(e,t){try{const t=JSON.parse(e);if(check(t)){push(t)}}catch(e){if(!t){l.emit("error",e)}}}function push(t){if(e.rows&&o.length>=e.rows&&e.order!=="desc"){if(l.readable){l.destroy()}return}if(e.fields){t=e.fields.reduce(((e,r)=>{e[r]=t[r];return e}),{})}if(e.order==="desc"){if(o.length>=e.rows){o.shift()}}o.push(t)}function check(t){if(!t){return}if(typeof t!=="object"){return}const r=new Date(t.timestamp);if(e.from&&r<e.from||e.until&&r>e.until||e.level&&e.level!==t.level){return}return true}function normalizeQuery(e){e=e||{};e.rows=e.rows||e.limit||10;e.start=e.start||0;e.until=e.until||new Date;if(typeof e.until!=="object"){e.until=new Date(e.until)}e.from=e.from||e.until-24*60*60*1e3;if(typeof e.from!=="object"){e.from=new Date(e.from)}e.order=e.order||"desc";return e}}stream(e={}){const t=n.join(this.dirname,this.filename);const r=new l;const i={file:t,start:e.start};r.destroy=p(i,((e,t)=>{if(e){return r.emit("error",e)}try{r.emit("data",t);t=JSON.parse(t);r.emit("log",t)}catch(e){r.emit("error",e)}}));return r}open(){if(!this.filename)return;if(this._opening)return;this._opening=true;this.stat(((e,t)=>{if(e){return this.emit("error",e)}h("stat done: %s { size: %s }",this.filename,t);this._size=t;this._dest=this._createStream(this._stream);this._opening=false;this.once("open",(()=>{if(this._stream.eventNames().includes("rotate")){this._stream.emit("rotate")}else{this._rotate=false}}))}))}stat(e){const t=this._getFile();const r=n.join(this.dirname,t);i.stat(r,((i,n)=>{if(i&&i.code==="ENOENT"){h("ENOENT ok",r);this.filename=t;return e(null,0)}if(i){h(`err ${i.code} ${r}`);return e(i)}if(!n||this._needsNewFile(n.size)){return this._incFile((()=>this.stat(e)))}this.filename=t;e(null,n.size)}))}close(e){if(!this._stream){return}this._stream.end((()=>{if(e){e()}this.emit("flush");this.emit("closed")}))}_needsNewFile(e){e=e||this._size;return this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){e.on("error",this._onError);return e}_cleanupStream(e){e.removeListener("error",this._onError);e.destroy();return e}_rotateFile(){this._incFile((()=>this.open()))}_endStream(e=(()=>{})){if(this._dest){this._stream.unpipe(this._dest);this._dest.end((()=>{this._cleanupStream(this._dest);e()}))}else{e()}}_createStream(e){const t=n.join(this.dirname,this.filename);h("create stream start",t,this.options);const r=i.createWriteStream(t,this.options).on("error",(e=>h(e))).on("close",(()=>h("close",r.path,r.bytesWritten))).on("open",(()=>{h("file open ok",t);this.emit("open",t);e.pipe(r);if(this.rotatedWhileOpening){this._stream=new u;this._stream.setMaxListeners(30);this._rotateFile();this.rotatedWhileOpening=false;this._cleanupStream(r);e.end()}}));h("create stream ok",t);if(this.zippedArchive){const e=o.createGzip();e.pipe(r);return e}return r}_incFile(e){h("_incFile",this.filename);const t=n.extname(this._basename);const r=n.basename(this._basename,t);if(!this.tailable){this._created+=1;this._checkMaxFilesIncrementing(t,r,e)}else{this._checkMaxFilesTailable(t,r,e)}}_getFile(){const e=n.extname(this._basename);const t=n.basename(this._basename,e);const r=this.rotationFormat?this.rotationFormat():this._created;const i=!this.tailable&&this._created?`${t}${r}${e}`:`${t}${e}`;return this.zippedArchive&&!this.tailable?`${i}.gz`:i}_checkMaxFilesIncrementing(e,t,r){if(!this.maxFiles||this._created<this.maxFiles){return setImmediate(r)}const s=this._created-this.maxFiles;const o=s!==0?s:"";const a=this.zippedArchive?".gz":"";const l=`${t}${o}${e}${a}`;const u=n.join(this.dirname,l);i.unlink(u,r)}_checkMaxFilesTailable(e,t,r){const o=[];if(!this.maxFiles){return}const a=this.zippedArchive?".gz":"";for(let r=this.maxFiles-1;r>1;r--){o.push(function(r,s){let o=`${t}${r-1}${e}${a}`;const l=n.join(this.dirname,o);i.exists(l,(u=>{if(!u){return s(null)}o=`${t}${r}${e}${a}`;i.rename(l,n.join(this.dirname,o),s)}))}.bind(this,r))}s(o,(()=>{i.rename(n.join(this.dirname,`${t}${e}`),n.join(this.dirname,`${t}1${e}${a}`),r)}))}_createLogDirIfNotExist(e){if(!i.existsSync(e)){i.mkdirSync(e,{recursive:true})}}}},8028:(e,t,r)=>{"use strict";const i=r(3685);const n=r(5687);const{Stream:s}=r(1642);const o=r(7281);const a=r(7560);e.exports=class Http extends o{constructor(e={}){super(e);this.options=e;this.name=e.name||"http";this.ssl=!!e.ssl;this.host=e.host||"localhost";this.port=e.port;this.auth=e.auth;this.path=e.path||"";this.agent=e.agent;this.headers=e.headers||{};this.headers["content-type"]="application/json";this.batch=e.batch||false;this.batchInterval=e.batchInterval||5e3;this.batchCount=e.batchCount||10;this.batchOptions=[];this.batchTimeoutID=-1;this.batchCallback={};if(!this.port){this.port=this.ssl?443:80}}log(e,t){this._request(e,null,null,((t,r)=>{if(r&&r.statusCode!==200){t=new Error(`Invalid HTTP Status Code: ${r.statusCode}`)}if(t){this.emit("warn",t)}else{this.emit("logged",e)}}));if(t){setImmediate(t)}}query(e,t){if(typeof e==="function"){t=e;e={}}e={method:"query",params:this.normalizeQuery(e)};const r=e.params.auth||null;delete e.params.auth;const i=e.params.path||null;delete e.params.path;this._request(e,r,i,((e,r,i)=>{if(r&&r.statusCode!==200){e=new Error(`Invalid HTTP Status Code: ${r.statusCode}`)}if(e){return t(e)}if(typeof i==="string"){try{i=JSON.parse(i)}catch(e){return t(e)}}t(null,i)}))}stream(e={}){const t=new s;e={method:"stream",params:e};const r=e.params.path||null;delete e.params.path;const i=e.params.auth||null;delete e.params.auth;let n="";const o=this._request(e,i,r);t.destroy=()=>o.destroy();o.on("data",(e=>{e=(n+e).split(/\n+/);const r=e.length-1;let i=0;for(;i<r;i++){try{t.emit("log",JSON.parse(e[i]))}catch(e){t.emit("error",e)}}n=e[r]}));o.on("error",(e=>t.emit("error",e)));return t}_request(e,t,r,i){e=e||{};t=t||this.auth;r=r||this.path||"";if(this.batch){this._doBatch(e,i,t,r)}else{this._doRequest(e,i,t,r)}}_doBatch(e,t,r,i){this.batchOptions.push(e);if(this.batchOptions.length===1){const e=this;this.batchCallback=t;this.batchTimeoutID=setTimeout((function(){e.batchTimeoutID=-1;e._doBatchRequest(e.batchCallback,r,i)}),this.batchInterval)}if(this.batchOptions.length===this.batchCount){this._doBatchRequest(this.batchCallback,r,i)}}_doBatchRequest(e,t,r){if(this.batchTimeoutID>0){clearTimeout(this.batchTimeoutID);this.batchTimeoutID=-1}const i=this.batchOptions.slice();this.batchOptions=[];this._doRequest(i,e,t,r)}_doRequest(e,t,r,s){const o=Object.assign({},this.headers);if(r&&r.bearer){o.Authorization=`Bearer ${r.bearer}`}const l=(this.ssl?n:i).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${s.replace(/^\//,"")}`,headers:o,auth:r&&r.username&&r.password?`${r.username}:${r.password}`:"",agent:this.agent});l.on("error",t);l.on("response",(e=>e.on("end",(()=>t(null,e))).resume()));l.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}},7804:(e,t,r)=>{"use strict";Object.defineProperty(t,"Console",{configurable:true,enumerable:true,get(){return r(7501)}});Object.defineProperty(t,"File",{configurable:true,enumerable:true,get(){return r(2478)}});Object.defineProperty(t,"Http",{configurable:true,enumerable:true,get(){return r(8028)}});Object.defineProperty(t,"Stream",{configurable:true,enumerable:true,get(){return r(4747)}})},4747:(e,t,r)=>{"use strict";const i=r(1554);const{MESSAGE:n}=r(3937);const s=r(2037);const o=r(7281);e.exports=class Stream extends o{constructor(e={}){super(e);if(!e.stream||!i(e.stream)){throw new Error("options.stream is required.")}this._stream=e.stream;this._stream.setMaxListeners(Infinity);this.isObjectMode=e.stream._writableState.objectMode;this.eol=typeof e.eol==="string"?e.eol:s.EOL}log(e,t){setImmediate((()=>this.emit("logged",e)));if(this.isObjectMode){this._stream.write(e);if(t){t()}return}this._stream.write(`${e[n]}${this.eol}`);if(t){t()}return}}},9892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const i=r(3985);t.ZodIssueCode=i.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const quotelessJson=e=>{const t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")};t.quotelessJson=quotelessJson;class ZodError extends Error{constructor(e){super();this.issues=[];this.addIssue=e=>{this.issues=[...this.issues,e]};this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;if(Object.setPrototypeOf){Object.setPrototypeOf(this,t)}else{this.__proto__=t}this.name="ZodError";this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message};const r={_errors:[]};const processError=e=>{for(const i of e.issues){if(i.code==="invalid_union"){i.unionErrors.map(processError)}else if(i.code==="invalid_return_type"){processError(i.returnTypeError)}else if(i.code==="invalid_arguments"){processError(i.argumentsError)}else if(i.path.length===0){r._errors.push(t(i))}else{let e=r;let n=0;while(n<i.path.length){const r=i.path[n];const s=n===i.path.length-1;if(!s){e[r]=e[r]||{_errors:[]}}else{e[r]=e[r]||{_errors:[]};e[r]._errors.push(t(i))}e=e[r];n++}}}};processError(this);return r}toString(){return this.message}get message(){return JSON.stringify(this.issues,i.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(e=>e.message)){const t={};const r=[];for(const i of this.issues){if(i.path.length>0){t[i.path[0]]=t[i.path[0]]||[];t[i.path[0]].push(e(i))}else{r.push(e(i))}}return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=ZodError;ZodError.create=e=>{const t=new ZodError(e);return t}},9566:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const n=i(r(468));t.defaultErrorMap=n.default;let s=n.default;function setErrorMap(e){s=e}t.setErrorMap=setErrorMap;function getErrorMap(){return s}t.getErrorMap=getErrorMap},9906:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});n(r(9566),t);n(r(888),t);n(r(9449),t);n(r(3985),t);n(r(9335),t);n(r(9892),t)},2513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.errorUtil=void 0;var r;(function(e){e.errToObj=e=>typeof e==="string"?{message:e}:e||{};e.toString=e=>typeof e==="string"?e:e===null||e===void 0?void 0:e.message})(r=t.errorUtil||(t.errorUtil={}))},888:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const n=r(9566);const s=i(r(468));const makeIssue=e=>{const{data:t,path:r,errorMaps:i,issueData:n}=e;const s=[...r,...n.path||[]];const o={...n,path:s};let a="";const l=i.filter((e=>!!e)).slice().reverse();for(const e of l){a=e(o,{data:t,defaultError:a}).message}return{...n,path:s,message:n.message||a}};t.makeIssue=makeIssue;t.EMPTY_PATH=[];function addIssueToContext(e,r){const i=(0,t.makeIssue)({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,(0,n.getErrorMap)(),s.default].filter((e=>!!e))});e.common.issues.push(i)}t.addIssueToContext=addIssueToContext;class ParseStatus{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,r){const i=[];for(const n of r){if(n.status==="aborted")return t.INVALID;if(n.status==="dirty")e.dirty();i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,t){const r=[];for(const e of t){r.push({key:await e.key,value:await e.value})}return ParseStatus.mergeObjectSync(e,r)}static mergeObjectSync(e,r){const i={};for(const n of r){const{key:r,value:s}=n;if(r.status==="aborted")return t.INVALID;if(s.status==="aborted")return t.INVALID;if(r.status==="dirty")e.dirty();if(s.status==="dirty")e.dirty();if(typeof s.value!=="undefined"||n.alwaysSet){i[r.value]=s.value}}return{status:e.value,value:i}}}t.ParseStatus=ParseStatus;t.INVALID=Object.freeze({status:"aborted"});const DIRTY=e=>({status:"dirty",value:e});t.DIRTY=DIRTY;const OK=e=>({status:"valid",value:e});t.OK=OK;const isAborted=e=>e.status==="aborted";t.isAborted=isAborted;const isDirty=e=>e.status==="dirty";t.isDirty=isDirty;const isValid=e=>e.status==="valid";t.isValid=isValid;const isAsync=e=>typeof Promise!=="undefined"&&e instanceof Promise;t.isAsync=isAsync},9449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},3985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0;var r;(function(e){e.assertEqual=e=>e;function assertIs(e){}e.assertIs=assertIs;function assertNever(e){throw new Error}e.assertNever=assertNever;e.arrayToEnum=e=>{const t={};for(const r of e){t[r]=r}return t};e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>typeof t[t[e]]!=="number"));const i={};for(const e of r){i[e]=t[e]}return e.objectValues(i)};e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]}));e.objectKeys=typeof Object.keys==="function"?e=>Object.keys(e):e=>{const t=[];for(const r in e){if(Object.prototype.hasOwnProperty.call(e,r)){t.push(r)}}return t};e.find=(e,t)=>{for(const r of e){if(t(r))return r}return undefined};e.isInteger=typeof Number.isInteger==="function"?e=>Number.isInteger(e):e=>typeof e==="number"&&isFinite(e)&&Math.floor(e)===e;function joinValues(e,t=" | "){return e.map((e=>typeof e==="string"?`'${e}'`:e)).join(t)}e.joinValues=joinValues;e.jsonStringifyReplacer=(e,t)=>{if(typeof t==="bigint"){return t.toString()}return t}})(r=t.util||(t.util={}));var i;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(i=t.objectUtil||(t.objectUtil={}));t.ZodParsedType=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const getParsedType=e=>{const r=typeof e;switch(r){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":if(Array.isArray(e)){return t.ZodParsedType.array}if(e===null){return t.ZodParsedType.null}if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function"){return t.ZodParsedType.promise}if(typeof Map!=="undefined"&&e instanceof Map){return t.ZodParsedType.map}if(typeof Set!=="undefined"&&e instanceof Set){return t.ZodParsedType.set}if(typeof Date!=="undefined"&&e instanceof Date){return t.ZodParsedType.date}return t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=getParsedType},3301:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var o=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))i(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.z=void 0;const a=s(r(9906));t.z=a;o(r(9906),t);t["default"]=a},468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const i=r(3985);const n=r(9892);const errorMap=(e,t)=>{let r;switch(e.code){case n.ZodIssueCode.invalid_type:if(e.received===i.ZodParsedType.undefined){r="Required"}else{r=`Expected ${e.expected}, received ${e.received}`}break;case n.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,i.util.jsonStringifyReplacer)}`;break;case n.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${i.util.joinValues(e.keys,", ")}`;break;case n.ZodIssueCode.invalid_union:r=`Invalid input`;break;case n.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${i.util.joinValues(e.options)}`;break;case n.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${i.util.joinValues(e.options)}, received '${e.received}'`;break;case n.ZodIssueCode.invalid_arguments:r=`Invalid function arguments`;break;case n.ZodIssueCode.invalid_return_type:r=`Invalid function return type`;break;case n.ZodIssueCode.invalid_date:r=`Invalid date`;break;case n.ZodIssueCode.invalid_string:if(typeof e.validation==="object"){if("includes"in e.validation){r=`Invalid input: must include "${e.validation.includes}"`;if(typeof e.validation.position==="number"){r=`${r} at one or more positions greater than or equal to ${e.validation.position}`}}else if("startsWith"in e.validation){r=`Invalid input: must start with "${e.validation.startsWith}"`}else if("endsWith"in e.validation){r=`Invalid input: must end with "${e.validation.endsWith}"`}else{i.util.assertNever(e.validation)}}else if(e.validation!=="regex"){r=`Invalid ${e.validation}`}else{r="Invalid"}break;case n.ZodIssueCode.too_small:if(e.type==="array")r=`Array must contain ${e.exact?"exactly":e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?"exactly":e.inclusive?`at least`:`over`} ${e.minimum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`;else if(e.type==="date")r=`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`;else r="Invalid input";break;case n.ZodIssueCode.too_big:if(e.type==="array")r=`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`;else if(e.type==="string")r=`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`;else if(e.type==="number")r=`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`;else if(e.type==="bigint")r=`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`;else if(e.type==="date")r=`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`;else r="Invalid input";break;case n.ZodIssueCode.custom:r=`Invalid input`;break;case n.ZodIssueCode.invalid_intersection_types:r=`Intersection results could not be merged`;break;case n.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case n.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError;i.util.assertNever(e)}return{message:r}};t["default"]=errorMap},9335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.discriminatedUnion=t.date=t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.ZodType=void 0;t.NEVER=t["void"]=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t["null"]=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t["instanceof"]=t["function"]=t["enum"]=t.effect=void 0;const i=r(9566);const n=r(2513);const s=r(888);const o=r(3985);const a=r(9892);class ParseInputLazyPath{constructor(e,t,r,i){this._cachedPath=[];this.parent=e;this.data=t;this._path=r;this._key=i}get path(){if(!this._cachedPath.length){if(this._key instanceof Array){this._cachedPath.push(...this._path,...this._key)}else{this._cachedPath.push(...this._path,this._key)}}return this._cachedPath}}const handleResult=(e,t)=>{if((0,s.isValid)(t)){return{success:true,data:t.value}}else{if(!e.common.issues.length){throw new Error("Validation failed but no issues detected.")}return{success:false,get error(){if(this._error)return this._error;const t=new a.ZodError(e.common.issues);this._error=t;return this._error}}}};function processCreateParams(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i)){throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`)}if(t)return{errorMap:t,description:n};const customMap=(e,t)=>{if(e.code!=="invalid_type")return{message:t.defaultError};if(typeof t.data==="undefined"){return{message:i!==null&&i!==void 0?i:t.defaultError}}return{message:r!==null&&r!==void 0?r:t.defaultError}};return{errorMap:customMap,description:n}}class ZodType{constructor(e){this.spa=this.safeParseAsync;this._def=e;this.parse=this.parse.bind(this);this.safeParse=this.safeParse.bind(this);this.parseAsync=this.parseAsync.bind(this);this.safeParseAsync=this.safeParseAsync.bind(this);this.spa=this.spa.bind(this);this.refine=this.refine.bind(this);this.refinement=this.refinement.bind(this);this.superRefine=this.superRefine.bind(this);this.optional=this.optional.bind(this);this.nullable=this.nullable.bind(this);this.nullish=this.nullish.bind(this);this.array=this.array.bind(this);this.promise=this.promise.bind(this);this.or=this.or.bind(this);this.and=this.and.bind(this);this.transform=this.transform.bind(this);this.brand=this.brand.bind(this);this.default=this.default.bind(this);this.catch=this.catch.bind(this);this.describe=this.describe.bind(this);this.pipe=this.pipe.bind(this);this.isNullable=this.isNullable.bind(this);this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,o.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,o.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new s.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,o.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,s.isAsync)(t)){throw new Error("Synchronous parse encountered promise.")}return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const i={common:{issues:[],async:(r=t===null||t===void 0?void 0:t.async)!==null&&r!==void 0?r:false,contextualErrorMap:t===null||t===void 0?void 0:t.errorMap},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,o.getParsedType)(e)};const n=this._parseSync({data:e,path:i.path,parent:i});return handleResult(i,n)}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t===null||t===void 0?void 0:t.errorMap,async:true},path:(t===null||t===void 0?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,o.getParsedType)(e)};const i=this._parse({data:e,path:r.path,parent:r});const n=await((0,s.isAsync)(i)?i:Promise.resolve(i));return handleResult(r,n)}refine(e,t){const getIssueProperties=e=>{if(typeof t==="string"||typeof t==="undefined"){return{message:t}}else if(typeof t==="function"){return t(e)}else{return t}};return this._refinement(((t,r)=>{const i=e(t);const setError=()=>r.addIssue({code:a.ZodIssueCode.custom,...getIssueProperties(t)});if(typeof Promise!=="undefined"&&i instanceof Promise){return i.then((e=>{if(!e){setError();return false}else{return true}}))}if(!i){setError();return false}else{return true}}))}refinement(e,t){return this._refinement(((r,i)=>{if(!e(r)){i.addIssue(typeof t==="function"?t(r,i):t);return false}else{return true}}))}_refinement(e){return new ZodEffects({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e==="function"?e:()=>e;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new ZodBranded({typeName:y.ZodBranded,type:this,...processCreateParams(this._def)})}catch(e){const t=typeof e==="function"?e:()=>e;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}isOptional(){return this.safeParse(undefined).success}isNullable(){return this.safeParse(null).success}}t.ZodType=ZodType;t.Schema=ZodType;t.ZodSchema=ZodType;const l=/^c[^\s-]{8,}$/i;const u=/^[a-z][a-z0-9]*$/;const c=/[0-9A-HJKMNP-TV-Z]{26}/;const h=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;const d=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;const p=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u;const m=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;const g=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;const datetimeRegex=e=>{if(e.precision){if(e.offset){return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`)}else{return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`)}}else if(e.precision===0){if(e.offset){return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`)}else{return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`)}}else{if(e.offset){return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`)}else{return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`)}}};function isValidIP(e,t){if((t==="v4"||!t)&&m.test(e)){return true}if((t==="v6"||!t)&&g.test(e)){return true}return false}class ZodString extends ZodType{constructor(){super(...arguments);this._regex=(e,t,r)=>this.refinement((t=>e.test(t)),{validation:t,code:a.ZodIssueCode.invalid_string,...n.errorUtil.errToObj(r)});this.nonempty=e=>this.min(1,n.errorUtil.errToObj(e));this.trim=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]});this.toLowerCase=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]});this.toUpperCase=()=>new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce){e.data=String(e.data)}const t=this._getType(e);if(t!==o.ZodParsedType.string){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.string,received:t.parsedType});return s.INVALID}const r=new s.ParseStatus;let i=undefined;for(const t of this._def.checks){if(t.kind==="min"){if(e.data.length<t.value){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_small,minimum:t.value,type:"string",inclusive:true,exact:false,message:t.message});r.dirty()}}else if(t.kind==="max"){if(e.data.length>t.value){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_big,maximum:t.value,type:"string",inclusive:true,exact:false,message:t.message});r.dirty()}}else if(t.kind==="length"){const n=e.data.length>t.value;const o=e.data.length<t.value;if(n||o){i=this._getOrReturnCtx(e,i);if(n){(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_big,maximum:t.value,type:"string",inclusive:true,exact:true,message:t.message})}else if(o){(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_small,minimum:t.value,type:"string",inclusive:true,exact:true,message:t.message})}r.dirty()}}else if(t.kind==="email"){if(!d.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"email",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="emoji"){if(!p.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"emoji",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="uuid"){if(!h.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"uuid",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="cuid"){if(!l.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"cuid",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="cuid2"){if(!u.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"cuid2",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="ulid"){if(!c.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"ulid",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="url"){try{new URL(e.data)}catch(n){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"url",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="regex"){t.regex.lastIndex=0;const n=t.regex.test(e.data);if(!n){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"regex",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else if(t.kind==="trim"){e.data=e.data.trim()}else if(t.kind==="includes"){if(!e.data.includes(t.value,t.position)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.invalid_string,validation:{includes:t.value,position:t.position},message:t.message});r.dirty()}}else if(t.kind==="toLowerCase"){e.data=e.data.toLowerCase()}else if(t.kind==="toUpperCase"){e.data=e.data.toUpperCase()}else if(t.kind==="startsWith"){if(!e.data.startsWith(t.value)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.invalid_string,validation:{startsWith:t.value},message:t.message});r.dirty()}}else if(t.kind==="endsWith"){if(!e.data.endsWith(t.value)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.invalid_string,validation:{endsWith:t.value},message:t.message});r.dirty()}}else if(t.kind==="datetime"){const n=datetimeRegex(t);if(!n.test(e.data)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.invalid_string,validation:"datetime",message:t.message});r.dirty()}}else if(t.kind==="ip"){if(!isValidIP(e.data,t.version)){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{validation:"ip",code:a.ZodIssueCode.invalid_string,message:t.message});r.dirty()}}else{o.util.assertNever(t)}}return{status:r.value,value:e.data}}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errorUtil.errToObj(e)})}datetime(e){var t;if(typeof e==="string"){return this._addCheck({kind:"datetime",precision:null,offset:false,message:e})}return this._addCheck({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(t=e===null||e===void 0?void 0:e.offset)!==null&&t!==void 0?t:false,...n.errorUtil.errToObj(e===null||e===void 0?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t===null||t===void 0?void 0:t.position,...n.errorUtil.errToObj(t===null||t===void 0?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>e.kind==="datetime"))}get isEmail(){return!!this._def.checks.find((e=>e.kind==="email"))}get isURL(){return!!this._def.checks.find((e=>e.kind==="url"))}get isEmoji(){return!!this._def.checks.find((e=>e.kind==="emoji"))}get isUUID(){return!!this._def.checks.find((e=>e.kind==="uuid"))}get isCUID(){return!!this._def.checks.find((e=>e.kind==="cuid"))}get isCUID2(){return!!this._def.checks.find((e=>e.kind==="cuid2"))}get isULID(){return!!this._def.checks.find((e=>e.kind==="ulid"))}get isIP(){return!!this._def.checks.find((e=>e.kind==="ip"))}get minLength(){let e=null;for(const t of this._def.checks){if(t.kind==="min"){if(e===null||t.value>e)e=t.value}}return e}get maxLength(){let e=null;for(const t of this._def.checks){if(t.kind==="max"){if(e===null||t.value<e)e=t.value}}return e}}t.ZodString=ZodString;ZodString.create=e=>{var t;return new ZodString({checks:[],typeName:y.ZodString,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false,...processCreateParams(e)})};function floatSafeRemainder(e,t){const r=(e.toString().split(".")[1]||"").length;const i=(t.toString().split(".")[1]||"").length;const n=r>i?r:i;const s=parseInt(e.toFixed(n).replace(".",""));const o=parseInt(t.toFixed(n).replace(".",""));return s%o/Math.pow(10,n)}class ZodNumber extends ZodType{constructor(){super(...arguments);this.min=this.gte;this.max=this.lte;this.step=this.multipleOf}_parse(e){if(this._def.coerce){e.data=Number(e.data)}const t=this._getType(e);if(t!==o.ZodParsedType.number){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.number,received:t.parsedType});return s.INVALID}let r=undefined;const i=new s.ParseStatus;for(const t of this._def.checks){if(t.kind==="int"){if(!o.util.isInteger(e.data)){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:t.message});i.dirty()}}else if(t.kind==="min"){const n=t.inclusive?e.data<t.value:e.data<=t.value;if(n){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_small,minimum:t.value,type:"number",inclusive:t.inclusive,exact:false,message:t.message});i.dirty()}}else if(t.kind==="max"){const n=t.inclusive?e.data>t.value:e.data>=t.value;if(n){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_big,maximum:t.value,type:"number",inclusive:t.inclusive,exact:false,message:t.message});i.dirty()}}else if(t.kind==="multipleOf"){if(floatSafeRemainder(e.data,t.value)!==0){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.not_multiple_of,multipleOf:t.value,message:t.message});i.dirty()}}else if(t.kind==="finite"){if(!Number.isFinite(e.data)){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.not_finite,message:t.message});i.dirty()}}else{o.util.assertNever(t)}}return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,true,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,false,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,true,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,false,n.errorUtil.toString(t))}setLimit(e,t,r,i){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:n.errorUtil.toString(i)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:n.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:n.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks){if(t.kind==="min"){if(e===null||t.value>e)e=t.value}}return e}get maxValue(){let e=null;for(const t of this._def.checks){if(t.kind==="max"){if(e===null||t.value<e)e=t.value}}return e}get isInt(){return!!this._def.checks.find((e=>e.kind==="int"||e.kind==="multipleOf"&&o.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf"){return true}else if(r.kind==="min"){if(t===null||r.value>t)t=r.value}else if(r.kind==="max"){if(e===null||r.value<e)e=r.value}}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=ZodNumber;ZodNumber.create=e=>new ZodNumber({checks:[],typeName:y.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||false,...processCreateParams(e)});class ZodBigInt extends ZodType{constructor(){super(...arguments);this.min=this.gte;this.max=this.lte}_parse(e){if(this._def.coerce){e.data=BigInt(e.data)}const t=this._getType(e);if(t!==o.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.bigint,received:t.parsedType});return s.INVALID}let r=undefined;const i=new s.ParseStatus;for(const t of this._def.checks){if(t.kind==="min"){const n=t.inclusive?e.data<t.value:e.data<=t.value;if(n){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_small,type:"bigint",minimum:t.value,inclusive:t.inclusive,message:t.message});i.dirty()}}else if(t.kind==="max"){const n=t.inclusive?e.data>t.value:e.data>=t.value;if(n){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_big,type:"bigint",maximum:t.value,inclusive:t.inclusive,message:t.message});i.dirty()}}else if(t.kind==="multipleOf"){if(e.data%t.value!==BigInt(0)){r=this._getOrReturnCtx(e,r);(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.not_multiple_of,multipleOf:t.value,message:t.message});i.dirty()}}else{o.util.assertNever(t)}}return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,true,n.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,false,n.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,true,n.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,false,n.errorUtil.toString(t))}setLimit(e,t,r,i){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:n.errorUtil.toString(i)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:n.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:n.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:n.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:n.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks){if(t.kind==="min"){if(e===null||t.value>e)e=t.value}}return e}get maxValue(){let e=null;for(const t of this._def.checks){if(t.kind==="max"){if(e===null||t.value<e)e=t.value}}return e}}t.ZodBigInt=ZodBigInt;ZodBigInt.create=e=>{var t;return new ZodBigInt({checks:[],typeName:y.ZodBigInt,coerce:(t=e===null||e===void 0?void 0:e.coerce)!==null&&t!==void 0?t:false,...processCreateParams(e)})};class ZodBoolean extends ZodType{_parse(e){if(this._def.coerce){e.data=Boolean(e.data)}const t=this._getType(e);if(t!==o.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.boolean,received:t.parsedType});return s.INVALID}return(0,s.OK)(e.data)}}t.ZodBoolean=ZodBoolean;ZodBoolean.create=e=>new ZodBoolean({typeName:y.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||false,...processCreateParams(e)});class ZodDate extends ZodType{_parse(e){if(this._def.coerce){e.data=new Date(e.data)}const t=this._getType(e);if(t!==o.ZodParsedType.date){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.date,received:t.parsedType});return s.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_date});return s.INVALID}const r=new s.ParseStatus;let i=undefined;for(const t of this._def.checks){if(t.kind==="min"){if(e.data.getTime()<t.value){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_small,message:t.message,inclusive:true,exact:false,minimum:t.value,type:"date"});r.dirty()}}else if(t.kind==="max"){if(e.data.getTime()>t.value){i=this._getOrReturnCtx(e,i);(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.too_big,message:t.message,inclusive:true,exact:false,maximum:t.value,type:"date"});r.dirty()}}else{o.util.assertNever(t)}}return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks){if(t.kind==="min"){if(e===null||t.value>e)e=t.value}}return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks){if(t.kind==="max"){if(e===null||t.value<e)e=t.value}}return e!=null?new Date(e):null}}t.ZodDate=ZodDate;ZodDate.create=e=>new ZodDate({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||false,typeName:y.ZodDate,...processCreateParams(e)});class ZodSymbol extends ZodType{_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.symbol,received:t.parsedType});return s.INVALID}return(0,s.OK)(e.data)}}t.ZodSymbol=ZodSymbol;ZodSymbol.create=e=>new ZodSymbol({typeName:y.ZodSymbol,...processCreateParams(e)});class ZodUndefined extends ZodType{_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.undefined,received:t.parsedType});return s.INVALID}return(0,s.OK)(e.data)}}t.ZodUndefined=ZodUndefined;ZodUndefined.create=e=>new ZodUndefined({typeName:y.ZodUndefined,...processCreateParams(e)});class ZodNull extends ZodType{_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.null){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.null,received:t.parsedType});return s.INVALID}return(0,s.OK)(e.data)}}t.ZodNull=ZodNull;ZodNull.create=e=>new ZodNull({typeName:y.ZodNull,...processCreateParams(e)});class ZodAny extends ZodType{constructor(){super(...arguments);this._any=true}_parse(e){return(0,s.OK)(e.data)}}t.ZodAny=ZodAny;ZodAny.create=e=>new ZodAny({typeName:y.ZodAny,...processCreateParams(e)});class ZodUnknown extends ZodType{constructor(){super(...arguments);this._unknown=true}_parse(e){return(0,s.OK)(e.data)}}t.ZodUnknown=ZodUnknown;ZodUnknown.create=e=>new ZodUnknown({typeName:y.ZodUnknown,...processCreateParams(e)});class ZodNever extends ZodType{_parse(e){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.never,received:t.parsedType});return s.INVALID}}t.ZodNever=ZodNever;ZodNever.create=e=>new ZodNever({typeName:y.ZodNever,...processCreateParams(e)});class ZodVoid extends ZodType{_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.void,received:t.parsedType});return s.INVALID}return(0,s.OK)(e.data)}}t.ZodVoid=ZodVoid;ZodVoid.create=e=>new ZodVoid({typeName:y.ZodVoid,...processCreateParams(e)});class ZodArray extends ZodType{_parse(e){const{ctx:t,status:r}=this._processInputParams(e);const i=this._def;if(t.parsedType!==o.ZodParsedType.array){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:t.parsedType});return s.INVALID}if(i.exactLength!==null){const e=t.data.length>i.exactLength.value;const n=t.data.length<i.exactLength.value;if(e||n){(0,s.addIssueToContext)(t,{code:e?a.ZodIssueCode.too_big:a.ZodIssueCode.too_small,minimum:n?i.exactLength.value:undefined,maximum:e?i.exactLength.value:undefined,type:"array",inclusive:true,exact:true,message:i.exactLength.message});r.dirty()}}if(i.minLength!==null){if(t.data.length<i.minLength.value){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:true,exact:false,message:i.minLength.message});r.dirty()}}if(i.maxLength!==null){if(t.data.length>i.maxLength.value){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:true,exact:false,message:i.maxLength.message});r.dirty()}}if(t.common.async){return Promise.all([...t.data].map(((e,r)=>i.type._parseAsync(new ParseInputLazyPath(t,e,t.path,r))))).then((e=>s.ParseStatus.mergeArray(r,e)))}const n=[...t.data].map(((e,r)=>i.type._parseSync(new ParseInputLazyPath(t,e,t.path,r))));return s.ParseStatus.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:n.errorUtil.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:n.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}t.ZodArray=ZodArray;ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...processCreateParams(t)});function deepPartialify(e){if(e instanceof ZodObject){const t={};for(const r in e.shape){const i=e.shape[r];t[r]=ZodOptional.create(deepPartialify(i))}return new ZodObject({...e._def,shape:()=>t})}else if(e instanceof ZodArray){return new ZodArray({...e._def,type:deepPartialify(e.element)})}else if(e instanceof ZodOptional){return ZodOptional.create(deepPartialify(e.unwrap()))}else if(e instanceof ZodNullable){return ZodNullable.create(deepPartialify(e.unwrap()))}else if(e instanceof ZodTuple){return ZodTuple.create(e.items.map((e=>deepPartialify(e))))}else{return e}}class ZodObject extends ZodType{constructor(){super(...arguments);this._cached=null;this.nonstrict=this.passthrough;this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape();const t=o.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.object){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:t.parsedType});return s.INVALID}const{status:r,ctx:i}=this._processInputParams(e);const{shape:n,keys:l}=this._getCached();const u=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip")){for(const e in i.data){if(!l.includes(e)){u.push(e)}}}const c=[];for(const e of l){const t=n[e];const r=i.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new ParseInputLazyPath(i,r,i.path,e)),alwaysSet:e in i.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if(e==="passthrough"){for(const e of u){c.push({key:{status:"valid",value:e},value:{status:"valid",value:i.data[e]}})}}else if(e==="strict"){if(u.length>0){(0,s.addIssueToContext)(i,{code:a.ZodIssueCode.unrecognized_keys,keys:u});r.dirty()}}else if(e==="strip"){}else{throw new Error(`Internal ZodObject error: invalid unknownKeys value.`)}}else{const e=this._def.catchall;for(const t of u){const r=i.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new ParseInputLazyPath(i,r,i.path,t)),alwaysSet:t in i.data})}}if(i.common.async){return Promise.resolve().then((async()=>{const e=[];for(const t of c){const r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>s.ParseStatus.mergeObjectSync(r,e)))}else{return s.ParseStatus.mergeObjectSync(r,c)}}get shape(){return this._def.shape()}strict(e){n.errorUtil.errToObj;return new ZodObject({...this._def,unknownKeys:"strict",...e!==undefined?{errorMap:(t,r)=>{var i,s,o,a;const l=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,t,r).message)!==null&&o!==void 0?o:r.defaultError;if(t.code==="unrecognized_keys")return{message:(a=n.errorUtil.errToObj(e).message)!==null&&a!==void 0?a:l};return{message:l}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){const t=new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject});return t}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};o.util.objectKeys(e).forEach((r=>{if(e[r]&&this.shape[r]){t[r]=this.shape[r]}}));return new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};o.util.objectKeys(this.shape).forEach((r=>{if(!e[r]){t[r]=this.shape[r]}}));return new ZodObject({...this._def,shape:()=>t})}deepPartial(){return deepPartialify(this)}partial(e){const t={};o.util.objectKeys(this.shape).forEach((r=>{const i=this.shape[r];if(e&&!e[r]){t[r]=i}else{t[r]=i.optional()}}));return new ZodObject({...this._def,shape:()=>t})}required(e){const t={};o.util.objectKeys(this.shape).forEach((r=>{if(e&&!e[r]){t[r]=this.shape[r]}else{const e=this.shape[r];let i=e;while(i instanceof ZodOptional){i=i._def.innerType}t[r]=i}}));return new ZodObject({...this._def,shape:()=>t})}keyof(){return createZodEnum(o.util.objectKeys(this.shape))}}t.ZodObject=ZodObject;ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:y.ZodObject,...processCreateParams(t)});ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:y.ZodObject,...processCreateParams(t)});ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:y.ZodObject,...processCreateParams(t)});class ZodUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);const r=this._def.options;function handleResults(e){for(const t of e){if(t.result.status==="valid"){return t.result}}for(const r of e){if(r.result.status==="dirty"){t.common.issues.push(...r.ctx.common.issues);return r.result}}const r=e.map((e=>new a.ZodError(e.ctx.common.issues)));(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:r});return s.INVALID}if(t.common.async){return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then(handleResults)}else{let e=undefined;const i=[];for(const n of r){const r={...t,common:{...t.common,issues:[]},parent:null};const s=n._parseSync({data:t.data,path:t.path,parent:r});if(s.status==="valid"){return s}else if(s.status==="dirty"&&!e){e={result:s,ctx:r}}if(r.common.issues.length){i.push(r.common.issues)}}if(e){t.common.issues.push(...e.ctx.common.issues);return e.result}const n=i.map((e=>new a.ZodError(e)));(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union,unionErrors:n});return s.INVALID}}get options(){return this._def.options}}t.ZodUnion=ZodUnion;ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:y.ZodUnion,...processCreateParams(t)});const getDiscriminator=e=>{if(e instanceof ZodLazy){return getDiscriminator(e.schema)}else if(e instanceof ZodEffects){return getDiscriminator(e.innerType())}else if(e instanceof ZodLiteral){return[e.value]}else if(e instanceof ZodEnum){return e.options}else if(e instanceof ZodNativeEnum){return Object.keys(e.enum)}else if(e instanceof ZodDefault){return getDiscriminator(e._def.innerType)}else if(e instanceof ZodUndefined){return[undefined]}else if(e instanceof ZodNull){return[null]}else{return null}};class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.ZodParsedType.object){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:t.parsedType});return s.INVALID}const r=this.discriminator;const i=t.data[r];const n=this.optionsMap.get(i);if(!n){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]});return s.INVALID}if(t.common.async){return n._parseAsync({data:t.data,path:t.path,parent:t})}else{return n._parseSync({data:t.data,path:t.path,parent:t})}}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const i=new Map;for(const r of t){const t=getDiscriminator(r.shape[e]);if(!t){throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`)}for(const n of t){if(i.has(n)){throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`)}i.set(n,r)}}return new ZodDiscriminatedUnion({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...processCreateParams(r)})}}t.ZodDiscriminatedUnion=ZodDiscriminatedUnion;function mergeValues(e,t){const r=(0,o.getParsedType)(e);const i=(0,o.getParsedType)(t);if(e===t){return{valid:true,data:e}}else if(r===o.ZodParsedType.object&&i===o.ZodParsedType.object){const r=o.util.objectKeys(t);const i=o.util.objectKeys(e).filter((e=>r.indexOf(e)!==-1));const n={...e,...t};for(const r of i){const i=mergeValues(e[r],t[r]);if(!i.valid){return{valid:false}}n[r]=i.data}return{valid:true,data:n}}else if(r===o.ZodParsedType.array&&i===o.ZodParsedType.array){if(e.length!==t.length){return{valid:false}}const r=[];for(let i=0;i<e.length;i++){const n=e[i];const s=t[i];const o=mergeValues(n,s);if(!o.valid){return{valid:false}}r.push(o.data)}return{valid:true,data:r}}else if(r===o.ZodParsedType.date&&i===o.ZodParsedType.date&&+e===+t){return{valid:true,data:e}}else{return{valid:false}}}class ZodIntersection extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);const handleParsed=(e,i)=>{if((0,s.isAborted)(e)||(0,s.isAborted)(i)){return s.INVALID}const n=mergeValues(e.value,i.value);if(!n.valid){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_intersection_types});return s.INVALID}if((0,s.isDirty)(e)||(0,s.isDirty)(i)){t.dirty()}return{status:t.value,value:n.data}};if(r.common.async){return Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>handleParsed(e,t)))}else{return handleParsed(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}}t.ZodIntersection=ZodIntersection;ZodIntersection.create=(e,t,r)=>new ZodIntersection({left:e,right:t,typeName:y.ZodIntersection,...processCreateParams(r)});class ZodTuple extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==o.ZodParsedType.array){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.array,received:r.parsedType});return s.INVALID}if(r.data.length<this._def.items.length){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"});return s.INVALID}const i=this._def.rest;if(!i&&r.data.length>this._def.items.length){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"});t.dirty()}const n=[...r.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;if(!i)return null;return i._parse(new ParseInputLazyPath(r,e,r.path,t))})).filter((e=>!!e));if(r.common.async){return Promise.all(n).then((e=>s.ParseStatus.mergeArray(t,e)))}else{return s.ParseStatus.mergeArray(t,n)}}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}t.ZodTuple=ZodTuple;ZodTuple.create=(e,t)=>{if(!Array.isArray(e)){throw new Error("You must pass an array of schemas to z.tuple([ ... ])")}return new ZodTuple({items:e,typeName:y.ZodTuple,rest:null,...processCreateParams(t)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==o.ZodParsedType.object){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.object,received:r.parsedType});return s.INVALID}const i=[];const n=this._def.keyType;const l=this._def.valueType;for(const e in r.data){i.push({key:n._parse(new ParseInputLazyPath(r,e,r.path,e)),value:l._parse(new ParseInputLazyPath(r,r.data[e],r.path,e))})}if(r.common.async){return s.ParseStatus.mergeObjectAsync(t,i)}else{return s.ParseStatus.mergeObjectSync(t,i)}}get element(){return this._def.valueType}static create(e,t,r){if(t instanceof ZodType){return new ZodRecord({keyType:e,valueType:t,typeName:y.ZodRecord,...processCreateParams(r)})}return new ZodRecord({keyType:ZodString.create(),valueType:e,typeName:y.ZodRecord,...processCreateParams(t)})}}t.ZodRecord=ZodRecord;class ZodMap extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==o.ZodParsedType.map){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.map,received:r.parsedType});return s.INVALID}const i=this._def.keyType;const n=this._def.valueType;const l=[...r.data.entries()].map((([e,t],s)=>({key:i._parse(new ParseInputLazyPath(r,e,r.path,[s,"key"])),value:n._parse(new ParseInputLazyPath(r,t,r.path,[s,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of l){const i=await r.key;const n=await r.value;if(i.status==="aborted"||n.status==="aborted"){return s.INVALID}if(i.status==="dirty"||n.status==="dirty"){t.dirty()}e.set(i.value,n.value)}return{status:t.value,value:e}}))}else{const e=new Map;for(const r of l){const i=r.key;const n=r.value;if(i.status==="aborted"||n.status==="aborted"){return s.INVALID}if(i.status==="dirty"||n.status==="dirty"){t.dirty()}e.set(i.value,n.value)}return{status:t.value,value:e}}}}t.ZodMap=ZodMap;ZodMap.create=(e,t,r)=>new ZodMap({valueType:t,keyType:e,typeName:y.ZodMap,...processCreateParams(r)});class ZodSet extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==o.ZodParsedType.set){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.set,received:r.parsedType});return s.INVALID}const i=this._def;if(i.minSize!==null){if(r.data.size<i.minSize.value){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:true,exact:false,message:i.minSize.message});t.dirty()}}if(i.maxSize!==null){if(r.data.size>i.maxSize.value){(0,s.addIssueToContext)(r,{code:a.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:true,exact:false,message:i.maxSize.message});t.dirty()}}const n=this._def.valueType;function finalizeSet(e){const r=new Set;for(const i of e){if(i.status==="aborted")return s.INVALID;if(i.status==="dirty")t.dirty();r.add(i.value)}return{status:t.value,value:r}}const l=[...r.data.values()].map(((e,t)=>n._parse(new ParseInputLazyPath(r,e,r.path,t))));if(r.common.async){return Promise.all(l).then((e=>finalizeSet(e)))}else{return finalizeSet(l)}}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:n.errorUtil.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:n.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=ZodSet;ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:y.ZodSet,...processCreateParams(t)});class ZodFunction extends ZodType{constructor(){super(...arguments);this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.ZodParsedType.function){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.function,received:t.parsedType});return s.INVALID}function makeArgsIssue(e,r){return(0,s.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_arguments,argumentsError:r}})}function makeReturnsIssue(e,r){return(0,s.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,i.getErrorMap)(),i.defaultErrorMap].filter((e=>!!e)),issueData:{code:a.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const r={errorMap:t.common.contextualErrorMap};const n=t.data;if(this._def.returns instanceof ZodPromise){return(0,s.OK)((async(...e)=>{const t=new a.ZodError([]);const i=await this._def.args.parseAsync(e,r).catch((r=>{t.addIssue(makeArgsIssue(e,r));throw t}));const s=await n(...i);const o=await this._def.returns._def.type.parseAsync(s,r).catch((e=>{t.addIssue(makeReturnsIssue(s,e));throw t}));return o}))}else{return(0,s.OK)(((...e)=>{const t=this._def.args.safeParse(e,r);if(!t.success){throw new a.ZodError([makeArgsIssue(e,t.error)])}const i=n(...t.data);const s=this._def.returns.safeParse(i,r);if(!s.success){throw new a.ZodError([makeReturnsIssue(i,s.error)])}return s.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){const t=this.parse(e);return t}strictImplement(e){const t=this.parse(e);return t}static create(e,t,r){return new ZodFunction({args:e?e:ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:y.ZodFunction,...processCreateParams(r)})}}t.ZodFunction=ZodFunction;class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);const r=this._def.getter();return r._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=ZodLazy;ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:y.ZodLazy,...processCreateParams(t)});class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_literal,expected:this._def.value});return s.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}t.ZodLiteral=ZodLiteral;ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:y.ZodLiteral,...processCreateParams(t)});function createZodEnum(e,t){return new ZodEnum({values:e,typeName:y.ZodEnum,...processCreateParams(t)})}class ZodEnum extends ZodType{_parse(e){if(typeof e.data!=="string"){const t=this._getOrReturnCtx(e);const r=this._def.values;(0,s.addIssueToContext)(t,{expected:o.util.joinValues(r),received:t.parsedType,code:a.ZodIssueCode.invalid_type});return s.INVALID}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e);const r=this._def.values;(0,s.addIssueToContext)(t,{received:t.data,code:a.ZodIssueCode.invalid_enum_value,options:r});return s.INVALID}return(0,s.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values){e[t]=t}return e}get Values(){const e={};for(const t of this._def.values){e[t]=t}return e}get Enum(){const e={};for(const t of this._def.values){e[t]=t}return e}extract(e){return ZodEnum.create(e)}exclude(e){return ZodEnum.create(this.options.filter((t=>!e.includes(t))))}}t.ZodEnum=ZodEnum;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{_parse(e){const t=o.util.getValidEnumValues(this._def.values);const r=this._getOrReturnCtx(e);if(r.parsedType!==o.ZodParsedType.string&&r.parsedType!==o.ZodParsedType.number){const e=o.util.objectValues(t);(0,s.addIssueToContext)(r,{expected:o.util.joinValues(e),received:r.parsedType,code:a.ZodIssueCode.invalid_type});return s.INVALID}if(t.indexOf(e.data)===-1){const e=o.util.objectValues(t);(0,s.addIssueToContext)(r,{received:r.data,code:a.ZodIssueCode.invalid_enum_value,options:e});return s.INVALID}return(0,s.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=ZodNativeEnum;ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:y.ZodNativeEnum,...processCreateParams(t)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==o.ZodParsedType.promise&&t.common.async===false){(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.promise,received:t.parsedType});return s.INVALID}const r=t.parsedType===o.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,s.OK)(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=ZodPromise;ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:y.ZodPromise,...processCreateParams(t)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);const i=this._def.effect||null;if(i.type==="preprocess"){const e=i.transform(r.data);if(r.common.async){return Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r})))}else{return this._def.schema._parseSync({data:e,path:r.path,parent:r})}}const n={addIssue:e=>{(0,s.addIssueToContext)(r,e);if(e.fatal){t.abort()}else{t.dirty()}},get path(){return r.path}};n.addIssue=n.addIssue.bind(n);if(i.type==="refinement"){const executeRefinement=e=>{const t=i.refinement(e,n);if(r.common.async){return Promise.resolve(t)}if(t instanceof Promise){throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.")}return e};if(r.common.async===false){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(e.status==="aborted")return s.INVALID;if(e.status==="dirty")t.dirty();executeRefinement(e.value);return{status:t.value,value:e.value}}else{return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>{if(e.status==="aborted")return s.INVALID;if(e.status==="dirty")t.dirty();return executeRefinement(e.value).then((()=>({status:t.value,value:e.value})))}))}}if(i.type==="transform"){if(r.common.async===false){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!(0,s.isValid)(e))return e;const o=i.transform(e.value,n);if(o instanceof Promise){throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`)}return{status:t.value,value:o}}else{return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>{if(!(0,s.isValid)(e))return e;return Promise.resolve(i.transform(e.value,n)).then((e=>({status:t.value,value:e})))}))}}o.util.assertNever(i)}}t.ZodEffects=ZodEffects;t.ZodTransformer=ZodEffects;ZodEffects.create=(e,t,r)=>new ZodEffects({schema:e,typeName:y.ZodEffects,effect:t,...processCreateParams(r)});ZodEffects.createWithPreprocess=(e,t,r)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:y.ZodEffects,...processCreateParams(r)});class ZodOptional extends ZodType{_parse(e){const t=this._getType(e);if(t===o.ZodParsedType.undefined){return(0,s.OK)(undefined)}return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=ZodOptional;ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:y.ZodOptional,...processCreateParams(t)});class ZodNullable extends ZodType{_parse(e){const t=this._getType(e);if(t===o.ZodParsedType.null){return(0,s.OK)(null)}return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=ZodNullable;ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:y.ZodNullable,...processCreateParams(t)});class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;if(t.parsedType===o.ZodParsedType.undefined){r=this._def.defaultValue()}return this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=ZodDefault;ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:y.ZodDefault,defaultValue:typeof t.default==="function"?t.default:()=>t.default,...processCreateParams(t)});class ZodCatch extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);const r={...t,common:{...t.common,issues:[]}};const i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});if((0,s.isAsync)(i)){return i.then((e=>({status:"valid",value:e.status==="valid"?e.value:this._def.catchValue({get error(){return new a.ZodError(r.common.issues)},input:r.data})})))}else{return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new a.ZodError(r.common.issues)},input:r.data})}}}removeCatch(){return this._def.innerType}}t.ZodCatch=ZodCatch;ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:y.ZodCatch,catchValue:typeof t.catch==="function"?t.catch:()=>t.catch,...processCreateParams(t)});class ZodNaN extends ZodType{_parse(e){const t=this._getType(e);if(t!==o.ZodParsedType.nan){const t=this._getOrReturnCtx(e);(0,s.addIssueToContext)(t,{code:a.ZodIssueCode.invalid_type,expected:o.ZodParsedType.nan,received:t.parsedType});return s.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=ZodNaN;ZodNaN.create=e=>new ZodNaN({typeName:y.ZodNaN,...processCreateParams(e)});t.BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);const r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=ZodBranded;class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){const handleAsync=async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});if(e.status==="aborted")return s.INVALID;if(e.status==="dirty"){t.dirty();return(0,s.DIRTY)(e.value)}else{return this._def.out._parseAsync({data:e.value,path:r.path,parent:r})}};return handleAsync()}else{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});if(e.status==="aborted")return s.INVALID;if(e.status==="dirty"){t.dirty();return{status:"dirty",value:e.value}}else{return this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:y.ZodPipeline})}}t.ZodPipeline=ZodPipeline;const custom=(e,t={},r)=>{if(e)return ZodAny.create().superRefine(((i,n)=>{var s,o;if(!e(i)){const e=typeof t==="function"?t(i):typeof t==="string"?{message:t}:t;const a=(o=(s=e.fatal)!==null&&s!==void 0?s:r)!==null&&o!==void 0?o:true;const l=typeof e==="string"?{message:e}:e;n.addIssue({code:"custom",...l,fatal:a})}}));return ZodAny.create()};t.custom=custom;t.late={object:ZodObject.lazycreate};var y;(function(e){e["ZodString"]="ZodString";e["ZodNumber"]="ZodNumber";e["ZodNaN"]="ZodNaN";e["ZodBigInt"]="ZodBigInt";e["ZodBoolean"]="ZodBoolean";e["ZodDate"]="ZodDate";e["ZodSymbol"]="ZodSymbol";e["ZodUndefined"]="ZodUndefined";e["ZodNull"]="ZodNull";e["ZodAny"]="ZodAny";e["ZodUnknown"]="ZodUnknown";e["ZodNever"]="ZodNever";e["ZodVoid"]="ZodVoid";e["ZodArray"]="ZodArray";e["ZodObject"]="ZodObject";e["ZodUnion"]="ZodUnion";e["ZodDiscriminatedUnion"]="ZodDiscriminatedUnion";e["ZodIntersection"]="ZodIntersection";e["ZodTuple"]="ZodTuple";e["ZodRecord"]="ZodRecord";e["ZodMap"]="ZodMap";e["ZodSet"]="ZodSet";e["ZodFunction"]="ZodFunction";e["ZodLazy"]="ZodLazy";e["ZodLiteral"]="ZodLiteral";e["ZodEnum"]="ZodEnum";e["ZodEffects"]="ZodEffects";e["ZodNativeEnum"]="ZodNativeEnum";e["ZodOptional"]="ZodOptional";e["ZodNullable"]="ZodNullable";e["ZodDefault"]="ZodDefault";e["ZodCatch"]="ZodCatch";e["ZodPromise"]="ZodPromise";e["ZodBranded"]="ZodBranded";e["ZodPipeline"]="ZodPipeline"})(y=t.ZodFirstPartyTypeKind||(t.ZodFirstPartyTypeKind={}));class Class{constructor(...e){}}const instanceOfType=(e,r={message:`Input not instance of ${e.name}`})=>(0,t.custom)((t=>t instanceof e),r);t["instanceof"]=instanceOfType;const _=ZodString.create;t.string=_;const v=ZodNumber.create;t.number=v;const b=ZodNaN.create;t.nan=b;const x=ZodBigInt.create;t.bigint=x;const T=ZodBoolean.create;t.boolean=T;const w=ZodDate.create;t.date=w;const S=ZodSymbol.create;t.symbol=S;const E=ZodUndefined.create;t.undefined=E;const A=ZodNull.create;t["null"]=A;const C=ZodAny.create;t.any=C;const N=ZodUnknown.create;t.unknown=N;const O=ZodNever.create;t.never=O;const R=ZodVoid.create;t["void"]=R;const k=ZodArray.create;t.array=k;const P=ZodObject.create;t.object=P;const L=ZodObject.strictCreate;t.strictObject=L;const I=ZodUnion.create;t.union=I;const M=ZodDiscriminatedUnion.create;t.discriminatedUnion=M;const D=ZodIntersection.create;t.intersection=D;const F=ZodTuple.create;t.tuple=F;const j=ZodRecord.create;t.record=j;const B=ZodMap.create;t.map=B;const U=ZodSet.create;t.set=U;const H=ZodFunction.create;t["function"]=H;const z=ZodLazy.create;t.lazy=z;const K=ZodLiteral.create;t.literal=K;const V=ZodEnum.create;t["enum"]=V;const q=ZodNativeEnum.create;t.nativeEnum=q;const Z=ZodPromise.create;t.promise=Z;const G=ZodEffects.create;t.effect=G;t.transformer=G;const $=ZodOptional.create;t.optional=$;const W=ZodNullable.create;t.nullable=W;const Y=ZodEffects.createWithPreprocess;t.preprocess=Y;const J=ZodPipeline.create;t.pipeline=J;const ostring=()=>_().optional();t.ostring=ostring;const onumber=()=>v().optional();t.onumber=onumber;const oboolean=()=>T().optional();t.oboolean=oboolean;t.coerce={string:e=>ZodString.create({...e,coerce:true}),number:e=>ZodNumber.create({...e,coerce:true}),boolean:e=>ZodBoolean.create({...e,coerce:true}),bigint:e=>ZodBigInt.create({...e,coerce:true}),date:e=>ZodDate.create({...e,coerce:true})};t.NEVER=s.INVALID},3718:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getContructorABIFromSource=t.encodeContructorArguments=void 0;const a=o(r(9491));const l=r(3831);const u=s(r(4834));const encodeContructorArguments=(e,t)=>{if(t==null||t.length===0)return undefined;const r=new l.Interface(e);const i=r.encodeDeploy(t);return i.slice(2)};t.encodeContructorArguments=encodeContructorArguments;const getContructorABIFromSource=e=>{try{const t=u.parse(e);let r;u.visit(t,{FunctionDefinition:e=>{if(e.isConstructor)r=e}});(0,a.default)(r!=null,`Could not find constructor definition`);const i=[{type:"constructor",inputs:r.parameters.map((({typeName:e},t)=>{(0,a.default)(e!=null,`Missing a type definition for constructor parameter at position ${t}`);return{type:getTypeFromTypeName(e)}}))}];return i}catch(e){throw new Error(`Could not get an ABI from contract source: ${e}`)}};t.getContructorABIFromSource=getContructorABIFromSource;const getTypeFromTypeName=e=>{switch(e.type){case"ElementaryTypeName":return e.name;case"ArrayTypeName":return`${getTypeFromTypeName(e.baseTypeName)}[]`;default:throw new Error(`Only primitive and array types are currently supported when constructing ABI from contract source, got ${e.type}`)}}},6348:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseNetworksConfig=void 0;const n=r(2413);const s=i(r(9491));const o=r(8989);const a=i(r(8818));const parseNetworksConfig=(e,t)=>Object.entries(t!==null&&t!==void 0?t:{}).reduce(((t,[r,i])=>{if(i==null)return t;const l=i.apiUrl||getScanApiUrlFromEnv(r)||(0,n.getDefaultScanApiUrl)(r);(0,s.default)(l,o.COLORS.error`Missing scan API URL for network ${o.COLORS.default(r)}
|
|
20
|
-
|
|
21
|
-
Please provide the API URL:
|
|
22
|
-
|
|
23
|
-
- As an apiUrl config parameter in ${r} config
|
|
24
|
-
- As a SCAN_API_URL_${r} enviornment variable
|
|
25
|
-
- As a SCAN_API_URL_${normalizeNetworkName(r)} enviornment variable
|
|
26
|
-
`);const u=i.apiKey||getScanApiKeyFromEnv(r);if(!u){e.debug(`Could not find scan API key for network ${a.default.bold(r)}\n \nPlease provide the API key:\n\n- As an apiKey config parameter in ${r} config\n- As a SCAN_API_KEY_${r} enviornment variable\n- As a SCAN_API_KEY_${normalizeNetworkName(r)} enviornment variable`)}const c=i.browserUrl||getScanBrowserUrlFromEnv(r)||(0,n.tryGetScanBrowserUrlFromScanUrl)(l);if(!c){e.debug(`Could not find scan browser URL key for network ${a.default.bold(r)}\n\n Browser URL is used to display a link to the verified contract\n after successful verification.\n \n Please provide the browser URL:\n \n - As an browserUrl config parameter in ${r} config\n - As a SCAN_BROWSER_URL_${r} enviornment variable\n - As a SCAN_BROWSER_URL_${normalizeNetworkName(r)} enviornment variable`)}return{...t,[r]:{apiUrl:l,apiKey:u,browserUrl:c}}}),{});t.parseNetworksConfig=parseNetworksConfig;const getScanApiUrlFromEnv=e=>{var t,r;return((t=process.env[`SCAN_API_URL_${e}`])===null||t===void 0?void 0:t.trim())||((r=process.env[`SCAN_API_URL_${normalizeNetworkName(e)}`])===null||r===void 0?void 0:r.trim())};const getScanBrowserUrlFromEnv=e=>{var t,r;return((t=process.env[`SCAN_BROWSER_URL_${e}`])===null||t===void 0?void 0:t.trim())||((r=process.env[`SCAN_BROWSER_URL_${normalizeNetworkName(e)}`])===null||r===void 0?void 0:r.trim())};const getScanApiKeyFromEnv=e=>{var t,r;return((t=process.env[`SCAN_API_KEY_${e}`])===null||t===void 0?void 0:t.trim())||((r=process.env[`SCAN_API_KEY_${normalizeNetworkName(e)}`])===null||r===void 0?void 0:r.trim())};const normalizeNetworkName=e=>e.toUpperCase().replaceAll("-","_")},7364:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createVerification=void 0;const n=r(3301);const s=r(824);const o=i(r(2361));const a=i(r(1391));class Verification extends o.default{constructor(e,t){super();this.props=e;this.logger=t}async verify(){try{this.logger.verbose(`Submitting verification for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}`);const e=await this.__submit();this.logger.verbose(`Received response for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}`);this.logger.verbose(JSON.stringify(e));if(isAlreadyVerifiedResult(e.result)){return{alreadyVerified:true}}if(e.status!==1){throw new Error(`Verification failed with result "${e.result}", status ${e.status} (${e.message})`)}const t=e.result;if(t==null){throw new Error(`Missing GUID from the response: ${e}`)}return await this.__poll(t)}catch(e){throw new Error(`Verification error: ${e}`)}}async __submit(){const e=createVerificationRequest(this.props);return await(0,s.retry)((async()=>{const t=await submitRequest(this.props.apiUrl,e);if(isApiRateLimitedResult(t.result)){throw new Error(`API Rate limit has been exceeded`)}return t}),3,(async(e,t)=>{this.emit("retry",e,t);await(0,s.sleep)(2e3)}))}async __poll(e){while(true){this.emit("poll",e);const t=await checkGuid(this.props.apiUrl,e);if(t.status===1)return{alreadyVerified:false};if(isAlreadyVerifiedResult(t.result))return{alreadyVerified:true};if(isPendingResult(t.result)){await(0,s.sleep)(1e4);continue}if(isApiRateLimitedResult(t.result)){await(0,s.sleep)(1e4);continue}throw new Error(`Verification failed with result "${t.result}", status ${t.status} (${t.message})`)}}}const createVerification=(e,t)=>new Verification(e,t);t.createVerification=createVerification;const isPendingResult=e=>!!(e===null||e===void 0?void 0:e.match(/Pending/gi));const isAlreadyVerifiedResult=e=>!!(e===null||e===void 0?void 0:e.match(/already verified/gi));const isApiRateLimitedResult=e=>!!(e===null||e===void 0?void 0:e.match(/rate/));const submitRequest=async(e,t)=>{try{const r=await(0,a.default)(e,{method:"POST",form:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).json();return l.parse(r)}catch(e){throw new Error(`Failed to submit verification request: ${e}`)}};const checkGuid=async(e,t)=>{const r=new URL(e);r.searchParams.set("module","contract");r.searchParams.set("action","checkverifystatus");r.searchParams.set("guid",t);try{const e=await(0,a.default)(r).json();return l.parse(e)}catch(e){throw new Error(`Failed to check verification status: ${e}`)}};const createVerificationRequest=({apiKey:e,address:t,contractName:r,constructorArguments:i,compilerVersion:n,optimizerRuns:s=0,sourceCode:o,evmVersion:a,licenseType:l})=>{const u={action:"verifysourcecode",module:"contract",codeformat:"solidity-standard-json-input",contractaddress:t,contractname:r,compilerversion:`v${n}`,optimizationUsed:s>0?"1":"0",sourceCode:o};if(e!=null)u.apikey=e;if(s!=null)u.runs=String(s);if(i!=null)u.constructorArguements=i;if(a!=null)u.evmversion=a;if(l!=null)u.licenseType=String(l);return u};const l=n.z.object({status:n.z.coerce.number().nullish(),message:n.z.string().nullish(),result:n.z.string().nullish()})},8194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isFile=t.isDirectory=void 0;const i=r(7147);const isDirectory=e=>{try{return(0,i.lstatSync)(e).isDirectory()}catch(e){return false}};t.isDirectory=isDirectory;const isFile=e=>{try{return(0,i.lstatSync)(e).isFile()}catch(e){return false}};t.isFile=isFile},4963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.findLicenseType=t.LicenseType=void 0;var r;(function(e){e[e["None"]=1]="None";e[e["Unlicense"]=2]="Unlicense";e[e["MIT"]=3]="MIT";e[e["GNU-GPLv2"]=4]="GNU-GPLv2";e[e["GNU-GPLv3"]=5]="GNU-GPLv3";e[e["GNU-LGPLv2.1"]=6]="GNU-LGPLv2.1";e[e["GNU-LGPLv3"]=7]="GNU-LGPLv3";e[e["BSD-2-Clause"]=8]="BSD-2-Clause";e[e["BSD-3-Clause"]=9]="BSD-3-Clause";e[e["MPL-2.0"]=10]="MPL-2.0";e[e["OSL-3.0"]=11]="OSL-3.0";e[e["Apache-2.0"]=12]="Apache-2.0";e[e["GNU-AGPLv3"]=13]="GNU-AGPLv3";e[e["BUSL-1.1"]=14]="BUSL-1.1"})(r||(t.LicenseType=r={}));const findLicenseType=e=>{const t=e.match(/\/\/\s*SPDX-License-Identifier\:\s*(.*)\s*/i);const i=t===null||t===void 0?void 0:t[1];if(i==null)return r.None;if(!(i in r)){console.warn("Found unknown SPDX license identifier: %s",i)}return r[i]};t.findLicenseType=findLicenseType},8989:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.createRecordLogger=t.anonymizeValue=t.COLORS=t.createLogger=void 0;const n=i(r(8818));const s=i(r(4158));const createLogger=e=>s.default.createLogger({level:e,format:s.default.format.cli(),transports:[new s.default.transports.Console]});t.createLogger=createLogger;t.COLORS={default:n.default.white,error:n.default.red,success:n.default.green,palette:[n.default.magenta,n.default.cyan,n.default.yellow,n.default.blue,n.default.magentaBright,n.default.cyanBright,n.default.blueBright]};const anonymizeValue=e=>{const t=Math.min(Math.max(0,e.length-2),4);const r=e.length-t;const i=e.slice(0,t);const n=Array.from({length:r}).fill("*").join("");return`${i}${n}`};t.anonymizeValue=anonymizeValue;const createRecordLogger=(e,t="\t")=>r=>{e.info("");Object.entries(r).forEach((([r,i])=>{if(Array.isArray(i)){e.info(`${r}:`);i.forEach((r=>{e.info(`${t}\t- ${n.default.bold(formatLoggableValue(r))}`)}))}else{e.info(`${r}:${t}${n.default.bold(formatLoggableValue(i))}`)}}))};t.createRecordLogger=createRecordLogger;const formatLoggableValue=e=>{if(e==null)return"-";switch(typeof e){case"boolean":return e?o:a;default:return String(e)}};const o=t.COLORS.success`✓`;const a=t.COLORS.error`⚠`},824:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.retry=t.sleep=void 0;const n=i(r(9491));const sleep=e=>new Promise((t=>{setTimeout(t,e)}));t.sleep=sleep;const retry=async(e,t,r)=>{(0,n.default)(t>0,`Number of attempts for retry must be larger than 0, got ${t}`);for(let i=0;i<t-1;i++){try{return await e()}catch(e){await(r===null||r===void 0?void 0:r(e,i))}}return e()};t.retry=retry},2953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DeploymentSchema=t.MetadataSchema=t.MinimalAbiSchema=t.SourcesSchema=t.OptimizerSchema=void 0;const i=r(3301);t.OptimizerSchema=i.z.object({enabled:i.z.boolean().optional(),runs:i.z.number().optional()});t.SourcesSchema=i.z.record(i.z.string(),i.z.object({content:i.z.string()}));t.MinimalAbiSchema=i.z.array(i.z.record(i.z.string(),i.z.any()));t.MetadataSchema=i.z.object({language:i.z.string(),compiler:i.z.object({version:i.z.string()}),settings:i.z.object({compilationTarget:i.z.record(i.z.string(),i.z.string()),evmVersion:i.z.string(),optimizer:i.z.object({enabled:i.z.boolean().optional(),runs:i.z.number().optional()})}),sources:i.z.record(i.z.string(),i.z.object({content:i.z.string()}))});t.DeploymentSchema=i.z.object({address:i.z.string(),abi:t.MinimalAbiSchema,args:i.z.array(i.z.any()),solcInputHash:i.z.string(),metadata:i.z.string().transform(((e,t)=>{try{return JSON.parse(e)}catch(e){t.addIssue({code:"custom",message:"Invalid JSON"});return i.z.NEVER}})).pipe(t.MetadataSchema),bytecode:i.z.string(),deployedBytecode:i.z.string()})},2413:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.tryCreateScanContractUrl=t.tryGetScanBrowserUrlFromScanUrl=t.getDefaultScanApiUrl=void 0;const getDefaultScanApiUrl=e=>r.get(e);t.getDefaultScanApiUrl=getDefaultScanApiUrl;const tryGetScanBrowserUrlFromScanUrl=e=>{try{const t=new URL(e);if(!t.hostname.startsWith("api.")&&!t.hostname.startsWith("api-"))return undefined;t.hostname=t.hostname.replace(/^api[.-]/,"");t.pathname="/";return t.toString()}catch(e){return undefined}};t.tryGetScanBrowserUrlFromScanUrl=tryGetScanBrowserUrlFromScanUrl;const tryCreateScanContractUrl=(e,t)=>{try{const r=new URL(e);r.pathname=`/address/${t}`;return r.toString()}catch(e){return undefined}};t.tryCreateScanContractUrl=tryCreateScanContractUrl;const r=new Map([["avalanche","https://api.snowtrace.io/api"],["avalanche-mainnet","https://api.snowtrace.io/api"],["fuji","https://api-testnet.snowtrace.io/api"],["avalanche-testnet","https://api-testnet.snowtrace.io/api"],["arbitrum","https://api.arbiscan.io/api"],["arbitrum-goerli","https://api-goerli.arbiscan.io/api"],["bsc","https://api.bscscan.com/api"],["bsc-testnet","https://api-testnet.bscscan.com/api"],["ethereum","https://api.etherscan.io/api"],["ethereum-goerli","https://api-goerli.etherscan.io/api"],["goerli","https://api-goerli.etherscan.io/api"],["fantom","https://api.ftmscan.com/api"],["fantom-testnet","https://api-testnet.ftmscan.com/api"],["kava","https://kavascan.com/api"],["kava-mainnet","https://kavascan.com/api"],["kava-testnet","https://testnet.kavascan.com/api"],["polygon","https://api.polygonscan.com/api"],["mumbai","https://api-testnet.polygonscan.com/api"],["optimism","https://api-optimistic.etherscan.io/api"],["optimism-goerli","https://api-goerli-optimistic.etherscan.io/api"],["gnosis","https://api.gnosisscan.io/api"],["zkpolygon","https://api-zkevm.polygonscan.com/api"],["zkpolygon-mainnet","https://api-zkevm.polygonscan.com/api"],["base","https://api.basescan.org/api"],["base-mainnet","https://api.basescan.org/api"],["base-goerli","https://api-goerli.basescan.org/api"],["linea","https://api.lineascan.build/api"],["linea-mainnet","https://api.lineascan.build/api"],["zkconsensys","https://api.lineascan.build/api"],["zkconsensys-mainnet","https://api.lineascan.build/api"],["moonbeam","https://api-moonbeam.moonscan.io/api"],["moonbeam-testnet","https://api-moonbase.moonscan.io/api"]])},4367:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseFilterConfig=t.parsePathsConfig=void 0;const n=i(r(1017));const parsePathsConfig=e=>{var t;return{deployments:(t=e===null||e===void 0?void 0:e.deployments)!==null&&t!==void 0?t:n.default.resolve(process.cwd(),"deployments")}};t.parsePathsConfig=parsePathsConfig;const parseFilterConfig=e=>{if(e==null)return()=>true;switch(typeof e){case"boolean":return()=>e;case"string":return t=>t===e;case"function":return e;case"object":if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}if(e instanceof RegExp){return t=>e.test(t)}default:throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${e}`)}};t.parseFilterConfig=parseFilterConfig},2066:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.extractSolcInputFromMetadata=void 0;const extractSolcInputFromMetadata=e=>{const{compilationTarget:t,...r}=e.settings;const i=Object.entries(e.sources).reduce(((e,[t,r])=>({...e,[t]:{content:r.content}})),{});return{language:e.language,settings:r,sources:i}};t.extractSolcInputFromMetadata=extractSolcInputFromMetadata},8584:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.verifyTarget=t.verifyNonTarget=void 0;const n=r(6348);const s=r(1017);const o=r(4963);const a=r(7364);const l=i(r(8818));const u=r(8989);const c=r(2413);const h=r(2953);const d=r(2066);const p=r(3718);const m=r(4367);const g=r(8194);const y=r(7147);const verifyNonTarget=async(e,t)=>{const r=(0,n.parseNetworksConfig)(t,e.networks);const i=(0,m.parsePathsConfig)(e.paths);const a=(0,u.createRecordLogger)(t);const l=createVerifyAll(t);const c=createLogVerificationResult(a);const y=e.contracts.flatMap((e=>{var n;const{address:l,network:c,contractName:m,deployment:y}=e;t.info(`Collectiong information for contract ${m} on network ${c}`);const _=r[c];if(_==null){t.info(`No network configured for contract ${m} on network ${c}`);return[]}const v=`${(0,s.basename)(y,".json")}.json`;const b=(0,s.resolve)(i.deployments,c,v);if(!(0,g.isFile)(b)){t.error(u.COLORS.error`Deployment file ${b} does not exist or is not a file`);return[]}const x=require(b);const T=h.DeploymentSchema.safeParse(x);if(!T.success){t.error(u.COLORS.error`No network configured for contract ${m} on network ${c}`);return[]}const w=T.data;const S=(0,s.basename)(m,".sol");const E=w.metadata.sources[m];if(E==null){t.error(u.COLORS.error`Missing source for contract ${m} for network ${c} in ${v}`);return[]}const A=(0,o.findLicenseType)(E.content);const C=(0,p.getContructorABIFromSource)(E.content);const N=(0,p.encodeContructorArguments)(C,e.constructorArguments);const O=(0,d.extractSolcInputFromMetadata)(w.metadata);const R={apiUrl:_.apiUrl,apiKey:_.apiKey,address:l,contractName:`${m}:${S}`,constructorArguments:N,licenseType:A,compilerVersion:w.metadata.compiler.version,sourceCode:JSON.stringify(O),evmVersion:w.metadata.settings.evmVersion,optimizerRuns:(n=w.metadata.settings.optimizer)===null||n===void 0?void 0:n.runs};a({Contract:m,Network:c,Address:R.address,License:R.licenseType,Arguments:e.constructorArguments?JSON.stringify(e.constructorArguments):undefined,Sources:Object.keys(w.metadata.sources),"Scan URL":R.apiUrl,"Scan API Key":R.apiKey?(0,u.anonymizeValue)(R.apiKey):undefined});return[{networkName:c,networkConfig:_,submitProps:R}]}));if(y.length===0){t.warn("No contracts match the verification criteria, exiting");return[]}if(e.dryRun){t.debug("Dry run enabled, exiting");return[]}const _=await Promise.all(l(y));_.forEach(c);return _};t.verifyNonTarget=verifyNonTarget;const verifyTarget=async(e,t)=>{const r=(0,m.parseFilterConfig)(e.filter);const i=(0,n.parseNetworksConfig)(t,e.networks);const a=(0,m.parsePathsConfig)(e.paths);const l=(0,u.createRecordLogger)(t);const c=createVerifyAll(t);const _=createLogVerificationResult(l);if(!(0,g.isDirectory)(a.deployments)){throw new Error(`Path ${a.deployments} is not a directory`)}const v=new Set((0,y.readdirSync)(a.deployments));const b=Object.entries(i);t.debug("Verifying deployments for following networks:");b.forEach((([e,r])=>{t.debug(`\t\t- ${e} (API URL ${r.apiUrl})`)}));const x=b.flatMap((([e,i])=>{t.info(`Collecting deployments for ${e}...`);if(!v.has(e)){t.warn(`Could not find deployment for network ${e} in ${a.deployments}`);return[]}const n=(0,s.resolve)(a.deployments,e);const c=(0,y.readdirSync)(n).filter((e=>e.endsWith(".json")));return c.flatMap((a=>{t.info(`Inspecting deployment file ${a} on network ${e}`);const c=(0,s.resolve)(n,a);const m=require(c);const g=h.DeploymentSchema.safeParse(m);if(!g.success){throw new Error(`Error parsing deployment file ${a} on network ${e}: ${g.error}`)}const y=g.data;const _=(0,s.basename)(a,".json");const v=y.metadata.settings.compilationTarget;return Object.entries(v).flatMap((([n,s])=>{var c;const h=r(s,n,e);if(!h){t.debug(`Not verifying ${s} in ${a} on network ${e}`);return[]}const m=y.metadata.sources[n];if(m==null){t.error(u.COLORS.error`Could not find source for ${s} (${n})`);return[]}const g=(0,o.findLicenseType)(m.content);const _=(0,p.encodeContructorArguments)(y.abi,y.args);const v=(0,d.extractSolcInputFromMetadata)(y.metadata);const b={apiUrl:i.apiUrl,apiKey:i.apiKey,address:y.address,contractName:`${n}:${s}`,constructorArguments:_,licenseType:g,compilerVersion:y.metadata.compiler.version,sourceCode:JSON.stringify(v),evmVersion:y.metadata.settings.evmVersion,optimizerRuns:(c=y.metadata.settings.optimizer)===null||c===void 0?void 0:c.runs};l({Contract:s,Network:e,Address:y.address,License:b.licenseType,Arguments:JSON.stringify(y.args),Sources:Object.keys(y.metadata.sources),"Scan URL":b.apiUrl,"Scan API Key":b.apiKey?(0,u.anonymizeValue)(b.apiKey):undefined});return{submitProps:b,networkName:e,networkConfig:i}}))}))}));if(x.length===0){t.warn("No contracts match the verification criteria, exiting");return[]}if(e.dryRun){t.debug("Dry run enabled, exiting");return[]}const T=await Promise.all(c(x));T.forEach(_);return T};t.verifyTarget=verifyTarget;const createVerifyAll=e=>t=>t.map((async(r,i)=>{const{submitProps:n}=r;const s=u.COLORS.palette[i%u.COLORS.palette.length];const o=`[${i+1}/${t.length}]`;const c=l.default.bold(n.contractName);const h=l.default.bold(r.networkName);e.info(s`Verifying contract ${c} for network ${h} ${o}`);try{const t=(0,a.createVerification)(n,e);t.on("poll",(t=>{e.info(s`Polling for verification status of ${c} for network ${h} (GUID ${t}) ${o}`)}));t.on("retry",((t,r)=>{e.verbose(`Received an error: ${t}`);e.info(s`Retrying failed verification attempt of ${c} for network ${h} (attempt ${r+1}) ${o}`)}));const i=await t.verify();return{artifact:r,result:i}}catch(t){e.error(u.COLORS.error`Problem verifying contract ${c} for network ${h} ${o}: ${t} `);return{artifact:r,error:t}}}));const createLogVerificationResult=e=>({artifact:t,response:r,error:i})=>{const n=l.default.bold(t.submitProps.contractName);const s=l.default.bold(t.networkName);const o=t.networkConfig.browserUrl?(0,c.tryCreateScanContractUrl)(t.networkConfig.browserUrl,t.submitProps.address):undefined;e({Contract:n,Network:s,Result:i==null,"Was verified":r===null||r===void 0?void 0:r.alreadyVerified,"Contract URL":o,Error:i?u.COLORS.error(i):undefined})}},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},2081:e=>{"use strict";e.exports=require("child_process")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5158:e=>{"use strict";e.exports=require("http2")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},7282:e=>{"use strict";e.exports=require("process")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},4404:e=>{"use strict";e.exports=require("tls")},6224:e=>{"use strict";e.exports=require("tty")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},4379:(e,t,r)=>{const{Argument:i}=r(9414);const{Command:n}=r(552);const{CommanderError:s,InvalidArgumentError:o}=r(2625);const{Help:a}=r(5153);const{Option:l}=r(6558);t=e.exports=new n;t.program=t;t.Argument=i;t.Command=n;t.CommanderError=s;t.Help=a;t.InvalidArgumentError=o;t.InvalidOptionArgumentError=o;t.Option=l},9414:(e,t,r)=>{const{InvalidArgumentError:i}=r(2625);class Argument{constructor(e,t){this.description=t||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(e[0]){case"<":this.required=true;this._name=e.slice(1,-1);break;case"[":this.required=false;this._name=e.slice(1,-1);break;default:this.required=true;this._name=e;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}argParser(e){this.parseArg=e;return this}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(e){const t=e.name()+(e.variadic===true?"...":"");return e.required?"<"+t+">":"["+t+"]"}t.Argument=Argument;t.humanReadableArgName=humanReadableArgName},552:(e,t,r)=>{const i=r(2361).EventEmitter;const n=r(2081);const s=r(1017);const o=r(7147);const a=r(7282);const{Argument:l,humanReadableArgName:u}=r(9414);const{CommanderError:c}=r(2625);const{Help:h}=r(5153);const{Option:d,splitOptionFlags:p,DualOptions:m}=r(6558);const{suggestSimilar:g}=r(7592);class Command extends i{constructor(e){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this._args=[];this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=e||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:e=>a.stdout.write(e),writeErr:e=>a.stderr.write(e),getOutHelpWidth:()=>a.stdout.isTTY?a.stdout.columns:undefined,getErrHelpWidth:()=>a.stderr.isTTY?a.stderr.columns:undefined,outputError:(e,t)=>t(e)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}copyInheritedSettings(e){this._outputConfiguration=e._outputConfiguration;this._hasHelpOption=e._hasHelpOption;this._helpFlags=e._helpFlags;this._helpDescription=e._helpDescription;this._helpShortFlag=e._helpShortFlag;this._helpLongFlag=e._helpLongFlag;this._helpCommandName=e._helpCommandName;this._helpCommandnameAndArgs=e._helpCommandnameAndArgs;this._helpCommandDescription=e._helpCommandDescription;this._helpConfiguration=e._helpConfiguration;this._exitCallback=e._exitCallback;this._storeOptionsAsProperties=e._storeOptionsAsProperties;this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue;this._allowExcessArguments=e._allowExcessArguments;this._enablePositionalOptions=e._enablePositionalOptions;this._showHelpAfterError=e._showHelpAfterError;this._showSuggestionAfterError=e._showSuggestionAfterError;return this}command(e,t,r){let i=t;let n=r;if(typeof i==="object"&&i!==null){n=i;i=null}n=n||{};const[,s,o]=e.match(/([^ ]+) *(.*)/);const a=this.createCommand(s);if(i){a.description(i);a._executableHandler=true}if(n.isDefault)this._defaultCommandName=a._name;a._hidden=!!(n.noHelp||n.hidden);a._executableFile=n.executableFile||null;if(o)a.arguments(o);this.commands.push(a);a.parent=this;a.copyInheritedSettings(this);if(i)return this;return a}createCommand(e){return new Command(e)}createHelp(){return Object.assign(new h,this.configureHelp())}configureHelp(e){if(e===undefined)return this._helpConfiguration;this._helpConfiguration=e;return this}configureOutput(e){if(e===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,e);return this}showHelpAfterError(e=true){if(typeof e!=="string")e=!!e;this._showHelpAfterError=e;return this}showSuggestionAfterError(e=true){this._showSuggestionAfterError=!!e;return this}addCommand(e,t){if(!e._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}t=t||{};if(t.isDefault)this._defaultCommandName=e._name;if(t.noHelp||t.hidden)e._hidden=true;this.commands.push(e);e.parent=this;return this}createArgument(e,t){return new l(e,t)}argument(e,t,r,i){const n=this.createArgument(e,t);if(typeof r==="function"){n.default(i).argParser(r)}else{n.default(r)}this.addArgument(n);return this}arguments(e){e.trim().split(/ +/).forEach((e=>{this.argument(e)}));return this}addArgument(e){const t=this._args.slice(-1)[0];if(t&&t.variadic){throw new Error(`only the last argument can be variadic '${t.name()}'`)}if(e.required&&e.defaultValue!==undefined&&e.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${e.name()}'`)}this._args.push(e);return this}addHelpCommand(e,t){if(e===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof e==="string"){this._helpCommandName=e.split(" ")[0];this._helpCommandnameAndArgs=e}this._helpCommandDescription=t||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}hook(e,t){const r=["preSubcommand","preAction","postAction"];if(!r.includes(e)){throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${r.join("', '")}'`)}if(this._lifeCycleHooks[e]){this._lifeCycleHooks[e].push(t)}else{this._lifeCycleHooks[e]=[t]}return this}exitOverride(e){if(e){this._exitCallback=e}else{this._exitCallback=e=>{if(e.code!=="commander.executeSubCommandAsync"){throw e}else{}}}return this}_exit(e,t,r){if(this._exitCallback){this._exitCallback(new c(e,t,r))}a.exit(e)}action(e){const listener=t=>{const r=this._args.length;const i=t.slice(0,r);if(this._storeOptionsAsProperties){i[r]=this}else{i[r]=this.opts()}i.push(this);return e.apply(this,i)};this._actionHandler=listener;return this}createOption(e,t){return new d(e,t)}addOption(e){const t=e.name();const r=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");if(!this._findOption(t)){this.setOptionValueWithSource(r,e.defaultValue===undefined?true:e.defaultValue,"default")}}else if(e.defaultValue!==undefined){this.setOptionValueWithSource(r,e.defaultValue,"default")}this.options.push(e);const handleOptionValue=(t,i,n)=>{if(t==null&&e.presetArg!==undefined){t=e.presetArg}const s=this.getOptionValue(r);if(t!==null&&e.parseArg){try{t=e.parseArg(t,s)}catch(e){if(e.code==="commander.invalidArgument"){const t=`${i} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}else if(t!==null&&e.variadic){t=e._concatValue(t,s)}if(t==null){if(e.negate){t=false}else if(e.isBoolean()||e.optional){t=true}else{t=""}}this.setOptionValueWithSource(r,t,n)};this.on("option:"+t,(t=>{const r=`error: option '${e.flags}' argument '${t}' is invalid.`;handleOptionValue(t,r,"cli")}));if(e.envVar){this.on("optionEnv:"+t,(t=>{const r=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;handleOptionValue(t,r,"env")}))}return this}_optionEx(e,t,r,i,n){if(typeof t==="object"&&t instanceof d){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const s=this.createOption(t,r);s.makeOptionMandatory(!!e.mandatory);if(typeof i==="function"){s.default(n).argParser(i)}else if(i instanceof RegExp){const e=i;i=(t,r)=>{const i=e.exec(t);return i?i[0]:r};s.default(n).argParser(i)}else{s.default(i)}return this.addOption(s)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:true},e,t,r,i)}combineFlagAndOptionalValue(e=true){this._combineFlagAndOptionalValue=!!e;return this}allowUnknownOption(e=true){this._allowUnknownOption=!!e;return this}allowExcessArguments(e=true){this._allowExcessArguments=!!e;return this}enablePositionalOptions(e=true){this._enablePositionalOptions=!!e;return this}passThroughOptions(e=true){this._passThroughOptions=!!e;if(!!this.parent&&e&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(e=true){this._storeOptionsAsProperties=!!e;if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}return this}getOptionValue(e){if(this._storeOptionsAsProperties){return this[e]}return this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,undefined)}setOptionValueWithSource(e,t,r){if(this._storeOptionsAsProperties){this[e]=t}else{this._optionValues[e]=t}this._optionValueSources[e]=r;return this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;getCommandAndParents(this).forEach((r=>{if(r.getOptionValueSource(e)!==undefined){t=r.getOptionValueSource(e)}}));return t}_prepareUserArgs(e,t){if(e!==undefined&&!Array.isArray(e)){throw new Error("first parameter to parse must be array or undefined")}t=t||{};if(e===undefined){e=a.argv;if(a.versions&&a.versions.electron){t.from="electron"}}this.rawArgs=e.slice();let r;switch(t.from){case undefined:case"node":this._scriptPath=e[1];r=e.slice(2);break;case"electron":if(a.defaultApp){this._scriptPath=e[1];r=e.slice(2)}else{r=e.slice(1)}break;case"user":r=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return r}parse(e,t){const r=this._prepareUserArgs(e,t);this._parseCommand([],r);return this}async parseAsync(e,t){const r=this._prepareUserArgs(e,t);await this._parseCommand([],r);return this}_executeSubCommand(e,t){t=t.slice();let r=false;const i=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(e,t){const r=s.resolve(e,t);if(o.existsSync(r))return r;if(i.includes(s.extname(t)))return undefined;const n=i.find((e=>o.existsSync(`${r}${e}`)));if(n)return`${r}${n}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let l=e._executableFile||`${this._name}-${e._name}`;let u=this._executableDir||"";if(this._scriptPath){let e;try{e=o.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}u=s.resolve(s.dirname(e),u)}if(u){let t=findFile(u,l);if(!t&&!e._executableFile&&this._scriptPath){const r=s.basename(this._scriptPath,s.extname(this._scriptPath));if(r!==this._name){t=findFile(u,`${r}-${e._name}`)}}l=t||l}r=i.includes(s.extname(l));let h;if(a.platform!=="win32"){if(r){t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);h=n.spawn(a.argv[0],t,{stdio:"inherit"})}else{h=n.spawn(l,t,{stdio:"inherit"})}}else{t.unshift(l);t=incrementNodeInspectorPort(a.execArgv).concat(t);h=n.spawn(a.execPath,t,{stdio:"inherit"})}if(!h.killed){const e=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];e.forEach((e=>{a.on(e,(()=>{if(h.killed===false&&h.exitCode===null){h.kill(e)}}))}))}const d=this._exitCallback;if(!d){h.on("close",a.exit.bind(a))}else{h.on("close",(()=>{d(new c(a.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}h.on("error",(t=>{if(t.code==="ENOENT"){const t=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const r=`'${l}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(r)}else if(t.code==="EACCES"){throw new Error(`'${l}' not executable`)}if(!d){a.exit(1)}else{const e=new c(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t;d(e)}}));this.runningCommand=h}_dispatchSubcommand(e,t,r){const i=this._findCommand(e);if(!i)this.help({error:true});let n;n=this._chainOrCallSubCommandHook(n,i,"preSubcommand");n=this._chainOrCall(n,(()=>{if(i._executableHandler){this._executeSubCommand(i,t.concat(r))}else{return i._parseCommand(t,r)}}));return n}_dispatchHelpCommand(e){if(!e){this.help()}const t=this._findCommand(e);if(t&&!t._executableHandler){t.help()}return this._dispatchSubcommand(e,[],[this._helpLongFlag])}_checkNumberOfArguments(){this._args.forEach(((e,t)=>{if(e.required&&this.args[t]==null){this.missingArgument(e.name())}}));if(this._args.length>0&&this._args[this._args.length-1].variadic){return}if(this.args.length>this._args.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(e,t,r)=>{let i=t;if(t!==null&&e.parseArg){try{i=e.parseArg(t,r)}catch(r){if(r.code==="commander.invalidArgument"){const i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'. ${r.message}`;this.error(i,{exitCode:r.exitCode,code:r.code})}throw r}}return i};this._checkNumberOfArguments();const e=[];this._args.forEach(((t,r)=>{let i=t.defaultValue;if(t.variadic){if(r<this.args.length){i=this.args.slice(r);if(t.parseArg){i=i.reduce(((e,r)=>myParseArg(t,r,e)),t.defaultValue)}}else if(i===undefined){i=[]}}else if(r<this.args.length){i=this.args[r];if(t.parseArg){i=myParseArg(t,i,t.defaultValue)}}e[r]=i}));this.processedArgs=e}_chainOrCall(e,t){if(e&&e.then&&typeof e.then==="function"){return e.then((()=>t()))}return t()}_chainOrCallHooks(e,t){let r=e;const i=[];getCommandAndParents(this).reverse().filter((e=>e._lifeCycleHooks[t]!==undefined)).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{i.push({hookedCommand:e,callback:t})}))}));if(t==="postAction"){i.reverse()}i.forEach((e=>{r=this._chainOrCall(r,(()=>e.callback(e.hookedCommand,this)))}));return r}_chainOrCallSubCommandHook(e,t,r){let i=e;if(this._lifeCycleHooks[r]!==undefined){this._lifeCycleHooks[r].forEach((e=>{i=this._chainOrCall(i,(()=>e(this,t)))}))}return i}_parseCommand(e,t){const r=this.parseOptions(t);this._parseOptionsEnv();this._parseOptionsImplied();e=e.concat(r.operands);t=r.unknown;this.args=e.concat(t);if(e&&this._findCommand(e[0])){return this._dispatchSubcommand(e[0],e.slice(1),t)}if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName){return this._dispatchHelpCommand(e[1])}if(this._defaultCommandName){outputHelpIfRequested(this,t);return this._dispatchSubcommand(this._defaultCommandName,e,t)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,r.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(r.unknown.length>0){this.unknownOption(r.unknown[0])}};const i=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let r;r=this._chainOrCallHooks(r,"preAction");r=this._chainOrCall(r,(()=>this._actionHandler(this.processedArgs)));if(this.parent){r=this._chainOrCall(r,(()=>{this.parent.emit(i,e,t)}))}r=this._chainOrCallHooks(r,"postAction");return r}if(this.parent&&this.parent.listenerCount(i)){checkForUnknownOptions();this._processArguments();this.parent.emit(i,e,t)}else if(e.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",e,t)}if(this.listenerCount("command:*")){this.emit("command:*",e,t)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(e){if(!e)return undefined;return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent){e.options.forEach((t=>{if(t.mandatory&&e.getOptionValue(t.attributeName())===undefined){e.missingMandatoryOptionValue(t)}}))}}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();if(this.getOptionValue(t)===undefined){return false}return this.getOptionValueSource(t)!=="default"}));const t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const r=e.find((e=>t.conflictsWith.includes(e.attributeName())));if(r){this._conflictingOption(t,r)}}))}_checkForConflictingOptions(){for(let e=this;e;e=e.parent){e._checkForConflictingLocalOptions()}}parseOptions(e){const t=[];const r=[];let i=t;const n=e.slice();function maybeOption(e){return e.length>1&&e[0]==="-"}let s=null;while(n.length){const e=n.shift();if(e==="--"){if(i===r)i.push(e);i.push(...n);break}if(s&&!maybeOption(e)){this.emit(`option:${s.name()}`,e);continue}s=null;if(maybeOption(e)){const t=this._findOption(e);if(t){if(t.required){const e=n.shift();if(e===undefined)this.optionMissingArgument(t);this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;if(n.length>0&&!maybeOption(n[0])){e=n.shift()}this.emit(`option:${t.name()}`,e)}else{this.emit(`option:${t.name()}`)}s=t.variadic?t:null;continue}}if(e.length>2&&e[0]==="-"&&e[1]!=="-"){const t=this._findOption(`-${e[1]}`);if(t){if(t.required||t.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${t.name()}`,e.slice(2))}else{this.emit(`option:${t.name()}`);n.unshift(`-${e.slice(2)}`)}continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("=");const r=this._findOption(e.slice(0,t));if(r&&(r.required||r.optional)){this.emit(`option:${r.name()}`,e.slice(t+1));continue}}if(maybeOption(e)){i=r}if((this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(e)){t.push(e);if(n.length>0)r.push(...n);break}else if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e);if(n.length>0)t.push(...n);break}else if(this._defaultCommandName){r.push(e);if(n.length>0)r.push(...n);break}}if(this._passThroughOptions){i.push(e);if(n.length>0)i.push(...n);break}i.push(e)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){const e={};const t=this.options.length;for(let r=0;r<t;r++){const t=this.options[r].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return getCommandAndParents(this).reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const r=t||{};const i=r.exitCode||1;const n=r.code||"commander.error";this._exit(i,n,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in a.env){const t=e.attributeName();if(this.getOptionValue(t)===undefined||["default","config","env"].includes(this.getOptionValueSource(t))){if(e.required||e.optional){this.emit(`optionEnv:${e.name()}`,a.env[e.envVar])}else{this.emit(`optionEnv:${e.name()}`)}}}}))}_parseOptionsImplied(){const e=new m(this.options);const hasCustomOptionValue=e=>this.getOptionValue(e)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((t=>t.implied!==undefined&&hasCustomOptionValue(t.attributeName())&&e.valueFromOption(this.getOptionValue(t.attributeName()),t))).forEach((e=>{Object.keys(e.implied).filter((e=>!hasCustomOptionValue(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const findBestOptionFromValue=e=>{const t=e.attributeName();const r=this.getOptionValue(t);const i=this.options.find((e=>e.negate&&t===e.attributeName()));const n=this.options.find((e=>!e.negate&&t===e.attributeName()));if(i&&(i.presetArg===undefined&&r===false||i.presetArg!==undefined&&r===i.presetArg)){return i}return n||e};const getErrorMessage=e=>{const t=findBestOptionFromValue(e);const r=t.attributeName();const i=this.getOptionValueSource(r);if(i==="env"){return`environment variable '${t.envVar}'`}return`option '${t.flags}'`};const r=`error: ${getErrorMessage(e)} cannot be used with ${getErrorMessage(t)}`;this.error(r,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[];let i=this;do{const e=i.createHelp().visibleOptions(i).filter((e=>e.long)).map((e=>e.long));r=r.concat(e);i=i.parent}while(i&&!i._enablePositionalOptions);t=g(e,r)}const r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this._args.length;const r=t===1?"":"s";const i=this.parent?` for '${this.name()}'`:"";const n=`error: too many arguments${i}. Expected ${t} argument${r} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const r=[];this.createHelp().visibleCommands(this).forEach((e=>{r.push(e.name());if(e.alias())r.push(e.alias())}));t=g(e,r)}const r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===undefined)return this._version;this._version=e;t=t||"-V, --version";r=r||"output the version number";const i=this.createOption(t,r);this._versionOptionName=i.attributeName();this.options.push(i);this.on("option:"+i.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`);this._exit(0,"commander.version",e)}));return this}description(e,t){if(e===undefined&&t===undefined)return this._description;this._description=e;if(t){this._argsDescription=t}return this}summary(e){if(e===undefined)return this._summary;this._summary=e;return this}alias(e){if(e===undefined)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){t=this.commands[this.commands.length-1]}if(e===t._name)throw new Error("Command alias can't be the same as its name");t._aliases.push(e);return this}aliases(e){if(e===undefined)return this._aliases;e.forEach((e=>this.alias(e)));return this}usage(e){if(e===undefined){if(this._usage)return this._usage;const e=this._args.map((e=>u(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?e:[]).join(" ")}this._usage=e;return this}name(e){if(e===undefined)return this._name;this._name=e;return this}nameFromFilename(e){this._name=s.basename(e,s.extname(e));return this}executableDir(e){if(e===undefined)return this._executableDir;this._executableDir=e;return this}helpInformation(e){const t=this.createHelp();if(t.helpWidth===undefined){t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return t.formatHelp(this,t)}_getHelpContext(e){e=e||{};const t={error:!!e.error};let r;if(t.error){r=e=>this._outputConfiguration.writeErr(e)}else{r=e=>this._outputConfiguration.writeOut(e)}t.write=e.write||r;t.command=this;return t}outputHelp(e){let t;if(typeof e==="function"){t=e;e=undefined}const r=this._getHelpContext(e);getCommandAndParents(this).reverse().forEach((e=>e.emit("beforeAllHelp",r)));this.emit("beforeHelp",r);let i=this.helpInformation(r);if(t){i=t(i);if(typeof i!=="string"&&!Buffer.isBuffer(i)){throw new Error("outputHelp callback must return a string or a Buffer")}}r.write(i);this.emit(this._helpLongFlag);this.emit("afterHelp",r);getCommandAndParents(this).forEach((e=>e.emit("afterAllHelp",r)))}helpOption(e,t){if(typeof e==="boolean"){this._hasHelpOption=e;return this}this._helpFlags=e||this._helpFlags;this._helpDescription=t||this._helpDescription;const r=p(this._helpFlags);this._helpShortFlag=r.shortFlag;this._helpLongFlag=r.longFlag;return this}help(e){this.outputHelp(e);let t=a.exitCode||0;if(t===0&&e&&typeof e!=="function"&&e.error){t=1}this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const r=["beforeAll","before","after","afterAll"];if(!r.includes(e)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${r.join("', '")}'`)}const i=`${e}Help`;this.on(i,(e=>{let r;if(typeof t==="function"){r=t({error:e.error,command:e.command})}else{r=t}if(r){e.write(`${r}\n`)}}));return this}}function outputHelpIfRequested(e,t){const r=e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag));if(r){e.outputHelp();e._exit(0,"commander.helpDisplayed","(outputHelp)")}}function incrementNodeInspectorPort(e){return e.map((e=>{if(!e.startsWith("--inspect")){return e}let t;let r="127.0.0.1";let i="9229";let n;if((n=e.match(/^(--inspect(-brk)?)$/))!==null){t=n[1]}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){t=n[1];if(/^\d+$/.test(n[3])){i=n[3]}else{r=n[3]}}else if((n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){t=n[1];r=n[3];i=n[4]}if(t&&i!=="0"){return`${t}=${r}:${parseInt(i)+1}`}return e}))}function getCommandAndParents(e){const t=[];for(let r=e;r;r=r.parent){t.push(r)}return t}t.Command=Command},2625:(e,t)=>{class CommanderError extends Error{constructor(e,t,r){super(r);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=t;this.exitCode=e;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(e){super(1,"commander.invalidArgument",e);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}t.CommanderError=CommanderError;t.InvalidArgumentError=InvalidArgumentError},5153:(e,t,r)=>{const{humanReadableArgName:i}=r(9414);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false;this.showGlobalOptions=false}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,r,i]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);const n=e.createCommand(r).helpOption(false);n.description(e._helpCommandDescription);if(i)n.arguments(i);t.push(n)}if(this.sortSubcommands){t.sort(((e,t)=>e.name().localeCompare(t.name())))}return t}compareOptions(e,t){const getSortKey=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");return getSortKey(e).localeCompare(getSortKey(t))}visibleOptions(e){const t=e.options.filter((e=>!e.hidden));const r=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag);const i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(r||i){let n;if(!r){n=e.createOption(e._helpLongFlag,e._helpDescription)}else if(!i){n=e.createOption(e._helpShortFlag,e._helpDescription)}else{n=e.createOption(e._helpFlags,e._helpDescription)}t.push(n)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];const t=[];for(let r=e.parent;r;r=r.parent){const e=r.options.filter((e=>!e.hidden));t.push(...e)}if(this.sortOptions){t.sort(this.compareOptions)}return t}visibleArguments(e){if(e._argsDescription){e._args.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""}))}if(e._args.find((e=>e.description))){return e._args}return[]}subcommandTerm(e){const t=e._args.map((e=>i(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,r)=>Math.max(e,t.subcommandTerm(r).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce(((e,r)=>Math.max(e,t.optionTerm(r).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,r)=>Math.max(e,t.argumentTerm(r).length)),0)}commandUsage(e){let t=e._name;if(e._aliases[0]){t=t+"|"+e._aliases[0]}let r="";for(let t=e.parent;t;t=t.parent){r=t.name()+" "+r}return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){const r=e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==="boolean";if(r){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}}if(e.presetArg!==undefined&&e.optional){t.push(`preset: ${JSON.stringify(e.presetArg)}`)}if(e.envVar!==undefined){t.push(`env: ${e.envVar}`)}if(t.length>0){return`${e.description} (${t.join(", ")})`}return e.description}argumentDescription(e){const t=[];if(e.argChoices){t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`)}if(e.defaultValue!==undefined){t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}if(t.length>0){const r=`(${t.join(", ")})`;if(e.description){return`${e.description} ${r}`}return r}return e.description}formatHelp(e,t){const r=t.padWidth(e,t);const i=t.helpWidth||80;const n=2;const s=2;function formatItem(e,o){if(o){const a=`${e.padEnd(r+s)}${o}`;return t.wrap(a,i-n,r+s)}return e}function formatList(e){return e.join("\n").replace(/^/gm," ".repeat(n))}let o=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);if(a.length>0){o=o.concat([t.wrap(a,i,0),""])}const l=t.visibleArguments(e).map((e=>formatItem(t.argumentTerm(e),t.argumentDescription(e))));if(l.length>0){o=o.concat(["Arguments:",formatList(l),""])}const u=t.visibleOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(u.length>0){o=o.concat(["Options:",formatList(u),""])}if(this.showGlobalOptions){const r=t.visibleGlobalOptions(e).map((e=>formatItem(t.optionTerm(e),t.optionDescription(e))));if(r.length>0){o=o.concat(["Global Options:",formatList(r),""])}}const c=t.visibleCommands(e).map((e=>formatItem(t.subcommandTerm(e),t.subcommandDescription(e))));if(c.length>0){o=o.concat(["Commands:",formatList(c),""])}return o.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,r,i=40){const n=" \\f\\t\\v - \ufeff";const s=new RegExp(`[\\n][${n}]+`);if(e.match(s))return e;const o=t-r;if(o<i)return e;const a=e.slice(0,r);const l=e.slice(r).replace("\r\n","\n");const u=" ".repeat(r);const c="";const h=`\\s${c}`;const d=new RegExp(`\n|.{1,${o-1}}([${h}]|$)|[^${h}]+?([${h}]|$)`,"g");const p=l.match(d)||[];return a+p.map(((e,t)=>{if(e==="\n")return"";return(t>0?u:"")+e.trimEnd()})).join("\n")}}t.Help=Help},6558:(e,t,r)=>{const{InvalidArgumentError:i}=r(2625);class Option{constructor(e,t){this.flags=e;this.description=t||"";this.required=e.includes("<");this.optional=e.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(e);this.mandatory=false;const r=splitOptionFlags(e);this.short=r.shortFlag;this.long=r.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(e,t){this.defaultValue=e;this.defaultValueDescription=t;return this}preset(e){this.presetArg=e;return this}conflicts(e){this.conflictsWith=this.conflictsWith.concat(e);return this}implies(e){let t=e;if(typeof e==="string"){t={[e]:true}}this.implied=Object.assign(this.implied||{},t);return this}env(e){this.envVar=e;return this}argParser(e){this.parseArg=e;return this}makeOptionMandatory(e=true){this.mandatory=!!e;return this}hideHelp(e=true){this.hidden=!!e;return this}_concatValue(e,t){if(t===this.defaultValue||!Array.isArray(t)){return[e]}return t.concat(e)}choices(e){this.argChoices=e.slice();this.parseArg=(e,t)=>{if(!this.argChoices.includes(e)){throw new i(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(e,t)}return e};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(e){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;e.forEach((e=>{if(e.negate){this.negativeOptions.set(e.attributeName(),e)}else{this.positiveOptions.set(e.attributeName(),e)}}));this.negativeOptions.forEach(((e,t)=>{if(this.positiveOptions.has(t)){this.dualOptions.add(t)}}))}valueFromOption(e,t){const r=t.attributeName();if(!this.dualOptions.has(r))return true;const i=this.negativeOptions.get(r).presetArg;const n=i!==undefined?i:false;return t.negate===(n===e)}}function camelcase(e){return e.split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}function splitOptionFlags(e){let t;let r;const i=e.split(/[ |,]+/);if(i.length>1&&!/^[[<]/.test(i[1]))t=i.shift();r=i.shift();if(!t&&/^-[^-]$/.test(r)){t=r;r=undefined}return{shortFlag:t,longFlag:r}}t.Option=Option;t.splitOptionFlags=splitOptionFlags;t.DualOptions=DualOptions},7592:(e,t)=>{const r=3;function editDistance(e,t){if(Math.abs(e.length-t.length)>r)return Math.max(e.length,t.length);const i=[];for(let t=0;t<=e.length;t++){i[t]=[t]}for(let e=0;e<=t.length;e++){i[0][e]=e}for(let r=1;r<=t.length;r++){for(let n=1;n<=e.length;n++){let s=1;if(e[n-1]===t[r-1]){s=0}else{s=1}i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+s);if(n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]){i[n][r]=Math.min(i[n][r],i[n-2][r-2]+1)}}}return i[e.length][t.length]}function suggestSimilar(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));const i=e.startsWith("--");if(i){e=e.slice(2);t=t.map((e=>e.slice(2)))}let n=[];let s=r;const o=.4;t.forEach((t=>{if(t.length<=1)return;const r=editDistance(e,t);const i=Math.max(e.length,t.length);const a=(i-r)/i;if(a>o){if(r<s){s=r;n=[t]}else if(r===s){n.push(t)}}}));n.sort(((e,t)=>e.localeCompare(t)));if(i){n=n.map((e=>`--${e}`))}if(n.length>1){return`\n(Did you mean one of ${n.join(", ")}?)`}if(n.length===1){return`\n(Did you mean ${n[0]}?)`}return""}t.suggestSimilar=suggestSimilar},1391:(e,t,r)=>{"use strict";r.r(t);r.d(t,{AbortError:()=>AbortError,CacheError:()=>CacheError,CancelError:()=>types_CancelError,HTTPError:()=>HTTPError,MaxRedirectsError:()=>MaxRedirectsError,Options:()=>Options,ParseError:()=>ParseError,ReadError:()=>ReadError,RequestError:()=>RequestError,RetryError:()=>RetryError,TimeoutError:()=>TimeoutError,UploadError:()=>UploadError,calculateRetryDelay:()=>te,create:()=>Re,default:()=>Le,got:()=>Pe,isResponseOk:()=>isResponseOk,parseBody:()=>parseBody,parseLinkHeader:()=>parseLinkHeader});const i=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function isTypedArrayName(e){return i.includes(e)}const n=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...i];function isObjectTypeName(e){return n.includes(e)}const s=["null","undefined","string","number","bigint","boolean","symbol"];function isPrimitiveTypeName(e){return s.includes(e)}function isOfType(e){return t=>typeof t===e}const{toString:o}=Object.prototype;const getObjectType=e=>{const t=o.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&is.domElement(e)){return"HTMLElement"}if(isObjectTypeName(t)){return t}return undefined};const isObjectOfType=e=>t=>getObjectType(t)===e;function is(e){if(e===null){return"null"}switch(typeof e){case"undefined":{return"undefined"}case"string":{return"string"}case"number":{return Number.isNaN(e)?"NaN":"number"}case"boolean":{return"boolean"}case"function":{return"Function"}case"bigint":{return"bigint"}case"symbol":{return"symbol"}default:}if(is.observable(e)){return"Observable"}if(is.array(e)){return"Array"}if(is.buffer(e)){return"Buffer"}const t=getObjectType(e);if(t){return t}if(e instanceof String||e instanceof Boolean||e instanceof Number){throw new TypeError("Please don't use object wrappers for primitive types")}return"Object"}is.undefined=isOfType("undefined");is.string=isOfType("string");const a=isOfType("number");is.number=e=>a(e)&&!is.nan(e);is.positiveNumber=e=>is.number(e)&&e>0;is.negativeNumber=e=>is.number(e)&&e<0;is.bigint=isOfType("bigint");is.function_=isOfType("function");is.null_=e=>e===null;is.class_=e=>is.function_(e)&&e.toString().startsWith("class ");is.boolean=e=>e===true||e===false;is.symbol=isOfType("symbol");is.numericString=e=>is.string(e)&&!is.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));is.array=(e,t)=>{if(!Array.isArray(e)){return false}if(!is.function_(t)){return true}return e.every((e=>t(e)))};is.buffer=e=>e?.constructor?.isBuffer?.(e)??false;is.blob=e=>isObjectOfType("Blob")(e);is.nullOrUndefined=e=>is.null_(e)||is.undefined(e);is.object=e=>!is.null_(e)&&(typeof e==="object"||is.function_(e));is.iterable=e=>is.function_(e?.[Symbol.iterator]);is.asyncIterable=e=>is.function_(e?.[Symbol.asyncIterator]);is.generator=e=>is.iterable(e)&&is.function_(e?.next)&&is.function_(e?.throw);is.asyncGenerator=e=>is.asyncIterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.nativePromise=e=>isObjectOfType("Promise")(e);const hasPromiseApi=e=>is.function_(e?.then)&&is.function_(e?.catch);is.promise=e=>is.nativePromise(e)||hasPromiseApi(e);is.generatorFunction=isObjectOfType("GeneratorFunction");is.asyncGeneratorFunction=e=>getObjectType(e)==="AsyncGeneratorFunction";is.asyncFunction=e=>getObjectType(e)==="AsyncFunction";is.boundFunction=e=>is.function_(e)&&!e.hasOwnProperty("prototype");is.regExp=isObjectOfType("RegExp");is.date=isObjectOfType("Date");is.error=isObjectOfType("Error");is.map=e=>isObjectOfType("Map")(e);is.set=e=>isObjectOfType("Set")(e);is.weakMap=e=>isObjectOfType("WeakMap")(e);is.weakSet=e=>isObjectOfType("WeakSet")(e);is.weakRef=e=>isObjectOfType("WeakRef")(e);is.int8Array=isObjectOfType("Int8Array");is.uint8Array=isObjectOfType("Uint8Array");is.uint8ClampedArray=isObjectOfType("Uint8ClampedArray");is.int16Array=isObjectOfType("Int16Array");is.uint16Array=isObjectOfType("Uint16Array");is.int32Array=isObjectOfType("Int32Array");is.uint32Array=isObjectOfType("Uint32Array");is.float32Array=isObjectOfType("Float32Array");is.float64Array=isObjectOfType("Float64Array");is.bigInt64Array=isObjectOfType("BigInt64Array");is.bigUint64Array=isObjectOfType("BigUint64Array");is.arrayBuffer=isObjectOfType("ArrayBuffer");is.sharedArrayBuffer=isObjectOfType("SharedArrayBuffer");is.dataView=isObjectOfType("DataView");is.enumCase=(e,t)=>Object.values(t).includes(e);is.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;is.urlInstance=e=>isObjectOfType("URL")(e);is.urlString=e=>{if(!is.string(e)){return false}try{new URL(e);return true}catch{return false}};is.truthy=e=>Boolean(e);is.falsy=e=>!e;is.nan=e=>Number.isNaN(e);is.primitive=e=>is.null_(e)||isPrimitiveTypeName(typeof e);is.integer=e=>Number.isInteger(e);is.safeInteger=e=>Number.isSafeInteger(e);is.plainObject=e=>{if(typeof e!=="object"||e===null){return false}const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};is.typedArray=e=>isTypedArrayName(getObjectType(e));const isValidLength=e=>is.safeInteger(e)&&e>=0;is.arrayLike=e=>!is.nullOrUndefined(e)&&!is.function_(e)&&isValidLength(e.length);is.tupleLike=(e,t)=>{if(is.array(t)&&is.array(e)&&t.length===e.length){return t.every(((t,r)=>t(e[r])))}return false};is.inRange=(e,t)=>{if(is.number(t)){return e>=Math.min(0,t)&&e<=Math.max(t,0)}if(is.array(t)&&t.length===2){return e>=Math.min(...t)&&e<=Math.max(...t)}throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const l=1;const u=["innerHTML","ownerDocument","style","attributes","nodeValue"];is.domElement=e=>is.object(e)&&e.nodeType===l&&is.string(e.nodeName)&&!is.plainObject(e)&&u.every((t=>t in e));is.observable=e=>{if(!e){return false}if(e===e[Symbol.observable]?.()){return true}if(e===e["@@observable"]?.()){return true}return false};is.nodeStream=e=>is.object(e)&&is.function_(e.pipe)&&!is.observable(e);is.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;const isAbsoluteMod2=e=>t=>is.integer(t)&&Math.abs(t%2)===e;is.evenInteger=isAbsoluteMod2(0);is.oddInteger=isAbsoluteMod2(1);is.emptyArray=e=>is.array(e)&&e.length===0;is.nonEmptyArray=e=>is.array(e)&&e.length>0;is.emptyString=e=>is.string(e)&&e.length===0;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(e);is.emptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length===0;is.nonEmptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length>0;is.emptySet=e=>is.set(e)&&e.size===0;is.nonEmptySet=e=>is.set(e)&&e.size>0;is.emptyMap=e=>is.map(e)&&e.size===0;is.nonEmptyMap=e=>is.map(e)&&e.size>0;is.propertyKey=e=>is.any([is.string,is.number,is.symbol],e);is.formData=e=>isObjectOfType("FormData")(e);is.urlSearchParams=e=>isObjectOfType("URLSearchParams")(e);const predicateOnArray=(e,t,r)=>{if(!is.function_(t)){throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`)}if(r.length===0){throw new TypeError("Invalid number of values")}return e.call(r,t)};is.any=(e,...t)=>{const r=is.array(e)?e:[e];return r.some((e=>predicateOnArray(Array.prototype.some,e,t)))};is.all=(e,...t)=>predicateOnArray(Array.prototype.every,e,t);const assertType=(e,t,r,i={})=>{if(!e){const{multipleValues:e}=i;const n=e?`received values of types ${[...new Set(r.map((e=>`\`${is(e)}\``)))].join(", ")}`:`received value of type \`${is(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${n}.`)}};const c={undefined:e=>assertType(is.undefined(e),"undefined",e),string:e=>assertType(is.string(e),"string",e),number:e=>assertType(is.number(e),"number",e),positiveNumber:e=>assertType(is.positiveNumber(e),"positive number",e),negativeNumber:e=>assertType(is.negativeNumber(e),"negative number",e),bigint:e=>assertType(is.bigint(e),"bigint",e),function_:e=>assertType(is.function_(e),"Function",e),null_:e=>assertType(is.null_(e),"null",e),class_:e=>assertType(is.class_(e),"Class",e),boolean:e=>assertType(is.boolean(e),"boolean",e),symbol:e=>assertType(is.symbol(e),"symbol",e),numericString:e=>assertType(is.numericString(e),"string with a number",e),array:(e,t)=>{const r=assertType;r(is.array(e),"Array",e);if(t){e.forEach(t)}},buffer:e=>assertType(is.buffer(e),"Buffer",e),blob:e=>assertType(is.blob(e),"Blob",e),nullOrUndefined:e=>assertType(is.nullOrUndefined(e),"null or undefined",e),object:e=>assertType(is.object(e),"Object",e),iterable:e=>assertType(is.iterable(e),"Iterable",e),asyncIterable:e=>assertType(is.asyncIterable(e),"AsyncIterable",e),generator:e=>assertType(is.generator(e),"Generator",e),asyncGenerator:e=>assertType(is.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>assertType(is.nativePromise(e),"native Promise",e),promise:e=>assertType(is.promise(e),"Promise",e),generatorFunction:e=>assertType(is.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>assertType(is.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>assertType(is.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>assertType(is.boundFunction(e),"Function",e),regExp:e=>assertType(is.regExp(e),"RegExp",e),date:e=>assertType(is.date(e),"Date",e),error:e=>assertType(is.error(e),"Error",e),map:e=>assertType(is.map(e),"Map",e),set:e=>assertType(is.set(e),"Set",e),weakMap:e=>assertType(is.weakMap(e),"WeakMap",e),weakSet:e=>assertType(is.weakSet(e),"WeakSet",e),weakRef:e=>assertType(is.weakRef(e),"WeakRef",e),int8Array:e=>assertType(is.int8Array(e),"Int8Array",e),uint8Array:e=>assertType(is.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>assertType(is.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>assertType(is.int16Array(e),"Int16Array",e),uint16Array:e=>assertType(is.uint16Array(e),"Uint16Array",e),int32Array:e=>assertType(is.int32Array(e),"Int32Array",e),uint32Array:e=>assertType(is.uint32Array(e),"Uint32Array",e),float32Array:e=>assertType(is.float32Array(e),"Float32Array",e),float64Array:e=>assertType(is.float64Array(e),"Float64Array",e),bigInt64Array:e=>assertType(is.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>assertType(is.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>assertType(is.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>assertType(is.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>assertType(is.dataView(e),"DataView",e),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",e),urlInstance:e=>assertType(is.urlInstance(e),"URL",e),urlString:e=>assertType(is.urlString(e),"string with a URL",e),truthy:e=>assertType(is.truthy(e),"truthy",e),falsy:e=>assertType(is.falsy(e),"falsy",e),nan:e=>assertType(is.nan(e),"NaN",e),primitive:e=>assertType(is.primitive(e),"primitive",e),integer:e=>assertType(is.integer(e),"integer",e),safeInteger:e=>assertType(is.safeInteger(e),"integer",e),plainObject:e=>assertType(is.plainObject(e),"plain object",e),typedArray:e=>assertType(is.typedArray(e),"TypedArray",e),arrayLike:e=>assertType(is.arrayLike(e),"array-like",e),tupleLike:(e,t)=>assertType(is.tupleLike(e,t),"tuple-like",e),domElement:e=>assertType(is.domElement(e),"HTMLElement",e),observable:e=>assertType(is.observable(e),"Observable",e),nodeStream:e=>assertType(is.nodeStream(e),"Node.js Stream",e),infinite:e=>assertType(is.infinite(e),"infinite number",e),emptyArray:e=>assertType(is.emptyArray(e),"empty array",e),nonEmptyArray:e=>assertType(is.nonEmptyArray(e),"non-empty array",e),emptyString:e=>assertType(is.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>assertType(is.emptyObject(e),"empty object",e),nonEmptyObject:e=>assertType(is.nonEmptyObject(e),"non-empty object",e),emptySet:e=>assertType(is.emptySet(e),"empty set",e),nonEmptySet:e=>assertType(is.nonEmptySet(e),"non-empty set",e),emptyMap:e=>assertType(is.emptyMap(e),"empty map",e),nonEmptyMap:e=>assertType(is.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>assertType(is.propertyKey(e),"PropertyKey",e),formData:e=>assertType(is.formData(e),"FormData",e),urlSearchParams:e=>assertType(is.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>assertType(is.evenInteger(e),"even integer",e),oddInteger:e=>assertType(is.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>assertType(is.directInstanceOf(e,t),"T",e),inRange:(e,t)=>assertType(is.inRange(e,t),"in range",e),any:(e,...t)=>assertType(is.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:true}),all:(e,...t)=>assertType(is.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:true})};Object.defineProperties(is,{class:{value:is.class_},function:{value:is.function_},null:{value:is.null_}});Object.defineProperties(c,{class:{value:c.class_},function:{value:c.function_},null:{value:c.null_}});const h=is;const d=require("node:events");class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>new PCancelable(((r,i,n)=>{t.push(n);e(...t).then(r,i)}))}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise(((t,r)=>{this._reject=r;const onResolve=e=>{if(!this._isCanceled||!onCancel.shouldReject){this._isPending=false;t(e)}};const onReject=e=>{this._isPending=false;r(e)};const onCancel=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(onCancel,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});e(onResolve,onReject,onCancel)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}this._isCanceled=true;if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e);return}}if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);function isRequest(e){return h.object(e)&&"_onResponse"in e}class RequestError extends Error{constructor(e,t,r){super(e);Object.defineProperty(this,"input",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"stack",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"response",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"request",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"timings",{enumerable:true,configurable:true,writable:true,value:void 0});Error.captureStackTrace(this,this.constructor);this.name="RequestError";this.code=t.code??"ERR_GOT_REQUEST_ERROR";this.input=t.input;if(isRequest(r)){Object.defineProperty(this,"request",{enumerable:false,value:r});Object.defineProperty(this,"response",{enumerable:false,value:r.response});this.options=r.options}else{this.options=r}this.timings=this.request?.timings;if(h.string(t.stack)&&h.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length;const r=this.stack.slice(e).split("\n").reverse();const i=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();while(i.length>0&&i[0]===r[0]){r.shift()}this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${i.reverse().join("\n")}`}}}class MaxRedirectsError extends RequestError{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError";this.code="ERR_TOO_MANY_REDIRECTS"}}class HTTPError extends RequestError{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError";this.code="ERR_NON_2XX_3XX_RESPONSE"}}class CacheError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="CacheError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}class UploadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="UploadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}class TimeoutError extends RequestError{constructor(e,t,r){super(e.message,e,r);Object.defineProperty(this,"timings",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"event",{enumerable:true,configurable:true,writable:true,value:void 0});this.name="TimeoutError";this.event=e.event;this.timings=t}}class ReadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="ReadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}class RetryError extends RequestError{constructor(e){super("Retrying",{},e);this.name="RetryError";this.code="ERR_RETRYING"}}class AbortError extends RequestError{constructor(e){super("This operation was aborted.",{},e);this.code="ERR_ABORTED";this.name="AbortError"}}const p=require("node:process");const m=require("node:buffer");const g=require("node:stream");const y=require("node:url");const _=require("node:http");var v=r(2361);var b=r(3837);var x=r(6214);const timer=e=>{if(e.timings){return e.timings}const t={start:Date.now(),socket:undefined,lookup:undefined,connect:undefined,secureConnect:undefined,upload:undefined,response:undefined,end:undefined,error:undefined,abort:undefined,phases:{wait:undefined,dns:undefined,tcp:undefined,tls:undefined,request:undefined,firstByte:undefined,download:undefined,total:undefined}};e.timings=t;const handleError=e=>{e.once(v.errorMonitor,(()=>{t.error=Date.now();t.phases.total=t.error-t.start}))};handleError(e);const onAbort=()=>{t.abort=Date.now();t.phases.total=t.abort-t.start};e.prependOnceListener("abort",onAbort);const onSocket=e=>{t.socket=Date.now();t.phases.wait=t.socket-t.start;if(b.types.isProxy(e)){return}const lookupListener=()=>{t.lookup=Date.now();t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",lookupListener);x(e,{connect:()=>{t.connect=Date.now();if(t.lookup===undefined){e.removeListener("lookup",lookupListener);t.lookup=t.connect;t.phases.dns=t.lookup-t.socket}t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now();t.phases.tls=t.secureConnect-t.connect}})};if(e.socket){onSocket(e.socket)}else{e.prependOnceListener("socket",onSocket)}const onUpload=()=>{t.upload=Date.now();t.phases.request=t.upload-(t.secureConnect??t.connect)};if(e.writableFinished){onUpload()}else{e.prependOnceListener("finish",onUpload)}e.prependOnceListener("response",(r=>{t.response=Date.now();t.phases.firstByte=t.response-t.upload;r.timings=t;handleError(r);r.prependOnceListener("end",(()=>{e.off("abort",onAbort);r.off("aborted",onAbort);if(t.phases.total){return}t.end=Date.now();t.phases.download=t.end-t.response;t.phases.total=t.end-t.start}));r.prependOnceListener("aborted",onAbort)}));return t};const T=timer;const w=require("node:crypto");const S="text/plain";const E="us-ascii";const testParameter=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const A=new Set(["https:","http:","file:"]);const hasCustomProtocol=e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!A.has(t)}catch{return false}};const normalizeDataURL=(e,{stripHash:t})=>{const r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!r){throw new Error(`Invalid URL: ${e}`)}let{type:i,data:n,hash:s}=r.groups;const o=i.split(";");s=t?"":s;let a=false;if(o[o.length-1]==="base64"){o.pop();a=true}const l=o.shift()?.toLowerCase()??"";const u=o.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));if(t==="charset"){r=r.toLowerCase();if(r===E){return""}}return`${t}${r?`=${r}`:""}`})).filter(Boolean);const c=[...u];if(a){c.push("base64")}if(c.length>0||l&&l!==S){c.unshift(l)}return`data:${c.join(";")},${a?n.trim():n}${s?`#${s}`:""}`};function normalizeUrl(e,t){t={defaultProtocol:"http",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,removeExplicitPort:false,sortQueryParameters:true,...t};if(typeof t.defaultProtocol==="string"&&!t.defaultProtocol.endsWith(":")){t.defaultProtocol=`${t.defaultProtocol}:`}e=e.trim();if(/^data:/i.test(e)){return normalizeDataURL(e,t)}if(hasCustomProtocol(e)){return e}const r=e.startsWith("//");const i=!r&&/^\.*\//.test(e);if(!i){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const n=new URL(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&n.protocol==="https:"){n.protocol="http:"}if(t.forceHttps&&n.protocol==="http:"){n.protocol="https:"}if(t.stripAuthentication){n.username="";n.password=""}if(t.stripHash){n.hash=""}else if(t.stripTextFragment){n.hash=n.hash.replace(/#?:~:text.*?$/i,"")}if(n.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0;let r="";for(;;){const i=e.exec(n.pathname);if(!i){break}const s=i[0];const o=i.index;const a=n.pathname.slice(t,o);r+=a.replace(/\/{2,}/g,"/");r+=s;t=o+s.length}const i=n.pathname.slice(t,n.pathname.length);r+=i.replace(/\/{2,}/g,"/");n.pathname=r}if(n.pathname){try{n.pathname=decodeURI(n.pathname)}catch{}}if(t.removeDirectoryIndex===true){t.removeDirectoryIndex=[/^index\.[a-z]+$/]}if(Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=n.pathname.split("/");const r=e[e.length-1];if(testParameter(r,t.removeDirectoryIndex)){e=e.slice(0,-1);n.pathname=e.slice(1).join("/")+"/"}}if(n.hostname){n.hostname=n.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(n.hostname)){n.hostname=n.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...n.searchParams.keys()]){if(testParameter(e,t.removeQueryParameters)){n.searchParams.delete(e)}}}if(!Array.isArray(t.keepQueryParameters)&&t.removeQueryParameters===true){n.search=""}if(Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0){for(const e of[...n.searchParams.keys()]){if(!testParameter(e,t.keepQueryParameters)){n.searchParams.delete(e)}}}if(t.sortQueryParameters){n.searchParams.sort();try{n.search=decodeURIComponent(n.search)}catch{}}if(t.removeTrailingSlash){n.pathname=n.pathname.replace(/\/$/,"")}if(t.removeExplicitPort&&n.port){n.port=""}const s=e;e=n.toString();if(!t.removeSingleSlash&&n.pathname==="/"&&!s.endsWith("/")&&n.hash===""){e=e.replace(/\/$/,"")}if((t.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&t.removeSingleSlash){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e}var C=r(1766);var N=r(1002);function lowercaseKeys(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}class Response extends g.Readable{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:r,url:i}){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Uint8Array)){throw new TypeError("Argument `body` should be a buffer")}if(typeof i!=="string"){throw new TypeError("Argument `url` should be a string")}super({read(){this.push(r);this.push(null)}});this.statusCode=e;this.headers=lowercaseKeys(t);this.body=r;this.url=i}}var O=r(1531);const R=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];function mimicResponse(e,t){if(t._readableState.autoDestroy){throw new Error("The second stream must have the `autoDestroy` option set to `false`")}const r=new Set([...Object.keys(e),...R]);const i={};for(const n of r){if(n in t){continue}i[n]={get(){const t=e[n];const r=typeof t==="function";return r?t.bind(e):t},set(t){e[n]=t},enumerable:true,configurable:false}}Object.defineProperties(t,i);e.once("aborted",(()=>{t.destroy();t.emit("aborted")}));e.once("close",(()=>{if(e.complete){if(t.readable){t.once("end",(()=>{t.emit("close")}))}else{t.emit("close")}}else{t.emit("close")}}));return t}class types_RequestError extends Error{constructor(e){super(e.message);Object.assign(this,e)}}class types_CacheError extends Error{constructor(e){super(e.message);Object.assign(this,e)}}class CacheableRequest{constructor(e,t){this.hooks=new Map;this.request=()=>(e,t)=>{let r;if(typeof e==="string"){r=normalizeUrlObject(y.parse(e));e={}}else if(e instanceof y.URL){r=normalizeUrlObject(y.parse(e.toString()));e={}}else{const[t,...i]=(e.path??"").split("?");const n=i.length>0?`?${i.join("?")}`:"";r=normalizeUrlObject({...e,pathname:t,search:n})}e={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...e,...urlObjectToRequestOptions(r)};e.headers=Object.fromEntries(k(e.headers).map((([e,t])=>[e.toLowerCase(),t])));const i=new d;const n=normalizeUrl(y.format(r),{stripWWW:false,removeTrailingSlash:false,stripAuthentication:false});let s=`${e.method}:${n}`;if(e.body&&e.method!==undefined&&["POST","PATCH","PUT"].includes(e.method)){if(e.body instanceof g.Readable){e.cache=false}else{s+=`:${w.createHash("md5").update(e.body).digest("hex")}`}}let o=false;let a=false;const makeRequest=e=>{a=true;let r=false;let requestErrorCallback=()=>{};const n=new Promise((e=>{requestErrorCallback=()=>{if(!r){r=true;e()}}}));const handler=async r=>{if(o){r.status=r.statusCode;const t=N.fromObject(o.cachePolicy).revalidatedPolicy(e,r);if(!t.modified){r.resume();await new Promise((e=>{r.once("end",e)}));const e=convertHeaders(t.policy.responseHeaders());r=new Response({statusCode:o.statusCode,headers:e,body:o.body,url:o.url});r.cachePolicy=t.policy;r.fromCache=true}}if(!r.fromCache){r.cachePolicy=new N(e,r,e);r.fromCache=false}let a;if(e.cache&&r.cachePolicy.storable()){a=cloneResponse(r);(async()=>{try{const t=C.buffer(r);await Promise.race([n,new Promise((e=>r.once("end",e))),new Promise((e=>r.once("close",e)))]);const i=await t;let a={url:r.url,statusCode:r.fromCache?o.statusCode:r.statusCode,body:i,cachePolicy:r.cachePolicy.toObject()};let l=e.strictTtl?r.cachePolicy.timeToLive():undefined;if(e.maxTtl){l=l?Math.min(l,e.maxTtl):e.maxTtl}if(this.hooks.size>0){for(const e of this.hooks.keys()){a=await this.runHook(e,a,r)}}await this.cache.set(s,a,l)}catch(e){i.emit("error",new types_CacheError(e))}})()}else if(e.cache&&o){(async()=>{try{await this.cache.delete(s)}catch(e){i.emit("error",new types_CacheError(e))}})()}i.emit("response",a??r);if(typeof t==="function"){t(a??r)}};try{const t=this.cacheRequest(e,handler);t.once("error",requestErrorCallback);t.once("abort",requestErrorCallback);t.once("destroy",requestErrorCallback);i.emit("request",t)}catch(e){i.emit("error",new types_RequestError(e))}};(async()=>{const get=async e=>{await Promise.resolve();const r=e.cache?await this.cache.get(s):undefined;if(r===undefined&&!e.forceRefresh){makeRequest(e);return}const n=N.fromObject(r.cachePolicy);if(n.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=convertHeaders(n.responseHeaders());const s=new Response({statusCode:r.statusCode,headers:e,body:r.body,url:r.url});s.cachePolicy=n;s.fromCache=true;i.emit("response",s);if(typeof t==="function"){t(s)}}else if(n.satisfiesWithoutRevalidation(e)&&Date.now()>=n.timeToLive()&&e.forceRefresh){await this.cache.delete(s);e.headers=n.revalidationHeaders(e);makeRequest(e)}else{o=r;e.headers=n.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>i.emit("error",new types_CacheError(e));if(this.cache instanceof O){const e=this.cache;e.once("error",errorHandler);i.on("error",(()=>e.removeListener("error",errorHandler)));i.on("response",(()=>e.removeListener("error",errorHandler)))}try{await get(e)}catch(t){if(e.automaticFailover&&!a){makeRequest(e)}i.emit("error",new types_CacheError(t))}})();return i};this.addHook=(e,t)=>{if(!this.hooks.has(e)){this.hooks.set(e,t)}};this.removeHook=e=>this.hooks.delete(e);this.getHook=e=>this.hooks.get(e);this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t);if(t instanceof O){this.cache=t}else if(typeof t==="string"){this.cache=new O({uri:t,namespace:"cacheable-request"})}else{this.cache=new O({store:t,namespace:"cacheable-request"})}this.request=this.request.bind(this);this.cacheRequest=e}}const k=Object.entries;const cloneResponse=e=>{const t=new g.PassThrough({autoDestroy:false});mimicResponse(e,t);return e.pipe(t)};const urlObjectToRequestOptions=e=>{const t={...e};t.path=`${e.pathname||"/"}${e.search||""}`;delete t.pathname;delete t.search;return t};const normalizeUrlObject=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search});const convertHeaders=e=>{const t=[];for(const r of Object.keys(e)){t[r.toLowerCase()]=e[r]}return t};const P=CacheableRequest;const L="onResponse";var I=r(2391);const isFunction=e=>typeof e==="function";const isFormData=e=>Boolean(e&&isFunction(e.constructor)&&e[Symbol.toStringTag]==="FormData"&&isFunction(e.append)&&isFunction(e.getAll)&&isFunction(e.entries)&&isFunction(e[Symbol.iterator]));const isAsyncIterable=e=>isFunction(e[Symbol.asyncIterator]);async function*readStream(e){const t=e.getReader();while(true){const{done:e,value:r}=await t.read();if(e){break}yield r}}const getStreamIterator=e=>{if(isAsyncIterable(e)){return e}if(isFunction(e.getReader)){return readStream(e)}throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")};const M="abcdefghijklmnopqrstuvwxyz0123456789";function createBoundary(){let e=16;let t="";while(e--){t+=M[Math.random()*M.length<<0]}return t}const normalizeValue=e=>String(e).replace(/\r|\n/g,((e,t,r)=>{if(e==="\r"&&r[t+1]!=="\n"||e==="\n"&&r[t-1]!=="\r"){return"\r\n"}return e}));const getType=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function isPlainObject(e){if(getType(e)!=="object"){return false}const t=Object.getPrototypeOf(e);if(t===null||t===undefined){return true}const r=t.constructor&&t.constructor.toString();return r===Object.toString()}function getProperty(e,t){if(typeof t==="string"){for(const[r,i]of Object.entries(e)){if(t.toLowerCase()===r.toLowerCase()){return i}}}return undefined}const proxyHeaders=e=>new Proxy(e,{get:(e,t)=>getProperty(e,t),has:(e,t)=>getProperty(e,t)!==undefined});const escapeName=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22");const isFile=e=>Boolean(e&&typeof e==="object"&&isFunction(e.constructor)&&e[Symbol.toStringTag]==="File"&&isFunction(e.stream)&&e.name!=null);const D=null&&isFile;var F=undefined&&undefined.__classPrivateFieldSet||function(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var j=undefined&&undefined.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var B,U,H,z,K,V,q,Z,G,$,W;const Y={enableAdditionalHeaders:false};const J={writable:false,configurable:false};class FormDataEncoder{constructor(e,t,r){B.add(this);U.set(this,"\r\n");H.set(this,void 0);z.set(this,void 0);K.set(this,"-".repeat(2));V.set(this,new TextEncoder);q.set(this,void 0);Z.set(this,void 0);G.set(this,void 0);if(!isFormData(e)){throw new TypeError("Expected first argument to be a FormData instance.")}let i;if(isPlainObject(t)){r=t}else{i=t}if(!i){i=createBoundary()}if(typeof i!=="string"){throw new TypeError("Expected boundary argument to be a string.")}if(r&&!isPlainObject(r)){throw new TypeError("Expected options argument to be an object.")}F(this,Z,Array.from(e.entries()),"f");F(this,G,{...Y,...r},"f");F(this,H,j(this,V,"f").encode(j(this,U,"f")),"f");F(this,z,j(this,H,"f").byteLength,"f");this.boundary=`form-data-boundary-${i}`;this.contentType=`multipart/form-data; boundary=${this.boundary}`;F(this,q,j(this,V,"f").encode(`${j(this,K,"f")}${this.boundary}${j(this,K,"f")}${j(this,U,"f").repeat(2)}`),"f");const n={"Content-Type":this.contentType};const s=j(this,B,"m",W).call(this);if(s){this.contentLength=s;n["Content-Length"]=s}this.headers=proxyHeaders(Object.freeze(n));Object.defineProperties(this,{boundary:J,contentType:J,contentLength:J,headers:J})}getContentLength(){return this.contentLength==null?undefined:Number(this.contentLength)}*values(){for(const[e,t]of j(this,Z,"f")){const r=isFile(t)?t:j(this,V,"f").encode(normalizeValue(t));yield j(this,B,"m",$).call(this,e,r);yield r;yield j(this,H,"f")}yield j(this,q,"f")}async*encode(){for(const e of this.values()){if(isFile(e)){yield*getStreamIterator(e.stream())}else{yield e}}}[(U=new WeakMap,H=new WeakMap,z=new WeakMap,K=new WeakMap,V=new WeakMap,q=new WeakMap,Z=new WeakMap,G=new WeakMap,B=new WeakSet,$=function _FormDataEncoder_getFieldHeader(e,t){let r="";r+=`${j(this,K,"f")}${this.boundary}${j(this,U,"f")}`;r+=`Content-Disposition: form-data; name="${escapeName(e)}"`;if(isFile(t)){r+=`; filename="${escapeName(t.name)}"${j(this,U,"f")}`;r+=`Content-Type: ${t.type||"application/octet-stream"}`}const i=isFile(t)?t.size:t.byteLength;if(j(this,G,"f").enableAdditionalHeaders===true&&i!=null&&!isNaN(i)){r+=`${j(this,U,"f")}Content-Length: ${isFile(t)?t.size:t.byteLength}`}return j(this,V,"f").encode(`${r}${j(this,U,"f").repeat(2)}`)},W=function _FormDataEncoder_getContentLength(){let e=0;for(const[t,r]of j(this,Z,"f")){const i=isFile(r)?r:j(this,V,"f").encode(normalizeValue(r));const n=isFile(i)?i.size:i.byteLength;if(n==null||isNaN(n)){return undefined}e+=j(this,B,"m",$).call(this,t,i).byteLength;e+=n;e+=j(this,z,"f")}return String(e+j(this,q,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}const Q=require("node:util");function is_form_data_isFormData(e){return h.nodeStream(e)&&h.function_(e.getBoundary)}async function getBodySize(e,t){if(t&&"content-length"in t){return Number(t["content-length"])}if(!e){return 0}if(h.string(e)){return m.Buffer.byteLength(e)}if(h.buffer(e)){return e.length}if(is_form_data_isFormData(e)){return(0,Q.promisify)(e.getLength.bind(e))()}return undefined}function proxyEvents(e,t,r){const i={};for(const n of r){const eventFunction=(...e)=>{t.emit(n,...e)};i[n]=eventFunction;e.on(n,eventFunction)}return()=>{for(const[t,r]of Object.entries(i)){e.off(t,r)}}}const X=require("node:net");function unhandle(){const e=[];return{once(t,r,i){t.once(r,i);e.push({origin:t,event:r,fn:i})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:i}=t;e.removeListener(r,i)}e.length=0}}}const ee=Symbol("reentry");const noop=()=>{};class timed_out_TimeoutError extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);Object.defineProperty(this,"event",{enumerable:true,configurable:true,writable:true,value:t});Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0});this.name="TimeoutError";this.code="ETIMEDOUT"}}function timedOut(e,t,r){if(ee in e){return noop}e[ee]=true;const i=[];const{once:n,unhandleAll:s}=unhandle();const addTimeout=(e,t,r)=>{const n=setTimeout(t,e,e,r);n.unref?.();const cancel=()=>{clearTimeout(n)};i.push(cancel);return cancel};const{host:o,hostname:a}=r;const timeoutHandler=(t,r)=>{e.destroy(new timed_out_TimeoutError(t,r))};const cancelTimeouts=()=>{for(const e of i){e()}s()};e.once("error",(t=>{cancelTimeouts();if(e.listenerCount("error")===0){throw t}}));if(typeof t.request!=="undefined"){const r=addTimeout(t.request,timeoutHandler,"request");n(e,"response",(e=>{n(e,"end",r)}))}if(typeof t.socket!=="undefined"){const{socket:r}=t;const socketTimeoutHandler=()=>{timeoutHandler(r,"socket")};e.setTimeout(r,socketTimeoutHandler);i.push((()=>{e.removeListener("timeout",socketTimeoutHandler)}))}const l=typeof t.lookup!=="undefined";const u=typeof t.connect!=="undefined";const c=typeof t.secureConnect!=="undefined";const h=typeof t.send!=="undefined";if(l||u||c||h){n(e,"socket",(i=>{const{socketPath:s}=e;if(i.connecting){const e=Boolean(s??X.isIP(a??o??"")!==0);if(l&&!e&&typeof i.address().address==="undefined"){const e=addTimeout(t.lookup,timeoutHandler,"lookup");n(i,"lookup",e)}if(u){const timeConnect=()=>addTimeout(t.connect,timeoutHandler,"connect");if(e){n(i,"connect",timeConnect())}else{n(i,"lookup",(e=>{if(e===null){n(i,"connect",timeConnect())}}))}}if(c&&r.protocol==="https:"){n(i,"connect",(()=>{const e=addTimeout(t.secureConnect,timeoutHandler,"secureConnect");n(i,"secureConnect",e)}))}}if(h){const timeRequest=()=>addTimeout(t.send,timeoutHandler,"send");if(i.connecting){n(i,"connect",(()=>{n(e,"upload-complete",timeRequest())}))}else{n(e,"upload-complete",timeRequest())}}}))}if(typeof t.response!=="undefined"){n(e,"upload-complete",(()=>{const r=addTimeout(t.response,timeoutHandler,"response");n(e,"response",r)}))}if(typeof t.read!=="undefined"){n(e,"response",(e=>{const r=addTimeout(t.read,timeoutHandler,"read");n(e,"end",r)}))}return cancelTimeouts}function urlToOptions(e){e=e;const t={protocol:e.protocol,hostname:h.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(h.string(e.port)&&e.port.length>0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}class WeakableMap{constructor(){Object.defineProperty(this,"weakMap",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"map",{enumerable:true,configurable:true,writable:true,value:void 0});this.weakMap=new WeakMap;this.map=new Map}set(e,t){if(typeof e==="object"){this.weakMap.set(e,t)}else{this.map.set(e,t)}}get(e){if(typeof e==="object"){return this.weakMap.get(e)}return this.map.get(e)}has(e){if(typeof e==="object"){return this.weakMap.has(e)}return this.map.has(e)}}const calculateRetryDelay=({attemptCount:e,retryOptions:t,error:r,retryAfter:i,computedValue:n})=>{if(r.name==="RetryError"){return 1}if(e>t.limit){return 0}const s=t.methods.includes(r.options.method);const o=t.errorCodes.includes(r.code);const a=r.response&&t.statusCodes.includes(r.response.statusCode);if(!s||!o&&!a){return 0}if(r.response){if(i){if(i>n){return 0}return i}if(r.response.statusCode===413){return 0}}const l=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+l};const te=calculateRetryDelay;const re=require("node:tls");const ie=require("node:https");const ne=require("node:dns");const se=require("node:os");const{Resolver:oe}=ne.promises;const ae=Symbol("cacheableLookupCreateConnection");const le=Symbol("cacheableLookupInstance");const ue=Symbol("expires");const ce=typeof ne.ALL==="number";const verifyAgent=e=>{if(!(e&&typeof e.createConnection==="function")){throw new Error("Expected an Agent instance as the first argument")}};const map4to6=e=>{for(const t of e){if(t.family===6){continue}t.address=`::ffff:${t.address}`;t.family=6}};const getIfaceInfo=()=>{let e=false;let t=false;for(const r of Object.values(se.networkInterfaces())){for(const i of r){if(i.internal){continue}if(i.family==="IPv6"){t=true}else{e=true}if(e&&t){return{has4:e,has6:t}}}}return{has4:e,has6:t}};const isIterable=e=>Symbol.iterator in e;const ignoreNoResultErrors=e=>e.catch((e=>{if(e.code==="ENODATA"||e.code==="ENOTFOUND"||e.code==="ENOENT"){return[]}throw e}));const he={ttl:true};const de={all:true};const fe={all:true,family:4};const pe={all:true,family:6};class CacheableLookup{constructor({cache:e=new Map,maxTtl:t=Infinity,fallbackDuration:r=3600,errorTtl:i=.15,resolver:n=new oe,lookup:s=ne.lookup}={}){this.maxTtl=t;this.errorTtl=i;this._cache=e;this._resolver=n;this._dnsLookup=s&&(0,Q.promisify)(s);this.stats={cache:0,query:0};if(this._resolver instanceof oe){this._resolve4=this._resolver.resolve4.bind(this._resolver);this._resolve6=this._resolver.resolve6.bind(this._resolver)}else{this._resolve4=(0,Q.promisify)(this._resolver.resolve4.bind(this._resolver));this._resolve6=(0,Q.promisify)(this._resolver.resolve6.bind(this._resolver))}this._iface=getIfaceInfo();this._pending={};this._nextRemovalTime=false;this._hostnamesToFallback=new Set;this.fallbackDuration=r;if(r>0){const e=setInterval((()=>{this._hostnamesToFallback.clear()}),r*1e3);if(e.unref){e.unref()}this._fallbackInterval=e}this.lookup=this.lookup.bind(this);this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear();this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if(typeof t==="function"){r=t;t={}}else if(typeof t==="number"){t={family:t}}if(!r){throw new Error("Callback must be a function.")}this.lookupAsync(e,t).then((e=>{if(t.all){r(null,e)}else{r(null,e.address,e.family,e.expires,e.ttl,e.source)}}),r)}async lookupAsync(e,t={}){if(typeof t==="number"){t={family:t}}let r=await this.query(e);if(t.family===6){const e=r.filter((e=>e.family===6));if(t.hints&ne.V4MAPPED){if(ce&&t.hints&ne.ALL||e.length===0){map4to6(r)}else{r=e}}else{r=e}}else if(t.family===4){r=r.filter((e=>e.family===4))}if(t.hints&ne.ADDRCONFIG){const{_iface:e}=this;r=r.filter((t=>t.family===6?e.has6:e.has4))}if(r.length===0){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);t.code="ENOTFOUND";t.hostname=e;throw t}if(t.all){return r}return r[0]}async query(e){let t="cache";let r=await this._cache.get(e);if(r){this.stats.cache++}if(!r){const i=this._pending[e];if(i){this.stats.cache++;r=await i}else{t="query";const i=this.queryAndCache(e);this._pending[e]=i;this.stats.query++;try{r=await i}finally{delete this._pending[e]}}}r=r.map((e=>({...e,source:t})));return r}async _resolve(e){const[t,r]=await Promise.all([ignoreNoResultErrors(this._resolve4(e,he)),ignoreNoResultErrors(this._resolve6(e,he))]);let i=0;let n=0;let s=0;const o=Date.now();for(const e of t){e.family=4;e.expires=o+e.ttl*1e3;i=Math.max(i,e.ttl)}for(const e of r){e.family=6;e.expires=o+e.ttl*1e3;n=Math.max(n,e.ttl)}if(t.length>0){if(r.length>0){s=Math.min(i,n)}else{s=i}}else{s=n}return{entries:[...t,...r],cacheTtl:s}}async _lookup(e){try{const[t,r]=await Promise.all([ignoreNoResultErrors(this._dnsLookup(e,fe)),ignoreNoResultErrors(this._dnsLookup(e,pe))]);return{entries:[...t,...r],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=Math.min(r,this.maxTtl)*1e3;t[ue]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");t.cause=e;throw t}}if(isIterable(this._cache)){this._tick(r)}}}async queryAndCache(e){if(this._hostnamesToFallback.has(e)){return this._dnsLookup(e,de)}let t=await this._resolve(e);if(t.entries.length===0&&this._dnsLookup){t=await this._lookup(e);if(t.entries.length!==0&&this.fallbackDuration>0){this._hostnamesToFallback.add(e)}}const r=t.entries.length===0?this.errorTtl:t.cacheTtl;await this._set(e,t.entries,r);return t.entries}_tick(e){const t=this._nextRemovalTime;if(!t||e<t){clearTimeout(this._removalTimeout);this._nextRemovalTime=e;this._removalTimeout=setTimeout((()=>{this._nextRemovalTime=false;let e=Infinity;const t=Date.now();for(const[r,i]of this._cache){const n=i[ue];if(t>=n){this._cache.delete(r)}else if(n<e){e=n}}if(e!==Infinity){this._tick(e-t)}}),e);if(this._removalTimeout.unref){this._removalTimeout.unref()}}}install(e){verifyAgent(e);if(ae in e){throw new Error("CacheableLookup has been already installed")}e[ae]=e.createConnection;e[le]=this;e.createConnection=(t,r)=>{if(!("lookup"in t)){t.lookup=this.lookup}return e[ae](t,r)}}uninstall(e){verifyAgent(e);if(e[ae]){if(e[le]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[ae];delete e[ae];delete e[le]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=getIfaceInfo();if(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6){this._cache.clear()}}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}var me=r(4645);function parseLinkHeader(e){const t=[];const r=e.split(",");for(const i of r){const[r,...n]=i.split(";");const s=r.trim();if(s[0]!=="<"||s[s.length-1]!==">"){throw new Error(`Invalid format of the Link header reference: ${s}`)}const o=s.slice(1,-1);const a={};if(n.length===0){throw new Error(`Unexpected end of Link header parameters: ${n.join(";")}`)}for(const t of n){const r=t.trim();const i=r.indexOf("=");if(i===-1){throw new Error(`Failed to parse Link header: ${e}`)}const n=r.slice(0,i).trim();const s=r.slice(i+1).trim();a[n]=s}t.push({reference:o,parameters:a})}return t}const[ge,ye]=p.versions.node.split(".").map(Number);function validateSearchParameters(e){for(const t in e){const r=e[t];c.any([h.string,h.number,h.boolean,h.null_,h.undefined],r)}}const _e=new Map;let ve;const getGlobalDnsCache=()=>{if(ve){return ve}ve=new CacheableLookup;return ve};const be={request:undefined,agent:{http:undefined,https:undefined,http2:undefined},h2session:undefined,decompress:true,timeout:{connect:undefined,lookup:undefined,read:undefined,request:undefined,response:undefined,secureConnect:undefined,send:undefined,socket:undefined},prefixUrl:"",body:undefined,form:undefined,json:undefined,cookieJar:undefined,ignoreInvalidCookies:false,searchParams:undefined,dnsLookup:undefined,dnsCache:undefined,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:true,maxRedirects:10,cache:undefined,throwHttpErrors:true,username:"",password:"",http2:false,allowGetBody:false,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:false,dnsLookupIpVersion:undefined,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:undefined,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:undefined,method:"GET",createConnection:undefined,cacheOptions:{shared:undefined,cacheHeuristic:undefined,immutableMinTimeToLive:undefined,ignoreCargoCult:undefined},https:{alpnProtocols:undefined,rejectUnauthorized:undefined,checkServerIdentity:undefined,certificateAuthority:undefined,key:undefined,certificate:undefined,passphrase:undefined,pfx:undefined,ciphers:undefined,honorCipherOrder:undefined,minVersion:undefined,maxVersion:undefined,signatureAlgorithms:undefined,tlsSessionLifetime:undefined,dhparam:undefined,ecdhCurve:undefined,certificateRevocationLists:undefined},encoding:undefined,resolveBodyOnly:false,isStream:false,responseType:"text",url:undefined,pagination:{transform(e){if(e.request.options.responseType==="json"){return e.body}return JSON.parse(e.body)},paginate({response:e}){const t=e.headers.link;if(typeof t!=="string"||t.trim()===""){return false}const r=parseLinkHeader(t);const i=r.find((e=>e.parameters.rel==="next"||e.parameters.rel==='"next"'));if(i){return{url:new y.URL(i.reference,e.url)}}return false},filter:()=>true,shouldContinue:()=>true,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:false},setHost:true,maxHeaderSize:undefined,signal:undefined,enableUnixSockets:true};const cloneInternals=e=>{const{hooks:t,retry:r}=e;const i={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new y.URLSearchParams(e.searchParams):undefined,pagination:{...e.pagination}};if(i.url!==undefined){i.prefixUrl=""}return i};const cloneRaw=e=>{const{hooks:t,retry:r}=e;const i={...e};if(h.object(e.context)){i.context={...e.context}}if(h.object(e.cacheOptions)){i.cacheOptions={...e.cacheOptions}}if(h.object(e.https)){i.https={...e.https}}if(h.object(e.cacheOptions)){i.cacheOptions={...i.cacheOptions}}if(h.object(e.agent)){i.agent={...e.agent}}if(h.object(e.headers)){i.headers={...e.headers}}if(h.object(r)){i.retry={...r};if(h.array(r.errorCodes)){i.retry.errorCodes=[...r.errorCodes]}if(h.array(r.methods)){i.retry.methods=[...r.methods]}if(h.array(r.statusCodes)){i.retry.statusCodes=[...r.statusCodes]}}if(h.object(e.timeout)){i.timeout={...e.timeout}}if(h.object(t)){i.hooks={...t};if(h.array(t.init)){i.hooks.init=[...t.init]}if(h.array(t.beforeRequest)){i.hooks.beforeRequest=[...t.beforeRequest]}if(h.array(t.beforeError)){i.hooks.beforeError=[...t.beforeError]}if(h.array(t.beforeRedirect)){i.hooks.beforeRedirect=[...t.beforeRedirect]}if(h.array(t.beforeRetry)){i.hooks.beforeRetry=[...t.beforeRetry]}if(h.array(t.afterResponse)){i.hooks.afterResponse=[...t.afterResponse]}}if(h.object(e.pagination)){i.pagination={...e.pagination}}return i};const getHttp2TimeoutOption=e=>{const t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter((e=>typeof e==="number"));if(t.length>0){return Math.min(...t)}return undefined};const init=(e,t,r)=>{const i=e.hooks?.init;if(i){for(const e of i){e(t,r)}}};class Options{constructor(e,t,r){Object.defineProperty(this,"_unixOptions",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_internals",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_merging",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_init",{enumerable:true,configurable:true,writable:true,value:void 0});c.any([h.string,h.urlInstance,h.object,h.undefined],e);c.any([h.object,h.undefined],t);c.any([h.object,h.undefined],r);if(e instanceof Options||t instanceof Options){throw new TypeError("The defaults must be passed as the third argument")}this._internals=cloneInternals(r?._internals??r??be);this._init=[...r?._init??[]];this._merging=false;this._unixOptions=undefined;try{if(h.plainObject(e)){try{this.merge(e);this.merge(t)}finally{this.url=e.url}}else{try{this.merge(t)}finally{if(t?.url!==undefined){if(e===undefined){this.url=t.url}else{throw new TypeError("The `url` option is mutually exclusive with the `input` argument")}}else if(e!==undefined){this.url=e}}}}catch(e){e.options=this;throw e}}merge(e){if(!e){return}if(e instanceof Options){for(const t of e._init){this.merge(t)}return}e=cloneRaw(e);init(this,e,this);init(e,e,this);this._merging=true;if("isStream"in e){this.isStream=e.isStream}try{let t=false;for(const r in e){if(r==="mutableDefaults"||r==="handlers"){continue}if(r==="url"){continue}if(!(r in this)){throw new Error(`Unexpected option: ${r}`)}this[r]=e[r];t=true}if(t){this._init.push(e)}}finally{this._merging=false}}get request(){return this._internals.request}set request(e){c.any([h.function_,h.undefined],e);this._internals.request=e}get agent(){return this._internals.agent}set agent(e){c.plainObject(e);for(const t in e){if(!(t in this._internals.agent)){throw new TypeError(`Unexpected agent option: ${t}`)}c.any([h.object,h.undefined],e[t])}if(this._merging){Object.assign(this._internals.agent,e)}else{this._internals.agent={...e}}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){c.boolean(e);this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){c.plainObject(e);for(const t in e){if(!(t in this._internals.timeout)){throw new Error(`Unexpected timeout option: ${t}`)}c.any([h.number,h.undefined],e[t])}if(this._merging){Object.assign(this._internals.timeout,e)}else{this._internals.timeout={...e}}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){c.any([h.string,h.urlInstance],e);if(e===""){this._internals.prefixUrl="";return}e=e.toString();if(!e.endsWith("/")){e+="/"}if(this._internals.prefixUrl&&this._internals.url){const{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){c.any([h.string,h.buffer,h.nodeStream,h.generator,h.asyncGenerator,isFormData,h.undefined],e);if(h.nodeStream(e)){c.truthy(e.readable)}if(e!==undefined){c.undefined(this._internals.form);c.undefined(this._internals.json)}this._internals.body=e}get form(){return this._internals.form}set form(e){c.any([h.plainObject,h.undefined],e);if(e!==undefined){c.undefined(this._internals.body);c.undefined(this._internals.json)}this._internals.form=e}get json(){return this._internals.json}set json(e){if(e!==undefined){c.undefined(this._internals.body);c.undefined(this._internals.form)}this._internals.json=e}get url(){return this._internals.url}set url(e){c.any([h.string,h.urlInstance,h.undefined],e);if(e===undefined){this._internals.url=undefined;return}if(h.string(e)&&e.startsWith("/")){throw new Error("`url` must not start with a slash")}const t=`${this.prefixUrl}${e.toString()}`;const r=new y.URL(t);this._internals.url=r;if(r.protocol==="unix:"){r.href=`http://unix${r.pathname}${r.search}`}if(r.protocol!=="http:"&&r.protocol!=="https:"){const e=new Error(`Unsupported protocol: ${r.protocol}`);e.code="ERR_UNSUPPORTED_PROTOCOL";throw e}if(this._internals.username){r.username=this._internals.username;this._internals.username=""}if(this._internals.password){r.password=this._internals.password;this._internals.password=""}if(this._internals.searchParams){r.search=this._internals.searchParams.toString();this._internals.searchParams=undefined}if(r.hostname==="unix"){if(!this._internals.enableUnixSockets){throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled")}const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${r.pathname}${r.search}`);if(e?.groups){const{socketPath:t,path:r}=e.groups;this._unixOptions={socketPath:t,path:r,host:""}}else{this._unixOptions=undefined}return}this._unixOptions=undefined}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){c.any([h.object,h.undefined],e);if(e===undefined){this._internals.cookieJar=undefined;return}let{setCookie:t,getCookieString:r}=e;c.function_(t);c.function_(r);if(t.length===4&&r.length===0){t=(0,Q.promisify)(t.bind(e));r=(0,Q.promisify)(r.bind(e));this._internals.cookieJar={setCookie:t,getCookieString:r}}else{this._internals.cookieJar=e}}get signal(){return this._internals.signal}set signal(e){c.object(e);this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){c.boolean(e);this._internals.ignoreInvalidCookies=e}get searchParams(){if(this._internals.url){return this._internals.url.searchParams}if(this._internals.searchParams===undefined){this._internals.searchParams=new y.URLSearchParams}return this._internals.searchParams}set searchParams(e){c.any([h.string,h.object,h.undefined],e);const t=this._internals.url;if(e===undefined){this._internals.searchParams=undefined;if(t){t.search=""}return}const r=this.searchParams;let i;if(h.string(e)){i=new y.URLSearchParams(e)}else if(e instanceof y.URLSearchParams){i=e}else{validateSearchParameters(e);i=new y.URLSearchParams;for(const t in e){const n=e[t];if(n===null){i.append(t,"")}else if(n===undefined){r.delete(t)}else{i.append(t,n)}}}if(this._merging){for(const e of i.keys()){r.delete(e)}for(const[e,t]of i){r.append(e,t)}}else if(t){t.search=r.toString()}else{this._internals.searchParams=r}}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){c.any([h.function_,h.undefined],e);this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){c.any([h.object,h.boolean,h.undefined],e);if(e===true){this._internals.dnsCache=getGlobalDnsCache()}else if(e===false){this._internals.dnsCache=undefined}else{this._internals.dnsCache=e}}get context(){return this._internals.context}set context(e){c.object(e);if(this._merging){Object.assign(this._internals.context,e)}else{this._internals.context={...e}}}get hooks(){return this._internals.hooks}set hooks(e){c.object(e);for(const t in e){if(!(t in this._internals.hooks)){throw new Error(`Unexpected hook event: ${t}`)}const r=t;const i=e[r];c.any([h.array,h.undefined],i);if(i){for(const e of i){c.function_(e)}}if(this._merging){if(i){this._internals.hooks[r].push(...i)}}else{if(!i){throw new Error(`Missing hook event: ${t}`)}this._internals.hooks[t]=[...i]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){c.boolean(e);this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){c.number(e);this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){c.any([h.object,h.string,h.boolean,h.undefined],e);if(e===true){this._internals.cache=_e}else if(e===false){this._internals.cache=undefined}else{this._internals.cache=e}}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){c.boolean(e);this._internals.throwHttpErrors=e}get username(){const e=this._internals.url;const t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){c.string(e);const t=this._internals.url;const r=encodeURIComponent(e);if(t){t.username=r}else{this._internals.username=r}}get password(){const e=this._internals.url;const t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){c.string(e);const t=this._internals.url;const r=encodeURIComponent(e);if(t){t.password=r}else{this._internals.password=r}}get http2(){return this._internals.http2}set http2(e){c.boolean(e);this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){c.boolean(e);this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){c.plainObject(e);if(this._merging){Object.assign(this._internals.headers,lowercaseKeys(e))}else{this._internals.headers=lowercaseKeys(e)}}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){c.boolean(e);this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==undefined&&e!==4&&e!==6){throw new TypeError(`Invalid DNS lookup IP version: ${e}`)}this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){c.function_(e);this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){c.function_(e);this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){c.plainObject(e);c.any([h.function_,h.undefined],e.calculateDelay);c.any([h.number,h.undefined],e.maxRetryAfter);c.any([h.number,h.undefined],e.limit);c.any([h.array,h.undefined],e.methods);c.any([h.array,h.undefined],e.statusCodes);c.any([h.array,h.undefined],e.errorCodes);c.any([h.number,h.undefined],e.noise);if(e.noise&&Math.abs(e.noise)>100){throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`)}for(const t in e){if(!(t in this._internals.retry)){throw new Error(`Unexpected retry option: ${t}`)}}if(this._merging){Object.assign(this._internals.retry,e)}else{this._internals.retry={...e}}const{retry:t}=this._internals;t.methods=[...new Set(t.methods.map((e=>e.toUpperCase())))];t.statusCodes=[...new Set(t.statusCodes)];t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){c.any([h.string,h.undefined],e);this._internals.localAddress=e}get method(){return this._internals.method}set method(e){c.string(e);this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){c.any([h.function_,h.undefined],e);this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){c.plainObject(e);c.any([h.boolean,h.undefined],e.shared);c.any([h.number,h.undefined],e.cacheHeuristic);c.any([h.number,h.undefined],e.immutableMinTimeToLive);c.any([h.boolean,h.undefined],e.ignoreCargoCult);for(const t in e){if(!(t in this._internals.cacheOptions)){throw new Error(`Cache option \`${t}\` does not exist`)}}if(this._merging){Object.assign(this._internals.cacheOptions,e)}else{this._internals.cacheOptions={...e}}}get https(){return this._internals.https}set https(e){c.plainObject(e);c.any([h.boolean,h.undefined],e.rejectUnauthorized);c.any([h.function_,h.undefined],e.checkServerIdentity);c.any([h.string,h.object,h.array,h.undefined],e.certificateAuthority);c.any([h.string,h.object,h.array,h.undefined],e.key);c.any([h.string,h.object,h.array,h.undefined],e.certificate);c.any([h.string,h.undefined],e.passphrase);c.any([h.string,h.buffer,h.array,h.undefined],e.pfx);c.any([h.array,h.undefined],e.alpnProtocols);c.any([h.string,h.undefined],e.ciphers);c.any([h.string,h.buffer,h.undefined],e.dhparam);c.any([h.string,h.undefined],e.signatureAlgorithms);c.any([h.string,h.undefined],e.minVersion);c.any([h.string,h.undefined],e.maxVersion);c.any([h.boolean,h.undefined],e.honorCipherOrder);c.any([h.number,h.undefined],e.tlsSessionLifetime);c.any([h.string,h.undefined],e.ecdhCurve);c.any([h.string,h.buffer,h.array,h.undefined],e.certificateRevocationLists);for(const t in e){if(!(t in this._internals.https)){throw new Error(`HTTPS option \`${t}\` does not exist`)}}if(this._merging){Object.assign(this._internals.https,e)}else{this._internals.https={...e}}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null){throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead")}c.any([h.string,h.undefined],e);this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){c.boolean(e);this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){c.boolean(e);this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===undefined){this._internals.responseType="text";return}if(e!=="text"&&e!=="buffer"&&e!=="json"){throw new Error(`Invalid \`responseType\` option: ${e}`)}this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){c.object(e);if(this._merging){Object.assign(this._internals.pagination,e)}else{this._internals.pagination=e}}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){c.boolean(e);this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){c.any([h.number,h.undefined],e);this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){c.boolean(e);this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,t){return(0,Q.inspect)(this._internals,t)}createNativeRequestOptions(){const e=this._internals;const t=e.url;let r;if(t.protocol==="https:"){r=e.http2?e.agent:e.agent.https}else{r=e.agent.http}const{https:i}=e;let{pfx:n}=i;if(h.array(n)&&h.plainObject(n[0])){n=n.map((e=>({buf:e.buffer,passphrase:e.passphrase})))}return{...e.cacheOptions,...this._unixOptions,ALPNProtocols:i.alpnProtocols,ca:i.certificateAuthority,cert:i.certificate,key:i.key,passphrase:i.passphrase,pfx:i.pfx,rejectUnauthorized:i.rejectUnauthorized,checkServerIdentity:i.checkServerIdentity??re.checkServerIdentity,ciphers:i.ciphers,honorCipherOrder:i.honorCipherOrder,minVersion:i.minVersion,maxVersion:i.maxVersion,sigalgs:i.signatureAlgorithms,sessionTimeout:i.tlsSessionLifetime,dhparam:i.dhparam,ecdhCurve:i.ecdhCurve,crl:i.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:r,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?getHttp2TimeoutOption(e):undefined,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url;const{request:t}=this._internals;if(!t&&e){return this.getFallbackRequestFunction()}return t}getFallbackRequestFunction(){const e=this._internals.url;if(!e){return}if(e.protocol==="https:"){if(this._internals.http2){if(ge<15||ge===15&&ye<10){const e=new Error("To use the `http2` option, install Node.js 15.10.0 or above");e.code="EUNSUPPORTED";throw e}return me.auto}return ie.request}return _.request}freeze(){const e=this._internals;Object.freeze(e);Object.freeze(e.hooks);Object.freeze(e.hooks.afterResponse);Object.freeze(e.hooks.beforeError);Object.freeze(e.hooks.beforeRedirect);Object.freeze(e.hooks.beforeRequest);Object.freeze(e.hooks.beforeRetry);Object.freeze(e.hooks.init);Object.freeze(e.https);Object.freeze(e.cacheOptions);Object.freeze(e.agent);Object.freeze(e.headers);Object.freeze(e.timeout);Object.freeze(e.retry);Object.freeze(e.retry.errorCodes);Object.freeze(e.retry.methods);Object.freeze(e.retry.statusCodes)}}const isResponseOk=e=>{const{statusCode:t}=e;const r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304};class ParseError extends RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request);this.name="ParseError";this.code="ERR_BODY_PARSE_FAILURE"}}const parseBody=(e,t,r,i)=>{const{rawBody:n}=e;try{if(t==="text"){return n.toString(i)}if(t==="json"){return n.length===0?"":r(n.toString(i))}if(t==="buffer"){return n}}catch(t){throw new ParseError(t,e)}throw new ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)};function isClientRequest(e){return e.writable&&!e.writableEnded}const xe=isClientRequest;function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}const{buffer:Te}=C;const we=h.string(p.versions.brotli);const Se=new Set(["GET","HEAD"]);const Ee=new WeakableMap;const Ae=new Set([300,301,302,303,304,307,308]);const Ce=["socket","connect","continue","information","upgrade"];const core_noop=()=>{};class Request extends g.Duplex{constructor(e,t,r){super({autoDestroy:false,highWaterMark:0});Object.defineProperty(this,"constructor",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_noPipe",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"options",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"response",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"requestUrl",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"redirectUrls",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"retryCount",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_stopRetry",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_downloadedSize",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_uploadedSize",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_stopReading",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_pipedServerResponses",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_request",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_responseSize",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_bodySize",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_unproxyEvents",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_isFromCache",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_cannotHaveBody",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_triggerRead",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_cancelTimeouts",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_removeListeners",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_nativeResponse",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_flushed",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_aborted",{enumerable:true,configurable:true,writable:true,value:void 0});Object.defineProperty(this,"_requestInitialized",{enumerable:true,configurable:true,writable:true,value:void 0});this._downloadedSize=0;this._uploadedSize=0;this._stopReading=false;this._pipedServerResponses=new Set;this._cannotHaveBody=false;this._unproxyEvents=core_noop;this._triggerRead=false;this._cancelTimeouts=core_noop;this._removeListeners=core_noop;this._jobs=[];this._flushed=false;this._requestInitialized=false;this._aborted=false;this.redirectUrls=[];this.retryCount=0;this._stopRetry=core_noop;this.on("pipe",(e=>{if(e?.headers){Object.assign(this.options.headers,e.headers)}}));this.on("newListener",(e=>{if(e==="retry"&&this.listenerCount("retry")>0){throw new Error("A retry listener has been attached already.")}}));try{this.options=new Options(e,t,r);if(!this.options.url){if(this.options.prefixUrl===""){throw new TypeError("Missing `url` property")}this.options.url=""}this.requestUrl=this.options.url}catch(e){const{options:t}=e;if(t){this.options=t}this.flush=async()=>{this.flush=async()=>{};this.destroy(e)};return}const{body:i}=this.options;if(h.nodeStream(i)){i.once("error",(e=>{if(this._flushed){this._beforeError(new UploadError(e,this))}else{this.flush=async()=>{this.flush=async()=>{};this._beforeError(new UploadError(e,this))}}}))}if(this.options.signal){const abort=()=>{this.destroy(new AbortError(this))};if(this.options.signal.aborted){abort()}else{this.options.signal.addEventListener("abort",abort);this._removeListeners=()=>{this.options.signal.removeEventListener("abort",abort)}}}}async flush(){if(this._flushed){return}this._flushed=true;try{await this._finalizeBody();if(this.destroyed){return}await this._makeRequest();if(this.destroyed){this._request?.destroy();return}for(const e of this._jobs){e()}this._jobs.length=0;this._requestInitialized=true}catch(e){this._beforeError(e)}}_beforeError(e){if(this._stopReading){return}const{response:t,options:r}=this;const i=this.retryCount+(e.name==="RetryError"?0:1);this._stopReading=true;if(!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}const n=e;void(async()=>{if(t?.readable&&!t.rawBody&&!this._request?.socket?.destroyed){t.setEncoding(this.readableEncoding);const e=await this._setRawBody(t);if(e){t.body=t.rawBody.toString()}}if(this.listenerCount("retry")!==0){let s;try{let e;if(t&&"retry-after"in t.headers){e=Number(t.headers["retry-after"]);if(Number.isNaN(e)){e=Date.parse(t.headers["retry-after"])-Date.now();if(e<=0){e=1}}else{e*=1e3}}const o=r.retry;s=await o.calculateDelay({attemptCount:i,retryOptions:o,error:n,retryAfter:e,computedValue:te({attemptCount:i,retryOptions:o,error:n,retryAfter:e,computedValue:o.maxRetryAfter??r.timeout.request??Number.POSITIVE_INFINITY})})}catch(e){void this._error(new RequestError(e.message,e,this));return}if(s){await new Promise((e=>{const t=setTimeout(e,s);this._stopRetry=()=>{clearTimeout(t);e()}}));if(this.destroyed){return}try{for(const e of this.options.hooks.beforeRetry){await e(n,this.retryCount+1)}}catch(t){void this._error(new RequestError(t.message,e,this));return}if(this.destroyed){return}this.destroy();this.emit("retry",this.retryCount+1,e,(e=>{const t=new Request(r.url,e,r);t.retryCount=this.retryCount+1;p.nextTick((()=>{void t.flush()}));return t}));return}}void this._error(n)})()}_read(){this._triggerRead=true;const{response:e}=this;if(e&&!this._stopReading){if(e.readableLength){this._triggerRead=false}let t;while((t=e.read())!==null){this._downloadedSize+=t.length;const e=this.downloadProgress;if(e.percent<1){this.emit("downloadProgress",e)}this.push(t)}}}_write(e,t,r){const write=()=>{this._writeRequest(e,t,r)};if(this._requestInitialized){write()}else{this._jobs.push(write)}}_final(e){const endRequest=()=>{if(!this._request||this._request.destroyed){e();return}this._request.end((t=>{if(this._request._writableState?.errored){return}if(!t){this._bodySize=this._uploadedSize;this.emit("uploadProgress",this.uploadProgress);this._request.emit("upload-complete")}e(t)}))};if(this._requestInitialized){endRequest()}else{this._jobs.push(endRequest)}}_destroy(e,t){this._stopReading=true;this.flush=async()=>{};this._stopRetry();this._cancelTimeouts();this._removeListeners();if(this.options){const{body:e}=this.options;if(h.nodeStream(e)){e.destroy()}}if(this._request){this._request.destroy()}if(e!==null&&!h.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}pipe(e,t){if(e instanceof _.ServerResponse){this._pipedServerResponses.add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof _.ServerResponse){this._pipedServerResponses.delete(e)}super.unpipe(e);return this}async _finalizeBody(){const{options:e}=this;const{headers:t}=e;const r=!h.undefined(e.form);const i=!h.undefined(e.json);const n=!h.undefined(e.body);const s=Se.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);this._cannotHaveBody=s;if(r||i||n){if(s){throw new TypeError(`The \`${e.method}\` method cannot be used with a body`)}const i=!h.string(t["content-type"]);if(n){if(isFormData(e.body)){const r=new FormDataEncoder(e.body);if(i){t["content-type"]=r.headers["Content-Type"]}if("Content-Length"in r.headers){t["content-length"]=r.headers["Content-Length"]}e.body=r.encode()}if(is_form_data_isFormData(e.body)&&i){t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`}}else if(r){if(i){t["content-type"]="application/x-www-form-urlencoded"}const{form:r}=e;e.form=undefined;e.body=new y.URLSearchParams(r).toString()}else{if(i){t["content-type"]="application/json"}const{json:r}=e;e.json=undefined;e.body=e.stringifyJson(r)}const o=await getBodySize(e.body,e.headers);if(h.undefined(t["content-length"])&&h.undefined(t["transfer-encoding"])&&!s&&!h.undefined(o)){t["content-length"]=String(o)}}if(e.responseType==="json"&&!("accept"in e.headers)){e.headers.accept="application/json"}this._bodySize=Number(t["content-length"])||undefined}async _onResponseBase(e){if(this.isAborted){return}const{options:t}=this;const{url:r}=t;this._nativeResponse=e;if(t.decompress){e=I(e)}const i=e.statusCode;const n=e;n.statusMessage=n.statusMessage??_.STATUS_CODES[i];n.url=t.url.toString();n.requestUrl=this.requestUrl;n.redirectUrls=this.redirectUrls;n.request=this;n.isFromCache=this._nativeResponse.fromCache??false;n.ip=this.ip;n.retryCount=this.retryCount;n.ok=isResponseOk(n);this._isFromCache=n.isFromCache;this._responseSize=Number(e.headers["content-length"])||undefined;this.response=n;e.once("end",(()=>{this._responseSize=this._downloadedSize;this.emit("downloadProgress",this.downloadProgress)}));e.once("error",(t=>{this._aborted=true;e.destroy();this._beforeError(new ReadError(t,this))}));e.once("aborted",(()=>{this._aborted=true;this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}));this.emit("downloadProgress",this.downloadProgress);const s=e.headers["set-cookie"];if(h.object(t.cookieJar)&&s){let e=s.map((async e=>t.cookieJar.setCookie(e,r.toString())));if(t.ignoreInvalidCookies){e=e.map((async e=>{try{await e}catch{}}))}try{await Promise.all(e)}catch(e){this._beforeError(e);return}}if(this.isAborted){return}if(t.followRedirect&&e.headers.location&&Ae.has(i)){e.resume();this._cancelTimeouts();this._unproxyEvents();if(this.redirectUrls.length>=t.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}this._request=undefined;const s=new Options(undefined,undefined,this.options);const o=i===303&&s.method!=="GET"&&s.method!=="HEAD";const a=i!==307&&i!==308;const l=s.methodRewriting&&a;if(o||l){s.method="GET";s.body=undefined;s.json=undefined;s.form=undefined;delete s.headers["content-length"]}try{const t=m.Buffer.from(e.headers.location,"binary").toString();const i=new y.URL(t,r);if(!isUnixSocketURL(r)&&isUnixSocketURL(i)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}if(i.hostname!==r.hostname||i.port!==r.port){if("host"in s.headers){delete s.headers.host}if("cookie"in s.headers){delete s.headers.cookie}if("authorization"in s.headers){delete s.headers.authorization}if(s.username||s.password){s.username="";s.password=""}}else{i.username=s.username;i.password=s.password}this.redirectUrls.push(i);s.prefixUrl="";s.url=i;for(const e of s.hooks.beforeRedirect){await e(s,n)}this.emit("redirect",s,n);this.options=s;await this._makeRequest()}catch(e){this._beforeError(e);return}return}if(t.isStream&&t.throwHttpErrors&&!isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this._triggerRead){this._read()}}));this.on("resume",(()=>{e.resume()}));this.on("pause",(()=>{e.pause()}));e.once("end",(()=>{this.push(null)}));if(this._noPipe){const t=await this._setRawBody();if(t){this.emit("response",e)}return}this.emit("response",e);for(const r of this._pipedServerResponses){if(r.headersSent){continue}for(const i in e.headers){const n=t.decompress?i!=="content-encoding":true;const s=e.headers[i];if(n){r.setHeader(i,s)}}r.statusCode=i}}async _setRawBody(e=this){if(e.readableEnded){return false}try{const t=await Te(e);if(!this.isAborted){this.response.rawBody=t;return true}}catch{}return false}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this;const{timeout:r,url:i}=t;T(e);if(this.options.http2){e.setTimeout(0)}this._cancelTimeouts=timedOut(e,r,i);const n=t.cache?"cacheableResponse":"response";e.once(n,(e=>{void this._onResponse(e)}));e.once("error",(t=>{this._aborted=true;e.destroy();t=t instanceof timed_out_TimeoutError?new TimeoutError(t,this.timings,this):new RequestError(t.message,t,this);this._beforeError(t)}));this._unproxyEvents=proxyEvents(e,this,Ce);this._request=e;this.emit("uploadProgress",this.uploadProgress);this._sendBody();this.emit("request",e)}async _asyncWrite(e){return new Promise(((t,r)=>{super.write(e,(e=>{if(e){r(e);return}t()}))}))}_sendBody(){const{body:e}=this.options;const t=this.redirectUrls.length===0?this:this._request??this;if(h.nodeStream(e)){e.pipe(t)}else if(h.generator(e)||h.asyncGenerator(e)){(async()=>{try{for await(const t of e){await this._asyncWrite(t)}super.end()}catch(e){this._beforeError(e)}})()}else if(!h.undefined(e)){this._writeRequest(e,undefined,(()=>{}));t.end()}else if(this._cannotHaveBody||this._noPipe){t.end()}}_prepareCache(e){if(!Ee.has(e)){const t=new P(((e,t)=>{const r=e._request(e,t);if(h.promise(r)){r.once=(e,t)=>{if(e==="error"){(async()=>{try{await r}catch(e){t(e)}})()}else if(e==="abort"){(async()=>{try{const e=await r;e.once("abort",t)}catch{}})()}else{throw new Error(`Unknown HTTP2 promise event: ${e}`)}return r}}return r}),e);Ee.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise(((r,i)=>{Object.assign(t,urlToOptions(e));let n;const s=Ee.get(t.cache)(t,(async e=>{e._readableState.autoDestroy=false;if(n){const fix=()=>{if(e.req){e.complete=e.req.res.complete}};e.prependOnceListener("end",fix);fix();(await n).emit("cacheableResponse",e)}r(e)}));s.once("error",i);s.once("request",(async e=>{n=e;r(n)}))}))}async _makeRequest(){const{options:e}=this;const{headers:t,username:r,password:i}=e;const n=e.cookieJar;for(const e in t){if(h.undefined(t[e])){delete t[e]}else if(h.null_(t[e])){throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`)}}if(e.decompress&&h.undefined(t["accept-encoding"])){t["accept-encoding"]=we?"gzip, deflate, br":"gzip, deflate"}if(r||i){const e=m.Buffer.from(`${r}:${i}`).toString("base64");t.authorization=`Basic ${e}`}if(n){const r=await n.getCookieString(e.url.toString());if(h.nonEmptyString(r)){t.cookie=r}}e.prefixUrl="";let s;for(const t of e.hooks.beforeRequest){const r=await t(e);if(!h.undefined(r)){s=()=>r;break}}if(!s){s=e.getRequestFunction()}const o=e.url;this._requestOptions=e.createNativeRequestOptions();if(e.cache){this._requestOptions._request=s;this._requestOptions.cache=e.cache;this._requestOptions.body=e.body;this._prepareCache(e.cache)}const a=e.cache?this._createCacheableRequest:s;try{let t=a(o,this._requestOptions);if(h.promise(t)){t=await t}if(h.undefined(t)){t=e.getFallbackRequestFunction()(o,this._requestOptions);if(h.promise(t)){t=await t}}if(xe(t)){this._onRequest(t)}else if(this.writable){this.once("finish",(()=>{void this._onResponse(t)}));this._sendBody()}else{void this._onResponse(t)}}catch(e){if(e instanceof types_CacheError){throw new CacheError(e,this)}throw e}}async _error(e){try{if(e instanceof HTTPError&&!this.options.throwHttpErrors){}else{for(const t of this.options.hooks.beforeError){e=await t(e)}}}catch(t){e=new RequestError(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,r){if(!this._request||this._request.destroyed){return}this._request.write(e,t,(i=>{if(!i&&!this._request.destroyed){this._uploadedSize+=m.Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}r(i)}))}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??undefined}get downloadProgress(){let e;if(this._responseSize){e=this._downloadedSize/this._responseSize}else if(this._responseSize===this._downloadedSize){e=1}else{e=0}return{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;if(this._bodySize){e=this._uploadedSize/this._bodySize}else if(this._bodySize===this._uploadedSize){e=1}else{e=0}return{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class types_CancelError extends RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError";this.code="ERR_CANCELED"}get isCanceled(){return true}}const Ne=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(e){let t;let r;let i;const n=new d.EventEmitter;const s=new PCancelable(((o,a,l)=>{l((()=>{t.destroy()}));l.shouldReject=false;l((()=>{a(new types_CancelError(t))}));const makeRequest=u=>{l((()=>{}));const c=e??new Request(undefined,undefined,i);c.retryCount=u;c._noPipe=true;t=c;c.once("response",(async e=>{const t=(e.headers["content-encoding"]??"").toLowerCase();const i=t==="gzip"||t==="deflate"||t==="br";const{options:n}=c;if(i&&!n.decompress){e.body=e.rawBody}else{try{e.body=parseBody(e,n.responseType,n.parseJson,n.encoding)}catch(t){e.body=e.rawBody.toString();if(isResponseOk(e)){c._beforeError(t);return}}}try{const t=n.hooks.afterResponse;for(const[r,i]of t.entries()){e=await i(e,(async e=>{n.merge(e);n.prefixUrl="";if(e.url){n.url=e.url}n.hooks.afterResponse=n.hooks.afterResponse.slice(0,r);throw new RetryError(c)}));if(!(h.object(e)&&h.number(e.statusCode)&&!h.nullOrUndefined(e.body))){throw new TypeError("The `afterResponse` hook returned an invalid value")}}}catch(e){c._beforeError(e);return}r=e;if(!isResponseOk(e)){c._beforeError(new HTTPError(e));return}c.destroy();o(c.options.resolveBodyOnly?e.body:e)}));const onError=e=>{if(s.isCanceled){return}const{options:t}=c;if(e instanceof HTTPError&&!t.throwHttpErrors){const{response:t}=e;c.destroy();o(c.options.resolveBodyOnly?t.body:t);return}a(e)};c.once("error",onError);const d=c.options?.body;c.once("retry",((t,r)=>{e=undefined;const n=c.options.body;if(d===n&&h.nodeStream(n)){r.message="Cannot retry with consumed body stream";onError(r);return}i=c.options;makeRequest(t)}));proxyEvents(c,n,Ne);if(h.undefined(e)){void c.flush()}};makeRequest(0)}));s.on=(e,t)=>{n.on(e,t);return s};s.off=(e,t)=>{n.off(e,t);return s};const shortcut=e=>{const t=(async()=>{await s;const{options:t}=r.request;return parseBody(r,e,t.parseJson,t.encoding)})();Object.defineProperties(t,Object.getOwnPropertyDescriptors(s));return t};s.json=()=>{if(t.options){const{headers:e}=t.options;if(!t.writableFinished&&!("accept"in e)){e.accept="application/json"}}return shortcut("json")};s.buffer=()=>shortcut("buffer");s.text=()=>shortcut("text");return s}const delay=async e=>new Promise((t=>{setTimeout(t,e)}));const isGotInstance=e=>h.function_(e);const Oe=["get","post","put","patch","head","delete"];const create=e=>{e={options:new Options(undefined,undefined,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults};Object.defineProperty(e,"mutableDefaults",{enumerable:true,configurable:false,writable:false});const got=(t,r,i=e.options)=>{const n=new Request(t,r,i);let s;const lastHandler=e=>{n.options=e;n._noPipe=!e.isStream;void n.flush();if(e.isStream){return n}if(!s){s=asPromise(n)}return s};let o=0;const iterateHandlers=t=>{const r=e.handlers[o++]??lastHandler;const i=r(t,iterateHandlers);if(h.promise(i)&&!n.options.isStream){if(!s){s=asPromise(n)}if(i!==s){const e=Object.getOwnPropertyDescriptors(s);for(const t in e){if(t in i){delete e[t]}}Object.defineProperties(i,e);i.cancel=s.cancel}}return i};return iterateHandlers(n.options)};got.extend=(...t)=>{const r=new Options(undefined,undefined,e.options);const i=[...e.handlers];let n;for(const e of t){if(isGotInstance(e)){r.merge(e.defaults.options);i.push(...e.defaults.handlers);n=e.defaults.mutableDefaults}else{r.merge(e);if(e.handlers){i.push(...e.handlers)}n=e.mutableDefaults}}return create({options:r,handlers:i,mutableDefaults:Boolean(n)})};const paginateEach=async function*(t,r){let i=new Options(t,r,e.options);i.resolveBodyOnly=false;const{pagination:n}=i;c.function_(n.transform);c.function_(n.shouldContinue);c.function_(n.filter);c.function_(n.paginate);c.number(n.countLimit);c.number(n.requestLimit);c.number(n.backoff);const s=[];let{countLimit:o}=n;let a=0;while(a<n.requestLimit){if(a!==0){await delay(n.backoff)}const e=await got(undefined,undefined,i);const t=await n.transform(e);const r=[];c.array(t);for(const e of t){if(n.filter({item:e,currentItems:r,allItems:s})){if(!n.shouldContinue({item:e,currentItems:r,allItems:s})){return}yield e;if(n.stackAllItems){s.push(e)}r.push(e);if(--o<=0){return}}}const l=n.paginate({response:e,currentItems:r,allItems:s});if(l===false){return}if(l===e.request.options){i=e.request.options}else{i.merge(l);c.any([h.urlInstance,h.undefined],l.url);if(l.url!==undefined){i.prefixUrl="";i.url=l.url}}a++}};got.paginate=paginateEach;got.paginate.all=async(e,t)=>{const r=[];for await(const i of paginateEach(e,t)){r.push(i)}return r};got.paginate.each=paginateEach;got.stream=(e,t)=>got(e,{...t,isStream:true});for(const e of Oe){got[e]=(t,r)=>got(t,{...r,method:e});got.stream[e]=(t,r)=>got(t,{...r,method:e,isStream:true})}if(!e.mutableDefaults){Object.freeze(e.handlers);e.options.freeze()}Object.defineProperty(got,"defaults",{value:e,writable:false,configurable:false,enumerable:true});return got};const Re=create;const ke={options:new Options,handlers:[],mutableDefaults:false};const Pe=Re(ke);const Le=Pe},2561:e=>{"use strict";e.exports={version:"3.10.0"}}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var n=t[r]={id:r,loaded:false,exports:{}};var s=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}n.loaded=true;return n.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:true});const t=__nccwpck_require__(4379);const i=__nccwpck_require__(8584);const n=__nccwpck_require__(8989);const s=new t.Option("-l,--log-level <level>","Log level").choices(["error","warn","info","http","verbose","debug","silly"]).default("info");const o=new t.Option("-d,--deployments <path>","Path to the deployments folder");const a=new t.Option("--dry-run","Do not verify anything, just output the verifications that would be performed");const l=new t.Option("-n,--network <network name>","Network to verify").makeOptionMandatory();const u=new t.Option("-u,--api-url <url>","Scan API URL (fully qualified, with protocol and path)");const c=new t.Option("-k,--api-key <key>","Scan API Key");const h=new t.Command("non-target").description("Verifies a contract that does not have its own deployment file, i.e. has not been a target of a deployment").addOption(s).addOption(a).addOption(o).addOption(l).addOption(u).addOption(c).requiredOption("--address <address>","Contract address to verify").requiredOption("--name <contract name>","Fully qualified contract name to verify, e.g. contracts/MyToken.sol").requiredOption("--deployment <deployment file name>","Deployment file name, e.g. MyOtherToken.json").option("--arguments <constructor arguments>",'JSON encoded array of constructor arguments, e.g. [1234, "0x0"]',(e=>{try{const t=JSON.parse(e);if(!Array.isArray(t)){throw new Error(`Constructor arguments must be an array, got ${t}`)}return t}catch(e){throw new t.InvalidOptionArgumentError(`Malformed constructor arguments specified: ${e}`)}})).action((async e=>{const t=(0,n.createLogger)(e.logLevel);const r={dryRun:e.dryRun,paths:{deployments:e.deployments},networks:{[e.network]:{apiUrl:e.apiUrl,apiKey:e.apiKey}},contracts:[{network:e.network,address:e.address,contractName:e.name,deployment:e.deployment,constructorArguments:e.arguments}]};try{await(0,i.verifyNonTarget)(r,t)}catch(e){t.error(n.COLORS.error`The verification script exited with an error: ${e}`);process.exit(1)}}));const d=new t.Command("target").description("Verifies contracts that have been a part of a deployment, i.e. have their own deployment files").addOption(s).addOption(a).addOption(o).addOption(l).addOption(u).addOption(c).option("-c,--contracts <contract names>","Comma-separated list of case-sensitive contract names to verify",(e=>(e===null||e===void 0?void 0:e.trim())?e.split(",").map((e=>e.trim())):undefined)).action((async e=>{const t=(0,n.createLogger)(e.logLevel);const r={dryRun:e.dryRun,paths:{deployments:e.deployments},networks:{[e.network]:{apiUrl:e.apiUrl,apiKey:e.apiKey}},filter:e.contracts};try{await(0,i.verifyTarget)(r,t)}catch(e){t.error(n.COLORS.error`The verification script exited with an error: ${e}`);process.exit(1)}}));new t.Command("lz-verify-contract").description("Verify a set of contracts based on hardhat-deploy outputs").addCommand(h).addCommand(d,{isDefault:true}).parseAsync()})();module.exports=r})();
|