13 lines
146 KiB
JavaScript
13 lines
146 KiB
JavaScript
|
(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 xi=Object.create;var ce=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Si=(e,t)=>{for(var i in t)ce(e,i,{get:t[i],enumerable:!0})},et=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gi(t))!bi.call(e,r)&&r!==i&&ce(e,r,{get:()=>t[r],enumerable:!(s=yi(t,r))||s.enumerable});return e};var Ae=(e,t,i)=>(i=e!=null?xi(vi(e)):{},et(t||!e||!e.__esModule?ce(i,"default",{value:e,enumerable:!0}):i,e)),Ci=e=>et(ce({},"__esModule",{value:!0}),e);var Jt=Ee((Ys,qt)=>{qt.exports={}});var Ge=Ee(($s,Je)=>{"use strict";var as=Jt(),ns=/^[\da-fA-F]+$/,os=/^\d+$/,Gt=new WeakMap;function Kt(e){e=e.Parser.acorn||e;let t=Gt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("<tag",!1),o=new s("</tag",!1),u=new s("<tag>...</tag>",!0,!0),p={tc_oTag:n,tc_cTag:o,tc_expr:u},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(u),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(x){let C=this.context.pop();C===n&&x===i.slash||C===o?(this.context.pop(),this.exprAllowed=this.curContext()===u):this.exprAllowed=!0},t={tokContexts:p,tokTypes:l},Gt.set(e,t)}return t}function ne(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 ne(e.object)+"."+ne(e.property)}Je.exports=function(e){return e=e||{},function(t){return us({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Je.exports,"tokTypes",{get:function(){return Kt(void 0).tokTypes},configurable:!0,enumerable:!0});function us(e,t){let i=t.acorn||void 0,s=Kt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,u=s.tokContexts.tc_oTag,p=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,x=i.isNewLine,C=i.isIdentifierStart,B=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let h="",d=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let m=this.input.charCodeAt(this.pos);switch(m){case 60:case 123:return this.pos===this.start?m===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(m):(h+=this.input.slice(d,this.pos),this.finishToken(n.jsxText,h));case 38:h+=this.input.slice(d,this.pos),h+=this.jsx_readEntity(),d=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(m===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(m)?(h+=this.input.slice(d,this.pos),h+=this.jsx_readNewLine(!0),d=this.pos):++this.pos}}}jsx_readNewLine(h){let d=this.input.charCodeAt(this.pos),m;return++this.pos,d===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,m=h?`
|
||
|
`:`\r
|
||
|
`):m=String.fromCharCode(d),this.options.locations&&(++this.curLine,this.lineStart=this.pos),m}jsx_readString(h){let d="",m=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===h)break;g===38?(d+=this.input.slice(m,this.pos),d+=this.jsx_readEntity(),m=this.pos):x(g)?(d+=this.input.slice(m,this.pos),d+=this.jsx_readNewLine(!1),m=this.pos):++this.pos}return d+=this.input.slice(m,this.pos++),this.finishToken(r.string,d)}jsx_readEntity(){let h="",d=0,m,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let E=++this.pos;for(;this.pos<this.input.length&&d++<10;){if(g=this.input[this.pos++],g===";"){h[0]==="#"?h[1]==="x"?(h=h.substr(2),ns.test(h)&&(m=String.fromCharCode(parseInt(h,16)))):(h=h.substr(1),os.test(h)&&(m=String.fromCharCode(parseInt(h,10)))):m=as[h];break}h+=g}return m||(this.pos=E,"&")}jsx_readWord(){let h,d=this.pos;do h=this.input.charCodeAt(++this.pos);while(B(h)||h===45);return this.finishToken(n.jsxName,this.input.slice(d,this.pos))}jsx_parseIdentifier(){let h=this.startNode();return this.type===n.jsxName?h.name=this.value:this.type.keyword?h.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(h,"JSXIdentifier")}jsx_parseNamespacedName(){let h=this.start,d=this.startLoc,m=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return m;var g=this.startNodeAt(h,d);return g.namespace=m,g.name=this.jsx_parseIdentifier(),this.finishNode(g,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let h=this.start,d=this.startLoc,m=this.jsx_parseNamespacedName();for(this.type===r.dot&&m.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let g=this.startNodeAt(h,d);g.object=m,g.property=this.jsx_parseIdentifier(),m=this.finishNode(g,"JSXMemberExpression")}return m}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let h=this.jsx_parseExpressionContainer();return h.expression.type==="JSXEmptyExpression"&&this.raise(h.start,"JSX attributes must only be assigned a non-empty expression"),h;case n.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let h=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(h,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let h=this.startNode();return this.next(),h.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(h,"JSXExpressionContainer")}jsx_parseAttribute(){let h=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),h.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(h,"JSXSpreadAttribute")):(h.name=this.jsx_parseNamespacedName(),h.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(h,"JSXAttribute"))}jsx_parseOpeningElementAt(h,d){let m=this.startNodeAt(h,d);m.attributes=[];let g=this.jsx_parseElementName();for(g&&(m.name=g);this.type!==r.slash&&this.type!==n.jsxTagEnd;)m.attributes.push(this.jsx_parseAttribute());return m.selfClosing=this.eat(r.slash),this.expect(n.jsxTagEnd),this.finishNode(m,g?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(h,d){let m=this.startNodeAt(h,d),g=this.jsx_parseElementName();return g&&(m.name=g),this.expect(n.jsxTagEnd),this.finishNode(m,g?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(h,d){let m=this.startNodeAt(h,d),g=[],E=this.jsx_parseOpeningElementAt(h,d),he=null;if(!E.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(h=this.start,d=this.startLoc,this.next(),this.eat(r.slash)){he=this.jsx_parseClosingElementAt(h,d);break e}g.push(this.jsx_parseElementAt(h,d));break;case n.jsxText:g.push(this.parseExprAtom());break;case r.braceL:g.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}ne(he.name)!==ne(E.name)&&this.raise(he.start,"Expected correspon
|
||
|
`;e=e.replace(Cs,"").replace(Ss,"").replace(ks,"$1");let i="";for(;i!==e;)i=e,e=e.replace(Ts,`${t}$1 $2${t}`);e=e.replace(Zt,"").trimRight();let s=Object.create(null),r=e.replace(ei,"").replace(Zt,"").trimRight(),n;for(;n=ei.exec(e);){let o=n[2].replace(_s,"");typeof s[n[1]]=="string"||Array.isArray(s[n[1]])?s[n[1]]=si.concat(s[n[1]],o):s[n[1]]=o}return{comments:r,pragmas:s}}function Ps({comments:e="",pragmas:t={}}){let i=`
|
||
|
`,s="/**",r=" *",n=" */",o=Object.keys(t),u=o.flatMap(l=>ti(l,t[l])).map(l=>`${r} ${l}${i}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let l=t[o[0]];return`${s} ${ti(o[0],l)[0]}${n}`}}let p=e.split(i).map(l=>`${r} ${l}`).join(i)+i;return s+i+(e?p:"")+(e&&o.length?r+i:"")+u+n}function ti(e,t){return si.concat(t).map(i=>`@${e} ${i}`.trim())}});var zs={};Si(zs,{parsers:()=>Hs});var _i=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],nt=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ti="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040
|
||
|
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),tt(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return tt(t.onComment)&&(t.onComment=Ri(t,t.onComment)),t}function Ri(e,t){return function(i,s,r,n,o,u){var p={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(p.loc=new xe(this,o,u)),e.ranges&&(p.range=[r,n]),t.push(p)}}var ie=1,Y=2,Be=4,lt=8,ft=16,dt=32,De=64,mt=128,re=256,Fe=ie|Y|re;function Me(e,t){return Y|(e?Be:0)|(t?lt:0)}var fe=0,je=1,J=2,xt=3,yt=4,gt=5,T=function(t,i,s){this.options=t=Li(t),this.sourceFile=t.sourceFile,this.keywords=G(ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Pe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=G(r);var n=(r?r+" ":"")+Pe.strict;this.reservedWordsStrict=G(n),this.reservedWordsStrictBind=G(n+" "+Pe.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
||
|
`,s-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||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(ie),this.regexpState=null,this.privateNameStack=[]},F={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}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return(this.currentVarScope().flags&Y)>0};F.inGenerator.get=function(){return(this.currentVarScope().flags<)>0&&!this.currentVarScope().inClassFieldInit};F.inAsync.get=function(){return(this.currentVarScope().flags&Be)>0&&!this.currentVarScope().inClassFieldInit};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&re)return!1;if(t.flags&Y)return(t.flags&Be)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&De)>0||i||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return(this.currentThisScope().flags&mt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Y|re))>0||i};F.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&re)>0};T.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};T.parse=function(t,i){return new this(i,t).parse()};T.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};T.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(T.prototype,F);var k=T.prototype,Oi=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;k.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){V.lastIndex=e,e+=V.exec(this.input)[0].length;var t=Oi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){V.lastIndex=e+t[0].length;var i=V.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";"&&e++}};k.eat=function(e){return this.type===e?(this.next(),!0):!1};k.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};k.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};k.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};k.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};
|
||
|
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.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 s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.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(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.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))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!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,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,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||(s=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,u),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"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")};y.parsePropertyValue=function(e,t,i,s,r,n,o,u){(i||s)&&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.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&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||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};y.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")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.
|
||
|
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.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))}this.raise(this.start,"Unterminated template")};v.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 K(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 s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=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(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(z(r,s))this.pos+=r<=65535?1:2;else if(r===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?U:z)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=K(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};v.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Oe[e]),this.finishToken(t,e)};var ss="8.11.3";T.acorn={Parser:T,version:ss,defaultOptions:Le,Position:te,SourceLocation:xe,getLineInfo:ct,Node:ge,TokenType:S,tokTypes:a,keywordTypes:Oe,TokContext:D,tokContexts:_,isIdentifierChar:z,isIdentifierStart:U,Token:qe,isNewLine:Q,lineBreak:R,lineBreakG:Pi,nonASCIIwhitespace:pt};var pi=Ae(Ge(),1);function ps(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var be=ps;function hs(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Se=hs;var cs=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},Ke=cs;function ls(e){return Array.isArray(e)&&e.length>0}var Wt=ls;function P(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(P(i),t):t}function j(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function fs(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var Xt=fs;var ds=Xt(["Block","CommentBlock","MultiLine"]),oe=ds;function ms(e){let t=`*${e.value}*`.split(`
|
||
|
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var We=ms;function xs(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var Ht=xs;var ue=null;function pe(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=pe.prototype=null,t}return ue=pe.prototype=e??Object.create(null),new pe}var ys=10;for(let e=0;e<=ys;e++)pe();function Xe(e){return pe(e)}function gs(e,t="type"){Xe(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var zt=gs;var Qt={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],Cla
|
||
|
`);return t===-1?e:e.slice(0,t)}var ni=Is;function Ns(e){let t=ni(e);t&&(e=e.slice(t.length+1));let i=(0,Z.extract)(e),{pragmas:s,comments:r}=(0,Z.parseWithComments)(i);return{shebang:t,text:e,pragmas:s,comments:r}}function oi(e){let{pragmas:t}=Ns(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Vs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:oi,locStart:P,locEnd:j,...e}}var Te=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var ke=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return be(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,pi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=Se(s)}catch({errors:[n]}){throw Os(n)}return _e(r,{text:e})}var hi=Te(Fs);var fi=Ae(Ge(),1);var w={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 Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Qe(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Qe.prototype={constructor:Qe,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Qe;var Ye=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return Ye[Ye.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new E
|
||
|
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[H].jsxAttrValueToken=!0),r}[$e](s){return s.type==="TemplateElement"&&this[H].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(Ze())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),Ze())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:be(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=Se(s)}catch({errors:[n]}){throw Ws(n)}return _e(r,{text:e})}var mi=Te(Xs);var Hs={acorn:hi,espree:mi};return Ci(zs);});
|