sveast 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/core.js +1 -1
  3. package/entities.js +1 -1
  4. package/is-valid-type.js +1 -1
  5. package/lexer.js +2 -2
  6. package/module.js +1 -1
  7. package/package.json +1 -1
  8. package/parse-imports-exports.js +1 -1
  9. package/parse-module.js +1 -1
  10. package/parse-sections.js +1 -1
  11. package/parse.js +1 -1
  12. package/runes.js +1 -1
  13. package/{shared-xj75g925.js → shared-1qapk0wt.js} +2 -2
  14. package/{shared-e15f58b0.js → shared-3yc3kmnb.js} +2 -2
  15. package/shared-40v3xx3k.js +2 -0
  16. package/shared-8fs155vy.js +2 -0
  17. package/shared-9683q02r.js +2 -0
  18. package/shared-9e9v7bgm.js +2 -0
  19. package/shared-arg06k6z.js +2 -0
  20. package/shared-bxg3hhpk.js +5 -0
  21. package/shared-dzd7bb3r.js +3 -0
  22. package/shared-e8c239q0.js +10 -0
  23. package/shared-k5pfyxpa.js +2 -0
  24. package/shared-k7zadjsv.js +2 -0
  25. package/shared-np5jnnrw.js +2 -0
  26. package/shared-pnv8wmzz.js +3 -0
  27. package/{shared-j60qxzy3.js → shared-rfa6cx21.js} +3 -3
  28. package/shared-wentwa9g.js +2 -0
  29. package/shared-zd01zsyh.js +10 -0
  30. package/typescript.js +1 -1
  31. package/walk.js +1 -1
  32. package/shared-23m65d6z.js +0 -5
  33. package/shared-2ahdjk78.js +0 -2
  34. package/shared-5ewsn6st.js +0 -2
  35. package/shared-657pk0sg.js +0 -3
  36. package/shared-918zqd7r.js +0 -2
  37. package/shared-a5mpxvcm.js +0 -3
  38. package/shared-d7yvtm6q.js +0 -2
  39. package/shared-e8rqjefv.js +0 -10
  40. package/shared-j2msb2xj.js +0 -9
  41. package/shared-j3kp940c.js +0 -2
  42. package/shared-p0ybqcs7.js +0 -2
  43. package/shared-qc7kjfqj.js +0 -2
  44. package/shared-tscn5fn7.js +0 -2
  45. package/shared-zn0h0cz3.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{I,o}from"./shared-zd01zsyh.js";var N=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,F=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),O=new Set("public private protected readonly declare abstract override static accessor".split(" ")),K=new Set("public private protected readonly override".split(" ")),V=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),H=new Set("var let const function class interface enum".split(" ")),k=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),L=1,U=32,j=256,z=0,G=1,f=2,Q=3,W=4,T=6,C=7,D=256,E=1024,Y=8|E,X=f|D,w=1,J=2,P=40,Z=41,tt=44,_=46,v=58,y=61,R=60,m=123,et=91,S=42,st=35,b=34,A=39,it=SyntaxError("speculative parse failed"),q=I((x)=>{let{tokTypes:s,keywordTypes:M,isIdentifierChar:B,isIdentifierStart:u}=x.acorn,d=new x.acorn.TokenType("@");class g extends x{inType=!1;$4=!1;$5=!1;$7=null;$l=null;$m=!1;$n=!1;$f=null;$9=[[]];$o=0;$t=0;$j=-1;constructor(t,e,r){super(t,e,r);let i=this.options.onComment;if(typeof i==="function")this.options.onComment=(n,a,h,p,c,l)=>{if(h<this.$t)return;this.$t=p,i.call(this,n,a,h,p,c,l)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$l=null,this.$m=!1,this.$n=!1,this.$f=null,this.$9=[[]],this.$o=0,this.$t=0,this.$j=-1}getTokenFromCode(t){if(t===64)return++this.pos,this.finishToken(d);return super.getTokenFromCode(t)}readToken_lt_gt(t){if(this.inType)return this.finishOp(s.relational,1);return super.readToken_lt_gt(t)}$a(t){let e=this.inType;this.inType=!0;let r=t();if(this.inType=e,!e&&this.type===s.relational)this.pos=this.start,this.nextToken();return r}$1(){return this.type===s.relational&&this.value==="<"}$p(){if(this.type===s.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(s.relational,"<");return this.$1()}$c(){return this.type===s.relational&&this.value===">"}$u(){return this.type===s.prefix&&this.value==="!"}hasPrecedingLineBreak(){return this.$14(this.lastTokEnd,this.start)}$14(t,e){for(let r=t;r<e;r++){let i=this.input.charCodeAt(r);if(i===10||i===13||i===8232||i===8233)return!0}return!1}$d(t=this.pos){return N.lastIndex=t,N.exec(this.input),N.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let t=this.$d(),e=t;while(e<this.input.length&&B(this.input.charCodeAt(e)))e++;return this.input.slice(t,e)}$b(){return!this.$14(this.pos,this.$d())}$15(){return this.$b()&&u(this.$2())&&!Object.hasOwn(M,this.$3())}$16(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$4:this.$4,$5:this.$5,$7:this.$7,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$17(t){this.pos=t.pos,this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.startLoc=t.startLoc,this.endLoc=t.endLoc,this.lastTokStart=t.lastTokStart,this.lastTokEnd=t.lastTokEnd,this.lastTokStartLoc=t.lastTokStartLoc,this.lastTokEndLoc=t.lastTokEndLoc,this.curLine=t.curLine,this.lineStart=t.lineStart,this.context=t.context,this.exprAllowed=t.exprAllowed,this.containsEsc=t.containsEsc,this.inType=t.inType,this.$4=t.$4,this.$5=t.$5,this.$7=t.$7,this.scopeStack.length=t.scopes,this.privateNameStack.length=t.privateNames,this.labels=t.labels,this.labels.length=t.labelCount,this.strict=t.strict,this.yieldPos=t.yieldPos,this.awaitPos=t.awaitPos,this.awaitIdentPos=t.awaitIdentPos,this.potentialArrowAt=t.potentialArrowAt,this.potentialArrowInForAwait=t.potentialArrowInForAwait}raise(t,e){if(this.$o>0)throw it;return super.raise(t,e)}$1z(t,e){try{super.raise(t,e)}catch(r){if(r instanceof SyntaxError)r.$20=!0;throw r}throw Error("unreachable")}$g(t,e=!1){let r=this.$16();this.$o++;try{let i=t();if(e||i===void 0)this.$17(r);return i}catch(i){if(!(i instanceof SyntaxError)||!e&&i.$20)throw i;this.$17(r);return}finally{this.$o--}}$v(t){return this.$g(t,!0)===!0}$18(t){if(t.end=this.lastTokEnd,this.options.locations)t.loc.end=this.lastTokEndLoc}$q(t,e){if(t.start=e.start,this.options.locations)t.loc.start=e.loc.start}$6(t=!1){let e=this.startNode();return e.typeAnnotation=this.$a(()=>(this.next(),t?this.$21():this.$0())),this.finishNode(e,"TSTypeAnnotation")}$h(t,e){if(e&&this.eat(s.question))t.optional=!0,this.$18(t);if(this.type===s.colon)t.typeAnnotation=this.$6(),this.$18(t);return t}$21(){if(this.type!==s.name&&this.type!==s._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&u(this.$2())){let t=this.startNode();if(this.next(),t.parameterName=this.type===s._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(t,!0);return t.asserts=!0,t.typeAnnotation=null,this.finishNode(t,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let t=this.startNode();return t.parameterName=this.type===s._this?this.$w():this.parseIdent(!0),this.$x(t,!1)}return this.$0()}$x(t,e){this.next();let r=this.startNode();return r.typeAnnotation=this.$0(),t.typeAnnotation=this.finishNode(r,"TSTypeAnnotation"),t.asserts=e,this.finishNode(t,"TSTypePredicate")}$w(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let t=this.$0();if(this.type!==s.eof)this.unexpected();return t}$0(){let t=this.$19();if(this.$4||this.type!==s._extends||this.hasPrecedingLineBreak())return t;let e=this.startNodeAt(t.start,t.loc?.start);return this.next(),e.checkType=t,e.extendsType=this.$i(!0,()=>this.$19()),this.expect(s.question),e.trueType=this.$i(!1,()=>this.$0()),this.expect(s.colon),e.falseType=this.$i(!1,()=>this.$0()),this.finishNode(e,"TSConditionalType")}$i(t,e){let r=this.$4;this.$4=t;let i=e();return this.$4=r,i}$19(){if(this.$22())return this.$1a("TSFunctionType");if(this.type===s._new||this.isContextual("abstract")&&this.$3()==="new")return this.$1a("TSConstructorType");return this.$1b("TSUnionType",s.bitwiseOR,()=>this.$1b("TSIntersectionType",s.bitwiseAND,()=>this.$1c()))}$1a(t){let e=this.startNode();if(t==="TSConstructorType"){if(e.abstract=this.isContextual("abstract"),e.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(e,s.arrow)),this.finishNode(e,t)}$r(t,e){if(this.$1())t.typeParameters=this.$8();if(this.expect(s.parenL),t.parameters=this.parseBindingList(s.parenR,!1,!0),this.type===e)t.typeAnnotation=this.$6(!0);else if(e===s.arrow)this.unexpected()}$22(){if(this.$1())return!0;if(this.type!==s.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===s.parenR||this.type===s.ellipsis)return!0;if(this.type===s.name||this.type===s._this)this.next();else if(this.type===s.braceL||this.type===s.bracketL)this.parseBindingAtom();else return!1;let t=this.type;if(t===s.colon||t===s.comma||t===s.question||t===s.eq)return!0;if(t!==s.parenR)return!1;return this.next(),this.type===s.arrow})}$1b(t,e,r){let i=this.startNode(),n=this.eat(e),a=[];do a.push(r());while(this.eat(e));if(a.length===1&&!n)return a[0];return i.types=a,this.finishNode(i,t)}$1c(){if(this.type===s.name&&!this.containsEsc){let t=this.value;if(t==="keyof"||t==="unique"||t==="readonly"){let e=this.startNode();return this.next(),e.operator=t,e.typeAnnotation=this.$1c(),this.finishNode(e,"TSTypeOperator")}if(t==="infer"){let e=this.startNode();this.next();let r=this.startNode();r.name=this.$y();let i=this.$g(()=>this.$23());if(i)r.constraint=i;return e.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(e,"TSInferType")}}return this.$i(!1,()=>this.$24())}$23(){if(!this.eat(s._extends))return;let t=this.$i(!0,()=>this.$0());if(this.$4||this.type!==s.question)return t;return}$y(){if(this.type!==s.name&&!this.type.keyword)this.unexpected();let t=this.type===s.name?this.value:this.type.keyword;return this.next(),t}$24(){let t=this.$25();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL)){let e=this.startNodeAt(t.start,t.loc?.start);if(this.eat(s.bracketR))e.elementType=t,t=this.finishNode(e,"TSArrayType");else e.objectType=t,e.indexType=this.$0(),this.expect(s.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}$25(){switch(this.type){case s.name:case s._void:case s._null:{let t=F.get(this.value);if(t&&(this.type!==s.name||!this.containsEsc&&this.$2()!==_)){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.$1d()}case s.string:case s.num:case s._true:case s._false:{let t=this.startNode();return t.literal=this.parseExprAtom(),this.finishNode(t,"TSLiteralType")}case s.plusMin:{if(this.value!=="-")break;let t=this.startNode(),e=this.startNode();if(this.next(),this.type!==s.num)this.unexpected();return e.operator="-",e.prefix=!0,e.argument=this.parseExprAtom(),t.literal=this.finishNode(e,"UnaryExpression"),this.finishNode(t,"TSLiteralType")}case s.backQuote:return this.$26();case s._this:{let t=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let e=this.startNodeAt(t.start,t.loc?.start);return e.parameterName=t,this.$x(e,!1)}return t}case s._typeof:return this.$27();case s._import:return this.$1e();case s.braceL:return this.$28()?this.$29():this.$2a();case s.bracketL:return this.$2b();case s.parenL:{let t=this.startNode();return this.next(),t.typeAnnotation=this.$0(),this.expect(s.parenR),this.finishNode(t,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1d()}return this.unexpected()}$1d(){let t=this.startNode();if(t.typeName=this.$k(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeReference")}$k(){let t=this.parseIdent(!0);while(this.eat(s.dot)){let e=this.startNodeAt(t.start,t.loc?.start);e.left=t,e.right=this.parseIdent(!0),t=this.finishNode(e,"TSQualifiedName")}return t}$27(){let t=this.startNode();if(this.next(),t.exprName=this.type===s._import?this.$1e():this.$k(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeQuery")}$1e(){let t=this.startNode();if(this.next(),t.argument=this.$1f(),this.eat(s.dot))t.qualifier=this.$k();if(this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSImportType")}$z(){if(this.type!==s.string)this.unexpected();return this.parseExprAtom()}$1f(){this.expect(s.parenL);let t=this.$z();return this.expect(s.parenR),t}$26(){let t=this.startNode(),e=this.startNode();this.next(),e.expressions=[];let r=this.parseTemplateElement({isTagged:!1});e.quasis=[r];while(!r.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),e.expressions.push(this.$0()),this.expect(s.braceR),r=this.parseTemplateElement({isTagged:!1}),e.quasis.push(r)}return this.next(),t.literal=this.finishNode(e,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}$28(){return this.$v(()=>{if(this.next(),this.type===s.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==s.bracketL)return!1;if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s._in})}$29(){let t=this.startNode();if(this.expect(s.braceL),this.type===s.plusMin)t.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))t.readonly=!0;this.expect(s.bracketL);let e=this.startNode();if(e.name=this.$y(),this.expect(s._in),e.constraint=this.$0(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),t.nameType=this.eatContextual("as")?this.$0():null,this.expect(s.bracketR),this.type===s.plusMin)t.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))t.optional=!0;if(this.eat(s.colon))t.typeAnnotation=this.$0();return this.semicolon(),this.expect(s.braceR),this.finishNode(t,"TSMappedType")}$2a(){let t=this.startNode();return t.members=this.$1g(),this.finishNode(t,"TSTypeLiteral")}$1g(){this.expect(s.braceL);let t=[];while(!this.eat(s.braceR))t.push(this.$2c());return t}$2c(){let t=this.startNode(),e="TSPropertySignature",r=this.type===s._new?this.$2():-1;if(this.type===s.parenL||this.$1())e="TSCallSignatureDeclaration",this.$r(t,s.colon);else if(r===P||r===R)e="TSConstructSignatureDeclaration",this.next(),this.$r(t,s.colon);else{let i=this.type===s._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),t.readonly=!0;if(this.type===s.bracketL&&this.$1h())return this.$1i(t);let n="method";if(i)t.key=i;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))n=this.value,this.next();this.parsePropertyName(t)}if(this.eat(s.question))t.optional=!0;if(this.type===s.parenL||this.$1()){if(e="TSMethodSignature",n!=="method")t.kind=n;this.$r(t,s.colon),t.kind=n}else if(this.type===s.colon)t.typeAnnotation=this.$6()}return this.$1j(),this.finishNode(t,e)}$1j(){if(!this.eat(s.comma))this.semicolon()}$1h(){return this.$v(()=>{if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s.colon})}$1i(t){if(this.expect(s.bracketL),t.parameters=[this.$h(this.parseIdent(),!1)],this.expect(s.bracketR),this.type===s.colon)t.typeAnnotation=this.$6();return this.$1j(),this.finishNode(t,"TSIndexSignature")}$2b(){let t=this.startNode();this.expect(s.bracketL),t.elementTypes=[];while(!this.eat(s.bracketR))if(t.elementTypes.push(this.$2d()),this.type!==s.bracketR)this.expect(s.comma);return this.finishNode(t,"TSTupleType")}$2d(){let t=this.start,e=this.startLoc,r=this.eat(s.ellipsis),i;if((this.type===s.name||this.type.keyword)&&this.$2e()){let n=this.startNode();n.label=this.parseIdent(!0),n.optional=this.eat(s.question),this.expect(s.colon),n.elementType=this.$0(),i=this.finishNode(n,"TSNamedTupleMember")}else if(i=this.$0(),this.eat(s.question)){let n=this.startNodeAt(i.start,i.loc?.start);n.typeAnnotation=i,i=this.finishNode(n,"TSOptionalType")}if(r){let n=this.startNodeAt(t,e);n.typeAnnotation=i,i=this.finishNode(n,"TSRestType")}return i}$2e(){let t=this.$d();if(this.input.charCodeAt(t)===63)t=this.$d(t+1);return this.input.charCodeAt(t)===v}$8(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c()){let e=this.startNode();while((this.type===s._const||this.type===s._in||this.isContextual("out"))&&u(this.$2()))e[this.value]=!0,this.next();if(e.name=this.$y(),this.eat(s._extends))e.constraint=this.$0();if(this.eat(s.eq))e.default=this.$0();if(t.params.push(this.finishNode(e,"TSTypeParameter")),!this.$c()){if(this.expect(s.comma),this.$c())t.extra={trailingComma:this.lastTokStart}}}if(this.next(),t.params.length===0)this.$1z(this.start,"Type parameter list cannot be empty.");return this.finishNode(t,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c())if(t.params.push(this.$0()),!this.$c())this.expect(s.comma);if(t.params.length===0)this.unexpected();return this.next(),this.finishNode(t,"TSTypeParameterInstantiation")})}$1k(){let t=[];do{let e=this.startNode();if(e.expression=this.$k(),this.$1())e.typeParameters=this.$e();t.push(this.finishNode(e,"TSExpressionWithTypeArguments"))}while(this.eat(s.comma));return t}$1l(t=!1){if(this.type!==s.name||this.containsEsc){if(this.type===s._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2f(this.value))return;if(this.value==="declare")return this.$2g(t);return this.$1m(this.startNode(),this.value)}$2f(t){switch(t){case"interface":case"type":case"namespace":return this.$15();case"enum":return u(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let e=this.$2();return this.$b()&&(e===b||e===A||u(e))}case"declare":return this.$b()&&V.has(this.$3());case"global":return this.$b()&&this.$2()===m}return!1}$1m(t,e){switch(e){case"interface":return this.$1n(t);case"type":return this.$2h(t);case"enum":return this.$10(t);case"abstract":return this.$1o(t,!0);case"global":return t.global=!0,t.id=this.parseIdent(),t.body=this.$11(),this.finishNode(t,"TSModuleDeclaration")}return this.$2i(t)}$2g(t){let e=this.$5;this.$5=!0;let r=this.startNode();this.next();let i=this.value;if(i==="const"&&this.$3()==="enum")r.const=!0;if(!t&&H.has(i))r.declare=!0;let n;if(r.const)n=this.$10(r);else if(i==="var"||i==="let"||i==="const")n=this.parseVarStatement(r,i,!0);else if(i==="function")this.next(),n=this.parseFunction(r,w,!1,!1);else if(i==="class")n=this.parseClass(r,!0);else n=this.$1m(r,i);return n.declare=!0,this.$5=e,n}$1o(t,e){return this.next(),t.abstract=!0,this.parseClass(t,e)}$1n(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,C),this.$1())t.typeParameters=this.$8();return this.$a(()=>{if(this.eat(s._extends))t.extends=this.$1k();let e=this.startNode();e.body=this.$1g(),t.body=this.finishNode(e,"TSInterfaceBody")}),this.finishNode(t,"TSInterfaceDeclaration")}$2h(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,T),this.$1())t.typeParameters=this.$8();return t.typeAnnotation=this.$a(()=>(this.expect(s.eq),this.$0())),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}$10(t){if(this.type===s._const)t.const=!0,this.next();this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,X),this.expect(s.braceL),t.members=[];while(!this.eat(s.braceR)){let e=this.startNode();if(e.id=this.type===s.string?this.parseExprAtom():this.parseIdent(!0),this.eat(s.eq))e.initializer=this.parseMaybeAssign();if(t.members.push(this.finishNode(e,"TSEnumMember")),this.type!==s.braceR)this.expect(s.comma)}return this.finishNode(t,"TSEnumDeclaration")}$2i(t){if(this.next(),this.type===s.string){if(t.id=this.parseExprAtom(),this.type===s.braceL)t.body=this.$11();else this.semicolon();return this.finishNode(t,"TSModuleDeclaration")}return t.id=this.parseIdent(),this.checkLValSimple(t.id,Y),this.$1p(t)}$1p(t){if(this.eat(s.dot)){let e=this.startNode();e.id=this.parseIdent(),t.body=this.$1p(e)}else t.body=this.$11();return this.finishNode(t,"TSModuleDeclaration")}$11(){this.enterScope(j);let t=this.startNode();this.enterScope(0),this.expect(s.braceL),t.body=[];while(!this.eat(s.braceR))t.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(t,"TSModuleBlock")}$1q(t,e){if(t.isExport=e,t.id=this.parseIdent(),this.checkLValSimple(t.id,f),this.expect(s.eq),this.isContextual("require")&&this.$2()===P){let r=this.startNode();this.next(),r.expression=this.$1f(),t.moduleReference=this.finishNode(r,"TSExternalModuleReference")}else t.moduleReference=this.$k();return this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}$2j(){let t=this.$d();if(this.input.charCodeAt(t)!==y)return!1;let e=this.input.charCodeAt(t+1);return e!==y&&e!==62}parseStatement(t,e,r){if(this.type===d)this.$1r(!0);let i=this.$1l();if(i)return i;return super.parseStatement(t,e,r)}parseVarStatement(t,e,r){return super.parseVarStatement(t,e,r||this.$5)}parseVarId(t,e){if(super.parseVarId(t,e),t.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),t.definite=!0;this.$h(t.id,!1)}parseCatchClauseParam(){let t=this.$h(this.parseBindingAtom(),!1),e=t.type==="Identifier";return this.enterScope(e?U:0),this.checkLValPattern(t,e?W:f),this.expect(s.parenR),t}parseImport(t){if(this.next(),t.importKind="value",this.type===s.string)t.specifiers=[],t.source=this.parseExprAtom();else{if(this.isContextual("type")){let e=this.$2();if(e===m||e===S||u(e)&&this.$3()!=="from")t.importKind="type",this.next()}if(this.type===s.name&&this.$2j())return this.$1q(t,!1);t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.$z()}return this.$1s(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=s._with;return this.type===s._with?super.parseWithClause():void 0}$1s(t){let e=this.parseWithClause();if(e)t.attributes=e}parseImportSpecifier(){return this.$1t("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(t){return this.$1t("exportKind",()=>super.parseExportSpecifier(t))}$1t(t,e){let r=this.isContextual("type")?this.$2():-1;if(r===b||r===A||u(r)&&this.$3()!=="as"){let n=this.startNode();this.next();let a=e();return this.$q(a,n),a[t]="type",a}let i=e();return i[t]="value",i}parseExport(t,e){if(this.next(),this.eat(s._import)){if(t.importKind="value",this.isContextual("type")&&u(this.$2())&&this.$3()!=="from")t.importKind="type",this.next();return this.$1q(t,!0)}if(this.eat(s.eq))return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),t.id=this.parseIdent(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration");if(t.exportKind="value",this.isContextual("type")){let n=this.$2();if(n===m||n===S)t.exportKind="type",this.next()}if(this.eat(s.star))return this.parseExportAllDeclaration(t,e);if(this.eat(s._default)){if(this.isContextual("interface")&&this.$15())t.declaration=this.$1n(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")t.declaration=this.$1o(this.startNode(),"nullableID");else t.declaration=this.parseExportDefaultDeclaration();return this.finishNode(t,"ExportDefaultDeclaration")}let r=this.isContextual("declare"),i=this.$1l(!0);if(i||this.shouldParseExportStatement()){if(t.declaration=i??this.parseStatement(null),r||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSTypeAliasDeclaration")t.exportKind="type";return t.specifiers=[],t.source=null,this.finishNode(t,"ExportNamedDeclaration")}if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))t.source=this.$z(),this.$1s(t);else{for(let n of t.specifiers)if(this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal")this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.");t.source=null}return this.semicolon(),this.finishNode(t,"ExportNamedDeclaration")}parseFunction(t,e,r,i,n){let a=e&w;if(a)this.$f=t,this.$j=t.start;super.parseFunction(t,e,r,i,n),this.$f=null;let h=!t.body;if(h)t.type="TSDeclareFunction";if(a&&t.id){if(h){if(this.$5&&this.currentScope().flags&L)this.declareName(t.id.name,E,t.id.start);this.checkLValSimple(t.id,z)}else if(!(e&J)){let p=Q;if(this.strict||t.generator||t.async)p=this.treatFunctionsAsVar?G:f;this.checkLValSimple(t.id,p)}}return t}parseFunctionParams(t){if(this.$1())t.typeParameters=this.$8();if(super.parseFunctionParams(t),this.type===s.colon)t.returnType=this.$6(!0)}parseFunctionBody(t,e,r,i){if(r&&this.type===s.colon)t.returnType=this.$6(!0);if(e||this.type===s.braceL||t.start!==this.$j){super.parseFunctionBody(t,e,r,i);return}this.semicolon(),this.exitScope()}parseMethod(t,e,r){let i=this.$l;this.$l=null;let n=super.parseMethod(t,e,r);if(!n.body)n.type="TSDeclareMethod";if(i)n.typeParameters=i;return n}parseBindingList(t,e,r,i){let n=i===!0||this.$m;return this.$m=!1,super.parseBindingList(t,e,r,n)}$s(t){if(!t&&!this.$b())return!1;let e=this.$2();return e===et||e===m||e===S||e===_||e===st||e===b||e===A||e>=48&&e<=57||u(e)}parseAssignableListItem(t){let e=this.$12(),r=this.start,i=this.startLoc,n,a=!1,h=!1;if(t)while(this.type===s.name&&K.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")a=!0;else if(this.value==="override")h=!0;else n=this.value;this.next()}let p;if(this.type===s._this)p=this.startNode(),p.name="this",this.next(),this.finishNode(p,"Identifier");else p=this.parseBindingAtom();let c=this.type===s.eq?this.parseMaybeDefault(r,i,p):this.parseMaybeDefault(p.start,p.loc?.start,this.$h(p,!0));if(e.length>0)c.decorators=e;if(!n&&!a&&!h)return c;let l=this.startNodeAt(r,i);if(n)l.accessibility=n;if(a)l.readonly=!0;if(h)l.override=!0;return l.parameter=c,this.finishNode(l,"TSParameterProperty")}parseBindingListItem(t){if(t.type==="RestElement")this.$h(t,!0);return t}checkLValSimple(t,e,r){if(this.$f&&t===this.$f.id){this.$f=null;return}if(!e&&k.has(t.type)){this.checkLValSimple(t.expression,e,r);return}switch(t.type){case"TSParameterProperty":this.checkLValInnerPattern(t.parameter,e,r);return;case"Identifier":if(t.name==="this")return}super.checkLValSimple(t,e,r)}toAssignable(t,e,r){if(t&&!e&&k.has(t.type))return t;return super.toAssignable(t,e,r)}declareName(t,e,r){let i=this.currentScope();if(e&E){this.$1u(i,t),i.$1v??=[],i.$1v.push(t);return}if(e===T||e===C){if(i.$13??=[],e===T&&o(i.$13,t))this.raise(r,`type '${t}' has already been declared.`);i.$13.push(t),this.$1u(i,t);return}if(e&D){if(i.$1w??=[],o(i.$1w,t))return;super.declareName(t,f,r),i.$1w.push(t);return}super.declareName(t,e,r)}$1u(t,e){if(this.inModule&&t.flags&L)delete this.undefinedExports[e]}checkLocalExport(t){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(o(r.$13,t.name)||o(r.$1v,t.name))return}super.checkLocalExport(t)}checkExport(){}raiseRecoverable(t,e){if(e==="Duplicate constructor in the same class")return;super.raiseRecoverable(t,e)}$12(){let t=[];while(this.type===d)t.push(this.$1x());return t}$1r(t){let e=this.$9[this.$9.length-1];while(this.type===d)e.push(this.$1x());if(this.type===s._export){if(!t)this.unexpected()}else if(this.type!==s._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1x(){let t=this.startNode();this.next(),this.$9.push([]);let e=this.start,r=this.startLoc,i;if(this.type===s.parenL){if(this.next(),i=this.parseExpression(),this.expect(s.parenR),this.options.preserveParens){let a=this.startNodeAt(e,r);a.expression=i,i=this.finishNode(a,"ParenthesizedExpression")}}else{i=this.parseIdent(!1);while(this.eat(s.dot)){let a=this.startNodeAt(e,r);a.object=i,a.property=this.parseIdent(!0),a.computed=!1,i=this.finishNode(a,"MemberExpression")}}let n=this.$p()?this.$e():void 0;if(this.eat(s.parenL)){let a=this.startNodeAt(i.start,i.loc?.start);if(a.callee=i,a.arguments=this.parseExprList(s.parenR,!1,!1),n)a.typeArguments=n;i=this.finishNode(a,"CallExpression")}else if(n){let a=this.startNodeAt(i.start,i.loc?.start);a.expression=i,a.typeArguments=n,i=this.finishNode(a,"TSInstantiationExpression")}return t.expression=i,this.$9.pop(),this.finishNode(t,"Decorator")}shouldParseExportStatement(){return this.type===d||super.shouldParseExportStatement()}parseExprAtom(t,e,r){if(this.type===d)this.$1r(!1);return super.parseExprAtom(t,e,r)}parseProperty(t,e){if(t||this.type!==d)return super.parseProperty(t,e);let r=this.$12(),i=super.parseProperty(t,e);if(i.type==="SpreadElement")this.raise(i.start,"Decorators can't be used with SpreadElement");return i.decorators=r,i}parseClassId(t,e){let r=this.$9.length-1,i=this.$9[r];if(i.length>0)t.decorators=i,this.$q(t,i[0]),this.$9[r]=[];if(!this.isContextual("implements")||e===!0)super.parseClassId(t,e);if(this.$1())t.typeParameters=this.$8()}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.$1())t.superTypeParameters=this.$e();if(this.eatContextual("implements"))t.implements=this.$a(()=>this.$1k())}parseClassElement(t){if(this.type===d){let h=this.$12();if(this.type===s.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let p=this.parseClassElement(t);return p.decorators=h,this.$q(p,h[0]),p}if(this.eat(s.semi))return null;let e=this.startNode();while(this.type===s.name&&O.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===s.braceL)return this.next(),this.parseClassStaticBlock(e),e;if(h==="public"||h==="private"||h==="protected")e.accessibility=h;else e[h]=!0}if(this.type===s.bracketL&&this.$1h())return this.$1i(e);e.static??=!1;let r="",i=!1,n=!1,a="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())n=!0;else r="async";if(!r&&this.eat(s.star))i=!0;if(!r&&!n&&!i){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=h;else r=h}if(r)e.computed=!1,e.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),e.key.name=r,this.finishNode(e.key,"Identifier");else this.parseClassElementName(e);if(this.eat(s.question))e.optional=!0;if(this.type===s.parenL||this.$1()||a!=="method"||i||n){let h=e.key,p=!e.static&&!e.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(e.kind=p?"constructor":a,this.$1())e.typeParameters=this.$8();this.$m=p,this.$j=this.start,this.parseClassMethod(e,i,n,p&&t)}else{if(!e.optional&&this.$u())this.next(),e.definite=!0;if(this.type===s.colon)e.typeAnnotation=this.$6();this.parseClassField(e)}return e}parseMaybeAssign(t,e,r){if(this.$p()){let i=this.$g(()=>{let n=this.$8(),a=super.parseMaybeAssign(t,e,r);if(a.type!=="ArrowFunctionExpression")return;return a.typeParameters=n,this.$q(a,n),a});if(i)return i}return super.parseMaybeAssign(t,e,r)}parseMaybeUnary(t,e,r,i){if(this.$p()){let n=this.startNode();return n.typeAnnotation=this.$a(()=>{this.next();let a=this.$0();if(!this.$c())this.unexpected();return this.next(),a}),n.expression=this.parseMaybeUnary(null,!1,!1,i),this.finishNode(n,"TSTypeAssertion")}return super.parseMaybeUnary(t,e,r,i)}parseMaybeConditional(t,e){let r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.type===s.question&&!(n.type==="ArrowFunctionExpression"&&n.start===r)&&!this.$2k()){this.next();let a=this.startNodeAt(r,i);return a.test=n,a.consequent=this.parseMaybeAssign(),this.expect(s.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return n}$2k(){let t=this.$d(),e=this.input.charCodeAt(t);if(e===v||e===tt||e===Z)return!0;return e===y&&this.input.charCodeAt(t+1)!==y}parseParenItem(t){return this.$h(t,!0)}$1y(){if(this.type!==s.colon)return!0;let t=this.$g(()=>{let e=this.$6(!0);return this.type===s.arrow&&!this.canInsertSemicolon()?e:void 0});if(!t)return!1;return this.$7=t,!0}shouldParseArrow(t){return this.$1y()&&super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.$1y()&&super.shouldParseAsyncArrow()}parseArrowExpression(t,e,r,i){if(this.$7)t.returnType=this.$7,this.$7=null;return super.parseArrowExpression(t,e,r,i)}parseExprList(t,e,r,i){if(!this.$n)return super.parseExprList(t,e,r,i);this.$n=!1;let n=[],a=!0;while(!this.eat(t)){if(a)a=!1;else if(this.expect(s.comma),e&&this.afterTrailingComma(t))break;if(this.type===s.ellipsis){let h=this.parseSpread(i);if(this.eat(s.question))h.optional=!0;if(this.type===s.colon)h.typeAnnotation=this.$6();n.push(h)}else n.push(this.parseMaybeAssign(!1,i,this.parseParenItem))}return n}parseSubscript(t,e,r,i,n,a,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let c=this.startNodeAt(e,r);return this.exprAllowed=!1,this.next(),c.expression=t,this.finishNode(c,"TSNonNullExpression")}if(n&&this.$1()){let c=this.$g(()=>this.$2l(e,r,h));if(c)return c}let p=this.type===s.questionDot&&this.$2()===R;if(this.$1()||p||this.type===s.bitShift&&this.value==="<<"){let c=this.$g(()=>{if(p)this.next();this.$p();let l=this.$e();if(this.type===s.parenL&&!i)return l;if(this.type===s.backQuote)return p?void 0:l;if(p)return;if(this.$c()||this.type===s.bitShift||this.type.startsExpr&&this.type!==s.parenL&&!this.hasPrecedingLineBreak())return;return l});if(c){let l=this.startNodeAt(e,r);if(this.type===s.parenL&&!i){if(this.next(),l.callee=t,l.arguments=this.parseExprList(s.parenR,!0,!1),l.typeArguments=c,p)t.optional=!0;if(p||a)l.optional=p;return this.finishNode(l,"CallExpression")}if(this.type===s.backQuote)return l.tag=t,l.quasi=this.parseTemplate({isTagged:!0}),l.typeArguments=c,this.finishNode(l,"TaggedTemplateExpression");return l.expression=t,l.typeArguments=c,this.finishNode(l,"TSInstantiationExpression")}}if(n&&this.type===s.parenL)this.$n=!0;return super.parseSubscript(t,e,r,i,n,a,h)}$2l(t,e,r){let i=this.startNodeAt(t,e);if(i.typeParameters=this.$8(),this.expect(s.parenL),i.params=this.parseBindingList(s.parenR,!1,!0),this.type===s.colon)i.returnType=this.$6(!0);if(this.type!==s.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(i,i.params,!0,r)}parseDynamicImport(t){if(this.next(),t.source=this.parseMaybeAssign(),this.eat(s.comma)&&this.type!==s.parenR)t.arguments=[this.parseExpression()];return this.expect(s.parenR),this.finishNode(t,"ImportExpression")}parseNew(){let t=super.parseNew();if(t.callee?.type!=="TSInstantiationExpression")return t;let e=this.startNodeAt(t.start,t.loc?.start);return e.callee=t.callee.expression,e.typeArguments=t.callee.typeArguments,e.arguments=t.arguments,this.finishNodeAt(e,"NewExpression",t.end,t.loc?.end)}parseExprOp(t,e,r,i,n){if(s._in.binop>i&&this.type===s.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let a=this.value==="satisfies",h=this.startNodeAt(e,r);return h.expression=t,h.typeAnnotation=this.$a(()=>{if(this.next(),!a&&this.type===s._const){let p=this.startNode();return p.typeName=this.parseIdent(!0),this.finishNode(p,"TSTypeReference")}return this.$0()}),this.finishNode(h,a?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,e,r,i,n)}return super.parseExprOp(t,e,r,i,n)}parseGetterSetter(t){t.kind=t.key.name,super.parseGetterSetter(t)}parsePropertyValue(t,e,r,i,n,a,h,p){if(!e&&this.$1()){if(this.$l=this.$8(),this.type!==s.parenL)this.unexpected();t.kind="init"}return super.parsePropertyValue(t,e,r,i,n,a,h,p)}}return g});
2
+ export{q};
@@ -0,0 +1,3 @@
1
+ import{B,s,t,V,C,M,l,v,F}from"./shared-40v3xx3k.js";import{N}from"./shared-rfa6cx21.js";var E="{",G=60,I=62,g=47,_=61,b=123,A=/<(?:script|style|svelte:options)(?![^\s/>])/g,S=/<\/script\s*>/g,O=/\s*>/y,T=/<\/textarea(\s[^>]*)?>/iy,y="</svelte:options";function H(e){let o=(e.charCodeAt(0)===65279?e.slice(1):e).trimEnd(),n={typescript:V(o),instance:null,module:null,css:null,options:null};return W(o,n,null),n}function de(e){let d={tags:[],comments:[]};return W(e,{typescript:!1,instance:null,module:null,css:null,options:null},d),d}function W(e,d,o){let n=R(e),a=[],i=0;while(i<=n){let r=e.charCodeAt(i);if(r===G)i=X(e,i,a,d,o);else if(r===b)i=w(e,i,a);else i++}}function R(e){let d=-1;A.lastIndex=0;for(let o=A.exec(e);o!==null;o=A.exec(e))d=o.index;return d}function L(e,d){return Math.min(N(e,d)+1,e.length)}function w(e,d,o){let n=t(e,d+1),a=e.charCodeAt(n),i=e.charCodeAt(n+1);if(a===35||a===58||a===64||a===g&&i!==g&&i!==42){n++;while(n<e.length){let r=e.charCodeAt(n);if(r<97||r>122)break;n++}if(a===35)o.push(E);else if(a===g){let r=o.lastIndexOf(E);if(r!==-1)o.length=r}}return L(e,n)}function X(e,d,o,n,a){if(e.startsWith("!--",d+1)){let c=e.indexOf("-->",d+4),x=c===-1?e.length:c+3;if(a&&o.length===0)a.comments.push(d,x);return x}if(e.charCodeAt(d+1)===g){let c=d+2,x=e.slice(c,v(e,c,!1)),p=o.lastIndexOf(x);if(p!==-1)o.length=p;return u(e,t(e,c+x.length))}let i=e.slice(d+1,v(e,d+1,!1)),r=t(e,d+1+i.length),m=o[o.length-1];if(m!==void 0&&B(m,i))o.pop();let f=o.length===0;if(a&&f&&(i==="script"||i==="style"||i==="svelte:options"))a.tags.push(d);if(f&&(i==="script"||i==="style")){let c=[];if(r=u(e,Q(e,r,c)),i==="script"){let p=q(e,d,r,c);if(p.context==="module")n.module??=p;else n.instance??=p;return p.end}let x=P(e,d,r,c);return n.css??=x,x.end}let h=f&&i==="svelte:options"?[]:null;if(r=U(e,r,h),e.charCodeAt(r)===g||C(i)){if(e.charCodeAt(r)===g)r++;r=u(e,r)}else{if(r=u(e,r),i==="textarea")return K(e,r);if(i==="script"||i==="style"){let c=`</${i}>`,x=e.indexOf(c,r);return x===-1?e.length:x+c.length}if(h&&e.startsWith(y,r))r=u(e,t(e,r+y.length));else return o.push(i),r}if(h)n.options??={start:d,end:r,attributes:h};return r}function u(e,d){return e.charCodeAt(d)===I?d+1:d}function q(e,d,o,n){S.lastIndex=o;let a=S.exec(e),i=a?a.index:e.length,r=n.some((m)=>m.name==="module"||m.name==="context");return{start:d,end:a?a.index+a[0].length:e.length,context:r?"module":"default",attributes:n,content:{start:o,end:i}}}function P(e,d,o,n){let a=M(e,o),i=a;if(e.startsWith("</style",i)){i+=7,O.lastIndex=i;let r=O.exec(e);if(r)i+=r[0].length}return{start:d,end:i,attributes:n,content:{start:o,end:a}}}function Q(e,d,o){let n=d;for(;;){let a=n,i=v(e,n,!0);if(i===a)return n;n=i;let r=!0;if(e.charCodeAt(n)===_){let m=t(e,n+1),f=e.charCodeAt(m),h=-1;if(l(f)){let x=e.indexOf(e[m],m+1);if(x!==-1)h=x+1}if(h===-1){h=m;while(h<e.length&&e.charCodeAt(h)!==I&&!s(e.charCodeAt(h)))h++}let c=l(f)?1:0;r=e.slice(m+c,h-c),n=h}o.push({name:e.slice(a,i),value:r,start:a,end:n}),n=t(e,n)}}function U(e,d,o){let n=d;for(;;){for(;;){if(e.startsWith("/*",n)){let f=e.indexOf("*/",n+2);n=f===-1?e.length:f+2}else if(e.startsWith("//",n)){let f=e.indexOf(`
2
+ `,n+2);n=f===-1?e.length:f}else break;n=t(e,n)}let a=n;if(e.charCodeAt(n)===b){n=t(e,L(e,n+1));continue}let i=v(e,n,!0);if(i===a)return n;let r=i,m=!0;if(n=t(e,i),e.charCodeAt(n)===_){let f=t(e,n+1);r=e.startsWith("/>",f)?f+1:D(e,f),m=l(e.charCodeAt(f))?e.slice(f+1,Math.max(f+1,r-1)):e.slice(f,r),n=t(e,r)}o?.push({name:e.slice(a,i),value:m,start:a,end:r})}}function D(e,d){let o=e.charCodeAt(d);if(l(o)){let a=d+1;while(a<e.length){let i=e.charCodeAt(a);if(i===o)return a+1;a=i===b?L(e,a+1):a+1}return e.length}let n=d;while(n<e.length&&!F(e,n))n=e.charCodeAt(n)===b?L(e,n+1):n+1;return n}function K(e,d){let o=d;while(o<e.length){let n=e.charCodeAt(o);if(n===G){if(T.lastIndex=o,T.test(e))return T.lastIndex}o=n===b?L(e,o+1):o+1}return e.length}
3
+ export{H,de};
@@ -1,3 +1,3 @@
1
- var B={await:1,case:1,default:1,delete:1,extends:1,in:1,instanceof:1,new:1,of:1,return:1,throw:1,typeof:1,void:1,yield:1,do:2,else:2,finally:2,try:2,for:4,if:4,while:4,with:4,import:5,export:6};var g=Array(k(128,0)).fill(null);for(let t of Object.entries(B)){let E=k(t[0].charCodeAt(0),t[0].length),a=g[E]??[];a.push(t),g[E]=a}function k(t,E){return t*11+E}function U(t,E,a){let i=t.charCodeAt(E);if(i>=128||a-E>10)return 3;let A=k(i,a-E),n=g[A];if(n===null)return 3;for(let e=0;e<n.length;e++)if(t.startsWith(n[e][0],E))return n[e][1];return 3}var V=/\s/,_=new Uint8Array(128);for(let t of["az","AZ","09","__","$$","\\\\"])for(let E=t.charCodeAt(0);E<=t.charCodeAt(1);E++)_[E]=1;function r(t){return t>=128?!V.test(String.fromCharCode(t)):_[t]===1}function b(t){return t<128?t===32||t>=9&&t<=13:V.test(String.fromCharCode(t))}function M(t,E,a){let i=t.length,A=W(t,E),n=[],e=t.startsWith("#!")?P(t,2):0,O=0,R=!1,T=!1,o=-1,c=()=>{if(O=0,n.length===0)o=-1};while(e<=A){let f=t.charCodeAt(e);if(f===32||f===10||b(f)){e++;continue}if(f===47){let l=t.charCodeAt(e+1);if(l===47){e=P(t,e+2);continue}if(l===42){let s=t.indexOf("*/",e+2);e=s===-1?i:s+2;continue}}let S=R,w=T;if(R=!1,T=!1,r(f)||f===35){let l=e;e++;while(e<i){let p=t.charCodeAt(e);if(p===92)e+=2;else if(r(p))e++;else break}let s=S?3:U(t,l,e);if(n.length===0&&(s===6?E||K(t,e):s===5&&D(t,e)))e=Math.max(e,a(o!==-1&&s===6?o:l,l)),c();else if(s===6)O=2;else if(s===4)T=!0,O=3;else O=s===1||s===2?s:3;continue}switch(e++,f){case 34:case 39:e=u(t,e,f),O=3;break;case 96:e=L(t,e,n),O=t.charCodeAt(e-1)===123?1:3;break;case 47:{let l=O===3?-1:x(t,e);if(l===-1)O=1;else{e=l;while(e<i&&r(t.charCodeAt(e)))e++;O=3}break}case 40:n.push(w?1:0),O=1;break;case 41:O=n.pop()===1?2:3;break;case 123:n.push(O===1?3:2),O=0;break;case 125:{let l=n.pop();if(l===4)e=L(t,e,n),O=t.charCodeAt(e-1)===123?1:3;else if(l===3)O=3;else c();break}case 59:c();break;case 93:O=3;break;case 46:if(h(t.charCodeAt(e))){while(e<i&&r(t.charCodeAt(e)))e++;O=3}else if(t.startsWith("..",e))e+=2,O=1;else R=!0,O=1;break;case 63:if(t.charCodeAt(e)===46&&!h(t.charCodeAt(e+1)))e++,R=!0;O=1;break;case 33:O=O===3&&!b(t.charCodeAt(e-2))?3:1;break;case 43:case 45:if(t.charCodeAt(e)===f&&O===3)e++;else O=1;break;case 61:if(O=t.charCodeAt(e)===62?2:1,O===2)e++;break;case 64:if(n.length===0&&o===-1)o=e-1;O=1;break;default:O=1}}}function C(t,E,a){let i=t.length,A=[],n=E,e=1,O=!1;while(n<i){let R=t.charCodeAt(n);if(R===32||R===10||b(R)){n++;continue}if(R===47){let o=t.charCodeAt(n+1);if(o===47){n=P(t,n+2);continue}if(o===42){let c=t.indexOf("*/",n+2);n=c===-1?i:c+2;continue}}let T=O;if(O=!1,r(R)||R===35){let o=n;n++;while(n<i){let f=t.charCodeAt(n);if(f===92)n+=2;else if(r(f))n++;else break}if(!T&&a?.(o,n))return-1;let c=T?3:U(t,o,n);e=c===1||c===2||c===4?1:3;continue}switch(n++,R){case 34:case 39:n=u(t,n,R),e=3;break;case 96:n=L(t,n,A),e=t.charCodeAt(n-1)===123?1:3;break;case 47:{let o=e===3?-1:x(t,n);if(o===-1)e=1;else{n=o;while(n<i&&r(t.charCodeAt(n)))n++;e=3}break}case 40:A.push(0),e=1;break;case 41:if(A.length===0)return n-1;A.pop(),e=3;break;case 123:A.push(e===1?3:2),e=0;break;case 125:{if(A.length===0)return n-1;let o=A.pop();if(o===4)n=L(t,n,A),e=t.charCodeAt(n-1)===123?1:3;else e=o===3?3:0;break}case 93:e=3;break;case 46:if(h(t.charCodeAt(n))){while(n<i&&r(t.charCodeAt(n)))n++;e=3}else if(t.startsWith("..",n))n+=2,e=1;else O=!0,e=1;break;case 63:if(t.charCodeAt(n)===46&&!h(t.charCodeAt(n+1)))n++,O=!0;e=1;break;case 33:e=e===3&&!b(t.charCodeAt(n-2))?3:1;break;case 43:case 45:if(t.charCodeAt(n)===R&&e===3)n++;else e=1;break;case 61:if(t.charCodeAt(n)===62)n++;e=1;break;default:e=1}}return i}function h(t){return t>=48&&t<=57}function P(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(i===10||i===13||i===8232||i===8233)return a}return t.length}function u(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===a)return i+1;if(A===92)i+=t.startsWith(`\r
2
- `,i+1)?2:1;else if(A===10||A===13)return i}return t.length}function L(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===96)return i+1;if(A===92)i++;else if(A===36&&t.charCodeAt(i+1)===123)return a.push(4),i+2}return t.length}function x(t,E){let a=!1;for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===10||A===13||A===8232||A===8233)return-1;if(A===92)i++;else if(A===91)a=!0;else if(A===93)a=!1;else if(A===47&&!a)return i+1}return-1}function d(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(b(i))continue;if(i===47){let A=t.charCodeAt(a+1);if(A===47){a=P(t,a+2)-1;continue}if(A===42){let n=t.indexOf("*/",a+2);if(n===-1)return t.length;a=n+1;continue}}return a}return t.length}function N(t,E,a){return t.charCodeAt(E)===a.charCodeAt(0)&&t.startsWith(a,E)&&!r(t.charCodeAt(E+a.length))}function D(t,E){let a=t.charCodeAt(d(t,E));return a!==40&&a!==46}function K(t,E){let a=d(t,E);if(N(t,a,"import"))return!0;if(N(t,a,"type"))a=d(t,a+4);let i=t.charCodeAt(a);if(i===42)return!0;if(i!==123)return!1;for(a++;a<t.length;a++){let A=t.charCodeAt(a);if(A===125)break;if(A===34||A===39)a=u(t,a+1,A)-1;else if(A===47)a=Math.max(a,d(t,a)-1)}return N(t,d(t,a+1),"from")}var m=/import|export/g;function W(t,E){let a=-1;m.lastIndex=0;for(let i=m.exec(t);i!==null;i=m.exec(t)){let A=i.index,n=A+6;if(!r(t.charCodeAt(A-1))&&!r(t.charCodeAt(n))&&(t.charCodeAt(A)===105?D(t,n):E||K(t,n)))a=A}return a}
3
- export{r,M,C,h,d,N};
1
+ var B={await:1,case:1,default:1,delete:1,extends:1,in:1,instanceof:1,new:1,of:1,return:1,throw:1,typeof:1,void:1,yield:1,do:2,else:2,finally:2,try:2,for:4,if:4,while:4,with:4,import:5,export:6};var P=Array(L(128,0)).fill(null);for(let t of Object.entries(B)){let E=L(t[0].charCodeAt(0),t[0].length),a=P[E]??[];a.push(t),P[E]=a}function L(t,E){return t*11+E}function p(t,E,a){let i=t.charCodeAt(E);if(i>=128||a-E>10)return 3;let A=L(i,a-E),n=P[A];if(n===null)return 3;for(let e=0;e<n.length;e++)if(t.startsWith(n[e][0],E))return n[e][1];return 3}var U=/\s/,V=new Uint8Array(128);for(let t of["az","AZ","09","__","$$","\\\\"])for(let E=t.charCodeAt(0);E<=t.charCodeAt(1);E++)V[E]=1;function r(t){return t>=128?!U.test(String.fromCharCode(t)):V[t]===1}function h(t){return t<128?t===32||t>=9&&t<=13:U.test(String.fromCharCode(t))}function W(t,E,a){let i=t.length,A=M(t,E),n=[],e=t.startsWith("#!")?d(t,2):0,O=0,R=!1,T=!1,o=-1,c=()=>{if(O=0,n.length===0)o=-1};while(e<=A){let f=t.charCodeAt(e);if(f===32||f===10||h(f)){e++;continue}if(f===47){let l=t.charCodeAt(e+1);if(l===47){e=d(t,e+2);continue}if(l===42){let s=t.indexOf("*/",e+2);e=s===-1?i:s+2;continue}}let S=R,w=T;if(R=!1,T=!1,r(f)||f===35){let l=e;e++;while(e<i){let k=t.charCodeAt(e);if(k===92)e+=2;else if(r(k))e++;else break}let s=S?3:p(t,l,e);if(n.length===0&&(s===6?E||K(t,e):s===5&&D(t,e)))e=Math.max(e,a(o!==-1&&s===6?o:l,l)),c();else if(s===6)O=2;else if(s===4)T=!0,O=3;else O=s===1||s===2?s:3;continue}switch(e++,f){case 34:case 39:e=g(t,e,f),O=3;break;case 96:e=b(t,e,n),O=t.charCodeAt(e-1)===123?1:3;break;case 47:{let l=O===3?-1:x(t,e);if(l===-1)O=1;else{e=l;while(e<i&&r(t.charCodeAt(e)))e++;O=3}break}case 40:n.push(w?1:0),O=1;break;case 41:O=n.pop()===1?2:3;break;case 123:n.push(O===1?3:2),O=0;break;case 125:{let l=n.pop();if(l===4)e=b(t,e,n),O=t.charCodeAt(e-1)===123?1:3;else if(l===3)O=3;else c();break}case 59:c();break;case 93:O=3;break;case 46:if(u(t.charCodeAt(e))){while(e<i&&r(t.charCodeAt(e)))e++;O=3}else if(t.startsWith("..",e))e+=2,O=1;else R=!0,O=1;break;case 63:if(t.charCodeAt(e)===46&&!u(t.charCodeAt(e+1)))e++,R=!0;O=1;break;case 33:O=O===3&&!h(t.charCodeAt(e-2))?3:1;break;case 43:case 45:if(t.charCodeAt(e)===f&&O===3)e++;else O=1;break;case 61:if(O=t.charCodeAt(e)===62?2:1,O===2)e++;break;case 64:if(n.length===0&&o===-1)o=e-1;O=1;break;default:O=1}}}function N(t,E,a){let i=t.length,A=[],n=E,e=1,O=!1;while(n<i){let R=t.charCodeAt(n);if(R===32||R===10||h(R)){n++;continue}if(R===47){let o=t.charCodeAt(n+1);if(o===47){n=d(t,n+2);continue}if(o===42){let c=t.indexOf("*/",n+2);n=c===-1?i:c+2;continue}}let T=O;if(O=!1,r(R)||R===35){let o=n;n++;while(n<i){let f=t.charCodeAt(n);if(f===92)n+=2;else if(r(f))n++;else break}if(!T&&a?.(o,n))return-1;let c=T?3:p(t,o,n);e=c===1||c===2||c===4?1:3;continue}switch(n++,R){case 34:case 39:n=g(t,n,R),e=3;break;case 96:n=b(t,n,A),e=t.charCodeAt(n-1)===123?1:3;break;case 47:{let o=e===3?-1:x(t,n);if(o===-1)e=1;else{n=o;while(n<i&&r(t.charCodeAt(n)))n++;e=3}break}case 40:A.push(0),e=1;break;case 41:if(A.length===0)return n-1;A.pop(),e=3;break;case 123:A.push(e===1?3:2),e=0;break;case 125:{if(A.length===0)return n-1;let o=A.pop();if(o===4)n=b(t,n,A),e=t.charCodeAt(n-1)===123?1:3;else e=o===3?3:0;break}case 93:e=3;break;case 46:if(u(t.charCodeAt(n))){while(n<i&&r(t.charCodeAt(n)))n++;e=3}else if(t.startsWith("..",n))n+=2,e=1;else O=!0,e=1;break;case 63:if(t.charCodeAt(n)===46&&!u(t.charCodeAt(n+1)))n++,O=!0;e=1;break;case 33:e=e===3&&!h(t.charCodeAt(n-2))?3:1;break;case 43:case 45:if(t.charCodeAt(n)===R&&e===3)n++;else e=1;break;case 61:if(t.charCodeAt(n)===62)n++;e=1;break;default:e=1}}return i}function u(t){return t>=48&&t<=57}function d(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(i===10||i===13||i===8232||i===8233)return a}return t.length}function g(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===a)return i+1;if(A===92)i+=t.startsWith(`\r
2
+ `,i+1)?2:1;else if(A===10||A===13)return i}return t.length}function b(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===96)return i+1;if(A===92)i++;else if(A===36&&t.charCodeAt(i+1)===123)return a.push(4),i+2}return t.length}function x(t,E){let a=!1;for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===10||A===13||A===8232||A===8233)return-1;if(A===92)i++;else if(A===91)a=!0;else if(A===93)a=!1;else if(A===47&&!a)return i+1}return-1}function m(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(h(i))continue;if(i===47){let A=t.charCodeAt(a+1);if(A===47){a=d(t,a+2)-1;continue}if(A===42){let n=t.indexOf("*/",a+2);if(n===-1)return t.length;a=n+1;continue}}return a}return t.length}function _(t,E,a){return t.charCodeAt(E)===a.charCodeAt(0)&&t.startsWith(a,E)&&!r(t.charCodeAt(E+a.length))}function D(t,E){let a=t.charCodeAt(m(t,E));return a!==40&&a!==46}function K(t,E){let a=m(t,E);if(_(t,a,"import"))return!0;if(_(t,a,"type"))a=m(t,a+4);let i=t.charCodeAt(a);if(i===42)return!0;if(i!==123)return!1;for(a++;a<t.length;a++){let A=t.charCodeAt(a);if(A===125)break;if(A===34||A===39)a=g(t,a+1,A)-1;else if(A===47)a=Math.max(a,m(t,a)-1)}return _(t,m(t,a+1),"from")}var C=/import|export/g;function M(t,E){let a=-1;C.lastIndex=0;for(let i=C.exec(t);i!==null;i=C.exec(t)){let A=i.index,n=A+6;if(!r(t.charCodeAt(A-1))&&!r(t.charCodeAt(n))&&(t.charCodeAt(A)===105?D(t,n):E||K(t,n)))a=A}return a}
3
+ export{r,W,N,u,m,_};
@@ -0,0 +1,2 @@
1
+ function pt(t){return{support:"typescript",parser:t}}function ct(t){return{support:"entities",names:t}}function U(t){return t&&"parser"in t?t.parser:void 0}function ht(t){return t&&"names"in t?t.names:void 0}function z(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}
2
+ export{pt,ct,U,ht,z};
@@ -0,0 +1,10 @@
1
+ var pt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},lt="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",zt={5:lt,"5module":lt+" export import",6:lt+" const class extends export import super"},Ct=/^in(stanceof)?$/,jt=/\p{ID_Start}/u,Gt=/[\p{ID_Continue}\u200c\u200d]/u;function h(t,e){if(t<65)return t===36;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t>65535&&e===!1)return!1;return t>=170&&jt.test(String.fromCodePoint(t))}function y(t,e){if(t<48)return t===36;if(t<58)return!0;if(t<65)return!1;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t>65535&&e===!1)return!1;return t>=170&&Gt.test(String.fromCodePoint(t))}var g=function(e,s){if(s===void 0)s={};this.label=e,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=s.binop||null,this.updateContext=null};function T(t,e){return new g(t,{beforeExpr:!0,binop:e})}var P={beforeExpr:!0},N={startsExpr:!0},dt={};function b(t,e){if(e===void 0)e={};return e.keyword=t,dt[t]=new g(t,e)}var a={num:new g("num",N),regexp:new g("regexp",N),string:new g("string",N),name:new g("name",N),privateId:new g("privateId",N),eof:new g("eof"),bracketL:new g("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new g("]"),braceL:new g("{",{beforeExpr:!0,startsExpr:!0}),braceR:new g("}"),parenL:new g("(",{beforeExpr:!0,startsExpr:!0}),parenR:new g(")"),comma:new g(",",P),semi:new g(";",P),colon:new g(":",P),dot:new g("."),question:new g("?",P),questionDot:new g("?."),arrow:new g("=>",P),template:new g("template"),invalidTemplate:new g("invalidTemplate"),ellipsis:new g("...",P),backQuote:new g("`",N),dollarBraceL:new g("${",{beforeExpr:!0,startsExpr:!0}),eq:new g("=",{beforeExpr:!0,isAssign:!0}),assign:new g("_=",{beforeExpr:!0,isAssign:!0}),incDec:new g("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new g("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:T("||",1),logicalAND:T("&&",2),bitwiseOR:T("|",3),bitwiseXOR:T("^",4),bitwiseAND:T("&",5),equality:T("==/!=/===/!==",6),relational:T("</>/<=/>=",7),bitShift:T("<</>>/>>>",8),plusMin:new g("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:T("%",10),star:T("*",10),slash:T("/",10),starstar:new g("**",{beforeExpr:!0}),coalesce:T("??",1),_break:b("break"),_case:b("case",P),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",P),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",P),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",N),_if:b("if"),_return:b("return",P),_switch:b("switch"),_throw:b("throw",P),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",N),_super:b("super",N),_class:b("class",N),_extends:b("extends",P),_export:b("export"),_import:b("import",N),_null:b("null",N),_true:b("true",N),_false:b("false",N),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,Ht=new RegExp(E.source,"g");function W(t){return t===10||t===13||t===8232||t===8233}function At(t,e,s){if(s===void 0)s=t.length;for(var r=e;r<s;r++){var n=t.charCodeAt(r);if(W(n))return r<s-1&&n===13&&t.charCodeAt(r+1)===10?r+2:r+1}return-1}var Nt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Et=Object.prototype,{hasOwnProperty:Yt,toString:Qt}=Et,Y=Object.hasOwn||function(t,e){return Yt.call(t,e)},kt=Array.isArray||function(t){return Qt.call(t)==="[object Array]"},wt=Object.create(null);function Z(t){return wt[t]||(wt[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function st(t){if(t<=65535)return String.fromCharCode(t);return t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320)}var Kt=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,H=function(e,s){this.line=e,this.column=s};H.prototype.offset=function(e){return new H(this.line,this.column+e)};var rt=function(e,s,r){if(this.start=s,this.end=r,e.sourceFile!==null)this.source=e.sourceFile};function Tt(t,e){for(var s=1,r=0;;){var n=At(t,r,e);if(n<0)return new H(s,e-r);++s,r=n}}var ct={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},St=!1;function Xt(t){var e={};for(var s in ct)e[s]=t&&Y(t,s)?t[s]:ct[s];if(e.ecmaVersion==="latest")e.ecmaVersion=1e8;else if(e.ecmaVersion==null){if(!St&&typeof console==="object"&&console.warn)St=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
2
+ Defaulting to 2020, but this will stop working in the future.`);e.ecmaVersion=11}else if(e.ecmaVersion>=2015)e.ecmaVersion-=2009;if(e.allowReserved==null)e.allowReserved=e.ecmaVersion<5;if(!t||t.allowHashBang==null)e.allowHashBang=e.ecmaVersion>=14;if(kt(e.onToken)){var r=e.onToken;e.onToken=function(n){return r.push(n)}}if(kt(e.onComment))e.onComment=Jt(e,e.onComment);if(e.sourceType==="commonjs"&&e.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return e}function Jt(t,e){return function(s,r,n,p,l,c){var u={type:s?"Block":"Line",value:r,start:n,end:p};if(t.locations)u.loc=new rt(this,l,c);if(t.ranges)u.range=[n,p];e.push(u)}}var O=1,B=2,mt=4,Pt=8,vt=16,It=32,at=64,_t=128,M=256,Q=512,Lt=1024,nt=O|B|M;function xt(t,e){return B|(t?mt:0)|(e?Pt:0)}var tt=0,yt=1,V=2,Rt=3,Vt=4,Ft=5,i=function(e,s,r){this.options=e=Xt(e),this.sourceFile=e.sourceFile,this.keywords=Z(zt[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var n="";if(e.allowReserved!==!0){if(n=pt[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")n+=" await"}this.reservedWords=Z(n);var p=(n?n+" ":"")+pt.strict;if(this.reservedWordsStrict=Z(p),this.reservedWordsStrictBind=Z(p+" "+pt.strictBind),this.input=String(s),this.containsEsc=!1,this.pos=r||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(r){if(this.lineStart=this.input.lastIndexOf(`
3
+ `,r-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(E).length}else this.lineStart=0;if(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=e.sourceType==="module",this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?B:O),this.regexpState=null,this.privateNameStack=[]},_={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}};i.prototype.parse=function(){var e=this,s=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(s)})};_.inFunction.get=function(){return(this.currentVarScope().flags&B)>0};_.inGenerator.get=function(){return(this.currentVarScope().flags&Pt)>0};_.inAsync.get=function(){return(this.currentVarScope().flags&mt)>0};_.canAwait.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],s=e.flags;if(s&(M|Q))return!1;if(s&B)return(s&mt)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};_.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&O)return!0;return!1};_.allowSuper.get=function(){var t=this.currentThisScope(),e=t.flags;return(e&at)>0||this.options.allowSuperOutsideMethod};_.allowDirectSuper.get=function(){return(this.currentThisScope().flags&_t)>0};_.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};_.allowNewDotTarget.get=function(){for(var t=this.scopeStack.length-1;t>=0;t--){var e=this.scopeStack[t],s=e.flags;if(s&(M|Q)||s&B&&!(s&vt))return!0}return!1};_.allowUsing.get=function(){var t=this.currentScope(),e=t.flags;if(e&Lt)return!1;if(!this.inModule&&e&O)return!1;return!0};_.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&M)>0};i.extend=function(){var e=[],s=arguments.length;while(s--)e[s]=arguments[s];var r=this;for(var n=0;n<e.length;n++)r=e[n](r);return r};i.parse=function(e,s){return new this(s,e).parse()};i.parseExpressionAt=function(e,s,r){var n=new this(r,e,s);return n.nextToken(),n.parseExpression()};i.tokenizer=function(e,s){return new this(s,e)};Object.defineProperties(i.prototype,_);var A=i.prototype,Zt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;A.strictDirective=function(t){if(this.options.ecmaVersion<5)return!1;for(;;){S.lastIndex=t,t+=S.exec(this.input)[0].length;var e=Zt.exec(this.input.slice(t));if(!e)return!1;if((e[1]||e[2])==="use strict"){S.lastIndex=t+e[0].length;var s=S.exec(this.input),r=s.index+s[0].length,n=this.input.charAt(r);return n===";"||n==="}"||E.test(s[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(r+1)==="=")}if(t+=e[0].length,S.lastIndex=t,t+=S.exec(this.input)[0].length,this.input[t]===";")t++}};A.eat=function(t){if(this.type===t)return this.next(),!0;else return!1};A.isContextual=function(t){return this.type===a.name&&this.value===t&&!this.containsEsc};A.eatContextual=function(t){if(!this.isContextual(t))return!1;return this.next(),!0};A.catchStackOverflow=function(t){try{return t()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,"Not enough stack space to parse input");else throw e}};A.expectContextual=function(t){if(!this.eatContextual(t))this.unexpected()};A.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))};A.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};A.semicolon=function(){if(!this.eat(a.semi)&&!this.insertSemicolon())this.unexpected()};A.afterTrailingComma=function(t,e){if(this.type===t){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!e)this.next();return!0}};A.expect=function(t){this.eat(t)||this.unexpected()};A.unexpected=function(t){this.raise(t!=null?t:this.start,"Unexpected token")};var ot=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};A.checkPatternErrors=function(t,e){if(!t)return;if(t.trailingComma>-1)this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var s=e?t.parenthesizedAssign:t.parenthesizedBind;if(s>-1)this.raiseRecoverable(s,e?"Assigning to rvalue":"Parenthesized pattern")};A.checkExpressionErrors=function(t,e){if(!t)return!1;var{shorthandAssign:s,doubleProto:r}=t;if(!e)return s>=0||r>=0;if(s>=0)this.raise(s,"Shorthand property assignments are valid only in destructuring patterns");if(r>=0)this.raiseRecoverable(r,"Redefinition of __proto__ property")};A.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};A.isSimpleAssignTarget=function(t){if(t.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(t.expression);return t.type==="Identifier"||t.type==="MemberExpression"};var f=i.prototype;f.parseTopLevel=function(t){var e=Object.create(null);if(!t.body)t.body=[];while(this.type!==a.eof){var s=this.parseStatement(null,!0,e);t.body.push(s)}if(this.inModule)for(var r=0,n=Object.keys(this.undefinedExports);r<n.length;r+=1){var p=n[r];this.raiseRecoverable(this.undefinedExports[p].start,"Export '"+p+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(t,"Program")};var bt={kind:"loop"},$t={kind:"switch"};f.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.lastIndex=this.pos;var e=S.exec(this.input),s=this.pos+e[0].length,r=this.fullCharCodeAt(s);if(r===91||r===92)return!0;if(t)return!1;if(r===123)return!0;if(h(r)){var n=s;do s+=r<=65535?1:2;while(y(r=this.fullCharCodeAt(s)));if(r===92)return!0;var p=this.input.slice(n,s);if(!Ct.test(p))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.lastIndex=this.pos;var t=S.exec(this.input),e=this.pos+t[0].length,s;return!E.test(this.input.slice(this.pos,e))&&this.input.slice(e,e+8)==="function"&&(e+8===this.input.length||!(y(s=this.fullCharCodeAt(e+8))||s===92))};f.isUsingKeyword=function(t,e){if(this.options.ecmaVersion<17||!this.isContextual(t?"await":"using"))return!1;S.lastIndex=this.pos;var s=S.exec(this.input),r=this.pos+s[0].length;if(E.test(this.input.slice(this.pos,r)))return!1;if(t){var n=r+5,p;if(this.input.slice(r,n)!=="using"||n===this.input.length||y(p=this.fullCharCodeAt(n))||p===92)return!1;S.lastIndex=n;var l=S.exec(this.input);if(r=n+l[0].length,l&&E.test(this.input.slice(n,r)))return!1}var c=this.fullCharCodeAt(r);if(!h(c)&&c!==92)return!1;var u=r;do r+=c<=65535?1:2;while(y(c=this.fullCharCodeAt(r)));if(c===92)return!0;var d=this.input.slice(u,r);if(Ct.test(d))return!1;if(e&&!t&&d==="of"){S.lastIndex=r;var v=S.exec(this.input);if(r=r+v[0].length,this.input.charCodeAt(r)!==61||(c=this.input.charCodeAt(r+1))===61||c===62)return!1}return!0};f.isAwaitUsing=function(t){return this.isUsingKeyword(!0,t)};f.isUsing=function(t){return this.isUsingKeyword(!1,t)};f.parseStatement=function(t,e,s){var r=this.type,n=this.startNode(),p;if(this.isLet(t))r=a._var,p="let";switch(r){case a._break:case a._continue:return this.parseBreakContinueStatement(n,r.keyword);case a._debugger:return this.parseDebuggerStatement(n);case a._do:return this.parseDoStatement(n);case a._for:return this.parseForStatement(n);case a._function:if(t&&(this.strict||t!=="if"&&t!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(n,!1,!t);case a._class:if(t)this.unexpected();return this.parseClass(n,!0);case a._if:return this.parseIfStatement(n);case a._return:return this.parseReturnStatement(n);case a._switch:return this.parseSwitchStatement(n);case a._throw:return this.parseThrowStatement(n);case a._try:return this.parseTryStatement(n);case a._const:case a._var:if(p=p||this.value,t&&p!=="var")this.unexpected();return this.parseVarStatement(n,p);case a._while:return this.parseWhileStatement(n);case a._with:return this.parseWithStatement(n);case a.braceL:return this.parseBlock(!0,n);case a.semi:return this.parseEmptyStatement(n);case a._export:case a._import:if(this.options.ecmaVersion>10&&r===a._import){S.lastIndex=this.pos;var l=S.exec(this.input),c=this.pos+l[0].length,u=this.input.charCodeAt(c);if(u===40||u===46)return this.parseExpressionStatement(n,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!e)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return r===a._import?this.parseImport(n):this.parseExport(n,s);default:if(this.isAsyncFunction()){if(t)this.unexpected();return this.next(),this.parseFunctionStatement(n,!0,!t)}var d=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(d){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(t)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(d==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(n,!1,d),this.semicolon(),this.finishNode(n,"VariableDeclaration")}var v=this.value,k=this.parseExpression();if(r===a.name&&k.type==="Identifier"&&this.eat(a.colon))return this.parseLabeledStatement(n,v,k,t);else return this.parseExpressionStatement(n,k)}};f.parseBreakContinueStatement=function(t,e){var s=e==="break";if(this.next(),this.eat(a.semi)||this.insertSemicolon())t.label=null;else if(this.type!==a.name)this.unexpected();else t.label=this.parseIdent(),this.semicolon();var r=0;for(;r<this.labels.length;++r){var n=this.labels[r];if(t.label==null||n.name===t.label.name){if(n.kind!=null&&(s||n.kind==="loop"))break;if(t.label&&s)break}}if(r===this.labels.length)this.raise(t.start,"Unsyntactic "+e);return this.finishNode(t,s?"BreakStatement":"ContinueStatement")};f.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")};f.parseDoStatement=function(t){if(this.next(),this.labels.push(bt),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(a._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(a.semi);else this.semicolon();return this.finishNode(t,"DoWhileStatement")};f.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(bt),this.enterScope(0),this.expect(a.parenL),this.type===a.semi){if(e>-1)this.unexpected(e);return this.parseFor(t,null)}var s=this.isLet();if(this.type===a._var||this.type===a._const||s){var r=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(t,r,e)}var p=this.isContextual("let"),l=!1,c=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(c){var u=this.startNode();if(this.next(),c==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(u,!0,c),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(t,u,e)}var d=this.containsEsc,v=new ot,k=this.start,C=e>-1?this.parseExprSubscripts(v,"await"):this.parseExpression(!0,v);if(this.type===a._in||(l=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(e>-1){if(this.type===a._in)this.unexpected(e);t.await=!0}else if(l&&this.options.ecmaVersion>=8){if(C.start===k&&!d&&C.type==="Identifier"&&C.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)t.await=!1}if(p&&l)this.raise(C.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(C,!1,v),this.checkLValPattern(C),this.parseForIn(t,C)}else this.checkExpressionErrors(v,!0);if(e>-1)this.unexpected(e);return this.parseFor(t,C)};f.parseForAfterInit=function(t,e,s){if((this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&e.declarations.length===1){if(this.type===a._in){if((e.kind==="using"||e.kind==="await using")&&!e.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&s>-1)this.unexpected(s)}else if(this.options.ecmaVersion>=9)t.await=s>-1;return this.parseForIn(t,e)}if(s>-1)this.unexpected(s);return this.parseFor(t,e)};f.parseFunctionStatement=function(t,e,s){return this.next(),this.parseFunction(t,G|(s?0:ut),!1,e)};f.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")};f.parseReturnStatement=function(t){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(a.semi)||this.insertSemicolon())t.argument=null;else t.argument=this.parseExpression(),this.semicolon();return this.finishNode(t,"ReturnStatement")};f.parseSwitchStatement=function(t){this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(a.braceL),this.labels.push($t),this.enterScope(Lt);var e;for(var s=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var r=this.type===a._case;if(e)this.finishNode(e,"SwitchCase");if(t.cases.push(e=this.startNode()),e.consequent=[],this.next(),r)e.test=this.parseExpression();else{if(s)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");s=!0,e.test=null}this.expect(a.colon)}else{if(!e)this.unexpected();e.consequent.push(this.parseStatement(null))}if(this.exitScope(),e)this.finishNode(e,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")};f.parseThrowStatement=function(t){if(this.next(),E.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var te=[];f.parseCatchClauseParam=function(){var t=this.parseBindingAtom(),e=t.type==="Identifier";return this.enterScope(e?It:0),this.checkLValPattern(t,e?Vt:V),this.expect(a.parenR),t};f.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===a._catch){var e=this.startNode();if(this.next(),this.eat(a.parenL))e.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();e.param=null,this.enterScope(0)}e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}if(t.finalizer=this.eat(a._finally)?this.parseBlock():null,!t.handler&&!t.finalizer)this.raise(t.start,"Missing catch or finally clause");return this.finishNode(t,"TryStatement")};f.parseVarStatement=function(t,e,s){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")};f.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(bt),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")};f.parseWithStatement=function(t){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")};f.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")};f.parseLabeledStatement=function(t,e,s,r){for(var n=0,p=this.labels;n<p.length;n+=1){var l=p[n];if(l.name===e)this.raise(s.start,"Label '"+e+"' is already declared")}var c=this.type.isLoop?"loop":this.type===a._switch?"switch":null;for(var u=this.labels.length-1;u>=0;u--){var d=this.labels[u];if(d.statementStart===t.start)d.statementStart=this.start,d.kind=c;else break}return this.labels.push({name:e,kind:c,statementStart:this.start}),t.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")};f.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")};f.parseBlock=function(t,e,s){if(t===void 0)t=!0;if(e===void 0)e=this.startNode();if(e.body=[],this.expect(a.braceL),t)this.enterScope(0);while(this.type!==a.braceR){var r=this.parseStatement(null);e.body.push(r)}if(s)this.strict=!1;if(this.next(),t)this.exitScope();return this.finishNode(e,"BlockStatement")};f.parseFor=function(t,e){return t.init=e,this.expect(a.semi),t.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),t.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")};f.parseForIn=function(t,e){var s=this.type===a._in;if(this.next(),e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!s||this.options.ecmaVersion<8||this.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier"))this.raise(e.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer");return t.left=e,t.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,s?"ForInStatement":"ForOfStatement")};f.parseVar=function(t,e,s,r){t.declarations=[],t.kind=s;for(;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(a.eq))n.init=this.parseMaybeAssign(e);else if(!r&&s==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!r&&(s==="using"||s==="await using")&&this.options.ecmaVersion>=17&&this.type!==a._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+s+" declaration");else if(!r&&n.id.type!=="Identifier"&&!(e&&(this.type===a._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else n.init=null;if(t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(a.comma))break}return t};f.parseVarId=function(t,e){t.id=e==="using"||e==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(t.id,e==="var"?yt:V,!1)};var G=1,ut=2,Ot=4;f.parseFunction=function(t,e,s,r,n){if(this.initFunction(t),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r){if(this.type===a.star&&e&ut)this.unexpected();t.generator=this.eat(a.star)}if(this.options.ecmaVersion>=8)t.async=!!r;if(e&G){if(t.id=e&Ot&&this.type!==a.name?null:this.parseIdent(),t.id&&!(e&ut))this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?yt:V:Rt)}var p=this.yieldPos,l=this.awaitPos,c=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xt(t.async,t.generator)),!(e&G))t.id=this.type===a.name?this.parseIdent():null;return this.parseFunctionParams(t),this.parseFunctionBody(t,s,!1,n),this.yieldPos=p,this.awaitPos=l,this.awaitIdentPos=c,this.finishNode(t,e&G?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(t){this.expect(a.parenL),t.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(t,e){this.next();var s=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var r=this.enterClassBody(),n=this.startNode(),p=!1;n.body=[],this.expect(a.braceL);while(this.type!==a.braceR){var l=this.parseClassElement(t.superClass!==null);if(l){if(n.body.push(l),l.type==="MethodDefinition"&&l.kind==="constructor"){if(p)this.raiseRecoverable(l.start,"Duplicate constructor in the same class");p=!0}else if(l.key&&l.key.type==="PrivateIdentifier"&&ee(r,l))this.raiseRecoverable(l.key.start,"Identifier '#"+l.key.name+"' has already been declared")}}return this.strict=s,this.next(),t.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(t){if(this.eat(a.semi))return null;var e=this.options.ecmaVersion,s=this.startNode(),r="",n=!1,p=!1,l="method",c=!1;if(this.eatContextual("static")){if(e>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(s),s;if(this.isClassElementNameStart()||this.type===a.star)c=!0;else r="static"}if(s.static=c,!r&&e>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon())p=!0;else r="async";if(!r&&(e>=9||!p)&&this.eat(a.star))n=!0;if(!r&&!p&&!n){var u=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())l=u;else r=u}if(r)s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=r,this.finishNode(s.key,"Identifier");else this.parseClassElementName(s);if(e<13||this.type===a.parenL||l!=="method"||n||p){var d=!s.static&&et(s,"constructor"),v=d&&t;if(d&&l!=="method")this.raise(s.key.start,"Constructor can't have get/set modifier");s.kind=d?"constructor":l,this.parseClassMethod(s,n,p,v)}else this.parseClassField(s);return s};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(t){if(this.type===a.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");t.computed=!1,t.key=this.parsePrivateIdent()}else this.parsePropertyName(t)};f.parseClassMethod=function(t,e,s,r){var n=t.key;if(t.kind==="constructor"){if(e)this.raise(n.start,"Constructor can't be a generator");if(s)this.raise(n.start,"Constructor can't be an async method")}else if(t.static&&et(t,"prototype"))this.raise(n.start,"Classes may not have a static property named prototype");var p=t.value=this.parseMethod(e,s,r);if(t.kind==="get"&&p.params.length!==0)this.raiseRecoverable(p.start,"getter should have no params");if(t.kind==="set"&&p.params.length!==1)this.raiseRecoverable(p.start,"setter should have exactly one param");if(t.kind==="set"&&p.params[0].type==="RestElement")this.raiseRecoverable(p.params[0].start,"Setter cannot use rest params");return this.finishNode(t,"MethodDefinition")};f.parseClassField=function(t){if(et(t,"constructor"))this.raise(t.key.start,"Classes can't have a field named 'constructor'");else if(t.static&&et(t,"prototype"))this.raise(t.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(a.eq))this.enterScope(Q|at),t.value=this.parseMaybeAssign(),this.exitScope();else t.value=null;return this.semicolon(),this.finishNode(t,"PropertyDefinition")};f.parseClassStaticBlock=function(t){t.body=[];var e=this.labels;this.labels=[],this.enterScope(M|at);while(this.type!==a.braceR){var s=this.parseStatement(null);t.body.push(s)}return this.next(),this.exitScope(),this.labels=e,this.finishNode(t,"StaticBlock")};f.parseClassId=function(t,e){if(this.type===a.name){if(t.id=this.parseIdent(),e)this.checkLValSimple(t.id,V,!1)}else{if(e===!0)this.unexpected();t.id=null}};f.parseClassSuper=function(t){t.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var t={declared:Object.create(null),used:[]};return this.privateNameStack.push(t),t.declared};f.exitClassBody=function(){var t=this.privateNameStack.pop(),{declared:e,used:s}=t;if(!this.options.checkPrivateFields)return;var r=this.privateNameStack.length,n=r===0?null:this.privateNameStack[r-1];for(var p=0;p<s.length;++p){var l=s[p];if(!Y(e,l.name))if(n)n.used.push(l);else this.raiseRecoverable(l.start,"Private field '#"+l.name+"' must be declared in an enclosing class")}};function ee(t,e){var s=e.key.name,r=t[s],n="true";if(e.type==="MethodDefinition"&&(e.kind==="get"||e.kind==="set"))n=(e.static?"s":"i")+e.kind;if(r==="iget"&&n==="iset"||r==="iset"&&n==="iget"||r==="sget"&&n==="sset"||r==="sset"&&n==="sget")return t[s]="true",!1;else if(!r)return t[s]=n,!1;else return!0}function et(t,e){var{computed:s,key:r}=t;return!s&&(r.type==="Identifier"&&r.name===e||r.type==="Literal"&&r.value===e)}f.parseExportAllDeclaration=function(t,e){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))t.exported=this.parseModuleExportName(),this.checkExport(e,t.exported,this.lastTokStart);else t.exported=null;if(this.expectContextual("from"),this.type!==a.string)this.unexpected();if(t.source=this.parseExprAtom(),this.options.ecmaVersion>=16)t.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(t,"ExportAllDeclaration")};f.parseExport=function(t,e){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(t,e);if(this.eat(a._default))return this.checkExport(e,"default",this.lastTokStart),t.declaration=this.parseExportDefaultDeclaration(),this.finishNode(t,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(t.declaration=this.parseExportDeclaration(t),t.declaration.type==="VariableDeclaration")this.checkVariableExport(e,t.declaration.declarations);else this.checkExport(e,t.declaration.id,t.declaration.id.start);if(t.specifiers=[],t.source=null,this.options.ecmaVersion>=16)t.attributes=[]}else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from")){if(this.type!==a.string)this.unexpected();if(t.source=this.parseExprAtom(),this.options.ecmaVersion>=16)t.attributes=this.parseWithClause()}else{for(var s=0,r=t.specifiers;s<r.length;s+=1){var n=r[s];if(this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal")this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(t.source=null,this.options.ecmaVersion>=16)t.attributes=[]}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")};f.parseExportDeclaration=function(t){return this.parseStatement(null)};f.parseExportDefaultDeclaration=function(){var t;if(this.type===a._function||(t=this.isAsyncFunction())){var e=this.startNode();if(this.next(),t)this.next();return this.parseFunction(e,G|Ot,!1,t)}else if(this.type===a._class){var s=this.startNode();return this.parseClass(s,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};f.checkExport=function(t,e,s){if(!t)return;if(typeof e!=="string")e=e.type==="Identifier"?e.name:e.value;if(Y(t,e))this.raiseRecoverable(s,"Duplicate export '"+e+"'");t[e]=!0};f.checkPatternExport=function(t,e){var s=e.type;if(s==="Identifier")this.checkExport(t,e,e.start);else if(s==="ObjectPattern")for(var r=0,n=e.properties;r<n.length;r+=1){var p=n[r];this.checkPatternExport(t,p)}else if(s==="ArrayPattern")for(var l=0,c=e.elements;l<c.length;l+=1){var u=c[l];if(u)this.checkPatternExport(t,u)}else if(s==="Property")this.checkPatternExport(t,e.value);else if(s==="AssignmentPattern")this.checkPatternExport(t,e.left);else if(s==="RestElement")this.checkPatternExport(t,e.argument)};f.checkVariableExport=function(t,e){if(!t)return;for(var s=0,r=e;s<r.length;s+=1){var n=r[s];this.checkPatternExport(t,n.id)}};f.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};f.parseExportSpecifier=function(t){var e=this.startNode();return e.local=this.parseModuleExportName(),e.exported=this.eatContextual("as")?this.parseModuleExportName():e.local,this.checkExport(t,e.exported,e.exported.start),this.finishNode(e,"ExportSpecifier")};f.parseExportSpecifiers=function(t){var e=[],s=!0;this.expect(a.braceL);while(!this.eat(a.braceR)){if(!s){if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break}else s=!1;e.push(this.parseExportSpecifier(t))}return e};f.parseImport=function(t){if(this.next(),this.type===a.string)t.specifiers=te,t.source=this.parseExprAtom();else t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===a.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)t.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(t,"ImportDeclaration")};f.parseImportSpecifier=function(){var t=this.startNode();if(t.imported=this.parseModuleExportName(),this.eatContextual("as"))t.local=this.parseIdent();else this.checkUnreserved(t.imported),t.local=t.imported;return this.checkLValSimple(t.local,V),this.finishNode(t,"ImportSpecifier")};f.parseImportDefaultSpecifier=function(){var t=this.startNode();return t.local=this.parseIdent(),this.checkLValSimple(t.local,V),this.finishNode(t,"ImportDefaultSpecifier")};f.parseImportNamespaceSpecifier=function(){var t=this.startNode();return this.next(),this.expectContextual("as"),t.local=this.parseIdent(),this.checkLValSimple(t.local,V),this.finishNode(t,"ImportNamespaceSpecifier")};f.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===a.name){if(t.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma))return t}if(this.type===a.star)return t.push(this.parseImportNamespaceSpecifier()),t;this.expect(a.braceL);while(!this.eat(a.braceR)){if(!e){if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break}else e=!1;t.push(this.parseImportSpecifier())}return t};f.parseWithClause=function(){var t=[];if(!this.eat(a._with))return t;this.expect(a.braceL);var e={},s=!0;while(!this.eat(a.braceR)){if(!s){if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break}else s=!1;var r=this.parseImportAttribute(),n=r.key.type==="Identifier"?r.key.name:r.key.value;if(Y(e,n))this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+n+"'");e[n]=!0,t.push(r)}return t};f.parseImportAttribute=function(){var t=this.startNode();if(t.key=this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(a.colon),this.type!==a.string)this.unexpected();return t.value=this.parseExprAtom(),this.finishNode(t,"ImportAttribute")};f.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===a.string){var t=this.parseLiteral(this.value);if(Kt.test(t.value))this.raise(t.start,"An export name cannot include a lone surrogate.");return t}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)};f.isDirectiveCandidate=function(t){return this.options.ecmaVersion>=5&&t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value==="string"&&(this.input[t.start]==='"'||this.input[t.start]==="'")};var L=i.prototype;L.toAssignable=function(t,e,s){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":if(this.inAsync&&t.name==="await")this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(t.type="ObjectPattern",s)this.checkPatternErrors(s,!0);for(var r=0,n=t.properties;r<n.length;r+=1){var p=n[r];if(this.toAssignable(p,e),p.type==="RestElement"&&(p.argument.type==="ArrayPattern"||p.argument.type==="ObjectPattern"))this.raise(p.argument.start,"Unexpected token")}break;case"Property":if(t.kind!=="init")this.raise(t.key.start,"Object pattern can't contain getter or setter");this.toAssignable(t.value,e);break;case"ArrayExpression":if(t.type="ArrayPattern",s)this.checkPatternErrors(s,!0);this.toAssignableList(t.elements,e);break;case"SpreadElement":if(t.type="RestElement",this.toAssignable(t.argument,e),t.argument.type==="AssignmentPattern")this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(t.operator!=="=")this.raise(t.left.end,"Only '=' operator can be used for specifying default value.");t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,s);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else if(s)this.checkPatternErrors(s,!0);return t};L.toAssignableList=function(t,e){var s=t.length;for(var r=0;r<s;r++){var n=t[r];if(n)this.toAssignable(n,e)}if(s){var p=t[s-1];if(this.options.ecmaVersion===6&&e&&p&&p.type==="RestElement"&&p.argument.type!=="Identifier")this.unexpected(p.argument.start)}return t};L.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")};L.parseRestBinding=function(){var t=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==a.name)this.unexpected();return t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")};L.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case a.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(a.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case a.braceL:return this.parseObj(!0)}return this.parseIdent()};L.parseBindingList=function(t,e,s,r){var n=[],p=!0;while(!this.eat(t)){if(p)p=!1;else this.expect(a.comma);if(e&&this.type===a.comma)n.push(null);else if(s&&this.afterTrailingComma(t))break;else if(this.type===a.ellipsis){var l=this.parseRestBinding();if(this.parseBindingListItem(l),n.push(l),this.type===a.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(t);break}else n.push(this.parseAssignableListItem(r))}return n};L.parseAssignableListItem=function(t){var e=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(e),e};L.parseBindingListItem=function(t){return t};L.parseMaybeDefault=function(t,e,s){if(s=s||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(a.eq))return s;var r=this.startNodeAt(t,e);return r.left=s,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};L.checkLValSimple=function(t,e,s){if(e===void 0)e=tt;var r=e!==tt;switch(t.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(t.name))this.raiseRecoverable(t.start,(r?"Binding ":"Assigning to ")+t.name+" in strict mode");if(r){if(e===V&&t.name==="let")this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name");if(s){if(Y(s,t.name))this.raiseRecoverable(t.start,"Argument name clash");s[t.name]=!0}if(e!==Ft)this.declareName(t.name,e,t.start)}break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(r)this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":if(r)this.raiseRecoverable(t.start,"Binding parenthesized expression");return this.checkLValSimple(t.expression,e,s);default:this.raise(t.start,(r?"Binding":"Assigning to")+" rvalue")}};L.checkLValPattern=function(t,e,s){if(e===void 0)e=tt;switch(t.type){case"ObjectPattern":for(var r=0,n=t.properties;r<n.length;r+=1){var p=n[r];this.checkLValInnerPattern(p,e,s)}break;case"ArrayPattern":for(var l=0,c=t.elements;l<c.length;l+=1){var u=c[l];if(u)this.checkLValInnerPattern(u,e,s)}break;default:this.checkLValSimple(t,e,s)}};L.checkLValInnerPattern=function(t,e,s){if(e===void 0)e=tt;switch(t.type){case"Property":this.checkLValInnerPattern(t.value,e,s);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,s);break;case"RestElement":this.checkLValPattern(t.argument,e,s);break;default:this.checkLValPattern(t,e,s)}};var R=function(e,s,r,n,p){this.token=e,this.isExpr=!!s,this.preserveSpace=!!r,this.override=n,this.generator=!!p},w={b_stat:new R("{",!1),b_expr:new R("{",!0),b_tmpl:new R("${",!1),p_stat:new R("(",!1),p_expr:new R("(",!0),q_tmpl:new R("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new R("function",!1),f_expr:new R("function",!0),f_expr_gen:new R("function",!0,!1,null,!0),f_gen:new R("function",!1,!1,null,!0)},z=i.prototype;z.initialContext=function(){return[w.b_stat]};z.curContext=function(){return this.context[this.context.length-1]};z.braceIsBlock=function(t){var e=this.curContext();if(e===w.f_expr||e===w.f_stat)return!0;if(t===a.colon&&(e===w.b_stat||e===w.b_expr))return!e.isExpr;if(t===a._return||t===a.name&&this.exprAllowed)return E.test(this.input.slice(this.lastTokEnd,this.start));if(t===a._else||t===a.semi||t===a.eof||t===a.parenR||t===a.arrow)return!0;if(t===a.braceL)return e===w.b_stat;if(t===a._var||t===a._const||t===a.name)return!1;return!this.exprAllowed};z.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if(e.token==="function")return e.generator}return!1};z.updateContext=function(t){var e,s=this.type;if(s.keyword&&t===a.dot)this.exprAllowed=!1;else if(e=s.updateContext)e.call(this,t);else this.exprAllowed=s.beforeExpr};z.overrideContext=function(t){if(this.curContext()!==t)this.context[this.context.length-1]=t};a.parenR.updateContext=a.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var t=this.context.pop();if(t===w.b_stat&&this.curContext().token==="function")t=this.context.pop();this.exprAllowed=!t.isExpr};a.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?w.b_stat:w.b_expr),this.exprAllowed=!0};a.dollarBraceL.updateContext=function(){this.context.push(w.b_tmpl),this.exprAllowed=!0};a.parenL.updateContext=function(t){var e=t===a._if||t===a._for||t===a._with||t===a._while;this.context.push(e?w.p_stat:w.p_expr),this.exprAllowed=!0};a.incDec.updateContext=function(){};a._function.updateContext=a._class.updateContext=function(t){if(t.beforeExpr&&t!==a._else&&!(t===a.semi&&this.curContext()!==w.p_stat)&&!(t===a._return&&E.test(this.input.slice(this.lastTokEnd,this.start)))&&!((t===a.colon||t===a.braceL)&&this.curContext()===w.b_stat))this.context.push(w.f_expr);else this.context.push(w.f_stat);this.exprAllowed=!1};a.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};a.backQuote.updateContext=function(){if(this.curContext()===w.q_tmpl)this.context.pop();else this.context.push(w.q_tmpl);this.exprAllowed=!1};a.star.updateContext=function(t){if(t===a._function){var e=this.context.length-1;if(this.context[e]===w.f_expr)this.context[e]=w.f_expr_gen;else this.context[e]=w.f_gen}this.exprAllowed=!0};a.name.updateContext=function(t){var e=!1;if(this.options.ecmaVersion>=6&&t!==a.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())e=!0}this.exprAllowed=e};var m=i.prototype;m.checkPropClash=function(t,e,s){if(this.options.ecmaVersion>=9&&t.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))return;var r=t.key,n;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var p=t.kind;if(this.options.ecmaVersion>=6){if(n==="__proto__"&&p==="init"){if(e.proto)if(s){if(s.doubleProto<0)s.doubleProto=r.start}else this.raiseRecoverable(r.start,"Redefinition of __proto__ property");e.proto=!0}return}n="$"+n;var l=e[n];if(l){var c;if(p==="init")c=this.strict&&l.init||l.get||l.set;else c=l.init||l[p];if(c)this.raiseRecoverable(r.start,"Redefinition of property")}else l=e[n]={init:!1,get:!1,set:!1};l[p]=!0};m.parseExpression=function(t,e){var s=this;return this.catchStackOverflow(function(){var{start:r,startLoc:n}=s,p=s.parseMaybeAssign(t,e);if(s.type===a.comma){var l=s.startNodeAt(r,n);l.expressions=[p];while(s.eat(a.comma))l.expressions.push(s.parseMaybeAssign(t,e));return s.finishNode(l,"SequenceExpression")}return p})};m.parseMaybeAssign=function(t,e,s){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(t);else this.exprAllowed=!1;var r=!1,n=-1,p=-1,l=-1;if(e)n=e.parenthesizedAssign,p=e.trailingComma,l=e.doubleProto,e.parenthesizedAssign=e.trailingComma=-1;else e=new ot,r=!0;var c=this.start,u=this.startLoc;if(this.type===a.parenL||this.type===a.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=t==="await";var d=this.parseMaybeConditional(t,e);if(s)d=s.call(this,d,c,u);if(this.type.isAssign){var v=this.startNodeAt(c,u);if(v.operator=this.value,this.type===a.eq)d=this.toAssignable(d,!1,e);if(!r)e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1;if(e.shorthandAssign>=d.start)e.shorthandAssign=-1;if(this.type===a.eq)this.checkLValPattern(d);else this.checkLValSimple(d);if(v.left=d,this.next(),v.right=this.parseMaybeAssign(t),l>-1)e.doubleProto=l;return this.finishNode(v,"AssignmentExpression")}else if(r)this.checkExpressionErrors(e,!0);if(n>-1)e.parenthesizedAssign=n;if(p>-1)e.trailingComma=p;return d};m.parseMaybeConditional=function(t,e){var s=this.start,r=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(!(n.type==="ArrowFunctionExpression"&&n.start===s)&&this.eat(a.question)){var p=this.startNodeAt(s,r);return p.test=n,p.consequent=this.parseMaybeAssign(),this.expect(a.colon),p.alternate=this.parseMaybeAssign(t),this.finishNode(p,"ConditionalExpression")}return n};m.parseExprOps=function(t,e){var s=this.start,r=this.startLoc,n=this.parseMaybeUnary(e,!1,!1,t);if(this.checkExpressionErrors(e))return n;return n.start===s&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,s,r,-1,t)};m.parseExprOp=function(t,e,s,r,n){var p=this.type.binop;if(p!=null&&(!n||this.type!==a._in)){if(p>r){var l=this.type===a.logicalOR||this.type===a.logicalAND,c=this.type===a.coalesce;if(c)p=a.logicalAND.binop;var u=this.value;this.next();var d=this.start,v=this.startLoc,k=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,n),d,v,p,n),C=this.buildBinary(e,s,t,k,u,l||c);if(l&&this.type===a.coalesce||c&&(this.type===a.logicalOR||this.type===a.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(C,e,s,r,n)}}return t};m.buildBinary=function(t,e,s,r,n,p){if(r.type==="PrivateIdentifier")this.raise(r.start,"Private identifier can only be left side of binary expression");var l=this.startNodeAt(t,e);return l.left=s,l.operator=n,l.right=r,this.finishNode(l,p?"LogicalExpression":"BinaryExpression")};m.parseMaybeUnary=function(t,e,s,r){var n=this.start,p=this.startLoc,l;if(this.isContextual("await")&&this.canAwait)l=this.parseAwait(r),e=!0;else if(this.type.prefix){var c=this.startNode(),u=this.type===a.incDec;if(c.operator=this.value,c.prefix=!0,this.next(),c.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(t,!0),u)this.checkLValSimple(c.argument);else if(this.strict&&c.operator==="delete"&&Bt(c.argument))this.raiseRecoverable(c.start,"Deleting local variable in strict mode");else if(c.operator==="delete"&&ft(c.argument))this.raiseRecoverable(c.start,"Private fields can not be deleted");else e=!0;l=this.finishNode(c,u?"UpdateExpression":"UnaryExpression")}else if(!e&&this.type===a.privateId){if((r||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(l=this.parsePrivateIdent(),this.type!==a._in)this.unexpected()}else{if(l=this.parseExprSubscripts(t,r),this.checkExpressionErrors(t))return l;while(this.type.postfix&&!this.canInsertSemicolon()){var d=this.startNodeAt(n,p);d.operator=this.value,d.prefix=!1,d.argument=l,this.checkLValSimple(l),this.next(),l=this.finishNode(d,"UpdateExpression")}}if(!s&&!(l.type==="ArrowFunctionExpression"&&l.start===n)&&this.eat(a.starstar))if(e)this.unexpected(this.lastTokStart);else return this.buildBinary(n,p,l,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return l};function Bt(t){return t.type==="Identifier"||t.type==="ParenthesizedExpression"&&Bt(t.expression)}function ft(t){return t.type==="MemberExpression"&&t.property.type==="PrivateIdentifier"||t.type==="ChainExpression"&&ft(t.expression)||t.type==="ParenthesizedExpression"&&ft(t.expression)}m.parseExprSubscripts=function(t,e){var s=this.start,r=this.startLoc,n=this.parseExprAtom(t,e);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var p=this.parseSubscripts(n,s,r,!1,e);if(t&&p.type==="MemberExpression"){if(t.parenthesizedAssign>=p.start)t.parenthesizedAssign=-1;if(t.parenthesizedBind>=p.start)t.parenthesizedBind=-1;if(t.trailingComma>=p.start)t.trailingComma=-1}return p};m.parseSubscripts=function(t,e,s,r,n){var p=this.options.ecmaVersion>=8&&t.type==="Identifier"&&t.name==="async"&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.potentialArrowAt===t.start,l=!1;while(!0){var c=this.parseSubscript(t,e,s,r,p,l,n);if(c.optional)l=!0;if(c===t||c.type==="ArrowFunctionExpression"){if(l){var u=this.startNodeAt(e,s);u.expression=c,c=this.finishNode(u,"ChainExpression")}return c}t=c}};m.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(a.arrow)};m.parseSubscriptAsyncArrow=function(t,e,s,r){return this.parseArrowExpression(this.startNodeAt(t,e),s,!0,r)};m.parseSubscript=function(t,e,s,r,n,p,l){var c=this.options.ecmaVersion>=11,u=c&&this.eat(a.questionDot);if(r&&u)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var d=this.eat(a.bracketL);if(d||u&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){var v=this.startNodeAt(e,s);if(v.object=t,d)v.property=this.parseExpression(),this.expect(a.bracketR);else if(this.type===a.privateId&&t.type!=="Super")v.property=this.parsePrivateIdent();else v.property=this.parseIdent(this.options.allowReserved!=="never");if(v.computed=!!d,c)v.optional=u;t=this.finishNode(v,"MemberExpression")}else if(!r&&this.eat(a.parenL)){var k=new ot,C=this.yieldPos,j=this.awaitPos,D=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var J=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1,k);if(n&&!u&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(k,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=C,this.awaitPos=j,this.awaitIdentPos=D,this.parseSubscriptAsyncArrow(e,s,J,l)}this.checkExpressionErrors(k,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=j||this.awaitPos,this.awaitIdentPos=D||this.awaitIdentPos;var U=this.startNodeAt(e,s);if(U.callee=t,U.arguments=J,c)U.optional=u;t=this.finishNode(U,"CallExpression")}else if(this.type===a.backQuote){if(u||p)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var q=this.startNodeAt(e,s);q.tag=t,q.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(q,"TaggedTemplateExpression")}return t};m.parseExprAtom=function(t,e,s){if(this.type===a.slash)this.readRegexp();var r,n=this.potentialArrowAt===this.start;switch(this.type){case a._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(r=this.startNode(),this.next(),this.type===a.parenL&&!this.allowDirectSuper)this.raise(r.start,"super() call outside constructor of a subclass");if(this.type!==a.dot&&this.type!==a.bracketL&&this.type!==a.parenL)this.unexpected();return this.finishNode(r,"Super");case a._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case a.name:var p=this.start,l=this.startLoc,c=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!c&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(w.f_expr),this.parseFunction(this.startNodeAt(p,l),0,!1,!0,e);if(n&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(p,l),[u],!1,e);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===a.name&&!c&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(u=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(a.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(p,l),[u],!0,e)}}return u;case a.regexp:var d=this.value;return r=this.parseLiteral(d.value),r.regex={pattern:d.pattern,flags:d.flags},r;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return r=this.startNode(),r.value=this.type===a._null?null:this.type===a._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case a.parenL:var v=this.start,k=this.parseParenAndDistinguishExpression(n,e);if(t){if(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(k))t.parenthesizedAssign=v;if(t.parenthesizedBind<0)t.parenthesizedBind=v}return k;case a.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(a.bracketR,!0,!0,t),this.finishNode(r,"ArrayExpression");case a.braceL:return this.overrideContext(w.b_expr),this.parseObj(!1,t);case a._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(s);else return this.unexpected();default:return this.parseExprAtomDefault()}};m.parseExprAtomDefault=function(){this.unexpected()};m.parseExprImport=function(t){var e=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===a.parenL&&!t)return this.parseDynamicImport(e);else if(this.type===a.dot){var s=this.startNodeAt(e.start,e.loc&&e.loc.start);return s.name="import",e.meta=this.finishNode(s,"Identifier"),this.parseImportMeta(e)}else this.unexpected()};m.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(a.parenR))if(this.expect(a.comma),!this.afterTrailingComma(a.parenR)){if(t.options=this.parseMaybeAssign(),!this.eat(a.parenR)){if(this.expect(a.comma),!this.afterTrailingComma(a.parenR))this.unexpected()}}else t.options=null;else t.options=null;else if(!this.eat(a.parenR)){var e=this.start;if(this.eat(a.comma)&&this.eat(a.parenR))this.raiseRecoverable(e,"Trailing comma is not allowed in import()");else this.unexpected(e)}return this.finishNode(t,"ImportExpression")};m.parseImportMeta=function(t){this.next();var e=this.containsEsc;if(t.property=this.parseIdent(!0),t.property.name!=="meta")this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'");if(e)this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module");return this.finishNode(t,"MetaProperty")};m.parseLiteral=function(t){var e=this.startNode();if(e.value=t,e.raw=this.input.slice(this.start,this.end),e.raw.charCodeAt(e.raw.length-1)===110)e.bigint=e.value!=null?e.value.toString():e.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(e,"Literal")};m.parseParenExpression=function(){this.expect(a.parenL);var t=this.parseExpression();return this.expect(a.parenR),t};m.shouldParseArrow=function(t){return!this.canInsertSemicolon()};m.parseParenAndDistinguishExpression=function(t,e){var s=this.start,r=this.startLoc,n,p=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var l=this.start,c=this.startLoc,u=[],d=!0,v=!1,k=new ot,C=this.yieldPos,j=this.awaitPos,D;this.yieldPos=0,this.awaitPos=0;while(this.type!==a.parenR)if(d?d=!1:this.expect(a.comma),p&&this.afterTrailingComma(a.parenR,!0)){v=!0;break}else if(this.type===a.ellipsis){if(D=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,k,this.parseParenItem));var J=this.lastTokEnd,U=this.lastTokEndLoc;if(this.expect(a.parenR),t&&this.shouldParseArrow(u)&&this.eat(a.arrow))return this.checkPatternErrors(k,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=C,this.awaitPos=j,this.parseParenArrowList(s,r,u,e);if(!u.length||v)this.unexpected(this.lastTokStart);if(D)this.unexpected(D);if(this.checkExpressionErrors(k,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=j||this.awaitPos,u.length>1)n=this.startNodeAt(l,c),n.expressions=u,this.finishNodeAt(n,"SequenceExpression",J,U);else n=u[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var q=this.startNodeAt(s,r);return q.expression=n,this.finishNode(q,"ParenthesizedExpression")}else return n};m.parseParenItem=function(t){return t};m.parseParenArrowList=function(t,e,s,r){return this.parseArrowExpression(this.startNodeAt(t,e),s,!1,r)};var ie=[];m.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var e=this.startNodeAt(t.start,t.loc&&t.loc.start);e.name="new",t.meta=this.finishNode(e,"Identifier"),this.next();var s=this.containsEsc;if(t.property=this.parseIdent(!0),t.property.name!=="target")this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'");if(s)this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(t.start,"'new.target' can only be used in functions and class static block");return this.finishNode(t,"MetaProperty")}var r=this.start,n=this.startLoc;if(t.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,n,!0,!1),t.callee.type==="Super")this.raiseRecoverable(r,"Invalid use of 'super'");if(this.eat(a.parenL))t.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1);else t.arguments=ie;return this.finishNode(t,"NewExpression")};m.parseTemplateElement=function(t){var e=t.isTagged,s=this.startNode();if(this.type===a.invalidTemplate){if(!e)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");s.value={raw:this.value.replace(/\r\n?/g,`
4
+ `),cooked:null}}else s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
5
+ `),cooked:this.value};return this.next(),s.tail=this.type===a.backQuote,this.finishNode(s,"TemplateElement")};m.parseTemplate=function(t){if(t===void 0)t={};var e=t.isTagged;if(e===void 0)e=!1;var s=this.startNode();this.next(),s.expressions=[];var r=this.parseTemplateElement({isTagged:e});s.quasis=[r];while(!r.tail){if(this.type===a.eof)this.raise(this.pos,"Unterminated template literal");this.expect(a.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(a.braceR),s.quasis.push(r=this.parseTemplateElement({isTagged:e}))}return this.next(),this.finishNode(s,"TemplateLiteral")};m.isAsyncProp=function(t){return!t.computed&&t.key.type==="Identifier"&&t.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)&&!E.test(this.input.slice(this.lastTokEnd,this.start))};m.parseObj=function(t,e){var s=this.startNode(),r=!0,n={};s.properties=[],this.next();while(!this.eat(a.braceR)){if(!r){if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break}else r=!1;var p=this.parseProperty(t,e);if(!t)this.checkPropClash(p,n,e);s.properties.push(p)}return this.finishNode(s,t?"ObjectPattern":"ObjectExpression")};m.parseProperty=function(t,e){var s=this.startNode(),r,n,p,l;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis)){if(t){if(s.argument=this.parseIdent(!1),this.type===a.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(s,"RestElement")}if(s.argument=this.parseMaybeAssign(!1,e),this.type===a.comma&&e&&e.trailingComma<0)e.trailingComma=this.start;return this.finishNode(s,"SpreadElement")}if(this.options.ecmaVersion>=6){if(s.method=!1,s.shorthand=!1,t||e)p=this.start,l=this.startLoc;if(!t)r=this.eat(a.star)}var c=this.containsEsc;if(this.parsePropertyName(s),!t&&!c&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(s))n=!0,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(s);else n=!1;return this.parsePropertyValue(s,t,r,n,p,l,e,c),this.finishNode(s,"Property")};m.parseGetterSetter=function(t){var e=t.key.name;this.parsePropertyName(t),t.value=this.parseMethod(!1),t.kind=e;var s=t.kind==="get"?0:1;if(t.value.params.length!==s){var r=t.value.start;if(t.kind==="get")this.raiseRecoverable(r,"getter should have no params");else this.raiseRecoverable(r,"setter should have exactly one param")}else if(t.kind==="set"&&t.value.params[0].type==="RestElement")this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")};m.parsePropertyValue=function(t,e,s,r,n,p,l,c){if((s||r)&&this.type===a.colon)this.unexpected();if(this.eat(a.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,l),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===a.parenL){if(e)this.unexpected();t.method=!0,t.value=this.parseMethod(s,r),t.kind="init"}else if(!e&&!c&&this.options.ecmaVersion>=5&&!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&(this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq)){if(s||r)this.unexpected();this.parseGetterSetter(t)}else if(this.options.ecmaVersion>=6&&!t.computed&&t.key.type==="Identifier"){if(s||r)this.unexpected();if(this.checkUnreserved(t.key),t.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=n;if(e)t.value=this.parseMaybeDefault(n,p,this.copyNode(t.key));else if(this.type===a.eq&&l){if(l.shorthandAssign<0)l.shorthandAssign=this.start;t.value=this.parseMaybeDefault(n,p,this.copyNode(t.key))}else t.value=this.copyNode(t.key);t.kind="init",t.shorthand=!0}else this.unexpected()};m.parsePropertyName=function(t){if(this.options.ecmaVersion>=6)if(this.eat(a.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(a.bracketR),t.key;else t.computed=!1;return t.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};m.initFunction=function(t){if(t.id=null,this.options.ecmaVersion>=6)t.generator=t.expression=!1;if(this.options.ecmaVersion>=8)t.async=!1};m.parseMethod=function(t,e,s){var r=this.startNode(),n=this.yieldPos,p=this.awaitPos,l=this.awaitIdentPos;if(this.initFunction(r),this.options.ecmaVersion>=6)r.generator=t;if(this.options.ecmaVersion>=8)r.async=!!e;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xt(e,r.generator)|at|(s?_t:0)),this.expect(a.parenL),r.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=n,this.awaitPos=p,this.awaitIdentPos=l,this.finishNode(r,"FunctionExpression")};m.parseArrowExpression=function(t,e,s,r){var n=this.yieldPos,p=this.awaitPos,l=this.awaitIdentPos;if(this.enterScope(xt(s,!1)|vt),this.initFunction(t),this.options.ecmaVersion>=8)t.async=!!s;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1,r),this.yieldPos=n,this.awaitPos=p,this.awaitIdentPos=l,this.finishNode(t,"ArrowFunctionExpression")};m.parseFunctionBody=function(t,e,s,r){var n=e&&this.type!==a.braceL,p=this.strict,l=!1;if(n)t.body=this.parseMaybeAssign(r),t.expression=!0,this.checkParams(t,!1);else{var c=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);if(!p||c){if(l=this.strictDirective(this.end),l&&c)this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var u=this.labels;if(this.labels=[],l)this.strict=!0;if(this.checkParams(t,!p&&!l&&!e&&!s&&this.isSimpleParamList(t.params)),this.strict&&t.id)this.checkLValSimple(t.id,Ft);t.body=this.parseBlock(!1,void 0,l&&!p),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=u}this.exitScope()};m.isSimpleParamList=function(t){for(var e=0,s=t;e<s.length;e+=1){var r=s[e];if(r.type!=="Identifier")return!1}return!0};m.checkParams=function(t,e){var s=Object.create(null);for(var r=0,n=t.params;r<n.length;r+=1){var p=n[r];this.checkLValInnerPattern(p,yt,e?null:s)}};m.parseExprList=function(t,e,s,r){var n=[],p=!0;while(!this.eat(t)){if(!p){if(this.expect(a.comma),e&&this.afterTrailingComma(t))break}else p=!1;var l=void 0;if(s&&this.type===a.comma)l=null;else if(this.type===a.ellipsis){if(l=this.parseSpread(r),r&&this.type===a.comma&&r.trailingComma<0)r.trailingComma=this.start}else l=this.parseMaybeAssign(!1,r);n.push(l)}return n};m.checkUnreserved=function(t){var{start:e,end:s,name:r}=t;if(this.inGenerator&&r==="yield")this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&r==="await")this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&nt)&&r==="arguments")this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(r==="arguments"||r==="await"))this.raise(e,"Cannot use "+r+" in class static initialization block");if(this.keywords.test(r))this.raise(e,"Unexpected keyword '"+r+"'");if(this.options.ecmaVersion<6&&this.input.slice(e,s).indexOf("\\")!==-1)return;var n=this.strict?this.reservedWordsStrict:this.reservedWords;if(n.test(r)){if(!this.inAsync&&r==="await")this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(e,"The keyword '"+r+"' is reserved")}};m.parseIdent=function(t){var e=this.parseIdentNode();if(this.next(!!t),this.finishNode(e,"Identifier"),!t){if(this.checkUnreserved(e),e.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=e.start}return e};m.parseIdentNode=function(){var t=this.startNode();if(this.type===a.name)t.name=this.value;else if(this.type.keyword){if(t.name=this.type.keyword,(t.name==="class"||t.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=a.name}else this.unexpected();return t};m.parsePrivateIdent=function(){var t=this.startNode();if(this.type===a.privateId)t.name=this.value;else this.unexpected();if(this.next(),this.finishNode(t,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(t.start,"Private field '#"+t.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(t);return t};m.parseYield=function(t){if(!this.yieldPos)this.yieldPos=this.start;var e=this.startNode();if(this.next(),this.type===a.semi||this.canInsertSemicolon()||this.type!==a.star&&!this.type.startsExpr)e.delegate=!1,e.argument=null;else e.delegate=this.eat(a.star),e.argument=this.parseMaybeAssign(t);return this.finishNode(e,"YieldExpression")};m.parseAwait=function(t){if(!this.awaitPos)this.awaitPos=this.start;var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0,!1,t),this.finishNode(e,"AwaitExpression")};var it=i.prototype;it.raise=function(t,e){var s=Tt(this.input,t);if(e+=" ("+s.line+":"+s.column+")",this.sourceFile)e+=" in "+this.sourceFile;var r=SyntaxError(e);throw r.pos=t,r.loc=s,r.raisedAt=this.pos,r};it.raiseRecoverable=it.raise;it.curPosition=function(){if(this.options.locations)return new H(this.curLine,this.pos-this.lineStart)};var F=i.prototype,se=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};F.enterScope=function(t){this.scopeStack.push(new se(t))};F.exitScope=function(){this.scopeStack.pop()};F.treatFunctionsAsVarInScope=function(t){return t.flags&B||!this.inModule&&t.flags&O};F.declareName=function(t,e,s){var r=!1;if(e===V){var n=this.currentScope();if(r=n.lexical.indexOf(t)>-1||n.functions.indexOf(t)>-1||n.var.indexOf(t)>-1,n.lexical.push(t),this.inModule&&n.flags&O)delete this.undefinedExports[t]}else if(e===Vt){var p=this.currentScope();p.lexical.push(t)}else if(e===Rt){var l=this.currentScope();if(this.treatFunctionsAsVar)r=l.lexical.indexOf(t)>-1;else r=l.lexical.indexOf(t)>-1||l.var.indexOf(t)>-1;l.functions.push(t)}else for(var c=this.scopeStack.length-1;c>=0;--c){var u=this.scopeStack[c];if(u.lexical.indexOf(t)>-1&&!(u.flags&It&&u.lexical[0]===t)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(t)>-1){r=!0;break}if(u.var.push(t),this.inModule&&u.flags&O)delete this.undefinedExports[t];if(u.flags&nt)break}if(r)this.raiseRecoverable(s,"Identifier '"+t+"' has already been declared")};F.checkLocalExport=function(t){if(this.scopeStack[0].lexical.indexOf(t.name)===-1&&this.scopeStack[0].var.indexOf(t.name)===-1)this.undefinedExports[t.name]=t};F.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};F.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(nt|Q|M))return e}};F.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&(nt|Q|M)&&!(e.flags&vt))return e}};var ht=function(e,s,r){if(this.type="",this.start=s,this.end=0,e.options.locations)this.loc=new rt(e,r);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[s,0]},X=i.prototype;X.startNode=function(){return new ht(this,this.start,this.startLoc)};X.startNodeAt=function(t,e){return new ht(this,t,e)};function Mt(t,e,s,r){if(t.type=e,t.end=s,this.options.locations)t.loc.end=r;if(this.options.ranges)t.range[1]=s;return t}X.finishNode=function(t,e){return Mt.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)};X.finishNodeAt=function(t,e,s,r){return Mt.call(this,t,e,s,r)};X.copyNode=function(t){var e=new ht(this,t.start,this.startLoc);for(var s in t)e[s]=t[s];return e};var Dt=function(){};Dt.prototype.reset=function(){};i.prototype.validateRegExpFlags=function(){};i.prototype.validateRegExpPattern=function(){};var gt=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new rt(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},x=i.prototype;x.next=function(t){if(!t&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new gt(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};x.getToken=function(){return this.next(),new gt(this)};if(typeof Symbol<"u")x[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===a.eof,value:e}}}};x.nextToken=function(){var t=this.curContext();if(!t||!t.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(a.eof);if(t.override)return t.override(this);else this.readToken(this.fullCharCodeAtPos())};x.readToken=function(t){if(h(t,this.options.ecmaVersion>=6)||t===92)return this.readWord();return this.getTokenFromCode(t)};x.fullCharCodeAt=function(t){var e=this.input.charCodeAt(t);if(e<=55295||e>=56320)return e;var s=this.input.charCodeAt(t+1);return s<=56319||s>=57344?e:(e<<10)+s-56613888};x.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};x.skipBlockComment=function(){var t=this.options.onComment&&this.curPosition(),e=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(s===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=s+2,this.options.locations)for(var r=void 0,n=e;(r=At(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=r;if(this.options.onComment)this.options.onComment(!0,this.input.slice(e+2,s),e,this.pos,t,this.curPosition())};x.skipLineComment=function(t){var e=this.pos,s=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=t);while(this.pos<this.input.length&&!W(r))r=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,s,this.curPosition())};x.skipSpace=function(){t:while(this.pos<this.input.length){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(t>8&&t<14||t>=5760&&Nt.test(String.fromCharCode(t)))++this.pos;else break t}}};x.finishToken=function(t,e){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var s=this.type;this.type=t,this.value=e,this.updateContext(s)};x.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&t===46&&e===46)return this.pos+=3,this.finishToken(a.ellipsis);else return++this.pos,this.finishToken(a.dot)};x.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(t===61)return this.finishOp(a.assign,2);return this.finishOp(a.slash,1)};x.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),s=1,r=t===42?a.star:a.modulo;if(this.options.ecmaVersion>=7&&t===42&&e===42)++s,r=a.starstar,e=this.input.charCodeAt(this.pos+2);if(e===61)return this.finishOp(a.assign,s+1);return this.finishOp(r,s)};x.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(t===124?a.logicalOR:a.logicalAND,2)}if(e===61)return this.finishOp(a.assign,2);return this.finishOp(t===124?a.bitwiseOR:a.bitwiseAND,1)};x.readToken_caret=function(){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(a.assign,2);return this.finishOp(a.bitwiseXOR,1)};x.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(e===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(a.incDec,2)}if(e===61)return this.finishOp(a.assign,2);return this.finishOp(a.plusMin,1)};x.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),s=1;if(e===t){if(s=t===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+s)===61)return this.finishOp(a.assign,s+1);return this.finishOp(a.bitShift,s)}if(e===33&&t===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(e===61)s=2;return this.finishOp(a.relational,s)};x.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(t===61&&e===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(a.arrow);return this.finishOp(t===61?a.eq:a.prefix,1)};x.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(e===46){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(a.questionDot,2)}if(e===63){if(t>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};x.readToken_numberSign=function(){var t=this.options.ecmaVersion,e=35;if(t>=13){if(++this.pos,e=this.fullCharCodeAtPos(),h(e,!0)||e===92)return this.finishToken(a.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+st(e)+"'")};x.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(e===120||e===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(e===111||e===79)return this.readRadixNumber(8);if(e===98||e===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+st(t)+"'")};x.finishOp=function(t,e){var s=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,s)};x.readRegexp=function(){var t,e,s=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(s,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(E.test(r))this.raise(s,"Unterminated regular expression");if(!t){if(r==="[")e=!0;else if(r==="]"&&e)e=!1;else if(r==="/"&&!e)break;t=r==="\\"}else t=!1;++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var p=this.pos,l=this.readWord1();if(this.containsEsc)this.unexpected(p);var c=this.regexpState||(this.regexpState=new Dt(this));c.reset(s,n,l),this.validateRegExpFlags(c),this.validateRegExpPattern(c);var u=null;try{u=new RegExp(n,l)}catch(d){}return this.finishToken(a.regexp,{pattern:n,flags:l,value:u})};x.readInt=function(t,e,s){var r=this.options.ecmaVersion>=12&&e===void 0,n=s&&this.input.charCodeAt(this.pos)===48,p=this.pos,l=0,c=0;for(var u=0,d=e==null?1/0:e;u<d;++u,++this.pos){var v=this.input.charCodeAt(this.pos),k=void 0;if(r&&v===95){if(n)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(c===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(u===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");c=v;continue}if(v>=97)k=v-97+10;else if(v>=65)k=v-65+10;else if(v>=48&&v<=57)k=v-48;else k=1/0;if(k>=t)break;c=v,l=l*t+k}if(r&&c===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===p||e!=null&&this.pos-p!==e)return null;return l};function re(t,e){if(e)return parseInt(t,8);return parseFloat(t.replace(/_/g,""))}function Ut(t){if(typeof BigInt!=="function")return null;return BigInt(t.replace(/_/g,""))}x.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var s=this.readInt(t);if(s==null)this.raise(this.start+2,"Expected number in radix "+t);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)s=Ut(this.input.slice(e,this.pos)),++this.pos;else if(h(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(a.num,s)};x.readNumber=function(t){var e=this.pos;if(!t&&this.readInt(10,void 0,!0)===null)this.raise(e,"Invalid number");var s=this.pos-e>=2&&this.input.charCodeAt(e)===48;if(s&&this.strict)this.raise(e,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!s&&!t&&this.options.ecmaVersion>=11&&r===110){var n=Ut(this.input.slice(e,this.pos));if(++this.pos,h(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(a.num,n)}if(s&&/[89]/.test(this.input.slice(e,this.pos)))s=!1;if(r===46&&!s)++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos);if((r===69||r===101)&&!s){if(r=this.input.charCodeAt(++this.pos),r===43||r===45)++this.pos;if(this.readInt(10)===null)this.raise(e,"Invalid number")}if(h(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var p=re(this.input.slice(e,this.pos),s);return this.finishToken(a.num,p)};x.readCodePoint=function(){var t=this.input.charCodeAt(this.pos),e;if(t===123){if(this.options.ecmaVersion<6)this.unexpected();var s=++this.pos;if(e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111)this.invalidStringToken(s,"Code point out of bounds")}else e=this.readHexChar(4);return e};x.readString=function(t){var e="",s=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===t)break;if(r===92)e+=this.input.slice(s,this.pos),e+=this.readEscapedChar(!1),s=this.pos;else if(r===8232||r===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(W(r))this.raise(this.start,"Unterminated string constant");++this.pos}}return e+=this.input.slice(s,this.pos++),this.finishToken(a.string,e)};var qt={};x.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t===qt)this.readInvalidTemplateToken();else throw t}this.inTemplateElement=!1};x.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qt;else this.raise(t,e)};x.readTmplToken=function(){var t="",e=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(s===96||s===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate))if(s===36)return this.pos+=2,this.finishToken(a.dollarBraceL);else return++this.pos,this.finishToken(a.backQuote);return t+=this.input.slice(e,this.pos),this.finishToken(a.template,t)}if(s===92)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(W(s)){switch(t+=this.input.slice(e,this.pos),++this.pos,s){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:t+=`
6
+ `;break;default:t+=String.fromCharCode(s);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;e=this.pos}else++this.pos}};x.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
7
+ `)++this.pos;case`
8
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};x.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return`
9
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return st(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(t){var s=this.pos-1;this.invalidStringToken(s,"Invalid escape sequence in template string")}default:if(e>=48&&e<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);if(n>255)r=r.slice(0,-1),n=parseInt(r,8);if(this.pos+=r.length-1,e=this.input.charCodeAt(this.pos),(r!=="0"||e===56||e===57)&&(this.strict||t))this.invalidStringToken(this.pos-1-r.length,t?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(n)}if(W(e)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(e)}};x.readHexChar=function(t){var e=this.pos,s=this.readInt(16,t);if(s===null)this.invalidStringToken(e,"Bad character escape sequence");return s};x.readWord1=function(){this.containsEsc=!1;var t="",e=!0,s=this.pos,r=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var n=this.fullCharCodeAtPos();if(y(n,r))this.pos+=n<=65535?1:2;else if(n===92){this.containsEsc=!0,t+=this.input.slice(s,this.pos);var p=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var l=this.readCodePoint();if(!(e?h:y)(l,r))this.invalidStringToken(p,"Invalid Unicode escape");t+=st(l),s=this.pos}else break;e=!1}return t+this.input.slice(s,this.pos)};x.readWord=function(){var t=this.readWord1(),e=a.name;if(this.keywords.test(t))e=dt[t];return this.finishToken(e,t)};var ae="8.18.0";i.acorn={Parser:i,version:ae,defaultOptions:ct,Position:H,SourceLocation:rt,getLineInfo:Tt,Node:ht,TokenType:g,tokTypes:a,keywordTypes:dt,TokContext:R,tokContexts:w,isIdentifierChar:y,isIdentifierStart:h,Token:gt,isNewLine:W,lineBreak:E,lineBreakG:Ht,nonASCIIwhitespace:Nt};function I(t){return(e)=>t(e)}function K(...t){return i.extend(...t)}var Wt=new WeakMap;function o(t,e){if(t===void 0)return!1;if(t.length<16)return t.includes(e);let s=Wt.get(t);if(s===void 0||s.length>t.length)s={names:new Set,length:0},Wt.set(t,s);while(s.length<t.length)s.names.add(t[s.length++]);return s.names.has(e)}
10
+ export{h,y,i,I,K,o};
package/typescript.js CHANGED
@@ -1 +1 @@
1
- import"./shared-e8rqjefv.js";import"./shared-j2msb2xj.js";import"./shared-qc7kjfqj.js";import{o}from"./shared-d7yvtm6q.js";import{nt}from"./shared-tscn5fn7.js";var t=nt(o);export{t as typescript};
1
+ import"./shared-zd01zsyh.js";import"./shared-bxg3hhpk.js";import"./shared-e8c239q0.js";import"./shared-np5jnnrw.js";import{a}from"./shared-k7zadjsv.js";import{pt}from"./shared-wentwa9g.js";var t=pt(a);export{t as typescript};
package/walk.js CHANGED
@@ -1 +1 @@
1
- import{E,K,L,pt,ce,f,I}from"./shared-xj75g925.js";import{ct}from"./shared-23m65d6z.js";export{f as SKIP,ce as STOP,ct as createLocator,E as extractIdentifiers,K as isReference,pt as markupVisitorKeys,L as visitorKeys,I as walk};
1
+ import{w,G,R,mt,fe,d,O}from"./shared-1qapk0wt.js";import{yt}from"./shared-bxg3hhpk.js";export{d as SKIP,fe as STOP,yt as createLocator,w as extractIdentifiers,G as isReference,mt as markupVisitorKeys,R as visitorKeys,O as walk};
@@ -1,5 +0,0 @@
1
- var l="",c,s=0;function T(e){l=e,c=void 0,s=0}function f(e){let t=[0],n=e.indexOf(`
2
- `);while(n!==-1)t.push(n+1),n=e.indexOf(`
3
- `,n+1);return t}function a(e,t,n){let r=0,o=e.length-1;if(t>=e[n])r=n;else o=n-1;if(r<o&&t<e[r+1])o=r;while(r<o){let i=r+o+1>>>1;if(e[i]<=t)r=i;else o=i-1}return r}function p(e){return c??=f(l),s=a(c,e,s),{line:s+1,column:e-c[s],character:e}}function A(e){let{line:t,column:n}=p(e);return{line:t,column:n}}function lt(){return l.split(`
4
- `)}function ct(e){let t,n=0;return(r)=>(t??=f(e),n=a(t,r,n),{line:n+1,column:r-t[n]})}function u(e){return typeof e==="object"&&e!==null&&typeof k(e).type==="string"}function k(e){return e}function _(e,t){let n=k(e);for(let r in n){let o=n[r];if(Array.isArray(o)){for(let i=0;i<o.length;i++)if(u(o[i]))o[i]=t(o[i])}else if(u(o))n[r]=t(o)}}function P(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}
5
- export{T,p,A,lt,ct,u,k,_,P};
@@ -1,2 +0,0 @@
1
- var l=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function s(t){if(t===32||t<=13&&t>=9)return!0;if(t<160)return!1;return t===160||t===5760||t>=8192&&t<=8202||t===8232||t===8233||t===8239||t===8287||t===12288||t===65279}function i(t,e){let n=e;while(n<t.length&&s(t.charCodeAt(n)))n++;return n}function D(t){let e=t.indexOf("<");while(e!==-1){let n=t.charCodeAt(e+1);if(n===33||n===115){l.lastIndex=e;let r=l.exec(t);if(r){if(n===115)return r[2]==="ts";e=t.indexOf("<",l.lastIndex);continue}}e=t.indexOf("<",e+1)}return!1}var b=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function w(t){return b.has(t)||t.charCodeAt(0)===33&&t.toLowerCase()==="!doctype"}function B(t,e){let n=e;while(n<t.length){let r=t.charCodeAt(n);if(r===47&&t.charCodeAt(n+1)===42){let o=t.indexOf("*/",n+2);n=o===-1?t.length:o+2}else if(r===34||r===39){n++;while(n<t.length){let o=t.charCodeAt(n);if(o===r||o===10)break;n+=o===92?2:1}n++}else if(r===60&&t.startsWith("</style",n))break;else n++}return Math.min(n,t.length)}var u=34,c=39,h=47,p=61,d=62,a=(t)=>t===u||t===c;function v(t,e,n){let r=e;for(;r<t.length;r++){let o=t.charCodeAt(r);if(s(o)||o===h||o===d)break;if(n&&(a(o)||o===p))break}return r}function V(t,e){let n=t.charCodeAt(e);return s(n)||a(n)||n===p||n===60||n===d||n===96||n===h&&t.charCodeAt(e+1)===d}var f={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function q(t,e){return Object.hasOwn(f,t)&&f[t].includes(e)}
2
- export{q,s,i,D,w,B,a,v,V};
@@ -1,2 +0,0 @@
1
- import{b}from"./shared-j3kp940c.js";import{H,Z,ee,te}from"./shared-657pk0sg.js";import{he}from"./shared-a5mpxvcm.js";import{y}from"./shared-e15f58b0.js";import{o}from"./shared-d7yvtm6q.js";function u(t,r,a){let s=Z(t,r,a);return S(s),ee(s)}function S(t){let{source:r}=t,{tags:a,comments:s}=he(r),m=t.root.fragment.nodes,f=(e,p)=>{if(p<=e)return;let n=r.slice(e,p),d=n.includes("<")||n.includes("{")?n:b(n,!1,t.entityNames);m.push({type:"Text",start:e,end:p,raw:n,data:d})},i=0,c=0;for(let e of a){for(;c<s.length&&s[c]<e;c+=2){let p=s[c];if(p<i)continue;let n=s[c+1];f(i,p),m.push({type:"Comment",start:p,end:n,data:r.slice(p+4,n-3)}),i=n}if(e<i)continue;f(i,e),t.index=e,H(t);while(t.stack.length>1&&t.index<r.length)te(t);i=t.index}let l=m.filter((e)=>e.type==="SvelteOptions");m.length=0,m.push(...l)}var T={typescript:o,entityNames:y};function J(t,r){return u(t,r,T)}
2
- export{J};
@@ -1,3 +0,0 @@
1
- import{q,s,i,D,w,B,a,v,V}from"./shared-2ahdjk78.js";import{c,m}from"./shared-e8rqjefv.js";import{e,fe,de,me,ye,xe,ge,be,ve,Se,Te,re,Ae,ke,se,Ee,we,Ce,Ne,X,ne,_e,oe,Pe,Le,l,Ie,Re,Oe,$e,qe,De,Be,Ve,Me,ae,Fe,We,je,Ue,ze,Ke,Q,Ge,He,Xe,le,Qe,Ye,Je,Ze,n,et,tt,it,F,S,rt}from"./shared-j2msb2xj.js";import{b}from"./shared-j3kp940c.js";import{j}from"./shared-tscn5fn7.js";import{T,p,A,_,P}from"./shared-23m65d6z.js";var nn=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),ot=/\r(?!\n)|[\u2028\u2029]/;function J(t,r){let o=t.codePointAt(r);if(o===void 0||!c(o,!0))return r;let u=r+(o<=65535?1:2),d=t.codePointAt(u);while(d!==void 0&&m(d,!0))u+=d<=65535?1:2,d=t.codePointAt(u);return u}class tn{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(t,r,o,u={}){if(this.source=t,this.loc=u.loc??!1,this.lfOnly=this.loc&&!ot.test(t),this.isTypeScript=D(t),this.typescript=o.typescript,this.isTypeScript&&!this.typescript)j();this.entityNames=o.entityNames,this.css=u.css??!0,this.script=u.script??!0,this.comments=u.comments??!0,this.root={type:"Root",start:0,end:r,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(t){if(t.length===1)return this.source.charCodeAt(this.index)===t.charCodeAt(0);return this.source.startsWith(t,this.index)}matchRegex(t){return t.lastIndex=this.index,t.exec(this.source)?.[0]??null}eat(t,r=!1){if(this.match(t))return this.index+=t.length,!0;if(r)l(this.index,t);return!1}read(t){let r=this.matchRegex(t);if(r)this.index+=r.length;return r}readUntil(t){if(this.index>=this.source.length)n(this.source.length);let r=this.source.indexOf(t,this.index),o=r===-1?this.source.length:r,u=this.source.slice(this.index,o);return this.index=o,u}allowWhitespace(){this.index=i(this.source,this.index)}requireWhitespace(){if(!s(this.source.charCodeAt(this.index)))Ie(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(t,r){return this.loc?{start:p(t),end:p(r)}:void 0}readIdentifierName(){let t=this.index,r=J(this.source,t),o=this.source.slice(t,r);if(this.index=r,nn.has(o))et(t,o);let u={type:"Identifier",name:o,start:t,end:r};if(this.loc)u.loc=this.sourceLocation(t,r);return u}current(){return this.stack[this.stack.length-1]}append(t){this.fragments[this.fragments.length-1].nodes.push(t)}open(t,r){this.append(t),this.stack.push(t),this.fragments.push(r)}setFragment(t){this.fragments[this.fragments.length-1]=t}close(){this.stack.pop(),this.fragments.pop()}}var lt=["===","!==","==","!=","&&","||","??"];function rn(t,r,o,u){return{type:"Literal",start:r,end:o,value:u,raw:t.slice(r,o)}}function mn(t,r){let o=t.charCodeAt(r);if(o===34||o===39){for(let d=r+1;d<t.length;d++){let f=t.charCodeAt(d);if(f===o)return rn(t,r,d+1,t.slice(r+1,d));if(f===92||f===10||f===13)return null}return null}let u=r;for(;u<t.length;u++){let d=t.charCodeAt(u);if(d<48||d>57)break}if(u===r||o===48&&u-r>1)return null;return rn(t,r,u,Number(t.slice(r,u)))}function st(t,r){let o=J(t,r);if(o===r)return mn(t,r);let u=t.slice(r,o);if(u==="true"||u==="false"||u==="null")return rn(t,r,o,u==="null"?null:u==="true");if(nn.has(u))return null;let d={type:"Identifier",start:r,end:o,name:u};for(let f=o;;){let h=t.charCodeAt(f),y,x;if(h===46){if(x=J(t,f+1),x===f+1)return null;y={type:"Identifier",start:f+1,end:x,name:t.slice(f+1,x)}}else if(h===91){if(y=mn(t,f+1),!y||t.charCodeAt(y.end)!==93)return null;x=y.end+1}else return d;d={type:"MemberExpression",start:r,end:x,object:d,property:y,computed:h===91,optional:!1},f=x}}function on(t,r){if(t.charCodeAt(r)!==33||t.charCodeAt(r+1)===61)return st(t,r);let o=on(t,i(t,r+1));if(!o)return null;return{type:"UnaryExpression",start:r,end:o.end,operator:"!",prefix:!0,argument:o}}function hn(t,r){let o=i(t,r);if(o>=t.length)return!1;let u=t.charCodeAt(o);return u===125||u===41}function ct(t,r){let o=on(t,r);if(!o||hn(t,o.end))return o;let u=i(t,o.end),d=lt.find((y)=>t.startsWith(y,u));if(!d)return null;let f=on(t,i(t,u+d.length));if(!f||!hn(t,f.end))return null;let{end:h}=f;if(d==="&&"||d==="||"||d==="??")return{type:"LogicalExpression",start:o.start,end:h,left:o,operator:d,right:f};return{type:"BinaryExpression",start:o.start,end:h,left:o,operator:d,right:f}}function G(t){if(t.loc={start:A(t.start),end:A(t.end)},t.type==="MemberExpression")G(t.object),G(t.property);else if(t.type==="UnaryExpression")G(t.argument);else if(t.type==="BinaryExpression"||t.type==="LogicalExpression")G(t.left),G(t.right)}function k(t){let r=!t.loc||t.lfOnly?ct(t.source,t.index):null;if(r){if(t.index=r.end,t.loc)G(r);return r}let{node:o,end:u}=S(t,t.source,t.index);return t.index=u,o}var xn=/<\/script\s*>/g,at=new Set(["server","client","worker","test","default"]);function Sn(t,r,o){let{source:u,index:d}=t;if(d>=u.length)n(u.length);xn.lastIndex=d;let f=xn.exec(u);if(!f)X(u.length,"script");t.index=f.index+f[0].length;let h=t.script?F(t,u.slice(0,f.index),d):pt(d,f.index);if(h.start=d,h.loc)Object.assign(h.loc.start,A(r)),Object.assign(h.loc.end,A(t.index));else if(t.loc)h.loc={start:A(r),end:A(t.index)};let y="default";for(let x of o){if(at.has(x.name))De(x,x.name);if(x.name==="module"){if(x.value!==!0)$e(x,x.name);y="module"}if(x.name==="context"){let g=x.value;if(g===!0||!Array.isArray(g)||g.length!==1||g[0].type!=="Text"||g[0].data!=="module")qe(x);y="module"}}return{type:"Script",start:r,end:t.index,context:y,content:h,attributes:o}}function pt(t,r){return{type:"Program",start:t,end:r,body:[],sourceType:"module"}}var ut=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,dt=/\d+(\.\d+)?%/y,ft=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,mt=/\s*>/y,W=-1,Tn=34,ht=35,xt=36,St=38,En=39,gt=40,yt=41,pe=42,At=43,Tt=45,Et=46,Cn=47,ln=58,Ct=59,bt=60,gn=61,_t=62,vt=91,cn=92,wt=93,Pt=94,bn=123,sn=124,kt=125,_n=126,ie=[];function vn(t,r,o){let u=t.index;ie=[];let d=t.css?Nt(t):Rt(t),f=t.index;return t.eat("</style",!0),t.read(mt),{type:"StyleSheet",start:r,end:t.index,attributes:o,children:d,comments:ie,content:{start:u,end:f,styles:t.source.slice(u,f),comment:null}}}function Rt(t){return t.index=B(t.source,t.index),[]}function Nt(t){let r=[];for(;;){if(U(t,!0),t.match("</style")||t.index>=t.source.length)break;r.push(t.match("@")?wn(t):Pn(t))}return r}function wn(t){let r=t.index;t.eat("@",!0);let o=I(t),u=an(t,!0),d=null;if(t.match("{"))d=Nn(t);else t.eat(";",!0);return{type:"Atrule",start:r,end:t.index,name:o,prelude:u,block:d}}function Pn(t){let r=t.index;return{type:"Rule",prelude:kn(t,!1),block:Nn(t),start:r,end:t.index}}function kn(t,r){let o=[];U(t,!0);let u=t.index;while(t.index<t.source.length){o.push(Bt(t,r));let d=t.index;if(U(t,!0),t.match(r?")":"{"))return{type:"SelectorList",start:u,end:d,children:o};t.eat(",",!0),U(t,!0)}return n(t.source.length)}function yn(t,r){return{type:"RelativeSelector",combinator:t,selectors:[],start:r,end:-1}}function Bt(t,r){let{source:o,index:u}=t,d=[],f=yn(null,t.index);while(t.index<o.length){let h=t.index,y=o.charCodeAt(h),x=f.selectors;if(y===St)t.index++,x.push({type:"NestingSelector",name:"&",start:h,end:t.index});else if(y===pe)t.index++,x.push(An(t,h,"*"));else if(y===ht)t.index++,x.push({type:"IdSelector",name:I(t),start:h,end:t.index});else if(y===Et)t.index++,x.push({type:"ClassSelector",name:I(t),start:h,end:t.index});else if(y===ln){let R=o.charCodeAt(h+1)===ln;t.index+=R?2:1;let N=I(t),M=null;if(t.eat("("))M=kn(t,!0),t.eat(")",!0);if(R)x.push({type:"PseudoElementSelector",name:N,start:h,end:t.index,...M&&{args:M}});else x.push({type:"PseudoClassSelector",name:N,args:M,start:h,end:t.index})}else if(y===vt)t.index++,x.push(Ot(t,h));else{let R=r?t.read(ut):null,N=!R&&ce(y)?t.read(dt):null;if(R)x.push({type:"Nth",value:R,start:h,end:t.index});else if(N)x.push({type:"Percentage",value:N,start:h,end:t.index});else if(Rn(o,h)===0){let M=I(t);x.push(An(t,h,M))}}let g=t.index;U(t,!1);let E=t.match(",")||t.match(r?")":"{");if(t.index=g,E)return f.end=g,d.push(f),{type:"ComplexSelector",start:u,end:g,children:d};let C=Lt(t);if(C){if(f.selectors.length>0)f.end=g,d.push(f);if(f=yn(C,C.start),t.allowWhitespace(),t.match(",")||t.match(r?")":"{"))Ae(t.index)}}return n(o.length)}function An(t,r,o){let u=o,d;if(t.eat("|"))d=u,u=t.eat("*")?"*":I(t);return{type:"TypeSelector",name:u,...d!==void 0&&{namespace:d},start:r,end:t.index}}function Ot(t,r){let o=t.source;t.allowWhitespace();let u=I(t);t.allowWhitespace();let d=null,f=null,h=o.charCodeAt(t.index);if(h===gn)f="=";else if((h===_n||h===Pt||h===xt||h===pe||h===sn)&&o.charCodeAt(t.index+1)===gn)f=o.slice(t.index,t.index+2);if(f)t.index+=f.length,t.allowWhitespace(),d=It(t);t.allowWhitespace();let y=t.index;while(On(o.charCodeAt(t.index)))t.index++;let x=t.index>y?o.slice(y,t.index):null;return t.allowWhitespace(),t.eat("]",!0),{type:"AttributeSelector",start:r,end:t.index,name:u,matcher:f,value:d,flags:x}}function Rn(t,r){let o=t.charCodeAt(r);if(o===At||o===_n||o===_t)return 1;if(o===sn&&t.charCodeAt(r+1)===sn)return 2;return 0}function Lt(t){let r=t.index;t.allowWhitespace();let o=t.index,u=Rn(t.source,o);if(u>0){t.index+=u;let d=t.index;return t.allowWhitespace(),{type:"Combinator",name:t.source.slice(o,d),start:o,end:d}}if(t.index!==r)return{type:"Combinator",name:" ",start:r,end:t.index};return null}function Nn(t){let r=t.index;t.eat("{",!0);let o=[];while(t.index<t.source.length){if(U(t,!0),t.match("}"))break;o.push(Dt(t))}return t.eat("}",!0),{type:"Block",start:r,end:t.index,children:o}}function Dt(t){if(t.match("@"))return wn(t);let r=t.index;an(t,!1);let o=t.source.charCodeAt(t.index);return t.index=r,o===bn?Pn(t):Wt(t)}function Wt(t){let{source:r,index:o}=t;if(o>=r.length)n(r.length);let u=o;while(u<r.length){let x=r.charCodeAt(u);if(x===ln||s(x))break;u++}let d=r.slice(o,u);t.index=u,t.allowWhitespace(),t.eat(":");let f=t.index;t.allowWhitespace();let h=an(t,!0);if(!h&&!d.startsWith("--"))Te({start:o,end:f});let y=t.index;if(!t.match("}"))t.eat(";",!0);return{type:"Declaration",start:o,end:y,property:d,value:h}}function an(t,r){let o=t.source,u=o.length,d="",f=t.index,h=null,y=!1,x=!1,g=W,E=t.index;while(E<u){let C=o.charCodeAt(E);if(y){y=!1,E++;continue}if(C===cn){y=!0,E++;continue}if(C===g)g=W;else if(C===yt)x=!1;else if(g===W&&(C===Tn||C===En))g=C;else if(C===gt){if(Ft(o,d,f,E))x=!0}else if((C===Ct||C===bn||C===kt)&&!x&&g===W){if(t.index=E,!r)return"";if(d+=o.slice(f,E),h){let R=d.length-d.trimStart().length;for(let N of h)N.position=Math.max(0,(N.position??0)-R)}return d.trim()}else if(C===Cn&&!x&&g===W&&o.charCodeAt(E+1)===pe){d+=o.slice(f,E),t.index=E;let R=Bn(t);if(r)R.position=d.length,ie.push(R),h??=[],h.push(R);E=t.index,f=E;continue}E++}return t.index=u,n(u)}function Ft(t,r,o,u){if(u-o>=3)return t.charCodeAt(u-3)===117&&t.charCodeAt(u-2)===114&&t.charCodeAt(u-1)===108;return(r+t.slice(o,u)).endsWith("url")}function It(t){let r=t.source,o=W;if(t.eat('"'))o=Tn;else if(t.eat("'"))o=En;let u=t.index,d=!1,f=u;while(f<r.length){let h=r.charCodeAt(f);if(d)d=!1;else if(h===cn)d=!0;else if(o===W?h===wt||s(h):h===o)return t.index=o===W?f:f+1,r.slice(u,f).trim();f++}return t.index=f,n(r.length)}function I(t){let{source:r,index:o}=t,u=r.charCodeAt(o);if(ce(u)||u===Tt&&ce(r.charCodeAt(o+1)))re(o);let d="",f=o,h=o;while(h<r.length){let y=r.charCodeAt(h);if(y===cn){d+=r.slice(f,h),t.index=h;let x=t.matchRegex(ft);if(x){let g=String.fromCodePoint(Number.parseInt(x.slice(1),16));d+=g==="\\"?"\\\\":g,h+=x.length}else d+=`\\${r[h+1]}`,h+=2;f=h}else if(y>=160||Mt(y))h++;else break}if(d+=r.slice(f,h),t.index=h,d==="")re(o);return d}function U(t,r){let o=t.source;t.allowWhitespace();for(;;){let u=o.charCodeAt(t.index);if(u===Cn&&o.charCodeAt(t.index+1)===pe){let d=Bn(t);if(r)ie.push(d)}else if(u===bt&&t.eat("<!--"))t.readUntil("-->"),t.eat("-->",!0);else break;t.allowWhitespace()}}function Bn(t){let r=t.index;t.eat("/*",!0);let o=t.readUntil("*/");return t.eat("*/",!0),{type:"CSSComment",value:o,start:r,end:t.index}}function ce(t){return t>=48&&t<=57}function On(t){return t>=65&&t<=90||t>=97&&t<=122}function Mt(t){return On(t)||ce(t)||t===95||t===45}var pn=/<\/textarea(\s[^>]*)?>/iy,Gt=/^![a-zA-Z]+$/,qt=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Ut=/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u,un="\\u200C\\u200D",$t=new RegExp(`^(?:\\p{Lu}[$${un}\\p{ID_Continue}.]*|\\p{ID_Start}[$${un}\\p{ID_Continue}]*(?:\\.[$${un}\\p{ID_Continue}]+)+)$`,"u"),Vt=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),dn=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),Ln=[...dn.keys()],jt=`${Ln.slice(0,-1).join(", ")} or ${Ln.at(-1)}`,Ht=62,Dn=123;function ue(t,r){let o=t.index;if(o>=t.source.length)n(t.source.length);let u=v(t.source,o,r);return t.index=u,{name:t.source.slice(o,u),start:o,end:u,loc:t.sourceLocation(o,u)}}var K=(t,r,o,u=o)=>({start:t,end:r,type:"Text",raw:o,data:u});function Xt(t){let r=t.charCodeAt(0);if(r>=97&&r<=122&&!t.includes("."))return!1;return $t.test(t)}function zt(t){let r=!0;for(let o=0;o<t.length&&r;o++){let u=t.charCodeAt(o);r=u>=97&&u<=122||o>0&&u>=48&&u<=57}return r&&t.length>0||Gt.test(t)||qt.test(t)||Ut.test(t)}function Wn(t,r){for(let o=t.length-1;o>=0;o--){let u=r(t[o]);if(u!==void 0)return u}return!1}function Zt(t,r,o){let u=dn.get(r);if(u)return u[0];if(o)return"Component";if(r==="title"){if(Wn(t.stack,({type:f})=>{if(f==="SvelteHead")return!0;return f==="RegularElement"||f==="Component"?!1:void 0}))return"TitleElement"}if(r==="slot"){if(!Wn(t.stack,(f)=>f.type==="RegularElement"&&f.attributes.some((h)=>h.type==="Attribute"&&h.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function H(t){let r=t.index++;if(t.eat("!--")){let o=t.readUntil("-->");t.eat("-->",!0),t.append({type:"Comment",start:r,end:t.index,data:o})}else if(t.eat("/"))Kt(t,r);else Yt(t,r)}function Kt(t,r){let{name:o}=ue(t,!1);if(t.allowWhitespace(),t.eat(">",!0),w(o))it(r);let u=t.current();while(!("name"in u)||u.name!==o){if(u.type!=="RegularElement"){let d=t.lastAutoClosedTag;if(d?.tag===o)Ne(r,o,d.reason);Ce(r,o)}u.end=r,t.close(),u=t.current()}if(u.end=t.index,t.close(),t.stack.length<(t.lastAutoClosedTag?.depth??0))t.lastAutoClosedTag=void 0}function Qt(t,r,o){return{type:t,start:r,end:-1,name:o}}function Yt(t,r){let o=ue(t,!1),{name:u}=o,d=dn.get(u);if(!d&&u.startsWith("svelte:"))Ue(o,jt);let f=Xt(u);if(!f&&!zt(u))Je(o);if(d?.[1]){if(t.metaTags.has(u))Fe(r,u);if(t.current().type!=="Root")je(r,u);t.metaTags.add(u)}let h=Qt(Zt(t,u,f),r,u);if(t.loc)h.name_loc=o.loc;h.attributes=[],h.fragment={type:"Fragment",nodes:[]},t.allowWhitespace();let y=t.current();if(y.type==="RegularElement"&&q(y.name,u))y.end=r,t.close(),t.lastAutoClosedTag={tag:y.name,reason:u,depth:t.stack.length};if((u==="script"||u==="style")&&t.current().type==="Root"){let g=[];h.attributes=g,Gn(t,g,ir),er(t,h,r,g);return}if(Gn(t,h.attributes,lr),h.type==="SvelteComponent"){let g=Fn(h);if(!g)Me(r);if(!In(g.value))Ve(g.start);h.expression=Mn(g.value)}else if(h.type==="SvelteElement"){let g=Fn(h);if(!g)ae(r);if(g.value===!0)ae(g);h.tag=In(g.value)?Mn(g.value):rr(g.value[0])}if(!t.eat("/")&&!w(u))if(t.eat(">",!0),u==="textarea")h.fragment.nodes=Un(t,(g,E)=>(pn.lastIndex=E,pn.test(g)),"inside <textarea>"),t.read(pn);else if(u==="script"||u==="style")h.fragment.nodes.push(Jt(t,`</${u}>`));else{t.open(h,h.fragment);return}else t.eat(">",!0);h.end=t.index,t.append(h)}function Jt(t,r){let o=t.index,u=t.source.indexOf(r,o);t.index=u===-1?t.source.length:u;let d=K(o,t.index,t.source.slice(o,t.index));return t.eat(r,!0),d}function er(t,r,o,u){t.eat(">",!0);let d=nr(t.root.fragment.nodes,o);if(r.name==="style"){let y=vn(t,o,u);if(y.content.comment=d,t.root.css)Be(o);t.root.css=y;return}let f=Sn(t,o,u);if(d&&t.comments)f.content.leadingComments=[{type:"Line",value:d.data}];let h=f.context==="module"?"module":"instance";if(t.root[h])Oe(o);t.root[h]=f}function nr(t,r){let o=t.length-1;if(o<0||t[o].end!==r)return null;for(let u=o;u>=0;u--){let d=t[u];if(d.type==="Comment")return d;if(d.type!=="Text"||d.data.trim())return null}return null}var tr=(t)=>t.type==="Attribute"&&t.name==="this";function Fn(t){let r=t.attributes.find(tr);if(r)t.attributes.splice(t.attributes.indexOf(r),1);return r}function In(t){if(t===!0)return!1;if(!Array.isArray(t))return!0;return t.length===1&&t[0].type==="ExpressionTag"}function Mn(t){return(Array.isArray(t)?t[0]:t).expression}function rr(t){if(t.type!=="Text")return t.expression;return{type:"Literal",value:t.data,raw:`'${t.raw}'`,start:t.start,end:t.end}}function Gn(t,r,o){let u=new Set;for(;;){let d=o(t);if(!d)return;let{type:f}=d;if(f==="Attribute"||f==="BindDirective"||f==="StyleDirective"||f==="ClassDirective"){let h=`${f==="BindDirective"?"Attribute":f}${d.name}`;if(u.has(h))fe(d);if(d.name!=="this")u.add(h)}r.push(d),t.allowWhitespace()}}function fn(t,r,o,u,d){return t.loc?{type:"Attribute",start:o,end:u,name:r.name,name_loc:r.loc,value:d}:{type:"Attribute",start:o,end:u,name:r.name,value:d}}function qn(t){if(a(t.source.charCodeAt(t.index)))l(t.index,"=")}function ir(t){let r=t.index,o=ue(t,!0);if(!o.name)return null;let u=!0;if(t.eat("=")){t.allowWhitespace();let{source:d}=t,f=t.index,h=-1;if(a(d.charCodeAt(f))){let g=d.indexOf(d[f],f+1);if(g!==-1)h=g+1}if(h===-1){h=f;while(h<d.length&&d.charCodeAt(h)!==Ht&&!s(d.charCodeAt(h)))h++;if(h===f)ne(f)}t.index=h;let y=a(d.charCodeAt(f))?1:0,x=d.slice(f+y,h-y);u=[K(h-x.length-y,h-y,x,b(x,!0,t.entityNames))]}return qn(t),fn(t,o,r,t.index,u)}function or(t){let r=t.index,o=t.match("/*");if(!o&&!t.match("//"))return!1;t.index+=2;let u=t.readUntil(o?"*/":`
2
- `);if(o)t.eat("*/");let d={type:o?"Block":"Line",start:r,end:t.index,value:u},f=t.sourceLocation(r,t.index);if(f)d.loc=f;if(t.comments)t.root.comments.push(d);return!0}function lr(t){while(or(t))t.allowWhitespace();let r=t.index;if(t.eat("{"))return sr(t,r);let o=ue(t,!0);if(!o.name)return null;let u=t.index;t.allowWhitespace();let d=!0;if(t.eat("=")){if(t.allowWhitespace(),t.match("/>"))d=[K(t.index,t.index+1,"/")],t.index++;else d=pr(t);u=t.index}else qn(t);let f=o.name.indexOf(":"),h=f>0?Vt.get(o.name.slice(0,f)):void 0;return h?ar(t,h,o,f,r,u,d):fn(t,o,r,u,d)}function sr(t,r){if(t.allowWhitespace(),t.eat("@attach")){t.requireWhitespace();let d=k(t);return t.eatClosingBrace(),{type:"AttachTag",start:r,end:t.index,expression:d}}if(t.eat("...")){let d=k(t);return t.eatClosingBrace(),{type:"SpreadAttribute",start:r,end:t.index,expression:d}}let o=t.readIdentifierName();if(o.name==="")de(r);t.eatClosingBrace();let u={type:"ExpressionTag",start:o.start,end:o.end,expression:o};return fn(t,o,r,t.index,u)}function cr(t){if(t===!0)return;return Array.isArray(t)?t[0]:t}function ar(t,r,o,u,d,f,h){let[y,...x]=o.name.slice(u+1).split("|");if(y==="")we({start:d,end:d+u+1},o.name);let g={start:d,end:f,type:r,name:y};if(t.loc)g.name_loc=o.loc;if(r==="StyleDirective")return g.modifiers=x,g.value=h,g;let E=cr(h);if(E&&(Array.isArray(h)&&h.length>1||E.type==="Text"))Ee(E.start);if(g.expression=E?.expression??null,g.modifiers=x,r==="TransitionDirective"){let C=o.name.slice(0,u);g.intro=C!=="out",g.outro=C!=="in"}if((r==="BindDirective"||r==="ClassDirective")&&!g.expression)g.expression={start:d+u+1,end:f,type:"Identifier",name:y};return g}function pr(t){let r=t.source.charCodeAt(t.index),o=a(r);if(o){if(t.index++,t.source.charCodeAt(t.index)===r)return t.index++,[K(t.index-1,t.index-1,"")]}let u;try{u=Un(t,o?(d,f)=>d.charCodeAt(f)===r:V,"in attribute value",o?r:void 0)}catch(d){let f=d instanceof e?d.position?.[0]:void 0;if(d instanceof e&&d.code==="js_parse_error"&&f!==void 0&&t.source.startsWith("/>",f-1))t.index=f,l(f,o?String.fromCharCode(r):"}");throw d}if(o)t.index++;else if(u.length===0)ne(t.index);return o||u.length>1||u[0].type==="Text"?u:u[0]}function Un(t,r,o,u){let{source:d}=t,f=[],h=t.index,y=(x)=>{if(x<=h)return;let g=d.slice(h,x);f.push(K(h,x,g,b(g,!0,t.entityNames)))};while(t.index<d.length){let x=t.index;if(r(d,x))return y(x),f;if(d.charCodeAt(x)!==Dn){if(t.index++,u!==void 0)while(t.index<d.length&&d.charCodeAt(t.index)!==Dn&&d.charCodeAt(t.index)!==u)t.index++;continue}t.index++;let g=d.charCodeAt(t.index);if(g===35||g===64){t.index++;let C=t.index;while(t.index<d.length&&d.charCodeAt(t.index)>=97&&d.charCodeAt(t.index)<=122)t.index++;let R=d.slice(C,t.index);(g===35?ge:Ze)(x,R,o)}y(x),t.allowWhitespace();let E=k(t);t.eatClosingBrace(),f.push({type:"ExpressionTag",start:x,end:t.index,expression:E}),h=t.index}n(d.length)}var ur=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),dr=new Map([["type",(t,r)=>{if(r!=="String"&&r!=="Number"&&r!=="Boolean"&&r!=="Array"&&r!=="Object")return!1;return t.type=r,!0}],["reflect",(t,r)=>{if(typeof r!=="boolean")return!1;return t.reflect=r,!0}],["attribute",(t,r)=>{if(typeof r!=="string")return!1;return t.attribute=r,!0}]]),$n="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",fr=new RegExp(`^[a-z]${$n}*-${$n}*$`,"u"),mr=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),he=(t)=>(r,o)=>{let u=en(o);if(typeof u!=="boolean")Q(o,"true or false");r[t]=u},hr=new Map([["runes",he("runes")],["immutable",he("immutable")],["preserveWhitespace",he("preserveWhitespace")],["accessors",he("accessors")],["namespace",(t,r)=>{let o=ur.get(en(r));if(!o)Q(r,'"html", "mathml" or "svg"');t.namespace=o}],["css",(t,r)=>{if(en(r)!=="injected")Q(r,'"injected"');t.css="injected"}],["tag",(t,r)=>ze(r)],["customElement",(t,r)=>{let o=Sr(r);if(o)t.customElement=o}]]);function jn(t){let r=[],o={start:t.start,end:t.end,attributes:r};for(let u of t.attributes){if(u.type!=="Attribute")Ke(u);r.push(u);let d=hr.get(u.name);if(!d)Ye(u,u.name);d(o,u)}return o}function en({value:t}){if(t===!0)return!0;let r=Array.isArray(t)?t:[t];if(r.length===0)return!0;if(r.length>1)return null;let[o]=r;if(o.type==="Text")return o.data;return o.expression.type==="Literal"?o.expression.value:null}function Vn(t,r){if(typeof r!=="string")le(t);if(!r)return;if(!fr.test(r))le(t);if(mr.has(r))Qe(t)}function xr(t,r){let o=new Map;for(let u of t.properties){if(u.type!=="Property"||u.computed||u.key.type!=="Identifier")r();if(!o.has(u.key.name))o.set(u.key.name,u.value)}return o}function Sr(t){let r=()=>Ge(t);if(t.value===!0)r();let o=Array.isArray(t.value)?t.value[0]:t.value;if(o.type==="Text"){let E=en(t);return Vn(t,E),{tag:E}}let{expression:u}=o;if(u.type!=="ObjectExpression"){if(u.type==="Literal"&&u.value===null)return;r()}let d=xr(u,r),f={},h=d.get("tag");if(h){let E=h.type==="Literal"?h.value:void 0;Vn(null,E),f.tag=E}let y=d.get("props");if(y){let E=()=>He(t);if(y.type!=="ObjectExpression")E();f.props={};for(let C of y.properties){if(C.type!=="Property"||C.computed||C.key.type!=="Identifier"||C.value.type!=="ObjectExpression")E();let R={};f.props[C.key.name]=R;for(let N of C.value.properties){if(N.type!=="Property"||N.computed||N.key.type!=="Identifier"||N.value.type!=="Literal")E();if(!dr.get(N.key.name)?.(R,N.value.value))E()}}}let x=d.get("shadow");if(x)if(x.type==="ObjectExpression")f.shadow=x;else if(x.type==="Literal"&&(x.value==="open"||x.value==="none"))f.shadow=x.value;else Xe(t);let g=d.get("extend");if(g)f.extend=g;return f}var gr={"{":"}","(":")","[":"]"};function Y(t,r,o=gr){let u=Object.values(o),d=[],f=r;while(f<t.length){let h=t[f++];if(h==="'"||h==='"'||h==="`")f=yr(t,f,h);else if(Object.hasOwn(o,h))d.push(h);else if(u.includes(h)){let y=o[d.pop()??""];if(h!==y)l(f-1,y);if(d.length===0)return f}}n(t.length)}function yr(t,r,o){let u=r;while(u<t.length){let d=t[u++];if(d===o)return u;if(d==="\\")u++;else if(o==="`"&&d==="$"&&t[u]==="{")u=Y(t,u)}tt(r)}var Ar=/\?\s*:/g;function z(t){let r=t.index,o=t.readIdentifierName();if(o.name!==""){let y=Hn(t);return{...o,typeAnnotation:y}}let u=t.source[t.index];if(u!=="{"&&u!=="[")Pe(t.index);t.index=Y(t.source,r);let{node:d}=S(t,`${t.source.slice(0,t.index)} = 1`,r);P(d,"AssignmentExpression");let f=d.left;P(f,"ObjectPattern","ArrayPattern");let h=Hn(t);if(f.typeAnnotation=h,h)f.end=h.end;return f}function Hn(t){let r=t.index;if(t.allowWhitespace(),!t.eat(":")){t.index=r;return}let o="_ as ",u=t.index-o.length,d=t.source.slice(0,u)+o+t.source.slice(t.index).replace(Ar,":"),f=S(t,d,u).node;if(f.type==="AssignmentExpression"){let h=f.right.start;while(d[h]!=="=")h-=1;f=S(t,d.slice(0,h),u).node}if(f.type==="SequenceExpression")f=f.expressions[0];return P(f,"TSAsExpression"),t.index=f.end,{type:"TSTypeAnnotation",start:r,end:t.index,typeAnnotation:f.typeAnnotation}}var Tr=/\s*}/y,Er={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},L=()=>({type:"Fragment",nodes:[]});function zn(t,r){if(t.eat("if")){t.requireWhitespace();let o=k(t);t.eatClosingBrace();let u=L();t.open({type:"IfBlock",elseif:!1,start:r,end:-1,test:o,consequent:u,alternate:null},u)}else if(t.eat("each"))br(t,r);else if(t.eat("await")){t.requireWhitespace();let o=k(t);t.allowWhitespace();let u={type:"AwaitBlock",start:r,end:-1,expression:o,value:null,error:null,pending:null,then:null,catch:null},d=L();if(t.eat("then"))u.value=Xn(t),u.then=d;else if(t.eat("catch"))u.error=Xn(t),u.catch=d;else u.pending=d;t.eat("}",!0),t.open(u,d)}else if(t.eat("key")){t.requireWhitespace();let o=k(t);t.eatClosingBrace();let u=L();t.open({type:"KeyBlock",start:r,end:-1,expression:o,fragment:u},u)}else if(t.eat("snippet"))_r(t,r);else _e(t.index)}function Xn(t){if(t.matchRegex(Tr))return t.allowWhitespace(),null;t.requireWhitespace();let r=z(t);return t.allowWhitespace(),r}function Cr(t){let r={assertion:null},o=t.end,u=(f)=>{if(f.type==="TSAsExpression"&&f.end===t.end)return r.assertion=f,o=f.expression.end,f.expression;return _(f,u),f},d=t;if(t.type==="TSAsExpression")r.assertion=t,d=t.expression,o=d.end;else _(t,u);return d.end=o,{expression:d,assertion:r.assertion}}function br(t,r){t.requireWhitespace();let o=t.source,u;while(!u)try{u=k(t)}catch(x){let E=((x instanceof e?x.position:void 0)?.[0]??r)-2;while(E>r&&t.source.slice(E,E+2)!=="as")E-=1;if(E<=r)throw t.source=o,x;t.source=o.slice(0,E)}if(t.source=o,t.allowWhitespace(),!t.match("as")){if(u.type==="SequenceExpression")u=u.expressions[0];let x=Cr(u);if(u=x.expression,x.assertion){let g=x.assertion.typeAnnotation.start-2;while(t.source.slice(g,g+2)!=="as")g-=1;t.index=g}}let d=null,f,h;if(t.eat("as"))t.requireWhitespace(),d=z(t);else t.index=u.end;if(t.allowWhitespace(),t.eat(",")){if(t.allowWhitespace(),f=t.readIdentifierName().name,!f)oe(t.index);t.allowWhitespace()}if(t.eat("("))t.allowWhitespace(),h=k(t),t.allowWhitespace(),t.eat(")",!0),t.allowWhitespace();t.eat("}",!0);let y=L();t.open({type:"EachBlock",start:r,end:-1,expression:u,body:y,context:d,index:f,key:h},y)}function _r(t,r){t.requireWhitespace();let o=t.readIdentifierName();if(o.name==="")oe(t.index);t.allowWhitespace();let u=t.index,d;if(t.isTypeScript&&t.match("<")){let x=Y(t.source,u,{"<":">"});d=t.source.slice(u+1,x-1),t.index=x}t.allowWhitespace(),t.eat("(",!0);let f=1;while(t.index<t.source.length&&(!t.match(")")||f!==1)){if(t.match("("))f++;if(t.match(")"))f--;t.index+=1}t.eat(")",!0);let{node:h}=S(t,`${t.source.slice(0,t.index)} => {}`,u,!0);P(h,"ArrowFunctionExpression"),t.eatClosingBrace();let y=L();t.open({type:"SnippetBlock",start:r,end:-1,expression:o,typeParams:d,parameters:h.params,body:y},y)}function Zn(t,r){let o=t.index-1,u=t.current();if(u.type==="IfBlock"){if(!t.eat("else"))l(o,"{:else} or {:else if}");if(t.eat("if"))xe(o);if(t.allowWhitespace(),u.alternate=L(),t.setFragment(u.alternate),t.eat("if")){t.requireWhitespace();let d=k(t);t.eatClosingBrace();let f=L();t.open({start:r,end:-1,type:"IfBlock",elseif:!0,test:d,consequent:f,alternate:null},f)}else t.eatClosingBrace()}else if(u.type==="EachBlock"){if(!t.eat("else"))l(o,"{:else}");t.eatClosingBrace(),u.fallback=L(),t.setFragment(u.fallback)}else if(u.type==="AwaitBlock"){let d;if(t.eat("then"))d="then";else if(t.eat("catch"))d="catch";else l(o,"{:then ...} or {:catch ...}");if(u[d])me(o,`{:${d}}`);if(!t.eat("}")){t.requireWhitespace();let h=z(t);if(d==="then")u.value=h;else u.error=h;t.eatClosingBrace()}let f=L();u[d]=f,t.setFragment(f)}else ye(o)}function Kn(t){let r=t.current(),o=Er[r.type];if(!o)ve(t.index-1);t.eat(o,!0),t.eatClosingBrace();while(r.type==="IfBlock"&&r.elseif)r.end=t.index,t.close(),r=t.current();r.end=t.index,t.close()}var vr=/\s*}/y;function wr(t){return t.type==="CallExpression"||t.type==="ChainExpression"&&t.expression.type==="CallExpression"}function Qn(t,r){if(t.eat("html")){t.requireWhitespace();let o=k(t);t.eatClosingBrace(),t.append({type:"HtmlTag",start:r,end:t.index,expression:o})}else if(t.eat("debug")){let o=[];if(!t.read(vr)){let u=k(t),d=u.type==="SequenceExpression"?u.expressions:[u];for(let f of d){if(f.type!=="Identifier")ke(f.start);o.push(f)}t.eatClosingBrace()}t.append({type:"DebugTag",start:r,end:t.index,identifiers:o})}else if(t.eat("const")){t.requireWhitespace();let o=z(t);t.allowWhitespace(),t.eat("=",!0),t.allowWhitespace();let u=t.index,d=k(t),f=t.index;if(d.type==="SequenceExpression"&&!t.source.slice(u,d.start).includes("("))Se(d);t.eatClosingBrace();let h={type:"VariableDeclarator",id:o,init:d,start:o.start,end:f};t.append({type:"ConstTag",start:r,end:t.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[h],start:r+2,end:t.index-1}})}else if(t.eat("render")){t.requireWhitespace();let o=k(t);if(!wr(o))Re(o);t.eatClosingBrace(),t.append({type:"RenderTag",start:r,end:t.index,expression:o})}else Le(t.index)}var Pr=/(?:var|interface|enum)\b/y,kr=/(?:let|const|type)\b/y;function Yn(t){let r=t.index;if(t.index+=1,t.allowWhitespace(),t.eat("#"))zn(t,r);else if(t.eat(":"))Zn(t,r);else if(t.eat("@"))Qn(t,r);else if(t.match("/")&&!t.match("/*")&&!t.match("//"))t.index+=1,Kn(t);else if(!Rr(t,r)){let o=k(t);t.eatClosingBrace(),t.append({type:"ExpressionTag",start:r,end:t.index,expression:o})}}function Rr(t,r){let o=t.index,u=t.matchRegex(Pr);if(u)se({start:o,end:o+u.length});if(!t.matchRegex(kr))return!1;let d=t.root.comments.length,f=rt(t,t.source,o);if(f.type==="ExpressionStatement")return t.root.comments.length=d,!1;if(f.type!=="VariableDeclaration"||f.kind!=="let"&&f.kind!=="const")se(f);return t.index=f.end,t.eatClosingBrace(),t.append({type:"DeclarationTag",start:r,end:t.index,declaration:f}),!0}function nt(t){let{source:r,index:o}=t;if(t.nextAngle<o)t.nextAngle=Jn(r,"<",o);if(t.nextBrace<o)t.nextBrace=Jn(r,"{",o);let u=Math.min(t.nextAngle,t.nextBrace);t.index=u;let d=r.slice(o,u);t.append({type:"Text",start:o,end:u,raw:d,data:b(d,!1,t.entityNames)})}function Jn(t,r,o){let u=t.indexOf(r,o);return u===-1?t.length:u}function O(t,r,o){let u=Z(t,r,o);while(u.index<u.source.length)te(u);return ee(u)}function Z(t,r,o){let u=t.charCodeAt(0)===65279?t.slice(1):t;return T(u),new tn(u.trimEnd(),u.length,o,r)}function ee(t){if(t.stack.length>1){let d=t.current();if(d.end=d.start+1,d.type==="RegularElement")X(d,d.name);be(d)}let{nodes:r}=t.root.fragment,o=r.findIndex((d)=>d.type==="SvelteOptions"),u=r[o];if(u?.type==="SvelteOptions"){r.splice(o,1),t.root.options=jn(u);let{nodes:d}=u.fragment;if(d.length>0)We({start:d[0].start,end:d[d.length-1].end},u.name)}return t.root}function te(t){if(t.match("<"))H(t);else if(t.match("{"))Yn(t);else nt(t)}
3
- export{H,O,Z,ee,te};
@@ -1,2 +0,0 @@
1
- import{st}from"./shared-j2msb2xj.js";import{M}from"./shared-j60qxzy3.js";import{T}from"./shared-23m65d6z.js";function g(t,r,o){T(t);let e={isTypeScript:r.typescript??!1,typescript:o,loc:!1,comments:!1,root:{comments:[]}};return st(e,t,(s)=>M(t,r.localExports??!0,s))}
2
- export{g};
@@ -1,3 +0,0 @@
1
- import{q,s,i,D,w,B,a,v,V}from"./shared-2ahdjk78.js";import{C}from"./shared-j60qxzy3.js";var E="{",I=60,_=62,g=47,W=61,b=123,A=/<(?:script|style|svelte:options)(?![^\s/>])/g,S=/<\/script\s*>/g,O=/\s*>/y,T=/<\/textarea(\s[^>]*)?>/iy,y="</svelte:options";function G(t){let d=(t.charCodeAt(0)===65279?t.slice(1):t).trimEnd(),e={typescript:D(d),instance:null,module:null,css:null,options:null};return N(d,e,null),e}function he(t){let r={tags:[],comments:[]};return N(t,{typescript:!1,instance:null,module:null,css:null,options:null},r),r}function N(t,r,d){let e=R(t),o=[],n=0;while(n<=e){let l=t.charCodeAt(n);if(l===I)n=M(t,n,o,r,d);else if(l===b)n=X(t,n,o);else n++}}function R(t){let r=-1;A.lastIndex=0;for(let d=A.exec(t);d!==null;d=A.exec(t))r=d.index;return r}function L(t,r){return Math.min(C(t,r)+1,t.length)}function X(t,r,d){let e=i(t,r+1),o=t.charCodeAt(e),n=t.charCodeAt(e+1);if(o===35||o===58||o===64||o===g&&n!==g&&n!==42){e++;while(e<t.length){let l=t.charCodeAt(e);if(l<97||l>122)break;e++}if(o===35)d.push(E);else if(o===g){let l=d.lastIndexOf(E);if(l!==-1)d.length=l}}return L(t,e)}function M(t,r,d,e,o){if(t.startsWith("!--",r+1)){let c=t.indexOf("-->",r+4),x=c===-1?t.length:c+3;if(o&&d.length===0)o.comments.push(r,x);return x}if(t.charCodeAt(r+1)===g){let c=r+2,x=t.slice(c,v(t,c,!1)),p=d.lastIndexOf(x);if(p!==-1)d.length=p;return u(t,i(t,c+x.length))}let n=t.slice(r+1,v(t,r+1,!1)),l=i(t,r+1+n.length),m=d[d.length-1];if(m!==void 0&&q(m,n))d.pop();let f=d.length===0;if(o&&f&&(n==="script"||n==="style"||n==="svelte:options"))o.tags.push(r);if(f&&(n==="script"||n==="style")){let c=[];if(l=u(t,U(t,l,c)),n==="script"){let p=P(t,r,l,c);if(p.context==="module")e.module??=p;else e.instance??=p;return p.end}let x=Q(t,r,l,c);return e.css??=x,x.end}let h=f&&n==="svelte:options"?[]:null;if(l=H(t,l,h),t.charCodeAt(l)===g||w(n)){if(t.charCodeAt(l)===g)l++;l=u(t,l)}else{if(l=u(t,l),n==="textarea")return Y(t,l);if(n==="script"||n==="style"){let c=`</${n}>`,x=t.indexOf(c,l);return x===-1?t.length:x+c.length}if(h&&t.startsWith(y,l))l=u(t,i(t,l+y.length));else return d.push(n),l}if(h)e.options??={start:r,end:l,attributes:h};return l}function u(t,r){return t.charCodeAt(r)===_?r+1:r}function P(t,r,d,e){S.lastIndex=d;let o=S.exec(t),n=o?o.index:t.length,l=e.some((m)=>m.name==="module"||m.name==="context");return{start:r,end:o?o.index+o[0].length:t.length,context:l?"module":"default",attributes:e,content:{start:d,end:n}}}function Q(t,r,d,e){let o=B(t,d),n=o;if(t.startsWith("</style",n)){n+=7,O.lastIndex=n;let l=O.exec(t);if(l)n+=l[0].length}return{start:r,end:n,attributes:e,content:{start:d,end:o}}}function U(t,r,d){let e=r;for(;;){let o=e,n=v(t,e,!0);if(n===o)return e;e=n;let l=!0;if(t.charCodeAt(e)===W){let m=i(t,e+1),f=t.charCodeAt(m),h=-1;if(a(f)){let x=t.indexOf(t[m],m+1);if(x!==-1)h=x+1}if(h===-1){h=m;while(h<t.length&&t.charCodeAt(h)!==_&&!s(t.charCodeAt(h)))h++}let c=a(f)?1:0;l=t.slice(m+c,h-c),e=h}d.push({name:t.slice(o,n),value:l,start:o,end:e}),e=i(t,e)}}function H(t,r,d){let e=r;for(;;){for(;;){if(t.startsWith("/*",e)){let f=t.indexOf("*/",e+2);e=f===-1?t.length:f+2}else if(t.startsWith("//",e)){let f=t.indexOf(`
2
- `,e+2);e=f===-1?t.length:f}else break;e=i(t,e)}let o=e;if(t.charCodeAt(e)===b){e=i(t,L(t,e+1));continue}let n=v(t,e,!0);if(n===o)return e;let l=n,m=!0;if(e=i(t,n),t.charCodeAt(e)===W){let f=i(t,e+1);l=t.startsWith("/>",f)?f+1:K(t,f),m=a(t.charCodeAt(f))?t.slice(f+1,Math.max(f+1,l-1)):t.slice(f,l),e=i(t,l)}d?.push({name:t.slice(o,n),value:m,start:o,end:l})}}function K(t,r){let d=t.charCodeAt(r);if(a(d)){let o=r+1;while(o<t.length){let n=t.charCodeAt(o);if(n===d)return o+1;o=n===b?L(t,o+1):o+1}return t.length}let e=r;while(e<t.length&&!V(t,e))e=t.charCodeAt(e)===b?L(t,e+1):e+1;return e}function Y(t,r){let d=r;while(d<t.length){let e=t.charCodeAt(d);if(e===I){if(T.lastIndex=d,T.test(t))return T.lastIndex}d=e===b?L(t,d+1):d+1}return t.length}
3
- export{G,he};
@@ -1,2 +0,0 @@
1
- import{z}from"./shared-e8rqjefv.js";import{pe}from"./shared-j2msb2xj.js";import{R}from"./shared-qc7kjfqj.js";var o=z(R,pe);
2
- export{o};