(F===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:k(F)?(i+=this.input.slice(S,this.pos),i+=this.jsx_readNewLine(!0),S=this.pos):++this.pos}}}jsx_readNewLine(i){let S=this.input.charCodeAt(this.pos),F;return++this.pos,S===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,F=i?`
`:`\r
`):F=String.fromCharCode(S),this.options.locations&&(++this.curLine,this.lineStart=this.pos),F}jsx_readString(i){let S="",F=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let j=this.input.charCodeAt(this.pos);if(j===i)break;j===38?(S+=this.input.slice(F,this.pos),S+=this.jsx_readEntity(),F=this.pos):k(j)?(S+=this.input.slice(F,this.pos),S+=this.jsx_readNewLine(!1),F=this.pos):++this.pos}return S+=this.input.slice(F,this.pos++),this.finishToken(g.string,S)}jsx_readEntity(){let i="",S=0,F,j=this.input[this.pos];j!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Z=++this.pos;for(;this.pos<this.input.length&&S++<10;){if(j=this.input[this.pos++],j===";"){i[0]==="#"?i[1]==="x"?(i=i.substr(2),l.test(i)&&(F=String.fromCharCode(parseInt(i,16)))):(i=i.substr(1),v.test(i)&&(F=String.fromCharCode(parseInt(i,10)))):F=o[i];break}i+=j}return F||(this.pos=Z,"&")}jsx_readWord(){let i,S=this.pos;do i=this.input.charCodeAt(++this.pos);while(O(i)||i===45);return this.finishToken(w.jsxName,this.input.slice(S,this.pos))}jsx_parseIdentifier(){let i=this.startNode();return this.type===w.jsxName?i.name=this.value:this.type.keyword?i.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(i,"JSXIdentifier")}jsx_parseNamespacedName(){let i=this.start,S=this.startLoc,F=this.jsx_parseIdentifier();if(!x.allowNamespaces||!this.eat(g.colon))return F;var j=this.startNodeAt(i,S);return j.namespace=F,j.name=this.jsx_parseIdentifier(),this.finishNode(j,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===w.jsxTagEnd)return"";let i=this.start,S=this.startLoc,F=this.jsx_parseNamespacedName();for(this.type===g.dot&&F.type==="JSXNamespacedName"&&!x.allowNamespacedObjects&&this.unexpected();this.eat(g.dot);){let j=this.startNodeAt(i,S);j.object=F,j.property=this.jsx_parseIdentifier(),F=this.finishNode(j,"JSXMemberExpression")}return F}jsx_parseAttributeValue(){switch(this.type){case g.braceL:let i=this.jsx_parseExpressionContainer();return i.expression.type==="JSXEmptyExpression"&&this.raise(i.start,"JSX attributes must only be assigned a non-empty expression"),i;case w.jsxTagStart:case g.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let i=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(i,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let i=this.startNode();return this.next(),i.expression=this.type===g.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(g.braceR),this.finishNode(i,"JSXExpressionContainer")}jsx_parseAttribute(){let i=this.startNode();return this.eat(g.braceL)?(this.expect(g.ellipsis),i.argument=this.parseMaybeAssign(),this.expect(g.braceR),this.finishNode(i,"JSXSpreadAttribute")):(i.name=this.jsx_parseNamespacedName(),i.value=this.eat(g.eq)?this.jsx_parseAttributeValue():null,this.finishNode(i,"JSXAttribute"))}jsx_parseOpeningElementAt(i,S){let F=this.startNodeAt(i,S);F.attributes=[];let j=this.jsx_parseElementName();for(j&&(F.name=j);this.type!==g.slash&&this.type!==w.jsxTagEnd;)F.attributes.push(this.jsx_parseAttribute());return F.selfClosing=this.eat(g.slash),this.expect(w.jsxTagEnd),this.finishNode(F,j?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(i,S){let F=this.startNodeAt(i,S),j=this.jsx_parseElementName();return j&&(F.name=j),this.expect(w.jsxTagEnd),this.finishNode(F,j?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(i,S){let F=this.startNodeAt(i,S),j=[],Z=this.jsx_parseOpeningElementAt(i,S),ne=null;if(!Z.selfClosing){e:for(;;)switch(this.type){case w.jsxTagStart:if(i=this.start,S=this.startLoc,this.next(),this.eat(g.slash)){ne=this.jsx_parseClosingElementAt(i,S);break e}j.push(this.jsx_parseElementAt(i,S));break;case w.jsxText:j.push(this.parseExprAtom());break;case g.braceL:j.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}I(ne.name)!==I(Z.name)&&this.raise(ne.start,"Expected corresponding JSX closing tag for <"+I(Z.name)+">")}let ee=Z.name?"Element":"Fragment";return F["opening"+ee]=Z,F["closing"+ee]=ne,F.children=j,this.type===g.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(F,"JSX"+ee)}jsx_parseText(){let i=this.parseLiteral(this.value);return i.type="JSXText",i}jsx_parseElement(){let i=this.start,S=this.startLoc;return this.next(),this.jsx_parseElementAt(i,S)}parseExprAtom(i){return this.type===w.jsxText?this.jsx_parseText():this.type===w.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(i)}readToken(i){let S=this.curContext();if(S===V)return this.jsx_readToken();if(S===f||S===B){if(X(i))return this.jsx_readWord();if(i==62)return++this.pos,this.finishToken(w.jsxTagEnd);if((i===34||i===39)&&S==f)return this.jsx_readString(i)}return i===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(w.jsxTagStart)):super.readToken(i)}updateContext(i){if(this.type==g.braceL){var S=this.curContext();S==f?this.context.push(G.b_expr):S==V?this.context.push(G.b_tmpl):super.updateContext(i),this.exprAllowed=!0}else if(this.type===g.slash&&i===w.jsxTagStart)this.context.length-=2,this.context.push(B),this.exprAllowed=!1;else return super.updateContext(i)}}}}}),zh=Q({"src/language-js/parse/acorn.js"(a,u){"use strict";J();var o=dr(),l=ka(),v=Ua(),b=Wa(),y={ecmaVersion:"latest",sourceType:"module",allowReserved:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,allowSuperOutsideMethod:!0,allowHashBang:!0,locations:!0,ranges:!0};function I(D){let{message:g,loc:w}=D;if(!w)return D;let{line:G,column:f}=w;return o(g.replace(/ \(\d+:\d+\)$/,""),{start:{line:G,column:f+1}})}var T,x=()=>{if(!T){let{Parser:D}=ft(),g=za();T=D.extend(g())}return T};function R(D,g){let w=x(),G=[],f=[],B=w.parse(D,Object.assign(Object.assign({},y),{},{sourceType:g,onComment:G,onToken:f}));return B.comments=G,B.tokens=f,B}function U(D,g){let w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{result:G,error:f}=l(()=>R(D,"module"),()=>R(D,"script"));if(!G)throw I(f);return w.originalText=D,b(G,w)}u.exports=v(U)}}),Gh=Q({"src/language-js/parse/utils/replace-hashbang.js"(a,u){"use strict";J();function o(l){return l.charAt(0)==="#"&&l.charAt(1)==="!"?"//"+l.slice(2):l}u.exports=o}}),Hh=Q({"node_modules/espree/dist/espree.cjs"(a){"use strict";J(),Object.defineProperty(a,"__esModule",{value:!0});var u=ft(),o=za(),l;function v(p){return p&&typeof p=="object"&&"default"in p?p:{default:p}}function b(p){if(p&&p.__esModule)return p;var P=Object.create(null);return p&&Object.keys(p).forEach(function(_){if(_!=="default"){var d=Object.getOwnPropertyDescriptor(p,_);Object.defineProperty(P,_,d.get?d:{enumerable:!0,get:function(){return p[_]}})}}),P.default=p,Object.freeze(P)}var y=b(u),I=v(o),T=b(l),x={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function R(p,P){let _=p[0],d=p[p.length-1],C={type:x.Template,value:P.slice(_.start,d.end)};return _.loc&&(C.loc={start:_.loc.start,end:d.loc.end}),_.range&&(C.start=_.range[0],C.end=d.range[1],C.range=[C.start,C.end]),C}function U(p,P){this._acornTokTypes=p,this._tokens=[],this._curlyBrace=null,this._code=P}U.prototype={constructor:U,translate(p,P){let _=p.type,d=this._acornTokTypes;if(_===d.name)p.type=x.Identifier,p.value==="static"&&(p.type=x.Keyword),P.ecmaVersion>5&&(p.value==="yield"||p.value==="let")&&(p.type=x.Keyword);else if(_===d.privateId)p.type=x.PrivateIdentifier;else if(_===d.semi||_===d.comma||_===d.parenL||_===d.parenR||_===d.braceL||_===d.braceR||_===d.dot||_===d.bracketL||_===d.colon||_===d.question||_===d.bracketR||_===d.ellipsis||_===d.arrow||_===d.jsxTagStart||_===d.incDec||_===d.starstar||_===d.jsxTagEnd||_===d.prefix||_===d.questionDot||_.binop&&!_.keyword||_.isAssign)p.type=x.Punctuator,p.value=this._code.slice(p.start,p.end);else if(_===d.jsxName)p.type=x.JSXIdentifier;else if(_.label==="jsxText"||_===d.jsxAttrValueToken)p.type=x.JSXText;else if(_.keyword)_.keyword==="true"||_.keyword==="false"?p.type=x.Boolean:_.keyword==="null"?p.type=x.Null:p.type=x.Keyword;else if(_===d.num)p.type=x.Numeric,p.value=this._code.slice(p.start,p.end);else if(_===d.string)P.jsxAttrValueToken?(P.jsxAttrValueToken=!1,p.type=x.JSXText):p.type=x.String,p.value=this._code.slice(p.start,p.end);else if(_===d.regexp){p.type=x.RegularExpression;let C=p.value;p.regex={flags:C.flags,pattern:C.pattern},p.value=`/${C.pattern}/${C.flags}`}return p},onToken(p,P){let _=this,d=this._acornTokTypes,C=P.tokens,K=this._tokens;function H(){C.push(R(_._tokens,_._code)),_._tokens=[]}if(p.type===d.eof){this._curlyBrace&&C.push(this.translate(this._curlyBrace,P));return}if(p.type===d.backQuote){this._curlyBrace&&(C.push(this.translate(this._curlyBrace,P)),this._curlyBrace=null),K.push(p),K.length>1&&H();return}if(p.type===d.dollarBraceL){K.push(p),H();return}if(p.type===d.braceR){this._curlyBrace&&C.push(this.translate(this._curlyBrace,P)),this._curlyBrace=p;return}if(p.type===d.template||p.type===d.invalidTemplate){this._curlyBrace&&(K.push(this._curlyBrace),this._curlyBrace=null),K.push(p);return}this._curlyBrace&&(C.push(this.translate(this._curlyBrace,P)),this._curlyBrace=null),C.push(this.translate(p,P))}};var D=[3,5,6,7,8,9,10,11,12,13,14];function g(){return D[D.length-1]}function w(){return[...D]}function G(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,P=p==="latest"?g():p;if(typeof P!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof p} instead.`);if(P>=2015&&(P-=2009),!D.includes(P))throw new Error("Invalid ecmaVersion.");return P}function f(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"script";if(p==="script"||p==="module")return p;if(p==="commonjs")return"script";throw new Error("Invalid sourceType.")}function B(p){let P=G(p.ecmaVersion),_=f(p.sourceType),d=p.range===!0,C=p.loc===!0;if(P!==3&&p.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof p.allowReserved<"u"&&typeof p.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let K=P===3?p.allowReserved||"never":!1,H=p.ecmaFeatures||{},te=p.sourceType==="commonjs"||Boolean(H.globalReturn);if(_==="module"&&P<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},p,{ecmaVersion:P,sourceType:_,ranges:d,locations:C,allowReserved:K,allowReturnOutsideFunction:te})}var V=Symbol("espree's internal state"),k=Symbol("espree's esprimaFinishNode");function X(p,P,_,d,C,K,H){let te;p?te="Block":H.slice(_,_+2)==="#!"?te="Hashbang":te="Line";let ae={type:te,value:P};return typeof _=="number"&&(ae.start=_,ae.end=d,ae.range=[_,d]),typeof C=="object"&&(ae.loc={start:C,end:K}),ae}var O=()=>p=>{let P=Object.assign({},p.acorn.tokTypes);return p.acornJsx&&Object.assign(P,p.acornJsx.tokTypes),class extends p{constructor(d,C){(typeof d!="object"||d===null)&&(d={}),typeof C!="string"&&!(C instanceof String)&&(C=String(C));let K=d.sourceType,H=B(d),te=H.ecmaFeatures||{},ae=H.tokens===!0?new U(P,C):null,fe={originalSourceType:K||H.sourceType,tokens:ae?[]:null,comments:H.comment===!0?[]:null,impliedStrict:te.impliedStrict===!0&&H.ecmaVersion>=5,ecmaVersion:H.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:H.ecmaVersion,sourceType:H.sourceType,ranges:H.ranges,locations:H.locations,allowReserved:H.allowReserved,allowReturnOutsideFunction:H.allowReturnOutsideFunction,onToken:Ae=>{ae&&ae.onToken(Ae,fe),Ae.type!==P.eof&&(fe.lastToken=Ae)},onComment:(Ae,dt,mt,_e,Ce,Oe)=>{if(fe.comments){let ze=X(Ae,dt,mt,_e,Ce,Oe,C);fe.comments.push(ze)}}},C),this[V]=fe}tokenize(){do this.next();while(this.type!==P.eof);this.next();let d=this[V],C=d.tokens;return d.comments&&(C.comments=d.comments),C}finishNode(){let d=super.finishNode(...arguments);return this[k](d)}finishNodeAt(){let d=super.finishNodeAt(...arguments);return this[k](d)}parse(){let d=this[V],C=super.parse();if(C.sourceType=d.originalSourceType,d.comments&&(C.comments=d.comments),d.tokens&&(C.tokens=d.tokens),C.body.length){let[K]=C.body;C.range&&(C.range[0]=K.range[0]),C.loc&&(C.loc.start=K.loc.start),C.start=K.start}return d.lastToken&&(C.range&&(C.range[1]=d.lastToken.range[1]),C.loc&&(C.loc.end=d.lastToken.loc.end),C.end=d.lastToken.end),this[V].templateElements.forEach(K=>{let te=K.tail?1:2;K.start+=-1,K.end+=te,K.range&&(K.range[0]+=-1,K.range[1]+=te),K.loc&&(K.loc.start.column+=-1,K.loc.end.column+=te)}),C}parseTopLevel(d){return this[V].impliedStrict&&(this.strict=!0),super.parseTopLevel(d)}raise(d,C){let K=p.acorn.getLineInfo(this.input,d),H=new SyntaxError(C);throw H.index=d,H.lineNumber=K.line,H.column=K.column+1,H}raiseRecoverable(d,C){this.raise(d,C)}unexpected(d){let C="Unexpected token";if(d!=null){if(this.pos=d,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(C+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,C)}jsx_readString(d){let C=super.jsx_readString(d);return this.type===P.string&&(this[V].jsxAttrValueToken=!0),C}[k](d){return d.type==="TemplateElement"&&this[V].templateElements.push(d),d.type.includes("Function")&&!d.generator&&(d.generator=!1),d}}},i="9.4.1",S={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=y.Parser.extend(O())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=y.Parser.extend(I.default(),O())),this._jsx},get(p){return Boolean(p&&p.ecmaFeatures&&p.ecmaFeatures.jsx)?this.jsx:this.regular}};function F(p,P){let _=S.get(P);return(!P||P.tokens!==!0)&&(P=Object.assign({},P,{tokens:!0})),new _(P,p).tokenize()}function j(p,P){let _=S.get(P);return new _(P,p).parse()}var Z=i,ne=function(){return T.KEYS}(),ee=void 0,ie=g(),Ne=w();a.Syntax=ee,a.VisitorKeys=ne,a.latestEcmaVersion=ie,a.parse=j,a.supportedEcmaVersions=Ne,a.tokenize=F,a.version=Z}}),Kh=Q({"src/language-js/parse/espree.js"(a,u){"use strict";J();var o=dr(),l=ka(),v=Ua(),b=Gh(),y=Wa(),I={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function T(R){let{message:U,lineNumber:D,column:g}=R;return typeof D!="number"?R:o(U,{start:{line:D,column:g}})}function x(R,U){let D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{parse:g}=Hh(),w=b(R),{result:G,error:f}=l(()=>g(w,Object.assign(Object.assign({},I),{},{sourceType:"module"})),()=>g(w,Object.assign(Object.assign({},I),{},{sourceType:"script"})));if(!G)throw T(f);return D.originalText=R,y(G,D)}u.exports=v(x)}}),Xh=Q({"src/language-js/parse/acorn-and-espree.js"(a,u){J();var o=zh(),l=Kh();u.exports={parsers:{acorn:o,espree:l}}}}),mc=Xh();export{mc as default};
