Files
client/node_modules/prettier/plugins/acorn.js
T

17 lines
150 KiB
JavaScript
Raw Normal View History

2026-10-07 18:56:27 +02:00
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var Bi=Object.create;var me=Object.defineProperty;var Fi=Object.getOwnPropertyDescriptor;var ji=Object.getOwnPropertyNames;var Ui=Object.getPrototypeOf,Gi=Object.prototype.hasOwnProperty;var ct=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}},Be=(e,t)=>{for(var i in t)me(e,i,{get:t[i],enumerable:!0})},pt=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ji(t))!Gi.call(e,s)&&s!==i&&me(e,s,{get:()=>t[s],enumerable:!(r=Fi(t,s))||r.enumerable});return e};var lt=(e,t,i)=>(i=e!=null?Bi(Ui(e)):{},pt(t||!e||!e.__esModule?me(i,"default",{value:e,enumerable:!0}):i,e)),Wi=e=>pt(me({},"__esModule",{value:!0}),e);var ii=ct((Ns,ti)=>{ti.exports={}});var et=ct((Ls,$e)=>{"use strict";var wr=ii(),Ir=/^[\da-fA-F]+$/,Pr=/^\d+$/,ri=new WeakMap;function si(e){e=e.Parser.acorn||e;let t=ri.get(e);if(!t){let i=e.tokTypes,r=e.TokContext,s=e.TokenType,n=new r("<tag",!1),o=new r("</tag",!1),h=new r("<tag>...</tag>",!0,!0),c={tc_oTag:n,tc_cTag:o,tc_expr:h},l={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(h),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(m){let S=this.context.pop();S===n&&m===i.slash||S===o?(this.context.pop(),this.exprAllowed=this.curContext()===h):this.exprAllowed=!0},t={tokContexts:c,tokTypes:l},ri.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}$e.exports=function(e){return e=e||{},function(t){return Nr({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty($e.exports,"tokTypes",{get:function(){return si(void 0).tokTypes},configurable:!0,enumerable:!0});function Nr(e,t){let i=t.acorn||void 0,r=si(i),s=i.tokTypes,n=r.tokTypes,o=i.tokContexts,h=r.tokContexts.tc_oTag,c=r.tokContexts.tc_cTag,l=r.tokContexts.tc_expr,m=i.isNewLine,S=i.isIdentifierStart,E=i.isIdentifierChar;return class extends t{static get acornJsx(){return r}jsx_readToken(){let p="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:return this.pos===this.start?y===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(y):(p+=this.input.slice(x,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(x,this.pos),p+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(y===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(y)?(p+=this.input.slice(x,this.pos),p+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(p){let x=this.input.charCodeAt(this.pos),y;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,y=p?`
`:`\r
`):y=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),y}jsx_readString(p){let x="",y=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let v=this.input.charCodeAt(this.pos);if(v===p)break;v===38?(x+=this.input.slice(y,this.pos),x+=this.jsx_readEntity(),y=this.pos):m(v)?(x+=this.input.slice(y,this.pos),x+=this.jsx_readNewLine(!1),y=this.pos):++this.pos}return x+=this.input.slice(y,this.pos++),this.finishToken(s.string,x)}jsx_readEntity(){let p="",x=0,y,v=this.input[this.pos];v!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(v=this.input[this.pos++],v===";"){p[0]==="#"?p[1]==="x"?(p=p.substr(2),Ir.test(p)&&(y=String.fromCharCode(parseInt(p,16)))):(p=p.substr(1),Pr.test(p)&&(y=String.fromCharCode(parseInt(p,10)))):y=wr[p];break}p+=v}return y||(this.pos=N,"&")}jsx_readWord(){let p,x=this.pos;do p=this.input.charCodeAt(++this.pos);while(E(p)||p===45);return this.finishToken(n.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let p=this.startNode();return this.type===n.jsxName?p.name=this.value:this.type.keyword?p.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(p,"JSXIdentifier")}jsx_parseNamespacedName(){let p=this.start,x=this.startLoc,y=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(s.colon))return y;var v=this.startNodeAt(p,x);return v.namespace=y,v.name=this.jsx_parseIdentifier(),this.finishNode(v,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let p=this.start,x=this.startLoc,y=this.jsx_parseNamespacedName();for(this.type===s.dot&&y.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(s.dot);){let v=this.startNodeAt(p,x);v.object=y,v.property=this.jsx_parseIdentifier(),y=this.finishNode(v,"JSXMemberExpression")}return y}jsx_parseAttributeValue(){switch(this.type){case s.braceL:let p=this.jsx_parseExpressionContainer();return p.expression.type==="JSXEmptyExpression"&&this.raise(p.start,"JSX attributes must only be assigned a non-empty expression"),p;case n.jsxTagStart:case s.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let p=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(p,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let p=this.startNode();return this.next(),p.expression=this.type===s.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(s.braceR),this.finishNode(p,"JSXExpressionContainer")}jsx_parseAttribute(){let p=this.startNode();return this.eat(s.braceL)?(this.expect(s.ellipsis),p.argument=this.parseMaybeAssign(),this.expect(s.braceR),this.finishNode(p,"JSXSpreadAttribute")):(p.name=this.jsx_parseNamespacedName(),p.value=this.eat(s.eq)?this.jsx_parseAttributeValue():null,this.finishNode(p,"JSXAttribute"))}jsx_parseOpeningElementAt(p,x){let y=this.startNodeAt(p,x);y.attributes=[];let v=this.jsx_parseElementName();for(v&&(y.name=v);this.type!==s.slash&&this.type!==n.jsxTagEnd;)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(s.slash),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(p,x){let y=this.startNodeAt(p,x),v=this.jsx_parseElementName();return v&&(y.name=v),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(p,x){let y=this.startNodeAt(p,x),v=[],N=this.jsx_parseOpeningElementAt(p,x),de=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(p=this.start,x=this.startLoc,this.next(),this.eat(s.slash)){de=this.jsx_parseClosingElementAt(p,x);break e}v.push(this.jsx_parseElementAt(p,x));break;case n.jsxText:v.push(this.parseExprAtom());break;case s.braceL:v.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(de.name)!==pe(N.name)&&this.raise(de.start,"Expected correspon
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||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ft(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}if(ft(t.onComment)&&(t.onComment=er(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function er(e,t){return function(i,r,s,n,o,h){var c={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(c.loc=new Se(this,o,h)),e.ranges&&(c.range=[s,n]),t.push(c)}}var X=1,z=2,Je=4,kt=8,Xe=16,At=32,Ce=64,Tt=128,Q=256,he=512,wt=1024,_e=X|z|Q;function ze(e,t){return z|(e?Je:0)|(t?kt:0)}var ye=0,Qe=1,q=2,It=3,Pt=4,Nt=5,A=function(t,i,r){this.options=t=$i(t),this.sourceFile=t.sourceFile,this.keywords=H(Ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Fe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=H(s);var n=(s?s+" ":"")+Fe.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Fe.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
`,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.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||t.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&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?z:X),this.regexpState=null,this.privateNameStack=[]},M={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}};A.prototype.parse=function(){var t=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(i)})};M.inFunction.get=function(){return(this.currentVarScope().flags&z)>0};M.inGenerator.get=function(){return(this.currentVarScope().flags&kt)>0};M.inAsync.get=function(){return(this.currentVarScope().flags&Je)>0};M.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he))return!1;if(i&z)return(i&Je)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};M.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&X)};M.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Ce)>0||this.options.allowSuperOutsideMethod};M.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tt)>0};M.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};M.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he)||i&z&&!(i&Xe))return!0}return!1};M.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&wt||!this.inModule&&t&X)};M.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Q)>0};A.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};A.parse=function(t,i){return new this(i,t).parse()};A.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};A.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(A.prototype,M);var P=A.prototype,tr=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=tr.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){T.lastIndex=e+t[0].length;var i=T.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,T.lastIndex=e,e+=T.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsert
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(r)r=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),r,s,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(r=this.eat(a.star)));var h=this.containsEsc;return this.parsePropertyName(i),!e&&!h&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,n,o,t,h),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"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")};g.parsePropertyValue=function(e,t,i,r,s,n,o,h){(i||r)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,r),e.kind="init"):!t&&!h&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var r=this.startNode()
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.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(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
`&&++this.pos;case`
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.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 G(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 i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return ee(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(K(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?j:K)(o,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Ke[e]),this.finishToken(t,e)};var Ar="8.17.0";A.acorn={Parser:A,version:Ar,defaultOptions:We,Position:ue,SourceLocation:Se,getLineInfo:Et,Node:ke,TokenType:_,tokTypes:a,keywordTypes:Ke,TokContext:F,tokContexts:k,isIdentifierChar:K,isIdentifierStart:j,Token:Ze,isNewLine:ee,lineBreak:R,lineBreakG:zi,nonASCIIwhitespace:Ct};var Ri=lt(et(),1);function Lr(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Te=Lr;function we(e){let t=[];for(let i of e)try{return i()}catch(r){t.push(r)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var re=(e,t)=>(i,r,...s)=>i|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,s);var Rr=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let i=this[t];if(e(i,t,this))return i}},Vr=re("findLast",function(){if(Array.isArray(this))return Rr}),ai=Vr;var Ie=Symbol.for("comments");function Or(e){return this[e<0?this.length+e:e]}var Dr=re("at",function(){if(Array.isArray(this)||typeof this=="string")return Or}),Pe=Dr;function Y(e){let t=new Set(e);return i=>t.has(i?.type)}function se(e){return e.range?.[1]??e.end}function w(e){let t=e.range?.[0]??e.start,i=(e.declaration?.decorators??e.decorators)?.[0];return i?Math.min(w(i),t):t}var Mr=5,Br=8,Fr=8,ni=e=>t=>t.label?I(t.label):w(t)+e,jr=e=>e.__contentEnd??se(e),oi=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",ni(Mr)],["ContinueStatement",ni(Br)],["DebuggerStatement",e=>w(e)+Fr],["VariableDeclaration",e=>I(Pe(0,e.declarations,-1))],...oi.map(e=>[e,jr])]),tt=Y(oi);function I(e){let{type:t}=e;return t==="IfStatement"?I(e.alternate??e.consequent):t==="ForInStatement"||t==="ForOfStatement"||t==="ForStatement"||t==="LabeledStatement"||t==="WithStatement"||t==="WhileStatement"?I(e.body):Ur.get(t)?.(e)??se(e)}var ae=Y(["Block","CommentBlock","MultiLine"]),ui=Y(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function ne(e,t,i){if(!e.has(t)){let r=i(t);e.set(t,r)}return e.get(t)}var Gr=new WeakMap;function hi(e){return ne(Gr,e,t=>ae(t)&&t.value[0]==="*"&&/@(?:type
`))return[];let t=[];for(let i of`*${e.value}*`.split(`
`)){if(i=i.trimStart(),!i.startsWith("*"))return[];t.push(i)}return t}var li=new WeakMap;function zr(e){return ne(li,e,Xr)}function fi(e){li.delete(e)}function it(e){return zr(e).length>0}function di(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let r=e[i];if(t&&I(r)===w(t)&&it(r)&&it(t)&&(e.splice(i+1,1),r.value+="*//*"+t.value,r.range=[w(r),I(t)],fi(r)),!ui(r)&&!ae(r))throw new TypeError(`Unknown comment type: "${r.type}".`);t=r}}function Qr(e){return e!==null&&typeof e=="object"}var mi=Qr;var le=null;function fe(e){if(le!==null&&typeof le.property){let t=le;return le=fe.prototype=null,t}return le=fe.prototype=e??Object.create(null),new fe}var Yr=10;for(let e=0;e<=Yr;e++)fe();function rt(e){return fe(e)}function Zr(e,t="type"){rt(e);function i(r){let s=r[t],n=e[s];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return n}return i}var xi=Zr;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],yi={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],Impo
$1 $2
`);e=e.replace(Si,"").trimEnd();let r=Object.create(null),s=Z(0,e,Ci,"").replace(Si,"").trimEnd(),n;for(;n=Ci.exec(e);){let o=Z(0,n[2],ns,"");if(typeof r[n[1]]=="string"||Array.isArray(r[n[1]])){let h=r[n[1]];r[n[1]]=[...hs,...Array.isArray(h)?h:[h],o]}else r[n[1]]=o}return{comments:s,pragmas:r}}var ki=["noformat","noprettier"],Ai=["format","prettier"];function cs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
`);return t===-1?e:e.slice(0,t)}var Ti=cs;function wi(e){let t=Ti(e);t&&(e=e.slice(t.length+1));let i=_i(e),{pragmas:r,comments:s}=Ei(i);return{shebang:t,text:e,pragmas:r,comments:s}}function Ii(e){let{pragmas:t}=wi(e);return Ai.some(i=>at(t,i))}function Pi(e){let{pragmas:t}=wi(e);return ki.some(i=>at(t,i))}function ps(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:Ii,hasIgnorePragma:Pi,locStart:w,locEnd:I,...e}}var Re=ps;var Ve="module",Ni="commonjs",Oe=[Ve,Ni];function De(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return Ve;if(/\.(?:cjs|cts)$/i.test(e))return Ni}}var ls={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function fs(e){let{message:t,loc:i}=e;if(!i)return e;let{line:r,column:s}=i;return Te(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:r,column:s+1}},cause:e})}var Li,ds=()=>(Li??(Li=A.extend((0,Ri.default)())),Li);function ms(e,t){let i=ds(),r=[],s=i.parse(e,{...ls,sourceType:t,allowImportExportEverywhere:t===Ve,onComment:r});return s.comments=r,s}function xs(e,t){let i=De(t?.filepath),r=(i?[i]:Oe).map(n=>()=>ms(e,n)),s;try{s=we(r)}catch({errors:[n]}){throw fs(n)}return Le(s,{text:e})}var ys=Re(xs);var ht={};Be(ht,{espree:()=>Ts});var Di=lt(et(),1);var Vi=[3,5,6,7,8,9,10,11,12,13,14,15,16,17],gs=Pe(0,Vi,-1);function vs(){return gs}function bs(e=5){let t=e==="latest"?vs():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Vi.includes(t))throw new Error("Invalid ecmaVersion.");return t}function Ss(e="script"){if(e==="script"||e==="module"||e==="commonjs")return e;throw new Error("Invalid sourceType.")}function Oi(e){let t=bs(e.ecmaVersion),i=Ss(e.sourceType),r=e.range===!0,s=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},h=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:r,locations:s,allowReserved:n,allowReturnOutsideFunction:h})}var $=Symbol("espree's internal state"),ot=Symbol("espree's esprimaFinishNode");function Cs(e,t,i,r,s,n,o){let h;e?h="Block":o.slice(i,i+2)==="#!"?h="Hashbang":h="Line";let c={type:h,value:t};return typeof i=="number"&&(c.start=i,c.end=r,c.range=[i,r]),typeof s=="object"&&(c.loc={start:s,end:n}),c}var ut=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(r,s){(typeof r!="object"||r===null)&&(r={}),typeof s!="string"&&!(s instanceof String)&&(s=String(s));let n=r.sourceType,o=Oi(r),h=o.ecmaFeatures||{},c=null,l={originalSourceType:n||o.sourceType,tokens:c?[]:null,comments:o.comment===!0?[]:null,impliedStrict:h.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(m){c&&c.onToken(m,l),m.type!==t.eof&&(l.lastToken=m)},onComment(m,S,E,p,x,y){if(l.comments){let v=Cs(m,S,E,p,x,y,s);l.comments.push(v)}}},s),this[$]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let r=this[$],s=r.tokens;return r.comments&&(s.comments=r.comments),s}finishNode(r,s){let n=super.finishNode(r,s);return this[ot](n)}finishNodeAt(r,s,n,o){let h=super.finishNodeAt(r,s,n,o);return this[ot](h)}parse(){let r=this[$],n=super.parse();return n.sourceType=r.originalSourceType,r.comments&&(n.comments=r.comments),r.tokens&&(n.toke
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(s+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,s)}jsx_readString(r){let s=super.jsx_readString(r);return this.type===t.string&&(this[$].jsxAttrValueToken=!0),s}[ot](r){return r.type==="TemplateElement"&&this[$].templateElements.push(r),r.type.includes("Function")&&!("generator"in r)&&(r.generator=!1),r}}};var _s={_regular:null,_jsx:null,get regular(){if(this._regular===null){let e=ut();this._regular=A.extend(e)}return this._regular},get jsx(){if(this._jsx===null){let e=ut(),t=(0,Di.default)();this._jsx=A.extend(t,e)}return this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function Mi(e,t){let i=_s.get(t);return new i(t,e).parse()}var Es={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,impliedStrict:!1}};function ks(e){let{message:t,lineNumber:i,column:r}=e;return typeof i!="number"?e:Te(t,{loc:{start:{line:i,column:r}},cause:e})}function As(e,t){let i=De(t?.filepath),r=(i?[i]:Oe).map(n=>()=>Mi(e,{...Es,sourceType:n})),s;try{s=we(r)}catch({errors:[n]}){throw ks(n)}return Le(s,{text:e,astType:"espree"})}var Ts=Re(As);var ws={...nt,...ht};return Wi(Is);});