sveast 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +76 -3
  2. package/core.js +1 -1
  3. package/entities.js +1 -1
  4. package/index.d.ts +437 -0
  5. package/index.js +1 -1
  6. package/is-valid-type.js +1 -1
  7. package/lexer.js +3 -3
  8. package/module.js +1 -1
  9. package/package.json +6 -1
  10. package/parse-imports-exports.js +1 -1
  11. package/parse-module.js +1 -1
  12. package/parse-sections.js +1 -1
  13. package/parse.js +1 -1
  14. package/runes.js +1 -1
  15. package/scope.d.ts +1792 -0
  16. package/scope.js +1 -0
  17. package/shared-2by923ar.js +3 -0
  18. package/shared-3371ehgf.js +2 -0
  19. package/shared-4wqe6a27.js +5 -0
  20. package/shared-4zk9ntab.js +2 -0
  21. package/shared-artd3d80.js +2 -0
  22. package/{shared-7q3geqgt.js → shared-c9gzmr05.js} +2 -2
  23. package/shared-h6c4cer7.js +2 -0
  24. package/shared-hjcsmz9f.js +2 -0
  25. package/shared-jxkrk6hx.js +10 -0
  26. package/{shared-bx03zqyq.js → shared-n0fpkmn8.js} +2 -2
  27. package/shared-n1wnwhk8.js +3 -0
  28. package/{shared-wr6wdcs6.js → shared-nbaaegmc.js} +2 -2
  29. package/shared-rh41v5ez.js +3 -0
  30. package/shared-shxvsq2a.js +2 -0
  31. package/{shared-3ez2yv7r.js → shared-stdj6se1.js} +2 -2
  32. package/{shared-4t495q2a.js → shared-v0nj05q2.js} +2 -2
  33. package/shared-vjpq32kx.js +2 -0
  34. package/shared-xyqvjc3m.js +10 -0
  35. package/shared-znzncsf2.js +2 -0
  36. package/typescript.js +1 -1
  37. package/walk.d.ts +247 -0
  38. package/walk.js +1 -1
  39. package/shared-1z80250f.js +0 -2
  40. package/shared-2m9w933n.js +0 -2
  41. package/shared-3bhr0q10.js +0 -2
  42. package/shared-bbp47cz4.js +0 -10
  43. package/shared-cr4ebmgx.js +0 -5
  44. package/shared-g06vtkxe.js +0 -2
  45. package/shared-g7qbtk93.js +0 -3
  46. package/shared-j1r12f45.js +0 -3
  47. package/shared-njpj8eam.js +0 -2
  48. package/shared-qbw8n9am.js +0 -2
  49. package/shared-saxr459v.js +0 -2
  50. package/shared-wfjkg544.js +0 -10
  51. package/shared-xa3xp3kp.js +0 -3
@@ -1,10 +0,0 @@
1
- var lt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ct="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",jt={5:ct,"5module":ct+" export import",6:ct+" const class extends export import super"},At=/^in(stanceof)?$/,Gt=/\p{ID_Start}/u,Ht=/[\p{ID_Continue}\u200c\u200d]/u;function u(t,e){if(t<65)return t===36;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t>65535&&e===!1)return!1;return t>=170&&Gt.test(String.fromCodePoint(t))}function y(t,e){if(t<48)return t===36;if(t<58)return!0;if(t<65)return!1;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t>65535&&e===!1)return!1;return t>=170&&Ht.test(String.fromCodePoint(t))}var k=function(e,i){if(i===void 0)i={};this.label=e,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function T(t,e){return new k(t,{beforeExpr:!0,binop:e})}var P={beforeExpr:!0},E={startsExpr:!0},mt={};function b(t,e){if(e===void 0)e={};return e.keyword=t,mt[t]=new k(t,e)}var n={num:new k("num",E),regexp:new k("regexp",E),string:new k("string",E),name:new k("name",E),privateId:new k("privateId",E),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",P),semi:new k(";",P),colon:new k(":",P),dot:new k("."),question:new k("?",P),questionDot:new k("?."),arrow:new k("=>",P),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",P),backQuote:new k("`",E),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:T("||",1),logicalAND:T("&&",2),bitwiseOR:T("|",3),bitwiseXOR:T("^",4),bitwiseAND:T("&",5),equality:T("==/!=/===/!==",6),relational:T("</>/<=/>=",7),bitShift:T("<</>>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:T("%",10),star:T("*",10),slash:T("/",10),starstar:new k("**",{beforeExpr:!0}),coalesce:T("??",1),_break:b("break"),_case:b("case",P),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",P),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",P),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",E),_if:b("if"),_return:b("return",P),_switch:b("switch"),_throw:b("throw",P),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",E),_super:b("super",E),_class:b("class",E),_extends:b("extends",P),_export:b("export"),_import:b("import",E),_null:b("null",E),_true:b("true",E),_false:b("false",E),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,Yt=new RegExp(N.source,"g");function z(t){return t===10||t===13||t===8232||t===8233}function Et(t,e,i){if(i===void 0)i=t.length;for(var s=e;s<i;s++){var o=t.charCodeAt(s);if(z(o))return s<i-1&&o===13&&t.charCodeAt(s+1)===10?s+2:s+1}return-1}var Nt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Tt=Object.prototype,{hasOwnProperty:Qt,toString:Kt}=Tt,Q=Object.hasOwn||function(t,e){return Qt.call(t,e)},wt=Array.isArray||function(t){return Kt.call(t)==="[object Array]"},St=Object.create(null);function tt(t){return St[t]||(St[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function rt(t){if(t<=65535)return String.fromCharCode(t);return t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320)}var Xt=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Y=function(e,i){this.line=e,this.column=i};Y.prototype.offset=function(e){return new Y(this.line,this.column+e)};var at=function(e,i,s){if(this.start=i,this.end=s,e.sourceFile!==null)this.source=e.sourceFile};function Pt(t,e){for(var i=1,s=0;;){var o=Et(t,s,e);if(o<0)return new Y(i,e-s);++i,s=o}}var ut={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ct=!1;function Jt(t){var e={};for(var i in ut)e[i]=t&&Q(t,i)?t[i]:ut[i];if(e.ecmaVersion==="latest")e.ecmaVersion=1e8;else if(e.ecmaVersion==null){if(!Ct&&typeof console==="object"&&console.warn)Ct=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
2
- Defaulting to 2020, but this will stop working in the future.`);e.ecmaVersion=11}else if(e.ecmaVersion>=2015)e.ecmaVersion-=2009;if(e.allowReserved==null)e.allowReserved=e.ecmaVersion<5;if(!t||t.allowHashBang==null)e.allowHashBang=e.ecmaVersion>=14;if(wt(e.onToken)){var s=e.onToken;e.onToken=function(o){return s.push(o)}}if(wt(e.onComment))e.onComment=Zt(e,e.onComment);if(e.sourceType==="commonjs"&&e.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function Zt(t,e){return function(i,s,o,h,p,l){var c={type:i?"Block":"Line",value:s,start:o,end:h};if(t.locations)c.loc=new at(this,p,l);if(t.ranges)c.range=[o,h];e.push(c)}}var F=1,O=2,vt=4,It=8,xt=16,_t=32,nt=64,Lt=128,B=256,K=512,Rt=1024,ot=F|O|B;function yt(t,e){return O|(t?vt:0)|(e?It:0)}var et=0,bt=1,R=2,Vt=3,Ft=4,Ot=5,r=function(e,i,s){this.options=e=Jt(e),this.sourceFile=e.sourceFile,this.keywords=tt(jt[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var o="";if(e.allowReserved!==!0){if(o=lt[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")o+=" await"}this.reservedWords=tt(o);var h=(o?o+" ":"")+lt.strict;if(this.reservedWordsStrict=tt(h),this.reservedWordsStrictBind=tt(h+" "+lt.strictBind),this.input=String(i),this.containsEsc=!1,this.pos=s||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(s){if(this.lineStart=this.input.lastIndexOf(`
3
- `,s-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(N).length}else this.lineStart=0;if(this.type=n.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?O:F),this.regexpState=null,this.privateNameStack=[]},I={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};r.prototype.parse=function(){var e=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(i)})};I.inFunction.get=function(){return(this.currentVarScope().flags&O)>0};I.inGenerator.get=function(){return(this.currentVarScope().flags&It)>0};I.inAsync.get=function(){return(this.currentVarScope().flags&vt)>0};I.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],i=e.flags;if(i&(B|K))return!1;if(i&O)return(i&vt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};I.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&F)return!0;return!1};I.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags;return(e&nt)>0||this.options.allowSuperOutsideMethod};I.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Lt)>0};I.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};I.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],i=e.flags;if(i&(B|K)||i&O&&!(i&xt))return!0}return!1};I.allowUsing.get=function(){var t=this.currentScope(),e=t.flags;if(e&Rt)return!1;if(!this.inModule&&e&F)return!1;return!0};I.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&B)>0};r.extend=function(){var e=[],i=arguments.length;while(i--)e[i]=arguments[i];var s=this;for(var o=0;o<e.length;o++)s=e[o](s);return s};r.parse=function(e,i){return new this(i,e).parse()};r.parseExpressionAt=function(e,i,s){var o=new this(s,e,i);return o.nextToken(),o.parseExpression()};r.tokenizer=function(e,i){return new this(i,e)};Object.defineProperties(r.prototype,I);var A=r.prototype,$t=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;A.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){S.lastIndex=t,t+=S.exec(this.input)[0].length;var e=$t.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){S.lastIndex=t+e[0].length;var i=S.exec(this.input),s=i.index+i[0].length,o=this.input.charAt(s);return o===";"||o==="}"||N.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(o)||o==="!"&&this.input.charAt(s+1)==="=")}if(t+=e[0].length,S.lastIndex=t,t+=S.exec(this.input)[0].length,this.input[t]===";")t++}};A.eat=function(t){if(this.type===t)return this.next(),!0;else return!1};A.isContextual=function(t){return this.type===n.name&&this.value===t&&!this.containsEsc};A.eatContextual=function(t){if(!this.isContextual(t))return!1;return this.next(),!0};A.catchStackOverflow=function(t){try{return t()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,"Not enough stack space to parse input");else throw e}};A.expectContextual=function(t){if(!this.eatContextual(t))this.unexpected()};A.canInsertSemicolon=function(){return this.type===n.eof||this.type===n.braceR||N.test(this.input.slice(this.lastTokEnd,this.start))};A.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};A.semicolon=function(){if(!this.eat(n.semi)&&!this.insertSemicolon())this.unexpected()};A.afterTrailingComma=function(t,e){if(this.type===t){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!e)this.next();return!0}};A.expect=function(t){this.eat(t)||this.unexpected()};A.unexpected=function(t){this.raise(t!=null?t:this.start,"Unexpected token")};var ht=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};A.checkPatternErrors=function(t,e){if(!t)return;if(t.trailingComma>-1)this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;if(i>-1)this.raiseRecoverable(i,e?"Assigning to rvalue":"Parenthesized pattern")};A.checkExpressionErrors=function(t,e){if(!t)return!1;var{shorthandAssign:i,doubleProto:s}=t;if(!e)return i>=0||s>=0;if(i>=0)this.raise(i,"Shorthand property assignments are valid only in destructuring patterns");if(s>=0)this.raiseRecoverable(s,"Redefinition of __proto__ property")};A.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};A.isSimpleAssignTarget=function(t){if(t.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(t.expression);return t.type==="Identifier"||t.type==="MemberExpression"};var f=r.prototype;f.parseTopLevel=function(t){var e=Object.create(null);if(!t.body)t.body=[];while(this.type!==n.eof){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,o=Object.keys(this.undefinedExports);s<o.length;s+=1){var h=o[s];this.raiseRecoverable(this.undefinedExports[h].start,"Export '"+h+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(t,"Program")};var kt={kind:"loop"},te={kind:"switch"};f.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.lastIndex=this.pos;var e=S.exec(this.input),i=this.pos+e[0].length,s=this.fullCharCodeAt(i);if(s===91||s===92)return!0;if(t)return!1;if(s===123)return!0;if(u(s)){var o=i;do i+=s<=65535?1:2;while(y(s=this.fullCharCodeAt(i)));if(s===92)return!0;var h=this.input.slice(o,i);if(!At.test(h))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.lastIndex=this.pos;var t=S.exec(this.input),e=this.pos+t[0].length,i;return!N.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(y(i=this.fullCharCodeAt(e+8))||i===92))};f.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;S.lastIndex=this.pos;var i=S.exec(this.input),s=this.pos+i[0].length;if(N.test(this.input.slice(this.pos,s)))return!1;if(t){var o=s+5,h;if(this.input.slice(s,o)!=="using"||o===this.input.length||y(h=this.fullCharCodeAt(o))||h===92)return!1;S.lastIndex=o;var p=S.exec(this.input);if(s=o+p[0].length,p&&N.test(this.input.slice(o,s)))return!1}var l=this.fullCharCodeAt(s);if(!u(l)&&l!==92)return!1;var c=s;do s+=l<=65535?1:2;while(y(l=this.fullCharCodeAt(s)));if(l===92)return!0;var d=this.input.slice(c,s);if(At.test(d))return!1;if(e&&!t&&d==="of"){S.lastIndex=s;var v=S.exec(this.input);if(s=s+v[0].length,this.input.charCodeAt(s)!==61||(l=this.input.charCodeAt(s+1))===61||l===62)return!1}return!0};f.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)};f.isUsing=function(t){return this.isUsingKeyword(!1,t)};f.parseStatement=function(t,e,i){var s=this.type,o=this.startNode(),h;if(this.isLet(t))s=n._var,h="let";switch(s){case n._break:case n._continue:return this.parseBreakContinueStatement(o,s.keyword);case n._debugger:return this.parseDebuggerStatement(o);case n._do:return this.parseDoStatement(o);case n._for:return this.parseForStatement(o);case n._function:if(t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(o,!1,!t);case n._class:if(t)this.unexpected();return this.parseClass(o,!0);case n._if:return this.parseIfStatement(o);case n._return:return this.parseReturnStatement(o);case n._switch:return this.parseSwitchStatement(o);case n._throw:return this.parseThrowStatement(o);case n._try:return this.parseTryStatement(o);case n._const:case n._var:if(h=h||this.value,t&&h!=="var")this.unexpected();return this.parseVarStatement(o,h);case n._while:return this.parseWhileStatement(o);case n._with:return this.parseWithStatement(o);case n.braceL:return this.parseBlock(!0,o);case n.semi:return this.parseEmptyStatement(o);case n._export:case n._import:if(this.options.ecmaVersion>10&&s===n._import){S.lastIndex=this.pos;var p=S.exec(this.input),l=this.pos+p[0].length,c=this.input.charCodeAt(l);if(c===40||c===46)return this.parseExpressionStatement(o,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!e)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return s===n._import?this.parseImport(o):this.parseExport(o,i);default:if(this.isAsyncFunction()){if(t)this.unexpected();return this.next(),this.parseFunctionStatement(o,!0,!t)}var d=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(d){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(t)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(d==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(o,!1,d),this.semicolon(),this.finishNode(o,"VariableDeclaration")}var v=this.value,g=this.parseExpression();if(s===n.name&&g.type==="Identifier"&&this.eat(n.colon))return this.parseLabeledStatement(o,v,g,t);else return this.parseExpressionStatement(o,g)}};f.parseBreakContinueStatement=function(t,e){var i=e==="break";if(this.next(),this.eat(n.semi)||this.insertSemicolon())t.label=null;else if(this.type!==n.name)this.unexpected();else t.label=this.parseIdent(),this.semicolon();var s=0;for(;s<this.labels.length;++s){var o=this.labels[s];if(t.label==null||o.name===t.label.name){if(o.kind!=null&&(i||o.kind==="loop"))break;if(t.label&&i)break}}if(s===this.labels.length)this.raise(t.start,"Unsyntactic "+e);return this.finishNode(t,i?"BreakStatement":"ContinueStatement")};f.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};f.parseDoStatement=function(t){if(this.next(),this.labels.push(kt),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(n._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(n.semi);else this.semicolon();return this.finishNode(t,"DoWhileStatement")};f.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(kt),this.enterScope(0),this.expect(n.parenL),this.type===n.semi){if(e>-1)this.unexpected(e);return this.parseFor(t,null)}var i=this.isLet();if(this.type===n._var||this.type===n._const||i){var s=this.startNode(),o=i?"let":this.value;return this.next(),this.parseVar(s,!0,o),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(t,s,e)}var h=this.isContextual("let"),p=!1,l=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(l){var c=this.startNode();if(this.next(),l==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(c,!0,l),this.finishNode(c,"VariableDeclaration"),this.parseForAfterInit(t,c,e)}var d=this.containsEsc,v=new ht,g=this.start,C=e>-1?this.parseExprSubscripts(v,"await"):this.parseExpression(!0,v);if(this.type===n._in||(p=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(e>-1){if(this.type===n._in)this.unexpected(e);t.await=!0}else if(p&&this.options.ecmaVersion>=8){if(C.start===g&&!d&&C.type==="Identifier"&&C.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)t.await=!1}if(h&&p)this.raise(C.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(C,!1,v),this.checkLValPattern(C),this.parseForIn(t,C)}else this.checkExpressionErrors(v,!0);if(e>-1)this.unexpected(e);return this.parseFor(t,C)};f.parseForAfterInit=function(t,e,i){if((this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1){if(this.type===n._in){if((e.kind==="using"||e.kind==="await using")&&!e.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&i>-1)this.unexpected(i)}else if(this.options.ecmaVersion>=9)t.await=i>-1;return this.parseForIn(t,e)}if(i>-1)this.unexpected(i);return this.parseFor(t,e)};f.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,H|(i?0:ft),!1,e)};f.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(n._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};f.parseReturnStatement=function(t){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(n.semi)||this.insertSemicolon())t.argument=null;else t.argument=this.parseExpression(),this.semicolon();return this.finishNode(t,"ReturnStatement")};f.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(n.braceL),this.labels.push(te),this.enterScope(Rt);var e;for(var i=!1;this.type!==n.braceR;)if(this.type===n._case||this.type===n._default){var s=this.type===n._case;if(e)this.finishNode(e,"SwitchCase");if(t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s)e.test=this.parseExpression();else{if(i)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");i=!0,e.test=null}this.expect(n.colon)}else{if(!e)this.unexpected();e.consequent.push(this.parseStatement(null))}if(this.exitScope(),e)this.finishNode(e,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};f.parseThrowStatement=function(t){if(this.next(),N.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var ee=[];f.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?_t:0),this.checkLValPattern(t,e?Ft:R),this.expect(n.parenR),t};f.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===n._catch){var e=this.startNode();if(this.next(),this.eat(n.parenL))e.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();e.param=null,this.enterScope(0)}e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}if(t.finalizer=this.eat(n._finally)?this.parseBlock():null,!t.handler&&!t.finalizer)this.raise(t.start,"Missing catch or finally clause");return this.finishNode(t,"TryStatement")};f.parseVarStatement=function(t,e,i){return this.next(),this.parseVar(t,!1,e,i),this.semicolon(),this.finishNode(t,"VariableDeclaration")};f.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(kt),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};f.parseWithStatement=function(t){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};f.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};f.parseLabeledStatement=function(t,e,i,s){for(var o=0,h=this.labels;o<h.length;o+=1){var p=h[o];if(p.name===e)this.raise(i.start,"Label '"+e+"' is already declared")}var l=this.type.isLoop?"loop":this.type===n._switch?"switch":null;for(var c=this.labels.length-1;c>=0;c--){var d=this.labels[c];if(d.statementStart===t.start)d.statementStart=this.start,d.kind=l;else break}return this.labels.push({name:e,kind:l,statementStart:this.start}),t.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")};f.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};f.parseBlock=function(t,e,i){if(t===void 0)t=!0;if(e===void 0)e=this.startNode();if(e.body=[],this.expect(n.braceL),t)this.enterScope(0);while(this.type!==n.braceR){var s=this.parseStatement(null);e.body.push(s)}if(i)this.strict=!1;if(this.next(),t)this.exitScope();return this.finishNode(e,"BlockStatement")};f.parseFor=function(t,e){return t.init=e,this.expect(n.semi),t.test=this.type===n.semi?null:this.parseExpression(),this.expect(n.semi),t.update=this.type===n.parenR?null:this.parseExpression(),this.expect(n.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};f.parseForIn=function(t,e){var i=this.type===n._in;if(this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier"))this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer");return t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(n.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(t,e,i,s){t.declarations=[],t.kind=i;for(;;){var o=this.startNode();if(this.parseVarId(o,i),this.eat(n.eq))o.init=this.parseMaybeAssign(e);else if(!s&&i==="const"&&!(this.type===n._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!s&&(i==="using"||i==="await using")&&this.options.ecmaVersion>=17&&this.type!==n._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration");else if(!s&&o.id.type!=="Identifier"&&!(e&&(this.type===n._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else o.init=null;if(t.declarations.push(this.finishNode(o,"VariableDeclarator")),!this.eat(n.comma))break}return t};f.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?bt:R,!1)};var H=1,ft=2,Bt=4;f.parseFunction=function(t,e,i,s,o){if(this.initFunction(t),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s){if(this.type===n.star&&e&ft)this.unexpected();t.generator=this.eat(n.star)}if(this.options.ecmaVersion>=8)t.async=!!s;if(e&H){if(t.id=e&Bt&&this.type!==n.name?null:this.parseIdent(),t.id&&!(e&ft))this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?bt:R:Vt)}var h=this.yieldPos,p=this.awaitPos,l=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(yt(t.async,t.generator)),!(e&H))t.id=this.type===n.name?this.parseIdent():null;return this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1,o),this.yieldPos=h,this.awaitPos=p,this.awaitIdentPos=l,this.finishNode(t,e&H?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(t){this.expect(n.parenL),t.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.enterClassBody(),o=this.startNode(),h=!1;o.body=[],this.expect(n.braceL);while(this.type!==n.braceR){var p=this.parseClassElement(t.superClass!==null);if(p){if(o.body.push(p),p.type==="MethodDefinition"&&p.kind==="constructor"){if(h)this.raiseRecoverable(p.start,"Duplicate constructor in the same class");h=!0}else if(p.key&&p.key.type==="PrivateIdentifier"&&ie(s,p))this.raiseRecoverable(p.key.start,"Identifier '#"+p.key.name+"' has already been declared")}}return this.strict=i,this.next(),t.body=this.finishNode(o,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(t){if(this.eat(n.semi))return null;var e=this.options.ecmaVersion,i=this.startNode(),s="",o=!1,h=!1,p="method",l=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(n.braceL))return this.parseClassStaticBlock(i),i;if(this.isClassElementNameStart()||this.type===n.star)l=!0;else s="static"}if(i.static=l,!s&&e>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===n.star)&&!this.canInsertSemicolon())h=!0;else s="async";if(!s&&(e>=9||!h)&&this.eat(n.star))o=!0;if(!s&&!h&&!o){var c=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())p=c;else s=c}if(s)i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier");else this.parseClassElementName(i);if(e<13||this.type===n.parenL||p!=="method"||o||h){var d=!i.static&&it(i,"constructor"),v=d&&t;if(d&&p!=="method")this.raise(i.key.start,"Constructor can't have get/set modifier");i.kind=d?"constructor":p,this.parseClassMethod(i,o,h,v)}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===n.name||this.type===n.privateId||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword};f.parseClassElementName=function(t){if(this.type===n.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");t.computed=!1,t.key=this.parsePrivateIdent()}else this.parsePropertyName(t)};f.parseClassMethod=function(t,e,i,s){var o=t.key;if(t.kind==="constructor"){if(e)this.raise(o.start,"Constructor can't be a generator");if(i)this.raise(o.start,"Constructor can't be an async method")}else if(t.static&&it(t,"prototype"))this.raise(o.start,"Classes may not have a static property named prototype");var h=t.value=this.parseMethod(e,i,s);if(t.kind==="get"&&h.params.length!==0)this.raiseRecoverable(h.start,"getter should have no params");if(t.kind==="set"&&h.params.length!==1)this.raiseRecoverable(h.start,"setter should have exactly one param");if(t.kind==="set"&&h.params[0].type==="RestElement")this.raiseRecoverable(h.params[0].start,"Setter cannot use rest params");return this.finishNode(t,"MethodDefinition")};f.parseClassField=function(t){if(it(t,"constructor"))this.raise(t.key.start,"Classes can't have a field named 'constructor'");else if(t.static&&it(t,"prototype"))this.raise(t.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(n.eq))this.enterScope(K|nt),t.value=this.parseMaybeAssign(),this.exitScope();else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")};f.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;this.labels=[],this.enterScope(B|nt);while(this.type!==n.braceR){var i=this.parseStatement(null);t.body.push(i)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};f.parseClassId=function(t,e){if(this.type===n.name){if(t.id=this.parseIdent(),e)this.checkLValSimple(t.id,R,!1)}else{if(e===!0)this.unexpected();t.id=null}};f.parseClassSuper=function(t){t.superClass=this.eat(n._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};f.exitClassBody=function(){var t=this.privateNameStack.pop(),{declared:e,used:i}=t;if(!this.options.checkPrivateFields)return;var s=this.privateNameStack.length,o=s===0?null:this.privateNameStack[s-1];for(var h=0;h<i.length;++h){var p=i[h];if(!Q(e,p.name))if(o)o.used.push(p);else this.raiseRecoverable(p.start,"Private field '#"+p.name+"' must be declared in an enclosing class")}};function ie(t,e){var i=e.key.name,s=t[i],o="true";if(e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set"))o=(e.static?"s":"i")+e.kind;if(s==="iget"&&o==="iset"||s==="iset"&&o==="iget"||s==="sget"&&o==="sset"||s==="sset"&&o==="sget")return t[i]="true",!1;else if(!s)return t[i]=o,!1;else return!0}function it(t,e){var{computed:i,key:s}=t;return!i&&(s.type==="Identifier"&&s.name===e||s.type==="Literal"&&s.value===e)}f.parseExportAllDeclaration=function(t,e){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart);else t.exported=null;if(this.expectContextual("from"),this.type!==n.string)this.unexpected();if(t.source=this.parseExprAtom(),this.options.ecmaVersion>=16)t.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(t,"ExportAllDeclaration")};f.parseExport=function(t,e){if(this.next(),this.eat(n.star))return this.parseExportAllDeclaration(t,e);if(this.eat(n._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration")this.checkVariableExport(e,t.declaration.declarations);else this.checkExport(e,t.declaration.id,t.declaration.id.start);if(t.specifiers=[],t.source=null,this.options.ecmaVersion>=16)t.attributes=[]}else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from")){if(this.type!==n.string)this.unexpected();if(t.source=this.parseExprAtom(),this.options.ecmaVersion>=16)t.attributes=this.parseWithClause()}else{for(var i=0,s=t.specifiers;i<s.length;i+=1){var o=s[i];if(this.checkUnreserved(o.local),this.checkLocalExport(o.local),o.local.type==="Literal")this.raise(o.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(t.source=null,this.options.ecmaVersion>=16)t.attributes=[]}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};f.parseExportDeclaration=function(t){return this.parseStatement(null)};f.parseExportDefaultDeclaration=function(){var t;if(this.type===n._function||(t=this.isAsyncFunction())){var e=this.startNode();if(this.next(),t)this.next();return this.parseFunction(e,H|Bt,!1,t)}else if(this.type===n._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};f.checkExport=function(t,e,i){if(!t)return;if(typeof e!=="string")e=e.type==="Identifier"?e.name:e.value;if(Q(t,e))this.raiseRecoverable(i,"Duplicate export '"+e+"'");t[e]=!0};f.checkPatternExport=function(t,e){var i=e.type;if(i==="Identifier")this.checkExport(t,e,e.start);else if(i==="ObjectPattern")for(var s=0,o=e.properties;s<o.length;s+=1){var h=o[s];this.checkPatternExport(t,h)}else if(i==="ArrayPattern")for(var p=0,l=e.elements;p<l.length;p+=1){var c=l[p];if(c)this.checkPatternExport(t,c)}else if(i==="Property")this.checkPatternExport(t,e.value);else if(i==="AssignmentPattern")this.checkPatternExport(t,e.left);else if(i==="RestElement")this.checkPatternExport(t,e.argument)};f.checkVariableExport=function(t,e){if(!t)return;for(var i=0,s=e;i<s.length;i+=1){var o=s[i];this.checkPatternExport(t,o.id)}};f.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};f.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")};f.parseExportSpecifiers=function(t){var e=[],i=!0;this.expect(n.braceL);while(!this.eat(n.braceR)){if(!i){if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break}else i=!1;e.push(this.parseExportSpecifier(t))}return e};f.parseImport=function(t){if(this.next(),this.type===n.string)t.specifiers=ee,t.source=this.parseExprAtom();else t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===n.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)t.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(t,"ImportDeclaration")};f.parseImportSpecifier=function(){var t=this.startNode();if(t.imported=this.parseModuleExportName(),this.eatContextual("as"))t.local=this.parseIdent();else this.checkUnreserved(t.imported),t.local=t.imported;return this.checkLValSimple(t.local,R),this.finishNode(t,"ImportSpecifier")};f.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,R),this.finishNode(t,"ImportDefaultSpecifier")};f.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,R),this.finishNode(t,"ImportNamespaceSpecifier")};f.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===n.name){if(t.push(this.parseImportDefaultSpecifier()),!this.eat(n.comma))return t}if(this.type===n.star)return t.push(this.parseImportNamespaceSpecifier()),t;this.expect(n.braceL);while(!this.eat(n.braceR)){if(!e){if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break}else e=!1;t.push(this.parseImportSpecifier())}return t};f.parseWithClause=function(){var t=[];if(!this.eat(n._with))return t;this.expect(n.braceL);var e={},i=!0;while(!this.eat(n.braceR)){if(!i){if(this.expect(n.comma),this.afterTrailingComma(n.braceR))break}else i=!1;var s=this.parseImportAttribute(),o=s.key.type==="Identifier"?s.key.name:s.key.value;if(Q(e,o))this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+o+"'");e[o]=!0,t.push(s)}return t};f.parseImportAttribute=function(){var t=this.startNode();if(t.key=this.type===n.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(n.colon),this.type!==n.string)this.unexpected();return t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")};f.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===n.string){var t=this.parseLiteral(this.value);if(Xt.test(t.value))this.raise(t.start,"An export name cannot include a lone surrogate.");return t}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};f.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value==="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var _=r.prototype;_.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":if(this.inAsync&&t.name==="await")this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(t.type="ObjectPattern",i)this.checkPatternErrors(i,!0);for(var s=0,o=t.properties;s<o.length;s+=1){var h=o[s];if(this.toAssignable(h,e),h.type==="RestElement"&&(h.argument.type==="ArrayPattern"||h.argument.type==="ObjectPattern"))this.raise(h.argument.start,"Unexpected token")}break;case"Property":if(t.kind!=="init")this.raise(t.key.start,"Object pattern can't contain getter or setter");this.toAssignable(t.value,e);break;case"ArrayExpression":if(t.type="ArrayPattern",i)this.checkPatternErrors(i,!0);this.toAssignableList(t.elements,e);break;case"SpreadElement":if(t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern")this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(t.operator!=="=")this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else if(i)this.checkPatternErrors(i,!0);return t};_.toAssignableList=function(t,e){var i=t.length;for(var s=0;s<i;s++){var o=t[s];if(o)this.toAssignable(o,e)}if(i){var h=t[i-1];if(this.options.ecmaVersion===6&&e&&h&&h.type==="RestElement"&&h.argument.type!=="Identifier")this.unexpected(h.argument.start)}return t};_.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};_.parseRestBinding=function(){var t=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==n.name)this.unexpected();return t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};_.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case n.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(n.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case n.braceL:return this.parseObj(!0)}return this.parseIdent()};_.parseBindingList=function(t,e,i,s){var o=[],h=!0;while(!this.eat(t)){if(h)h=!1;else this.expect(n.comma);if(e&&this.type===n.comma)o.push(null);else if(i&&this.afterTrailingComma(t))break;else if(this.type===n.ellipsis){var p=this.parseRestBinding();if(this.parseBindingListItem(p),o.push(p),this.type===n.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(t);break}else o.push(this.parseAssignableListItem(s))}return o};_.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e};_.parseBindingListItem=function(t){return t};_.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(n.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};_.checkLValSimple=function(t,e,i){if(e===void 0)e=et;var s=e!==et;switch(t.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(t.name))this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode");if(s){if(e===R&&t.name==="let")this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name");if(i){if(Q(i,t.name))this.raiseRecoverable(t.start,"Argument name clash");i[t.name]=!0}if(e!==Ot)this.declareName(t.name,e,t.start)}break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(s)this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":if(s)this.raiseRecoverable(t.start,"Binding parenthesized expression");return this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}};_.checkLValPattern=function(t,e,i){if(e===void 0)e=et;switch(t.type){case"ObjectPattern":for(var s=0,o=t.properties;s<o.length;s+=1){var h=o[s];this.checkLValInnerPattern(h,e,i)}break;case"ArrayPattern":for(var p=0,l=t.elements;p<l.length;p+=1){var c=l[p];if(c)this.checkLValInnerPattern(c,e,i)}break;default:this.checkLValSimple(t,e,i)}};_.checkLValInnerPattern=function(t,e,i){if(e===void 0)e=et;switch(t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var L=function(e,i,s,o,h){this.token=e,this.isExpr=!!i,this.preserveSpace=!!s,this.override=o,this.generator=!!h},w={b_stat:new L("{",!1),b_expr:new L("{",!0),b_tmpl:new L("${",!1),p_stat:new L("(",!1),p_expr:new L("(",!0),q_tmpl:new L("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new L("function",!1),f_expr:new L("function",!0),f_expr_gen:new L("function",!0,!1,null,!0),f_gen:new L("function",!1,!1,null,!0)},j=r.prototype;j.initialContext=function(){return[w.b_stat]};j.curContext=function(){return this.context[this.context.length-1]};j.braceIsBlock=function(t){var e=this.curContext();if(e===w.f_expr||e===w.f_stat)return!0;if(t===n.colon&&(e===w.b_stat||e===w.b_expr))return!e.isExpr;if(t===n._return||t===n.name&&this.exprAllowed)return N.test(this.input.slice(this.lastTokEnd,this.start));if(t===n._else||t===n.semi||t===n.eof||t===n.parenR||t===n.arrow)return!0;if(t===n.braceL)return e===w.b_stat;if(t===n._var||t===n._const||t===n.name)return!1;return!this.exprAllowed};j.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};j.updateContext=function(t){var e,i=this.type;if(i.keyword&&t===n.dot)this.exprAllowed=!1;else if(e=i.updateContext)e.call(this,t);else this.exprAllowed=i.beforeExpr};j.overrideContext=function(t){if(this.curContext()!==t)this.context[this.context.length-1]=t};n.parenR.updateContext=n.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();if(t===w.b_stat&&this.curContext().token==="function")t=this.context.pop();this.exprAllowed=!t.isExpr};n.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?w.b_stat:w.b_expr),this.exprAllowed=!0};n.dollarBraceL.updateContext=function(){this.context.push(w.b_tmpl),this.exprAllowed=!0};n.parenL.updateContext=function(t){var e=t===n._if||t===n._for||t===n._with||t===n._while;this.context.push(e?w.p_stat:w.p_expr),this.exprAllowed=!0};n.incDec.updateContext=function(){};n._function.updateContext=n._class.updateContext=function(t){if(t.beforeExpr&&t!==n._else&&!(t===n.semi&&this.curContext()!==w.p_stat)&&!(t===n._return&&N.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===n.colon||t===n.braceL)&&this.curContext()===w.b_stat))this.context.push(w.f_expr);else this.context.push(w.f_stat);this.exprAllowed=!1};n.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};n.backQuote.updateContext=function(){if(this.curContext()===w.q_tmpl)this.context.pop();else this.context.push(w.q_tmpl);this.exprAllowed=!1};n.star.updateContext=function(t){if(t===n._function){var e=this.context.length-1;if(this.context[e]===w.f_expr)this.context[e]=w.f_expr_gen;else this.context[e]=w.f_gen}this.exprAllowed=!0};n.name.updateContext=function(t){var e=!1;if(this.options.ecmaVersion>=6&&t!==n.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())e=!0}this.exprAllowed=e};var m=r.prototype;m.checkPropClash=function(t,e,i){if(this.options.ecmaVersion>=9&&t.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))return;var s=t.key,o;switch(s.type){case"Identifier":o=s.name;break;case"Literal":o=String(s.value);break;default:return}var h=t.kind;if(this.options.ecmaVersion>=6){if(o==="__proto__"&&h==="init"){if(e.proto)if(i){if(i.doubleProto<0)i.doubleProto=s.start}else this.raiseRecoverable(s.start,"Redefinition of __proto__ property");e.proto=!0}return}o="$"+o;var p=e[o];if(p){var l;if(h==="init")l=this.strict&&p.init||p.get||p.set;else l=p.init||p[h];if(l)this.raiseRecoverable(s.start,"Redefinition of property")}else p=e[o]={init:!1,get:!1,set:!1};p[h]=!0};m.parseExpression=function(t,e){var i=this;return this.catchStackOverflow(function(){var{start:s,startLoc:o}=i,h=i.parseMaybeAssign(t,e);if(i.type===n.comma){var p=i.startNodeAt(s,o);p.expressions=[h];while(i.eat(n.comma))p.expressions.push(i.parseMaybeAssign(t,e));return i.finishNode(p,"SequenceExpression")}return h})};m.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(t);else this.exprAllowed=!1;var s=!1,o=-1,h=-1,p=-1;if(e)o=e.parenthesizedAssign,h=e.trailingComma,p=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1;else e=new ht,s=!0;var l=this.start,c=this.startLoc;if(this.type===n.parenL||this.type===n.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await";var d=this.parseMaybeConditional(t,e);if(i)d=i.call(this,d,l,c);if(this.type.isAssign){var v=this.startNodeAt(l,c);if(v.operator=this.value,this.type===n.eq)d=this.toAssignable(d,!1,e);if(!s)e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1;if(e.shorthandAssign>=d.start)e.shorthandAssign=-1;if(this.type===n.eq)this.checkLValPattern(d);else this.checkLValSimple(d);if(v.left=d,this.next(),v.right=this.parseMaybeAssign(t),p>-1)e.doubleProto=p;return this.finishNode(v,"AssignmentExpression")}else if(s)this.checkExpressionErrors(e,!0);if(o>-1)e.parenthesizedAssign=o;if(h>-1)e.trailingComma=h;return d};m.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,o=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return o;if(!(o.type==="ArrowFunctionExpression"&&o.start===i)&&this.eat(n.question)){var h=this.startNodeAt(i,s);return h.test=o,h.consequent=this.parseMaybeAssign(),this.expect(n.colon),h.alternate=this.parseMaybeAssign(t),this.finishNode(h,"ConditionalExpression")}return o};m.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,o=this.parseMaybeUnary(e,!1,!1,t);if(this.checkExpressionErrors(e))return o;return o.start===i&&o.type==="ArrowFunctionExpression"?o:this.parseExprOp(o,i,s,-1,t)};m.parseExprOp=function(t,e,i,s,o){var h=this.type.binop;if(h!=null&&(!o||this.type!==n._in)){if(h>s){var p=this.type===n.logicalOR||this.type===n.logicalAND,l=this.type===n.coalesce;if(l)h=n.logicalAND.binop;var c=this.value;this.next();var d=this.start,v=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,o),d,v,h,o),C=this.buildBinary(e,i,t,g,c,p||l);if(p&&this.type===n.coalesce||l&&(this.type===n.logicalOR||this.type===n.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(C,e,i,s,o)}}return t};m.buildBinary=function(t,e,i,s,o,h){if(s.type==="PrivateIdentifier")this.raise(s.start,"Private identifier can only be left side of binary expression");var p=this.startNodeAt(t,e);return p.left=i,p.operator=o,p.right=s,this.finishNode(p,h?"LogicalExpression":"BinaryExpression")};m.parseMaybeUnary=function(t,e,i,s){var o=this.start,h=this.startLoc,p;if(this.isContextual("await")&&this.canAwait)p=this.parseAwait(s),e=!0;else if(this.type.prefix){var l=this.startNode(),c=this.type===n.incDec;if(l.operator=this.value,l.prefix=!0,this.next(),l.argument=this.parseMaybeUnary(null,!0,c,s),this.checkExpressionErrors(t,!0),c)this.checkLValSimple(l.argument);else if(this.strict&&l.operator==="delete"&&Mt(l.argument))this.raiseRecoverable(l.start,"Deleting local variable in strict mode");else if(l.operator==="delete"&&dt(l.argument))this.raiseRecoverable(l.start,"Private fields can not be deleted");else e=!0;p=this.finishNode(l,c?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===n.privateId){if((s||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(p=this.parsePrivateIdent(),this.type!==n._in)this.unexpected()}else{if(p=this.parseExprSubscripts(t,s),this.checkExpressionErrors(t))return p;while(this.type.postfix&&!this.canInsertSemicolon()){var d=this.startNodeAt(o,h);d.operator=this.value,d.prefix=!1,d.argument=p,this.checkLValSimple(p),this.next(),p=this.finishNode(d,"UpdateExpression")}}if(!i&&!(p.type==="ArrowFunctionExpression"&&p.start===o)&&this.eat(n.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(o,h,p,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return p};function Mt(t){return t.type==="Identifier"||t.type==="ParenthesizedExpression"&&Mt(t.expression)}function dt(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&dt(t.expression)||t.type==="ParenthesizedExpression"&&dt(t.expression)}m.parseExprSubscripts=function(t,e){var i=this.start,s=this.startLoc,o=this.parseExprAtom(t,e);if(o.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return o;var h=this.parseSubscripts(o,i,s,!1,e);if(t&&h.type==="MemberExpression"){if(t.parenthesizedAssign>=h.start)t.parenthesizedAssign=-1;if(t.parenthesizedBind>=h.start)t.parenthesizedBind=-1;if(t.trailingComma>=h.start)t.trailingComma=-1}return h};m.parseSubscripts=function(t,e,i,s,o){var h=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,p=!1;while(!0){var l=this.parseSubscript(t,e,i,s,h,p,o);if(l.optional)p=!0;if(l===t||l.type==="ArrowFunctionExpression"){if(p){var c=this.startNodeAt(e,i);c.expression=l,l=this.finishNode(c,"ChainExpression")}return l}t=l}};m.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(n.arrow)};m.parseSubscriptAsyncArrow=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!0,s)};m.parseSubscript=function(t,e,i,s,o,h,p){var l=this.options.ecmaVersion>=11,c=l&&this.eat(n.questionDot);if(s&&c)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var d=this.eat(n.bracketL);if(d||c&&this.type!==n.parenL&&this.type!==n.backQuote||this.eat(n.dot)){var v=this.startNodeAt(e,i);if(v.object=t,d)v.property=this.parseExpression(),this.expect(n.bracketR);else if(this.type===n.privateId&&t.type!=="Super")v.property=this.parsePrivateIdent();else v.property=this.parseIdent(this.options.allowReserved!=="never");if(v.computed=!!d,l)v.optional=c;t=this.finishNode(v,"MemberExpression")}else if(!s&&this.eat(n.parenL)){var g=new ht,C=this.yieldPos,G=this.awaitPos,M=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Z=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1,g);if(o&&!c&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=C,this.awaitPos=G,this.awaitIdentPos=M,this.parseSubscriptAsyncArrow(e,i,Z,p)}this.checkExpressionErrors(g,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=G||this.awaitPos,this.awaitIdentPos=M||this.awaitIdentPos;var U=this.startNodeAt(e,i);if(U.callee=t,U.arguments=Z,l)U.optional=c;t=this.finishNode(U,"CallExpression")}else if(this.type===n.backQuote){if(c||h)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var W=this.startNodeAt(e,i);W.tag=t,W.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(W,"TaggedTemplateExpression")}return t};m.parseExprAtom=function(t,e,i){if(this.type===n.slash)this.readRegexp();var s,o=this.potentialArrowAt===this.start;switch(this.type){case n._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(s=this.startNode(),this.next(),this.type===n.parenL&&!this.allowDirectSuper)this.raise(s.start,"super() call outside constructor of a subclass");if(this.type!==n.dot&&this.type!==n.bracketL&&this.type!==n.parenL)this.unexpected();return this.finishNode(s,"Super");case n._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case n.name:var h=this.start,p=this.startLoc,l=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!l&&c.name==="async"&&!this.canInsertSemicolon()&&this.eat(n._function))return this.overrideContext(w.f_expr),this.parseFunction(this.startNodeAt(h,p),0,!1,!0,e);if(o&&!this.canInsertSemicolon()){if(this.eat(n.arrow))return this.parseArrowExpression(this.startNodeAt(h,p),[c],!1,e);if(this.options.ecmaVersion>=8&&c.name==="async"&&this.type===n.name&&!l&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(c=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(n.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(h,p),[c],!0,e)}}return c;case n.regexp:var d=this.value;return s=this.parseLiteral(d.value),s.regex={pattern:d.pattern,flags:d.flags},s;case n.num:case n.string:return this.parseLiteral(this.value);case n._null:case n._true:case n._false:return s=this.startNode(),s.value=this.type===n._null?null:this.type===n._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case n.parenL:var v=this.start,g=this.parseParenAndDistinguishExpression(o,e);if(t){if(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g))t.parenthesizedAssign=v;if(t.parenthesizedBind<0)t.parenthesizedBind=v}return g;case n.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(n.bracketR,!0,!0,t),this.finishNode(s,"ArrayExpression");case n.braceL:return this.overrideContext(w.b_expr),this.parseObj(!1,t);case n._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case n._class:return this.parseClass(this.startNode(),!1);case n._new:return this.parseNew();case n.backQuote:return this.parseTemplate();case n._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(i);else return this.unexpected();default:return this.parseExprAtomDefault()}};m.parseExprAtomDefault=function(){this.unexpected()};m.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===n.parenL&&!t)return this.parseDynamicImport(e);else if(this.type===n.dot){var i=this.startNodeAt(e.start,e.loc&&e.loc.start);return i.name="import",e.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(e)}else this.unexpected()};m.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(n.parenR))if(this.expect(n.comma),!this.afterTrailingComma(n.parenR)){if(t.options=this.parseMaybeAssign(),!this.eat(n.parenR)){if(this.expect(n.comma),!this.afterTrailingComma(n.parenR))this.unexpected()}}else t.options=null;else t.options=null;else if(!this.eat(n.parenR)){var e=this.start;if(this.eat(n.comma)&&this.eat(n.parenR))this.raiseRecoverable(e,"Trailing comma is not allowed in import()");else this.unexpected(e)}return this.finishNode(t,"ImportExpression")};m.parseImportMeta=function(t){this.next();var e=this.containsEsc;if(t.property=this.parseIdent(!0),t.property.name!=="meta")this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'");if(e)this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module");return this.finishNode(t,"MetaProperty")};m.parseLiteral=function(t){var e=this.startNode();if(e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110)e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(e,"Literal")};m.parseParenExpression=function(){this.expect(n.parenL);var t=this.parseExpression();return this.expect(n.parenR),t};m.shouldParseArrow=function(t){return!this.canInsertSemicolon()};m.parseParenAndDistinguishExpression=function(t,e){var i=this.start,s=this.startLoc,o,h=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var p=this.start,l=this.startLoc,c=[],d=!0,v=!1,g=new ht,C=this.yieldPos,G=this.awaitPos,M;this.yieldPos=0,this.awaitPos=0;while(this.type!==n.parenR)if(d?d=!1:this.expect(n.comma),h&&this.afterTrailingComma(n.parenR,!0)){v=!0;break}else if(this.type===n.ellipsis){if(M=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===n.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else c.push(this.parseMaybeAssign(!1,g,this.parseParenItem));var Z=this.lastTokEnd,U=this.lastTokEndLoc;if(this.expect(n.parenR),t&&this.shouldParseArrow(c)&&this.eat(n.arrow))return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=C,this.awaitPos=G,this.parseParenArrowList(i,s,c,e);if(!c.length||v)this.unexpected(this.lastTokStart);if(M)this.unexpected(M);if(this.checkExpressionErrors(g,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=G||this.awaitPos,c.length>1)o=this.startNodeAt(p,l),o.expressions=c,this.finishNodeAt(o,"SequenceExpression",Z,U);else o=c[0]}else o=this.parseParenExpression();if(this.options.preserveParens){var W=this.startNodeAt(i,s);return W.expression=o,this.finishNode(W,"ParenthesizedExpression")}else return o};m.parseParenItem=function(t){return t};m.parseParenArrowList=function(t,e,i,s){return this.parseArrowExpression(this.startNodeAt(t,e),i,!1,s)};var se=[];m.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===n.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var i=this.containsEsc;if(t.property=this.parseIdent(!0),t.property.name!=="target")this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'");if(i)this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block");return this.finishNode(t,"MetaProperty")}var s=this.start,o=this.startLoc;if(t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,o,!0,!1),t.callee.type==="Super")this.raiseRecoverable(s,"Invalid use of 'super'");if(this.eat(n.parenL))t.arguments=this.parseExprList(n.parenR,this.options.ecmaVersion>=8,!1);else t.arguments=se;return this.finishNode(t,"NewExpression")};m.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();if(this.type===n.invalidTemplate){if(!e)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");i.value={raw:this.value.replace(/\r\n?/g,`
4
- `),cooked:null}}else i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
5
- `),cooked:this.value};return this.next(),i.tail=this.type===n.backQuote,this.finishNode(i,"TemplateElement")};m.parseTemplate=function(t){if(t===void 0)t={};var e=t.isTagged;if(e===void 0)e=!1;var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});i.quasis=[s];while(!s.tail){if(this.type===n.eof)this.raise(this.pos,"Unterminated template literal");this.expect(n.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(n.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}))}return this.next(),this.finishNode(i,"TemplateLiteral")};m.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.key.name==="async"&&(this.type===n.name||this.type===n.num||this.type===n.string||this.type===n.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===n.star)&&!N.test(this.input.slice(this.lastTokEnd,this.start))};m.parseObj=function(t,e){var i=this.startNode(),s=!0,o={};i.properties=[],this.next();while(!this.eat(n.braceR)){if(!s){if(this.expect(n.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(n.braceR))break}else s=!1;var h=this.parseProperty(t,e);if(!t)this.checkPropClash(h,o,e);i.properties.push(h)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")};m.parseProperty=function(t,e){var i=this.startNode(),s,o,h,p;if(this.options.ecmaVersion>=9&&this.eat(n.ellipsis)){if(t){if(i.argument=this.parseIdent(!1),this.type===n.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(i,"RestElement")}if(i.argument=this.parseMaybeAssign(!1,e),this.type===n.comma&&e&&e.trailingComma<0)e.trailingComma=this.start;return this.finishNode(i,"SpreadElement")}if(this.options.ecmaVersion>=6){if(i.method=!1,i.shorthand=!1,t||e)h=this.start,p=this.startLoc;if(!t)s=this.eat(n.star)}var l=this.containsEsc;if(this.parsePropertyName(i),!t&&!l&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i))o=!0,s=this.options.ecmaVersion>=9&&this.eat(n.star),this.parsePropertyName(i);else o=!1;return this.parsePropertyValue(i,t,s,o,h,p,e,l),this.finishNode(i,"Property")};m.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var i=t.kind==="get"?0:1;if(t.value.params.length!==i){var s=t.value.start;if(t.kind==="get")this.raiseRecoverable(s,"getter should have no params");else this.raiseRecoverable(s,"setter should have exactly one param")}else if(t.kind==="set"&&t.value.params[0].type==="RestElement")this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")};m.parsePropertyValue=function(t,e,i,s,o,h,p,l){if((i||s)&&this.type===n.colon)this.unexpected();if(this.eat(n.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,p),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===n.parenL){if(e)this.unexpected();t.method=!0,t.value=this.parseMethod(i,s),t.kind="init"}else if(!e&&!l&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&(this.type!==n.comma&&this.type!==n.braceR&&this.type!==n.eq)){if(i||s)this.unexpected();this.parseGetterSetter(t)}else if(this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"){if(i||s)this.unexpected();if(this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=o;if(e)t.value=this.parseMaybeDefault(o,h,this.copyNode(t.key));else if(this.type===n.eq&&p){if(p.shorthandAssign<0)p.shorthandAssign=this.start;t.value=this.parseMaybeDefault(o,h,this.copyNode(t.key))}else t.value=this.copyNode(t.key);t.kind="init",t.shorthand=!0}else this.unexpected()};m.parsePropertyName=function(t){if(this.options.ecmaVersion>=6)if(this.eat(n.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(n.bracketR),t.key;else t.computed=!1;return t.key=this.type===n.num||this.type===n.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};m.initFunction=function(t){if(t.id=null,this.options.ecmaVersion>=6)t.generator=t.expression=!1;if(this.options.ecmaVersion>=8)t.async=!1};m.parseMethod=function(t,e,i){var s=this.startNode(),o=this.yieldPos,h=this.awaitPos,p=this.awaitIdentPos;if(this.initFunction(s),this.options.ecmaVersion>=6)s.generator=t;if(this.options.ecmaVersion>=8)s.async=!!e;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(yt(e,s.generator)|nt|(i?Lt:0)),this.expect(n.parenL),s.params=this.parseBindingList(n.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=o,this.awaitPos=h,this.awaitIdentPos=p,this.finishNode(s,"FunctionExpression")};m.parseArrowExpression=function(t,e,i,s){var o=this.yieldPos,h=this.awaitPos,p=this.awaitIdentPos;if(this.enterScope(yt(i,!1)|xt),this.initFunction(t),this.options.ecmaVersion>=8)t.async=!!i;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,s),this.yieldPos=o,this.awaitPos=h,this.awaitIdentPos=p,this.finishNode(t,"ArrowFunctionExpression")};m.parseFunctionBody=function(t,e,i,s){var o=e&&this.type!==n.braceL,h=this.strict,p=!1;if(o)t.body=this.parseMaybeAssign(s),t.expression=!0,this.checkParams(t,!1);else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);if(!h||l){if(p=this.strictDirective(this.end),p&&l)this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var c=this.labels;if(this.labels=[],p)this.strict=!0;if(this.checkParams(t,!h&&!p&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id)this.checkLValSimple(t.id,Ot);t.body=this.parseBlock(!1,void 0,p&&!h),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=c}this.exitScope()};m.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1){var s=i[e];if(s.type!=="Identifier")return!1}return!0};m.checkParams=function(t,e){var i=Object.create(null);for(var s=0,o=t.params;s<o.length;s+=1){var h=o[s];this.checkLValInnerPattern(h,bt,e?null:i)}};m.parseExprList=function(t,e,i,s){var o=[],h=!0;while(!this.eat(t)){if(!h){if(this.expect(n.comma),e&&this.afterTrailingComma(t))break}else h=!1;var p=void 0;if(i&&this.type===n.comma)p=null;else if(this.type===n.ellipsis){if(p=this.parseSpread(s),s&&this.type===n.comma&&s.trailingComma<0)s.trailingComma=this.start}else p=this.parseMaybeAssign(!1,s);o.push(p)}return o};m.checkUnreserved=function(t){var{start:e,end:i,name:s}=t;if(this.inGenerator&&s==="yield")this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&s==="await")this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&ot)&&s==="arguments")this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(s==="arguments"||s==="await"))this.raise(e,"Cannot use "+s+" in class static initialization block");if(this.keywords.test(s))this.raise(e,"Unexpected keyword '"+s+"'");if(this.options.ecmaVersion<6&&this.input.slice(e,i).indexOf("\\")!==-1)return;var o=this.strict?this.reservedWordsStrict:this.reservedWords;if(o.test(s)){if(!this.inAsync&&s==="await")this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(e,"The keyword '"+s+"' is reserved")}};m.parseIdent=function(t){var e=this.parseIdentNode();if(this.next(!!t),this.finishNode(e,"Identifier"),!t){if(this.checkUnreserved(e),e.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=e.start}return e};m.parseIdentNode=function(){var t=this.startNode();if(this.type===n.name)t.name=this.value;else if(this.type.keyword){if(t.name=this.type.keyword,(t.name==="class"||t.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=n.name}else this.unexpected();return t};m.parsePrivateIdent=function(){var t=this.startNode();if(this.type===n.privateId)t.name=this.value;else this.unexpected();if(this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(t);return t};m.parseYield=function(t){if(!this.yieldPos)this.yieldPos=this.start;var e=this.startNode();if(this.next(),this.type===n.semi||this.canInsertSemicolon()||this.type!==n.star&&!this.type.startsExpr)e.delegate=!1,e.argument=null;else e.delegate=this.eat(n.star),e.argument=this.parseMaybeAssign(t);return this.finishNode(e,"YieldExpression")};m.parseAwait=function(t){if(!this.awaitPos)this.awaitPos=this.start;var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var st=r.prototype;st.raise=function(t,e){var i=Pt(this.input,t);if(e+=" ("+i.line+":"+i.column+")",this.sourceFile)e+=" in "+this.sourceFile;var s=SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s};st.raiseRecoverable=st.raise;st.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var V=r.prototype,re=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};V.enterScope=function(t){this.scopeStack.push(new re(t))};V.exitScope=function(){this.scopeStack.pop()};V.treatFunctionsAsVarInScope=function(t){return t.flags&O||!this.inModule&&t.flags&F};V.declareName=function(t,e,i){var s=!1;if(e===R){var o=this.currentScope();if(s=o.lexical.indexOf(t)>-1||o.functions.indexOf(t)>-1||o.var.indexOf(t)>-1,o.lexical.push(t),this.inModule&&o.flags&F)delete this.undefinedExports[t]}else if(e===Ft){var h=this.currentScope();h.lexical.push(t)}else if(e===Vt){var p=this.currentScope();if(this.treatFunctionsAsVar)s=p.lexical.indexOf(t)>-1;else s=p.lexical.indexOf(t)>-1||p.var.indexOf(t)>-1;p.functions.push(t)}else for(var l=this.scopeStack.length-1;l>=0;--l){var c=this.scopeStack[l];if(c.lexical.indexOf(t)>-1&&!(c.flags&_t&&c.lexical[0]===t)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(t)>-1){s=!0;break}if(c.var.push(t),this.inModule&&c.flags&F)delete this.undefinedExports[t];if(c.flags&ot)break}if(s)this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")};V.checkLocalExport=function(t){if(this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1)this.undefinedExports[t.name]=t};V.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};V.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(ot|K|B))return e}};V.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(ot|K|B)&&!(e.flags&xt))return e}};var pt=function(e,i,s){if(this.type="",this.start=i,this.end=0,e.options.locations)this.loc=new at(e,s);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[i,0]},X=r.prototype;X.startNode=function(){return new pt(this,this.start,this.startLoc)};X.startNodeAt=function(t,e){return new pt(this,t,e)};function Dt(t,e,i,s){if(t.type=e,t.end=i,this.options.locations)t.loc.end=s;if(this.options.ranges)t.range[1]=i;return t}X.finishNode=function(t,e){return Dt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};X.finishNodeAt=function(t,e,i,s){return Dt.call(this,t,e,i,s)};X.copyNode=function(t){var e=new pt(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var Ut=function(){};Ut.prototype.reset=function(){};r.prototype.validateRegExpFlags=function(){};r.prototype.validateRegExpPattern=function(){};var gt=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new at(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},x=r.prototype;x.next=function(t){if(!t&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new gt(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};x.getToken=function(){return this.next(),new gt(this)};if(typeof Symbol<"u")x[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===n.eof,value:e}}}};x.nextToken=function(){var t=this.curContext();if(!t||!t.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(n.eof);if(t.override)return t.override(this);else this.readToken(this.fullCharCodeAtPos())};x.readToken=function(t){if(u(t,this.options.ecmaVersion>=6)||t===92)return this.readWord();return this.getTokenFromCode(t)};x.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var i=this.input.charCodeAt(t+1);return i<=56319||i>=57344?e:(e<<10)+i-56613888};x.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};x.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=i+2,this.options.locations)for(var s=void 0,o=e;(s=Et(this.input,o,this.pos))>-1;)++this.curLine,o=this.lineStart=s;if(this.options.onComment)this.options.onComment(!0,this.input.slice(e+2,i),e,this.pos,t,this.curPosition())};x.skipLineComment=function(t){var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);while(this.pos<this.input.length&&!z(s))s=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())};x.skipSpace=function(){t:while(this.pos<this.input.length){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(t>8&&t<14||t>=5760&&Nt.test(String.fromCharCode(t)))++this.pos;else break t}}};x.finishToken=function(t,e){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var i=this.type;this.type=t,this.value=e,this.updateContext(i)};x.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&t===46&&e===46)return this.pos+=3,this.finishToken(n.ellipsis);else return++this.pos,this.finishToken(n.dot)};x.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(t===61)return this.finishOp(n.assign,2);return this.finishOp(n.slash,1)};x.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=t===42?n.star:n.modulo;if(this.options.ecmaVersion>=7&&t===42&&e===42)++i,s=n.starstar,e=this.input.charCodeAt(this.pos+2);if(e===61)return this.finishOp(n.assign,i+1);return this.finishOp(s,i)};x.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(n.assign,3)}return this.finishOp(t===124?n.logicalOR:n.logicalAND,2)}if(e===61)return this.finishOp(n.assign,2);return this.finishOp(t===124?n.bitwiseOR:n.bitwiseAND,1)};x.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(n.assign,2);return this.finishOp(n.bitwiseXOR,1)};x.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||N.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(n.incDec,2)}if(e===61)return this.finishOp(n.assign,2);return this.finishOp(n.plusMin,1)};x.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;if(e===t){if(i=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61)return this.finishOp(n.assign,i+1);return this.finishOp(n.bitShift,i)}if(e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(e===61)i=2;return this.finishOp(n.relational,i)};x.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(n.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(t===61&&e===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(n.arrow);return this.finishOp(t===61?n.eq:n.prefix,1)};x.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(n.questionDot,2)}if(e===63){if(t>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(n.assign,3)}return this.finishOp(n.coalesce,2)}}return this.finishOp(n.question,1)};x.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13){if(++this.pos,e=this.fullCharCodeAtPos(),u(e,!0)||e===92)return this.finishToken(n.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+rt(e)+"'")};x.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(n.parenL);case 41:return++this.pos,this.finishToken(n.parenR);case 59:return++this.pos,this.finishToken(n.semi);case 44:return++this.pos,this.finishToken(n.comma);case 91:return++this.pos,this.finishToken(n.bracketL);case 93:return++this.pos,this.finishToken(n.bracketR);case 123:return++this.pos,this.finishToken(n.braceL);case 125:return++this.pos,this.finishToken(n.braceR);case 58:return++this.pos,this.finishToken(n.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(n.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(n.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+rt(t)+"'")};x.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)};x.readRegexp=function(){var t,e,i=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(N.test(s))this.raise(i,"Unterminated regular expression");if(!t){if(s==="[")e=!0;else if(s==="]"&&e)e=!1;else if(s==="/"&&!e)break;t=s==="\\"}else t=!1;++this.pos}var o=this.input.slice(i,this.pos);++this.pos;var h=this.pos,p=this.readWord1();if(this.containsEsc)this.unexpected(h);var l=this.regexpState||(this.regexpState=new Ut(this));l.reset(i,o,p),this.validateRegExpFlags(l),this.validateRegExpPattern(l);var c=null;try{c=new RegExp(o,p)}catch(d){}return this.finishToken(n.regexp,{pattern:o,flags:p,value:c})};x.readInt=function(t,e,i){var s=this.options.ecmaVersion>=12&&e===void 0,o=i&&this.input.charCodeAt(this.pos)===48,h=this.pos,p=0,l=0;for(var c=0,d=e==null?1/0:e;c<d;++c,++this.pos){var v=this.input.charCodeAt(this.pos),g=void 0;if(s&&v===95){if(o)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(l===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(c===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");l=v;continue}if(v>=97)g=v-97+10;else if(v>=65)g=v-65+10;else if(v>=48&&v<=57)g=v-48;else g=1/0;if(g>=t)break;l=v,p=p*t+g}if(s&&l===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===h||e!=null&&this.pos-h!==e)return null;return p};function ae(t,e){if(e)return parseInt(t,8);return parseFloat(t.replace(/_/g,""))}function qt(t){if(typeof BigInt!=="function")return null;return BigInt(t.replace(/_/g,""))}x.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);if(i==null)this.raise(this.start+2,"Expected number in radix "+t);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)i=qt(this.input.slice(e,this.pos)),++this.pos;else if(u(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(n.num,i)};x.readNumber=function(t){var e=this.pos;if(!t&&this.readInt(10,void 0,!0)===null)this.raise(e,"Invalid number");var i=this.pos-e>=2&&this.input.charCodeAt(e)===48;if(i&&this.strict)this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&s===110){var o=qt(this.input.slice(e,this.pos));if(++this.pos,u(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(n.num,o)}if(i&&/[89]/.test(this.input.slice(e,this.pos)))i=!1;if(s===46&&!i)++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos);if((s===69||s===101)&&!i){if(s=this.input.charCodeAt(++this.pos),s===43||s===45)++this.pos;if(this.readInt(10)===null)this.raise(e,"Invalid number")}if(u(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var h=ae(this.input.slice(e,this.pos),i);return this.finishToken(n.num,h)};x.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){if(this.options.ecmaVersion<6)this.unexpected();var i=++this.pos;if(e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111)this.invalidStringToken(i,"Code point out of bounds")}else e=this.readHexChar(4);return e};x.readString=function(t){var e="",i=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;if(s===92)e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos;else if(s===8232||s===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(z(s))this.raise(this.start,"Unterminated string constant");++this.pos}}return e+=this.input.slice(i,this.pos++),this.finishToken(n.string,e)};var Wt={};x.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===Wt)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};x.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Wt;else this.raise(t,e)};x.readTmplToken=function(){var t="",e=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===n.template||this.type===n.invalidTemplate))if(i===36)return this.pos+=2,this.finishToken(n.dollarBraceL);else return++this.pos,this.finishToken(n.backQuote);return t+=this.input.slice(e,this.pos),this.finishToken(n.template,t)}if(i===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(z(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:t+=`
6
- `;break;default:t+=String.fromCharCode(i);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;e=this.pos}else++this.pos}};x.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(n.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
7
- `)++this.pos;case`
8
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};x.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
9
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return rt(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(t){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(s,8);if(o>255)s=s.slice(0,-1),o=parseInt(s,8);if(this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),(s!=="0"||e===56||e===57)&&(this.strict||t))this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(o)}if(z(e)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(e)}};x.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);if(i===null)this.invalidStringToken(e,"Bad character escape sequence");return i};x.readWord1=function(){this.containsEsc=!1;var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var o=this.fullCharCodeAtPos();if(y(o,s))this.pos+=o<=65535?1:2;else if(o===92){this.containsEsc=!0,t+=this.input.slice(i,this.pos);var h=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var p=this.readCodePoint();if(!(e?u:y)(p,s))this.invalidStringToken(h,"Invalid Unicode escape");t+=rt(p),i=this.pos}else break;e=!1}return t+this.input.slice(i,this.pos)};x.readWord=function(){var t=this.readWord1(),e=n.name;if(this.keywords.test(t))e=mt[t];return this.finishToken(e,t)};var ne="8.18.0";r.acorn={Parser:r,version:ne,defaultOptions:ut,Position:Y,SourceLocation:at,getLineInfo:Pt,Node:pt,TokenType:k,tokTypes:n,keywordTypes:mt,TokContext:L,tokContexts:w,isIdentifierChar:y,isIdentifierStart:u,Token:gt,isNewLine:z,lineBreak:N,lineBreakG:Yt,nonASCIIwhitespace:Nt};function q(t){return(e)=>t(e)}function J(...t){return r.extend(...t)}function D(t,e,i){for(let s=e;s<i;s++){let o=t.charCodeAt(s);if(o===10||o===13||o===8232||o===8233)return!0}return!1}var zt=new WeakMap;function a(t,e){if(t===void 0)return!1;if(t.length<16)return t.includes(e);let i=zt.get(t);if(i===void 0||i.length>t.length)i={names:new Set,length:0},zt.set(t,i);while(i.length<t.length)i.names.add(t[i.length++]);return i.names.has(e)}
10
- export{u,y,r,q,J,D,a};
@@ -1,3 +0,0 @@
1
- import{s,i}from"./shared-wr6wdcs6.js";var x=0,d=1,C=2,b=3,N=0,B=1,Y=2,T=3,D=4,w=4,I=5,O=6,ee={await:d,case:d,default:d,delete:d,extends:d,in:d,instanceof:d,new:d,of:d,return:d,throw:d,typeof:d,void:d,yield:d,do:C,else:C,finally:C,try:C,for:w,if:w,while:w,with:w,import:I,export:O},H=10,W=Array(K(128,0)).fill(null);for(let e of Object.entries(ee)){let r=K(e[0].charCodeAt(0),e[0].length),t=W[r]??[];t.push(e),W[r]=t}function K(e,r){return e*(H+1)+r}function z(e,r,t){let f=e.charCodeAt(r);if(f>=128||t-r>H)return b;let l=K(f,t-r),a=W[l];if(a===null)return b;for(let n=0;n<a.length;n++)if(e.startsWith(a[n][0],r))return a[n][1];return b}var U=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let r=e.charCodeAt(0);r<=e.charCodeAt(1);r++)U[r]=1;function o(e){return e>=128?!i(e):U[e]===1}function j(e,r,t){q(e,te(e,r),r,t,void 0)}function ke(e,r){q(e,e.length-1,!1,void 0,r)}function q(e,r,t,f,l){let a=[],n=e.startsWith("#!")?ie(e,2):0,c=x,A=!1,E=!1,h=-1,p=()=>{if(c=x,a.length===0)h=-1};while(n<=r){let k=e.charCodeAt(n);if(k===32||k===10||i(k)){n++;continue}if(k===47){let u=v(e,n);if(u!==-1){n=u;continue}}let F=A,Q=E;if(A=!1,E=!1,o(k)||k===35){let u=n;n=J(e,n+1);let g=F?b:z(e,u,n);if(f!==void 0&&a.length===0&&(g===O?t||Z(e,n):g===I&&X(e,n)))n=Math.max(n,f(h!==-1&&g===O?h:u,u)),p();else if(g===O)c=C;else if(g===w)E=!0,c=b;else c=g===d||g===C?g:b;continue}switch(n++,k){case 34:case 39:{let u=n-1;n=S(e,n,k),l?.(u,n,!1),c=b;break}case 96:{let u=n;n=y(e,n,a),l?.(u,M(e,n),!0),c=e.charCodeAt(n-1)===123?d:b;break}case 47:{let u=c===b?-1:V(e,n);if(u===-1)c=d;else n=P(e,u),c=b;break}case 40:a.push(Q?B:N),c=d;break;case 41:c=a.pop()===B?C:b;break;case 123:a.push(c===d?T:Y),c=x;break;case 125:{let u=a.pop();if(u===D){let g=n;n=y(e,n,a),l?.(g,M(e,n),!0),c=e.charCodeAt(n-1)===123?d:b}else if(u===T)c=b;else p();break}case 59:p();break;case 93:c=b;break;case 46:if(s(e.charCodeAt(n)))n=P(e,n),c=b;else if(e.startsWith("..",n))n+=2,c=d;else A=!0,c=d;break;case 63:if(e.charCodeAt(n)===46&&!s(e.charCodeAt(n+1)))n++,A=!0;c=d;break;case 33:c=c===b&&!i(e.charCodeAt(n-2))?b:d;break;case 43:case 45:if(e.charCodeAt(n)===k&&c===b)n++;else c=d;break;case 61:if(c=e.charCodeAt(n)===62?C:d,c===C)n++;break;case 64:if(a.length===0&&h===-1)h=n-1;c=d;break;default:c=d}}}function _(e,r,t){let f=e.length,l=[],a=r,n=d,c=!1;while(a<f){let A=e.charCodeAt(a);if(A===32||A===10||i(A)){a++;continue}if(A===47){let h=v(e,a);if(h!==-1){a=h;continue}}let E=c;if(c=!1,o(A)||A===35){let h=a;if(a=J(e,a+1),!E&&t?.(h,a))return-1;let p=E?b:z(e,h,a);n=p===d||p===C||p===w?d:b;continue}switch(a++,A){case 34:case 39:a=S(e,a,A),n=b;break;case 96:a=y(e,a,l),n=e.charCodeAt(a-1)===123?d:b;break;case 47:{let h=n===b?-1:V(e,a);if(h===-1)n=d;else a=P(e,h),n=b;break}case 40:l.push(N),n=d;break;case 41:if(l.length===0)return a-1;l.pop(),n=b;break;case 123:l.push(n===d?T:Y),n=x;break;case 125:{if(l.length===0)return a-1;let h=l.pop();if(h===D)a=y(e,a,l),n=e.charCodeAt(a-1)===123?d:b;else n=h===T?b:x;break}case 93:n=b;break;case 46:if(s(e.charCodeAt(a)))a=P(e,a),n=b;else if(e.startsWith("..",a))a+=2,n=d;else c=!0,n=d;break;case 63:if(e.charCodeAt(a)===46&&!s(e.charCodeAt(a+1)))a++,c=!0;n=d;break;case 33:n=n===b&&!i(e.charCodeAt(a-2))?b:d;break;case 43:case 45:if(e.charCodeAt(a)===A&&n===b)a++;else n=d;break;case 61:if(e.charCodeAt(a)===62)a++;n=d;break;default:n=d}}return f}function G(e){return e===10||e===13||e===8232||e===8233}function ie(e,r){for(let t=r;t<e.length;t++)if(G(e.charCodeAt(t)))return t;return e.length}function v(e,r){let t=e.charCodeAt(r+1);if(t===47)return ie(e,r+2);if(t!==42)return-1;let f=e.indexOf("*/",r+2);return f===-1?e.length:f+2}function J(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(f===92)t+=2;else if(o(f))t++;else break}return t}function P(e,r){let t=r;while(t<e.length&&o(e.charCodeAt(t)))t++;return t}function S(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===t)return f+1;if(l===92)f+=e.startsWith(`\r
2
- `,f+1)?2:1;else if(l===10||l===13)return f}return e.length}function y(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===96)return f+1;if(l===92)f++;else if(l===36&&e.charCodeAt(f+1)===123)return t.push(D),f+2}return e.length}function M(e,r){let t=e.charCodeAt(r-1);if(t===96)return r-1;if(t===123&&e.charCodeAt(r-2)===36)return r-2;return r}function V(e,r){let t=!1;for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(G(l))return-1;if(l===92)f++;else if(l===91)t=!0;else if(l===93)t=!1;else if(l===47&&!t)return f+1}return-1}function m(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(i(f)){t++;continue}let l=f===47?v(e,t):-1;if(l===-1)return t;t=l}return e.length}function L(e,r,t){return e.charCodeAt(r)===t.charCodeAt(0)&&e.startsWith(t,r)&&!o(e.charCodeAt(r+t.length))}function X(e,r){let t=e.charCodeAt(m(e,r));return t!==40&&t!==46}function Z(e,r){let t=m(e,r);if(L(e,t,"import"))return!0;if(L(e,t,"type"))t=m(e,t+4);let f=e.charCodeAt(t);if(f===42)return!0;if(f!==123)return!1;for(t++;t<e.length;t++){let l=e.charCodeAt(t);if(l===125)break;if(l===34||l===39)t=S(e,t+1,l)-1;else if(l===47)t=Math.max(t,m(e,t)-1)}return L(e,m(e,t+1),"from")}var R=/import|export/g;function te(e,r){let t=-1;R.lastIndex=0;for(let f=R.exec(e);f!==null;f=R.exec(e)){let l=f.index,a=l+6;if(!o(e.charCodeAt(l-1))&&!o(e.charCodeAt(a))&&(e.charCodeAt(l)===105?X(e,a):r||Z(e,a)))t=l}return t}
3
- export{o,j,ke,_,ie,P,m,L};