securityos/node_modules/prettier/esm/parser-espree.mjs

27 lines
152 KiB
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
var b=(a,u)=>()=>(u||a((u={exports:{}}).exports,u),u.exports);var oe=b(($h,Wr)=>{var Ye=function(a){return a&&a.Math==Math&&a};Wr.exports=Ye(typeof globalThis=="object"&&globalThis)||Ye(typeof window=="object"&&window)||Ye(typeof self=="object"&&self)||Ye(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=b((Yh,Gr)=>{Gr.exports=function(a){try{return!!a()}catch{return!0}}});var xe=b((Zh,Hr)=>{var vn=me();Hr.exports=!vn(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var bt=b((el,Kr)=>{var gn=me();Kr.exports=!gn(function(){var a=function(){}.bind();return typeof a!="function"||a.hasOwnProperty("prototype")})});var et=b((tl,Xr)=>{var xn=bt(),Ze=Function.prototype.call;Xr.exports=xn?Ze.bind(Ze):function(){return Ze.apply(Ze,arguments)}});var Yr=b($r=>{"use strict";var Jr={}.propertyIsEnumerable,Qr=Object.getOwnPropertyDescriptor,yn=Qr&&!Jr.call({1:2},1);$r.f=yn?function(u){var o=Qr(this,u);return!!o&&o.enumerable}:Jr});var _t=b((il,Zr)=>{Zr.exports=function(a,u){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:u}}});var ye=b((sl,ri)=>{var ei=bt(),ti=Function.prototype,St=ti.call,An=ei&&ti.bind.bind(St,St);ri.exports=ei?An:function(a){return function(){return St.apply(a,arguments)}}});var ai=b((al,si)=>{var ii=ye(),Cn=ii({}.toString),En=ii("".slice);si.exports=function(a){return En(Cn(a),8,-1)}});var ui=b((nl,ni)=>{var bn=ye(),_n=me(),Sn=ai(),wt=Object,wn=bn("".split);ni.exports=_n(function(){return!wt("z").propertyIsEnumerable(0)})?function(a){return Sn(a)=="String"?wn(a,""):wt(a)}:wt});var kt=b((ul,oi)=>{oi.exports=function(a){return a==null}});var Ft=b((ol,hi)=>{var kn=kt(),Fn=TypeError;hi.exports=function(a){if(kn(a))throw Fn("Can't call method on "+a);return a}});var tt=b((hl,li)=>{var Bn=ui(),In=Ft();li.exports=function(a){return Bn(In(a))}});var It=b((ll,ci)=>{var Bt=typeof document=="object"&&document.all,Tn=typeof Bt>"u"&&Bt!==void 0;ci.exports={all:Bt,IS_HTMLDDA:Tn}});var le=b((cl,fi)=>{var pi=It(),Pn=pi.all;fi.exports=pi.IS_HTMLDDA?function(a){return typeof a=="function"||a===Pn}:function(a){return typeof a=="function"}});var Pe=b((pl,vi)=>{var di=le(),mi=It(),Dn=mi.all;vi.exports=mi.IS_HTMLDDA?function(a){return typeof a=="object"?a!==null:di(a)||a===Dn}:function(a){return typeof a=="object"?a!==null:di(a)}});var rt=b((fl,gi)=>{var Tt=oe(),Nn=le(),On=function(a){return Nn(a)?a:void 0};gi.exports=function(a,u){return arguments.length<2?On(Tt[a]):Tt[a]&&Tt[a][u]}});var yi=b((dl,xi)=>{var Ln=ye();xi.exports=Ln({}.isPrototypeOf)});var Ci=b((ml,Ai)=>{var Vn=rt();Ai.exports=Vn("navigator","userAgent")||""});var Fi=b((vl,ki)=>{var wi=oe(),Pt=Ci(),Ei=wi.process,bi=wi.Deno,_i=Ei&&Ei.versions||bi&&bi.version,Si=_i&&_i.v8,ce,it;Si&&(ce=Si.split("."),it=ce[0]>0&&ce[0]<4?1:+(ce[0]+ce[1]));!it&&Pt&&(ce=Pt.match(/Edge\/(\d+)/),(!ce||ce[1]>=74)&&(ce=Pt.match(/Chrome\/(\d+)/),ce&&(it=+ce[1])));ki.exports=it});var Dt=b((gl,Ii)=>{var Bi=Fi(),Rn=me();Ii.exports=!!Object.getOwnPropertySymbols&&!Rn(function(){var a=Symbol();return!String(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&Bi&&Bi<41})});var Nt=b((xl,Ti)=>{var jn=Dt();Ti.exports=jn&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Ot=b((yl,Pi)=>{var qn=rt(),Mn=le(),Un=yi(),zn=Nt(),Wn=Object;Pi.exports=zn?function(a){return typeof a=="symbol"}:function(a){var u=qn("Symbol");return Mn(u)&&Un(u.prototype,Wn(a))}});var Ni=b((Al,Di)=>{var Gn=String;Di.exports=function(a){try{return Gn(a)}catch{return"Object"}}});var Li=b((Cl,Oi)=>{var Hn=le(),Kn=Ni(),Xn=TypeError;Oi.exports=function(a){if(Hn(a))return a;throw Xn(Kn(a)+" is not a function")}});var Ri=b((El,Vi)=>{var Jn=Li(),Qn=kt();Vi.exports=function(a,u){var o=a[u];return Qn(o)?void 0:Jn(o)}});var qi=b((bl,ji)=>{var Lt=et(),Vt=le(),Rt=Pe(),$n=TypeError;ji.exports=function(a,u){var o,h;if(u==="string"&&Vt(o=a.toString)&&!Rt(h=Lt(o,a))||Vt(o=a.valueOf)&&!Rt(h=Lt(o,a))||u!=="string"&&Vt(o=a.toString)&&!Rt(h=Lt(o,a)))return h;throw $n("Can't convert object to primitive value")}});var Ui=b((_l,Mi)=>{Mi.exports=!1});var st=b((Sl,Wi
`,qa={EOL:cr,tmpdir:lr,tmpDir:hr,networkInterfaces:Ra,getNetworkInterfaces:ja,release:Va,type:La,cpus:Oa,totalmem:Na,freemem:Da,uptime:Pa,loadavg:Ta,hostname:Ia,endianness:Ba}}}),Dh=Q({"node-modules-polyfills-commonjs:os"(a,u){J();var o=(Ph(),Bh(Fa));if(o&&o.default){u.exports=o.default;for(let h in o)u.exports[h]=o[h]}else o&&(u.exports=o)}}),Nh=Q({"node_modules/detect-newline/index.js"(a,u){"use strict";J();var o=h=>{if(typeof h!="string")throw new TypeError("Expected a string");let d=h.match(/(?:\r?\n)/g)||[];if(d.length===0)return;let C=d.filter(B=>B===`\r
`).length,x=d.length-C;return C>x?`\r
`:`
`};u.exports=o,u.exports.graceful=h=>typeof h=="string"&&o(h)||`
`}}),Oh=Q({"node_modules/jest-docblock/build/index.js"(a){"use strict";J(),Object.defineProperty(a,"__esModule",{value:!0}),a.extract=N,a.parse=O,a.parseWithComments=S,a.print=_,a.strip=m;function u(){let A=Dh();return u=function(){return A},A}function o(){let A=h(Nh());return o=function(){return A},A}function h(A){return A&&A.__esModule?A:{default:A}}var d=/\*\/$/,C=/^\/\*\*?/,x=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,B=/(^|\s+)\/\/([^\r\n]*)/g,P=/^(\r?\n)+/,g=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,D=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,q=/(\r?\n|^) *\* ?/g,I=[];function N(A){let K=A.match(x);return K?K[0].trimLeft():""}function m(A){let K=A.match(x);return K&&K[0]?A.substring(K[0].length):A}function O(A){return S(A).pragmas}function S(A){let K=(0,o().default)(A)||u().EOL;A=A.replace(C,"").replace(d,"").replace(q,"$1");let R="";for(;R!==A;)R=A,A=A.replace(g,`${K}$1 $2${K}`);A=A.replace(P,"").trimRight();let i=Object.create(null),k=A.replace(D,"").replace(P,"").trimRight(),T;for(;T=D.exec(A);){let M=T[2].replace(B,"");typeof i[T[1]]=="string"||Array.isArray(i[T[1]])?i[T[1]]=I.concat(i[T[1]],M):i[T[1]]=M}return{comments:k,pragmas:i}}function _(A){let{comments:K="",pragmas:R={}}=A,i=(0,o().default)(K)||u().EOL,k="/**",T=" *",M=" */",Z=Object.keys(R),ne=Z.map(ie=>F(ie,R[ie])).reduce((ie,Ne)=>ie.concat(Ne),[]).map(ie=>`${T} ${ie}${i}`).join("");if(!K){if(Z.length===0)return"";if(Z.length===1&&!Array.isArray(R[Z[0]])){let ie=R[Z[0]];return`${k} ${F(Z[0],ie)[0]}${M}`}}let ee=K.split(i).map(ie=>`${T} ${ie}`).join(i)+i;return k+i+(K?ee:"")+(K&&Z.length?T+i:"")+ne+M}function F(A,K){return I.concat(K).map(R=>`@${A} ${R}`.trim())}}}),Lh=Q({"src/common/end-of-line.js"(a,u){"use strict";J();function o(x){let B=x.indexOf("\r");return B>=0?x.charAt(B+1)===`
`?"crlf":"cr":"lf"}function h(x){switch(x){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function d(x,B){let P;switch(B){case`
`:P=/\n/g;break;case"\r":P=/\r/g;break;case`\r
`:P=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(B)}.`)}let g=x.match(P);return g?g.length:0}function C(x){return x.replace(/\r\n?/g,`
`)}u.exports={guessEndOfLine:o,convertEndOfLineToChars:h,countEndOfLineChars:d,normalizeEndOfLine:C}}}),Vh=Q({"src/language-js/utils/get-shebang.js"(a,u){"use strict";J();function o(h){if(!h.startsWith("#!"))return"";let d=h.indexOf(`
`);return d===-1?h:h.slice(0,d)}u.exports=o}}),Rh=Q({"src/language-js/pragma.js"(a,u){"use strict";J();var{parseWithComments:o,strip:h,extract:d,print:C}=Oh(),{normalizeEndOfLine:x}=Lh(),B=Vh();function P(q){let I=B(q);I&&(q=q.slice(I.length+1));let N=d(q),{pragmas:m,comments:O}=o(N);return{shebang:I,text:q,pragmas:m,comments:O}}function g(q){let I=Object.keys(P(q).pragmas);return I.includes("prettier")||I.includes("format")}function D(q){let{shebang:I,text:N,pragmas:m,comments:O}=P(q),S=h(N),_=C({pragmas:Object.assign({format:""},m),comments:O.trimStart()});return(I?`${I}
`:"")+x(_)+(S.startsWith(`
`)?`
`:`
`)+S}u.exports={hasPragma:g,insertPragma:D}}}),Ma=Q({"src/utils/is-non-empty-array.js"(a,u){"use strict";J();function o(h){return Array.isArray(h)&&h.length>0}u.exports=o}}),Ua=Q({"src/language-js/loc.js"(a,u){"use strict";J();var o=Ma();function h(P){var g,D;let q=P.range?P.range[0]:P.start,I=(g=(D=P.declaration)===null||D===void 0?void 0:D.decorators)!==null&&g!==void 0?g:P.decorators;return o(I)?Math.min(h(I[0]),q):q}function d(P){return P.range?P.range[1]:P.end}function C(P,g){let D=h(P);return Number.isInteger(D)&&D===h(g)}function x(P,g){let D=d(P);return Number.isInteger(D)&&D===d(g)}function B(P,g){return C(P,g)&&x(P,g)}u.exports={locStart:h,locEnd:d,hasSameLocStart:C,hasSameLoc:B}}}),za=Q({"src/language-js/parse/utils/create-parser.js"(a,u){"use strict";J();var{hasPragma:o}=Rh(),{locStart:h,locEnd:d}=Ua();function C(x){return x=typeof x=="function"?{parse:x}:x,Object.assign({astFormat:"estree",hasPragma:o,locStart:h,locEnd:d},x)}u.exports=C}}),jh=Q({"src/language-js/utils/is-ts-keyword-type.js"(a,u){"use strict";J();function o(h){let{type:d}=h;return d.startsWith("TS")&&d.endsWith("Keyword")}u.exports=o}}),qh=Q({"src/language-js/utils/is-block-comment.js"(a,u){"use strict";J();var o=new Set(["Block","CommentBlock","MultiLine"]),h=d=>o.has(d==null?void 0:d.type);u.exports=h}}),Mh=Q({"src/language-js/utils/is-type-cast-comment.js"(a,u){"use strict";J();var o=qh();function h(d){return o(d)&&d.value[0]==="*"&&/@(?:type|satisfies)\b/.test(d.value)}u.exports=h}}),Uh=Q({"src/utils/get-last.js"(a,u){"use strict";J();var o=h=>h[h.length-1];u.exports=o}}),Wa=Q({"src/language-js/parse/postprocess/visit-node.js"(a,u){"use strict";J();function o(h,d){if(Array.isArray(h)){for(let C=0;C<h.length;C++)h[C]=o(h[C],d);return h}if(h&&typeof h=="object"&&typeof h.type=="string"){let C=Object.keys(h);for(let x=0;x<C.length;x++)h[C[x]]=o(h[C[x]],d);return d(h)||h}return h}u.exports=o}}),Ga=Q({"src/language-js/parse/postprocess/throw-syntax-error.js"(a,u){"use strict";J();var o=dr();function h(d,C){let{start:x,end:B}=d.loc;throw o(C,{start:{line:x.line,column:x.column+1},end:{line:B.line,column:B.column+1}})}u.exports=h}}),zh=Q({"src/language-js/parse/postprocess/typescript.js"(a,u){"use strict";J();var o=Ma(),h=Wa(),d=Ga(),C={AbstractKeyword:126,SourceFile:308,PropertyDeclaration:169};function x(D){for(;D&&D.kind!==C.SourceFile;)D=D.parent;return D}function B(D){let{illegalDecorators:q}=D;if(!o(q))return;let[{expression:I}]=q,N=x(I),[m,O]=[I.pos,I.end].map(S=>{let{line:_,character:F}=N.getLineAndCharacterOfPosition(S);return{line:_+1,column:F}});d({loc:{start:m,end:O}},"Decorators are not valid here.")}function P(D,q){D.kind!==C.PropertyDeclaration||D.modifiers&&!D.modifiers.some(I=>I.kind===C.AbstractKeyword)||D.initializer&&q.value===null&&d(q,"Abstract property cannot have an initializer")}function g(D,q){let{esTreeNodeToTSNodeMap:I,tsNodeToESTreeNodeMap:N}=q.tsParseResult;h(D,m=>{let O=I.get(m);if(!O)return;let S=N.get(O);S===m&&(B(O),P(O,S))})}u.exports={throwErrorForInvalidNodes:g}}}),Ha=Q({"src/language-js/parse/postprocess/index.js"(a,u){"use strict";J();var{locStart:o,locEnd:h}=Ua(),d=jh(),C=Mh(),x=Uh(),B=Wa(),{throwErrorForInvalidNodes:P}=zh(),g=Ga();function D(m,O){if(O.parser==="typescript"&&/@|abstract/.test(O.originalText)&&P(m,O),O.parser!=="typescript"&&O.parser!=="flow"&&O.parser!=="acorn"&&O.parser!=="espree"&&O.parser!=="meriyah"){let _=new Set;m=B(m,F=>{F.leadingComments&&F.leadingComments.some(C)&&_.add(o(F))}),m=B(m,F=>{if(F.type==="ParenthesizedExpression"){let{expression:A}=F;if(A.type==="TypeCastExpression")return A.range=F.range,A;let K=o(F);if(!_.has(K))return A.extra=Object.assign(Object.assign({},A.extra),{},{parenthesized:!0}),A}})}return m=B(m,_=>{switch(_.type){case"ChainExpression":return q(_.expression);case"LogicalExpression":{if(I(_))return N(_);break}case"VariableDeclaration":{let F=x(_.declarations);F&&F.init&&S(_,F);break}case"TSParenthesizedType":return d(_.typeAnnotation)||_.typeAnnotation.type==="TSThisType"||(_.typeAnnotation.range=[o(_),h(_)]),_.typeAnnotation;case"TSTypeParameter":if(typeo
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),e.allowHashBang==null&&(t.allowHashBang=t.ecmaVersion>=14),w(t.onToken)){var s=t.onToken;t.onToken=function(n){return s.push(n)}}return w(t.onComment)&&(t.onComment=mt(t,t.onComment)),t}function mt(e,t){return function(r,s,n,l,c,v){var y={type:r?"Block":"Line",value:s,start:n,end:l};e.locations&&(y.loc=new te(this,c,v)),e.ranges&&(y.range=[n,l]),t.push(y)}}var _e=1,Ce=2,Oe=4,We=8,mr=16,vr=32,vt=64,gr=128,Le=256,gt=_e|Ce|Le;function xt(e,t){return Ce|(e?Oe:0)|(t?We:0)}var Ge=0,yt=1,ve=2,xr=3,yr=4,Ar=5,Y=function(t,r,s){this.options=t=dt(t),this.sourceFile=t.sourceFile,this.keywords=f(g[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var n="";t.allowReserved!==!0&&(n=B[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(n+=" await")),this.reservedWords=f(n);var l=(n?n+" ":"")+B.strict;this.reservedWordsStrict=f(l),this.reservedWordsStrictBind=f(l+" "+B.strictBind),this.input=String(r),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(k).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=i.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=t.sourceType==="module",this.strict=this.inModule||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&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(_e),this.regexpState=null,this.privateNameStack=[]},de={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Y.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},de.inFunction.get=function(){return(this.currentVarScope().flags&Ce)>0},de.inGenerator.get=function(){return(this.currentVarScope().flags&We)>0&&!this.currentVarScope().inClassFieldInit},de.inAsync.get=function(){return(this.currentVarScope().flags&Oe)>0&&!this.currentVarScope().inClassFieldInit},de.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Le)return!1;if(t.flags&Ce)return(t.flags&Oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},de.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&vt)>0||r||this.options.allowSuperOutsideMethod},de.allowDirectSuper.get=function(){return(this.currentThisScope().flags&gr)>0},de.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},de.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(t&(Ce|Le))>0||r},de.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Le)>0},Y.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var s=this,n=0;n<t.length;n++)s=t[n](s);return s},Y.parse=function(t,r){return new this(r,t).parse()},Y.parseExpressionAt=function(t,r,s){var n=new this(s,t,r);return n.nextToken(),n.parseExpression()},Y.tokenizer=function(t,r){return new this(r,t)},Object.defineProperties(Y.prototype,de);var se=Y.prototype,Xa=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;se.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){ee.lastIndex=e,e+=ee.exec(this.input)[0].length;var t=Xa.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){ee.lastIndex=e+t[0].length;var r=ee.exec(this.input),s=r.index+r[0].length,n=this.input.charAt(s);return n===";"||n==="}"||k.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,ee.lastIndex=e,e+=ee.exec(this.input)[0].length,this.input[e]===";"&&e++}},se.eat=function(e){return this.type===e?(this.next(),!0):!1},se.isContextual=function(e){return this.type===i.name&&this.value===e&&!this.containsEsc},se.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},se.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},se.canInsertSemicolon=function(){return this.type===i.eof||this.type===i.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))},se.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},se.semicolon=function(){!this.eat(i.semi)&&!this.insertSemicolon()&&this.unexpected()},se.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTo
`),cooked:this.value},this.next(),r.tail=this.type===i.backQuote,this.finishNode(r,"TemplateElement")},z.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(r.quasis=[s];!s.tail;)this.type===i.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(i.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(i.braceR),r.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},z.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===i.name||this.type===i.num||this.type===i.string||this.type===i.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===i.star)&&!k.test(this.input.slice(this.lastTokEnd,this.start))},z.parseObj=function(e,t){var r=this.startNode(),s=!0,n={};for(r.properties=[],this.next();!this.eat(i.braceR);){if(s)s=!1;else if(this.expect(i.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(i.braceR))break;var l=this.parseProperty(e,t);e||this.checkPropClash(l,n,t),r.properties.push(l)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},z.parseProperty=function(e,t){var r=this.startNode(),s,n,l,c;if(this.options.ecmaVersion>=9&&this.eat(i.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===i.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(r.argument=this.parseMaybeAssign(!1,t),this.type===i.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(l=this.start,c=this.startLoc),e||(s=this.eat(i.star)));var v=this.containsEsc;return this.parsePropertyName(r),!e&&!v&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(r)?(n=!0,s=this.options.ecmaVersion>=9&&this.eat(i.star),this.parsePropertyName(r,t)):n=!1,this.parsePropertyValue(r,e,s,n,l,c,t,v),this.finishNode(r,"Property")},z.parsePropertyValue=function(e,t,r,s,n,l,c,v){if((r||s)&&this.type===i.colon&&this.unexpected(),this.eat(i.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,c),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===i.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,s);else if(!t&&!v&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==i.comma&&this.type!==i.braceR&&this.type!==i.eq){(r||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var y=e.kind==="get"?0:1;if(e.value.params.length!==y){var U=e.value.start;e.kind==="get"?this.raiseRecoverable(U,"getter should have no params"):this.raiseRecoverable(U,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,l,this.copyNode(e.key)):this.type===i.eq&&c?(c.shorthandAssign<0&&(c.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,l,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()},z.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(i.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(i.bracketR),e.key;e.computed=!1}return e.key=this.type===i.num||this.type===i.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},z.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},z.parseMethod=function(e,t,r){var s=this.startNode(),n=this.yieldPos,l=this.awaitPos,c=this.awaitIdentPos;ret
`;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},G.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(i.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},G.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return E(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(s,8);return n>255&&(s=s.slice(0,-1),n=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return M(t)?"":String.fromCharCode(t)}},G.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},G.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(O(n,s))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var l=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var c=this.readCodePoint();(t?m:O)(c,s)||this.invalidStringToken(l,"Invalid Unicode escape"),e+=E(c),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},G.readWord=function(){var e=this.readWord1(),t=i.name;return this.keywords.test(e)&&(t=K[e]),this.finishToken(t,e)};var zr="8.8.1";Y.acorn={Parser:Y,version:zr,defaultOptions:fe,Position:H,SourceLocation:te,getLineInfo:ae,Node:Re,TokenType:S,tokTypes:i,keywordTypes:K,TokContext:ue,tokContexts:$,isIdentifierChar:O,isIdentifierStart:m,Token:Qe,isNewLine:M,lineBreak:k,lineBreakG:T,nonASCIIwhitespace:ne};function fn(e,t){return Y.parse(e,t)}function dn(e,t,r){return Y.parseExpressionAt(e,t,r)}function mn(e,t){return Y.tokenizer(e,t)}o.Node=Re,o.Parser=Y,o.Position=H,o.SourceLocation=te,o.TokContext=ue,o.Token=Qe,o.TokenType=S,o.defaultOptions=fe,o.getLineInfo=ae,o.isIdentifierChar=O,o.isIdentifierStart=m,o.isNewLine=M,o.keywordTypes=K,o.lineBreak=k,o.lineBreakG=T,o.nonASCIIwhitespace=ne,o.parse=fn,o.parseExpressionAt=dn,o.tokContexts=$,o.tokTypes=i,o.tokenizer=mn,o.version=zr,Object.defineProperty(o,"__esModule",{value:!0})})}}),Wh=Q({"node_modules/acorn-jsx/xhtml.js"(a,u){J(),u.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u039
`:`\r
`):T=String.fromCharCode(k),this.options.locations&&(++this.curLine,this.lineStart=this.pos),T}jsx_readString(i){let k="",T=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let M=this.input.charCodeAt(this.pos);if(M===i)break;M===38?(k+=this.input.slice(T,this.pos),k+=this.jsx_readEntity(),T=this.pos):A(M)?(k+=this.input.slice(T,this.pos),k+=this.jsx_readNewLine(!1),T=this.pos):++this.pos}return k+=this.input.slice(T,this.pos++),this.finishToken(N.string,k)}jsx_readEntity(){let i="",k=0,T,M=this.input[this.pos];M!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Z=++this.pos;for(;this.pos<this.input.length&&k++<10;){if(M=this.input[this.pos++],M===";"){i[0]==="#"?i[1]==="x"?(i=i.substr(2),h.test(i)&&(T=String.fromCharCode(parseInt(i,16)))):(i=i.substr(1),d.test(i)&&(T=String.fromCharCode(parseInt(i,10)))):T=o[i];break}i+=M}return T||(this.pos=Z,"&")}jsx_readWord(){let i,k=this.pos;do i=this.input.charCodeAt(++this.pos);while(R(i)||i===45);return this.finishToken(m.jsxName,this.input.slice(k,this.pos))}jsx_parseIdentifier(){let i=this.startNode();return this.type===m.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,k=this.startLoc,T=this.jsx_parseIdentifier();if(!g.allowNamespaces||!this.eat(N.colon))return T;var M=this.startNodeAt(i,k);return M.namespace=T,M.name=this.jsx_parseIdentifier(),this.finishNode(M,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===m.jsxTagEnd)return"";let i=this.start,k=this.startLoc,T=this.jsx_parseNamespacedName();for(this.type===N.dot&&T.type==="JSXNamespacedName"&&!g.allowNamespacedObjects&&this.unexpected();this.eat(N.dot);){let M=this.startNodeAt(i,k);M.object=T,M.property=this.jsx_parseIdentifier(),T=this.finishNode(M,"JSXMemberExpression")}return T}jsx_parseAttributeValue(){switch(this.type){case N.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 m.jsxTagStart:case N.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===N.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(N.braceR),this.finishNode(i,"JSXExpressionContainer")}jsx_parseAttribute(){let i=this.startNode();return this.eat(N.braceL)?(this.expect(N.ellipsis),i.argument=this.parseMaybeAssign(),this.expect(N.braceR),this.finishNode(i,"JSXSpreadAttribute")):(i.name=this.jsx_parseNamespacedName(),i.value=this.eat(N.eq)?this.jsx_parseAttributeValue():null,this.finishNode(i,"JSXAttribute"))}jsx_parseOpeningElementAt(i,k){let T=this.startNodeAt(i,k);T.attributes=[];let M=this.jsx_parseElementName();for(M&&(T.name=M);this.type!==N.slash&&this.type!==m.jsxTagEnd;)T.attributes.push(this.jsx_parseAttribute());return T.selfClosing=this.eat(N.slash),this.expect(m.jsxTagEnd),this.finishNode(T,M?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(i,k){let T=this.startNodeAt(i,k),M=this.jsx_parseElementName();return M&&(T.name=M),this.expect(m.jsxTagEnd),this.finishNode(T,M?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(i,k){let T=this.startNodeAt(i,k),M=[],Z=this.jsx_parseOpeningElementAt(i,k),ne=null;if(!Z.selfClosing){e:for(;;)switch(this.type){case m.jsxTagStart:if(i=this.start,k=this.startLoc,this.next(),this.eat(N.slash)){ne=this.jsx_parseClosingElementAt(i,k);break e}M.push(this.jsx_parseElementAt(i,k));break;case m.jsxText:M.push(this.parseExprAtom());break;case N.braceL:M.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}B(ne.name)!==B(Z.name)&&this.raise(ne.start,"Expected corresponding
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(E+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,E)}jsx_readString(f){let E=super.jsx_readString(f);return this.type===L.string&&(this[F].jsxAttrValueToken=!0),E}[A](f){return f.type==="TemplateElement"&&this[F].templateElements.push(f),f.type.includes("Function")&&!f.generator&&(f.generator=!1),f}}},i="9.4.1",k={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=x.Parser.extend(R())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=x.Parser.extend(B.default(),R())),this._jsx},get(p){return Boolean(p&&p.ecmaFeatures&&p.ecmaFeatures.jsx)?this.jsx:this.regular}};function T(p,L){let w=k.get(L);return(!L||L.tokens!==!0)&&(L=Object.assign({},L,{tokens:!0})),new w(L,p).tokenize()}function M(p,L){let w=k.get(L);return new w(L,p).parse()}var Z=i,ne=function(){return P.KEYS}(),ee=void 0,ie=N(),Ne=m();a.Syntax=ee,a.VisitorKeys=ne,a.latestEcmaVersion=ie,a.parse=M,a.supportedEcmaVersions=Ne,a.tokenize=T,a.version=Z}}),Xh=Q({"src/language-js/parse/espree.js"(a,u){"use strict";J();var o=dr(),h=ka(),d=za(),C=Hh(),x=Ha(),B={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function P(D){let{message:q,lineNumber:I,column:N}=D;return typeof I!="number"?D:o(q,{start:{line:I,column:N}})}function g(D,q){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{parse:N}=Kh(),m=C(D),{result:O,error:S}=h(()=>N(m,Object.assign(Object.assign({},B),{},{sourceType:"module"})),()=>N(m,Object.assign(Object.assign({},B),{},{sourceType:"script"})));if(!O)throw P(S);return I.originalText=D,x(O,I)}u.exports=d(g)}}),Jh=Q({"src/language-js/parse/acorn-and-espree.js"(a,u){J();var o=Gh(),h=Xh();u.exports={parsers:{acorn:o,espree:h}}}}),vc=Jh();export{vc as default};