@eslint-sukka/react 6.23.1 → 7.0.0

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.
package/dist/index.cjs CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";let e;var t,n,r,i,s,a,o,l,p,c,u,d,f,m,h,g,y,x,T,S,b,E,k,w,v,A,C,_,O,P,I,L,N,D,B,j,R,F,M,V,$,q,Y,X,J,U,W,K,H,G,z,Q,Z,ee,et,en,er,ei,es,ea,eo,el,ep,ec,eu,ed,ef,em,eh,eg,ey,ex,eT,eS,eb,eE,ek,ew,ev,eA,eC,e_,eO,eP,eI,eL,eN,eD,eB,ej,eR,eF,eM,eV,e$,eq,eY,eX,eJ,eU,eW,eK,eH,eG,ez,eQ,eZ,e0,e1,e2,e3,e6,e4,e5,e9,e8,e7,te,tt,tn,tr,ti,ts,ta,to,tl,tp,tc,tu,td,tf,tm,th,tg,ty,tx,tT,tS,tb,tE,tk,tw,tv,tA,tC,t_,tO,tP,tI,tL,tN,tD,tB,tj,tR,tF,tM,tV,t$,tq,tY,tX,tJ,tU,tW,tK,tH,tG,tz,tQ,tZ,t0,t1,t2,t3,t6,t4,t5,t9,t8,t7,ne,nt,nn,nr,ni,ns,na,no,nl,np,nc,nu,nd,nf,nm,nh,ng,ny,nx,nT,nS,nb,nE,nk,nw,nv,nA=require("@eslint-sukka/shared"),nC=require("@next/eslint-plugin-next"),n_=require("@eslint-sukka/eslint-plugin-react-jsx-a11y"),nO=require("eslint-plugin-react-hooks"),nP=require("eslint-plugin-react-compiler"),nI=require("eslint-plugin-react-refresh"),nL=require("@eslint-react/eslint-plugin"),nN=require("node:module"),nD=require("eslint-plugin-ssr-friendly"),nB=require("@eslint/compat"),nj=require("@stylexjs/eslint-plugin"),nR="undefined"!=typeof document?document.currentScript:null;function nF(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nM={exports:{}},nV={},n$=nM.exports,nq=nF(function(){if(n)return nM.exports;n=1;var e=n$&&n$.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};return Object.defineProperty(n$,"__esModule",{value:!0}),nM.exports={configs:{recommended:{plugins:["react-prefer-function-component"],rules:{"react-prefer-function-component/react-prefer-function-component":"error"}}},rules:{"react-prefer-function-component":e(function(){if(t)return nV;t=1;Object.defineProperty(nV,"__esModule",{value:!0}),nV.ALLOW_JSX_UTILITY_CLASS=nV.ALLOW_COMPONENT_DID_CATCH=nV.COMPONENT_SHOULD_BE_FUNCTION=void 0,nV.COMPONENT_SHOULD_BE_FUNCTION="componentShouldBeFunction",nV.ALLOW_COMPONENT_DID_CATCH="allowComponentDidCatch",nV.ALLOW_JSX_UTILITY_CLASS="allowJsxUtilityClass";let e={meta:{docs:{description:"Enforce components are written as function components",category:"Stylistic Issues",recommended:!1,url:"https://github.com/tatethurston/eslint-plugin-react-prefer-function-component#rule-details"},type:"problem",messages:{[nV.COMPONENT_SHOULD_BE_FUNCTION]:"Class component should be written as a function"},schema:[{type:"object",properties:{[nV.ALLOW_COMPONENT_DID_CATCH]:{default:!0,type:"boolean"},[nV.ALLOW_JSX_UTILITY_CLASS]:{default:!1,type:"boolean"}},additionalProperties:!1}]},create(e){var t,n,r;let i=null!=(t=e.options[0])?t:{},s=null==(n=i.allowComponentDidCatch)||n,a=null!=(r=i.allowJsxUtilityClass)&&r,o=new Set;function l(e){e.body.body.some(e=>{if("key"in e&&"name"in e.key)return"componentDidCatch"===e.key.name})&&s||o.add(e)}function p(e){a||l(e)}return{"ClassDeclaration:has(JSXElement)":p,"ClassDeclaration:has(JSXFragment)":p,"ClassExpression:has(JSXElement)":p,"ClassExpression:has(JSXFragment)":p,"ClassDeclaration:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassDeclaration[superClass.name='Component']":l,"ClassDeclaration[superClass.name='PureComponent']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassExpression[superClass.name='Component']":l,"ClassExpression[superClass.name='PureComponent']":l,"Program:exit":function(){o.forEach(t=>{var n;switch(t.type){case"ClassDeclaration":case"ClassExpression":return e.report({node:null!=(n=t.id)?n:t,messageId:nV.COMPONENT_SHOULD_BE_FUNCTION})}})}}}};return nV.default=e,nV}()).default}},nM.exports}()),nY=Object.create,nX=Object.defineProperty,nJ=Object.getOwnPropertyDescriptor,nU=Object.getOwnPropertyNames,nW=Object.getPrototypeOf,nK=Object.prototype.hasOwnProperty,nH=(e,t)=>()=>(e&&(t=e(e=0)),t),nG=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nz=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,s=nU(t),a=0,o=s.length;a<o;a++)i=s[a],nK.call(e,i)||i===n||nX(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=nJ(t,i))||r.enumerable});return e},nQ=(e,t,n)=>nz(nX(null!=e?nY(nW(e)):{},"default",{value:e,enumerable:!0}),e),nZ=nN.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:nR&&"SCRIPT"===nR.tagName.toUpperCase()&&nR.src||new URL("index.cjs",document.baseURI).href),n0=nG(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.isParenthesized=e.hasSideEffect=e.getStringIfConstant=e.getStaticValue=e.getPropertyName=e.getFunctionNameWithKind=e.getFunctionHeadLocation=void 0;let s=i(nZ("@eslint-community/eslint-utils"));e.getFunctionHeadLocation=s.getFunctionHeadLocation,e.getFunctionNameWithKind=s.getFunctionNameWithKind,e.getPropertyName=s.getPropertyName,e.getStaticValue=s.getStaticValue,e.getStringIfConstant=s.getStringIfConstant,e.hasSideEffect=s.hasSideEffect,e.isParenthesized=s.isParenthesized}),n1=nG(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.PatternMatcher=void 0,e.PatternMatcher=i(nZ("@eslint-community/eslint-utils")).PatternMatcher}),n2=nG(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.isNotSemicolonToken=e.isSemicolonToken=e.isNotOpeningParenToken=e.isOpeningParenToken=e.isNotOpeningBracketToken=e.isOpeningBracketToken=e.isNotOpeningBraceToken=e.isOpeningBraceToken=e.isNotCommentToken=e.isCommentToken=e.isNotCommaToken=e.isCommaToken=e.isNotColonToken=e.isColonToken=e.isNotClosingParenToken=e.isClosingParenToken=e.isNotClosingBracketToken=e.isClosingBracketToken=e.isNotClosingBraceToken=e.isClosingBraceToken=e.isNotArrowToken=e.isArrowToken=void 0;let s=i(nZ("@eslint-community/eslint-utils"));e.isArrowToken=s.isArrowToken,e.isNotArrowToken=s.isNotArrowToken,e.isClosingBraceToken=s.isClosingBraceToken,e.isNotClosingBraceToken=s.isNotClosingBraceToken,e.isClosingBracketToken=s.isClosingBracketToken,e.isNotClosingBracketToken=s.isNotClosingBracketToken,e.isClosingParenToken=s.isClosingParenToken,e.isNotClosingParenToken=s.isNotClosingParenToken,e.isColonToken=s.isColonToken,e.isNotColonToken=s.isNotColonToken,e.isCommaToken=s.isCommaToken,e.isNotCommaToken=s.isNotCommaToken,e.isCommentToken=s.isCommentToken,e.isNotCommentToken=s.isNotCommentToken,e.isOpeningBraceToken=s.isOpeningBraceToken,e.isNotOpeningBraceToken=s.isNotOpeningBraceToken,e.isOpeningBracketToken=s.isOpeningBracketToken,e.isNotOpeningBracketToken=s.isNotOpeningBracketToken,e.isOpeningParenToken=s.isOpeningParenToken,e.isNotOpeningParenToken=s.isNotOpeningParenToken,e.isSemicolonToken=s.isSemicolonToken,e.isNotSemicolonToken=s.isNotSemicolonToken}),n3=nG(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceTracker=void 0;let s=i(nZ("@eslint-community/eslint-utils"));s.ReferenceTracker.READ,s.ReferenceTracker.CALL,s.ReferenceTracker.CONSTRUCT,s.ReferenceTracker.ESM,e.ReferenceTracker=s.ReferenceTracker}),n6=nG(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.getInnermostScope=e.findVariable=void 0;let s=i(nZ("@eslint-community/eslint-utils"));e.findVariable=s.findVariable,e.getInnermostScope=s.getInnermostScope}),n4=nG(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(n0(),e),n(n1(),e),n(n2(),e),n(n3(),e),n(n6(),e)}),n5=nG(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNotTokenOfTypeWithConditions=e.isTokenOfTypeWithConditions=e.isNodeOfTypeWithConditions=e.isNodeOfTypes=e.isNodeOfType=void 0,e.isNodeOfType=e=>t=>t?.type===e,e.isNodeOfTypes=e=>t=>!!t&&e.includes(t.type),e.isNodeOfTypeWithConditions=(e,t)=>{let n=Object.entries(t);return t=>t?.type===e&&n.every(([e,n])=>t[e]===n)},e.isTokenOfTypeWithConditions=(e,t)=>{let n=Object.entries(t);return t=>t?.type===e&&n.every(([e,n])=>t[e]===n)},e.isNotTokenOfTypeWithConditions=(t,n)=>r=>!(0,e.isTokenOfTypeWithConditions)(t,n)(r)}),n9=nG(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LINEBREAK_MATCHER=void 0,e.isTokenOnSameLine=function(e,t){return e.loc.end.line===t.loc.start.line},e.LINEBREAK_MATCHER=/\r\n|[\r\n\u2028\u2029]/}),n8=nG(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TSESTree=e.AST_TOKEN_TYPES=e.AST_NODE_TYPES=void 0;var t=nZ("@typescript-eslint/types");Object.defineProperty(e,"AST_NODE_TYPES",{enumerable:!0,get:function(){return t.AST_NODE_TYPES}}),Object.defineProperty(e,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return t.AST_TOKEN_TYPES}}),Object.defineProperty(e,"TSESTree",{enumerable:!0,get:function(){return t.TSESTree}})}),n7=nG(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isLoop=e.isImportKeyword=e.isTypeKeyword=e.isAwaitKeyword=e.isAwaitExpression=e.isIdentifier=e.isConstructor=e.isClassOrTypeElement=e.isTSConstructorType=e.isTSFunctionType=e.isFunctionOrFunctionType=e.isFunctionType=e.isFunction=e.isVariableDeclarator=e.isTypeAssertion=e.isLogicalOrOperator=e.isOptionalCallExpression=e.isNotNonNullAssertionPunctuator=e.isNonNullAssertionPunctuator=e.isNotOptionalChainPunctuator=e.isOptionalChainPunctuator=void 0,e.isSetter=function(e){return!!e&&(e.type===t.AST_NODE_TYPES.MethodDefinition||e.type===t.AST_NODE_TYPES.Property)&&"set"===e.kind};let t=n8(),n=n5();e.isOptionalChainPunctuator=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"?."}),e.isNotOptionalChainPunctuator=(0,n.isNotTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"?."}),e.isNonNullAssertionPunctuator=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"!"}),e.isNotNonNullAssertionPunctuator=(0,n.isNotTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"!"}),e.isOptionalCallExpression=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.CallExpression,{optional:!0}),e.isLogicalOrOperator=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.LogicalExpression,{operator:"||"}),e.isTypeAssertion=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.TSAsExpression,t.AST_NODE_TYPES.TSTypeAssertion]),e.isVariableDeclarator=(0,n.isNodeOfType)(t.AST_NODE_TYPES.VariableDeclarator);let r=[t.AST_NODE_TYPES.ArrowFunctionExpression,t.AST_NODE_TYPES.FunctionDeclaration,t.AST_NODE_TYPES.FunctionExpression];e.isFunction=(0,n.isNodeOfTypes)(r);let i=[t.AST_NODE_TYPES.TSCallSignatureDeclaration,t.AST_NODE_TYPES.TSConstructorType,t.AST_NODE_TYPES.TSConstructSignatureDeclaration,t.AST_NODE_TYPES.TSDeclareFunction,t.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,t.AST_NODE_TYPES.TSFunctionType,t.AST_NODE_TYPES.TSMethodSignature];e.isFunctionType=(0,n.isNodeOfTypes)(i),e.isFunctionOrFunctionType=(0,n.isNodeOfTypes)([...r,...i]),e.isTSFunctionType=(0,n.isNodeOfType)(t.AST_NODE_TYPES.TSFunctionType),e.isTSConstructorType=(0,n.isNodeOfType)(t.AST_NODE_TYPES.TSConstructorType),e.isClassOrTypeElement=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.PropertyDefinition,t.AST_NODE_TYPES.FunctionExpression,t.AST_NODE_TYPES.MethodDefinition,t.AST_NODE_TYPES.TSAbstractPropertyDefinition,t.AST_NODE_TYPES.TSAbstractMethodDefinition,t.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,t.AST_NODE_TYPES.TSIndexSignature,t.AST_NODE_TYPES.TSCallSignatureDeclaration,t.AST_NODE_TYPES.TSConstructSignatureDeclaration,t.AST_NODE_TYPES.TSMethodSignature,t.AST_NODE_TYPES.TSPropertySignature]),e.isConstructor=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.MethodDefinition,{kind:"constructor"}),e.isIdentifier=(0,n.isNodeOfType)(t.AST_NODE_TYPES.Identifier),e.isAwaitExpression=(0,n.isNodeOfType)(t.AST_NODE_TYPES.AwaitExpression),e.isAwaitKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Identifier,{value:"await"}),e.isTypeKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Identifier,{value:"type"}),e.isImportKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Keyword,{value:"import"}),e.isLoop=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.DoWhileStatement,t.AST_NODE_TYPES.ForStatement,t.AST_NODE_TYPES.ForInStatement,t.AST_NODE_TYPES.ForOfStatement,t.AST_NODE_TYPES.WhileStatement])}),re=nG(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(n4(),e),n(n5(),e),n(n9(),e),n(n7(),e)}),rt={},rn={};function rr(){var e,t,n,i;return r?rn:(r=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.AST_TOKEN_TYPES=rn.AST_NODE_TYPES=void 0,(n=e||(rn.AST_NODE_TYPES=e={})).AccessorProperty="AccessorProperty",n.ArrayExpression="ArrayExpression",n.ArrayPattern="ArrayPattern",n.ArrowFunctionExpression="ArrowFunctionExpression",n.AssignmentExpression="AssignmentExpression",n.AssignmentPattern="AssignmentPattern",n.AwaitExpression="AwaitExpression",n.BinaryExpression="BinaryExpression",n.BlockStatement="BlockStatement",n.BreakStatement="BreakStatement",n.CallExpression="CallExpression",n.CatchClause="CatchClause",n.ChainExpression="ChainExpression",n.ClassBody="ClassBody",n.ClassDeclaration="ClassDeclaration",n.ClassExpression="ClassExpression",n.ConditionalExpression="ConditionalExpression",n.ContinueStatement="ContinueStatement",n.DebuggerStatement="DebuggerStatement",n.Decorator="Decorator",n.DoWhileStatement="DoWhileStatement",n.EmptyStatement="EmptyStatement",n.ExportAllDeclaration="ExportAllDeclaration",n.ExportDefaultDeclaration="ExportDefaultDeclaration",n.ExportNamedDeclaration="ExportNamedDeclaration",n.ExportSpecifier="ExportSpecifier",n.ExpressionStatement="ExpressionStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Identifier="Identifier",n.IfStatement="IfStatement",n.ImportAttribute="ImportAttribute",n.ImportDeclaration="ImportDeclaration",n.ImportDefaultSpecifier="ImportDefaultSpecifier",n.ImportExpression="ImportExpression",n.ImportNamespaceSpecifier="ImportNamespaceSpecifier",n.ImportSpecifier="ImportSpecifier",n.JSXAttribute="JSXAttribute",n.JSXClosingElement="JSXClosingElement",n.JSXClosingFragment="JSXClosingFragment",n.JSXElement="JSXElement",n.JSXEmptyExpression="JSXEmptyExpression",n.JSXExpressionContainer="JSXExpressionContainer",n.JSXFragment="JSXFragment",n.JSXIdentifier="JSXIdentifier",n.JSXMemberExpression="JSXMemberExpression",n.JSXNamespacedName="JSXNamespacedName",n.JSXOpeningElement="JSXOpeningElement",n.JSXOpeningFragment="JSXOpeningFragment",n.JSXSpreadAttribute="JSXSpreadAttribute",n.JSXSpreadChild="JSXSpreadChild",n.JSXText="JSXText",n.LabeledStatement="LabeledStatement",n.Literal="Literal",n.LogicalExpression="LogicalExpression",n.MemberExpression="MemberExpression",n.MetaProperty="MetaProperty",n.MethodDefinition="MethodDefinition",n.NewExpression="NewExpression",n.ObjectExpression="ObjectExpression",n.ObjectPattern="ObjectPattern",n.PrivateIdentifier="PrivateIdentifier",n.Program="Program",n.Property="Property",n.PropertyDefinition="PropertyDefinition",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.StaticBlock="StaticBlock",n.Super="Super",n.SwitchCase="SwitchCase",n.SwitchStatement="SwitchStatement",n.TaggedTemplateExpression="TaggedTemplateExpression",n.TemplateElement="TemplateElement",n.TemplateLiteral="TemplateLiteral",n.ThisExpression="ThisExpression",n.ThrowStatement="ThrowStatement",n.TryStatement="TryStatement",n.UnaryExpression="UnaryExpression",n.UpdateExpression="UpdateExpression",n.VariableDeclaration="VariableDeclaration",n.VariableDeclarator="VariableDeclarator",n.WhileStatement="WhileStatement",n.WithStatement="WithStatement",n.YieldExpression="YieldExpression",n.TSAbstractAccessorProperty="TSAbstractAccessorProperty",n.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",n.TSAnyKeyword="TSAnyKeyword",n.TSArrayType="TSArrayType",n.TSAsExpression="TSAsExpression",n.TSAsyncKeyword="TSAsyncKeyword",n.TSBigIntKeyword="TSBigIntKeyword",n.TSBooleanKeyword="TSBooleanKeyword",n.TSCallSignatureDeclaration="TSCallSignatureDeclaration",n.TSClassImplements="TSClassImplements",n.TSConditionalType="TSConditionalType",n.TSConstructorType="TSConstructorType",n.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",n.TSDeclareFunction="TSDeclareFunction",n.TSDeclareKeyword="TSDeclareKeyword",n.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",n.TSEnumBody="TSEnumBody",n.TSEnumDeclaration="TSEnumDeclaration",n.TSEnumMember="TSEnumMember",n.TSExportAssignment="TSExportAssignment",n.TSExportKeyword="TSExportKeyword",n.TSExternalModuleReference="TSExternalModuleReference",n.TSFunctionType="TSFunctionType",n.TSImportEqualsDeclaration="TSImportEqualsDeclaration",n.TSImportType="TSImportType",n.TSIndexedAccessType="TSIndexedAccessType",n.TSIndexSignature="TSIndexSignature",n.TSInferType="TSInferType",n.TSInstantiationExpression="TSInstantiationExpression",n.TSInterfaceBody="TSInterfaceBody",n.TSInterfaceDeclaration="TSInterfaceDeclaration",n.TSInterfaceHeritage="TSInterfaceHeritage",n.TSIntersectionType="TSIntersectionType",n.TSIntrinsicKeyword="TSIntrinsicKeyword",n.TSLiteralType="TSLiteralType",n.TSMappedType="TSMappedType",n.TSMethodSignature="TSMethodSignature",n.TSModuleBlock="TSModuleBlock",n.TSModuleDeclaration="TSModuleDeclaration",n.TSNamedTupleMember="TSNamedTupleMember",n.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",n.TSNeverKeyword="TSNeverKeyword",n.TSNonNullExpression="TSNonNullExpression",n.TSNullKeyword="TSNullKeyword",n.TSNumberKeyword="TSNumberKeyword",n.TSObjectKeyword="TSObjectKeyword",n.TSOptionalType="TSOptionalType",n.TSParameterProperty="TSParameterProperty",n.TSPrivateKeyword="TSPrivateKeyword",n.TSPropertySignature="TSPropertySignature",n.TSProtectedKeyword="TSProtectedKeyword",n.TSPublicKeyword="TSPublicKeyword",n.TSQualifiedName="TSQualifiedName",n.TSReadonlyKeyword="TSReadonlyKeyword",n.TSRestType="TSRestType",n.TSSatisfiesExpression="TSSatisfiesExpression",n.TSStaticKeyword="TSStaticKeyword",n.TSStringKeyword="TSStringKeyword",n.TSSymbolKeyword="TSSymbolKeyword",n.TSTemplateLiteralType="TSTemplateLiteralType",n.TSThisType="TSThisType",n.TSTupleType="TSTupleType",n.TSTypeAliasDeclaration="TSTypeAliasDeclaration",n.TSTypeAnnotation="TSTypeAnnotation",n.TSTypeAssertion="TSTypeAssertion",n.TSTypeLiteral="TSTypeLiteral",n.TSTypeOperator="TSTypeOperator",n.TSTypeParameter="TSTypeParameter",n.TSTypeParameterDeclaration="TSTypeParameterDeclaration",n.TSTypeParameterInstantiation="TSTypeParameterInstantiation",n.TSTypePredicate="TSTypePredicate",n.TSTypeQuery="TSTypeQuery",n.TSTypeReference="TSTypeReference",n.TSUndefinedKeyword="TSUndefinedKeyword",n.TSUnionType="TSUnionType",n.TSUnknownKeyword="TSUnknownKeyword",n.TSVoidKeyword="TSVoidKeyword",(i=t||(rn.AST_TOKEN_TYPES=t={})).Boolean="Boolean",i.Identifier="Identifier",i.JSXIdentifier="JSXIdentifier",i.PrivateIdentifier="PrivateIdentifier",i.JSXText="JSXText",i.Keyword="Keyword",i.Null="Null",i.Numeric="Numeric",i.Punctuator="Punctuator",i.RegularExpression="RegularExpression",i.String="String",i.Template="Template",i.Block="Block",i.Line="Line",rn)}var ri={},rs={},ra={},ro=function(){var e,t,n;return o?rt:(o=1,e=rt&&rt.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=rt&&rt.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)},Object.defineProperty(rt,"__esModule",{value:!0}),rt.AST_TOKEN_TYPES=rt.AST_NODE_TYPES=void 0,n=rr(),Object.defineProperty(rt,"AST_NODE_TYPES",{enumerable:!0,get:function(){return n.AST_NODE_TYPES}}),Object.defineProperty(rt,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return n.AST_TOKEN_TYPES}}),t((i||(i=1,Object.defineProperty(ri,"__esModule",{value:!0})),ri),rt),t((s||(s=1,Object.defineProperty(rs,"__esModule",{value:!0})),rs),rt),t(function(){if(a)return ra;a=1;var e,t=ra&&ra.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=ra&&ra.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ra&&ra.__importStar||(e=function(t){return(e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(t)},function(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var s=e(r),a=0;a<s.length;a++)"default"!==s[a]&&t(i,r,s[a]);return n(i,r),i});return Object.defineProperty(ra,"__esModule",{value:!0}),ra.TSESTree=void 0,ra.TSESTree=r(rr()),ra}(),rt),rt)}();const rl={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};for(const e of Object.keys(rl))Object.freeze(rl[e]);Object.freeze(rl);var rp=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],rc=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ru="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",rd={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"},rf="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",rm={5:rf,"5module":rf+" export import",6:rf+" const class extends export import super"},rh=/^in(stanceof)?$/,rg=RegExp("["+ru+"]"),ry=RegExp("["+ru+"‌‍\xb7̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function rx(e,t){for(var n=65536,r=0;r<t.length&&!((n+=t[r])>e);r+=2)if((n+=t[r+1])>=e)return!0;return!1}function rT(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&rg.test(String.fromCharCode(e)):!1!==t&&rx(e,rc)))}function rS(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&ry.test(String.fromCharCode(e)):!1!==t&&(rx(e,rc)||rx(e,rp)))))}var rb=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function rE(e,t){return new rb(e,{beforeExpr:!0,binop:t})}var rk={beforeExpr:!0},rw={startsExpr:!0},rv={};function rA(e,t){return void 0===t&&(t={}),t.keyword=e,rv[e]=new rb(e,t)}var rC={num:new rb("num",rw),regexp:new rb("regexp",rw),string:new rb("string",rw),name:new rb("name",rw),privateId:new rb("privateId",rw),eof:new rb("eof"),bracketL:new rb("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new rb("]"),braceL:new rb("{",{beforeExpr:!0,startsExpr:!0}),braceR:new rb("}"),parenL:new rb("(",{beforeExpr:!0,startsExpr:!0}),parenR:new rb(")"),comma:new rb(",",rk),semi:new rb(";",rk),colon:new rb(":",rk),dot:new rb("."),question:new rb("?",rk),questionDot:new rb("?."),arrow:new rb("=>",rk),template:new rb("template"),invalidTemplate:new rb("invalidTemplate"),ellipsis:new rb("...",rk),backQuote:new rb("`",rw),dollarBraceL:new rb("${",{beforeExpr:!0,startsExpr:!0}),eq:new rb("=",{beforeExpr:!0,isAssign:!0}),assign:new rb("_=",{beforeExpr:!0,isAssign:!0}),incDec:new rb("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new rb("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:rE("||",1),logicalAND:rE("&&",2),bitwiseOR:rE("|",3),bitwiseXOR:rE("^",4),bitwiseAND:rE("&",5),equality:rE("==/!=/===/!==",6),relational:rE("</>/<=/>=",7),bitShift:rE("<</>>/>>>",8),plusMin:new rb("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:rE("%",10),star:rE("*",10),slash:rE("/",10),starstar:new rb("**",{beforeExpr:!0}),coalesce:rE("??",1),_break:rA("break"),_case:rA("case",rk),_catch:rA("catch"),_continue:rA("continue"),_debugger:rA("debugger"),_default:rA("default",rk),_do:rA("do",{isLoop:!0,beforeExpr:!0}),_else:rA("else",rk),_finally:rA("finally"),_for:rA("for",{isLoop:!0}),_function:rA("function",rw),_if:rA("if"),_return:rA("return",rk),_switch:rA("switch"),_throw:rA("throw",rk),_try:rA("try"),_var:rA("var"),_const:rA("const"),_while:rA("while",{isLoop:!0}),_with:rA("with"),_new:rA("new",{beforeExpr:!0,startsExpr:!0}),_this:rA("this",rw),_super:rA("super",rw),_class:rA("class",rw),_extends:rA("extends",rk),_export:rA("export"),_import:rA("import",rw),_null:rA("null",rw),_true:rA("true",rw),_false:rA("false",rw),_in:rA("in",{beforeExpr:!0,binop:7}),_instanceof:rA("instanceof",{beforeExpr:!0,binop:7}),_typeof:rA("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:rA("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:rA("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},r_=/\r\n?|\n|\u2028|\u2029/,rO=RegExp(r_.source,"g");function rP(e){return 10===e||13===e||8232===e||8233===e}function rI(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(rP(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return -1}var rL=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,rN=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,rD=Object.prototype,rB=rD.hasOwnProperty,rj=rD.toString,rR=Object.hasOwn||function(e,t){return rB.call(e,t)},rF=Array.isArray||function(e){return"[object Array]"===rj.call(e)},rM=Object.create(null);function rV(e){return rM[e]||(rM[e]=RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function r$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}var rq=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,rY=function(e,t){this.line=e,this.column=t};rY.prototype.offset=function(e){return new rY(this.line,this.column+e)};var rX=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function rJ(e,t){for(var n=1,r=0;;){var i=rI(e,r,t);if(i<0)return new rY(n,t-r);++n,r=i}}var rU={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},rW=!1;function rK(e,t){return 2|4*!!e|8*!!t}var rH=function(e,t,n){this.options=e=function(e){var t,n,r={};for(var i in rU)r[i]=e&&rR(e,i)?e[i]:rU[i];if("latest"===r.ecmaVersion?r.ecmaVersion=1e8:null==r.ecmaVersion?(!rW&&"object"==typeof console&&console.warn&&(rW=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),null==r.allowReserved&&(r.allowReserved=r.ecmaVersion<5),e&&null!=e.allowHashBang||(r.allowHashBang=r.ecmaVersion>=14),rF(r.onToken)){var s=r.onToken;r.onToken=function(e){return s.push(e)}}return rF(r.onComment)&&(t=r,n=r.onComment,r.onComment=function(e,r,i,s,a,o){var l={type:e?"Block":"Line",value:r,start:i,end:s};t.locations&&(l.loc=new rX(this,a,o)),t.ranges&&(l.range=[i,s]),n.push(l)}),r}(e),this.sourceFile=e.sourceFile,this.keywords=rV(rm[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=rd[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=rV(r);var i=(r?r+" ":"")+rd.strict;this.reservedWordsStrict=rV(i),this.reservedWordsStrictBind=rV(i+" "+rd.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(r_).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=rC.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="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},rG={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};rH.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},rG.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},rG.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},rG.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},rG.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},rG.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},rG.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},rG.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},rG.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},rG.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},rH.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},rH.parse=function(e,t){return new this(t,e).parse()},rH.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},rH.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(rH.prototype,rG);var rz=rH.prototype,rQ=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;rz.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){rN.lastIndex=e,e+=rN.exec(this.input)[0].length;var t=rQ.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){rN.lastIndex=e+t[0].length;var n=rN.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||r_.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}rN.lastIndex=e+=t[0].length,e+=rN.exec(this.input)[0].length,";"===this.input[e]&&e++}},rz.eat=function(e){return this.type===e&&(this.next(),!0)},rz.isContextual=function(e){return this.type===rC.name&&this.value===e&&!this.containsEsc},rz.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},rz.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},rz.canInsertSemicolon=function(){return this.type===rC.eof||this.type===rC.braceR||r_.test(this.input.slice(this.lastTokEnd,this.start))},rz.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},rz.semicolon=function(){this.eat(rC.semi)||this.insertSemicolon()||this.unexpected()},rz.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},rz.expect=function(e){this.eat(e)||this.unexpected()},rz.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var rZ=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};rz.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},rz.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},rz.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},rz.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var r0=rH.prototype;r0.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==rC.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var r1={kind:"loop"},r2={kind:"switch"};r0.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;rN.lastIndex=this.pos;var t=rN.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(rT(r,!0)){for(var i=n+1;rS(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!rh.test(s))return!0}return!1},r0.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;rN.lastIndex=this.pos;var e,t=rN.exec(this.input),n=this.pos+t[0].length;return!r_.test(this.input.slice(this.pos,n))&&"function"===this.input.slice(n,n+8)&&(n+8===this.input.length||!(rS(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},r0.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;rN.lastIndex=this.pos;var n=rN.exec(this.input),r=this.pos+n[0].length;if(r_.test(this.input.slice(this.pos,r)))return!1;if(e){var i,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||rS(i=this.input.charCodeAt(s))||i>55295&&i<56320)return!1;rN.lastIndex=s;var a=rN.exec(this.input);if(a&&r_.test(this.input.slice(s,s+a[0].length)))return!1}if(t){var o,l=r+2;if("of"===this.input.slice(r,l)&&(l===this.input.length||!rS(o=this.input.charCodeAt(l))&&!(o>55295&&o<56320)))return!1}var p=this.input.charCodeAt(r);return rT(p,!0)||92===p},r0.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},r0.isUsing=function(e){return this.isUsingKeyword(!1,e)},r0.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=rC._var,r="let"),i){case rC._break:case rC._continue:return this.parseBreakContinueStatement(s,i.keyword);case rC._debugger:return this.parseDebuggerStatement(s);case rC._do:return this.parseDoStatement(s);case rC._for:return this.parseForStatement(s);case rC._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case rC._class:return e&&this.unexpected(),this.parseClass(s,!0);case rC._if:return this.parseIfStatement(s);case rC._return:return this.parseReturnStatement(s);case rC._switch:return this.parseSwitchStatement(s);case rC._throw:return this.parseThrowStatement(s);case rC._try:return this.parseTryStatement(s);case rC._const:case rC._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case rC._while:return this.parseWhileStatement(s);case rC._with:return this.parseWithStatement(s);case rC.braceL:return this.parseBlock(!0,s);case rC.semi:return this.parseEmptyStatement(s);case rC._export:case rC._import:if(this.options.ecmaVersion>10&&i===rC._import){rN.lastIndex=this.pos;var a=rN.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(s,this.parseExpression())}return!this.options.allowImportExportEverywhere&&(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===rC._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,p),this.semicolon(),this.finishNode(s,"VariableDeclaration");var c=this.value,u=this.parseExpression();if(i===rC.name&&"Identifier"===u.type&&this.eat(rC.colon))return this.parseLabeledStatement(s,c,u,e);return this.parseExpressionStatement(s,u)}},r0.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(rC.semi)||this.insertSemicolon()?e.label=null:this.type!==rC.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((null==e.label||i.name===e.label.name)&&(null!=i.kind&&(n||"loop"===i.kind)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},r0.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},r0.parseDoStatement=function(e){return this.next(),this.labels.push(r1),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(rC._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(rC.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},r0.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(r1),this.enterScope(0),this.expect(rC.parenL),this.type===rC.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===rC._var||this.type===rC._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),"await using"===o&&this.next(),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var p=this.containsEsc,c=new rZ,u=this.start,d=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===rC._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===rC._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(d.start!==u||p||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&a&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,c),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},r0.parseForAfterInit=function(e,t,n){return(this.type===rC._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===rC._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},r0.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,r6|(n?0:r4),!1,t)},r0.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(rC._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},r0.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(rC.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},r0.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(rC.braceL),this.labels.push(r2),this.enterScope(0);for(var t,n=!1;this.type!==rC.braceR;)if(this.type===rC._case||this.type===rC._default){var r=this.type===rC._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(rC.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},r0.parseThrowStatement=function(e){return this.next(),r_.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var r3=[];r0.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(32*!!t),this.checkLValPattern(e,t?4:2),this.expect(rC.parenR),e},r0.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===rC._catch){var t=this.startNode();this.next(),this.eat(rC.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(rC._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},r0.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},r0.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(r1),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},r0.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},r0.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},r0.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1)s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===rC._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var l=this.labels[o];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=a;else break}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},r0.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},r0.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(rC.braceL),e&&this.enterScope(0);this.type!==rC.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},r0.parseFor=function(e,t){return e.init=t,this.expect(rC.semi),e.test=this.type===rC.semi?null:this.parseExpression(),this.expect(rC.semi),e.update=this.type===rC.parenR?null:this.parseExpression(),this.expect(rC.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},r0.parseForIn=function(e,t){var n=this.type===rC._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(rC.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},r0.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(rC.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===rC._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===rC._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===rC._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(rC.comma))break}return e},r0.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var r6=1,r4=2;function r5(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}r0.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===rC.star&&t&r4&&this.unexpected(),e.generator=this.eat(rC.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&r6&&(e.id=4&t&&this.type!==rC.name?null:this.parseIdent(),e.id&&!(t&r4)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(rK(e.async,e.generator)),t&r6||(e.id=this.type===rC.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&r6?"FunctionDeclaration":"FunctionExpression")},r0.parseFunctionParams=function(e){this.expect(rC.parenL),e.params=this.parseBindingList(rC.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},r0.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(rC.braceL);this.type!==rC.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(i.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&"PrivateIdentifier"===a.key.type&&function(e,t){var n=t.key.name,r=e[n],i="true";return("MethodDefinition"===t.type&&("get"===t.kind||"set"===t.kind)&&(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i)?(e[n]="true",!1):!!r||(e[n]=i,!1)}(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},r0.parseClassElement=function(e){if(this.eat(rC.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(rC.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===rC.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===rC.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(rC.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===rC.parenL||"method"!==a||i||s){var p=!n.static&&r5(n,"constructor");p&&"method"!==a&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=p?"constructor":a,this.parseClassMethod(n,i,s,p&&e)}else this.parseClassField(n);return n},r0.isClassElementNameStart=function(){return this.type===rC.name||this.type===rC.privateId||this.type===rC.num||this.type===rC.string||this.type===rC.bracketL||this.type.keyword},r0.parseClassElementName=function(e){this.type===rC.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},r0.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&r5(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},r0.parseClassField=function(e){return r5(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&r5(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(rC.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},r0.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==rC.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},r0.parseClassId=function(e,t){this.type===rC.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},r0.parseClassSuper=function(e){e.superClass=this.eat(rC._extends)?this.parseExprSubscripts(null,!1):null},r0.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},r0.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],s=0;s<n.length;++s){var a=n[s];rR(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},r0.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==rC.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},r0.parseExport=function(e,t){if(this.next(),this.eat(rC.star))return this.parseExportAllDeclaration(e,t);if(this.eat(rC._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==rC.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},r0.parseExportDeclaration=function(e){return this.parseStatement(null)},r0.parseExportDefaultDeclaration=function(){if(this.type===rC._function||(e=this.isAsyncFunction())){var e,t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|r6,!1,e)}if(this.type===rC._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},r0.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),rR(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},r0.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var a=0,o=t.elements;a<o.length;a+=1){var l=o[a];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},r0.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n+=1){var r=t[n];this.checkPatternExport(e,r.id)}},r0.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},r0.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},r0.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(rC.braceL);!this.eat(rC.braceR);){if(n)n=!1;else if(this.expect(rC.comma),this.afterTrailingComma(rC.braceR))break;t.push(this.parseExportSpecifier(e))}return t},r0.parseImport=function(e){return this.next(),this.type===rC.string?(e.specifiers=r3,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===rC.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},r0.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},r0.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},r0.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},r0.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===rC.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(rC.comma)))return e;if(this.type===rC.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(rC.braceL);!this.eat(rC.braceR);){if(t)t=!1;else if(this.expect(rC.comma),this.afterTrailingComma(rC.braceR))break;e.push(this.parseImportSpecifier())}return e},r0.parseWithClause=function(){var e=[];if(!this.eat(rC._with))return e;this.expect(rC.braceL);for(var t={},n=!0;!this.eat(rC.braceR);){if(n)n=!1;else if(this.expect(rC.comma),this.afterTrailingComma(rC.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;rR(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},r0.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===rC.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(rC.colon),this.type!==rC.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},r0.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===rC.string){var e=this.parseLiteral(this.value);return rq.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},r0.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},r0.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var r9=rH.prototype;r9.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"===s.type&&("ArrayPattern"===s.argument.type||"ObjectPattern"===s.argument.type)&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},r9.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},r9.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},r9.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==rC.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},r9.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case rC.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(rC.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case rC.braceL:return this.parseObj(!0)}return this.parseIdent()},r9.parseBindingList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(rC.comma),t&&this.type===rC.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===rC.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===rC.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},r9.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},r9.parseBindingListItem=function(e){return e},r9.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(rC.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},r9.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(rR(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},r9.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var l=o[a];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},r9.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var r8=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},r7={b_stat:new r8("{",!1),b_expr:new r8("{",!0),b_tmpl:new r8("${",!1),p_stat:new r8("(",!1),p_expr:new r8("(",!0),q_tmpl:new r8("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new r8("function",!1),f_expr:new r8("function",!0),f_expr_gen:new r8("function",!0,!1,null,!0),f_gen:new r8("function",!1,!1,null,!0)},ie=rH.prototype;ie.initialContext=function(){return[r7.b_stat]},ie.curContext=function(){return this.context[this.context.length-1]},ie.braceIsBlock=function(e){var t=this.curContext();return t===r7.f_expr||t===r7.f_stat||(e===rC.colon&&(t===r7.b_stat||t===r7.b_expr)?!t.isExpr:e===rC._return||e===rC.name&&this.exprAllowed?r_.test(this.input.slice(this.lastTokEnd,this.start)):e===rC._else||e===rC.semi||e===rC.eof||e===rC.parenR||e===rC.arrow||(e===rC.braceL?t===r7.b_stat:e!==rC._var&&e!==rC._const&&e!==rC.name&&!this.exprAllowed))},ie.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e===rC.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ie.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},rC.parenR.updateContext=rC.braceR.updateContext=function(){if(1===this.context.length){this.exprAllowed=!0;return}var e=this.context.pop();e===r7.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},rC.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?r7.b_stat:r7.b_expr),this.exprAllowed=!0},rC.dollarBraceL.updateContext=function(){this.context.push(r7.b_tmpl),this.exprAllowed=!0},rC.parenL.updateContext=function(e){var t=e===rC._if||e===rC._for||e===rC._with||e===rC._while;this.context.push(t?r7.p_stat:r7.p_expr),this.exprAllowed=!0},rC.incDec.updateContext=function(){},rC._function.updateContext=rC._class.updateContext=function(e){e.beforeExpr&&e!==rC._else&&(e!==rC.semi||this.curContext()===r7.p_stat)&&!(e===rC._return&&r_.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==rC.colon&&e!==rC.braceL||this.curContext()!==r7.b_stat)?this.context.push(r7.f_expr):this.context.push(r7.f_stat),this.exprAllowed=!1},rC.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},rC.backQuote.updateContext=function(){this.curContext()===r7.q_tmpl?this.context.pop():this.context.push(r7.q_tmpl),this.exprAllowed=!1},rC.star.updateContext=function(e){if(e===rC._function){var t=this.context.length-1;this.context[t]===r7.f_expr?this.context[t]=r7.f_expr_gen:this.context[t]=r7.f_gen}this.exprAllowed=!0},rC.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==rC.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var it=rH.prototype;it.checkPropClash=function(e,t,n){if((!(this.options.ecmaVersion>=9)||"SpreadElement"!==e.type)&&(!(this.options.ecmaVersion>=6)||!e.computed&&!e.method&&!e.shorthand)){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){"__proto__"===r&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);return}var a=t[r="$"+r];a?("init"===s?this.strict&&a.init||a.get||a.set:a.init||a[s])&&this.raiseRecoverable(i.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[s]=!0}},it.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===rC.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(rC.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},it.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var r=!1,i=-1,s=-1,a=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new rZ,r=!0);var o=this.start,l=this.startLoc;(this.type===rC.parenL||this.type===rC.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var p=this.parseMaybeConditional(e,t);if(n&&(p=n.call(this,p,o,l)),this.type.isAssign){var c=this.startNodeAt(o,l);return c.operator=this.value,this.type===rC.eq&&(p=this.toAssignable(p,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.type===rC.eq?this.checkLValPattern(p):this.checkLValSimple(p),c.left=p,this.next(),c.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),p},it.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(rC.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(rC.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},it.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},it.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==rC._in)&&s>r){var a=this.type===rC.logicalOR||this.type===rC.logicalAND,o=this.type===rC.coalesce;o&&(s=rC.logicalAND.binop);var l=this.value;this.next();var p=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),p,c,s,i),d=this.buildBinary(t,n,e,u,l,a||o);return(a&&this.type===rC.coalesce||o&&(this.type===rC.logicalOR||this.type===rC.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,n,r,i)}return e},it.buildBinary=function(e,t,n,r,i,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},it.parseMaybeUnary=function(e,t,n,r){var i,s=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===rC.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&function e(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&e(t.expression)}(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&function e(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&e(t.expression)||"ParenthesizedExpression"===t.type&&e(t.expression)}(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==rC.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(s,a);p.operator=this.value,p.prefix=!1,p.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(p,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==rC._in&&this.unexpected();return!n&&this.eat(rC.starstar)?t?void this.unexpected(this.lastTokStart):this.buildBinary(s,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1):i},it.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var s=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},it.parseSubscripts=function(e,t,n,r,i){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,a=!1;;){var o=this.parseSubscript(e,t,n,r,s,a,i);if(o.optional&&(a=!0),o===e||"ArrowFunctionExpression"===o.type){if(a){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}},it.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(rC.arrow)},it.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},it.parseSubscript=function(e,t,n,r,i,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(rC.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(rC.bracketL);if(p||l&&this.type!==rC.parenL&&this.type!==rC.backQuote||this.eat(rC.dot)){var c=this.startNodeAt(t,n);c.object=e,p?(c.property=this.parseExpression(),this.expect(rC.bracketR)):this.type===rC.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!p,o&&(c.optional=l),e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(rC.parenL)){var u=new rZ,d=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(rC.parenR,this.options.ecmaVersion>=8,!1,u);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=f,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,a);this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,o&&(g.optional=l),e=this.finishNode(g,"CallExpression")}else if(this.type===rC.backQuote){(l||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(t,n);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e},it.parseExprAtom=function(e,t,n){this.type===rC.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case rC._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==rC.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==rC.dot&&this.type!==rC.bracketL&&this.type!==rC.parenL&&this.unexpected(),this.finishNode(r,"Super");case rC._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case rC.name:var s=this.start,a=this.startLoc,o=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(rC._function))return this.overrideContext(r7.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(rC.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===rC.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(rC.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case rC.regexp:var p=this.value;return(r=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},r;case rC.num:case rC.string:return this.parseLiteral(this.value);case rC._null:case rC._true:case rC._false:return(r=this.startNode()).value=this.type===rC._null?null:this.type===rC._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case rC.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),u;case rC.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(rC.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case rC.braceL:return this.overrideContext(r7.b_expr),this.parseObj(!1,e);case rC._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case rC._class:return this.parseClass(this.startNode(),!1);case rC._new:return this.parseNew();case rC.backQuote:return this.parseTemplate();case rC._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);return this.unexpected();default:return this.parseExprAtomDefault()}},it.parseExprAtomDefault=function(){this.unexpected()},it.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===rC.parenL&&!e)return this.parseDynamicImport(t);if(this.type===rC.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},it.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(rC.parenR)?e.options=null:(this.expect(rC.comma),this.afterTrailingComma(rC.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),!this.eat(rC.parenR)&&(this.expect(rC.comma),this.afterTrailingComma(rC.parenR)||this.unexpected())));else if(!this.eat(rC.parenR)){var t=this.start;this.eat(rC.comma)&&this.eat(rC.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},it.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},it.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},it.parseParenExpression=function(){this.expect(rC.parenL);var e=this.parseExpression();return this.expect(rC.parenR),e},it.shouldParseArrow=function(e){return!this.canInsertSemicolon()},it.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o=this.start,l=this.startLoc,p=[],c=!0,u=!1,d=new rZ,f=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==rC.parenR;){if(c?c=!1:this.expect(rC.comma),s&&this.afterTrailingComma(rC.parenR,!0)){u=!0;break}if(this.type===rC.ellipsis){a=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===rC.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(rC.parenR),e&&this.shouldParseArrow(p)&&this.eat(rC.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=m,this.parseParenArrowList(r,i,p,t);(!p.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,p.length>1?((n=this.startNodeAt(o,l)).expressions=p,this.finishNodeAt(n,"SequenceExpression",h,g)):n=p[0]}else n=this.parseParenExpression();if(!this.options.preserveParens)return n;var y=this.startNodeAt(r,i);return y.expression=n,this.finishNode(y,"ParenthesizedExpression")},it.parseParenItem=function(e){return e},it.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var ir=[];it.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===rC.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(rC.parenL)?e.arguments=this.parseExprList(rC.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ir,this.finishNode(e,"NewExpression")},it.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===rC.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===rC.backQuote,this.finishNode(n,"TemplateElement")},it.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===rC.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(rC.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(rC.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},it.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===rC.name||this.type===rC.num||this.type===rC.string||this.type===rC.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===rC.star)&&!r_.test(this.input.slice(this.lastTokEnd,this.start))},it.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(rC.braceR);){if(r)r=!1;else if(this.expect(rC.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(rC.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},it.parseProperty=function(e,t){var n,r,i,s,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(rC.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===rC.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,t),this.type===rC.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(rC.star)));var o=this.containsEsc;return this.parsePropertyName(a),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(a)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(rC.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,s,t,o),this.finishNode(a,"Property")},it.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=+("get"!==e.kind);if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},it.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===rC.colon&&this.unexpected(),this.eat(rC.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===rC.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===rC.comma||this.type===rC.braceR||this.type===rC.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===rC.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},it.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(rC.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(rC.bracketR),e.key;else e.computed=!1;return e.key=this.type===rC.num||this.type===rC.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},it.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},it.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|rK(t,r.generator)|128*!!n),this.expect(rC.parenL),r.params=this.parseBindingList(rC.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},it.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|rK(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},it.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==rC.braceL,s=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||o)&&(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},it.isSimpleParamList=function(e){for(var t=0;t<e.length;t+=1)if("Identifier"!==e[t].type)return!1;return!0},it.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,1,t?null:n)}},it.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(rC.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===rC.comma?a=null:this.type===rC.ellipsis?(a=this.parseSpread(r),r&&this.type===rC.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},it.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&("arguments"===r||"await"===r)&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),(!(this.options.ecmaVersion<6)||-1===this.input.slice(t,n).indexOf("\\"))&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},it.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),!e&&(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},it.parseIdentNode=function(){var e=this.startNode();return this.type===rC.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,("class"===e.name||"function"===e.name)&&(this.lastTokEnd!==this.lastTokStart+1||46!==this.input.charCodeAt(this.lastTokStart))&&this.context.pop(),this.type=rC.name):this.unexpected(),e},it.parsePrivateIdent=function(){var e=this.startNode();return this.type===rC.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},it.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===rC.semi||this.canInsertSemicolon()||this.type!==rC.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(rC.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},it.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var ii=rH.prototype;ii.raise=function(e,t){var n=rJ(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ii.raiseRecoverable=ii.raise,ii.curPosition=function(){if(this.options.locations)return new rY(this.curLine,this.pos-this.lineStart)};var is=rH.prototype,ia=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};is.enterScope=function(e){this.scopeStack.push(new ia(e))},is.exitScope=function(){this.scopeStack.pop()},is.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},is.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},is.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},is.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},is.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},is.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var io=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new rX(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},il=rH.prototype;function ip(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}il.startNode=function(){return new io(this,this.start,this.startLoc)},il.startNodeAt=function(e,t){return new io(this,e,t)},il.finishNode=function(e,t){return ip.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},il.finishNodeAt=function(e,t,n,r){return ip.call(this,e,t,n,r)},il.copyNode=function(e){var t=new io(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};for(var ic="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",iu=ic+" Extended_Pictographic",id=iu+" EBase EComp EMod EPres ExtPict",im={9:ic,10:iu,11:iu,12:id,13:id,14:id},ih={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},ig="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",iy="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ix=iy+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",iT=ix+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",iS=iT+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ib=iS+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",iE={9:iy,10:ix,11:iT,12:iS,13:ib,14:ib+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},ik={},iw=0,iv=[9,10,11,12,13,14];iw<iv.length;iw+=1)!function(e){var t=ik[e]={binary:rV(im[e]+" "+ig),binaryOfStrings:rV(ih[e]),nonBinary:{General_Category:rV(ig),Script:rV(iE[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}(iv[iw]);var iA=rH.prototype,iC=function(e,t){this.parent=e,this.base=t||this};iC.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},iC.prototype.sibling=function(){return new iC(this.parent,this.base)};var i_=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ik[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function iO(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function iP(e){return e>=65&&e<=90||e>=97&&e<=122}function iI(e){return iP(e)||95===e}function iL(e){return e>=48&&e<=57}function iN(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function iD(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}function iB(e){return e>=48&&e<=55}i_.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},i_.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},i_.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return -1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(i<<10)+s-0x35fdc00:i},i_.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,s=n.charCodeAt(e);return!(t||this.switchU)||s<=55295||s>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},i_.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},i_.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},i_.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},i_.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},i_.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0;r<e.length;r+=1){var i=e[r],s=this.at(n,t);if(-1===s||s!==i)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},iA.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,s=0;s<n.length;s++){var a=n.charAt(s);-1===t.indexOf(a)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(a,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===a&&(r=!0),"v"===a&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},iA.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},iA.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},iA.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new iC(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},iA.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},iA.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?!!this.regexp_eatAtom(e):!!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},iA.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},iA.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},iA.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},iA.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return -1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},iA.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},iA.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},iA.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var s=n.charAt(i);n.indexOf(s,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);n||a||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var o=0;o<a.length;o++){var l=a.charAt(o);(a.indexOf(l,o+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},iA.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},iA.regexp_eatModifiers=function(e){for(var t,n="",r=0;-1!==(r=e.current())&&(105===(t=r)||109===t||115===t);)n+=r$(r),e.advance();return n},iA.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},iA.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},iA.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!iO(t)&&(e.lastIntValue=t,e.advance(),!0)},iA.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!iO(n);)e.advance();return e.pos!==t},iA.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return -1!==t&&36!==t&&(!(t>=40)||!(t<=43))&&46!==t&&63!==t&&91!==t&&94!==t&&124!==t&&(e.advance(),!0)},iA.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0;r<n.length;r+=1)n[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},iA.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},iA.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=r$(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=r$(e.lastIntValue);return!0}return!1},iA.regexp_eatRegExpIdentifierStart=function(e){var t,n=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return(e.advance(r),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),rT(t=i,!0)||36===t||95===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},iA.regexp_eatRegExpIdentifierPart=function(e){var t,n=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return(e.advance(r),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),rS(t=i,!0)||36===t||95===t||8204===t||8205===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},iA.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},iA.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},iA.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},iA.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},iA.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},iA.regexp_eatZero=function(e){return!(48!==e.current()||iL(e.lookahead()))&&(e.lastIntValue=0,e.advance(),!0)},iA.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},iA.regexp_eatControlLetter=function(e){var t=e.current();return!!iP(t)&&(e.lastIntValue=t%32,e.advance(),!0)},iA.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i,s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(s-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(i=e.lastIntValue)>=0&&i<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},iA.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return 99!==t&&(!e.switchN||107!==t)&&(e.lastIntValue=t,e.advance(),!0)},iA.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1},iA.regexp_eatCharacterClassEscape=function(e){var t,n,r=e.current();if(100===(t=r)||68===t||115===t||83===t||119===t||87===t)return e.lastIntValue=-1,e.advance(),1;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=80===r)||112===r)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&2===n&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return 0},iA.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return 0},iA.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){rR(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},iA.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},iA.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";iI(t=e.current());)e.lastStringValue+=r$(t),e.advance();return""!==e.lastStringValue},iA.regexp_eatUnicodePropertyValue=function(e){var t,n=0;for(e.lastStringValue="";iI(t=n=e.current())||iL(t);)e.lastStringValue+=r$(n),e.advance();return""!==e.lastStringValue},iA.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},iA.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},iA.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},iA.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(-1===t||-1===n)&&e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},iA.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||iB(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},iA.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},iA.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var r=e.pos;e.eatChars([38,38]);){if(38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))){2!==t&&(n=1);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},iA.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return -1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},iA.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},iA.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&2===r&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},iA.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},iA.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},iA.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},iA.regexp_eatClassSetCharacter=function(e){var t,n,r=e.pos;if(e.eat(92))return!!(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1));var i=e.current();return!(i<0||i===e.lookahead()&&(33===(t=i)||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t)||40===(n=i)||41===n||45===n||47===n||n>=91&&n<=93||n>=123&&n<=125)&&(e.advance(),e.lastIntValue=i,!0)},iA.regexp_eatClassSetReservedPunctuator=function(e){var t,n=e.current();return!!(33===(t=n)||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t)&&(e.lastIntValue=n,e.advance(),!0)},iA.regexp_eatClassControlLetter=function(e){var t=e.current();return(!!iL(t)||95===t)&&(e.lastIntValue=t%32,e.advance(),!0)},iA.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},iA.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;iL(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},iA.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;iN(n=e.current());)e.lastIntValue=16*e.lastIntValue+iD(n),e.advance();return e.pos!==t},iA.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},iA.regexp_eatOctalDigit=function(e){var t=e.current();return iB(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},iA.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!iN(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+iD(i),e.advance()}return!0};var ij=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new rX(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},iR=rH.prototype;function iF(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}iR.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ij(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},iR.getToken=function(){return this.next(),new ij(this)},"undefined"!=typeof Symbol&&(iR[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===rC.eof,value:t}}}}),iR.nextToken=function(){var e=this.curContext();return(e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)?this.finishToken(rC.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},iR.readToken=function(e){return rT(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},iR.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-0x35fdc00},iR.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=rI(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},iR.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!rP(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},iR.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++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 e}break;default:if(e>8&&e<14||e>=5760&&rL.test(String.fromCharCode(e)))++this.pos;else break e}}},iR.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},iR.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(rC.ellipsis)):(++this.pos,this.finishToken(rC.dot))},iR.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(rC.assign,2):this.finishOp(rC.slash,1)},iR.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?rC.star:rC.modulo;return(this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=rC.starstar,t=this.input.charCodeAt(this.pos+2)),61===t)?this.finishOp(rC.assign,n+1):this.finishOp(r,n)},iR.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e)return this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(rC.assign,3):this.finishOp(124===e?rC.logicalOR:rC.logicalAND,2);return 61===t?this.finishOp(rC.assign,2):this.finishOp(124===e?rC.bitwiseOR:rC.bitwiseAND,1)},iR.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(rC.assign,2):this.finishOp(rC.bitwiseXOR,1)},iR.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45===t&&!this.inModule&&62===this.input.charCodeAt(this.pos+2)&&(0===this.lastTokEnd||r_.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(rC.incDec,2):61===t?this.finishOp(rC.assign,2):this.finishOp(rC.plusMin,1)},iR.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n))?this.finishOp(rC.assign,n+1):this.finishOp(rC.bitShift,n):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(rC.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},iR.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(rC.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(rC.arrow)):this.finishOp(61===e?rC.eq:rC.prefix,1)},iR.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(rC.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(rC.assign,3):this.finishOp(rC.coalesce,2)}return this.finishOp(rC.question,1)},iR.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,rT(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(rC.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+r$(t)+"'")},iR.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(rC.parenL);case 41:return++this.pos,this.finishToken(rC.parenR);case 59:return++this.pos,this.finishToken(rC.semi);case 44:return++this.pos,this.finishToken(rC.comma);case 91:return++this.pos,this.finishToken(rC.bracketL);case 93:return++this.pos,this.finishToken(rC.bracketR);case 123:return++this.pos,this.finishToken(rC.braceL);case 125:return++this.pos,this.finishToken(rC.braceR);case 58:return++this.pos,this.finishToken(rC.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(rC.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(rC.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+r$(e)+"'")},iR.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},iR.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(r_.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new i_(this));o.reset(n,i,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(i,a)}catch(e){}return this.finishToken(rC.regexp,{pattern:i,flags:a,value:l})},iR.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),s=this.pos,a=0,o=0,l=0,p=null==t?1/0:t;l<p;++l,++this.pos){var c=this.input.charCodeAt(this.pos),u=void 0;if(r&&95===c){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;continue}if((u=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;o=c,a=a*e+u}return(r&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t)?null:a},iR.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=iF(this.input.slice(t,this.pos)),++this.pos):rT(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(rC.num,n)},iR.readNumber=function(e){var t,n=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(n,"Invalid number");var r=this.pos-n>=2&&48===this.input.charCodeAt(n);r&&this.strict&&this.raise(n,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&110===i){var s=iF(this.input.slice(n,this.pos));return++this.pos,rT(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(rC.num,s)}r&&/[89]/.test(this.input.slice(n,this.pos))&&(r=!1),46!==i||r||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||r||((43===(i=this.input.charCodeAt(++this.pos))||45===i)&&++this.pos,null===this.readInt(10)&&this.raise(n,"Invalid number")),rT(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=(t=this.input.slice(n,this.pos),r?parseInt(t,8):parseFloat(t.replace(/_/g,"")));return this.finishToken(rC.num,a)},iR.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},iR.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(rP(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(rC.string,t)};var iM={};iR.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===iM)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},iR.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw iM;this.raise(e,t)},iR.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1)){if(this.pos===this.start&&(this.type===rC.template||this.type===rC.invalidTemplate))if(36===n)return this.pos+=2,this.finishToken(rC.dollarBraceL);else return++this.pos,this.finishToken(rC.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(rC.template,e)}if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(rP(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},iR.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(rC.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},iR.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return r$(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(i=parseInt(r=r.slice(0,-1),8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),("0"!==r||56===t||57===t)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}if(rP(t))return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";return String.fromCharCode(t)}},iR.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},iR.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(rS(i,r))this.pos+=i<=65535?1:2;else if(92===i){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?rT:rS)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=r$(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},iR.readWord=function(){var e=this.readWord1(),t=rC.name;return this.keywords.test(e)&&(t=rv[e]),this.finishToken(t,e)};var iV="8.15.0";rH.acorn={Parser:rH,version:iV,defaultOptions:rU,Position:rY,SourceLocation:rX,getLineInfo:rJ,Node:io,TokenType:rb,tokTypes:rC,keywordTypes:rv,TokContext:r8,tokContexts:r7,isIdentifierChar:rS,isIdentifierStart:rT,Token:ij,isNewLine:rP,lineBreak:r_,lineBreakG:rO,nonASCIIwhitespace:rL};var i$=Object.freeze({__proto__:null,Node:io,Parser:rH,Position:rY,SourceLocation:rX,TokContext:r8,Token:ij,TokenType:rb,defaultOptions:rU,getLineInfo:rJ,isIdentifierChar:rS,isIdentifierStart:rT,isNewLine:rP,keywordTypes:rv,lineBreak:r_,lineBreakG:rO,nonASCIIwhitespace:rL,parse:function(e,t){return rH.parse(e,t)},parseExpressionAt:function(e,t,n){return rH.parseExpressionAt(e,t,n)},tokContexts:r7,tokTypes:rC,tokenizer:function(e,t){return rH.tokenizer(e,t)},version:iV}),iq={exports:{}},iY=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(i$),iX=nF((c||(c=1,!function(e){let t=p?l:(p=1,l={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function s(e){e=e.Parser.acorn||e;let t=i.get(e);if(!t){let n=e.tokTypes,r=e.TokContext,s=e.TokenType,a=new r("<tag",!1),o=new r("</tag",!1),l=new r("<tag>...</tag>",!0,!0),p={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};p.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(a),this.exprAllowed=!1},p.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===a&&e===n.slash||t===o?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},t={tokContexts:{tc_oTag:a,tc_cTag:o,tc_expr:l},tokTypes:p},i.set(e,t)}return t}function a(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?a(e.object)+"."+a(e.property):void 0:e}e.exports=function(e){return e=e||{},function(i){return function(e,i){let o=i.acorn||iY,l=s(o),p=o.tokTypes,c=l.tokTypes,u=o.tokContexts,d=l.tokContexts.tc_oTag,f=l.tokContexts.tc_cTag,m=l.tokContexts.tc_expr,h=o.isNewLine,g=o.isIdentifierStart,y=o.isIdentifierChar;return class extends i{static get acornJsx(){return l}jsx_readToken(){let e="",t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:if(this.pos===this.start){if(60===n&&this.exprAllowed)return++this.pos,this.finishToken(c.jsxTagStart);return this.getTokenFromCode(n)}return e+=this.input.slice(t,this.pos),this.finishToken(c.jsxText,e);case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===n?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:h(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}jsx_readString(e){let t="",n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let r=this.input.charCodeAt(this.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):h(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(p.string,t)}jsx_readEntity(){let e="",i=0,s,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");let o=++this.pos;for(;this.pos<this.input.length&&i++<10;){if(";"===(a=this.input[this.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),n.test(e)&&(s=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),r.test(e)&&(s=String.fromCharCode(parseInt(e,10)))):s=t[e];break}e+=a}return s||(this.pos=o,"&")}jsx_readWord(){let e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(y(e)||45===e);return this.finishToken(c.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===c.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsx_parseNamespacedName(){let t=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(p.colon))return r;var i=this.startNodeAt(t,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===c.jsxTagEnd)return"";let t=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type!==p.dot||"JSXNamespacedName"!==r.type||e.allowNamespacedObjects||this.unexpected();this.eat(p.dot);){let e=this.startNodeAt(t,n);e.object=r,e.property=this.jsx_parseIdentifier(),r=this.finishNode(e,"JSXMemberExpression")}return r}jsx_parseAttributeValue(){switch(this.type){case p.braceL:let e=this.jsx_parseExpressionContainer();return"JSXEmptyExpression"===e.expression.type&&this.raise(e.start,"JSX attributes must only be assigned a non-empty expression"),e;case c.jsxTagStart:case p.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let e=this.startNode();return this.next(),e.expression=this.type===p.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(p.braceR),this.finishNode(e,"JSXExpressionContainer")}jsx_parseAttribute(){let e=this.startNode();return this.eat(p.braceL)?(this.expect(p.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(p.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(p.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t);n.attributes=[];let r=this.jsx_parseElementName();for(r&&(n.name=r);this.type!==p.slash&&this.type!==c.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(p.slash),this.expect(c.jsxTagEnd),this.finishNode(n,r?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(e,t){let n=this.startNodeAt(e,t),r=this.jsx_parseElementName();return r&&(n.name=r),this.expect(c.jsxTagEnd),this.finishNode(n,r?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(e,t){let n=this.startNodeAt(e,t),r=[],i=this.jsx_parseOpeningElementAt(e,t),s=null;if(!i.selfClosing){t:for(;;)switch(this.type){case c.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(p.slash)){s=this.jsx_parseClosingElementAt(e,t);break t}r.push(this.jsx_parseElementAt(e,t));break;case c.jsxText:r.push(this.parseExprAtom());break;case p.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}a(s.name)!==a(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+a(i.name)+">")}let o=i.name?"Element":"Fragment";return n["opening"+o]=i,n["closing"+o]=s,n.children=r,this.type===p.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSX"+o)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type="JSXText",e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===c.jsxText?this.jsx_parseText():this.type===c.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===d||t===f){if(g(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(c.jsxTagEnd);if((34===e||39===e)&&t==d)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(c.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==p.braceL){var t=this.curContext();t==d?this.context.push(u.b_expr):t==m?this.context.push(u.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==p.slash||e!==c.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(f),this.exprAllowed=!1}}}}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},i)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(iY).tokTypes},configurable:!0,enumerable:!0})}(iq)),iq.exports));const iJ="Keyword",iU="JSXText";function iW(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}iW.prototype={constructor:iW,translate(e,t){let n=e.type,r=this._acornTokTypes;if(n===r.name)e.type="Identifier","static"===e.value&&(e.type=iJ),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=iJ);else if(n===r.privateId)e.type="PrivateIdentifier";else if(n===r.semi||n===r.comma||n===r.parenL||n===r.parenR||n===r.braceL||n===r.braceR||n===r.dot||n===r.bracketL||n===r.colon||n===r.question||n===r.bracketR||n===r.ellipsis||n===r.arrow||n===r.jsxTagStart||n===r.incDec||n===r.starstar||n===r.jsxTagEnd||n===r.prefix||n===r.questionDot||n.binop&&!n.keyword||n.isAssign)e.type="Punctuator",e.value=this._code.slice(e.start,e.end);else if(n===r.jsxName)e.type="JSXIdentifier";else if("jsxText"===n.label||n===r.jsxAttrValueToken)e.type=iU;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type="Boolean":"null"===n.keyword?e.type="Null":e.type=iJ;else if(n===r.num)e.type="Numeric",e.value=this._code.slice(e.start,e.end);else if(n===r.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=iU):e.type="String",e.value=this._code.slice(e.start,e.end);else if(n===r.regexp){e.type="RegularExpression";let t=e.value;e.regex={flags:t.flags,pattern:t.pattern},e.value=`/${t.pattern}/${t.flags}`}return e},onToken(e,t){let n=this._acornTokTypes,r=t.tokens,i=this._tokens,s=()=>{r.push(function(e,t){let n=e[0],r=e.at(-1),i={type:"Template",value:t.slice(n.start,r.end)};return n.loc&&(i.loc={start:n.loc.start,end:r.loc.end}),n.range&&(i.start=n.range[0],i.end=r.range[1],i.range=[i.start,i.end]),i}(this._tokens,this._code)),this._tokens=[]};if(e.type===n.eof){this._curlyBrace&&r.push(this.translate(this._curlyBrace,t));return}if(e.type===n.backQuote){this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),i.push(e),i.length>1&&s();return}if(e.type===n.dollarBraceL){i.push(e),s();return}if(e.type===n.braceR){this._curlyBrace&&r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===n.template||e.type===n.invalidTemplate){this._curlyBrace&&(i.push(this._curlyBrace),this._curlyBrace=null),i.push(e);return}this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(this.translate(e,t))}};const iK=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function iH(){return iK.at(-1)}const iG=Symbol("espree's internal state"),iz=Symbol("espree's esprimaFinishNode");var iQ=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(e,n){("object"!=typeof e||null===e)&&(e={}),"string"==typeof n||n instanceof String||(n=String(n));let r=e.sourceType,i=function(e){let t=function(e=5){let t="latest"===e?iH():e;if("number"!=typeof t)throw Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!iK.includes(t))throw Error("Invalid ecmaVersion.");return t}(e.ecmaVersion),n=function(e="script"){if("script"===e||"module"===e)return e;if("commonjs"===e)return"script";throw Error("Invalid sourceType.")}(e.sourceType),r=!0===e.range,i=!0===e.loc;if(3!==t&&e.allowReserved)throw Error("`allowReserved` is only supported when ecmaVersion is 3");if(void 0!==e.allowReserved&&"boolean"!=typeof e.allowReserved)throw Error("`allowReserved`, when present, must be `true` or `false`");let s=3===t&&(e.allowReserved||"never"),a=e.ecmaFeatures||{},o="commonjs"===e.sourceType||!!a.globalReturn;if("module"===n&&t<6)throw Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:n,ranges:r,locations:i,allowReserved:s,allowReturnOutsideFunction:o})}(e),s=i.ecmaFeatures||{},a=!0===i.tokens?new iW(t,n):null,o={originalSourceType:r||i.sourceType,tokens:a?[]:null,comments:!0===i.comment?[]:null,impliedStrict:!0===s.impliedStrict&&i.ecmaVersion>=5,ecmaVersion:i.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:i.ecmaVersion,sourceType:i.sourceType,ranges:i.ranges,locations:i.locations,allowReserved:i.allowReserved,allowReturnOutsideFunction:i.allowReturnOutsideFunction,onToken(e){a&&a.onToken(e,o),e.type!==t.eof&&(o.lastToken=e)},onComment(e,t,r,i,s,a){if(o.comments){let l=function(e,t,n,r,i,s,a){let o={type:e?"Block":"#!"===a.slice(n,n+2)?"Hashbang":"Line",value:t};return"number"==typeof n&&(o.start=n,o.end=r,o.range=[n,r]),"object"==typeof i&&(o.loc={start:i,end:s}),o}(e,t,r,i,s,a,n);o.comments.push(l)}}},n),this[iG]=o}tokenize(){do this.next();while(this.type!==t.eof);this.next();let e=this[iG],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){let t=super.finishNode(...e);return this[iz](t)}finishNodeAt(...e){let t=super.finishNodeAt(...e);return this[iz](t)}parse(){let e=this[iG],t=super.parse();if(t.sourceType=e.originalSourceType,e.comments&&(t.comments=e.comments),e.tokens&&(t.tokens=e.tokens),t.body.length){let[e]=t.body;t.range&&(t.range[0]=e.range[0]),t.loc&&(t.loc.start=e.loc.start),t.start=e.start}return e.lastToken&&(t.range&&(t.range[1]=e.lastToken.range[1]),t.loc&&(t.loc.end=e.lastToken.loc.end),t.end=e.lastToken.end),this[iG].templateElements.forEach(e=>{let t=e.tail?1:2;e.start+=-1,e.end+=t,e.range&&(e.range[0]+=-1,e.range[1]+=t),e.loc&&(e.loc.start.column+=-1,e.loc.end.column+=t)}),t}parseTopLevel(e){return this[iG].impliedStrict&&(this.strict=!0),super.parseTopLevel(e)}raise(t,n){let r=e.acorn.getLineInfo(this.input,t),i=SyntaxError(n);throw i.index=t,i.lineNumber=r.line,i.column=r.column+1,i}raiseRecoverable(e,t){this.raise(e,t)}unexpected(e){let t="Unexpected token";if(null!=e){if(this.pos=e,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf("\n",this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(t+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,t)}jsx_readString(e){let n=super.jsx_readString(e);return this.type===t.string&&(this[iG].jsxAttrValueToken=!0),n}[iz](e){return"TemplateElement"===e.type&&this[iG].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};const iZ={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=rH.extend(iQ())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=rH.extend(iX(),iQ())),this._jsx},get(e){return e&&e.ecmaFeatures&&e.ecmaFeatures.jsx?this.jsx:this.regular}};function i0(e,t){let n=iZ.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()}let i1,i2={};for(i1 in"function"==typeof Object.create&&(i2=Object.create(null)),rl)Object.hasOwn(rl,i1)&&(i2[i1]=i1);"function"==typeof Object.freeze&&Object.freeze(i2);const i3=iH();var i6={},i4=u?i6:(u=1,!function e(t){var n,r,i,s,a,o;function l(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&("object"==typeof(n=e[t])&&null!==n?r[t]=l(n):r[t]=n);return r}function p(e,t){this.parent=e,this.key=t}function c(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function u(){}function d(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function f(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function m(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function h(e,t){return new u().traverse(e,t)}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:a={},Remove:o={}},p.prototype.replace=function(e){this.parent[this.key]=e},p.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},u.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n<r;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(e=2,i=[],t=this.__leavelist.length;e<t;++e)s(i,this.__leavelist[e].path);return s(i,this.__current.path),i},u.prototype.type=function(){return this.current().type||this.__current.wrap},u.prototype.parents=function(){var e,t,n;for(e=1,n=[],t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},u.prototype.current=function(){return this.__current.node},u.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},u.prototype.notify=function(e){this.__state=e},u.prototype.skip=function(){this.notify(a)},u.prototype.break=function(){this.notify(s)},u.prototype.remove=function(){this.notify(o)},u.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=i,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},u.prototype.traverse=function(e,t){var n,r,i,o,l,p,u,h,g,y,x,T;for(this.__initialize(e,t),T={},n=this.__worklist,r=this.__leavelist,n.push(new c(e,null,null,null)),r.push(new c(null,null,null,null));n.length;){if((i=n.pop())===T){if(i=r.pop(),p=this.__execute(t.leave,i),this.__state===s||p===s)return;continue}if(i.node){if(p=this.__execute(t.enter,i),this.__state===s||p===s)return;if(n.push(T),r.push(i),this.__state===a||p===a)continue;if(l=(o=i.node).type||i.wrap,!(y=this.__keys[l]))if(this.__fallback)y=this.__fallback(o);else throw Error("Unknown node type "+l+".");for(h=y.length;(h-=1)>=0;)if(x=o[u=y[h]]){if(Array.isArray(x)){for(g=x.length;(g-=1)>=0;)if(!(!x[g]||m(r,x[g]))){if(f(l,y[h]))i=new c(x[g],[u,g],"Property",null);else{if(!d(x[g]))continue;i=new c(x[g],[u,g],null,null)}n.push(i)}}else if(d(x)){if(m(r,x))continue;n.push(new c(x,u,null,null))}}}}},u.prototype.replace=function(e,t){var n,r,i,l,u,m,h,g,y,x,T,S,b;function E(e){var t,r,i,s;if(e.ref.remove()){for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key<r)break;--i.ref.key}}}for(this.__initialize(e,t),T={},n=this.__worklist,r=this.__leavelist,S={root:e},m=new c(e,null,null,new p(S,"root")),n.push(m),r.push(m);n.length;){if((m=n.pop())===T){if(m=r.pop(),void 0!==(u=this.__execute(t.leave,m))&&u!==s&&u!==a&&u!==o&&m.ref.replace(u),(this.__state===o||u===o)&&E(m),this.__state===s||u===s)return S.root;continue}if(void 0!==(u=this.__execute(t.enter,m))&&u!==s&&u!==a&&u!==o&&(m.ref.replace(u),m.node=u),(this.__state===o||u===o)&&(E(m),m.node=null),this.__state===s||u===s)break;if(i=m.node){if(n.push(T),r.push(m),this.__state!==a&&u!==a){if(l=i.type||m.wrap,!(y=this.__keys[l]))if(this.__fallback)y=this.__fallback(i);else throw Error("Unknown node type "+l+".");for(h=y.length;(h-=1)>=0;)if(x=i[b=y[h]])if(Array.isArray(x)){for(g=x.length;(g-=1)>=0;)if(x[g]){if(f(l,y[h]))m=new c(x[g],[b,g],"Property",new p(x,g));else{if(!d(x[g]))continue;m=new c(x[g],[b,g],null,new p(x,g))}n.push(m)}}else d(x)&&n.push(new c(x,b,null,new p(i,b)))}}}return S.root},t.Syntax=n,t.traverse=h,t.replace=function(e,t){return new u().replace(e,t)},t.attachComments=function(e,t,n){var i,s,a,o,p=[];if(!e.range)throw Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,s=t.length;a<s;a+=1)(i=l(t[a])).extendedRange=[0,e.range[0]],p.push(i);e.leadingComments=p}return e}for(a=0,s=t.length;a<s;a+=1)p.push(function(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}(l(t[a]),n));return o=0,h(e,{enter:function(e){for(var t;o<p.length&&!((t=p[o]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),p.splice(o,1)):o+=1;return o===p.length?r.Break:p[o].extendedRange[0]>e.range[1]?r.Skip:void 0}}),o=0,h(e,{leave:function(e){for(var t;o<p.length&&(t=p[o],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),p.splice(o,1)):o+=1;return o===p.length?r.Break:p[o].extendedRange[0]>e.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=u,t.cloneEnvironment=function(){return e({})},t}(i6),i6);const i5=new Set;function i9(e,t,n=""){var r;return r=`You are using deprecated ${e}${n?` in "${n}"`:""}, please use ${t} instead.`,void(!i5.has(r)&&(i5.add(r),console.warn(`[@stylistic/eslint-plugin]: ${r}`)))}function i8(){return RegExp(d.LINEBREAK_MATCHER.source,"gu")}function i7(e){for(let t=e;t;t=t.parent)if(S.test(t.type))return t;return null}function se(e){return"Literal"===e.type&&null===e.value&&!("regex"in e)&&!("bigint"in e)}function st(e){switch(e.type){case"Literal":if(null!==e.value||se(e))return String(e.value);if(sh(e))return`/${e.regex.pattern}/${e.regex.flags}`;if("bigint"in e&&e.bigint)return e.bigint;break;case"TemplateLiteral":if(0===e.expressions.length&&1===e.quasis.length)return e.quasis[0].value.cooked}return null}function sn(e){let t;if(e)switch(e.type){case"ChainExpression":return sn(e.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":case"ImportAttribute":t=e.key;break;case"MemberExpression":t=e.property}return t?"Identifier"!==t.type||"computed"in e&&e.computed?st(t):t.name:null}function sr(e){return e&&"ChainExpression"===e.type?e.expression:e}function si(e,t){let n=e.getTokenBefore(t),r=e.getTokenAfter(t);return!!n&&!!r&&(0,d.isOpeningParenToken)(n)&&n.range[1]<=t.range[0]&&(0,d.isClosingParenToken)(r)&&r.range[0]>=t.range[1]}function ss(e){return"="===e.value&&"Punctuator"===e.type}function sa(e){return"?"===e.value&&"Punctuator"===e.type}function so(e){return e?.type==="Keyword"}function sl(e){return"Shebang"===e.type||"Hashbang"===e.type}function sp(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function sc(e){return"LogicalExpression"===e.type&&"??"===e.operator}function su(e,t){return sp(e)&&sc(t)||sc(e)&&sp(t)}function sd(e,t){return e.test?t.getTokenAfter(e.test,e=>(0,d.isColonToken)(e)):t.getFirstToken(e,1)}function sf(e){if("ExpressionStatement"!==e.type)return!1;let t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&(0,d.isFunction)(t.parent)}function sm(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type}function sh(e){return"Literal"===e.type&&"regex"in e}function sg(e,t){return e[0]===t&&e[e.length-1]===t}function sy(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":case"TSConditionalType":return 3;case"LogicalExpression":switch(e.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"TSUnionType":return 6;case"TSIntersectionType":return 8;case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;case"TSImportType":case"TSArrayType":return 20;default:if(e.type in rl)return 20;return -1}}function sx(e){return"Literal"===e.type&&"number"==typeof e.value&&g.test(e.raw)}function sT(e){return"Numeric"===e.type&&g.test(e.value)}function sS(e,{column:t,line:n}){return t<e.lines[n-1].length?{column:t+1,line:n}:n<e.lines.length?{column:0,line:n+1}:null}function sb(e){return"Literal"===e.type&&("number"==typeof e.value||!!("bigint"in e&&e.bigint))}function sE(e,t){let n,r,i={comment:!0,ecmaVersion:i3,range:!0};if("string"==typeof e){let t;try{t=i0(e,i)}catch{return!1}let r=t.comments;if(n=t[t.length-1],r.length){let e=r[r.length-1];(!n||e.range[0]>n.range[0])&&(n=e)}}else n=e;if(sl(n))return!1;if("string"==typeof t){let e;try{e=i0(t,i)}catch{return!1}let n=e.comments;if(r=e[0],n.length){let e=n[0];(!r||e.range[0]<r.range[0])&&(r=e)}}else r=t;if("Punctuator"===n.type||"Punctuator"===r.type){if("Punctuator"===n.type&&"Punctuator"===r.type){let e=new Set(["+","++"]),t=new Set(["-","--"]);return!(e.has(n.value)&&e.has(r.value)||t.has(n.value)&&t.has(r.value))}return"Punctuator"!==n.type||"/"!==n.value||!["Block","Line","RegularExpression"].includes(r.type)}return!!("String"===n.type||"String"===r.type||"Template"===n.type||"Template"===r.type||"Numeric"!==n.type&&"Numeric"===r.type&&r.value.startsWith("."))||"Block"===n.type||"Block"===r.type||"Line"===r.type||"PrivateIdentifier"===r.type}function sk(e){return y.test(e)}function sw(e){return"string"==typeof e&&b.test(e)}function sv(e,t){let n=e.sourceCode,r=t,i=null;do i="JSXText"===(r=n.getTokenBefore(r)).type?r.value.split("\n"):null;while("JSXText"===r.type&&i&&sw(i.at(-1)));return r}function sA(e,t){let n=sv(e,t);return!!n&&!(0,d.isTokenOnSameLine)(n,t)}function sC(e){let t="attributes"in e&&e.attributes;return t&&0!==t.length?t[t.length-1]:e.name}function s_(e){return e.loc.start.line===e.loc.end.line}function sO(e,t,n){return null!==e.getFirstTokenBetween(t,n,{includeComments:!0,filter:d.isCommentToken})}function sP(e,t,n){return e.getTokensBetween(t,n,{includeComments:!0,filter:d.isCommentToken})}var sI=nH(()=>{d=nQ(re()),f=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,m=new Set(["\r\n","\r","\n","\u2028","\u2029"]),h=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),g=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,y=/^(?:[^\\]|\\.)*\\(?:[1-9]|0\d)/su,x=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","||=","&&=","??="],T=["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"],S=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u,b=/^\s*$/u}),sL={},sN={ASSIGNMENT_OPERATOR:()=>x,AST_NODE_TYPES:()=>ro.AST_NODE_TYPES,AST_TOKEN_TYPES:()=>ro.AST_TOKEN_TYPES,COMMENTS_IGNORE_PATTERN:()=>f,DECIMAL_INTEGER_PATTERN:()=>g,KEYWORDS_JS:()=>T,LINEBREAKS:()=>m,OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN:()=>y,STATEMENT_LIST_PARENTS:()=>h,WHITE_SPACES_PATTERN:()=>b,canTokensBeAdjacent:()=>sE,createGlobalLinebreakMatcher:()=>i8,getCommentsBetween:()=>sP,getFirstNodeInLine:()=>sv,getNextLocation:()=>sS,getPrecedence:()=>sy,getStaticPropertyName:()=>sn,getStaticStringValue:()=>st,getSwitchCaseColonToken:()=>sd,getTokenBeforeClosingBracket:()=>sC,getUpperFunction:()=>i7,hasCommentsBetween:()=>sO,hasOctalOrNonOctalDecimalEscapeSequence:()=>sk,isCoalesceExpression:()=>sc,isDecimalInteger:()=>sx,isDecimalIntegerNumericToken:()=>sT,isEqToken:()=>ss,isHashbangComment:()=>sl,isKeywordToken:()=>so,isLogicalExpression:()=>sp,isMixedLogicalAndCoalesceExpressions:()=>su,isNodeFirstInLine:()=>sA,isNullLiteral:()=>se,isNumericLiteral:()=>sb,isParenthesised:()=>si,isQuestionToken:()=>sa,isRegExpLiteral:()=>sh,isSingleLine:()=>s_,isStringLiteral:()=>sm,isSurroundedBy:()=>sg,isTopLevelExpressionStatement:()=>sf,isWhiteSpaces:()=>sw,skipChainExpression:()=>sr};for(var sD in sN)nX(sL,sD,{get:sN[sD],enumerable:!0});var sB=nH(()=>{sI(),nz(sL,nQ(re()),"default")});function sj(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function sR(e={},t={}){return Array.from(new Set(Object.keys(e).concat(Object.keys(t)))).reduce((n,r)=>{let i=r in e,s=r in t,a=e[r],o=t[r];return i&&s?sj(a)&&sj(o)?n[r]=sR(a,o):n[r]=o:i?n[r]=a:n[r]=o,n},{})}function sF({name:e,create:t,defaultOptions:n=[],meta:r}){return{create:e=>{let r=Array.from({length:Math.max(e.options.length,n.length)},(t,r)=>sj(e.options[r])&&sj(n[r])?sR(n[r],e.options[r]):e.options[r]??n[r]);return t(e,r)},defaultOptions:n,meta:{...r,docs:{...r.docs,url:`https://eslint.style/rules/${e}`}}}}var sM=nH(()=>{}),sV=nH(()=>{});function s$(e){let t=sX(e);return E.test(t)}function sq(e){return e&&["JSXElement","JSXFragment"].includes(e.type)}function sY(e){if(!e.type||"JSXAttribute"!==e.type)throw Error("The prop must be a JSXAttribute collected by the AST parser.");return"JSXNamespacedName"===e.name.type?`${e.name.namespace.name}:${e.name.name.name}`:e.name.name}function sX(e){if("JSXOpeningFragment"===e.type)return"<>";let{name:t}=e;if(!t)throw Error("The argument provided is not a JSXElement node.");if("JSXMemberExpression"===t.type){let{object:e,property:n}=t;return function e(t,n){return"JSXMemberExpression"===t.type?`${e(t.object,t.property)}.${n.name}`:`${t.name}.${n.name}`}(e,n)}return"JSXNamespacedName"===t.type?`${t.namespace.name}:${t.name.name}`:e.name.name}var sJ=nH(()=>{sV(),E=/^[a-z]/});function sU(t){return/^[\u0020-\u007F]*$/u.test(t)?t.length:[...(e??=new Intl.Segmenter).segment(t)].length}const sW=(e,t)=>`Expected to find a ${e} for the ${t}.`;function sK(e,t){if(null==e)throw Error(`Non-null Assertion Failed: ${t}`);return e}var sH=nH(()=>{sB(),k=class{retainedRange;constructor(e,t){this.fixer=e,this.sourceCode=t,this.retainedRange=null}retainRange(e){return this.retainedRange=e,this}retainEnclosingFunction(e){let t=i7(e);return this.retainRange(t?t.range:this.sourceCode.ast.range)}retainSurroundingTokens(e){let t=this.sourceCode.getTokenBefore(e)||e,n=this.sourceCode.getTokenAfter(e)||e;return this.retainRange([t.range[0],n.range[1]])}replaceTextRange(e,t){let n;return n=this.retainedRange?[Math.min(this.retainedRange[0],e[0]),Math.max(this.retainedRange[1],e[1])]:e,this.fixer.replaceTextRange(n,this.sourceCode.text.slice(n[0],e[0])+t+this.sourceCode.text.slice(e[1],n[1]))}remove(e){return this.replaceTextRange(e.range,"")}}}),sG=nH(()=>{sB(),sM(),w=sF({name:"array-bracket-newline",meta:{type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(e){let t=e.sourceCode;function n(n){let r=n.elements,i=function(e){let t,n,r,i=(t=!1,n=!1,r=0,e?"consistent"===e?(t=!0,r=1/0):"always"===e||"string"!=typeof e&&0===e.minItems?r=0:"never"===e?r=1/0:(n=!!e.multiline,r=e.minItems||1/0):(t=!1,n=!0,r=1/0),{consistent:t,multiline:n,minItems:r});return{ArrayExpression:i,ArrayPattern:i}}(e.options[0])[n.type],s=t.getFirstToken(n),a=t.getLastToken(n),o=t.getTokenAfter(s,{includeComments:!0}),l=t.getTokenBefore(a,{includeComments:!0}),p=t.getTokenAfter(s),c=t.getTokenBefore(a);r.length>=i.minItems||i.multiline&&r.length>0&&!(0,sL.isTokenOnSameLine)(l,o)||0===r.length&&"Block"===o.type&&!(0,sL.isTokenOnSameLine)(l,o)&&o===l||i.consistent&&!(0,sL.isTokenOnSameLine)(s,p)?((0,sL.isTokenOnSameLine)(s,p)&&e.report({node:n,loc:s.loc,messageId:"missingOpeningLinebreak",fix:e=>e.insertTextAfter(s,"\n")}),(0,sL.isTokenOnSameLine)(c,a)&&e.report({node:n,loc:a.loc,messageId:"missingClosingLinebreak",fix:e=>e.insertTextBefore(a,"\n")})):((0,sL.isTokenOnSameLine)(s,p)||e.report({node:n,loc:s.loc,messageId:"unexpectedOpeningLinebreak",fix(e){let n=t.getTokenAfter(s,{includeComments:!0});return!n||(0,sL.isCommentToken)(n)?null:e.removeRange([s.range[1],n.range[0]])}}),(0,sL.isTokenOnSameLine)(c,a)||e.report({node:n,loc:a.loc,messageId:"unexpectedClosingLinebreak",fix(e){let n=t.getTokenBefore(a,{includeComments:!0});return!n||(0,sL.isCommentToken)(n)?null:e.removeRange([n.range[1],a.range[0]])}}))}return{ArrayPattern:n,ArrayExpression:n}}})}),sz=nH(()=>{sB(),sM(),v=sF({name:"array-bracket-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside array brackets"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(e){let t="always"===e.options[0],n=e.sourceCode;function r(n){return!!e.options[1]&&!t===e.options[1][n]}let i={spaced:t,singleElementException:r("singleValue"),objectsInArraysException:r("objectsInArrays"),arraysInArraysException:r("arraysInArrays")};function s(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function a(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function o(t){if(i.spaced&&0===t.elements.length)return;let r=n.getFirstToken(t),o=n.getFirstToken(t,1),l="ArrayPattern"===t.type&&t.typeAnnotation?n.getTokenBefore(t.typeAnnotation):n.getLastToken(t),p=n.getTokenBefore(l),c=t.elements[0],u=t.elements[t.elements.length-1],d=c&&i.objectsInArraysException&&s(c)||c&&i.arraysInArraysException&&a(c)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced,f=u&&i.objectsInArraysException&&s(u)||u&&i.arraysInArraysException&&a(u)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced;(0,sL.isTokenOnSameLine)(r,o)&&(d&&!n.isSpaceBetween(r,o)&&e.report({node:t,loc:r.loc,messageId:"missingSpaceAfter",data:{tokenValue:r.value},fix:e=>e.insertTextAfter(r," ")}),!d&&n.isSpaceBetween(r,o)&&function(t,r){let i=n.getTokenAfter(r);e.report({node:t,loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:r.value},fix:e=>e.removeRange([r.range[1],i.range[0]])})}(t,r)),r!==p&&(0,sL.isTokenOnSameLine)(p,l)&&(f&&!n.isSpaceBetween(p,l)&&e.report({node:t,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}),!f&&n.isSpaceBetween(p,l)&&function(t,r){let i=n.getTokenBefore(r);e.report({node:t,loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:r.value},fix:e=>e.removeRange([i.range[1],r.range[0]])})}(t,l))}return{ArrayPattern:o,ArrayExpression:o}}})}),sQ=nH(()=>{sB(),sM(),A=sF({name:"array-element-newline",meta:{type:"layout",docs:{description:"Enforce line breaks after each array element"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{type:"string",enum:["always","never","consistent"]},{type:"object",properties:{consistent:{type:"boolean"},multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(e){let t=e.sourceCode;function n(e){let t,n=!1,r=!1,i=e||"always";return"always"===i||"object"==typeof i&&0===i.minItems?t=0:"never"===i?t=1/0:"consistent"===i?(n=!0,t=1/0):(n=!!i.consistent,r=!!i.multiline,t=i.minItems||1/0),{consistent:n,multiline:r,minItems:t}}function r(r){let i=r.elements,s=function(e){if(e&&(e.ArrayExpression||e.ArrayPattern)){let t,r;return e.ArrayExpression&&(t=n(e.ArrayExpression)),e.ArrayPattern&&(r=n(e.ArrayPattern)),{ArrayExpression:t,ArrayPattern:r}}let t=n(e);return{ArrayExpression:t,ArrayPattern:t}}(e.options[0])[r.type];if(!s)return;let a=!1;s.multiline&&(a=i.some(e=>null!==e&&!s_(e)));let o=0;for(let e=0;e<r.elements.length;e++){let n=r.elements[e],s=i[e-1];if(0===e||null===n||null===s)continue;let a=t.getFirstTokenBetween(s,n,sL.isCommaToken),l=t.getTokenBefore(a),p=t.getTokenAfter(a);!(0,sL.isTokenOnSameLine)(l,p)&&o++}let l=i.length>=s.minItems||s.multiline&&a||s.consistent&&o>0&&o<r.elements.length;i.forEach((n,r)=>{let s=i[r-1];if(0===r||null===n||null===s)return;let a=t.getFirstTokenBetween(s,n,sL.isCommaToken),o=t.getTokenBefore(a),p=t.getTokenAfter(a);l?(0,sL.isTokenOnSameLine)(o,p)&&function(n){let r=t.getTokenBefore(n,{includeComments:!0});e.report({loc:{start:r.loc.end,end:n.loc.start},messageId:"missingLineBreak",fix:e=>e.replaceTextRange([r.range[1],n.range[0]],"\n")})}(p):(0,sL.isTokenOnSameLine)(o,p)||function(n){let r=t.getTokenBefore(n,{includeComments:!0});e.report({loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedLineBreak",fix(e){if((0,sL.isCommentToken)(r))return null;if(!(0,sL.isTokenOnSameLine)(r,n))return e.replaceTextRange([r.range[1],n.range[0]]," ");let i=t.getTokenBefore(r,{includeComments:!0});return(0,sL.isCommentToken)(i)?null:e.replaceTextRange([i.range[1],r.range[0]],"")}})}(p)})}return{ArrayPattern:r,ArrayExpression:r}}})}),sZ=nH(()=>{sB(),sM(),C=sF({name:"arrow-parens",meta:{type:"layout",docs:{description:"Require parentheses around arrow function arguments"},fixable:"code",schema:[{type:"string",enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(e){let t="as-needed"===e.options[0],n=t&&e.options[1]&&!0===e.options[1].requireForBlockBody,r=e.sourceCode;function i(e){return r.getTokenAfter(e.params[0],sL.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]":function(s){let a=!t||n&&"BlockStatement"===s.body.type,o=function(e){let t=r.getTokenBefore(e.params[0]);return t&&(0,sL.isOpeningParenToken)(t)&&e.range[0]<=t.range[0]?t:null}(s),l=null!==o,[p]=s.params;a&&!l&&e.report({node:s,messageId:n?"expectedParensBlock":"expectedParens",loc:p.loc,*fix(e){yield e.insertTextBefore(p,"("),yield e.insertTextAfter(p,")")}}),a||!l||"Identifier"!==p.type||p.optional||p.typeAnnotation||s.returnType||r.commentsExistBetween(o,i(s))||function(e,t){let n=+!!e.async;return r.getFirstToken(e,{skip:n})!==t}(s,o)||e.report({node:s,messageId:n?"unexpectedParensInline":"unexpectedParens",loc:p.loc,*fix(e){let t=r.getTokenBefore(o),n=i(s);t&&t.range[1]===o.range[0]&&!sE(t,r.getFirstToken(p))&&(yield e.insertTextBefore(o," ")),yield e.removeRange([o.range[0],p.range[0]]),yield e.removeRange([p.range[1],n.range[1]])}})}}}})}),s0=nH(()=>{sB(),sM(),_=sF({name:"arrow-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(e){let t=Object.assign({},e.options[0]);t.before=!1!==t.before,t.after=!1!==t.after;let n=e.sourceCode;return{ArrowFunctionExpression:function(r){var i;let s=function(e){let t=n.getTokenBefore(e.body,sL.isArrowToken);return{before:n.getTokenBefore(t),arrow:t,after:n.getTokenAfter(t)}}(r),a={before:(i=s).arrow.range[0]-i.before.range[1],after:i.after.range[0]-i.arrow.range[1]};t.before?0===a.before&&e.report({node:s.before,messageId:"expectedBefore",fix:e=>e.insertTextBefore(s.arrow," ")}):a.before>0&&e.report({node:s.before,messageId:"unexpectedBefore",fix:e=>e.removeRange([s.before.range[1],s.arrow.range[0]])}),t.after?0===a.after&&e.report({node:s.after,messageId:"expectedAfter",fix:e=>e.insertTextAfter(s.arrow," ")}):a.after>0&&e.report({node:s.after,messageId:"unexpectedAfter",fix:e=>e.removeRange([s.arrow.range[1],s.after.range[0]])})}}}})}),s1=nH(()=>{sB(),sM(),O=sF({name:"block-spacing",meta:{type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r="never"!==t,i=r?"missing":"extra";function s(e,t){return!(0,sL.isTokenOnSameLine)(e,t)||n.isSpaceBetween(e,t)===r}function a(t){let a=n.getFirstToken(t,{filter:e=>(0,sL.isOpeningBraceToken)(e)}),o=n.getLastToken(t),l=n.getTokenAfter(a,{includeComments:!0}),p=n.getTokenBefore(o,{includeComments:!0});if((0,sL.isOpeningBraceToken)(a)&&(0,sL.isClosingBraceToken)(o)&&l!==o&&(r||l.type!==ro.AST_TOKEN_TYPES.Line)){if(!s(a,l)){let n=a.loc;"extra"===i&&(n={start:a.loc.end,end:l.loc.start}),e.report({node:t,loc:n,messageId:i,data:{location:"after",token:a.value},fix:e=>r?e.insertTextBefore(l," "):e.removeRange([a.range[1],l.range[0]])})}if(!s(p,o)){let n=o.loc;"extra"===i&&(n={start:p.loc.end,end:o.loc.start}),e.report({node:t,loc:n,messageId:i,data:{location:"before",token:o.value},fix:e=>r?e.insertTextAfter(p," "):e.removeRange([p.range[1],o.range[0]])})}}}return{BlockStatement:a,StaticBlock:a,SwitchStatement:a}}})}),s2=nH(()=>{sB(),sM(),P=sF({name:"brace-style",meta:{type:"layout",docs:{description:"Enforce consistent brace style for blocks"},fixable:"whitespace",schema:[{type:"string",enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},defaultOptions:["1tbs",{allowSingleLine:!1}],create(e,t){let[n,{allowSingleLine:r}={}]=t,i="allman"===n,s=e.sourceCode;function a(e,t){let n=[e.range[1],t.range[0]];return s.text.slice(n[0],n[1]).trim()?null:e=>e.replaceTextRange(n," ")}function o(t,n){let o=s.getTokenBefore(t),l=s.getTokenBefore(n),p=s.getTokenAfter(t),c=r&&(0,sL.isTokenOnSameLine)(t,n);i||(0,sL.isTokenOnSameLine)(o,t)||e.report({node:t,messageId:"nextLineOpen",fix:a(o,t)}),i&&(0,sL.isTokenOnSameLine)(o,t)&&!c&&e.report({node:t,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(t,"\n")}),(0,sL.isTokenOnSameLine)(t,p)&&p!==n&&!c&&e.report({node:t,messageId:"blockSameLine",fix:e=>e.insertTextAfter(t,"\n")}),(0,sL.isTokenOnSameLine)(l,n)&&l!==t&&!c&&e.report({node:n,messageId:"singleLineClose",fix:e=>e.insertTextBefore(n,"\n")})}function l(t){let r=s.getTokenAfter(t);"1tbs"!==n||(0,sL.isTokenOnSameLine)(t,r)||e.report({node:t,messageId:"nextLineClose",fix:a(t,r)}),"1tbs"!==n&&(0,sL.isTokenOnSameLine)(t,r)&&e.report({node:t,messageId:"sameLineClose",fix:e=>e.insertTextAfter(t,"\n")})}return{BlockStatement(e){h.has(e.parent.type)||o(s.getFirstToken(e),s.getLastToken(e))},StaticBlock(e){o(s.getFirstToken(e,{skip:1}),s.getLastToken(e))},ClassBody(e){o(s.getFirstToken(e),s.getLastToken(e))},SwitchStatement(e){let t=s.getLastToken(e);o(s.getTokenBefore(e.cases.length?e.cases[0]:t),t)},IfStatement(e){"BlockStatement"===e.consequent.type&&e.alternate&&l(s.getLastToken(e.consequent))},TryStatement(e){l(s.getLastToken(e.block)),e.handler&&e.finalizer&&l(s.getLastToken(e.handler.body))},TSModuleBlock(e){o(s.getFirstToken(e),s.getLastToken(e))}}}})}),s3=nH(()=>{sB(),sM(),L=sF({name:"comma-dangle",meta:{type:"layout",docs:{description:"Require or disallow trailing commas"},schema:{$defs:{value:{type:"string",enum:I=["always-multiline","always","never","only-multiline"]},valueWithIgnore:{type:"string",enum:[...I,"ignore"]}},type:"array",items:[{oneOf:[{$ref:"#/$defs/value"},{type:"object",properties:{arrays:{$ref:"#/$defs/valueWithIgnore"},objects:{$ref:"#/$defs/valueWithIgnore"},imports:{$ref:"#/$defs/valueWithIgnore"},exports:{$ref:"#/$defs/valueWithIgnore"},functions:{$ref:"#/$defs/valueWithIgnore"},importAttributes:{$ref:"#/$defs/valueWithIgnore"},dynamicImports:{$ref:"#/$defs/valueWithIgnore"},enums:{$ref:"#/$defs/valueWithIgnore"},generics:{$ref:"#/$defs/valueWithIgnore"},tuples:{$ref:"#/$defs/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},fixable:"code",messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},defaultOptions:["never"],create(e,[t]){let n=function(e={},t){let n="never";return"string"==typeof e?{arrays:e,objects:e,imports:e,exports:e,functions:t&&"latest"!==t&&t<2017?"ignore":e,importAttributes:e,dynamicImports:t&&"latest"!==t&&t<2025?"ignore":e,enums:e,generics:e,tuples:e}:{arrays:e.arrays??n,objects:e.objects??n,imports:e.imports??n,exports:e.exports??n,functions:e.functions??n,importAttributes:e.importAttributes??n,dynamicImports:e.dynamicImports??n,enums:e.enums??n,generics:e.generics??n,tuples:e.tuples??n}}(t,e?.languageOptions?.ecmaVersion??e.parserOptions.ecmaVersion),r=e.parserOptions?.ecmaFeatures?.jsx&&e.filename?.endsWith(".tsx"),i=e.sourceCode,s=["}","]",")",">"],a={always:u,"always-multiline":function(e){p(e)?u(e):c(e)},"only-multiline":function(e){p(e)||c(e)},never:c,ignore:()=>{}};function o(e){return e?e[e.length-1]??null:null}function l(e){switch(e.node.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":case"ImportExpression":return i.getLastToken(e.node,1);default:{let t=e.lastItem;if(!t)return null;let n=i.getTokenAfter(t);if((0,sL.isCommaToken)(n))return n;return i.getLastToken(t)}}}function p(e){if(!e.lastItem)return!1;let t=l(e);if(!t)return!1;let n=i.getTokenAfter(t);return!!n&&n.loc.end.line!==t.loc.end.line}function c(t){if(r&&t.node.type===ro.AST_NODE_TYPES.TSTypeParameterDeclaration&&1===t.node.params.length)return;let n=t.lastItem;if(!n)return;let s=l(t);s&&(0,sL.isCommaToken)(s)&&e.report({node:n,loc:s.loc,messageId:"unexpected",*fix(e){yield e.remove(s),yield e.insertTextBefore(i.getTokenBefore(s),""),yield e.insertTextAfter(i.getTokenAfter(s),"")}})}function u(t){let n=t.lastItem;if(!n)return;if("RestElement"===n.type)return void c(t);let r=l(t);if(!r||","===r.value)return;let a=i.getTokenAfter(r);a&&s.includes(a.value)&&e.report({node:n,loc:{start:r.loc.end,end:sS(i,r.loc.end)},messageId:"missing",*fix(e){yield e.insertTextAfter(r,","),yield e.insertTextBefore(r,""),yield e.insertTextAfter(i.getTokenAfter(r),"")}})}return{ObjectExpression:e=>{a[n.objects]({node:e,lastItem:o(e.properties)})},ObjectPattern:e=>{a[n.objects]({node:e,lastItem:o(e.properties)})},ArrayExpression:e=>{a[n.arrays]({node:e,lastItem:o(e.elements)})},ArrayPattern:e=>{a[n.arrays]({node:e,lastItem:o(e.elements)})},ImportDeclaration:e=>{let t=o(e.specifiers);t?.type==="ImportSpecifier"&&a[n.imports]({node:e,lastItem:t}),a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},ExportNamedDeclaration:e=>{a[n.exports]({node:e,lastItem:o(e.specifiers)}),a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},ExportAllDeclaration:e=>{a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},FunctionDeclaration:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},FunctionExpression:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},ArrowFunctionExpression:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},CallExpression:e=>{a[n.functions]({node:e,lastItem:o(e.arguments)})},NewExpression:e=>{a[n.functions]({node:e,lastItem:o(e.arguments)})},ImportExpression:e=>{a[n.dynamicImports]({node:e,lastItem:e.options??e.source})},TSEnumDeclaration(e){a[n.enums]({node:e,lastItem:o(e.body?.members??e.members)})},TSTypeParameterDeclaration(e){a[n.generics]({node:e,lastItem:o(e.params)})},TSTupleType(e){a[n.tuples]({node:e,lastItem:o(e.elementTypes)})}}}})}),s6=nH(()=>{sB(),sM(),N=sF({name:"comma-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after commas"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpected:"There should be no space {{loc}} ','.",missing:"A space is required {{loc}} ','."}},defaultOptions:[{before:!1,after:!0}],create(e,[t={}]){let{before:n,after:r}=t,i=e.sourceCode,s=i.tokensAndComments,a=new Set;function o(e){let t=i.getFirstToken(e);for(let n of e.elements){let e;null==n?(e=i.getTokenAfter(t))&&(0,sL.isCommaToken)(e)&&a.add(e):e=i.getTokenAfter(n),t=e}}return{TSTypeParameterDeclaration:function(e){let t=e.params.length;if(t){let n=e.params[t-1],r=i.getTokenAfter(n);r&&(0,sL.isCommaToken)(r)&&a.add(r)}},ArrayExpression:o,ArrayPattern:o,"Program:exit":function(){s.forEach((t,o)=>{var l,p;if(!(0,sL.isCommaToken)(t))return;let c=s[o-1],u=s[o+1];l=(0,sL.isCommaToken)(c)||a.has(t)?null:c,p=u&&(0,sL.isCommaToken)(u)||a.has(t)?null:u,l&&(0,sL.isTokenOnSameLine)(l,t)&&n!==i.isSpaceBetween(l,t)&&e.report({node:t,data:{loc:"before"},messageId:n?"missing":"unexpected",fix:e=>n?e.insertTextBefore(t," "):e.replaceTextRange([l.range[1],t.range[0]],"")}),p&&(0,sL.isTokenOnSameLine)(t,p)&&!(0,sL.isClosingParenToken)(p)&&!(0,sL.isClosingBracketToken)(p)&&!(0,sL.isClosingBraceToken)(p)&&!(!r&&p.type===ro.AST_TOKEN_TYPES.Line)&&r!==i.isSpaceBetween(t,p)&&e.report({node:t,data:{loc:"after"},messageId:r?"missing":"unexpected",fix:e=>r?e.insertTextAfter(t," "):e.replaceTextRange([t.range[1],p.range[0]],"")})})}}}})}),s4=nH(()=>{sB(),sM(),D=sF({name:"comma-style",meta:{type:"layout",docs:{description:"Enforce consistent comma style"},fixable:"code",schema:[{type:"string",enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(e){let t=e.options[0]||"last",n=e.sourceCode,r={};if(2===e.options.length&&Object.prototype.hasOwnProperty.call(e.options[1],"exceptions")){e.options[1]??={exceptions:{}};let t=e.options[1].exceptions,n=Object.keys(t);for(let e=0;e<n.length;e++)r[n[e]]=t[n[e]]}function i(e,t,r,i){let s=n.text.slice(t.range[1],r.range[0])+n.text.slice(r.range[1],i.range[0]),a=[t.range[1],i.range[0]];return function(t){return t.replaceTextRange(a,function(e,t){switch(e){case"between":return`,${t.replace(sL.LINEBREAK_MATCHER,"")}`;case"first":return`${t},`;case"last":return`,${t}`;default:return""}}(e,s))}}function s(r,s){(function(e,t){if(0===t.length)return[];let r=t.filter(e=>!!e);if(0===r.length)return n.getTokens(e).filter(sL.isCommaToken);let i=[],s=r[0],a=n.getTokenBefore(s);for(;a&&e.range[0]<=a.range[0];){if((0,sL.isCommaToken)(a))i.unshift(a);else if((0,sL.isNotOpeningParenToken)(a))break;a=n.getTokenBefore(a)}let o=null;for(let e of r){o&&i.push(...n.getTokensBetween(o,e).filter(sL.isCommaToken));let t=n.getLastToken(e);t&&(0,sL.isCommaToken)(t)&&i.push(t),o=e}let l=n.getTokenAfter(o);for(;l&&l.range[1]<=e.range[1];){if((0,sL.isCommaToken)(l))i.push(l);else if((0,sL.isNotClosingParenToken)(l))break;l=n.getTokenAfter(l)}return i})(r,s).forEach(r=>{let s=n.getTokenBefore(r),a=n.getTokenAfter(r);if(!((0,sL.isOpeningBracketToken)(s)||(0,sL.isCommaToken)(s)&&(0,sL.isOpeningBracketToken)(n.getTokenBefore(s,sL.isNotCommaToken)))&&(!(0,sL.isCommaToken)(a)||(0,sL.isTokenOnSameLine)(r,a)))if((0,sL.isTokenOnSameLine)(r,a)&&(0,sL.isTokenOnSameLine)(s,r));else if((0,sL.isTokenOnSameLine)(r,a)||(0,sL.isTokenOnSameLine)(s,r))"first"!==t||(0,sL.isTokenOnSameLine)(r,a)?"last"===t&&(0,sL.isTokenOnSameLine)(r,a)&&e.report({node:r,messageId:"expectedCommaLast",fix:i(t,s,r,a)}):e.report({node:r,messageId:"expectedCommaFirst",fix:i(t,s,r,a)});else{let o=n.getCommentsAfter(r)[0],l=o&&"Block"===o.type&&(0,sL.isTokenOnSameLine)(r,o)?t:"between";e.report({node:r,messageId:"unexpectedLineBeforeAndAfterComma",fix:i(l,s,r,a)})}})}let a={};return r.VariableDeclaration||(a.VariableDeclaration=e=>s(e,e.declarations)),r.ObjectExpression||(a.ObjectExpression=o),r.ObjectPattern||(a.ObjectPattern=o),r.ArrayExpression||(a.ArrayExpression=l),r.ArrayPattern||(a.ArrayPattern=l),r.FunctionDeclaration||(a.FunctionDeclaration=p),r.FunctionExpression||(a.FunctionExpression=p),r.ArrowFunctionExpression||(a.ArrowFunctionExpression=p),r.CallExpression||(a.CallExpression=c),r.ImportDeclaration||(a.ImportDeclaration=e=>{s(e,e.specifiers),u(e)}),r.NewExpression||(a.NewExpression=c),r.ExportAllDeclaration||(a.ExportAllDeclaration=u),r.ExportNamedDeclaration||(a.ExportNamedDeclaration=e=>{s(e,e.specifiers),u(e)}),r.ImportExpression||(a.ImportExpression=e=>{s(e,[e.source,e.options??null])}),r.SequenceExpression||(a.SequenceExpression=e=>s(e,e.expressions)),r.ClassDeclaration||(a.ClassDeclaration=d),r.ClassExpression||(a.ClassExpression=d),r.TSDeclareFunction||(a.TSDeclareFunction=p),r.TSFunctionType||(a.TSFunctionType=p),r.TSConstructorType||(a.TSConstructorType=p),r.TSEmptyBodyFunctionExpression||(a.TSEmptyBodyFunctionExpression=p),r.TSMethodSignature||(a.TSMethodSignature=p),r.TSCallSignatureDeclaration||(a.TSCallSignatureDeclaration=p),r.TSConstructSignatureDeclaration||(a.TSConstructSignatureDeclaration=p),r.TSTypeParameterDeclaration||(a.TSTypeParameterDeclaration=m),r.TSTypeParameterInstantiation||(a.TSTypeParameterInstantiation=m),r.TSEnumBody||(a.TSEnumBody=f),r.TSTypeLiteral||(a.TSTypeLiteral=f),r.TSIndexSignature||(a.TSIndexSignature=e=>s(e,e.parameters)),r.TSInterfaceDeclaration||(a.TSInterfaceDeclaration=e=>s(e,e.extends)),r.TSInterfaceBody||(a.TSInterfaceBody=e=>s(e,e.body)),r.TSTupleType||(a.TSTupleType=e=>s(e,e.elementTypes)),a;function o(e){s(e,e.properties)}function l(e){s(e,e.elements)}function p(e){s(e,e.params)}function c(e){s(e,e.arguments)}function u(e){e.attributes&&s(e,e.attributes)}function d(e){e.implements&&s(e,e.implements)}function f(e){s(e,e.members)}function m(e){s(e,e.params)}}})}),s5=nH(()=>{sB(),sM(),B=sF({name:"computed-property-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(e){let t=e.sourceCode,n="always"===e.options[0],r=!e.options[1]||e.options[1].enforceForClassMembers;function i(r){return function(i){if(!i.computed)return;let s=i[r],a=t.getTokenBefore(s,sL.isOpeningBracketToken),o=t.getTokenAfter(a,{includeComments:!0}),l=t.getTokenAfter(s,sL.isClosingBracketToken),p=t.getTokenBefore(l,{includeComments:!0});(0,sL.isTokenOnSameLine)(a,o)&&(n?!t.isSpaceBetween(a,o)&&(0,sL.isTokenOnSameLine)(a,o)&&e.report({node:i,loc:a.loc,messageId:"missingSpaceAfter",data:{tokenValue:a.value},fix:e=>e.insertTextAfter(a," ")}):t.isSpaceBetween(a,o)&&e.report({node:i,loc:{start:a.loc.end,end:o.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:a.value},fix:e=>e.removeRange([a.range[1],o.range[0]])})),(0,sL.isTokenOnSameLine)(p,l)&&(n?!t.isSpaceBetween(p,l)&&(0,sL.isTokenOnSameLine)(p,l)&&e.report({node:i,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}):t.isSpaceBetween(p,l)&&e.report({node:i,loc:{start:p.loc.end,end:l.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:l.value},fix:e=>e.removeRange([p.range[1],l.range[0]])}))}}let s={Property:i("key"),MemberExpression:i("property")};return r&&(s.MethodDefinition=i("key"),s.PropertyDefinition=i("key"),s.AccessorProperty=i("key")),s}})});function s9(e){return"always"===e?M.always:"never"===e?M.never:e?{consistent:!!e.consistent,minElements:e.minElements??1/0,multiline:!!e.multiline}:M.default}var s8=nH(()=>{var e;sB(),sM(),R={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:j={multiline:{type:"boolean"},minElements:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1}]},(e=F||{}).IfStatementConsequent="IfStatementConsequent",e.IfStatementAlternative="IfStatementAlternative",e.DoWhileStatement="DoWhileStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.ForStatement="ForStatement",e.WhileStatement="WhileStatement",e.SwitchStatement="SwitchStatement",e.SwitchCase="SwitchCase",e.TryStatementBlock="TryStatementBlock",e.TryStatementHandler="TryStatementHandler",e.TryStatementFinalizer="TryStatementFinalizer",e.BlockStatement="BlockStatement",e.ArrowFunctionExpression="ArrowFunctionExpression",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Property="Property",e.ClassBody="ClassBody",e.StaticBlock="StaticBlock",e.WithStatement="WithStatement",e.TSModuleBlock="TSModuleBlock",M={default:{multiline:!1,minElements:1/0,consistent:!0},always:{multiline:!1,minElements:0,consistent:!1},never:{multiline:!1,minElements:1/0,consistent:!1}},V=sF({name:"curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{...Object.fromEntries(Object.entries(F=e).map(([e])=>[e,R])),...j},additionalProperties:!1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(e){let t=e.sourceCode,n=function(e){let t=s9(e);return Object.fromEntries(Object.entries(F).map(([n])=>[n,"object"==typeof e&&null!=e&&n in e?s9(e[n]):t]))}(e.options[0]);function r(r,i){let s,a,o,l=n[i];switch(r.type){case"SwitchStatement":a=t.getLastToken(r),s=t.getTokenBefore(r.cases.length?r.cases[0]:a),o=r.cases.length;break;case"StaticBlock":s=t.getFirstToken(r,e=>"{"===e.value),a=t.getLastToken(r),o=r.body.length;break;default:s=t.getFirstToken(r),a=t.getLastToken(r),o=r.body.length}let p=t.getTokenAfter(s,{includeComments:!0}),c=t.getTokenBefore(a,{includeComments:!0}),u=o>=l.minElements||l.multiline&&o>0&&!(0,sL.isTokenOnSameLine)(c,p),d=(0,sL.isCommentToken)(p),f=(0,sL.isCommentToken)(c);if(p=t.getTokenAfter(s),c=t.getTokenBefore(a),u)(0,sL.isTokenOnSameLine)(s,p)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:r,loc:s.loc,fix:e=>d?null:e.insertTextAfter(s,"\n")}),(0,sL.isTokenOnSameLine)(c,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:r,loc:a.loc,fix:e=>f?null:e.insertTextBefore(a,"\n")});else{let t=l.consistent,n=!(0,sL.isTokenOnSameLine)(s,p),i=!(0,sL.isTokenOnSameLine)(c,a);(!t&&n||t&&n&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:r,loc:s.loc,fix:e=>d?null:e.removeRange([s.range[1],p.range[0]])}),(!t&&i||t&&!n&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:r,loc:a.loc,fix:e=>f?null:e.removeRange([c.range[1],a.range[0]])})}}function i(e){r(e,e.type)}return{BlockStatement(e){let{parent:t}=e;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":case"ForStatement":case"WhileStatement":case"ArrowFunctionExpression":case"FunctionDeclaration":case"WithStatement":r(e,t.type);break;case"FunctionExpression":"Property"===t.parent.type&&t.parent.method?r(e,"Property"):r(e,t.type);break;case"IfStatement":e===t.consequent&&r(e,"IfStatementConsequent"),e===t.alternate&&r(e,"IfStatementAlternative");break;case"TryStatement":e===t.block&&r(e,"TryStatementBlock"),e===t.finalizer&&r(e,"TryStatementFinalizer");break;case"CatchClause":r(e,"TryStatementHandler");break;default:"SwitchCase"===t.type&&1===t.consequent.length?r(e,"SwitchCase"):r(e,"BlockStatement")}},SwitchStatement:i,ClassBody:i,StaticBlock:i,TSModuleBlock:i}}})}),s7=nH(()=>{sB(),sM(),$=sF({name:"dot-location",meta:{type:"layout",docs:{description:"Enforce consistent newlines before and after dots"},schema:[{type:"string",enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(e){let t=e.options[0],n="object"===t||!t,r=e.sourceCode;return{MemberExpression:function(t){"MemberExpression"!==t.type||t.computed||function(t){let i=t.property,s=r.getTokenBefore(i);if(n&&s){let n=r.getTokenBefore(s);n&&!(0,sL.isTokenOnSameLine)(n,s)&&e.report({node:t,loc:s.loc,messageId:"expectedDotAfterObject",*fix(e){s.value.startsWith(".")&&sT(n)?yield e.insertTextAfter(n,` ${s.value}`):yield e.insertTextAfter(n,s.value),yield e.remove(s)}})}else s&&!(0,sL.isTokenOnSameLine)(s,i)&&e.report({node:t,loc:s.loc,messageId:"expectedDotBeforeProperty",*fix(e){yield e.remove(s),yield e.insertTextBefore(i,s.value)}})}(t)}}}})}),ae=nH(()=>{sM(),q=sF({name:"eol-last",meta:{type:"layout",docs:{description:"Require or disallow newline at the end of files"},fixable:"whitespace",schema:[{type:"string",enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create:e=>({Program:function(t){let n=e.sourceCode,r=n.getText(),i={column:n.lines[n.lines.length-1].length,line:n.lines.length},s=`\r
2
- `,a=r.endsWith("\n");if(!r.length)return;let o=e.options[0]||"always",l=!1;if("unix"===o&&(i9('option("unix")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always"),"windows"===o&&(i9('option("windows")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always",l=!0),"always"!==o||a){if("never"===o&&a){let r=n.lines[n.lines.length-2];e.report({node:t,loc:{start:{line:n.lines.length-1,column:r.length},end:{line:n.lines.length,column:0}},messageId:"unexpected",fix(e){let t=/(?:\r?\n)+$/u.exec(n.text).index,r=n.text.length;return e.replaceTextRange([t,r],"")}})}}else e.report({node:t,loc:i,messageId:"missing",fix:e=>e.insertTextAfterRange([0,r.length],l?s:"\n")})}})})}),at=nH(()=>{sB(),sM(),Y=sF({name:"function-call-argument-newline",meta:{type:"layout",docs:{description:"Enforce line breaks between arguments of a function call"},fixable:"whitespace",schema:[{type:"string",enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(e){let t=e.sourceCode,n={messageId:"unexpectedLineBreak",check:(e,t)=>!(0,sL.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>(0,sL.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]],"\n")};function i(n,r){for(let i=1;i<n.length;i++){let s=n[i-1],a=t.getLastToken(s),o=t.getFirstToken(n[i]);if(r.check(a,o)){let s=t.getTokenBefore(o,{includeComments:!0}),a="Line"===s.type;e.report({node:n[i-1],loc:{start:s.loc.end,end:o.loc.start},messageId:r.messageId,fix:a?null:r.createFix(o,s)})}}}function s(s){if(s.length<2)return;let a=e.options[0]||"always";if("never"===a)i(s,n);else if("always"===a)i(s,r);else if("consistent"===a){let e=t.getLastToken(s[0]),a=t.getFirstToken(s[1]);(0,sL.isTokenOnSameLine)(e,a)?i(s,n):i(s,r)}}return{CallExpression:e=>s(e.arguments),NewExpression:e=>s(e.arguments),ImportExpression:e=>{e.options&&s([e.source,e.options])}}}})}),an=nH(()=>{sB(),sM(),X=sF({name:"function-call-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"},optionalChain:{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},defaultOptions:["never",{}],create(e,[t,n]){let r=e.sourceCode,i=r.getText(),{allowNewlines:s=!1,optionalChain:a={before:!0,after:!0}}=n;function o(n,o,l){let p=(0,sL.isOptionalCallExpression)(n),c=i.slice(o.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),d=u&&sL.LINEBREAK_MATCHER.test(c);if("never"===t){if(u)return e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"unexpectedWhitespace",fix:e=>r.commentsExistBetween(o,l)?null:p?e.replaceTextRange([o.range[1],l.range[0]],"?."):e.removeRange([o.range[1],l.range[0]])})}else if(p){let{before:t=!0,after:i=!0}=a,p=/^\s/u.test(c),u=/\s$/u.test(c),f=t?p:!p,m=i?u:!u,h=s||!d;f&&m&&h||e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:h?!t&&p||!i&&u?"unexpectedWhitespace":"missing":"unexpectedNewline",fix(e){if(r.commentsExistBetween(o,l))return null;let n=c;if(!s){let e=RegExp(sL.LINEBREAK_MATCHER.source,"g");n=n.replaceAll(e," ")}return f||(n=t?` ${n}`:n.trimStart()),m||(n=i?`${n} `:n.trimEnd()),e.replaceTextRange([o.range[1],l.range[0]],n)}})}else u?!s&&d&&e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"unexpectedNewline",fix:e=>r.commentsExistBetween(o,l)?null:e.replaceTextRange([o.range[1],l.range[0]]," ")}):e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"missing",fix:e=>e.insertTextBefore(l," ")})}return{"CallExpression, NewExpression":function(e){let t=r.getLastToken(e),n=r.getLastToken(e.typeArguments??e.callee),i=r.getFirstTokenBetween(n,t,sL.isOpeningParenToken);i&&!(i.range[1]>=e.range[1])&&o(e,r.getTokenBefore(i,sL.isNotOptionalChainPunctuator),i)},ImportExpression(e){let t=r.getFirstToken(e),n=r.getTokenAfter(t);o(e,t,n)}}}})}),ar=nH(()=>{sB(),sM(),J=sF({name:"function-paren-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks inside function parentheses"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never","consistent","multiline","multiline-arguments"]},{type:"object",properties:{minItems:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before ')'.",expectedAfter:"Expected newline after '('.",expectedBetween:"Expected newline between arguments/params.",unexpectedBefore:"Unexpected newline before ')'.",unexpectedAfter:"Unexpected newline after '('."}},create(e){let t,n=e.sourceCode,r=e.options[0]||"multiline",i="multiline"===r,s="multiline-arguments"===r,a="consistent"===r;function o(e,n){return s&&1===e.length?n:i||s?e.some((t,n)=>n!==e.length-1&&!(0,sL.isTokenOnSameLine)(t,e[n+1])):a?n:null==t||e.length>=t}return"object"==typeof r?t=r.minItems:"always"===r?t=0:"never"===r&&(t=1/0),{"ArrowFunctionExpression, CallExpression, FunctionDeclaration, FunctionExpression, ImportExpression, NewExpression"(t){let r,i=function(e){let t=()=>{let e=0;return t=>("Punctuator"===t.type&&"<"===t.value&&(e+=1),"Punctuator"===t.type&&">"===t.value&&(e-=1),0===e&&(0,sL.isOpeningParenToken)(t))};switch(e.type){case"NewExpression":if(!e.arguments.length&&!((0,sL.isOpeningParenToken)(n.getLastToken(e,{skip:1}))&&(0,sL.isClosingParenToken)(n.getLastToken(e))&&e.callee.range[1]<e.range[1]))return null;case"CallExpression":return{leftParen:n.getTokenAfter(e.callee,t()),rightParen:n.getLastToken(e)};case"FunctionDeclaration":case"FunctionExpression":{let r=n.getFirstToken(e,t()),i=e.params.length?n.getTokenAfter(e.params[e.params.length-1],sL.isClosingParenToken):n.getTokenAfter(r);return{leftParen:r,rightParen:i}}case"ArrowFunctionExpression":{let t=n.getFirstToken(e,{skip:+!!e.async});if(!(0,sL.isOpeningParenToken)(t))return null;let r=e.params.length?n.getTokenAfter(e.params[e.params.length-1],sL.isClosingParenToken):n.getTokenAfter(t);return{leftParen:t,rightParen:r}}case"ImportExpression":return{leftParen:n.getFirstToken(e,1),rightParen:n.getLastToken(e)};default:throw TypeError(`unexpected node with type ${e.type}`)}}(t);r="ImportExpression"===t.type?[t.source,...t.options?[t.options]:[]]:(0,sL.isFunction)(t)?t.params:t.arguments,i&&(!function(t,r){let i=t.leftParen,s=t.rightParen,a=n.getTokenAfter(i),l=n.getTokenBefore(s),p=!(0,sL.isTokenOnSameLine)(i,a),c=!(0,sL.isTokenOnSameLine)(l,s),u=o(r,p);p&&!u?e.report({node:i,messageId:"unexpectedAfter",fix:e=>n.getText().slice(i.range[1],a.range[0]).trim()?null:e.removeRange([i.range[1],a.range[0]])}):!p&&u&&e.report({node:i,messageId:"expectedAfter",fix:e=>e.insertTextAfter(i,"\n")}),c&&!u?e.report({node:s,messageId:"unexpectedBefore",fix:e=>n.getText().slice(l.range[1],s.range[0]).trim()?null:e.removeRange([l.range[1],s.range[0]])}):!c&&u&&e.report({node:s,messageId:"expectedBefore",fix:e=>e.insertTextBefore(s,"\n")})}(i,r),s&&function(t,r){let i=t.leftParen,s=n.getTokenAfter(i),a=o(r,!(0,sL.isTokenOnSameLine)(i,s));for(let t=0;t<=r.length-2;t++){let n=r[t],i=r[t+1];(0,sL.isTokenOnSameLine)(n,i)&&a&&e.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(i,"\n")})}}(i,r))}}}})}),ai=nH(()=>{sM(),W=sF({name:"generator-star-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing around `*` operators in generator functions"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},named:U={oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]},anonymous:U,method:U},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){let t={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function n(e,n){return e?"string"==typeof e?t[e]:Object.assign({},n,e):n}let r=function(e){let r=n(e,t.before);return{named:n(e.named,r),anonymous:n(e.anonymous,r),method:n(e.method,r)}}(e.options[0]||{}),i=e.sourceCode;function s(e){return"*"===e.value&&"Punctuator"===e.type}function a(t,n,i,s){if(!!(s.range[0]-i.range[1])!==r[t][n]){let a="*"===i.value,o=r[t][n],l=a?i:s,p=`${o?"missing":"unexpected"}${n[0].toUpperCase()+n.slice(1)}`;e.report({node:l,messageId:p,fix:e=>o?a?e.insertTextAfter(l," "):e.insertTextBefore(l," "):e.removeRange([i.range[1],s.range[0]])})}}function o(e){if(!e.generator)return;let t=i.getFirstToken("method"in e.parent&&e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,s),n=i.getTokenBefore(t),r=i.getTokenAfter(t),o="named";"MethodDefinition"===e.parent.type||"Property"===e.parent.type&&e.parent.method?o="method":e.id||(o="anonymous"),("method"!==o||t!==i.getFirstToken(e.parent))&&a(o,"before",n,t),a(o,"after",t,r)}return{FunctionDeclaration:o,FunctionExpression:o}}})}),as=nH(()=>{sB(),sM(),K=sF({name:"implicit-arrow-linebreak",meta:{type:"layout",docs:{description:"Enforce the location of arrow function bodies"},fixable:"whitespace",schema:[{type:"string",enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(e){let t=e.sourceCode,n=e.options[0]||"beside";return{ArrowFunctionExpression:r=>(function(r){if("BlockStatement"===r.body.type)return;let i=t.getTokenBefore(r.body,sL.isNotOpeningParenToken),s=t.getTokenAfter(i),a=(0,sL.isTokenOnSameLine)(i,s);a&&"below"===n?e.report({node:s,messageId:"expected",fix:e=>e.insertTextBefore(s,"\n")}):a||"beside"!==n||e.report({node:s,messageId:"unexpected",fix:e=>sO(t,i,s)?null:e.replaceTextRange([i.range[1],s.range[0]]," ")})})(r)}}})}),aa=nH(()=>{sB(),sM(),H=sF({name:"indent-binary-ops",meta:{type:"layout",docs:{description:"Indentation for binary operators"},fixable:"whitespace",schema:[{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["tab"]}]}],messages:{wrongIndentation:"Expected indentation of {{expected}}"}},defaultOptions:[2],create:(e,t)=>{let{sourceCode:n}=e,r="tab"===t[0]?" ":" ".repeat(t[0]??2),i=new Map;function s(e){return i.has(e)?i.get(e):n.lines[e-1].match(/^\s*/)?.[0]??""}function a(a,o){var l,p;if(a.loc.start.line===a.loc.end.line)return;let c=n.getFirstToken(o),u=n.getTokenBefore(c);for(;"("===u.value;)if(c=u,(u=n.getTokenBefore(c)).range[0]<=o.parent.range[0])return;let d=n.getTokenBefore(a),f=n.getTokenBefore(u);if(c.loc.start.line===f.loc.start.line)return;let m=(l=f.loc.start.line,n.tokensAndComments.find(e=>e.loc.start.line===l)),h=(p=f.loc.start.line,[...n.tokensAndComments].reverse().find(e=>e.loc.end.line===p)),g=so(m)&&!["typeof","instanceof","this"].includes(m.value)||m?.type==="Identifier"&&"type"===m.value&&function(t,n){for(;n.parent;)if("TSTypeAliasDeclaration"===(n=n.parent).type&&e.sourceCode.getTokenBefore(n.id)===t)return!0;return!1}(m,a)||[":","[","(","<"].concat(x).includes(h?.value||"")||["[","(","{","=>",":"].concat(x).includes(d?.value||"")&&m?.loc.start.line===d?.loc.start.line,y=h?.value===")"&&function(e){let t=n.tokensAndComments.filter(t=>t.loc.start.line===e),r=0,i=0;for(let e of t)"("===e.value&&r++,")"===e.value&&i++;return r<i}(f.loc.start.line)&&!["]",")","}"].includes(m?.value||""),T=s(f.loc.start.line),S=s(c.loc.start.line),b=function(e,n,i){if(n&&!i)return e+r;if(!n&&i)return"tab"===t[0]?e.slice(1):e.slice(t[0]??2);return e}(T,g,y);if(b!==S){let r={line:c.loc.start.line,column:0},s={line:c.loc.start.line,column:S.length};e.report({loc:{start:r,end:s},messageId:"wrongIndentation",data:{expected:`${b.length} ${"tab"===t[0]?"tab":"space"}${1===b.length?"":"s"}`},fix:e=>e.replaceTextRange([n.getIndexFromLoc(r),n.getIndexFromLoc(s)],b)}),i.set(c.loc.start.line,b)}}return{BinaryExpression(e){a(e,e.right)},LogicalExpression(e){a(e,e.right)},TSUnionType(e){e.types.length>1&&e.types.forEach(t=>{a(e,t)})},TSIntersectionType(e){e.types.length>1&&e.types.forEach(t=>{a(e,t)})}}}})}),ao=nH(()=>{sB(),sM(),G=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition",ro.AST_NODE_TYPES.AccessorProperty,"RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression","ImportAttribute",ro.AST_NODE_TYPES.TSAbstractKeyword,ro.AST_NODE_TYPES.TSAnyKeyword,ro.AST_NODE_TYPES.TSBooleanKeyword,ro.AST_NODE_TYPES.TSNeverKeyword,ro.AST_NODE_TYPES.TSNumberKeyword,ro.AST_NODE_TYPES.TSStringKeyword,ro.AST_NODE_TYPES.TSSymbolKeyword,ro.AST_NODE_TYPES.TSUndefinedKeyword,ro.AST_NODE_TYPES.TSUnknownKeyword,ro.AST_NODE_TYPES.TSVoidKeyword,ro.AST_NODE_TYPES.TSNullKeyword,ro.AST_NODE_TYPES.TSAbstractPropertyDefinition,ro.AST_NODE_TYPES.TSAbstractMethodDefinition,ro.AST_NODE_TYPES.TSArrayType,ro.AST_NODE_TYPES.TSAsExpression,ro.AST_NODE_TYPES.TSCallSignatureDeclaration,ro.AST_NODE_TYPES.TSConditionalType,ro.AST_NODE_TYPES.TSConstructorType,ro.AST_NODE_TYPES.TSConstructSignatureDeclaration,ro.AST_NODE_TYPES.TSDeclareFunction,ro.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,ro.AST_NODE_TYPES.TSEnumDeclaration,ro.AST_NODE_TYPES.TSEnumMember,ro.AST_NODE_TYPES.TSExportAssignment,ro.AST_NODE_TYPES.TSExternalModuleReference,ro.AST_NODE_TYPES.TSFunctionType,ro.AST_NODE_TYPES.TSImportType,ro.AST_NODE_TYPES.TSIndexedAccessType,ro.AST_NODE_TYPES.TSIndexSignature,ro.AST_NODE_TYPES.TSInferType,ro.AST_NODE_TYPES.TSInterfaceBody,ro.AST_NODE_TYPES.TSInterfaceDeclaration,ro.AST_NODE_TYPES.TSInterfaceHeritage,ro.AST_NODE_TYPES.TSImportEqualsDeclaration,ro.AST_NODE_TYPES.TSLiteralType,ro.AST_NODE_TYPES.TSMappedType,ro.AST_NODE_TYPES.TSMethodSignature,"TSMinusToken",ro.AST_NODE_TYPES.TSModuleBlock,ro.AST_NODE_TYPES.TSModuleDeclaration,ro.AST_NODE_TYPES.TSNonNullExpression,ro.AST_NODE_TYPES.TSParameterProperty,"TSPlusToken",ro.AST_NODE_TYPES.TSPropertySignature,ro.AST_NODE_TYPES.TSQualifiedName,"TSQuestionToken",ro.AST_NODE_TYPES.TSRestType,ro.AST_NODE_TYPES.TSThisType,ro.AST_NODE_TYPES.TSTupleType,ro.AST_NODE_TYPES.TSTypeAliasDeclaration,ro.AST_NODE_TYPES.TSTypeAnnotation,ro.AST_NODE_TYPES.TSTypeLiteral,ro.AST_NODE_TYPES.TSTypeOperator,ro.AST_NODE_TYPES.TSTypeParameter,ro.AST_NODE_TYPES.TSTypeParameterDeclaration,ro.AST_NODE_TYPES.TSTypeParameterInstantiation,ro.AST_NODE_TYPES.TSTypeReference,ro.AST_NODE_TYPES.Decorator]),z=class{_values;constructor(e){this._values=Array(e+1)}insert(e,t){this._values[e]=t}findLastNotAfter(e){let t=this._values;for(let n=e;n>=0;n--){let e=t[n];if(e)return e}}deleteRange(e,t){this._values.fill(void 0,e,t)}},Q=class{sourceCode;firstTokensByLineNumber;constructor(e){this.sourceCode=e,this.firstTokensByLineNumber=new Map;let t=e.tokensAndComments;for(let n=0;n<t.length;n++){let r=t[n];this.firstTokensByLineNumber.has(r.loc.start.line)||this.firstTokensByLineNumber.set(r.loc.start.line,r),!this.firstTokensByLineNumber.has(r.loc.end.line)&&e.text.slice(r.range[1]-r.loc.end.column,r.range[1]).trim()&&this.firstTokensByLineNumber.set(r.loc.end.line,r)}}getFirstTokenOfLine(e){return this.firstTokensByLineNumber.get(e.loc.start.line)}isFirstTokenOfLine(e){return this.getFirstTokenOfLine(e)===e}getTokenIndent(e){return this.sourceCode.text.slice(e.range[0]-e.loc.start.column,e.range[0])}},Z=class{_tokenInfo;_indentSize;_indentType;_indexMap;_lockedFirstTokens=new WeakMap;_desiredIndentCache=new WeakMap;_ignoredTokens=new WeakSet;constructor(e,t,n,r){this._tokenInfo=e,this._indentSize=t,this._indentType=n,this._indexMap=new z(r),this._indexMap.insert(0,{offset:0,from:null,force:!1})}_getOffsetDescriptor(e){return this._indexMap.findLastNotAfter(e.range[0])}matchOffsetOf(e,t){this._lockedFirstTokens.set(t,e)}setDesiredOffset(e,t,n){e&&this.setDesiredOffsets(e.range,t,n)}setDesiredOffsets(e,t,n,r=!1){let i={offset:n,from:t,force:r},s=this._indexMap.findLastNotAfter(e[1]),a=t&&t.range[0]>=e[0]&&t.range[1]<=e[1],o=a&&this._getOffsetDescriptor(t);this._indexMap.deleteRange(e[0]+1,e[1]),this._indexMap.insert(e[0],i),a&&(this._indexMap.insert(t.range[0],o),this._indexMap.insert(t.range[1],i)),this._indexMap.insert(e[1],s)}getDesiredIndent(e){if(!this._desiredIndentCache.has(e))if(this._ignoredTokens.has(e))this._desiredIndentCache.set(e,this._tokenInfo.getTokenIndent(e));else if(this._lockedFirstTokens.has(e)){let t=this._lockedFirstTokens.get(e);this._desiredIndentCache.set(e,this.getDesiredIndent(this._tokenInfo.getFirstTokenOfLine(t))+this._indentType.repeat(t.loc.start.column-this._tokenInfo.getFirstTokenOfLine(t).loc.start.column))}else{let t=this._getOffsetDescriptor(e),n=!t.from||t.from.loc.start.line!==e.loc.start.line||/^\s*?\n/u.test(e.value)||t.force?t.offset*this._indentSize:0;this._desiredIndentCache.set(e,(t.from?this.getDesiredIndent(t.from):"")+this._indentType.repeat(n))}return this._desiredIndentCache.get(e)}ignoreToken(e){this._tokenInfo.isFirstTokenOfLine(e)&&this._ignoredTokens.add(e)}getFirstDependency(e){return this._getOffsetDescriptor(e).from}},et=sF({name:"indent",meta:{type:"layout",docs:{description:"Enforce consistent indentation"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[ee={oneOf:[{type:"integer",minimum:0},{type:"string",enum:["first","off"]}]},{type:"object",properties:{var:ee,let:ee,const:ee,using:ee},additionalProperties:!1}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:ee,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:ee,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:ee},additionalProperties:!1},ArrayExpression:ee,ObjectExpression:ee,ImportDeclaration:ee,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressionsOffsetCallExpressions:{type:"boolean",default:!0},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1},tabLength:{type:"number",default:4}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},defaultOptions:[4,{SwitchCase:1,flatTernaryExpressions:!1,ignoredNodes:[]}],create(e,t){let n="space",r=4,i={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1,using:1},outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1,returnType:1},FunctionExpression:{parameters:1,body:1,returnType:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1,offsetTernaryExpressions:!1,offsetTernaryExpressionsOffsetCallExpressions:!0,tabLength:4};if(t.length){"tab"===t[0]?(r=1,n="tab"):(r=t[0]??r,n="space");let e=t[1];e&&(Object.assign(i,e),("number"==typeof e.VariableDeclarator||"first"===e.VariableDeclarator)&&(i.VariableDeclarator={var:e.VariableDeclarator,let:e.VariableDeclarator,const:e.VariableDeclarator,using:e.VariableDeclarator}))}let s=e.sourceCode,a=new Q(s),o=new Z(a,r,"space"===n?" ":" ",s.text.length),l=new WeakSet;function p(e,t,r){let i=`space${1===t?"":"s"}`,s=`tab${1===r?"":"s"}`;return{expected:`${e} ${n}${1===e?"":"s"}`,actual:t>0?"space"===n?t:`${t} ${i}`:r>0?"tab"===n?r:`${r} ${s}`:"0"}}function c(e,t){return a.getTokenIndent(e)===t}function u(e,t,n,r){function i(e){let n=s.getTokenBefore(e);for(;(0,sL.isOpeningParenToken)(n)&&n!==t;)n=s.getTokenBefore(n);return s.getTokenAfter(n)}o.setDesiredOffsets([t.range[1],n.range[0]],t,"number"==typeof r?r:1),o.setDesiredOffset(n,t,0),("first"!==r||!e.length||e[0])&&e.forEach((n,l)=>{if(n&&("off"===r&&o.ignoreToken(i(n)),0!==l))if("first"===r&&a.isFirstTokenOfLine(i(n)))o.matchOffsetOf(i(e[0]),i(n));else{let r=e[l-1],a=r&&i(r),p=r&&s.getLastToken(r);r&&p.loc.end.line-function(e){let t=e.match(/\s*$/u)[0].match(i8());return null===t?0:t.length}(p.value)>t.loc.end.line&&o.setDesiredOffsets([r.range[1],n.range[1]],a,0)}})}function d(e){if("BlockStatement"!==e.type){let t=s.getTokenBefore(e,sL.isNotOpeningParenToken),n=s.getFirstToken(e),r=s.getLastToken(e);for(;(0,sL.isOpeningParenToken)(s.getTokenBefore(n))&&(0,sL.isClosingParenToken)(s.getTokenAfter(r));)n=s.getTokenBefore(n),r=s.getTokenAfter(r);o.setDesiredOffsets([n.range[0],r.range[1]],t,1)}}function f(e){let t;t=e.arguments.length?s.getFirstTokenBetween(e.callee,e.arguments[0],sL.isOpeningParenToken):s.getLastToken(e,1);let n=s.getLastToken(e);if(l.add(t),l.add(n),"optional"in e&&e.optional){let n=s.getTokenAfter(e.callee,sL.isOptionalChainPunctuator),r=s.getTokensBetween(e.callee,n,{filter:sL.isClosingParenToken}).length,i=r?s.getTokenBefore(e.callee,{skip:r-1}):s.getFirstToken(e.callee),a=s.getTokenBefore(n),l=(0,sL.isTokenOnSameLine)(a,t)?a:i;o.setDesiredOffset(n,l,1)}let r="TaggedTemplateExpression"===e.callee.type?s.getFirstToken(e.callee.quasi):e.typeArguments??t,a=s.getTokenBefore(r);o.setDesiredOffset(t,a,0),u(e.arguments,t,n,i.CallExpression.arguments)}function m(e){let t=new Set(s.getTokens(e,{includeComments:!0}));t.forEach(e=>{if(!t.has(o.getFirstDependency(e))){let t=a.getFirstTokenOfLine(e);e===t?o.ignoreToken(e):o.setDesiredOffset(e,t,0)}})}function g(e,t){let n=e.loc.end.line,r=t.loc.start.line;if(n===r||n===r-1)return!1;for(let e=n+1;e<r;++e)if(!a.firstTokensByLineNumber.has(e))return!0;return!1}let y=new Set;function x(e,t){let n=s.getTokenAfter(t);o.ignoreToken(t),o.ignoreToken(n),o.setDesiredOffsets([n.range[0],e.range[1]],t,1),o.setDesiredOffset(t,s.getLastToken(e.id),0)}function T(e){let t=e.type===ro.AST_NODE_TYPES.TSTupleType?e.elementTypes:e.elements,n=s.getFirstToken(e),r=s.getTokenAfter([...t].reverse().find(e=>e)||n,sL.isClosingBracketToken);u(t,n,r,i.ArrayExpression)}function S(e,t){let n=s.getFirstToken(e,sL.isOpeningBraceToken),r=s.getTokenAfter(t.length?t[t.length-1]:n,sL.isClosingBraceToken);u(t,n,r,i.ObjectExpression)}function b(e,t,n,r){let a=s.getFirstToken(e);if(!i.flatTernaryExpressions||!(0,sL.isTokenOnSameLine)(t,n)||function(e,t){let n=t;for(;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return!(n=n.parent)||n.loc.start.line===e.loc.start.line}(a,e)){let e=s.getFirstTokenBetween(t,n,sa),l=s.getFirstTokenBetween(n,r,sL.isColonToken),p=s.getTokenAfter(e),c=s.getTokenBefore(l),u=s.getTokenAfter(l);o.setDesiredOffset(e,a,1),o.setDesiredOffset(l,a,1);let d=1;if(i.offsetTernaryExpressions){"Punctuator"===p.type&&(d=2);let e=sr(n).type;i.offsetTernaryExpressionsOffsetCallExpressions&&("CallExpression"===e||"AwaitExpression"===e)&&(d=2)}if(o.setDesiredOffset(p,a,d),(0,sL.isTokenOnSameLine)(c,u))o.setDesiredOffset(u,p,0);else{let e=1;if(i.offsetTernaryExpressions){"Punctuator"===u.type&&(e=2);let t=sr(r).type;i.offsetTernaryExpressionsOffsetCallExpressions&&("CallExpression"===t||"AwaitExpression"===t)&&(e=2)}o.setDesiredOffset(u,a,e)}}}function E(e,t,n){let r=s.getFirstTokenBetween(e,t,e=>e.value===n),i=s.getTokenAfter(r);o.ignoreToken(r),o.ignoreToken(i),o.setDesiredOffset(i,r,0)}function k(e,t,n,r=!1){let a=s.getFirstTokenBetween(t,n,sL.isNotClosingParenToken),l=s.getTokenAfter(a),p=s.getTokensBetween(t,n,{filter:sL.isClosingParenToken}).length,c=p?s.getTokenBefore(t,{skip:p-1}):s.getFirstToken(t),u=s.getTokenBefore(a),d=r?a:l;r&&(o.setDesiredOffset(s.getLastToken(e),a,0),o.setDesiredOffsets(n.range,a,1));let f=(0,sL.isTokenOnSameLine)(u,d)?u:c;"number"==typeof i.MemberExpression?(o.setDesiredOffset(a,f,i.MemberExpression),o.setDesiredOffset(l,r?a:f,i.MemberExpression)):(o.ignoreToken(a),o.ignoreToken(l),o.setDesiredOffset(a,f,0),o.setDesiredOffset(l,a,0))}function w(e){let t;t=e.parent&&function(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;let t=e.parent&&e.parent.parent;for(;"UnaryExpression"===t.type&&["!","~","+","-"].includes(t.operator)||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}(e.parent)?i.outerIIFEBody:e.parent&&("FunctionExpression"===e.parent.type||"ArrowFunctionExpression"===e.parent.type)?i.FunctionExpression.body:e.parent&&"FunctionDeclaration"===e.parent.type?i.FunctionDeclaration.body:1,h.has(e.parent.type)||o.setDesiredOffset(s.getFirstToken(e),s.getFirstToken(e.parent),0),u(e.body,s.getFirstToken(e),s.getLastToken(e),t)}function v(e,t){let n=s.getFirstToken(e),r=s.getTokenBefore(t[0],sL.isNotOpeningParenToken);o.setDesiredOffsets([r.range[0],e.body.range[0]],n,1)}let A=[],C={};for(let[t,c]of Object.entries({ArrayExpression:T,ArrayPattern:T,ObjectExpression(e){S(e,e.properties)},ObjectPattern(e){S(e,e.properties)},ArrowFunctionExpression(e){let t=s.getFirstToken(e,{skip:+!!e.async});if((0,sL.isOpeningParenToken)(t)){let n=s.getTokenBefore(e.returnType??e.body,{filter:sL.isClosingParenToken});l.add(t),l.add(n),u(e.params,t,n,i.FunctionExpression.parameters)}d(e.body)},AssignmentExpression(e){let t=s.getFirstTokenBetween(e.left,e.right,t=>t.value===e.operator);o.setDesiredOffsets([t.range[0],e.range[1]],s.getLastToken(e.left),1),o.ignoreToken(t),o.ignoreToken(s.getTokenAfter(t))},BinaryExpression(e){E(e.left,e.right,e.operator)},LogicalExpression(e){E(e.left,e.right,e.operator)},BlockStatement:w,ClassBody:w,CallExpression:f,ClassDeclaration(e){e.superClass&&v(e,[e.superClass])},ClassExpression(e){e.superClass&&v(e,[e.superClass])},ConditionalExpression(e){b(e,e.test,e.consequent,e.alternate)},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":function(e){d(e.body)},ExportNamedDeclaration(e){if(null===e.declaration){let t=e.source?s.getTokenBefore(e.source,sL.isClosingBraceToken):s.getLastToken(e,sL.isClosingBraceToken);if(u(e.specifiers,s.getFirstToken(e,{skip:1}),t,1),e.source){let n=s.getTokenAfter(t,e=>"Identifier"===e.type&&"from"===e.value),r=s.getLastToken(e,sL.isNotSemicolonToken);o.setDesiredOffsets([n.range[0],r.range[1]],s.getFirstToken(e),1);let i=s.getLastToken(e,sL.isClosingBraceToken);if(i&&e.source.range[1]<i.range[0]){let t=s.getTokenAfter(e.source,sL.isOpeningBraceToken);u(e.attributes,t,i,1)}}}},ExportAllDeclaration(e){let t=s.getTokenAfter(e.exported||s.getFirstToken(e),e=>"Identifier"===e.type&&"from"===e.value),n=s.getLastToken(e,sL.isNotSemicolonToken);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,sL.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let t=s.getTokenAfter(e.source,sL.isOpeningBraceToken);u(e.attributes,t,r,1)}},ForStatement(e){let t=s.getFirstToken(e,1);e.init&&o.setDesiredOffsets(e.init.range,t,1),e.test&&o.setDesiredOffsets(e.test.range,t,1),e.update&&o.setDesiredOffsets(e.update.range,t,1),d(e.body)},"FunctionDeclaration, FunctionExpression":function(e){let t=s.getTokenBefore(e.returnType??e.body,{filter:sL.isClosingParenToken}),n=s.getTokenBefore(e.params.length?e.params[0].decorators?.[0]??e.params[0]:t,{filter:sL.isOpeningParenToken});l.add(n),l.add(t),u(e.params,n,t,i[e.type].parameters),e.returnType&&o.setDesiredOffsets(e.returnType.range,t,i[e.type].returnType)},IfStatement(e){d(e.consequent),e.alternate&&d(e.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit":function(e){let t;for(let n of("IfStatement"===e.type?(t=[e.consequent],e.alternate&&t.push(e.alternate)):t=[e.body],t)){let t=s.getLastToken(n);if((0,sL.isSemicolonToken)(t)){let n=s.getTokenBefore(t),r=s.getTokenAfter(t);!(0,sL.isTokenOnSameLine)(n,t)&&r&&(0,sL.isTokenOnSameLine)(t,r)&&o.setDesiredOffset(t,s.getFirstToken(e),0)}}},ImportDeclaration(e){if(e.specifiers.some(e=>"ImportSpecifier"===e.type)){let t=s.getFirstToken(e,sL.isOpeningBraceToken),n=s.getTokenBefore(e.source,sL.isClosingBraceToken);u(e.specifiers.filter(e=>"ImportSpecifier"===e.type),t,n,i.ImportDeclaration)}let t=e.specifiers.length?s.getTokenAfter(e.specifiers[e.specifiers.length-1],e=>"Identifier"===e.type&&"from"===e.value):s.getFirstToken(e,e=>"Identifier"===e.type&&"from"===e.value),n=s.getLastToken(e,sL.isNotSemicolonToken);t&&o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,sL.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let i=s.getTokenAfter(e.source,sL.isOpeningBraceToken);if(!t){let t=s.getTokenBefore(i,e=>"with"===e.value);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1)}u(e.attributes,i,r,1)}},ImportExpression(e){let t=s.getFirstToken(e,1),n=s.getLastToken(e);l.add(t),l.add(n),o.setDesiredOffset(t,s.getTokenBefore(t),0),u([e.source],t,n,i.CallExpression.arguments)},MemberExpression(e){k(e,e.object,e.property,e.computed)},MetaProperty(e){k(e,e.meta,e.property)},NewExpression(e){(e.arguments.length>0||(0,sL.isClosingParenToken)(s.getLastToken(e))&&(0,sL.isOpeningParenToken)(s.getLastToken(e,1)))&&f(e)},Property(e){if(!e.shorthand&&!e.method&&"init"===e.kind){let t=s.getFirstTokenBetween(e.key,e.value,sL.isColonToken);o.ignoreToken(s.getTokenAfter(t))}},PropertyDefinition(e){let t=s.getFirstToken(e),n=s.getLastToken(e),r=null;if(e.computed){let n=s.getTokenBefore(e.key,sL.isOpeningBracketToken),i=r=s.getTokenAfter(e.key,sL.isClosingBracketToken),a=[n.range[1],i.range[0]];n!==t&&o.setDesiredOffset(n,t,0),o.setDesiredOffsets(a,n,1),o.setDesiredOffset(i,n,0)}else{let n=r=s.getFirstToken(e.key);e.decorators?.length||n===t||o.setDesiredOffset(n,t,1)}if(e.value){let t=s.getTokenBefore(e.value,ss),i=s.getTokenAfter(t),a=s.getTokenBefore(t);o.setDesiredOffset(t,r,1),o.setDesiredOffset(i,r===a?t:a,1),(0,sL.isSemicolonToken)(n)&&o.setDesiredOffset(n,t,1)}else(0,sL.isSemicolonToken)(n)&&o.setDesiredOffset(n,r,1)},StaticBlock(e){let t=s.getFirstToken(e,{skip:1}),n=s.getLastToken(e);u(e.body,t,n,i.StaticBlock.body)},SwitchStatement(e){let t=s.getTokenAfter(e.discriminant,sL.isOpeningBraceToken),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,i.SwitchCase),e.cases.length&&sP(s,e.cases[e.cases.length-1],n).forEach(e=>o.ignoreToken(e))},SwitchCase(e){if(1!==e.consequent.length||"BlockStatement"!==e.consequent[0].type){let t=s.getFirstToken(e),n=s.getTokenAfter(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)}},TemplateLiteral(e){e.expressions.forEach((t,a)=>{let l=e.quasis[a],p=e.quasis[a+1],c=s_(l)?s.getFirstToken(l):null,u=(0,sL.isTokenOnSameLine)(l,t),d=(0,sL.isTokenOnSameLine)(t,p);if(c||d&&!u){o.setDesiredOffsets([l.range[1],p.range[0]],c,1),o.setDesiredOffset(s.getFirstToken(p),c,0);return}let f=s.text.slice(l.range[1]-l.loc.end.column,l.range[1]-2).split(""),m=f.findIndex(e=>" "!==e&&" "!==e);-1===m&&(m=f.length);let h=f.slice(0,m).filter(e=>" "===e).length,g=m-h+Math.ceil(h/("tab"===n?i.tabLength:r)),y=d?g:g+1;o.setDesiredOffsets([l.range[1],p.range[0]],c,y),o.setDesiredOffset(s.getFirstToken(p),c,g)})},VariableDeclaration(e){if(0===e.declarations.length)return;let t="await using"===e.kind?"using":e.kind,n=Object.prototype.hasOwnProperty.call(i.VariableDeclarator,t)?i.VariableDeclarator[t]:1,l="first"===n,p=s.getFirstToken(e),c=s.getLastToken(e);if(e.declarations.at(-1).loc.start.line>e.loc.start.line){if(l){u(e.declarations,p,c,n);let t=s.getFirstToken(e.declarations[0]);n=(a.getTokenIndent(t).length-a.getTokenIndent(p).length)/r}o.setDesiredOffsets(e.range,p,n,!0)}else l&&(n=1),o.setDesiredOffsets(e.range,p,n);(0,sL.isSemicolonToken)(c)&&o.ignoreToken(c)},VariableDeclarator(e){if(e.init){let t=s.getTokenBefore(e.init,sL.isNotOpeningParenToken);x(e,t)}},JSXText(t){if(!t.parent||"JSXElement"!==t.parent.type&&"JSXFragment"!==t.parent.type)return;let i=t.value,s="space"===n?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,a=Array.from(String(i).matchAll(s),e=>e[1]?e[1].length:0),o=a.length>0,l=function(t,r=!1,i=!1){let s=e.sourceCode.getText(t,t.loc.start.column),a=s.split("\n");s=r?a[a.length-1]:a[0];let o=i?",":"",l=("space"===n?RegExp(`^[ ${o}]+`):RegExp(`^[ ${o}]+`)).exec(s);return l?l[0].length:0}(t.parent)+r;o&&!a.every(e=>e===l)&&a.forEach(r=>{e.report({node:t,messageId:"wrongIndentation",data:p(l,r,r),fix(e){let r="space"===n?" ":" ",i=Array(l+1).join(r),s=t.raw.replace(/\n[\t ]*(\S)/g,(e,t)=>`
3
- ${i}${t}`);return e.replaceText(t,s)}})})},JSXAttribute(e){if(!e.value)return;let t=s.getFirstTokenBetween(e.name,e.value,ss);o.setDesiredOffsets([t.range[0],e.value.range[1]],s.getFirstToken(e.name),1)},JSXElement(e){e.closingElement&&u(e.children,s.getFirstToken(e.openingElement),s.getFirstToken(e.closingElement),1)},JSXOpeningElement(e){let t,n=s.getFirstToken(e);e.selfClosing?(t=s.getLastToken(e,{skip:1}),o.setDesiredOffset(s.getLastToken(e),t,0)):t=s.getLastToken(e),o.setDesiredOffsets(e.name.range,n,0),u(e.attributes,n,t,1)},JSXClosingElement(e){let t=s.getFirstToken(e);o.setDesiredOffsets(e.name.range,t,1)},JSXFragment(e){let t=s.getFirstToken(e.openingFragment),n=s.getFirstToken(e.closingFragment);u(e.children,t,n,1)},JSXOpeningFragment(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets(e.range,t,1),o.matchOffsetOf(t,n)},JSXClosingFragment(e){let t=s.getFirstToken(e),n=s.getLastToken(e,{skip:1}),r=s.getLastToken(e),i=(0,sL.isTokenOnSameLine)(n,r)?n:r;o.setDesiredOffsets(e.range,t,1),o.matchOffsetOf(t,i)},JSXExpressionContainer(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXSpreadAttribute(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXMemberExpression(e){k(e,e.object,e.property)},TSTypeAliasDeclaration(e){let t=s.getTokenBefore(e.typeAnnotation,sL.isNotOpeningParenToken);x(e,t);let n=s.getLastToken(e);(0,sL.isSemicolonToken)(n)&&o.ignoreToken(n)},TSTupleType:T,TSEnumDeclaration(e){let t=e.body?.members||e.members;S(e,t)},TSTypeLiteral(e){S(e,e.members)},TSMappedType(e){let t=s.getTokenBefore(e.constraint||e.typeParameter),n=[{parent:e,type:ro.AST_NODE_TYPES.Property,key:e.key||e.typeParameter,value:e.typeAnnotation,range:[t.range[0],e.typeAnnotation?e.typeAnnotation.range[1]:t.range[0]],loc:{start:t.loc.start,end:e.typeAnnotation?e.typeAnnotation.loc.end:t.loc.end},kind:"init",computed:!1,method:!1,optional:!1,shorthand:!1}];S(e,n)},TSAsExpression(e){E(e.expression,e.typeAnnotation,"as")},TSConditionalType(e){b(e,{parent:e,type:ro.AST_NODE_TYPES.BinaryExpression,operator:"extends",left:e.checkType,right:e.extendsType,range:[e.checkType.range[0],e.extendsType.range[1]],loc:{start:e.checkType.loc.start,end:e.extendsType.loc.end}},e.trueType,e.falseType)},TSImportEqualsDeclaration(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets(e.range,t,1),(0,sL.isSemicolonToken)(n)&&o.ignoreToken(n)},TSIndexedAccessType(e){k(e,e.objectType,e.indexType,!0)},TSInterfaceBody:w,TSInterfaceDeclaration(e){0!==e.extends.length&&v(e,e.extends)},TSQualifiedName(e){k(e,e.left,e.right)},TSTypeParameterDeclaration(e){if(!e.params.length)return;let t=s.getFirstToken(e),n=s.getLastToken(e);u(e.params,t,n,1)},TSTypeParameterInstantiation(e){if(!e.params.length)return;let t=s.getFirstToken(e),n=s.getLastToken(e);u(e.params,t,n,1)},TSModuleBlock:w,"*":function(e){let t=s.getFirstToken(e);t&&!y.has(t)&&o.setDesiredOffsets(e.range,t,0)}}))C[t]=e=>A.push({listener:c,node:e});let _=new Set;function O(e){_.add(e),y.add(s.getFirstToken(e))}let P=i.ignoredNodes.reduce((e,t)=>Object.assign(e,{[t]:O}),{});return{...C,...P,"*:exit":function(e){G.has(e.type)||O(e)},"Program:exit":function(){i.ignoreComments&&s.getAllComments().forEach(e=>o.ignoreToken(e));for(let e=0;e<A.length;e++){let t=A[e];_.has(t.node)||t.listener?.(t.node)}_.forEach(m),function(e){let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];(0,sL.isOpeningParenToken)(i)?t.push(i):(0,sL.isClosingParenToken)(i)&&n.push({left:t.pop(),right:i})}for(let e=n.length-1;e>=0;e--){let t=n[e].left,r=n[e].right;if(!l.has(t)&&!l.has(r)){let e=new Set(s.getTokensBetween(t,r));e.forEach(n=>{e.has(o.getFirstDependency(n))||o.setDesiredOffset(n,t,1)})}o.setDesiredOffset(r,t,0)}}(s.ast.tokens);let t=new WeakMap;for(let e=0;e<s.ast.comments.length;e++){let n=s.ast.comments[e],r=s.getTokenBefore(n,{includeComments:!0}),i=t.has(r)?t.get(r):r;t.set(n,i)}for(let n=1;n<s.lines.length+1;n++){if(!a.firstTokensByLineNumber.has(n))continue;let r=a.firstTokensByLineNumber.get(n);if(r.loc.start.line===n){if((0,sL.isCommentToken)(r)){let e=t.get(r),n=e?s.getTokenAfter(e):s.ast.tokens[0],i=e&&!g(e,r),a=n&&!g(r,n);if(n&&(0,sL.isSemicolonToken)(n)&&!(0,sL.isTokenOnSameLine)(r,n)&&o.setDesiredOffset(r,n,0),i&&c(r,o.getDesiredIndent(e))||a&&c(r,o.getDesiredIndent(n)))continue}c(r,o.getDesiredIndent(r))||function(t,n){let r=Array.from(a.getTokenIndent(t)),i=r.filter(e=>" "===e).length,s=r.filter(e=>" "===e).length;e.report({node:t,messageId:"wrongIndentation",data:p(n.length,i,s),loc:{start:{line:t.loc.start.line,column:0},end:{line:t.loc.start.line,column:t.loc.start.column}},fix(e){let r=[t.range[0]-t.loc.start.column,t.range[0]];return e.replaceTextRange(r,n)}})}(r,o.getDesiredIndent(r))}}}}}})}),al=nH(()=>{sM(),en=new Set(["a","abbr","acronym","b","bdo","big","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","tt","var"]),er=sF({name:"jsx-child-element-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces inside of curly braces in JSX attributes and expressions"},messages:{spacingAfterPrev:"Ambiguous spacing after previous element {{element}}",spacingBeforeNext:"Ambiguous spacing before next element {{element}}"},schema:[]},create(e){let t=/^[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*\S/,n=/\S[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*$/,r=e=>e.openingElement&&e.openingElement.name&&"JSXIdentifier"===e.openingElement.name.type&&e.openingElement.name.name||"",i=e=>"JSXElement"===e.type&&en.has(r(e)),s=s=>{let a=null,o=null;[...s.children,null].forEach(s=>{(a||s)&&(!a||i(a))&&o&&("Literal"===o.type||"JSXText"===o.type)&&(!s||i(s))&&(a&&String(o.value).match(t)?e.report({messageId:"spacingAfterPrev",node:a,loc:a.loc.end,data:{element:r(a)}}):s&&String(o.value).match(n)&&e.report({messageId:"spacingBeforeNext",node:s,loc:s.loc.start,data:{element:r(s)}})),a=o,o=s})};return{JSXElement:s,JSXFragment:s}}})}),ap=nH(()=>{sM(),ei=sF({name:"jsx-closing-bracket-location",meta:{type:"layout",docs:{description:"Enforce closing bracket location in JSX"},fixable:"code",messages:{bracketLocation:"The closing bracket must be {{location}}{{details}}"},schema:[{anyOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"object",properties:{location:{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]}},additionalProperties:!1},{type:"object",properties:{nonEmpty:{oneOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"boolean",enum:[!1]}]},selfClosing:{oneOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"boolean",enum:[!1]}]}},additionalProperties:!1}]}]},create(e){let t={"after-props":"placed after the last prop","after-tag":"placed after the opening tag","props-aligned":"aligned with the last prop","tag-aligned":"aligned with the opening tag","line-aligned":"aligned with the line containing the opening tag"},n="tag-aligned",r=e.options[0],i={nonEmpty:n,selfClosing:n};function s(e,t){switch(t){case"props-aligned":return e.lastProp.column;case"tag-aligned":return e.opening.column;case"line-aligned":return e.openingStartOfLine.column;default:return null}}function a(e,t){switch(t){case"after-tag":return e.tag.line===e.closing.line;case"after-props":return e.lastProp.lastLine===e.closing.line;case"props-aligned":case"tag-aligned":case"line-aligned":return s(e,t)===e.closing.column;default:return!0}}return"string"==typeof r?(i.nonEmpty=r,i.selfClosing=r):"object"==typeof r&&("location"in r&&(i.nonEmpty=r.location,i.selfClosing=r.location),"nonEmpty"in r&&(i.nonEmpty=r.nonEmpty),"selfClosing"in r&&(i.selfClosing=r.selfClosing)),{"JSXOpeningElement:exit":function(n){let r,o=n.attributes.at(-1),l=o?o.range[1]:null,p=function(t){let n,r=e.sourceCode,i=r.getFirstToken(t).loc.start,s=r.getLastTokens(t,t.selfClosing?2:1)[0].loc.start,a=r.getFirstToken(t.name).loc.start;t.attributes.length&&(n=t.attributes[t.attributes.length-1],n={column:r.getFirstToken(n).loc.start.column,firstLine:r.getFirstToken(n).loc.start.line,lastLine:r.getLastToken(n).loc.end.line});let o=r.lines[i.line-1],l=r.lines[s.line-1],p={openTab:/^\t/.test(o),closeTab:/^\t/.test(l)},c={column:/^\s*/.exec(o)?.[0].length,line:i.line};return{isTab:p,tag:a,opening:i,closing:s,lastProp:n,selfClosing:t.selfClosing,openingStartOfLine:c}}(n),c=void 0===p.lastProp?"after-tag":p.opening.line===p.lastProp.lastLine?"after-props":p.selfClosing?i.selfClosing:i.nonEmpty,u=!0;"tag-aligned"===c&&(u=p.isTab.openTab===p.isTab.closeTab);let d=e.sourceCode.getCommentsInside(n).at(-1),f=d&&d.range[0]>(o??n.name).range[1];if(("after-props"===c||"after-tag"===c)&&!(a(p,c)&&u)&&f&&(c="line-aligned"),a(p,c)&&u)return;let m={location:t[c],details:""},h=s(p,c);null!==h&&(r=p.lastProp&&p.lastProp.lastLine===p.closing.line,m.details=` (expected column ${h+1}${r?" on the next line)":")"}`),e.report({node:n,messageId:"bracketLocation",loc:p.closing,data:m,fix(t){let i=p.selfClosing?"/>":">";switch(c){case"after-tag":if(l)return t.replaceTextRange([l,n.range[1]],(r?"\n":"")+i);return t.replaceTextRange([n.name.range[1],n.range[1]],(r?"\n":" ")+i);case"after-props":return t.replaceTextRange([l,n.range[1]],(r?"\n":"")+i);case"props-aligned":case"tag-aligned":case"line-aligned":{let r=f?d.range[1]:l;return t.replaceTextRange([r,n.range[1]],`
4
- ${function(t,n,r){let i,s=[];switch(n){case"props-aligned":i=/^\s*/.exec(e.sourceCode.lines[t.lastProp.firstLine-1])[0];break;case"tag-aligned":case"line-aligned":i=/^\s*/.exec(e.sourceCode.lines[t.opening.line-1])[0];break;default:i=""}return i.length+1<(r||0)&&(s=Array.from({length:+r+1-i.length})),i+s.join(" ")}(p,c,h)}${i}`)}}return null}})}}}})}),ac=nH(()=>{sB(),sM(),ea={"tag-aligned":"matchIndent","line-aligned":"alignWithOpening"},eo=sF({name:"jsx-closing-tag-location",meta:{type:"layout",docs:{description:"Enforce closing tag location for multiline JSX"},fixable:"whitespace",messages:{onOwnLine:"Closing tag of a multiline JSX expression must be on its own line.",matchIndent:"Expected closing tag to match indentation of opening.",alignWithOpening:"Expected closing tag to be aligned with the line containing the opening tag"},schema:[{anyOf:[{type:"string",enum:["tag-aligned","line-aligned"],default:es="tag-aligned"}]}]},defaultOptions:[es],create(e){let t=e.options[0]||es;function n(n){if(!n.parent)return;let r=e.sourceCode,i="openingFragment"in n.parent?n.parent.openingFragment:n.parent.openingElement,s=r.getFirstToken(i).loc.start,a=r.lines[s.line-1],o={column:/^\s*/.exec(a)?.[0].length,line:s.line};if(i.loc.start.line===n.loc.start.line||i.loc.start.column===n.loc.start.column&&"tag-aligned"===t||o.column===n.loc.start.column&&"line-aligned"===t)return;let l=sA(e,n)?ea[t]:"onOwnLine";e.report({node:n,messageId:l,loc:n.loc,fix(r){let s=Array((("line-aligned"===t?o.column:i.loc.start.column)||0)+1).join(" ");return sA(e,n)?r.replaceTextRange([n.range[0]-n.loc.start.column,n.range[0]],s):r.insertTextBefore(n,`
5
- ${s}`)}})}return{JSXClosingElement:n,JSXClosingFragment:n}}})}),au=nH(()=>{sB(),sJ(),sM(),ec=["always",el="never",ep="ignore"],eu={props:el,children:el,propElementValues:ep},ed=sF({name:"jsx-curly-brace-presence",meta:{type:"layout",docs:{description:"Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes"},fixable:"code",messages:{unnecessaryCurly:"Curly braces are unnecessary here.",missingCurly:"Need to wrap this literal in a JSX expression."},schema:[{anyOf:[{type:"object",properties:{props:{type:"string",enum:ec},children:{type:"string",enum:ec},propElementValues:{type:"string",enum:ec}},additionalProperties:!1},{type:"string",enum:ec}]}]},create(e){let t=e.options[0],n="string"==typeof t?{props:t,children:t,propElementValues:ep}:Object.assign({},eu,t);function r(e){return sL.LINEBREAK_MATCHER.test(e)}function i(e){return/&[A-Z\d#]+;/gi.test(e)}function s(e){return""===e.replace(/&[A-Z\d#]+;/gi,"").trim()}function a(e){return/['"]/.test(e)}function o(e,t){return e.includes("\\")||i(e)||"JSXAttribute"!==t.parent.type&&/[{<>}]/.test(e)}function l(e){if("JSXExpressionContainer"===e.type){let t=e.expression.value;return!!t&&sw(t)}return!1}function p(e){return r(e)&&""===e.trim()}function c(t){e.report({messageId:"unnecessaryCurly",node:t,fix(n){let r,i=t.expression;return r=sq(i)?e.sourceCode.getText(i):"JSXAttribute"===t.parent.type?`"${"TemplateLiteral"===i.type?i.quasis[0].value.raw:i.raw.slice(1,-1)}"`:sq(i)?e.sourceCode.getText(i):"TemplateLiteral"===i.type?i.quasis[0].value.cooked:i.value,n.replaceText(t,r)}})}function u(e){return e.type&&"Literal"===e.type&&e.value&&sw(e.value)}function d(e){return/^\s|\s$/.test(e)}function f(e,t,n){return"JSXAttribute"===e.type&&"string"==typeof t.props&&t.props===n||sq(e)&&"string"==typeof t.children&&t.children===n}function m(e,t){for(let n=1;n<t.length-1;n++)if(e===t[n])return[t[n-1],t[n+1]];return e===t[0]&&t[1]?[t[1]]:e===t[t.length-1]&&t[t.length-2]?[t[t.length-2]]:[]}return{"JSXAttribute > JSXExpressionContainer > JSXElement":function(e){n.propElementValues===el&&c(e.parent)},JSXExpressionContainer(t){(function(e,t){var n,r;let i=e.parent;return!(i.type&&"JSXAttribute"===i.type&&e.expression&&e.expression.type&&"Literal"!==e.expression.type&&"StringLiteral"!==e.expression.type&&"TemplateLiteral"!==e.expression.type||sq(i)&&(n=i.children)&&m(e,n.filter(e=>!u(e))).some(e=>e.type&&"JSXExpressionContainer"===e.type))&&!(l(e)&&(r=i.children)&&m(e,r.filter(e=>!u(e))).some(e=>e.type&&["JSXExpressionContainer","JSXElement"].includes(e.type))||i.children&&1===i.children.length&&l(e))&&f(i,t,el)})(t,n)&&function(t){let n=t.expression,r=n.type,i=e.sourceCode;if(!i.getCommentsInside||!(i.getCommentsInside(t).length>0)){var s;!(("Literal"===r||"JSXText"===r)&&"string"==typeof n.value&&("JSXAttribute"===t.parent.type&&!u(n)||!(n.type&&"Literal"===n.type&&n.value&&d(n.value)))&&(s=n.value,!/\/\*/.test(s))&&!o(n.raw,t)&&(sq(t.parent)||!a(n.value)))?"TemplateLiteral"!==r||0!==n.expressions.length||n.quasis[0].value.raw.includes("\n")||d(n.quasis[0].value.raw)||o(n.quasis[0].value.raw,t)||a(n.quasis[0].value.cooked)?sq(n)&&c(t):c(t):c(t)}}(t)},"JSXAttribute > JSXElement, Literal, JSXText":function(t){(function(e,t){if(sq(e))return t.propElementValues!==ep;if(p(e.raw)||s(e.raw))return!1;let n=e.parent;return!(n.children&&1===n.children.length&&l(n.children[0]))&&f(n,t,"always")})(t,n)&&e.report({messageId:"missingCurly",node:t,fix(n){var a;if(sq(t))return n.replaceText(t,`{${e.sourceCode.getText(t)}}`);if(s(t.raw)||"JSXAttribute"===t.parent.type&&r(t.raw)||p(t.raw))return null;let o="JSXAttribute"===t.parent.type?`{"${t.raw.slice(1,-1).replace(/\\/g,"\\\\").replace(/\\"/g,'"').replace(/"/g,'\\"')}"}`:r(a=t.raw)?a.split("\n").map(e=>{if(""===e.trim())return e;let t=e.search(/\S/),n=e.slice(0,t),r=e.slice(t);return i(e)?`${n}${function(e){let t="<HTML_ENTITY>",n=e.split(/&[A-Z\d#]+;/gi).map(e=>""===e?"":`{${JSON.stringify(e)}}`).join(t);return e.match(/&[A-Z\d#]+;/gi).reduce((e,n)=>e.replace(t,n),n)}(r)}`:`${n}{${JSON.stringify(r)}}`}).join("\n"):`{${JSON.stringify(a)}}`;return n.replaceText(t,o)}})}}}})}),ad=nH(()=>{sB(),sM(),ef=sF({name:"jsx-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent linebreaks in curly braces in JSX attributes and expressions"},fixable:"whitespace",schema:[{anyOf:[{type:"string",enum:["consistent","never"]},{type:"object",properties:{singleline:{type:"string",enum:["consistent","require","forbid"]},multiline:{type:"string",enum:["consistent","require","forbid"]}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before '}'.",expectedAfter:"Expected newline after '{'.",unexpectedBefore:"Unexpected newline before '}'.",unexpectedAfter:"Unexpected newline after '{'."}},create(e){let t=e.sourceCode,n=function(e){let t=e.options[0]||"consistent";return"consistent"===t?{multiline:"consistent",singleline:"consistent"}:"never"===t?{multiline:"forbid",singleline:"forbid"}:{multiline:t.multiline||"consistent",singleline:t.singleline||"consistent"}}(e);return{JSXExpressionContainer(r){!function(r,i){let s=r.leftCurly,a=r.rightCurly,o=t.getTokenAfter(s),l=t.getTokenBefore(a),p=!(0,sL.isTokenOnSameLine)(s,o),c=!(0,sL.isTokenOnSameLine)(l,a),u=function(e,t){switch(!s_(e)?n.multiline:n.singleline){case"forbid":return!1;case"require":return!0;default:return t}}(i,p);p&&!u?e.report({node:s,messageId:"unexpectedAfter",fix:e=>t.getText().slice(s.range[1],o?.range[0]).trim()?null:e.removeRange([s.range[1],o.range[0]])}):!p&&u&&e.report({node:s,messageId:"expectedAfter",fix:e=>e.insertTextAfter(s,"\n")}),c&&!u?e.report({node:a,messageId:"unexpectedBefore",fix:e=>t.getText().slice(l.range[1],a.range[0]).trim()?null:e.removeRange([l.range[1],a.range[0]])}):!c&&u&&e.report({node:a,messageId:"expectedBefore",fix:e=>e.insertTextBefore(a,"\n")})}({leftCurly:t.getFirstToken(r),rightCurly:t.getLastToken(r)},r.expression)}}}})}),af=nH(()=>{sB(),sM(),eh=[(em={always:"always",never:"never"}).always,em.never],eg={noNewlineAfter:"There should be no newline after '{{token}}'",noNewlineBefore:"There should be no newline before '{{token}}'",noSpaceAfter:"There should be no space after '{{token}}'",noSpaceBefore:"There should be no space before '{{token}}'",spaceNeededAfter:"A space is required after '{{token}}'",spaceNeededBefore:"A space is required before '{{token}}'"},ex={anyOf:[ey={type:"object",properties:{when:{type:"string",enum:eh},allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:eh}},additionalProperties:!1}},additionalProperties:!1},{type:"boolean"}]},eT=sF({name:"jsx-curly-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces inside of curly braces in JSX attributes and expressions"},fixable:"code",messages:eg,schema:{type:"array",items:[{anyOf:[{type:"object",additionalProperties:!1,properties:{...ey.properties,attributes:ex,children:ex}},{type:"string",enum:eh}]},{type:"object",properties:{allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:eh}},additionalProperties:!1}},additionalProperties:!1}]}},create(e){function t(e,n,r=!1){let i=!0===e?{}:e,s=i.when||n.when,a="allowMultiline"in i?i.allowMultiline:n.allowMultiline,o=(i.spacing||{}).objectLiterals||n.objectLiteralSpaces;return r&&(o=o||s),{when:s,allowMultiline:a,objectLiteralSpaces:o}}let n=em.never,r=e.options[0]||{};eh.includes(r)&&(r=Object.assign({when:e.options[0]},e.options[1]));let i=t(r,{when:n,allowMultiline:!0}),s=!("attributes"in r)||r.attributes,a=s?t(s,i,!0):null,o="children"in r&&r.children,l=o?t(o,i,!0):null;function p(t,n,r,i,s=""){let a=e.sourceCode.text.slice(n,r);return a="start"===i?a.replace(/^\s+/gm,""):a.replace(/\s+$/gm,""),s===em.always&&("start"===i?a+=" ":a=` ${a}`),t.replaceTextRange([n,r],a)}function c(t,n,r){e.report({node:t,loc:n.loc.start,messageId:"noNewlineAfter",data:{token:n.value},fix(t){let i=e.sourceCode.getTokenAfter(n);return p(t,n.range[1],i.range[0],"start",r)}})}function u(t,n,r){e.report({node:t,loc:n.loc.start,messageId:"noNewlineBefore",data:{token:n.value},fix:t=>p(t,e.sourceCode.getTokenBefore(n).range[1],n.range[0],"end",r)})}function d(t){let n;switch(t.parent?.type){case"JSXAttribute":case"JSXOpeningElement":n=a;break;case"JSXElement":case"JSXFragment":n=l;break;default:return}if(null===n)return;let r=e.sourceCode,i=r.getFirstToken(t),s=r.getLastToken(t),o=r.getTokenAfter(i,{includeComments:!0}),d=r.getTokenBefore(s,{includeComments:!0});if(!o){o=r.getTokenAfter(i);let e=r.getCommentsBefore(o);o=e?e[0]:o}if(!d){d=r.getTokenBefore(s);let e=r.getCommentsAfter(d);d=e?e[e.length-1]:d}let f=i.value===o.value?n.objectLiteralSpaces:n.when;f===em.always?(r.isSpaceBetween(i,o)?n.allowMultiline||(0,sL.isTokenOnSameLine)(i,o)||c(t,i,f):e.report({node:t,loc:i.loc.start,messageId:"spaceNeededAfter",data:{token:i.value},fix:e=>e.insertTextAfter(i," ")}),r.isSpaceBetween(d,s)?n.allowMultiline||(0,sL.isTokenOnSameLine)(d,s)||u(t,s,f):e.report({node:t,loc:s.loc.start,messageId:"spaceNeededBefore",data:{token:s.value},fix:e=>e.insertTextBefore(s," ")})):f===em.never&&((0,sL.isTokenOnSameLine)(i,o)?r.isSpaceBetween(i,o)&&e.report({node:t,loc:i.loc.start,messageId:"noSpaceAfter",data:{token:i.value},fix(t){let n=e.sourceCode,r=n.getTokenAfter(i),s=n.getCommentsAfter(i);return s.length>0?p(t,i.range[1],Math.min(r.range[0],s[0].range[0]),"start"):p(t,i.range[1],r.range[0],"start")}}):n.allowMultiline||c(t,i,f),(0,sL.isTokenOnSameLine)(d,s)?r.isSpaceBetween(d,s)&&e.report({node:t,loc:s.loc.start,messageId:"noSpaceBefore",data:{token:s.value},fix(t){let n=e.sourceCode,r=n.getTokenBefore(s),i=n.getCommentsBefore(s);return i.length>0?p(t,Math.max(r.range[1],i[0].range[1]),s.range[0],"end"):p(t,r.range[1],s.range[0],"end")}}):n.allowMultiline||u(t,s,f))}return{JSXExpressionContainer:d,JSXSpreadAttribute:d}}})}),am=nH(()=>{sM(),eS=sF({name:"jsx-equals-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces around equal signs in JSX attributes"},fixable:"code",messages:{noSpaceBefore:"There should be no space before '='",noSpaceAfter:"There should be no space after '='",needSpaceBefore:"A space is required before '='",needSpaceAfter:"A space is required after '='"},schema:[{type:"string",enum:["always","never"]}]},create(e){let t=e.options[0]||"never";return{JSXOpeningElement(n){n.attributes.forEach(n=>{if("JSXSpreadAttribute"===n.type||null===n.value)return;let r=e.sourceCode,i=r.getTokenAfter(n.name),s=r.isSpaceBetween(n.name,i),a=r.isSpaceBetween(i,n.value);"never"===t?(s&&e.report({node:n,messageId:"noSpaceBefore",loc:i.loc.start,fix:e=>e.removeRange([n.name.range[1],i.range[0]])}),a&&e.report({node:n,messageId:"noSpaceAfter",loc:i.loc.start,fix:e=>e.removeRange([i.range[1],n.value.range[0]])})):"always"===t&&(s||e.report({messageId:"needSpaceBefore",node:n,loc:i.loc.start,fix:e=>e.insertTextBefore(i," ")}),a||e.report({node:n,messageId:"needSpaceAfter",loc:i.loc.start,fix:e=>e.insertTextAfter(i," ")}))})}}}})}),ah=nH(()=>{sB(),sM(),eb=sF({name:"jsx-first-prop-new-line",meta:{type:"layout",docs:{description:"Enforce proper position of the first property in JSX"},fixable:"code",messages:{propOnNewLine:"Property should be placed on a new line",propOnSameLine:"Property should be placed on the same line as the component declaration"},schema:[{type:"string",enum:["always","never","multiline","multiline-multiprop","multiprop"]}]},create(e){let t=e.options[0]||"multiline-multiprop";return{JSXOpeningElement(n){if("multiline"===t&&!s_(n)||"multiline-multiprop"===t&&!s_(n)&&n.attributes.length>1||"multiprop"===t&&n.attributes.length>1||"always"===t)n.attributes.some(t=>(t.loc.start.line===n.loc.start.line&&e.report({node:t,messageId:"propOnNewLine",fix:e=>e.replaceTextRange([(n.typeArguments||n.name).range[1],t.range[0]],"\n")}),!0));else if("never"===t&&n.attributes.length>0||"multiprop"===t&&!s_(n)&&n.attributes.length<=1){let t=n.attributes[0];n.loc.start.line<t.loc.start.line&&e.report({node:t,messageId:"propOnSameLine",fix:e=>e.replaceTextRange([n.name.range[1],t.range[0]]," ")})}}}}})}),ag=nH(()=>{sB(),sJ(),sM(),eE=sF({name:"jsx-function-call-newline",meta:{type:"layout",docs:{description:"Enforce line breaks before and after JSX elements when they are used as arguments to a function."},fixable:"whitespace",messages:{missingLineBreak:"Missing line break around JSX"},schema:[{type:"string",enum:["always","multiline"]}]},create(e){let t=e.options[0]||"multiline";function n(n){if(!n||!sq(n))return;let r=e.sourceCode;if("always"===t||!s_(n)){let t=function(t){let n=e.sourceCode.getTokenBefore(t);return!!(0,sL.isTokenOnSameLine)(n,t)}(n),i=function(t){let n=e.sourceCode.getTokenAfter(t);return!function(e,t){let n=e.sourceCode.getTokenAfter(t);return!!n&&","===n.value&&n.range[0]>=t.range[1]}(e,t)&&t.loc.end.line===n.loc.end.line}(n);(t||i)&&e.report({node:n,messageId:"missingLineBreak",fix:e=>{let s=r.getText(n);return t&&(s=`
1
+ "use strict";let e,t;var n,r,i,s,a,o,l,p,c,u,d,f,m,h,g,y,x,T,S,b,E,k,w,v=require("@eslint-sukka/shared"),A=require("@next/eslint-plugin-next"),C=require("@eslint-sukka/eslint-plugin-react-jsx-a11y"),_=require("eslint-plugin-react-hooks"),O=require("eslint-plugin-react-compiler"),P=require("eslint-plugin-react-refresh"),I=require("@eslint-react/eslint-plugin"),N=require("node:module"),L=require("eslint-plugin-ssr-friendly"),D=require("@eslint/compat"),B="undefined"!=typeof document?document.currentScript:null;function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R={exports:{}},F={},M=R.exports,V=j(function(){if(i)return R.exports;i=1;var e=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};return Object.defineProperty(M,"__esModule",{value:!0}),R.exports={configs:{recommended:{plugins:["react-prefer-function-component"],rules:{"react-prefer-function-component/react-prefer-function-component":"error"}}},rules:{"react-prefer-function-component":e(function(){if(r)return F;r=1;Object.defineProperty(F,"__esModule",{value:!0}),F.ALLOW_JSX_UTILITY_CLASS=F.ALLOW_COMPONENT_DID_CATCH=F.COMPONENT_SHOULD_BE_FUNCTION=void 0,F.COMPONENT_SHOULD_BE_FUNCTION="componentShouldBeFunction",F.ALLOW_COMPONENT_DID_CATCH="allowComponentDidCatch",F.ALLOW_JSX_UTILITY_CLASS="allowJsxUtilityClass";let e={meta:{docs:{description:"Enforce components are written as function components",category:"Stylistic Issues",recommended:!1,url:"https://github.com/tatethurston/eslint-plugin-react-prefer-function-component#rule-details"},type:"problem",messages:{[F.COMPONENT_SHOULD_BE_FUNCTION]:"Class component should be written as a function"},schema:[{type:"object",properties:{[F.ALLOW_COMPONENT_DID_CATCH]:{default:!0,type:"boolean"},[F.ALLOW_JSX_UTILITY_CLASS]:{default:!1,type:"boolean"}},additionalProperties:!1}]},create(e){var t,n,r;let i=null!=(t=e.options[0])?t:{},s=null==(n=i.allowComponentDidCatch)||n,a=null!=(r=i.allowJsxUtilityClass)&&r,o=new Set;function l(e){e.body.body.some(e=>{if("key"in e&&"name"in e.key)return"componentDidCatch"===e.key.name})&&s||o.add(e)}function p(e){a||l(e)}return{"ClassDeclaration:has(JSXElement)":p,"ClassDeclaration:has(JSXFragment)":p,"ClassExpression:has(JSXElement)":p,"ClassExpression:has(JSXFragment)":p,"ClassDeclaration:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassDeclaration[superClass.name='Component']":l,"ClassDeclaration[superClass.name='PureComponent']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassExpression[superClass.name='Component']":l,"ClassExpression[superClass.name='PureComponent']":l,"Program:exit":function(){o.forEach(t=>{var n;switch(t.type){case"ClassDeclaration":case"ClassExpression":return e.report({node:null!=(n=t.id)?n:t,messageId:F.COMPONENT_SHOULD_BE_FUNCTION})}})}}}};return F.default=e,F}()).default}},R.exports}()),$=Object.create,q=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,X=Object.getOwnPropertyNames,J=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty,W=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),K=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,s=X(t),a=0,o=s.length;a<o;a++)i=s[a],U.call(e,i)||i===n||q(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(r=Y(t,i))||r.enumerable});return e},H=(e,t,n)=>K(q(null!=e?$(J(e)):{},"default",{value:e,enumerable:!0}),e),G=N.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:B&&"SCRIPT"===B.tagName.toUpperCase()&&B.src||new URL("index.cjs",document.baseURI).href),z=W(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.isParenthesized=e.hasSideEffect=e.getStringIfConstant=e.getStaticValue=e.getPropertyName=e.getFunctionNameWithKind=e.getFunctionHeadLocation=void 0;let s=i(G("@eslint-community/eslint-utils"));e.getFunctionHeadLocation=s.getFunctionHeadLocation,e.getFunctionNameWithKind=s.getFunctionNameWithKind,e.getPropertyName=s.getPropertyName,e.getStaticValue=s.getStaticValue,e.getStringIfConstant=s.getStringIfConstant,e.hasSideEffect=s.hasSideEffect,e.isParenthesized=s.isParenthesized}),Q=W(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.PatternMatcher=void 0,e.PatternMatcher=i(G("@eslint-community/eslint-utils")).PatternMatcher}),Z=W(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.isNotSemicolonToken=e.isSemicolonToken=e.isNotOpeningParenToken=e.isOpeningParenToken=e.isNotOpeningBracketToken=e.isOpeningBracketToken=e.isNotOpeningBraceToken=e.isOpeningBraceToken=e.isNotCommentToken=e.isCommentToken=e.isNotCommaToken=e.isCommaToken=e.isNotColonToken=e.isColonToken=e.isNotClosingParenToken=e.isClosingParenToken=e.isNotClosingBracketToken=e.isClosingBracketToken=e.isNotClosingBraceToken=e.isClosingBraceToken=e.isNotArrowToken=e.isArrowToken=void 0;let s=i(G("@eslint-community/eslint-utils"));e.isArrowToken=s.isArrowToken,e.isNotArrowToken=s.isNotArrowToken,e.isClosingBraceToken=s.isClosingBraceToken,e.isNotClosingBraceToken=s.isNotClosingBraceToken,e.isClosingBracketToken=s.isClosingBracketToken,e.isNotClosingBracketToken=s.isNotClosingBracketToken,e.isClosingParenToken=s.isClosingParenToken,e.isNotClosingParenToken=s.isNotClosingParenToken,e.isColonToken=s.isColonToken,e.isNotColonToken=s.isNotColonToken,e.isCommaToken=s.isCommaToken,e.isNotCommaToken=s.isNotCommaToken,e.isCommentToken=s.isCommentToken,e.isNotCommentToken=s.isNotCommentToken,e.isOpeningBraceToken=s.isOpeningBraceToken,e.isNotOpeningBraceToken=s.isNotOpeningBraceToken,e.isOpeningBracketToken=s.isOpeningBracketToken,e.isNotOpeningBracketToken=s.isNotOpeningBracketToken,e.isOpeningParenToken=s.isOpeningParenToken,e.isNotOpeningParenToken=s.isNotOpeningParenToken,e.isSemicolonToken=s.isSemicolonToken,e.isNotSemicolonToken=s.isNotSemicolonToken}),ee=W(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceTracker=void 0;let s=i(G("@eslint-community/eslint-utils"));s.ReferenceTracker.READ,s.ReferenceTracker.CALL,s.ReferenceTracker.CONSTRUCT,s.ReferenceTracker.ESM,e.ReferenceTracker=s.ReferenceTracker}),et=W(e=>{var t,n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var s=t(e),a=0;a<s.length;a++)"default"!==s[a]&&n(i,e,s[a]);return r(i,e),i});Object.defineProperty(e,"__esModule",{value:!0}),e.getInnermostScope=e.findVariable=void 0;let s=i(G("@eslint-community/eslint-utils"));e.findVariable=s.findVariable,e.getInnermostScope=s.getInnermostScope}),en=W(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(z(),e),n(Q(),e),n(Z(),e),n(ee(),e),n(et(),e)}),er=W(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNotTokenOfTypeWithConditions=e.isTokenOfTypeWithConditions=e.isNodeOfTypeWithConditions=e.isNodeOfTypes=e.isNodeOfType=void 0,e.isNodeOfType=e=>t=>t?.type===e,e.isNodeOfTypes=e=>t=>!!t&&e.includes(t.type),e.isNodeOfTypeWithConditions=(e,t)=>{let n=Object.entries(t);return t=>t?.type===e&&n.every(([e,n])=>t[e]===n)},e.isTokenOfTypeWithConditions=(e,t)=>{let n=Object.entries(t);return t=>t?.type===e&&n.every(([e,n])=>t[e]===n)},e.isNotTokenOfTypeWithConditions=(t,n)=>r=>!(0,e.isTokenOfTypeWithConditions)(t,n)(r)}),ei=W(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LINEBREAK_MATCHER=void 0,e.isTokenOnSameLine=function(e,t){return e.loc.end.line===t.loc.start.line},e.LINEBREAK_MATCHER=/\r\n|[\r\n\u2028\u2029]/}),es=W(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TSESTree=e.AST_TOKEN_TYPES=e.AST_NODE_TYPES=void 0;var t=G("@typescript-eslint/types");Object.defineProperty(e,"AST_NODE_TYPES",{enumerable:!0,get:function(){return t.AST_NODE_TYPES}}),Object.defineProperty(e,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return t.AST_TOKEN_TYPES}}),Object.defineProperty(e,"TSESTree",{enumerable:!0,get:function(){return t.TSESTree}})}),ea=W(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isLoop=e.isImportKeyword=e.isTypeKeyword=e.isAwaitKeyword=e.isAwaitExpression=e.isIdentifier=e.isConstructor=e.isClassOrTypeElement=e.isTSConstructorType=e.isTSFunctionType=e.isFunctionOrFunctionType=e.isFunctionType=e.isFunction=e.isVariableDeclarator=e.isTypeAssertion=e.isLogicalOrOperator=e.isOptionalCallExpression=e.isNotNonNullAssertionPunctuator=e.isNonNullAssertionPunctuator=e.isNotOptionalChainPunctuator=e.isOptionalChainPunctuator=void 0,e.isSetter=function(e){return!!e&&(e.type===t.AST_NODE_TYPES.MethodDefinition||e.type===t.AST_NODE_TYPES.Property)&&"set"===e.kind};let t=es(),n=er();e.isOptionalChainPunctuator=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"?."}),e.isNotOptionalChainPunctuator=(0,n.isNotTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"?."}),e.isNonNullAssertionPunctuator=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"!"}),e.isNotNonNullAssertionPunctuator=(0,n.isNotTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Punctuator,{value:"!"}),e.isOptionalCallExpression=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.CallExpression,{optional:!0}),e.isLogicalOrOperator=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.LogicalExpression,{operator:"||"}),e.isTypeAssertion=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.TSAsExpression,t.AST_NODE_TYPES.TSTypeAssertion]),e.isVariableDeclarator=(0,n.isNodeOfType)(t.AST_NODE_TYPES.VariableDeclarator);let r=[t.AST_NODE_TYPES.ArrowFunctionExpression,t.AST_NODE_TYPES.FunctionDeclaration,t.AST_NODE_TYPES.FunctionExpression];e.isFunction=(0,n.isNodeOfTypes)(r);let i=[t.AST_NODE_TYPES.TSCallSignatureDeclaration,t.AST_NODE_TYPES.TSConstructorType,t.AST_NODE_TYPES.TSConstructSignatureDeclaration,t.AST_NODE_TYPES.TSDeclareFunction,t.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,t.AST_NODE_TYPES.TSFunctionType,t.AST_NODE_TYPES.TSMethodSignature];e.isFunctionType=(0,n.isNodeOfTypes)(i),e.isFunctionOrFunctionType=(0,n.isNodeOfTypes)([...r,...i]),e.isTSFunctionType=(0,n.isNodeOfType)(t.AST_NODE_TYPES.TSFunctionType),e.isTSConstructorType=(0,n.isNodeOfType)(t.AST_NODE_TYPES.TSConstructorType),e.isClassOrTypeElement=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.PropertyDefinition,t.AST_NODE_TYPES.FunctionExpression,t.AST_NODE_TYPES.MethodDefinition,t.AST_NODE_TYPES.TSAbstractPropertyDefinition,t.AST_NODE_TYPES.TSAbstractMethodDefinition,t.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,t.AST_NODE_TYPES.TSIndexSignature,t.AST_NODE_TYPES.TSCallSignatureDeclaration,t.AST_NODE_TYPES.TSConstructSignatureDeclaration,t.AST_NODE_TYPES.TSMethodSignature,t.AST_NODE_TYPES.TSPropertySignature]),e.isConstructor=(0,n.isNodeOfTypeWithConditions)(t.AST_NODE_TYPES.MethodDefinition,{kind:"constructor"}),e.isIdentifier=(0,n.isNodeOfType)(t.AST_NODE_TYPES.Identifier),e.isAwaitExpression=(0,n.isNodeOfType)(t.AST_NODE_TYPES.AwaitExpression),e.isAwaitKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Identifier,{value:"await"}),e.isTypeKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Identifier,{value:"type"}),e.isImportKeyword=(0,n.isTokenOfTypeWithConditions)(t.AST_TOKEN_TYPES.Keyword,{value:"import"}),e.isLoop=(0,n.isNodeOfTypes)([t.AST_NODE_TYPES.DoWhileStatement,t.AST_NODE_TYPES.ForStatement,t.AST_NODE_TYPES.ForInStatement,t.AST_NODE_TYPES.ForOfStatement,t.AST_NODE_TYPES.WhileStatement])}),eo=W(e=>{var t=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(en(),e),n(er(),e),n(ei(),e),n(ea(),e)}),el={},ep={};function ec(){var e,t,n,r;return s?ep:(s=1,Object.defineProperty(ep,"__esModule",{value:!0}),ep.AST_TOKEN_TYPES=ep.AST_NODE_TYPES=void 0,(n=e||(ep.AST_NODE_TYPES=e={})).AccessorProperty="AccessorProperty",n.ArrayExpression="ArrayExpression",n.ArrayPattern="ArrayPattern",n.ArrowFunctionExpression="ArrowFunctionExpression",n.AssignmentExpression="AssignmentExpression",n.AssignmentPattern="AssignmentPattern",n.AwaitExpression="AwaitExpression",n.BinaryExpression="BinaryExpression",n.BlockStatement="BlockStatement",n.BreakStatement="BreakStatement",n.CallExpression="CallExpression",n.CatchClause="CatchClause",n.ChainExpression="ChainExpression",n.ClassBody="ClassBody",n.ClassDeclaration="ClassDeclaration",n.ClassExpression="ClassExpression",n.ConditionalExpression="ConditionalExpression",n.ContinueStatement="ContinueStatement",n.DebuggerStatement="DebuggerStatement",n.Decorator="Decorator",n.DoWhileStatement="DoWhileStatement",n.EmptyStatement="EmptyStatement",n.ExportAllDeclaration="ExportAllDeclaration",n.ExportDefaultDeclaration="ExportDefaultDeclaration",n.ExportNamedDeclaration="ExportNamedDeclaration",n.ExportSpecifier="ExportSpecifier",n.ExpressionStatement="ExpressionStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Identifier="Identifier",n.IfStatement="IfStatement",n.ImportAttribute="ImportAttribute",n.ImportDeclaration="ImportDeclaration",n.ImportDefaultSpecifier="ImportDefaultSpecifier",n.ImportExpression="ImportExpression",n.ImportNamespaceSpecifier="ImportNamespaceSpecifier",n.ImportSpecifier="ImportSpecifier",n.JSXAttribute="JSXAttribute",n.JSXClosingElement="JSXClosingElement",n.JSXClosingFragment="JSXClosingFragment",n.JSXElement="JSXElement",n.JSXEmptyExpression="JSXEmptyExpression",n.JSXExpressionContainer="JSXExpressionContainer",n.JSXFragment="JSXFragment",n.JSXIdentifier="JSXIdentifier",n.JSXMemberExpression="JSXMemberExpression",n.JSXNamespacedName="JSXNamespacedName",n.JSXOpeningElement="JSXOpeningElement",n.JSXOpeningFragment="JSXOpeningFragment",n.JSXSpreadAttribute="JSXSpreadAttribute",n.JSXSpreadChild="JSXSpreadChild",n.JSXText="JSXText",n.LabeledStatement="LabeledStatement",n.Literal="Literal",n.LogicalExpression="LogicalExpression",n.MemberExpression="MemberExpression",n.MetaProperty="MetaProperty",n.MethodDefinition="MethodDefinition",n.NewExpression="NewExpression",n.ObjectExpression="ObjectExpression",n.ObjectPattern="ObjectPattern",n.PrivateIdentifier="PrivateIdentifier",n.Program="Program",n.Property="Property",n.PropertyDefinition="PropertyDefinition",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.StaticBlock="StaticBlock",n.Super="Super",n.SwitchCase="SwitchCase",n.SwitchStatement="SwitchStatement",n.TaggedTemplateExpression="TaggedTemplateExpression",n.TemplateElement="TemplateElement",n.TemplateLiteral="TemplateLiteral",n.ThisExpression="ThisExpression",n.ThrowStatement="ThrowStatement",n.TryStatement="TryStatement",n.UnaryExpression="UnaryExpression",n.UpdateExpression="UpdateExpression",n.VariableDeclaration="VariableDeclaration",n.VariableDeclarator="VariableDeclarator",n.WhileStatement="WhileStatement",n.WithStatement="WithStatement",n.YieldExpression="YieldExpression",n.TSAbstractAccessorProperty="TSAbstractAccessorProperty",n.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",n.TSAnyKeyword="TSAnyKeyword",n.TSArrayType="TSArrayType",n.TSAsExpression="TSAsExpression",n.TSAsyncKeyword="TSAsyncKeyword",n.TSBigIntKeyword="TSBigIntKeyword",n.TSBooleanKeyword="TSBooleanKeyword",n.TSCallSignatureDeclaration="TSCallSignatureDeclaration",n.TSClassImplements="TSClassImplements",n.TSConditionalType="TSConditionalType",n.TSConstructorType="TSConstructorType",n.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",n.TSDeclareFunction="TSDeclareFunction",n.TSDeclareKeyword="TSDeclareKeyword",n.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",n.TSEnumBody="TSEnumBody",n.TSEnumDeclaration="TSEnumDeclaration",n.TSEnumMember="TSEnumMember",n.TSExportAssignment="TSExportAssignment",n.TSExportKeyword="TSExportKeyword",n.TSExternalModuleReference="TSExternalModuleReference",n.TSFunctionType="TSFunctionType",n.TSImportEqualsDeclaration="TSImportEqualsDeclaration",n.TSImportType="TSImportType",n.TSIndexedAccessType="TSIndexedAccessType",n.TSIndexSignature="TSIndexSignature",n.TSInferType="TSInferType",n.TSInstantiationExpression="TSInstantiationExpression",n.TSInterfaceBody="TSInterfaceBody",n.TSInterfaceDeclaration="TSInterfaceDeclaration",n.TSInterfaceHeritage="TSInterfaceHeritage",n.TSIntersectionType="TSIntersectionType",n.TSIntrinsicKeyword="TSIntrinsicKeyword",n.TSLiteralType="TSLiteralType",n.TSMappedType="TSMappedType",n.TSMethodSignature="TSMethodSignature",n.TSModuleBlock="TSModuleBlock",n.TSModuleDeclaration="TSModuleDeclaration",n.TSNamedTupleMember="TSNamedTupleMember",n.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",n.TSNeverKeyword="TSNeverKeyword",n.TSNonNullExpression="TSNonNullExpression",n.TSNullKeyword="TSNullKeyword",n.TSNumberKeyword="TSNumberKeyword",n.TSObjectKeyword="TSObjectKeyword",n.TSOptionalType="TSOptionalType",n.TSParameterProperty="TSParameterProperty",n.TSPrivateKeyword="TSPrivateKeyword",n.TSPropertySignature="TSPropertySignature",n.TSProtectedKeyword="TSProtectedKeyword",n.TSPublicKeyword="TSPublicKeyword",n.TSQualifiedName="TSQualifiedName",n.TSReadonlyKeyword="TSReadonlyKeyword",n.TSRestType="TSRestType",n.TSSatisfiesExpression="TSSatisfiesExpression",n.TSStaticKeyword="TSStaticKeyword",n.TSStringKeyword="TSStringKeyword",n.TSSymbolKeyword="TSSymbolKeyword",n.TSTemplateLiteralType="TSTemplateLiteralType",n.TSThisType="TSThisType",n.TSTupleType="TSTupleType",n.TSTypeAliasDeclaration="TSTypeAliasDeclaration",n.TSTypeAnnotation="TSTypeAnnotation",n.TSTypeAssertion="TSTypeAssertion",n.TSTypeLiteral="TSTypeLiteral",n.TSTypeOperator="TSTypeOperator",n.TSTypeParameter="TSTypeParameter",n.TSTypeParameterDeclaration="TSTypeParameterDeclaration",n.TSTypeParameterInstantiation="TSTypeParameterInstantiation",n.TSTypePredicate="TSTypePredicate",n.TSTypeQuery="TSTypeQuery",n.TSTypeReference="TSTypeReference",n.TSUndefinedKeyword="TSUndefinedKeyword",n.TSUnionType="TSUnionType",n.TSUnknownKeyword="TSUnknownKeyword",n.TSVoidKeyword="TSVoidKeyword",(r=t||(ep.AST_TOKEN_TYPES=t={})).Boolean="Boolean",r.Identifier="Identifier",r.JSXIdentifier="JSXIdentifier",r.PrivateIdentifier="PrivateIdentifier",r.JSXText="JSXText",r.Keyword="Keyword",r.Null="Null",r.Numeric="Numeric",r.Punctuator="Punctuator",r.RegularExpression="RegularExpression",r.String="String",r.Template="Template",r.Block="Block",r.Line="Line",ep)}var eu={},ed={},ef={},em=function(){var e,t,n;return p?el:(p=1,e=el&&el.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=el&&el.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)},Object.defineProperty(el,"__esModule",{value:!0}),el.AST_TOKEN_TYPES=el.AST_NODE_TYPES=void 0,n=ec(),Object.defineProperty(el,"AST_NODE_TYPES",{enumerable:!0,get:function(){return n.AST_NODE_TYPES}}),Object.defineProperty(el,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return n.AST_TOKEN_TYPES}}),t((a||(a=1,Object.defineProperty(eu,"__esModule",{value:!0})),eu),el),t((o||(o=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed),el),t(function(){if(l)return ef;l=1;var e,t=ef&&ef.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=ef&&ef.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=ef&&ef.__importStar||(e=function(t){return(e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(t)},function(r){if(r&&r.__esModule)return r;var i={};if(null!=r)for(var s=e(r),a=0;a<s.length;a++)"default"!==s[a]&&t(i,r,s[a]);return n(i,r),i});return Object.defineProperty(ef,"__esModule",{value:!0}),ef.TSESTree=void 0,ef.TSESTree=r(ec()),ef}(),el),el)}();const eh={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]};for(const e of Object.keys(eh))Object.freeze(eh[e]);Object.freeze(eh);var eg=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],ey=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ex="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",eT={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"},eS="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",eb={5:eS,"5module":eS+" export import",6:eS+" const class extends export import super"},eE=/^in(stanceof)?$/,ek=RegExp("["+ex+"]"),ew=RegExp("["+ex+"‌‍\xb7̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function ev(e,t){for(var n=65536,r=0;r<t.length&&!((n+=t[r])>e);r+=2)if((n+=t[r+1])>=e)return!0;return!1}function eA(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&ek.test(String.fromCharCode(e)):!1!==t&&ev(e,ey)))}function eC(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&ew.test(String.fromCharCode(e)):!1!==t&&(ev(e,ey)||ev(e,eg)))))}var e_=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function eO(e,t){return new e_(e,{beforeExpr:!0,binop:t})}var eP={beforeExpr:!0},eI={startsExpr:!0},eN={};function eL(e,t){return void 0===t&&(t={}),t.keyword=e,eN[e]=new e_(e,t)}var eD={num:new e_("num",eI),regexp:new e_("regexp",eI),string:new e_("string",eI),name:new e_("name",eI),privateId:new e_("privateId",eI),eof:new e_("eof"),bracketL:new e_("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new e_("]"),braceL:new e_("{",{beforeExpr:!0,startsExpr:!0}),braceR:new e_("}"),parenL:new e_("(",{beforeExpr:!0,startsExpr:!0}),parenR:new e_(")"),comma:new e_(",",eP),semi:new e_(";",eP),colon:new e_(":",eP),dot:new e_("."),question:new e_("?",eP),questionDot:new e_("?."),arrow:new e_("=>",eP),template:new e_("template"),invalidTemplate:new e_("invalidTemplate"),ellipsis:new e_("...",eP),backQuote:new e_("`",eI),dollarBraceL:new e_("${",{beforeExpr:!0,startsExpr:!0}),eq:new e_("=",{beforeExpr:!0,isAssign:!0}),assign:new e_("_=",{beforeExpr:!0,isAssign:!0}),incDec:new e_("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new e_("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:eO("||",1),logicalAND:eO("&&",2),bitwiseOR:eO("|",3),bitwiseXOR:eO("^",4),bitwiseAND:eO("&",5),equality:eO("==/!=/===/!==",6),relational:eO("</>/<=/>=",7),bitShift:eO("<</>>/>>>",8),plusMin:new e_("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:eO("%",10),star:eO("*",10),slash:eO("/",10),starstar:new e_("**",{beforeExpr:!0}),coalesce:eO("??",1),_break:eL("break"),_case:eL("case",eP),_catch:eL("catch"),_continue:eL("continue"),_debugger:eL("debugger"),_default:eL("default",eP),_do:eL("do",{isLoop:!0,beforeExpr:!0}),_else:eL("else",eP),_finally:eL("finally"),_for:eL("for",{isLoop:!0}),_function:eL("function",eI),_if:eL("if"),_return:eL("return",eP),_switch:eL("switch"),_throw:eL("throw",eP),_try:eL("try"),_var:eL("var"),_const:eL("const"),_while:eL("while",{isLoop:!0}),_with:eL("with"),_new:eL("new",{beforeExpr:!0,startsExpr:!0}),_this:eL("this",eI),_super:eL("super",eI),_class:eL("class",eI),_extends:eL("extends",eP),_export:eL("export"),_import:eL("import",eI),_null:eL("null",eI),_true:eL("true",eI),_false:eL("false",eI),_in:eL("in",{beforeExpr:!0,binop:7}),_instanceof:eL("instanceof",{beforeExpr:!0,binop:7}),_typeof:eL("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:eL("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:eL("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},eB=/\r\n?|\n|\u2028|\u2029/,ej=RegExp(eB.source,"g");function eR(e){return 10===e||13===e||8232===e||8233===e}function eF(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(eR(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return -1}var eM=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,eV=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,e$=Object.prototype,eq=e$.hasOwnProperty,eY=e$.toString,eX=Object.hasOwn||function(e,t){return eq.call(e,t)},eJ=Array.isArray||function(e){return"[object Array]"===eY.call(e)},eU=Object.create(null);function eW(e){return eU[e]||(eU[e]=RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function eK(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}var eH=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,eG=function(e,t){this.line=e,this.column=t};eG.prototype.offset=function(e){return new eG(this.line,this.column+e)};var ez=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function eQ(e,t){for(var n=1,r=0;;){var i=eF(e,r,t);if(i<0)return new eG(n,t-r);++n,r=i}}var eZ={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},e0=!1;function e1(e,t){return 2|4*!!e|8*!!t}var e2=function(e,t,n){this.options=e=function(e){var t,n,r={};for(var i in eZ)r[i]=e&&eX(e,i)?e[i]:eZ[i];if("latest"===r.ecmaVersion?r.ecmaVersion=1e8:null==r.ecmaVersion?(!e0&&"object"==typeof console&&console.warn&&(e0=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),r.ecmaVersion=11):r.ecmaVersion>=2015&&(r.ecmaVersion-=2009),null==r.allowReserved&&(r.allowReserved=r.ecmaVersion<5),e&&null!=e.allowHashBang||(r.allowHashBang=r.ecmaVersion>=14),eJ(r.onToken)){var s=r.onToken;r.onToken=function(e){return s.push(e)}}return eJ(r.onComment)&&(t=r,n=r.onComment,r.onComment=function(e,r,i,s,a,o){var l={type:e?"Block":"Line",value:r,start:i,end:s};t.locations&&(l.loc=new ez(this,a,o)),t.ranges&&(l.range=[i,s]),n.push(l)}),r}(e),this.sourceFile=e.sourceFile,this.keywords=eW(eb[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=eT[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=eW(r);var i=(r?r+" ":"")+eT.strict;this.reservedWordsStrict=eW(i),this.reservedWordsStrictBind=eW(i+" "+eT.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(eB).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=eD.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="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},e3={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};e2.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},e3.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},e3.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},e3.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},e3.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t)return!1;if(2&t)return(4&t)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},e3.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0||this.options.allowSuperOutsideMethod},e3.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},e3.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},e3.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(768&t||2&t&&!(16&t))return!0}return!1},e3.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},e2.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},e2.parse=function(e,t){return new this(t,e).parse()},e2.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},e2.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(e2.prototype,e3);var e6=e2.prototype,e4=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;e6.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){eV.lastIndex=e,e+=eV.exec(this.input)[0].length;var t=e4.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){eV.lastIndex=e+t[0].length;var n=eV.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||eB.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}eV.lastIndex=e+=t[0].length,e+=eV.exec(this.input)[0].length,";"===this.input[e]&&e++}},e6.eat=function(e){return this.type===e&&(this.next(),!0)},e6.isContextual=function(e){return this.type===eD.name&&this.value===e&&!this.containsEsc},e6.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},e6.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},e6.canInsertSemicolon=function(){return this.type===eD.eof||this.type===eD.braceR||eB.test(this.input.slice(this.lastTokEnd,this.start))},e6.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},e6.semicolon=function(){this.eat(eD.semi)||this.insertSemicolon()||this.unexpected()},e6.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},e6.expect=function(e){this.eat(e)||this.unexpected()},e6.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var e5=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};e6.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},e6.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},e6.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},e6.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var e9=e2.prototype;e9.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==eD.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var s=i[r];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var e8={kind:"loop"},e7={kind:"switch"};e9.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;eV.lastIndex=this.pos;var t=eV.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(eA(r,!0)){for(var i=n+1;eC(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var s=this.input.slice(n,i);if(!eE.test(s))return!0}return!1},e9.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;eV.lastIndex=this.pos;var e,t=eV.exec(this.input),n=this.pos+t[0].length;return!eB.test(this.input.slice(this.pos,n))&&"function"===this.input.slice(n,n+8)&&(n+8===this.input.length||!(eC(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},e9.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;eV.lastIndex=this.pos;var n=eV.exec(this.input),r=this.pos+n[0].length;if(eB.test(this.input.slice(this.pos,r)))return!1;if(e){var i,s=r+5;if("using"!==this.input.slice(r,s)||s===this.input.length||eC(i=this.input.charCodeAt(s))||i>55295&&i<56320)return!1;eV.lastIndex=s;var a=eV.exec(this.input);if(a&&eB.test(this.input.slice(s,s+a[0].length)))return!1}if(t){var o,l=r+2;if("of"===this.input.slice(r,l)&&(l===this.input.length||!eC(o=this.input.charCodeAt(l))&&!(o>55295&&o<56320)))return!1}var p=this.input.charCodeAt(r);return eA(p,!0)||92===p},e9.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},e9.isUsing=function(e){return this.isUsingKeyword(!1,e)},e9.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet(e)&&(i=eD._var,r="let"),i){case eD._break:case eD._continue:return this.parseBreakContinueStatement(s,i.keyword);case eD._debugger:return this.parseDebuggerStatement(s);case eD._do:return this.parseDoStatement(s);case eD._for:return this.parseForStatement(s);case eD._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!e);case eD._class:return e&&this.unexpected(),this.parseClass(s,!0);case eD._if:return this.parseIfStatement(s);case eD._return:return this.parseReturnStatement(s);case eD._switch:return this.parseSwitchStatement(s);case eD._throw:return this.parseThrowStatement(s);case eD._try:return this.parseTryStatement(s);case eD._const:case eD._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(s,r);case eD._while:return this.parseWhileStatement(s);case eD._with:return this.parseWithStatement(s);case eD.braceL:return this.parseBlock(!0,s);case eD.semi:return this.parseEmptyStatement(s);case eD._export:case eD._import:if(this.options.ecmaVersion>10&&i===eD._import){eV.lastIndex=this.pos;var a=eV.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(s,this.parseExpression())}return!this.options.allowImportExportEverywhere&&(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===eD._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!e);var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===p&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,!1,p),this.semicolon(),this.finishNode(s,"VariableDeclaration");var c=this.value,u=this.parseExpression();if(i===eD.name&&"Identifier"===u.type&&this.eat(eD.colon))return this.parseLabeledStatement(s,c,u,e);return this.parseExpressionStatement(s,u)}},e9.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(eD.semi)||this.insertSemicolon()?e.label=null:this.type!==eD.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((null==e.label||i.name===e.label.name)&&(null!=i.kind&&(n||"loop"===i.kind)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},e9.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},e9.parseDoStatement=function(e){return this.next(),this.labels.push(e8),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(eD._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(eD.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},e9.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(e8),this.enterScope(0),this.expect(eD.parenL),this.type===eD.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===eD._var||this.type===eD._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();return this.next(),"await using"===o&&this.next(),this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var p=this.containsEsc,c=new e5,u=this.start,d=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);return this.type===eD._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===eD._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(d.start!==u||p||"Identifier"!==d.type||"async"!==d.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),s&&a&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,c),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))},e9.parseForAfterInit=function(e,t,n){return(this.type===eD._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===eD._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},e9.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,tt|(n?0:tn),!1,t)},e9.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(eD._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},e9.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(eD.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},e9.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(eD.braceL),this.labels.push(e7),this.enterScope(0);for(var t,n=!1;this.type!==eD.braceR;)if(this.type===eD._case||this.type===eD._default){var r=this.type===eD._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(eD.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},e9.parseThrowStatement=function(e){return this.next(),eB.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var te=[];e9.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(32*!!t),this.checkLValPattern(e,t?4:2),this.expect(eD.parenR),e},e9.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===eD._catch){var t=this.startNode();this.next(),this.eat(eD.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(eD._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},e9.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},e9.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(e8),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},e9.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},e9.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},e9.parseLabeledStatement=function(e,t,n,r){for(var i=0,s=this.labels;i<s.length;i+=1)s[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===eD._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var l=this.labels[o];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=a;else break}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},e9.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},e9.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(eD.braceL),e&&this.enterScope(0);this.type!==eD.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},e9.parseFor=function(e,t){return e.init=t,this.expect(eD.semi),e.test=this.type===eD.semi?null:this.parseExpression(),this.expect(eD.semi),e.update=this.type===eD.parenR?null:this.parseExpression(),this.expect(eD.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},e9.parseForIn=function(e,t){var n=this.type===eD._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(eD.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},e9.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(eD.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===eD._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===eD._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===eD._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(eD.comma))break}return e},e9.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var tt=1,tn=2;function tr(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}e9.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===eD.star&&t&tn&&this.unexpected(),e.generator=this.eat(eD.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&tt&&(e.id=4&t&&this.type!==eD.name?null:this.parseIdent(),e.id&&!(t&tn)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(e1(e.async,e.generator)),t&tt||(e.id=this.type===eD.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&tt?"FunctionDeclaration":"FunctionExpression")},e9.parseFunctionParams=function(e){this.expect(eD.parenL),e.params=this.parseBindingList(eD.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},e9.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),s=!1;for(i.body=[],this.expect(eD.braceL);this.type!==eD.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(i.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(s&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),s=!0):a.key&&"PrivateIdentifier"===a.key.type&&function(e,t){var n=t.key.name,r=e[n],i="true";return("MethodDefinition"===t.type&&("get"===t.kind||"set"===t.kind)&&(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i)?(e[n]="true",!1):!!r||(e[n]=i,!1)}(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},e9.parseClassElement=function(e){if(this.eat(eD.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(eD.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===eD.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===eD.star)&&!this.canInsertSemicolon()?s=!0:r="async"),!r&&(t>=9||!s)&&this.eat(eD.star)&&(i=!0),!r&&!s&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===eD.parenL||"method"!==a||i||s){var p=!n.static&&tr(n,"constructor");p&&"method"!==a&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=p?"constructor":a,this.parseClassMethod(n,i,s,p&&e)}else this.parseClassField(n);return n},e9.isClassElementNameStart=function(){return this.type===eD.name||this.type===eD.privateId||this.type===eD.num||this.type===eD.string||this.type===eD.bracketL||this.type.keyword},e9.parseClassElementName=function(e){this.type===eD.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},e9.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&tr(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==s.params.length&&this.raiseRecoverable(s.start,"getter should have no params"),"set"===e.kind&&1!==s.params.length&&this.raiseRecoverable(s.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===s.params[0].type&&this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},e9.parseClassField=function(e){return tr(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&tr(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(eD.eq)?(this.enterScope(576),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},e9.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==eD.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},e9.parseClassId=function(e,t){this.type===eD.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},e9.parseClassSuper=function(e){e.superClass=this.eat(eD._extends)?this.parseExprSubscripts(null,!1):null},e9.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},e9.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],s=0;s<n.length;++s){var a=n[s];eX(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},e9.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==eD.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},e9.parseExport=function(e,t){if(this.next(),this.eat(eD.star))return this.parseExportAllDeclaration(e,t);if(this.eat(eD._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==eD.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},e9.parseExportDeclaration=function(e){return this.parseStatement(null)},e9.parseExportDefaultDeclaration=function(){if(this.type===eD._function||(e=this.isAsyncFunction())){var e,t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,4|tt,!1,e)}if(this.type===eD._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},e9.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),eX(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},e9.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var s=i[r];this.checkPatternExport(e,s)}else if("ArrayPattern"===n)for(var a=0,o=t.elements;a<o.length;a+=1){var l=o[a];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},e9.checkVariableExport=function(e,t){if(e)for(var n=0;n<t.length;n+=1){var r=t[n];this.checkPatternExport(e,r.id)}},e9.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},e9.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},e9.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(eD.braceL);!this.eat(eD.braceR);){if(n)n=!1;else if(this.expect(eD.comma),this.afterTrailingComma(eD.braceR))break;t.push(this.parseExportSpecifier(e))}return t},e9.parseImport=function(e){return this.next(),this.type===eD.string?(e.specifiers=te,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===eD.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},e9.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportSpecifier")},e9.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportDefaultSpecifier")},e9.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,2),this.finishNode(e,"ImportNamespaceSpecifier")},e9.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===eD.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(eD.comma)))return e;if(this.type===eD.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(eD.braceL);!this.eat(eD.braceR);){if(t)t=!1;else if(this.expect(eD.comma),this.afterTrailingComma(eD.braceR))break;e.push(this.parseImportSpecifier())}return e},e9.parseWithClause=function(){var e=[];if(!this.eat(eD._with))return e;this.expect(eD.braceL);for(var t={},n=!0;!this.eat(eD.braceR);){if(n)n=!1;else if(this.expect(eD.comma),this.afterTrailingComma(eD.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;eX(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},e9.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===eD.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(eD.colon),this.type!==eD.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},e9.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===eD.string){var e=this.parseLiteral(this.value);return eH.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},e9.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},e9.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var ti=e2.prototype;ti.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.toAssignable(s,t),"RestElement"===s.type&&("ArrayPattern"===s.argument.type||"ObjectPattern"===s.argument.type)&&this.raise(s.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},ti.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var s=e[n-1];6===this.options.ecmaVersion&&t&&s&&"RestElement"===s.type&&"Identifier"!==s.argument.type&&this.unexpected(s.argument.start)}return e},ti.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ti.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==eD.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},ti.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case eD.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(eD.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case eD.braceL:return this.parseObj(!0)}return this.parseIdent()},ti.parseBindingList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);)if(s?s=!1:this.expect(eD.comma),t&&this.type===eD.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===eD.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===eD.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},ti.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},ti.parseBindingListItem=function(e){return e},ti.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(eD.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},ti.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(eX(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},ti.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var l=o[a];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},ti.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var ts=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},ta={b_stat:new ts("{",!1),b_expr:new ts("{",!0),b_tmpl:new ts("${",!1),p_stat:new ts("(",!1),p_expr:new ts("(",!0),q_tmpl:new ts("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ts("function",!1),f_expr:new ts("function",!0),f_expr_gen:new ts("function",!0,!1,null,!0),f_gen:new ts("function",!1,!1,null,!0)},to=e2.prototype;to.initialContext=function(){return[ta.b_stat]},to.curContext=function(){return this.context[this.context.length-1]},to.braceIsBlock=function(e){var t=this.curContext();return t===ta.f_expr||t===ta.f_stat||(e===eD.colon&&(t===ta.b_stat||t===ta.b_expr)?!t.isExpr:e===eD._return||e===eD.name&&this.exprAllowed?eB.test(this.input.slice(this.lastTokEnd,this.start)):e===eD._else||e===eD.semi||e===eD.eof||e===eD.parenR||e===eD.arrow||(e===eD.braceL?t===ta.b_stat:e!==eD._var&&e!==eD._const&&e!==eD.name&&!this.exprAllowed))},to.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},to.updateContext=function(e){var t,n=this.type;n.keyword&&e===eD.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},to.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},eD.parenR.updateContext=eD.braceR.updateContext=function(){if(1===this.context.length){this.exprAllowed=!0;return}var e=this.context.pop();e===ta.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},eD.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ta.b_stat:ta.b_expr),this.exprAllowed=!0},eD.dollarBraceL.updateContext=function(){this.context.push(ta.b_tmpl),this.exprAllowed=!0},eD.parenL.updateContext=function(e){var t=e===eD._if||e===eD._for||e===eD._with||e===eD._while;this.context.push(t?ta.p_stat:ta.p_expr),this.exprAllowed=!0},eD.incDec.updateContext=function(){},eD._function.updateContext=eD._class.updateContext=function(e){e.beforeExpr&&e!==eD._else&&(e!==eD.semi||this.curContext()===ta.p_stat)&&!(e===eD._return&&eB.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==eD.colon&&e!==eD.braceL||this.curContext()!==ta.b_stat)?this.context.push(ta.f_expr):this.context.push(ta.f_stat),this.exprAllowed=!1},eD.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},eD.backQuote.updateContext=function(){this.curContext()===ta.q_tmpl?this.context.pop():this.context.push(ta.q_tmpl),this.exprAllowed=!1},eD.star.updateContext=function(e){if(e===eD._function){var t=this.context.length-1;this.context[t]===ta.f_expr?this.context[t]=ta.f_expr_gen:this.context[t]=ta.f_gen}this.exprAllowed=!0},eD.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==eD.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var tl=e2.prototype;tl.checkPropClash=function(e,t,n){if((!(this.options.ecmaVersion>=9)||"SpreadElement"!==e.type)&&(!(this.options.ecmaVersion>=6)||!e.computed&&!e.method&&!e.shorthand)){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){"__proto__"===r&&"init"===s&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);return}var a=t[r="$"+r];a?("init"===s?this.strict&&a.init||a.get||a.set:a.init||a[s])&&this.raiseRecoverable(i.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[s]=!0}},tl.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===eD.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(eD.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},tl.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var r=!1,i=-1,s=-1,a=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new e5,r=!0);var o=this.start,l=this.startLoc;(this.type===eD.parenL||this.type===eD.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var p=this.parseMaybeConditional(e,t);if(n&&(p=n.call(this,p,o,l)),this.type.isAssign){var c=this.startNodeAt(o,l);return c.operator=this.value,this.type===eD.eq&&(p=this.toAssignable(p,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=p.start&&(t.shorthandAssign=-1),this.type===eD.eq?this.checkLValPattern(p):this.checkLValSimple(p),c.left=p,this.next(),c.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),p},tl.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(eD.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(eD.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},tl.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},tl.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==eD._in)&&s>r){var a=this.type===eD.logicalOR||this.type===eD.logicalAND,o=this.type===eD.coalesce;o&&(s=eD.logicalAND.binop);var l=this.value;this.next();var p=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),p,c,s,i),d=this.buildBinary(t,n,e,u,l,a||o);return(a&&this.type===eD.coalesce||o&&(this.type===eD.logicalOR||this.type===eD.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,n,r,i)}return e},tl.buildBinary=function(e,t,n,r,i,s){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},tl.parseMaybeUnary=function(e,t,n,r){var i,s=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===eD.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&function e(t){return"Identifier"===t.type||"ParenthesizedExpression"===t.type&&e(t.expression)}(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&function e(t){return"MemberExpression"===t.type&&"PrivateIdentifier"===t.property.type||"ChainExpression"===t.type&&e(t.expression)||"ParenthesizedExpression"===t.type&&e(t.expression)}(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==eD.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var p=this.startNodeAt(s,a);p.operator=this.value,p.prefix=!1,p.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(p,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==eD._in&&this.unexpected();return!n&&this.eat(eD.starstar)?t?void this.unexpected(this.lastTokStart):this.buildBinary(s,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1):i},tl.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var s=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1),e.trailingComma>=s.start&&(e.trailingComma=-1)),s},tl.parseSubscripts=function(e,t,n,r,i){for(var s=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,a=!1;;){var o=this.parseSubscript(e,t,n,r,s,a,i);if(o.optional&&(a=!0),o===e||"ArrowFunctionExpression"===o.type){if(a){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}},tl.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(eD.arrow)},tl.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},tl.parseSubscript=function(e,t,n,r,i,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(eD.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(eD.bracketL);if(p||l&&this.type!==eD.parenL&&this.type!==eD.backQuote||this.eat(eD.dot)){var c=this.startNodeAt(t,n);c.object=e,p?(c.property=this.parseExpression(),this.expect(eD.bracketR)):this.type===eD.privateId&&"Super"!==e.type?c.property=this.parsePrivateIdent():c.property=this.parseIdent("never"!==this.options.allowReserved),c.computed=!!p,o&&(c.optional=l),e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(eD.parenL)){var u=new e5,d=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(eD.parenR,this.options.ecmaVersion>=8,!1,u);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=f,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,a);this.checkExpressionErrors(u,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,o&&(g.optional=l),e=this.finishNode(g,"CallExpression")}else if(this.type===eD.backQuote){(l||s)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(t,n);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e},tl.parseExprAtom=function(e,t,n){this.type===eD.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case eD._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==eD.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==eD.dot&&this.type!==eD.bracketL&&this.type!==eD.parenL&&this.unexpected(),this.finishNode(r,"Super");case eD._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case eD.name:var s=this.start,a=this.startLoc,o=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(eD._function))return this.overrideContext(ta.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(eD.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===eD.name&&!o&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(eD.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}return l;case eD.regexp:var p=this.value;return(r=this.parseLiteral(p.value)).regex={pattern:p.pattern,flags:p.flags},r;case eD.num:case eD.string:return this.parseLiteral(this.value);case eD._null:case eD._true:case eD._false:return(r=this.startNode()).value=this.type===eD._null?null:this.type===eD._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case eD.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),u;case eD.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(eD.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case eD.braceL:return this.overrideContext(ta.b_expr),this.parseObj(!1,e);case eD._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case eD._class:return this.parseClass(this.startNode(),!1);case eD._new:return this.parseNew();case eD.backQuote:return this.parseTemplate();case eD._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);return this.unexpected();default:return this.parseExprAtomDefault()}},tl.parseExprAtomDefault=function(){this.unexpected()},tl.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===eD.parenL&&!e)return this.parseDynamicImport(t);if(this.type===eD.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},tl.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(eD.parenR)?e.options=null:(this.expect(eD.comma),this.afterTrailingComma(eD.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),!this.eat(eD.parenR)&&(this.expect(eD.comma),this.afterTrailingComma(eD.parenR)||this.unexpected())));else if(!this.eat(eD.parenR)){var t=this.start;this.eat(eD.comma)&&this.eat(eD.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},tl.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},tl.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},tl.parseParenExpression=function(){this.expect(eD.parenL);var e=this.parseExpression();return this.expect(eD.parenR),e},tl.shouldParseArrow=function(e){return!this.canInsertSemicolon()},tl.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o=this.start,l=this.startLoc,p=[],c=!0,u=!1,d=new e5,f=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==eD.parenR;){if(c?c=!1:this.expect(eD.comma),s&&this.afterTrailingComma(eD.parenR,!0)){u=!0;break}if(this.type===eD.ellipsis){a=this.start,p.push(this.parseParenItem(this.parseRestBinding())),this.type===eD.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}p.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(eD.parenR),e&&this.shouldParseArrow(p)&&this.eat(eD.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=m,this.parseParenArrowList(r,i,p,t);(!p.length||u)&&this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=m||this.awaitPos,p.length>1?((n=this.startNodeAt(o,l)).expressions=p,this.finishNodeAt(n,"SequenceExpression",h,g)):n=p[0]}else n=this.parseParenExpression();if(!this.options.preserveParens)return n;var y=this.startNodeAt(r,i);return y.expression=n,this.finishNode(y,"ParenthesizedExpression")},tl.parseParenItem=function(e){return e},tl.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var tp=[];tl.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===eD.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(eD.parenL)?e.arguments=this.parseExprList(eD.parenR,this.options.ecmaVersion>=8,!1):e.arguments=tp,this.finishNode(e,"NewExpression")},tl.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===eD.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===eD.backQuote,this.finishNode(n,"TemplateElement")},tl.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===eD.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(eD.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(eD.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},tl.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===eD.name||this.type===eD.num||this.type===eD.string||this.type===eD.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===eD.star)&&!eB.test(this.input.slice(this.lastTokEnd,this.start))},tl.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(eD.braceR);){if(r)r=!1;else if(this.expect(eD.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(eD.braceR))break;var s=this.parseProperty(e,t);e||this.checkPropClash(s,i,t),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},tl.parseProperty=function(e,t){var n,r,i,s,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(eD.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===eD.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,t),this.type===eD.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(eD.star)));var o=this.containsEsc;return this.parsePropertyName(a),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(a)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(eD.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,s,t,o),this.finishNode(a,"Property")},tl.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=+("get"!==e.kind);if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},tl.parsePropertyValue=function(e,t,n,r,i,s,a,o){(n||r)&&this.type===eD.colon&&this.unexpected(),this.eat(eD.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===eD.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===eD.comma||this.type===eD.braceR||this.type===eD.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key)):this.type===eD.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},tl.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(eD.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(eD.bracketR),e.key;else e.computed=!1;return e.key=this.type===eD.num||this.type===eD.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},tl.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},tl.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|e1(t,r.generator)|128*!!n),this.expect(eD.parenL),r.params=this.parseBindingList(eD.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},tl.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|e1(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},tl.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==eD.braceL,s=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!s||o)&&(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},tl.isSimpleParamList=function(e){for(var t=0;t<e.length;t+=1)if("Identifier"!==e[t].type)return!1;return!0},tl.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var s=i[r];this.checkLValInnerPattern(s,1,t?null:n)}},tl.parseExprList=function(e,t,n,r){for(var i=[],s=!0;!this.eat(e);){if(s)s=!1;else if(this.expect(eD.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===eD.comma?a=null:this.type===eD.ellipsis?(a=this.parseSpread(r),r&&this.type===eD.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},tl.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),259&this.currentThisScope().flags||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&("arguments"===r||"await"===r)&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),(!(this.options.ecmaVersion<6)||-1===this.input.slice(t,n).indexOf("\\"))&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},tl.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),!e&&(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},tl.parseIdentNode=function(){var e=this.startNode();return this.type===eD.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,("class"===e.name||"function"===e.name)&&(this.lastTokEnd!==this.lastTokStart+1||46!==this.input.charCodeAt(this.lastTokStart))&&this.context.pop(),this.type=eD.name):this.unexpected(),e},tl.parsePrivateIdent=function(){var e=this.startNode();return this.type===eD.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},tl.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===eD.semi||this.canInsertSemicolon()||this.type!==eD.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(eD.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},tl.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var tc=e2.prototype;tc.raise=function(e,t){var n=eQ(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},tc.raiseRecoverable=tc.raise,tc.curPosition=function(){if(this.options.locations)return new eG(this.curLine,this.pos-this.lineStart)};var tu=e2.prototype,td=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};tu.enterScope=function(e){this.scopeStack.push(new td(e))},tu.exitScope=function(){this.scopeStack.pop()},tu.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},tu.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var s=this.currentScope();r=this.treatFunctionsAsVar?s.lexical.indexOf(e)>-1:s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},tu.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},tu.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},tu.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags)return t}},tu.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(771&t.flags&&!(16&t.flags))return t}};var tf=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new ez(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},tm=e2.prototype;function th(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}tm.startNode=function(){return new tf(this,this.start,this.startLoc)},tm.startNodeAt=function(e,t){return new tf(this,e,t)},tm.finishNode=function(e,t){return th.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},tm.finishNodeAt=function(e,t,n,r){return th.call(this,e,t,n,r)},tm.copyNode=function(e){var t=new tf(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};for(var tg="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ty=tg+" Extended_Pictographic",tx=ty+" EBase EComp EMod EPres ExtPict",tT={9:tg,10:ty,11:ty,12:tx,13:tx,14:tx},tS={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},tb="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",tE="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",tk=tE+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",tw=tk+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",tv=tw+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",tA=tv+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",tC={9:tE,10:tk,11:tw,12:tv,13:tA,14:tA+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},t_={},tO=0,tP=[9,10,11,12,13,14];tO<tP.length;tO+=1)!function(e){var t=t_[e]={binary:eW(tT[e]+" "+tb),binaryOfStrings:eW(tS[e]),nonBinary:{General_Category:eW(tb),Script:eW(tC[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}(tP[tO]);var tI=e2.prototype,tN=function(e,t){this.parent=e,this.base=t||this};tN.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},tN.prototype.sibling=function(){return new tN(this.parent,this.base)};var tL=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=t_[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function tD(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function tB(e){return e>=65&&e<=90||e>=97&&e<=122}function tj(e){return tB(e)||95===e}function tR(e){return e>=48&&e<=57}function tF(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function tM(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}function tV(e){return e>=48&&e<=55}tL.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},tL.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},tL.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return -1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var s=n.charCodeAt(e+1);return s>=56320&&s<=57343?(i<<10)+s-0x35fdc00:i},tL.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,s=n.charCodeAt(e);return!(t||this.switchU)||s<=55295||s>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},tL.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},tL.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},tL.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},tL.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},tL.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0;r<e.length;r+=1){var i=e[r],s=this.at(n,t);if(-1===s||s!==i)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},tI.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,s=0;s<n.length;s++){var a=n.charAt(s);-1===t.indexOf(a)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(a,s+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===a&&(r=!0),"v"===a&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},tI.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&function(e){for(var t in e)return!0;return!1}(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},tI.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},tI.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new tN(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},tI.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},tI.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?!!this.regexp_eatAtom(e):!!this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},tI.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},tI.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},tI.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},tI.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return -1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},tI.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},tI.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},tI.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var s=n.charAt(i);n.indexOf(s,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);n||a||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var o=0;o<a.length;o++){var l=a.charAt(o);(a.indexOf(l,o+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},tI.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},tI.regexp_eatModifiers=function(e){for(var t,n="",r=0;-1!==(r=e.current())&&(105===(t=r)||109===t||115===t);)n+=eK(r),e.advance();return n},tI.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},tI.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},tI.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!tD(t)&&(e.lastIntValue=t,e.advance(),!0)},tI.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!tD(n);)e.advance();return e.pos!==t},tI.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return -1!==t&&36!==t&&(!(t>=40)||!(t<=43))&&46!==t&&63!==t&&91!==t&&94!==t&&124!==t&&(e.advance(),!0)},tI.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0;r<n.length;r+=1)n[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},tI.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},tI.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=eK(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=eK(e.lastIntValue);return!0}return!1},tI.regexp_eatRegExpIdentifierStart=function(e){var t,n=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return(e.advance(r),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),eA(t=i,!0)||36===t||95===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},tI.regexp_eatRegExpIdentifierPart=function(e){var t,n=e.pos,r=this.options.ecmaVersion>=11,i=e.current(r);return(e.advance(r),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(i=e.lastIntValue),eC(t=i,!0)||36===t||95===t||8204===t||8205===t)?(e.lastIntValue=i,!0):(e.pos=n,!1)},tI.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},tI.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},tI.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},tI.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},tI.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},tI.regexp_eatZero=function(e){return!(48!==e.current()||tR(e.lookahead()))&&(e.lastIntValue=0,e.advance(),!0)},tI.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},tI.regexp_eatControlLetter=function(e){var t=e.current();return!!tB(t)&&(e.lastIntValue=t%32,e.advance(),!0)},tI.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i,s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(s-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=s}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(i=e.lastIntValue)>=0&&i<=1114111)return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},tI.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return 99!==t&&(!e.switchN||107!==t)&&(e.lastIntValue=t,e.advance(),!0)},tI.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1},tI.regexp_eatCharacterClassEscape=function(e){var t,n,r=e.current();if(100===(t=r)||68===t||115===t||83===t||119===t||87===t)return e.lastIntValue=-1,e.advance(),1;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=80===r)||112===r)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&2===n&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return 0},tI.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return 0},tI.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){eX(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},tI.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},tI.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";tj(t=e.current());)e.lastStringValue+=eK(t),e.advance();return""!==e.lastStringValue},tI.regexp_eatUnicodePropertyValue=function(e){var t,n=0;for(e.lastStringValue="";tj(t=n=e.current())||tR(t);)e.lastStringValue+=eK(n),e.advance();return""!==e.lastStringValue},tI.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},tI.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===n&&e.raise("Negated character class may contain strings"),!0}return!1},tI.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},tI.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(-1===t||-1===n)&&e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},tI.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||tV(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},tI.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},tI.regexp_classSetExpression=function(e){var t,n=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(n=2);for(var r=e.pos;e.eatChars([38,38]);){if(38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))){2!==t&&(n=1);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;2===t&&(n=2)}},tI.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return -1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},tI.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},tI.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&2===r&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},tI.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},tI.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},tI.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},tI.regexp_eatClassSetCharacter=function(e){var t,n,r=e.pos;if(e.eat(92))return!!(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=r,!1));var i=e.current();return!(i<0||i===e.lookahead()&&(33===(t=i)||t>=35&&t<=38||t>=42&&t<=44||46===t||t>=58&&t<=64||94===t||96===t||126===t)||40===(n=i)||41===n||45===n||47===n||n>=91&&n<=93||n>=123&&n<=125)&&(e.advance(),e.lastIntValue=i,!0)},tI.regexp_eatClassSetReservedPunctuator=function(e){var t,n=e.current();return!!(33===(t=n)||35===t||37===t||38===t||44===t||45===t||t>=58&&t<=62||64===t||96===t||126===t)&&(e.lastIntValue=n,e.advance(),!0)},tI.regexp_eatClassControlLetter=function(e){var t=e.current();return(!!tR(t)||95===t)&&(e.lastIntValue=t%32,e.advance(),!0)},tI.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},tI.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;tR(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},tI.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;tF(n=e.current());)e.lastIntValue=16*e.lastIntValue+tM(n),e.advance();return e.pos!==t},tI.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},tI.regexp_eatOctalDigit=function(e){var t=e.current();return tV(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},tI.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!tF(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+tM(i),e.advance()}return!0};var t$=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new ez(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},tq=e2.prototype;function tY(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}tq.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new t$(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},tq.getToken=function(){return this.next(),new t$(this)},"undefined"!=typeof Symbol&&(tq[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===eD.eof,value:t}}}}),tq.nextToken=function(){var e=this.curContext();return(e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)?this.finishToken(eD.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},tq.readToken=function(e){return eA(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},tq.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-0x35fdc00},tq.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=eF(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},tq.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!eR(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},tq.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++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 e}break;default:if(e>8&&e<14||e>=5760&&eM.test(String.fromCharCode(e)))++this.pos;else break e}}},tq.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},tq.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(eD.ellipsis)):(++this.pos,this.finishToken(eD.dot))},tq.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(eD.assign,2):this.finishOp(eD.slash,1)},tq.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?eD.star:eD.modulo;return(this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=eD.starstar,t=this.input.charCodeAt(this.pos+2)),61===t)?this.finishOp(eD.assign,n+1):this.finishOp(r,n)},tq.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e)return this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(eD.assign,3):this.finishOp(124===e?eD.logicalOR:eD.logicalAND,2);return 61===t?this.finishOp(eD.assign,2):this.finishOp(124===e?eD.bitwiseOR:eD.bitwiseAND,1)},tq.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(eD.assign,2):this.finishOp(eD.bitwiseXOR,1)},tq.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45===t&&!this.inModule&&62===this.input.charCodeAt(this.pos+2)&&(0===this.lastTokEnd||eB.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(eD.incDec,2):61===t?this.finishOp(eD.assign,2):this.finishOp(eD.plusMin,1)},tq.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n))?this.finishOp(eD.assign,n+1):this.finishOp(eD.bitShift,n):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(eD.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},tq.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(eD.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(eD.arrow)):this.finishOp(61===e?eD.eq:eD.prefix,1)},tq.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(eD.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(eD.assign,3):this.finishOp(eD.coalesce,2)}return this.finishOp(eD.question,1)},tq.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,eA(t=this.fullCharCodeAtPos(),!0)||92===t))return this.finishToken(eD.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+eK(t)+"'")},tq.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(eD.parenL);case 41:return++this.pos,this.finishToken(eD.parenR);case 59:return++this.pos,this.finishToken(eD.semi);case 44:return++this.pos,this.finishToken(eD.comma);case 91:return++this.pos,this.finishToken(eD.bracketL);case 93:return++this.pos,this.finishToken(eD.bracketR);case 123:return++this.pos,this.finishToken(eD.braceL);case 125:return++this.pos,this.finishToken(eD.braceR);case 58:return++this.pos,this.finishToken(eD.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(eD.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(eD.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+eK(e)+"'")},tq.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},tq.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(eB.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new tL(this));o.reset(n,i,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(i,a)}catch(e){}return this.finishToken(eD.regexp,{pattern:i,flags:a,value:l})},tq.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),s=this.pos,a=0,o=0,l=0,p=null==t?1/0:t;l<p;++l,++this.pos){var c=this.input.charCodeAt(this.pos),u=void 0;if(r&&95===c){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;continue}if((u=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=e)break;o=c,a=a*e+u}return(r&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===s||null!=t&&this.pos-s!==t)?null:a},tq.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=tY(this.input.slice(t,this.pos)),++this.pos):eA(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(eD.num,n)},tq.readNumber=function(e){var t,n=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(n,"Invalid number");var r=this.pos-n>=2&&48===this.input.charCodeAt(n);r&&this.strict&&this.raise(n,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&110===i){var s=tY(this.input.slice(n,this.pos));return++this.pos,eA(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(eD.num,s)}r&&/[89]/.test(this.input.slice(n,this.pos))&&(r=!1),46!==i||r||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||r||((43===(i=this.input.charCodeAt(++this.pos))||45===i)&&++this.pos,null===this.readInt(10)&&this.raise(n,"Invalid number")),eA(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=(t=this.input.slice(n,this.pos),r?parseInt(t,8):parseFloat(t.replace(/_/g,"")));return this.finishToken(eD.num,a)},tq.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},tq.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(eR(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(eD.string,t)};var tX={};tq.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===tX)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},tq.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw tX;this.raise(e,t)},tq.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1)){if(this.pos===this.start&&(this.type===eD.template||this.type===eD.invalidTemplate))if(36===n)return this.pos+=2,this.finishToken(eD.dollarBraceL);else return++this.pos,this.finishToken(eD.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(eD.template,e)}if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(eR(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},tq.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(eD.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},tq.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return eK(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(i=parseInt(r=r.slice(0,-1),8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),("0"!==r||56===t||57===t)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}if(eR(t))return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";return String.fromCharCode(t)}},tq.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},tq.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(eC(i,r))this.pos+=i<=65535?1:2;else if(92===i){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?eA:eC)(a,r)||this.invalidStringToken(s,"Invalid Unicode escape"),e+=eK(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},tq.readWord=function(){var e=this.readWord1(),t=eD.name;return this.keywords.test(e)&&(t=eN[e]),this.finishToken(t,e)};var tJ="8.15.0";e2.acorn={Parser:e2,version:tJ,defaultOptions:eZ,Position:eG,SourceLocation:ez,getLineInfo:eQ,Node:tf,TokenType:e_,tokTypes:eD,keywordTypes:eN,TokContext:ts,tokContexts:ta,isIdentifierChar:eC,isIdentifierStart:eA,Token:t$,isNewLine:eR,lineBreak:eB,lineBreakG:ej,nonASCIIwhitespace:eM};var tU=Object.freeze({__proto__:null,Node:tf,Parser:e2,Position:eG,SourceLocation:ez,TokContext:ts,Token:t$,TokenType:e_,defaultOptions:eZ,getLineInfo:eQ,isIdentifierChar:eC,isIdentifierStart:eA,isNewLine:eR,keywordTypes:eN,lineBreak:eB,lineBreakG:ej,nonASCIIwhitespace:eM,parse:function(e,t){return e2.parse(e,t)},parseExpressionAt:function(e,t,n){return e2.parseExpressionAt(e,t,n)},tokContexts:ta,tokTypes:eD,tokenizer:function(e,t){return e2.tokenizer(e,t)},version:tJ}),tW={exports:{}},tK=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(tU),tH=j((d||(d=1,!function(e){let t=u?c:(u=1,c={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function s(e){e=e.Parser.acorn||e;let t=i.get(e);if(!t){let n=e.tokTypes,r=e.TokContext,s=e.TokenType,a=new r("<tag",!1),o=new r("</tag",!1),l=new r("<tag>...</tag>",!0,!0),p={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};p.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(a),this.exprAllowed=!1},p.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===a&&e===n.slash||t===o?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},t={tokContexts:{tc_oTag:a,tc_cTag:o,tc_expr:l},tokTypes:p},i.set(e,t)}return t}function a(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?a(e.object)+"."+a(e.property):void 0:e}e.exports=function(e){return e=e||{},function(i){return function(e,i){let o=i.acorn||tK,l=s(o),p=o.tokTypes,c=l.tokTypes,u=o.tokContexts,d=l.tokContexts.tc_oTag,f=l.tokContexts.tc_cTag,m=l.tokContexts.tc_expr,h=o.isNewLine,g=o.isIdentifierStart,y=o.isIdentifierChar;return class extends i{static get acornJsx(){return l}jsx_readToken(){let e="",t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let n=this.input.charCodeAt(this.pos);switch(n){case 60:case 123:if(this.pos===this.start){if(60===n&&this.exprAllowed)return++this.pos,this.finishToken(c.jsxTagStart);return this.getTokenFromCode(n)}return e+=this.input.slice(t,this.pos),this.finishToken(c.jsxText,e);case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===n?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:h(n)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t,n=this.input.charCodeAt(this.pos);return++this.pos,13===n&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(n),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}jsx_readString(e){let t="",n=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let r=this.input.charCodeAt(this.pos);if(r===e)break;38===r?(t+=this.input.slice(n,this.pos),t+=this.jsx_readEntity(),n=this.pos):h(r)?(t+=this.input.slice(n,this.pos),t+=this.jsx_readNewLine(!1),n=this.pos):++this.pos}return t+=this.input.slice(n,this.pos++),this.finishToken(p.string,t)}jsx_readEntity(){let e="",i=0,s,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");let o=++this.pos;for(;this.pos<this.input.length&&i++<10;){if(";"===(a=this.input[this.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),n.test(e)&&(s=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),r.test(e)&&(s=String.fromCharCode(parseInt(e,10)))):s=t[e];break}e+=a}return s||(this.pos=o,"&")}jsx_readWord(){let e,t=this.pos;do e=this.input.charCodeAt(++this.pos);while(y(e)||45===e);return this.finishToken(c.jsxName,this.input.slice(t,this.pos))}jsx_parseIdentifier(){let e=this.startNode();return this.type===c.jsxName?e.name=this.value:this.type.keyword?e.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsx_parseNamespacedName(){let t=this.start,n=this.startLoc,r=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(p.colon))return r;var i=this.startNodeAt(t,n);return i.namespace=r,i.name=this.jsx_parseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===c.jsxTagEnd)return"";let t=this.start,n=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type!==p.dot||"JSXNamespacedName"!==r.type||e.allowNamespacedObjects||this.unexpected();this.eat(p.dot);){let e=this.startNodeAt(t,n);e.object=r,e.property=this.jsx_parseIdentifier(),r=this.finishNode(e,"JSXMemberExpression")}return r}jsx_parseAttributeValue(){switch(this.type){case p.braceL:let e=this.jsx_parseExpressionContainer();return"JSXEmptyExpression"===e.expression.type&&this.raise(e.start,"JSX attributes must only be assigned a non-empty expression"),e;case c.jsxTagStart:case p.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let e=this.startNode();return this.next(),e.expression=this.type===p.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(p.braceR),this.finishNode(e,"JSXExpressionContainer")}jsx_parseAttribute(){let e=this.startNode();return this.eat(p.braceL)?(this.expect(p.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(p.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsx_parseNamespacedName(),e.value=this.eat(p.eq)?this.jsx_parseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsx_parseOpeningElementAt(e,t){let n=this.startNodeAt(e,t);n.attributes=[];let r=this.jsx_parseElementName();for(r&&(n.name=r);this.type!==p.slash&&this.type!==c.jsxTagEnd;)n.attributes.push(this.jsx_parseAttribute());return n.selfClosing=this.eat(p.slash),this.expect(c.jsxTagEnd),this.finishNode(n,r?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(e,t){let n=this.startNodeAt(e,t),r=this.jsx_parseElementName();return r&&(n.name=r),this.expect(c.jsxTagEnd),this.finishNode(n,r?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(e,t){let n=this.startNodeAt(e,t),r=[],i=this.jsx_parseOpeningElementAt(e,t),s=null;if(!i.selfClosing){t:for(;;)switch(this.type){case c.jsxTagStart:if(e=this.start,t=this.startLoc,this.next(),this.eat(p.slash)){s=this.jsx_parseClosingElementAt(e,t);break t}r.push(this.jsx_parseElementAt(e,t));break;case c.jsxText:r.push(this.parseExprAtom());break;case p.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}a(s.name)!==a(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+a(i.name)+">")}let o=i.name?"Element":"Fragment";return n["opening"+o]=i,n["closing"+o]=s,n.children=r,this.type===p.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(n,"JSX"+o)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type="JSXText",e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===c.jsxText?this.jsx_parseText():this.type===c.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===d||t===f){if(g(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(c.jsxTagEnd);if((34===e||39===e)&&t==d)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(c.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==p.braceL){var t=this.curContext();t==d?this.context.push(u.b_expr):t==m?this.context.push(u.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==p.slash||e!==c.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(f),this.exprAllowed=!1}}}}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},i)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(tK).tokTypes},configurable:!0,enumerable:!0})}(tW)),tW.exports));const tG="Keyword",tz="JSXText";function tQ(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}tQ.prototype={constructor:tQ,translate(e,t){let n=e.type,r=this._acornTokTypes;if(n===r.name)e.type="Identifier","static"===e.value&&(e.type=tG),t.ecmaVersion>5&&("yield"===e.value||"let"===e.value)&&(e.type=tG);else if(n===r.privateId)e.type="PrivateIdentifier";else if(n===r.semi||n===r.comma||n===r.parenL||n===r.parenR||n===r.braceL||n===r.braceR||n===r.dot||n===r.bracketL||n===r.colon||n===r.question||n===r.bracketR||n===r.ellipsis||n===r.arrow||n===r.jsxTagStart||n===r.incDec||n===r.starstar||n===r.jsxTagEnd||n===r.prefix||n===r.questionDot||n.binop&&!n.keyword||n.isAssign)e.type="Punctuator",e.value=this._code.slice(e.start,e.end);else if(n===r.jsxName)e.type="JSXIdentifier";else if("jsxText"===n.label||n===r.jsxAttrValueToken)e.type=tz;else if(n.keyword)"true"===n.keyword||"false"===n.keyword?e.type="Boolean":"null"===n.keyword?e.type="Null":e.type=tG;else if(n===r.num)e.type="Numeric",e.value=this._code.slice(e.start,e.end);else if(n===r.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=tz):e.type="String",e.value=this._code.slice(e.start,e.end);else if(n===r.regexp){e.type="RegularExpression";let t=e.value;e.regex={flags:t.flags,pattern:t.pattern},e.value=`/${t.pattern}/${t.flags}`}return e},onToken(e,t){let n=this._acornTokTypes,r=t.tokens,i=this._tokens,s=()=>{r.push(function(e,t){let n=e[0],r=e.at(-1),i={type:"Template",value:t.slice(n.start,r.end)};return n.loc&&(i.loc={start:n.loc.start,end:r.loc.end}),n.range&&(i.start=n.range[0],i.end=r.range[1],i.range=[i.start,i.end]),i}(this._tokens,this._code)),this._tokens=[]};if(e.type===n.eof){this._curlyBrace&&r.push(this.translate(this._curlyBrace,t));return}if(e.type===n.backQuote){this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),i.push(e),i.length>1&&s();return}if(e.type===n.dollarBraceL){i.push(e),s();return}if(e.type===n.braceR){this._curlyBrace&&r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===n.template||e.type===n.invalidTemplate){this._curlyBrace&&(i.push(this._curlyBrace),this._curlyBrace=null),i.push(e);return}this._curlyBrace&&(r.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(this.translate(e,t))}};const tZ=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function t0(){return tZ.at(-1)}const t1=Symbol("espree's internal state"),t2=Symbol("espree's esprimaFinishNode");var t3=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(e,n){("object"!=typeof e||null===e)&&(e={}),"string"==typeof n||n instanceof String||(n=String(n));let r=e.sourceType,i=function(e){let t=function(e=5){let t="latest"===e?t0():e;if("number"!=typeof t)throw Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!tZ.includes(t))throw Error("Invalid ecmaVersion.");return t}(e.ecmaVersion),n=function(e="script"){if("script"===e||"module"===e)return e;if("commonjs"===e)return"script";throw Error("Invalid sourceType.")}(e.sourceType),r=!0===e.range,i=!0===e.loc;if(3!==t&&e.allowReserved)throw Error("`allowReserved` is only supported when ecmaVersion is 3");if(void 0!==e.allowReserved&&"boolean"!=typeof e.allowReserved)throw Error("`allowReserved`, when present, must be `true` or `false`");let s=3===t&&(e.allowReserved||"never"),a=e.ecmaFeatures||{},o="commonjs"===e.sourceType||!!a.globalReturn;if("module"===n&&t<6)throw Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:n,ranges:r,locations:i,allowReserved:s,allowReturnOutsideFunction:o})}(e),s=i.ecmaFeatures||{},a=!0===i.tokens?new tQ(t,n):null,o={originalSourceType:r||i.sourceType,tokens:a?[]:null,comments:!0===i.comment?[]:null,impliedStrict:!0===s.impliedStrict&&i.ecmaVersion>=5,ecmaVersion:i.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:i.ecmaVersion,sourceType:i.sourceType,ranges:i.ranges,locations:i.locations,allowReserved:i.allowReserved,allowReturnOutsideFunction:i.allowReturnOutsideFunction,onToken(e){a&&a.onToken(e,o),e.type!==t.eof&&(o.lastToken=e)},onComment(e,t,r,i,s,a){if(o.comments){let l=function(e,t,n,r,i,s,a){let o={type:e?"Block":"#!"===a.slice(n,n+2)?"Hashbang":"Line",value:t};return"number"==typeof n&&(o.start=n,o.end=r,o.range=[n,r]),"object"==typeof i&&(o.loc={start:i,end:s}),o}(e,t,r,i,s,a,n);o.comments.push(l)}}},n),this[t1]=o}tokenize(){do this.next();while(this.type!==t.eof);this.next();let e=this[t1],n=e.tokens;return e.comments&&(n.comments=e.comments),n}finishNode(...e){let t=super.finishNode(...e);return this[t2](t)}finishNodeAt(...e){let t=super.finishNodeAt(...e);return this[t2](t)}parse(){let e=this[t1],t=super.parse();if(t.sourceType=e.originalSourceType,e.comments&&(t.comments=e.comments),e.tokens&&(t.tokens=e.tokens),t.body.length){let[e]=t.body;t.range&&(t.range[0]=e.range[0]),t.loc&&(t.loc.start=e.loc.start),t.start=e.start}return e.lastToken&&(t.range&&(t.range[1]=e.lastToken.range[1]),t.loc&&(t.loc.end=e.lastToken.loc.end),t.end=e.lastToken.end),this[t1].templateElements.forEach(e=>{let t=e.tail?1:2;e.start+=-1,e.end+=t,e.range&&(e.range[0]+=-1,e.range[1]+=t),e.loc&&(e.loc.start.column+=-1,e.loc.end.column+=t)}),t}parseTopLevel(e){return this[t1].impliedStrict&&(this.strict=!0),super.parseTopLevel(e)}raise(t,n){let r=e.acorn.getLineInfo(this.input,t),i=SyntaxError(n);throw i.index=t,i.lineNumber=r.line,i.column=r.column+1,i}raiseRecoverable(e,t){this.raise(e,t)}unexpected(e){let t="Unexpected token";if(null!=e){if(this.pos=e,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf("\n",this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(t+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,t)}jsx_readString(e){let n=super.jsx_readString(e);return this.type===t.string&&(this[t1].jsxAttrValueToken=!0),n}[t2](e){return"TemplateElement"===e.type&&this[t1].templateElements.push(e),e.type.includes("Function")&&!e.generator&&(e.generator=!1),e}}};const t6={_regular:null,_jsx:null,get regular(){return null===this._regular&&(this._regular=e2.extend(t3())),this._regular},get jsx(){return null===this._jsx&&(this._jsx=e2.extend(tH(),t3())),this._jsx},get(e){return e&&e.ecmaFeatures&&e.ecmaFeatures.jsx?this.jsx:this.regular}};function t4(e,t){let n=t6.get(t);return t&&!0===t.tokens||(t=Object.assign({},t,{tokens:!0})),new n(t,e).tokenize()}let t5,t9={};for(t5 in"function"==typeof Object.create&&(t9=Object.create(null)),eh)Object.hasOwn(eh,t5)&&(t9[t5]=t5);"function"==typeof Object.freeze&&Object.freeze(t9);const t8=t0();var t7={},ne=f?t7:(f=1,!function e(t){var n,r,i,s,a,o;function l(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&("object"==typeof(n=e[t])&&null!==n?r[t]=l(n):r[t]=n);return r}function p(e,t){this.parent=e,this.key=t}function c(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function u(){}function d(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function f(e,t){return(e===n.ObjectExpression||e===n.ObjectPattern)&&"properties"===t}function m(e,t){for(var n=e.length-1;n>=0;--n)if(e[n].node===t)return!0;return!1}function h(e,t){return new u().traverse(e,t)}return n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},i={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},r={Break:s={},Skip:a={},Remove:o={}},p.prototype.replace=function(e){this.parent[this.key]=e},p.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},u.prototype.path=function(){var e,t,n,r,i;function s(e,t){if(Array.isArray(t))for(n=0,r=t.length;n<r;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(e=2,i=[],t=this.__leavelist.length;e<t;++e)s(i,this.__leavelist[e].path);return s(i,this.__current.path),i},u.prototype.type=function(){return this.current().type||this.__current.wrap},u.prototype.parents=function(){var e,t,n;for(e=1,n=[],t=this.__leavelist.length;e<t;++e)n.push(this.__leavelist[e].node);return n},u.prototype.current=function(){return this.__current.node},u.prototype.__execute=function(e,t){var n,r;return r=void 0,n=this.__current,this.__current=t,this.__state=null,e&&(r=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=n,r},u.prototype.notify=function(e){this.__state=e},u.prototype.skip=function(){this.notify(a)},u.prototype.break=function(){this.notify(s)},u.prototype.remove=function(){this.notify(o)},u.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=Object.keys:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=i,t.keys&&(this.__keys=Object.assign(Object.create(this.__keys),t.keys))},u.prototype.traverse=function(e,t){var n,r,i,o,l,p,u,h,g,y,x,T;for(this.__initialize(e,t),T={},n=this.__worklist,r=this.__leavelist,n.push(new c(e,null,null,null)),r.push(new c(null,null,null,null));n.length;){if((i=n.pop())===T){if(i=r.pop(),p=this.__execute(t.leave,i),this.__state===s||p===s)return;continue}if(i.node){if(p=this.__execute(t.enter,i),this.__state===s||p===s)return;if(n.push(T),r.push(i),this.__state===a||p===a)continue;if(l=(o=i.node).type||i.wrap,!(y=this.__keys[l]))if(this.__fallback)y=this.__fallback(o);else throw Error("Unknown node type "+l+".");for(h=y.length;(h-=1)>=0;)if(x=o[u=y[h]]){if(Array.isArray(x)){for(g=x.length;(g-=1)>=0;)if(!(!x[g]||m(r,x[g]))){if(f(l,y[h]))i=new c(x[g],[u,g],"Property",null);else{if(!d(x[g]))continue;i=new c(x[g],[u,g],null,null)}n.push(i)}}else if(d(x)){if(m(r,x))continue;n.push(new c(x,u,null,null))}}}}},u.prototype.replace=function(e,t){var n,r,i,l,u,m,h,g,y,x,T,S,b;function E(e){var t,r,i,s;if(e.ref.remove()){for(r=e.ref.key,s=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===s){if(i.ref.key<r)break;--i.ref.key}}}for(this.__initialize(e,t),T={},n=this.__worklist,r=this.__leavelist,S={root:e},m=new c(e,null,null,new p(S,"root")),n.push(m),r.push(m);n.length;){if((m=n.pop())===T){if(m=r.pop(),void 0!==(u=this.__execute(t.leave,m))&&u!==s&&u!==a&&u!==o&&m.ref.replace(u),(this.__state===o||u===o)&&E(m),this.__state===s||u===s)return S.root;continue}if(void 0!==(u=this.__execute(t.enter,m))&&u!==s&&u!==a&&u!==o&&(m.ref.replace(u),m.node=u),(this.__state===o||u===o)&&(E(m),m.node=null),this.__state===s||u===s)break;if(i=m.node){if(n.push(T),r.push(m),this.__state!==a&&u!==a){if(l=i.type||m.wrap,!(y=this.__keys[l]))if(this.__fallback)y=this.__fallback(i);else throw Error("Unknown node type "+l+".");for(h=y.length;(h-=1)>=0;)if(x=i[b=y[h]])if(Array.isArray(x)){for(g=x.length;(g-=1)>=0;)if(x[g]){if(f(l,y[h]))m=new c(x[g],[b,g],"Property",new p(x,g));else{if(!d(x[g]))continue;m=new c(x[g],[b,g],null,new p(x,g))}n.push(m)}}else d(x)&&n.push(new c(x,b,null,new p(i,b)))}}}return S.root},t.Syntax=n,t.traverse=h,t.replace=function(e,t){return new u().replace(e,t)},t.attachComments=function(e,t,n){var i,s,a,o,p=[];if(!e.range)throw Error("attachComments needs range information");if(!n.length){if(t.length){for(a=0,s=t.length;a<s;a+=1)(i=l(t[a])).extendedRange=[0,e.range[0]],p.push(i);e.leadingComments=p}return e}for(a=0,s=t.length;a<s;a+=1)p.push(function(e,t){var n;return n=function(e,t){var n,r,i,s;for(r=e.length,i=0;r;)t(e[s=i+(n=r>>>1)])?r=n:(i=s+1,r-=n+1);return i}(t,function(t){return t.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),(n-=1)>=0&&(e.extendedRange[0]=t[n].range[1]),e}(l(t[a]),n));return o=0,h(e,{enter:function(e){for(var t;o<p.length&&!((t=p[o]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),p.splice(o,1)):o+=1;return o===p.length?r.Break:p[o].extendedRange[0]>e.range[1]?r.Skip:void 0}}),o=0,h(e,{leave:function(e){for(var t;o<p.length&&(t=p[o],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),p.splice(o,1)):o+=1;return o===p.length?r.Break:p[o].extendedRange[0]>e.range[1]?r.Skip:void 0}}),e},t.VisitorKeys=i,t.VisitorOption=r,t.Controller=u,t.cloneEnvironment=function(){return e({})},t}(t7),t7);const nt=new Set;function nn(e,t,n=""){var r;let i=`You are using deprecated ${e}${n?` in "${n}"`:""}`;return t&&(i+=`, please use ${t} instead.`),r=i,void(!nt.has(r)&&(nt.add(r),console.warn(`[@stylistic/eslint-plugin]: ${r}`)))}var nr=H(eo());const ni=/^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u,ns=new Set(["\r\n","\r","\n","\u2028","\u2029"]),na=new Set(["Program","BlockStatement","StaticBlock","SwitchCase"]),no=/^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u,nl=/^(?:[^\\]|\\.)*\\(?:[1-9]|0\d)/su,np=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","||=","&&=","??="],nc=["abstract","arguments","as","async","await","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","eval","export","extends","false","final","finally","float","for","from","function","get","goto","if","implements","import","in","instanceof","int","interface","let","long","native","new","null","of","package","private","protected","public","return","set","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","type","typeof","using","var","void","volatile","while","with","yield"].concat(["accessor","satisfies"]);function nu(){return RegExp(nr.LINEBREAK_MATCHER.source,"gu")}const nd=/^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u;function nf(e){for(let t=e;t;t=t.parent)if(nd.test(t.type))return t;return null}function nm(e){return"Literal"===e.type&&null===e.value&&!("regex"in e)&&!("bigint"in e)}function nh(e){switch(e.type){case"Literal":if(null!==e.value||nm(e))return String(e.value);if(nO(e))return`/${e.regex.pattern}/${e.regex.flags}`;if("bigint"in e&&e.bigint)return e.bigint;break;case"TemplateLiteral":if(0===e.expressions.length&&1===e.quasis.length)return e.quasis[0].value.cooked}return null}function ng(e){let t;if(e)switch(e.type){case"ChainExpression":return ng(e.expression);case"Property":case"PropertyDefinition":case"MethodDefinition":case"ImportAttribute":t=e.key;break;case"MemberExpression":t=e.property}return t?"Identifier"!==t.type||"computed"in e&&e.computed?nh(t):t.name:null}function ny(e){return e&&"ChainExpression"===e.type?e.expression:e}function nx(e,t){let n=e.getTokenBefore(t),r=e.getTokenAfter(t);return!!n&&!!r&&(0,nr.isOpeningParenToken)(n)&&n.range[1]<=t.range[0]&&(0,nr.isClosingParenToken)(r)&&r.range[0]>=t.range[1]}function nT(e){return"="===e.value&&"Punctuator"===e.type}function nS(e){return"?"===e.value&&"Punctuator"===e.type}function nb(e){return e?.type==="Keyword"}function nE(e){return"Shebang"===e.type||"Hashbang"===e.type}function nk(e){return"LogicalExpression"===e.type&&("&&"===e.operator||"||"===e.operator)}function nw(e){return"LogicalExpression"===e.type&&"??"===e.operator}function nv(e,t){return nk(e)&&nw(t)||nw(e)&&nk(t)}function nA(e,t){return e.test?t.getTokenAfter(e.test,e=>(0,nr.isColonToken)(e)):t.getFirstToken(e,1)}function nC(e){if("ExpressionStatement"!==e.type)return!1;let t=e.parent;return"Program"===t.type||"BlockStatement"===t.type&&(0,nr.isFunction)(t.parent)}function n_(e){return"Literal"===e.type&&"string"==typeof e.value||"TemplateLiteral"===e.type}function nO(e){return"Literal"===e.type&&"regex"in e}function nP(e,t){return e[0]===t&&e[e.length-1]===t}function nI(e){switch(e.type){case"SequenceExpression":return 0;case"AssignmentExpression":case"ArrowFunctionExpression":case"YieldExpression":return 1;case"ConditionalExpression":case"TSConditionalType":return 3;case"LogicalExpression":switch(e.operator){case"||":case"??":return 4;case"&&":return 5}case"BinaryExpression":switch(e.operator){case"|":return 6;case"^":return 7;case"&":return 8;case"==":case"!=":case"===":case"!==":return 9;case"<":case"<=":case">":case">=":case"in":case"instanceof":return 10;case"<<":case">>":case">>>":return 11;case"+":case"-":return 12;case"*":case"/":case"%":return 13;case"**":return 15}case"TSUnionType":return 6;case"TSIntersectionType":return 8;case"UnaryExpression":case"AwaitExpression":return 16;case"UpdateExpression":return 17;case"CallExpression":case"ChainExpression":case"ImportExpression":return 18;case"NewExpression":return 19;case"TSImportType":case"TSArrayType":return 20;default:if(e.type in eh)return 20;return -1}}function nN(e){return"Literal"===e.type&&"number"==typeof e.value&&no.test(e.raw)}function nL(e){return"Numeric"===e.type&&no.test(e.value)}function nD(e,{column:t,line:n}){return t<e.lines[n-1].length?{column:t+1,line:n}:n<e.lines.length?{column:0,line:n+1}:null}function nB(e){return"Literal"===e.type&&("number"==typeof e.value||!!("bigint"in e&&e.bigint))}function nj(e,t){let n,r,i={comment:!0,ecmaVersion:t8,range:!0};if("string"==typeof e){let t;try{t=t4(e,i)}catch{return!1}let r=t.comments;if(n=t[t.length-1],r.length){let e=r[r.length-1];(!n||e.range[0]>n.range[0])&&(n=e)}}else n=e;if(nE(n))return!1;if("string"==typeof t){let e;try{e=t4(t,i)}catch{return!1}let n=e.comments;if(r=e[0],n.length){let e=n[0];(!r||e.range[0]<r.range[0])&&(r=e)}}else r=t;if("Punctuator"===n.type||"Punctuator"===r.type){if("Punctuator"===n.type&&"Punctuator"===r.type){let e=new Set(["+","++"]),t=new Set(["-","--"]);return!(e.has(n.value)&&e.has(r.value)||t.has(n.value)&&t.has(r.value))}return"Punctuator"!==n.type||"/"!==n.value||!["Block","Line","RegularExpression"].includes(r.type)}return!!("String"===n.type||"String"===r.type||"Template"===n.type||"Template"===r.type||"Numeric"!==n.type&&"Numeric"===r.type&&r.value.startsWith("."))||"Block"===n.type||"Block"===r.type||"Line"===r.type||"PrivateIdentifier"===r.type}function nR(e){return nl.test(e)}const nF=/^\s*$/u;function nM(e){return"string"==typeof e&&nF.test(e)}function nV(e,t){let n=e.sourceCode,r=t,i=null;do i="JSXText"===(r=n.getTokenBefore(r)).type?r.value.split("\n"):null;while("JSXText"===r.type&&i&&nM(i.at(-1)));return r}function n$(e,t){let n=nV(e,t);return!!n&&!(0,nr.isTokenOnSameLine)(n,t)}function nq(e){let t="attributes"in e&&e.attributes;return t&&0!==t.length?t[t.length-1]:e.name}function nY(e){return e.loc.start.line===e.loc.end.line}function nX(e,t,n){return null!==e.getFirstTokenBetween(t,n,{includeComments:!0,filter:nr.isCommentToken})}function nJ(e,t,n){return e.getTokensBetween(t,n,{includeComments:!0,filter:nr.isCommentToken})}var nU={},nW={ASSIGNMENT_OPERATOR:()=>np,AST_NODE_TYPES:()=>em.AST_NODE_TYPES,AST_TOKEN_TYPES:()=>em.AST_TOKEN_TYPES,COMMENTS_IGNORE_PATTERN:()=>ni,DECIMAL_INTEGER_PATTERN:()=>no,KEYWORDS:()=>nc,LINEBREAKS:()=>ns,OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN:()=>nl,STATEMENT_LIST_PARENTS:()=>na,WHITE_SPACES_PATTERN:()=>nF,canTokensBeAdjacent:()=>nj,createGlobalLinebreakMatcher:()=>nu,getCommentsBetween:()=>nJ,getFirstNodeInLine:()=>nV,getNextLocation:()=>nD,getPrecedence:()=>nI,getStaticPropertyName:()=>ng,getStaticStringValue:()=>nh,getSwitchCaseColonToken:()=>nA,getTokenBeforeClosingBracket:()=>nq,getUpperFunction:()=>nf,hasCommentsBetween:()=>nX,hasOctalOrNonOctalDecimalEscapeSequence:()=>nR,isCoalesceExpression:()=>nw,isDecimalInteger:()=>nN,isDecimalIntegerNumericToken:()=>nL,isEqToken:()=>nT,isHashbangComment:()=>nE,isKeywordToken:()=>nb,isLogicalExpression:()=>nk,isMixedLogicalAndCoalesceExpressions:()=>nv,isNodeFirstInLine:()=>n$,isNullLiteral:()=>nm,isNumericLiteral:()=>nB,isParenthesised:()=>nx,isQuestionToken:()=>nS,isRegExpLiteral:()=>nO,isSingleLine:()=>nY,isStringLiteral:()=>n_,isSurroundedBy:()=>nP,isTopLevelExpressionStatement:()=>nC,isWhiteSpaces:()=>nM,skipChainExpression:()=>ny};for(var nK in nW)q(nU,nK,{get:nW[nK],enumerable:!0});function nH(e){return"object"==typeof e&&null!=e&&!Array.isArray(e)}function nG(e={},t={}){return Array.from(new Set(Object.keys(e).concat(Object.keys(t)))).reduce((n,r)=>{let i=r in e,s=r in t,a=e[r],o=t[r];return i&&s?nH(a)&&nH(o)?n[r]=nG(a,o):n[r]=o:i?n[r]=a:n[r]=o,n},{})}function nz({name:e,create:t,defaultOptions:n=[],meta:r}){return{create:i=>{if(r.deprecated){let t;if("boolean"!=typeof r.deprecated){let{replacedBy:e}=r.deprecated;e&&(t=e.map(({rule:e,plugin:t})=>`"${e?.name}"${t?.name?` in "${t.name}"`:""}`).join(", "))}nn(`rule("${e}")`,t)}let s=Array.from({length:Math.max(i.options.length,n.length)},(e,t)=>nH(i.options[t])&&nH(n[t])?nG(n[t],i.options[t]):i.options[t]??n[t]);return t(i,s)},defaultOptions:n,meta:{...r,docs:{...r.docs,url:`https://eslint.style/rules/${e}`}}}}K(nU,H(eo()),"default");const nQ=/^[a-z]/;function nZ(e){let t=n2(e);return nQ.test(t)}function n0(e){return e&&["JSXElement","JSXFragment"].includes(e.type)}function n1(e){if(!e.type||"JSXAttribute"!==e.type)throw Error("The prop must be a JSXAttribute collected by the AST parser.");return"JSXNamespacedName"===e.name.type?`${e.name.namespace.name}:${e.name.name.name}`:e.name.name}function n2(e){if("JSXOpeningFragment"===e.type)return"<>";let{name:t}=e;if(!t)throw Error("The argument provided is not a JSXElement node.");if("JSXMemberExpression"===t.type){let{object:e,property:n}=t;return function e(t,n){return"JSXMemberExpression"===t.type?`${e(t.object,t.property)}.${n.name}`:`${t.name}.${n.name}`}(e,n)}return"JSXNamespacedName"===t.type?`${t.namespace.name}:${t.name.name}`:e.name.name}function n3(t){return/^[\u0020-\u007F]*$/u.test(t)?t.length:[...(e??=new Intl.Segmenter).segment(t)].length}var n6=class{retainedRange;constructor(e,t){this.fixer=e,this.sourceCode=t,this.retainedRange=null}retainRange(e){return this.retainedRange=e,this}retainEnclosingFunction(e){let t=nf(e);return this.retainRange(t?t.range:this.sourceCode.ast.range)}retainSurroundingTokens(e){let t=this.sourceCode.getTokenBefore(e)||e,n=this.sourceCode.getTokenAfter(e)||e;return this.retainRange([t.range[0],n.range[1]])}replaceTextRange(e,t){let n;return n=this.retainedRange?[Math.min(this.retainedRange[0],e[0]),Math.max(this.retainedRange[1],e[1])]:e,this.fixer.replaceTextRange(n,this.sourceCode.text.slice(n[0],e[0])+t+this.sourceCode.text.slice(e[1],n[1]))}remove(e){return this.replaceTextRange(e.range,"")}},n4=nz({name:"array-bracket-newline",meta:{type:"layout",docs:{description:"Enforce linebreaks after opening and before closing array brackets"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never","consistent"]},{type:"object",properties:{multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}],messages:{unexpectedOpeningLinebreak:"There should be no linebreak after '['.",unexpectedClosingLinebreak:"There should be no linebreak before ']'.",missingOpeningLinebreak:"A linebreak is required after '['.",missingClosingLinebreak:"A linebreak is required before ']'."}},create(e){let t=e.sourceCode;function n(n){let r=n.elements,i=function(e){let t,n,r,i=(t=!1,n=!1,r=0,e?"consistent"===e?(t=!0,r=1/0):"always"===e||"string"!=typeof e&&0===e.minItems?r=0:"never"===e?r=1/0:(n=!!e.multiline,r=e.minItems||1/0):(t=!1,n=!0,r=1/0),{consistent:t,multiline:n,minItems:r});return{ArrayExpression:i,ArrayPattern:i}}(e.options[0])[n.type],s=t.getFirstToken(n),a=t.getLastToken(n),o=t.getTokenAfter(s,{includeComments:!0}),l=t.getTokenBefore(a,{includeComments:!0}),p=t.getTokenAfter(s),c=t.getTokenBefore(a);r.length>=i.minItems||i.multiline&&r.length>0&&!(0,nU.isTokenOnSameLine)(l,o)||0===r.length&&"Block"===o.type&&!(0,nU.isTokenOnSameLine)(l,o)&&o===l||i.consistent&&!(0,nU.isTokenOnSameLine)(s,p)?((0,nU.isTokenOnSameLine)(s,p)&&e.report({node:n,loc:s.loc,messageId:"missingOpeningLinebreak",fix:e=>e.insertTextAfter(s,"\n")}),(0,nU.isTokenOnSameLine)(c,a)&&e.report({node:n,loc:a.loc,messageId:"missingClosingLinebreak",fix:e=>e.insertTextBefore(a,"\n")})):((0,nU.isTokenOnSameLine)(s,p)||e.report({node:n,loc:s.loc,messageId:"unexpectedOpeningLinebreak",fix(e){let n=t.getTokenAfter(s,{includeComments:!0});return!n||(0,nU.isCommentToken)(n)?null:e.removeRange([s.range[1],n.range[0]])}}),(0,nU.isTokenOnSameLine)(c,a)||e.report({node:n,loc:a.loc,messageId:"unexpectedClosingLinebreak",fix(e){let n=t.getTokenBefore(a,{includeComments:!0});return!n||(0,nU.isCommentToken)(n)?null:e.removeRange([n.range[1],a.range[0]])}}))}return{ArrayPattern:n,ArrayExpression:n}}}),n5=nz({name:"array-bracket-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside array brackets"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{singleValue:{type:"boolean"},objectsInArrays:{type:"boolean"},arraysInArrays:{type:"boolean"}},additionalProperties:!1}],messages:{unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'."}},create(e){let t="always"===e.options[0],n=e.sourceCode;function r(n){return!!e.options[1]&&!t===e.options[1][n]}let i={spaced:t,singleElementException:r("singleValue"),objectsInArraysException:r("objectsInArrays"),arraysInArraysException:r("arraysInArrays")};function s(e){return e&&("ObjectExpression"===e.type||"ObjectPattern"===e.type)}function a(e){return e&&("ArrayExpression"===e.type||"ArrayPattern"===e.type)}function o(t){if(i.spaced&&0===t.elements.length)return;let r=n.getFirstToken(t),o=n.getFirstToken(t,1),l="ArrayPattern"===t.type&&t.typeAnnotation?n.getTokenBefore(t.typeAnnotation):n.getLastToken(t),p=n.getTokenBefore(l),c=t.elements[0],u=t.elements[t.elements.length-1],d=c&&i.objectsInArraysException&&s(c)||c&&i.arraysInArraysException&&a(c)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced,f=u&&i.objectsInArraysException&&s(u)||u&&i.arraysInArraysException&&a(u)||i.singleElementException&&1===t.elements.length?!i.spaced:i.spaced;(0,nU.isTokenOnSameLine)(r,o)&&(d&&!n.isSpaceBetween(r,o)&&e.report({node:t,loc:r.loc,messageId:"missingSpaceAfter",data:{tokenValue:r.value},fix:e=>e.insertTextAfter(r," ")}),!d&&n.isSpaceBetween(r,o)&&function(t,r){let i=n.getTokenAfter(r);e.report({node:t,loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:r.value},fix:e=>e.removeRange([r.range[1],i.range[0]])})}(t,r)),r!==p&&(0,nU.isTokenOnSameLine)(p,l)&&(f&&!n.isSpaceBetween(p,l)&&e.report({node:t,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}),!f&&n.isSpaceBetween(p,l)&&function(t,r){let i=n.getTokenBefore(r);e.report({node:t,loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:r.value},fix:e=>e.removeRange([i.range[1],r.range[0]])})}(t,l))}return{ArrayPattern:o,ArrayExpression:o}}}),n9=nz({name:"array-element-newline",meta:{type:"layout",docs:{description:"Enforce line breaks after each array element"},fixable:"whitespace",schema:{definitions:{basicConfig:{oneOf:[{type:"string",enum:["always","never","consistent"]},{type:"object",properties:{consistent:{type:"boolean"},multiline:{type:"boolean"},minItems:{type:["integer","null"],minimum:0}},additionalProperties:!1}]}},type:"array",items:[{oneOf:[{$ref:"#/definitions/basicConfig"},{type:"object",properties:{ArrayExpression:{$ref:"#/definitions/basicConfig"},ArrayPattern:{$ref:"#/definitions/basicConfig"}},additionalProperties:!1,minProperties:1}]}]},messages:{unexpectedLineBreak:"There should be no linebreak here.",missingLineBreak:"There should be a linebreak after this element."}},create(e){let t=e.sourceCode;function n(e){let t,n=!1,r=!1,i=e||"always";return"always"===i||"object"==typeof i&&0===i.minItems?t=0:"never"===i?t=1/0:"consistent"===i?(n=!0,t=1/0):(n=!!i.consistent,r=!!i.multiline,t=i.minItems||1/0),{consistent:n,multiline:r,minItems:t}}function r(r){let i=r.elements,s=function(e){if(e&&(e.ArrayExpression||e.ArrayPattern)){let t,r;return e.ArrayExpression&&(t=n(e.ArrayExpression)),e.ArrayPattern&&(r=n(e.ArrayPattern)),{ArrayExpression:t,ArrayPattern:r}}let t=n(e);return{ArrayExpression:t,ArrayPattern:t}}(e.options[0])[r.type];if(!s)return;let a=!1;s.multiline&&(a=i.some(e=>null!==e&&!nY(e)));let o=0;for(let e=0;e<r.elements.length;e++){let n=r.elements[e],s=i[e-1];if(0===e||null===n||null===s)continue;let a=t.getFirstTokenBetween(s,n,nU.isCommaToken),l=t.getTokenBefore(a),p=t.getTokenAfter(a);!(0,nU.isTokenOnSameLine)(l,p)&&o++}let l=i.length>=s.minItems||s.multiline&&a||s.consistent&&o>0&&o<r.elements.length;i.forEach((n,r)=>{let s=i[r-1];if(0===r||null===n||null===s)return;let a=t.getFirstTokenBetween(s,n,nU.isCommaToken),o=t.getTokenBefore(a),p=t.getTokenAfter(a);l?(0,nU.isTokenOnSameLine)(o,p)&&function(n){let r=t.getTokenBefore(n,{includeComments:!0});e.report({loc:{start:r.loc.end,end:n.loc.start},messageId:"missingLineBreak",fix:e=>e.replaceTextRange([r.range[1],n.range[0]],"\n")})}(p):(0,nU.isTokenOnSameLine)(o,p)||function(n){let r=t.getTokenBefore(n,{includeComments:!0});e.report({loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedLineBreak",fix(e){if((0,nU.isCommentToken)(r))return null;if(!(0,nU.isTokenOnSameLine)(r,n))return e.replaceTextRange([r.range[1],n.range[0]]," ");let i=t.getTokenBefore(r,{includeComments:!0});return(0,nU.isCommentToken)(i)?null:e.replaceTextRange([i.range[1],r.range[0]],"")}})}(p)})}return{ArrayPattern:r,ArrayExpression:r}}}),n8=nz({name:"arrow-parens",meta:{type:"layout",docs:{description:"Require parentheses around arrow function arguments"},fixable:"code",schema:[{type:"string",enum:["always","as-needed"]},{type:"object",properties:{requireForBlockBody:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedParens:"Unexpected parentheses around single function argument.",expectedParens:"Expected parentheses around arrow function argument.",unexpectedParensInline:"Unexpected parentheses around single function argument having a body with no curly braces.",expectedParensBlock:"Expected parentheses around arrow function argument having a body with curly braces."}},create(e){let t="as-needed"===e.options[0],n=t&&e.options[1]&&!0===e.options[1].requireForBlockBody,r=e.sourceCode;function i(e){return r.getTokenAfter(e.params[0],nU.isClosingParenToken)}return{"ArrowFunctionExpression[params.length=1]":function(s){let a=!t||n&&"BlockStatement"===s.body.type,o=function(e){let t=r.getTokenBefore(e.params[0]);return t&&(0,nU.isOpeningParenToken)(t)&&e.range[0]<=t.range[0]?t:null}(s),l=null!==o,[p]=s.params;a&&!l&&e.report({node:s,messageId:n?"expectedParensBlock":"expectedParens",loc:p.loc,*fix(e){yield e.insertTextBefore(p,"("),yield e.insertTextAfter(p,")")}}),a||!l||"Identifier"!==p.type||p.optional||p.typeAnnotation||s.returnType||r.commentsExistBetween(o,i(s))||function(e,t){let n=+!!e.async;return r.getFirstToken(e,{skip:n})!==t}(s,o)||e.report({node:s,messageId:n?"unexpectedParensInline":"unexpectedParens",loc:p.loc,*fix(e){let t=r.getTokenBefore(o),n=i(s);t&&t.range[1]===o.range[0]&&!nj(t,r.getFirstToken(p))&&(yield e.insertTextBefore(o," ")),yield e.removeRange([o.range[0],p.range[0]]),yield e.removeRange([p.range[1],n.range[1]])}})}}}}),n7=nz({name:"arrow-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after the arrow in arrow functions"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{expectedBefore:"Missing space before =>.",unexpectedBefore:"Unexpected space before =>.",expectedAfter:"Missing space after =>.",unexpectedAfter:"Unexpected space after =>."}},create(e){let t=Object.assign({},e.options[0]);t.before=!1!==t.before,t.after=!1!==t.after;let n=e.sourceCode;return{ArrowFunctionExpression:function(r){var i;let s=function(e){let t=n.getTokenBefore(e.body,nU.isArrowToken);return{before:n.getTokenBefore(t),arrow:t,after:n.getTokenAfter(t)}}(r),a={before:(i=s).arrow.range[0]-i.before.range[1],after:i.after.range[0]-i.arrow.range[1]};t.before?0===a.before&&e.report({node:s.before,messageId:"expectedBefore",fix:e=>e.insertTextBefore(s.arrow," ")}):a.before>0&&e.report({node:s.before,messageId:"unexpectedBefore",fix:e=>e.removeRange([s.before.range[1],s.arrow.range[0]])}),t.after?0===a.after&&e.report({node:s.after,messageId:"expectedAfter",fix:e=>e.insertTextAfter(s.arrow," ")}):a.after>0&&e.report({node:s.after,messageId:"unexpectedAfter",fix:e=>e.removeRange([s.arrow.range[1],s.after.range[0]])})}}}}),re=nz({name:"block-spacing",meta:{type:"layout",docs:{description:"Disallow or enforce spaces inside of blocks after opening block and before closing block"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{missing:"Requires a space {{location}} '{{token}}'.",extra:"Unexpected space(s) {{location}} '{{token}}'."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r="never"!==t,i=r?"missing":"extra";function s(e,t){return!(0,nU.isTokenOnSameLine)(e,t)||n.isSpaceBetween(e,t)===r}function a(t){let a=n.getFirstToken(t,{filter:e=>(0,nU.isOpeningBraceToken)(e)}),o=n.getLastToken(t),l=n.getTokenAfter(a,{includeComments:!0}),p=n.getTokenBefore(o,{includeComments:!0});if((0,nU.isOpeningBraceToken)(a)&&(0,nU.isClosingBraceToken)(o)&&l!==o&&(r||l.type!==em.AST_TOKEN_TYPES.Line)){if(!s(a,l)){let n=a.loc;"extra"===i&&(n={start:a.loc.end,end:l.loc.start}),e.report({node:t,loc:n,messageId:i,data:{location:"after",token:a.value},fix:e=>r?e.insertTextBefore(l," "):e.removeRange([a.range[1],l.range[0]])})}if(!s(p,o)){let n=o.loc;"extra"===i&&(n={start:p.loc.end,end:o.loc.start}),e.report({node:t,loc:n,messageId:i,data:{location:"before",token:o.value},fix:e=>r?e.insertTextAfter(p," "):e.removeRange([p.range[1],o.range[0]])})}}}return{BlockStatement:a,StaticBlock:a,SwitchStatement:a}}}),rt=nz({name:"brace-style",meta:{type:"layout",docs:{description:"Enforce consistent brace style for blocks"},fixable:"whitespace",schema:[{type:"string",enum:["1tbs","stroustrup","allman"]},{type:"object",properties:{allowSingleLine:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{nextLineOpen:"Opening curly brace does not appear on the same line as controlling statement.",sameLineOpen:"Opening curly brace appears on the same line as controlling statement.",blockSameLine:"Statement inside of curly braces should be on next line.",nextLineClose:"Closing curly brace does not appear on the same line as the subsequent block.",singleLineClose:"Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.",sameLineClose:"Closing curly brace appears on the same line as the subsequent block."}},defaultOptions:["1tbs",{allowSingleLine:!1}],create(e,t){let[n,{allowSingleLine:r}={allowSingleLine:!1}]=t,i="allman"===n,s=e.sourceCode;function a(e,t){let n=[e.range[1],t.range[0]];return s.text.slice(n[0],n[1]).trim()?null:e=>e.replaceTextRange(n," ")}function o(t,n){let o=s.getTokenBefore(t),l=s.getTokenBefore(n),p=s.getTokenAfter(t),c=r&&(0,nU.isTokenOnSameLine)(t,n);i||(0,nU.isTokenOnSameLine)(o,t)||e.report({node:t,messageId:"nextLineOpen",fix:a(o,t)}),i&&(0,nU.isTokenOnSameLine)(o,t)&&!c&&e.report({node:t,messageId:"sameLineOpen",fix:e=>e.insertTextBefore(t,"\n")}),(0,nU.isTokenOnSameLine)(t,p)&&p!==n&&!c&&e.report({node:t,messageId:"blockSameLine",fix:e=>e.insertTextAfter(t,"\n")}),(0,nU.isTokenOnSameLine)(l,n)&&l!==t&&!c&&e.report({node:n,messageId:"singleLineClose",fix:e=>e.insertTextBefore(n,"\n")})}function l(t){let r=s.getTokenAfter(t);"1tbs"!==n||(0,nU.isTokenOnSameLine)(t,r)||e.report({node:t,messageId:"nextLineClose",fix:a(t,r)}),"1tbs"!==n&&(0,nU.isTokenOnSameLine)(t,r)&&e.report({node:t,messageId:"sameLineClose",fix:e=>e.insertTextAfter(t,"\n")})}return{BlockStatement(e){na.has(e.parent.type)||o(s.getFirstToken(e),s.getLastToken(e))},StaticBlock(e){o(s.getFirstToken(e,{skip:1}),s.getLastToken(e))},ClassBody(e){o(s.getFirstToken(e),s.getLastToken(e))},SwitchStatement(e){let t=s.getLastToken(e);o(s.getTokenBefore(e.cases.length?e.cases[0]:t),t)},IfStatement(e){"BlockStatement"===e.consequent.type&&e.alternate&&l(s.getLastToken(e.consequent))},TryStatement(e){l(s.getLastToken(e.block)),e.handler&&e.finalizer&&l(s.getLastToken(e.handler.body))},TSModuleBlock(e){o(s.getFirstToken(e),s.getLastToken(e))}}}});const rn=["always-multiline","always","never","only-multiline"];var rr=nz({name:"comma-dangle",meta:{type:"layout",docs:{description:"Require or disallow trailing commas"},schema:{$defs:{value:{type:"string",enum:rn},valueWithIgnore:{type:"string",enum:[...rn,"ignore"]}},type:"array",items:[{oneOf:[{$ref:"#/$defs/value"},{type:"object",properties:{arrays:{$ref:"#/$defs/valueWithIgnore"},objects:{$ref:"#/$defs/valueWithIgnore"},imports:{$ref:"#/$defs/valueWithIgnore"},exports:{$ref:"#/$defs/valueWithIgnore"},functions:{$ref:"#/$defs/valueWithIgnore"},importAttributes:{$ref:"#/$defs/valueWithIgnore"},dynamicImports:{$ref:"#/$defs/valueWithIgnore"},enums:{$ref:"#/$defs/valueWithIgnore"},generics:{$ref:"#/$defs/valueWithIgnore"},tuples:{$ref:"#/$defs/valueWithIgnore"}},additionalProperties:!1}]}],additionalItems:!1},fixable:"code",messages:{unexpected:"Unexpected trailing comma.",missing:"Missing trailing comma."}},defaultOptions:["never"],create(e,[t]){let n=function(e={},t){let n="never";return"string"==typeof e?{arrays:e,objects:e,imports:e,exports:e,functions:t&&"latest"!==t&&t<2017?"ignore":e,importAttributes:e,dynamicImports:t&&"latest"!==t&&t<2025?"ignore":e,enums:e,generics:e,tuples:e}:{arrays:e.arrays??n,objects:e.objects??n,imports:e.imports??n,exports:e.exports??n,functions:e.functions??n,importAttributes:e.importAttributes??n,dynamicImports:e.dynamicImports??n,enums:e.enums??n,generics:e.generics??n,tuples:e.tuples??n}}(t,e?.languageOptions?.ecmaVersion??e.parserOptions.ecmaVersion),r=e.parserOptions?.ecmaFeatures?.jsx&&e.filename?.endsWith(".tsx"),i=e.sourceCode,s=["}","]",")",">"],a={always:u,"always-multiline":function(e){p(e)?u(e):c(e)},"only-multiline":function(e){p(e)||c(e)},never:c,ignore:()=>{}};function o(e){return e?e[e.length-1]??null:null}function l(e){switch(e.node.type){case"ObjectExpression":case"ArrayExpression":case"CallExpression":case"NewExpression":case"ImportExpression":return i.getLastToken(e.node,1);default:{let t=e.lastItem;if(!t)return null;let n=i.getTokenAfter(t);if((0,nU.isCommaToken)(n))return n;return i.getLastToken(t)}}}function p(e){if(!e.lastItem)return!1;let t=l(e);if(!t)return!1;let n=i.getTokenAfter(t);return!!n&&n.loc.end.line!==t.loc.end.line}function c(t){if(r&&t.node.type===em.AST_NODE_TYPES.TSTypeParameterDeclaration&&1===t.node.params.length)return;let n=t.lastItem;if(!n)return;let s=l(t);s&&(0,nU.isCommaToken)(s)&&e.report({node:n,loc:s.loc,messageId:"unexpected",*fix(e){yield e.remove(s),yield e.insertTextBefore(i.getTokenBefore(s),""),yield e.insertTextAfter(i.getTokenAfter(s),"")}})}function u(t){let n=t.lastItem;if(!n)return;if("RestElement"===n.type)return void c(t);let r=l(t);if(!r||","===r.value)return;let a=i.getTokenAfter(r);a&&s.includes(a.value)&&e.report({node:n,loc:{start:r.loc.end,end:nD(i,r.loc.end)},messageId:"missing",*fix(e){yield e.insertTextAfter(r,","),yield e.insertTextBefore(r,""),yield e.insertTextAfter(i.getTokenAfter(r),"")}})}return{ObjectExpression:e=>{a[n.objects]({node:e,lastItem:o(e.properties)})},ObjectPattern:e=>{a[n.objects]({node:e,lastItem:o(e.properties)})},ArrayExpression:e=>{a[n.arrays]({node:e,lastItem:o(e.elements)})},ArrayPattern:e=>{a[n.arrays]({node:e,lastItem:o(e.elements)})},ImportDeclaration:e=>{let t=o(e.specifiers);t?.type==="ImportSpecifier"&&a[n.imports]({node:e,lastItem:t}),a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},ExportNamedDeclaration:e=>{a[n.exports]({node:e,lastItem:o(e.specifiers)}),a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},ExportAllDeclaration:e=>{a[n.importAttributes]({node:e,lastItem:o(e.attributes)})},FunctionDeclaration:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},FunctionExpression:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},ArrowFunctionExpression:e=>{a[n.functions]({node:e,lastItem:o(e.params)})},CallExpression:e=>{a[n.functions]({node:e,lastItem:o(e.arguments)})},NewExpression:e=>{a[n.functions]({node:e,lastItem:o(e.arguments)})},ImportExpression:e=>{a[n.dynamicImports]({node:e,lastItem:e.options??e.source})},TSEnumDeclaration(e){a[n.enums]({node:e,lastItem:o(e.body?.members??e.members)})},TSTypeParameterDeclaration(e){a[n.generics]({node:e,lastItem:o(e.params)})},TSTupleType(e){a[n.tuples]({node:e,lastItem:o(e.elementTypes)})}}}}),ri=nz({name:"comma-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after commas"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpected:"There should be no space {{loc}} ','.",missing:"A space is required {{loc}} ','."}},defaultOptions:[{before:!1,after:!0}],create(e,[t={}]){let{before:n,after:r}=t,i=e.sourceCode,s=i.tokensAndComments,a=new Set;function o(e){let t=i.getFirstToken(e);for(let n of e.elements){let e;null==n?(e=i.getTokenAfter(t))&&(0,nU.isCommaToken)(e)&&a.add(e):e=i.getTokenAfter(n),t=e}}return{TSTypeParameterDeclaration:function(e){let t=e.params.length;if(t){let n=e.params[t-1],r=i.getTokenAfter(n);r&&(0,nU.isCommaToken)(r)&&a.add(r)}},ArrayExpression:o,ArrayPattern:o,"Program:exit":function(){s.forEach((t,o)=>{var l,p;if(!(0,nU.isCommaToken)(t))return;let c=s[o-1],u=s[o+1];l=(0,nU.isCommaToken)(c)||a.has(t)?null:c,p=u&&(0,nU.isCommaToken)(u)||a.has(t)?null:u,l&&(0,nU.isTokenOnSameLine)(l,t)&&n!==i.isSpaceBetween(l,t)&&e.report({node:t,data:{loc:"before"},messageId:n?"missing":"unexpected",fix:e=>n?e.insertTextBefore(t," "):e.replaceTextRange([l.range[1],t.range[0]],"")}),p&&(0,nU.isTokenOnSameLine)(t,p)&&!(0,nU.isClosingParenToken)(p)&&!(0,nU.isClosingBracketToken)(p)&&!(0,nU.isClosingBraceToken)(p)&&!(!r&&p.type===em.AST_TOKEN_TYPES.Line)&&r!==i.isSpaceBetween(t,p)&&e.report({node:t,data:{loc:"after"},messageId:r?"missing":"unexpected",fix:e=>r?e.insertTextAfter(t," "):e.replaceTextRange([t.range[1],p.range[0]],"")})})}}}}),rs=nz({name:"comma-style",meta:{type:"layout",docs:{description:"Enforce consistent comma style"},fixable:"code",schema:[{type:"string",enum:["first","last"]},{type:"object",properties:{exceptions:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedLineBeforeAndAfterComma:"Bad line breaking before and after ','.",expectedCommaFirst:"',' should be placed first.",expectedCommaLast:"',' should be placed last."}},create(e){let t=e.options[0]||"last",n=e.sourceCode,r={};if(2===e.options.length&&Object.prototype.hasOwnProperty.call(e.options[1],"exceptions")){e.options[1]??={exceptions:{}};let t=e.options[1].exceptions,n=Object.keys(t);for(let e=0;e<n.length;e++)r[n[e]]=t[n[e]]}function i(e,t,r,i){let s=n.text.slice(t.range[1],r.range[0])+n.text.slice(r.range[1],i.range[0]),a=[t.range[1],i.range[0]];return function(t){return t.replaceTextRange(a,function(e,t){switch(e){case"between":return`,${t.replace(nU.LINEBREAK_MATCHER,"")}`;case"first":return`${t},`;case"last":return`,${t}`;default:return""}}(e,s))}}function s(r,s){(function(e,t){if(0===t.length)return[];let r=t.filter(e=>!!e);if(0===r.length)return n.getTokens(e).filter(nU.isCommaToken);let i=[],s=r[0],a=n.getTokenBefore(s);for(;a&&e.range[0]<=a.range[0];){if((0,nU.isCommaToken)(a))i.unshift(a);else if((0,nU.isNotOpeningParenToken)(a))break;a=n.getTokenBefore(a)}let o=null;for(let e of r){o&&i.push(...n.getTokensBetween(o,e).filter(nU.isCommaToken));let t=n.getLastToken(e);t&&(0,nU.isCommaToken)(t)&&i.push(t),o=e}let l=n.getTokenAfter(o);for(;l&&l.range[1]<=e.range[1];){if((0,nU.isCommaToken)(l))i.push(l);else if((0,nU.isNotClosingParenToken)(l))break;l=n.getTokenAfter(l)}return i})(r,s).forEach(r=>{let s=n.getTokenBefore(r),a=n.getTokenAfter(r);if(!((0,nU.isOpeningBracketToken)(s)||(0,nU.isCommaToken)(s)&&(0,nU.isOpeningBracketToken)(n.getTokenBefore(s,nU.isNotCommaToken)))&&(!(0,nU.isCommaToken)(a)||(0,nU.isTokenOnSameLine)(r,a)))if((0,nU.isTokenOnSameLine)(r,a)&&(0,nU.isTokenOnSameLine)(s,r));else if((0,nU.isTokenOnSameLine)(r,a)||(0,nU.isTokenOnSameLine)(s,r))"first"!==t||(0,nU.isTokenOnSameLine)(r,a)?"last"===t&&(0,nU.isTokenOnSameLine)(r,a)&&e.report({node:r,messageId:"expectedCommaLast",fix:i(t,s,r,a)}):e.report({node:r,messageId:"expectedCommaFirst",fix:i(t,s,r,a)});else{let o=n.getCommentsAfter(r)[0],l=o&&"Block"===o.type&&(0,nU.isTokenOnSameLine)(r,o)?t:"between";e.report({node:r,messageId:"unexpectedLineBeforeAndAfterComma",fix:i(l,s,r,a)})}})}let a={};return r.VariableDeclaration||(a.VariableDeclaration=e=>s(e,e.declarations)),r.ObjectExpression||(a.ObjectExpression=o),r.ObjectPattern||(a.ObjectPattern=o),r.ArrayExpression||(a.ArrayExpression=l),r.ArrayPattern||(a.ArrayPattern=l),r.FunctionDeclaration||(a.FunctionDeclaration=p),r.FunctionExpression||(a.FunctionExpression=p),r.ArrowFunctionExpression||(a.ArrowFunctionExpression=p),r.CallExpression||(a.CallExpression=c),r.ImportDeclaration||(a.ImportDeclaration=e=>{s(e,e.specifiers),u(e)}),r.NewExpression||(a.NewExpression=c),r.ExportAllDeclaration||(a.ExportAllDeclaration=u),r.ExportNamedDeclaration||(a.ExportNamedDeclaration=e=>{s(e,e.specifiers),u(e)}),r.ImportExpression||(a.ImportExpression=e=>{s(e,[e.source,e.options??null])}),r.SequenceExpression||(a.SequenceExpression=e=>s(e,e.expressions)),r.ClassDeclaration||(a.ClassDeclaration=d),r.ClassExpression||(a.ClassExpression=d),r.TSDeclareFunction||(a.TSDeclareFunction=p),r.TSFunctionType||(a.TSFunctionType=p),r.TSConstructorType||(a.TSConstructorType=p),r.TSEmptyBodyFunctionExpression||(a.TSEmptyBodyFunctionExpression=p),r.TSMethodSignature||(a.TSMethodSignature=p),r.TSCallSignatureDeclaration||(a.TSCallSignatureDeclaration=p),r.TSConstructSignatureDeclaration||(a.TSConstructSignatureDeclaration=p),r.TSTypeParameterDeclaration||(a.TSTypeParameterDeclaration=m),r.TSTypeParameterInstantiation||(a.TSTypeParameterInstantiation=m),r.TSEnumBody||(a.TSEnumBody=f),r.TSTypeLiteral||(a.TSTypeLiteral=f),r.TSIndexSignature||(a.TSIndexSignature=e=>s(e,e.parameters)),r.TSInterfaceDeclaration||(a.TSInterfaceDeclaration=e=>s(e,e.extends)),r.TSInterfaceBody||(a.TSInterfaceBody=e=>s(e,e.body)),r.TSTupleType||(a.TSTupleType=e=>s(e,e.elementTypes)),a;function o(e){s(e,e.properties)}function l(e){s(e,e.elements)}function p(e){s(e,e.params)}function c(e){s(e,e.arguments)}function u(e){e.attributes&&s(e,e.attributes)}function d(e){e.implements&&s(e,e.implements)}function f(e){s(e,e.members)}function m(e){s(e,e.params)}}}),ra=nz({name:"computed-property-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside computed property brackets"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{enforceForClassMembers:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedSpaceBefore:"There should be no space before '{{tokenValue}}'.",unexpectedSpaceAfter:"There should be no space after '{{tokenValue}}'.",missingSpaceBefore:"A space is required before '{{tokenValue}}'.",missingSpaceAfter:"A space is required after '{{tokenValue}}'."}},create(e){let t=e.sourceCode,n="always"===e.options[0],r=!e.options[1]||e.options[1].enforceForClassMembers;function i(r){return function(i){if(!i.computed)return;let s=i[r],a=t.getTokenBefore(s,nU.isOpeningBracketToken),o=t.getTokenAfter(a,{includeComments:!0}),l=t.getTokenAfter(s,nU.isClosingBracketToken),p=t.getTokenBefore(l,{includeComments:!0});(0,nU.isTokenOnSameLine)(a,o)&&(n?!t.isSpaceBetween(a,o)&&(0,nU.isTokenOnSameLine)(a,o)&&e.report({node:i,loc:a.loc,messageId:"missingSpaceAfter",data:{tokenValue:a.value},fix:e=>e.insertTextAfter(a," ")}):t.isSpaceBetween(a,o)&&e.report({node:i,loc:{start:a.loc.end,end:o.loc.start},messageId:"unexpectedSpaceAfter",data:{tokenValue:a.value},fix:e=>e.removeRange([a.range[1],o.range[0]])})),(0,nU.isTokenOnSameLine)(p,l)&&(n?!t.isSpaceBetween(p,l)&&(0,nU.isTokenOnSameLine)(p,l)&&e.report({node:i,loc:l.loc,messageId:"missingSpaceBefore",data:{tokenValue:l.value},fix:e=>e.insertTextBefore(l," ")}):t.isSpaceBetween(p,l)&&e.report({node:i,loc:{start:p.loc.end,end:l.loc.start},messageId:"unexpectedSpaceBefore",data:{tokenValue:l.value},fix:e=>e.removeRange([p.range[1],l.range[0]])}))}}let s={Property:i("key"),MemberExpression:i("property")};return r&&(s.MethodDefinition=i("key"),s.PropertyDefinition=i("key"),s.AccessorProperty=i("key")),s}});const ro={multiline:{type:"boolean"},minElements:{type:"integer",minimum:0},consistent:{type:"boolean"}},rl={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:ro,additionalProperties:!1}]};var rp=((n=rp||{}).IfStatementConsequent="IfStatementConsequent",n.IfStatementAlternative="IfStatementAlternative",n.DoWhileStatement="DoWhileStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.WhileStatement="WhileStatement",n.SwitchStatement="SwitchStatement",n.SwitchCase="SwitchCase",n.TryStatementBlock="TryStatementBlock",n.TryStatementHandler="TryStatementHandler",n.TryStatementFinalizer="TryStatementFinalizer",n.BlockStatement="BlockStatement",n.ArrowFunctionExpression="ArrowFunctionExpression",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Property="Property",n.ClassBody="ClassBody",n.StaticBlock="StaticBlock",n.WithStatement="WithStatement",n.TSModuleBlock="TSModuleBlock",n);const rc={multiline:!1,minElements:1/0,consistent:!0},ru={multiline:!1,minElements:0,consistent:!1},rd={multiline:!1,minElements:1/0,consistent:!1};function rf(e){return"always"===e?ru:"never"===e?rd:e?{consistent:!!e.consistent,minElements:e.minElements??1/0,multiline:!!e.multiline}:rc}var rm=nz({name:"curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{...Object.fromEntries(Object.entries(rp).map(([e])=>[e,rl])),...ro},additionalProperties:!1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},create(e){let t=e.sourceCode,n=function(e){let t=rf(e);return Object.fromEntries(Object.entries(rp).map(([n])=>[n,"object"==typeof e&&null!=e&&n in e?rf(e[n]):t]))}(e.options[0]);function r(r,i){let s,a,o,l=n[i];switch(r.type){case"SwitchStatement":a=t.getLastToken(r),s=t.getTokenBefore(r.cases.length?r.cases[0]:a),o=r.cases.length;break;case"StaticBlock":s=t.getFirstToken(r,e=>"{"===e.value),a=t.getLastToken(r),o=r.body.length;break;default:s=t.getFirstToken(r),a=t.getLastToken(r),o=r.body.length}let p=t.getTokenAfter(s,{includeComments:!0}),c=t.getTokenBefore(a,{includeComments:!0}),u=o>=l.minElements||l.multiline&&o>0&&!(0,nU.isTokenOnSameLine)(c,p),d=(0,nU.isCommentToken)(p),f=(0,nU.isCommentToken)(c);if(p=t.getTokenAfter(s),c=t.getTokenBefore(a),u)(0,nU.isTokenOnSameLine)(s,p)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:r,loc:s.loc,fix:e=>d?null:e.insertTextAfter(s,"\n")}),(0,nU.isTokenOnSameLine)(c,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:r,loc:a.loc,fix:e=>f?null:e.insertTextBefore(a,"\n")});else{let t=l.consistent,n=!(0,nU.isTokenOnSameLine)(s,p),i=!(0,nU.isTokenOnSameLine)(c,a);(!t&&n||t&&n&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:r,loc:s.loc,fix:e=>d?null:e.removeRange([s.range[1],p.range[0]])}),(!t&&i||t&&!n&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:r,loc:a.loc,fix:e=>f?null:e.removeRange([c.range[1],a.range[0]])})}}function i(e){r(e,e.type)}return{BlockStatement(e){let{parent:t}=e;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":case"ForStatement":case"WhileStatement":case"ArrowFunctionExpression":case"FunctionDeclaration":case"WithStatement":r(e,t.type);break;case"FunctionExpression":"Property"===t.parent.type&&t.parent.method?r(e,"Property"):r(e,t.type);break;case"IfStatement":e===t.consequent&&r(e,"IfStatementConsequent"),e===t.alternate&&r(e,"IfStatementAlternative");break;case"TryStatement":e===t.block&&r(e,"TryStatementBlock"),e===t.finalizer&&r(e,"TryStatementFinalizer");break;case"CatchClause":r(e,"TryStatementHandler");break;default:"SwitchCase"===t.type&&1===t.consequent.length?r(e,"SwitchCase"):r(e,"BlockStatement")}},SwitchStatement:i,ClassBody:i,StaticBlock:i,TSModuleBlock:i}}}),rh=nz({name:"dot-location",meta:{type:"layout",docs:{description:"Enforce consistent newlines before and after dots"},schema:[{type:"string",enum:["object","property"]}],fixable:"code",messages:{expectedDotAfterObject:"Expected dot to be on same line as object.",expectedDotBeforeProperty:"Expected dot to be on same line as property."}},create(e){let t=e.options[0],n="object"===t||!t,r=e.sourceCode;return{MemberExpression:function(t){"MemberExpression"!==t.type||t.computed||function(t){let i=t.property,s=r.getTokenBefore(i);if(n&&s){let n=r.getTokenBefore(s);n&&!(0,nU.isTokenOnSameLine)(n,s)&&e.report({node:t,loc:s.loc,messageId:"expectedDotAfterObject",*fix(e){s.value.startsWith(".")&&nL(n)?yield e.insertTextAfter(n,` ${s.value}`):yield e.insertTextAfter(n,s.value),yield e.remove(s)}})}else s&&!(0,nU.isTokenOnSameLine)(s,i)&&e.report({node:t,loc:s.loc,messageId:"expectedDotBeforeProperty",*fix(e){yield e.remove(s),yield e.insertTextBefore(i,s.value)}})}(t)}}}}),rg=nz({name:"eol-last",meta:{type:"layout",docs:{description:"Require or disallow newline at the end of files"},fixable:"whitespace",schema:[{type:"string",enum:["always","never","unix","windows"]}],messages:{missing:"Newline required at end of file but not found.",unexpected:"Newline not allowed at end of file."}},create:e=>({Program:function(t){let n=e.sourceCode,r=n.getText(),i={column:n.lines[n.lines.length-1].length,line:n.lines.length},s=`\r
2
+ `,a=r.endsWith("\n");if(!r.length)return;let o=e.options[0]||"always",l=!1;if("unix"===o&&(nn('option("unix")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always"),"windows"===o&&(nn('option("windows")','"always" and "@stylistic/eslint-plugin/rules/linebreak-style"',"eol-last"),o="always",l=!0),"always"!==o||a){if("never"===o&&a){let r=n.lines[n.lines.length-2];e.report({node:t,loc:{start:{line:n.lines.length-1,column:r.length},end:{line:n.lines.length,column:0}},messageId:"unexpected",fix(e){let t=/(?:\r?\n)+$/u.exec(n.text).index,r=n.text.length;return e.replaceTextRange([t,r],"")}})}}else e.report({node:t,loc:i,messageId:"missing",fix:e=>e.insertTextAfterRange([0,r.length],l?s:"\n")})}})}),ry=nz({name:"function-call-argument-newline",meta:{type:"layout",docs:{description:"Enforce line breaks between arguments of a function call"},fixable:"whitespace",schema:[{type:"string",enum:["always","never","consistent"]}],messages:{unexpectedLineBreak:"There should be no line break here.",missingLineBreak:"There should be a line break after this argument."}},create(e){let t=e.sourceCode,n={messageId:"unexpectedLineBreak",check:(e,t)=>!(0,nU.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]]," ")},r={messageId:"missingLineBreak",check:(e,t)=>(0,nU.isTokenOnSameLine)(e,t),createFix:(e,t)=>n=>n.replaceTextRange([t.range[1],e.range[0]],"\n")};function i(n,r){for(let i=1;i<n.length;i++){let s=n[i-1],a=t.getLastToken(s),o=t.getFirstToken(n[i]);if(r.check(a,o)){let s=t.getTokenBefore(o,{includeComments:!0}),a="Line"===s.type;e.report({node:n[i-1],loc:{start:s.loc.end,end:o.loc.start},messageId:r.messageId,fix:a?null:r.createFix(o,s)})}}}function s(s){if(s.length<2)return;let a=e.options[0]||"always";if("never"===a)i(s,n);else if("always"===a)i(s,r);else if("consistent"===a){let e=t.getLastToken(s[0]),a=t.getFirstToken(s[1]);(0,nU.isTokenOnSameLine)(e,a)?i(s,n):i(s,r)}}return{CallExpression:e=>s(e.arguments),NewExpression:e=>s(e.arguments),ImportExpression:e=>{e.options&&s([e.source,e.options])}}}}),rx=nz({name:"function-call-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing between function identifiers and their invocations"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["never"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["always"]},{type:"object",properties:{allowNewlines:{type:"boolean"},optionalChain:{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpectedWhitespace:"Unexpected whitespace between function name and paren.",unexpectedNewline:"Unexpected newline between function name and paren.",missing:"Missing space between function name and paren."}},defaultOptions:["never",{}],create(e,[t,n]){let r=e.sourceCode,i=r.getText(),{allowNewlines:s=!1,optionalChain:a={before:!0,after:!0}}=n;function o(n,o,l){let p=(0,nU.isOptionalCallExpression)(n),c=i.slice(o.range[1],l.range[0]).replace(/\/\*.*?\*\//gu,""),u=/\s/u.test(c),d=u&&nU.LINEBREAK_MATCHER.test(c);if("never"===t){if(u)return e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"unexpectedWhitespace",fix:e=>r.commentsExistBetween(o,l)?null:p?e.replaceTextRange([o.range[1],l.range[0]],"?."):e.removeRange([o.range[1],l.range[0]])})}else if(p){let{before:t=!0,after:i=!0}=a,p=/^\s/u.test(c),u=/\s$/u.test(c),f=t?p:!p,m=i?u:!u,h=s||!d;f&&m&&h||e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:h?!t&&p||!i&&u?"unexpectedWhitespace":"missing":"unexpectedNewline",fix(e){if(r.commentsExistBetween(o,l))return null;let n=c;if(!s){let e=RegExp(nU.LINEBREAK_MATCHER.source,"g");n=n.replaceAll(e," ")}return f||(n=t?` ${n}`:n.trimStart()),m||(n=i?`${n} `:n.trimEnd()),e.replaceTextRange([o.range[1],l.range[0]],n)}})}else u?!s&&d&&e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"unexpectedNewline",fix:e=>r.commentsExistBetween(o,l)?null:e.replaceTextRange([o.range[1],l.range[0]]," ")}):e.report({node:n,loc:{start:o.loc.end,end:l.loc.start},messageId:"missing",fix:e=>e.insertTextBefore(l," ")})}return{"CallExpression, NewExpression":function(e){let t=r.getLastToken(e),n=r.getLastToken(e.typeArguments??e.callee),i=r.getFirstTokenBetween(n,t,nU.isOpeningParenToken);i&&!(i.range[1]>=e.range[1])&&o(e,r.getTokenBefore(i,nU.isNotOptionalChainPunctuator),i)},ImportExpression(e){let t=r.getFirstToken(e),n=r.getTokenAfter(t);o(e,t,n)}}}}),rT=nz({name:"function-paren-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks inside function parentheses"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never","consistent","multiline","multiline-arguments"]},{type:"object",properties:{minItems:{type:"integer",minimum:0}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before ')'.",expectedAfter:"Expected newline after '('.",expectedBetween:"Expected newline between arguments/params.",unexpectedBefore:"Unexpected newline before ')'.",unexpectedAfter:"Unexpected newline after '('."}},create(e){let t,n=e.sourceCode,r=e.options[0]||"multiline",i="multiline"===r,s="multiline-arguments"===r,a="consistent"===r;function o(e,n){return s&&1===e.length?n:i||s?e.some((t,n)=>n!==e.length-1&&!(0,nU.isTokenOnSameLine)(t,e[n+1])):a?n:null==t||e.length>=t}return"object"==typeof r?t=r.minItems:"always"===r?t=0:"never"===r&&(t=1/0),{"ArrowFunctionExpression, CallExpression, FunctionDeclaration, FunctionExpression, ImportExpression, NewExpression"(t){let r,i=function(e){let t=()=>{let e=0;return t=>("Punctuator"===t.type&&"<"===t.value&&(e+=1),"Punctuator"===t.type&&">"===t.value&&(e-=1),0===e&&(0,nU.isOpeningParenToken)(t))};switch(e.type){case"NewExpression":if(!e.arguments.length&&!((0,nU.isOpeningParenToken)(n.getLastToken(e,{skip:1}))&&(0,nU.isClosingParenToken)(n.getLastToken(e))&&e.callee.range[1]<e.range[1]))return null;case"CallExpression":return{leftParen:n.getTokenAfter(e.callee,t()),rightParen:n.getLastToken(e)};case"FunctionDeclaration":case"FunctionExpression":{let r=n.getFirstToken(e,t()),i=e.params.length?n.getTokenAfter(e.params[e.params.length-1],nU.isClosingParenToken):n.getTokenAfter(r);return{leftParen:r,rightParen:i}}case"ArrowFunctionExpression":{let t=n.getFirstToken(e,{skip:+!!e.async});if(!(0,nU.isOpeningParenToken)(t))return null;let r=e.params.length?n.getTokenAfter(e.params[e.params.length-1],nU.isClosingParenToken):n.getTokenAfter(t);return{leftParen:t,rightParen:r}}case"ImportExpression":return{leftParen:n.getFirstToken(e,1),rightParen:n.getLastToken(e)};default:throw TypeError(`unexpected node with type ${e.type}`)}}(t);r="ImportExpression"===t.type?[t.source,...t.options?[t.options]:[]]:(0,nU.isFunction)(t)?t.params:t.arguments,i&&(!function(t,r){let i=t.leftParen,s=t.rightParen,a=n.getTokenAfter(i),l=n.getTokenBefore(s),p=!(0,nU.isTokenOnSameLine)(i,a),c=!(0,nU.isTokenOnSameLine)(l,s),u=o(r,p);p&&!u?e.report({node:i,messageId:"unexpectedAfter",fix:e=>n.getText().slice(i.range[1],a.range[0]).trim()?null:e.removeRange([i.range[1],a.range[0]])}):!p&&u&&e.report({node:i,messageId:"expectedAfter",fix:e=>e.insertTextAfter(i,"\n")}),c&&!u?e.report({node:s,messageId:"unexpectedBefore",fix:e=>n.getText().slice(l.range[1],s.range[0]).trim()?null:e.removeRange([l.range[1],s.range[0]])}):!c&&u&&e.report({node:s,messageId:"expectedBefore",fix:e=>e.insertTextBefore(s,"\n")})}(i,r),s&&function(t,r){let i=t.leftParen,s=n.getTokenAfter(i),a=o(r,!(0,nU.isTokenOnSameLine)(i,s));for(let t=0;t<=r.length-2;t++){let n=r[t],i=r[t+1];(0,nU.isTokenOnSameLine)(n,i)&&a&&e.report({node:n,messageId:"expectedBetween",fix:e=>e.insertTextBefore(i,"\n")})}}(i,r))}}}});const rS={oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]};var rb=nz({name:"generator-star-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing around `*` operators in generator functions"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},named:rS,anonymous:rS,method:rS},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){let t={before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}};function n(e,n){return e?"string"==typeof e?t[e]:Object.assign({},n,e):n}let r=function(e){let r=n(e,t.before);return{named:n(e.named,r),anonymous:n(e.anonymous,r),method:n(e.method,r)}}(e.options[0]||{}),i=e.sourceCode;function s(e){return"*"===e.value&&"Punctuator"===e.type}function a(t,n,i,s){if(!!(s.range[0]-i.range[1])!==r[t][n]){let a="*"===i.value,o=r[t][n],l=a?i:s,p=`${o?"missing":"unexpected"}${n[0].toUpperCase()+n.slice(1)}`;e.report({node:l,messageId:p,fix:e=>o?a?e.insertTextAfter(l," "):e.insertTextBefore(l," "):e.removeRange([i.range[1],s.range[0]])})}}function o(e){if(!e.generator)return;let t=i.getFirstToken("method"in e.parent&&e.parent.method||"MethodDefinition"===e.parent.type?e.parent:e,s),n=i.getTokenBefore(t),r=i.getTokenAfter(t),o="named";"MethodDefinition"===e.parent.type||"Property"===e.parent.type&&e.parent.method?o="method":e.id||(o="anonymous"),("method"!==o||t!==i.getFirstToken(e.parent))&&a(o,"before",n,t),a(o,"after",t,r)}return{FunctionDeclaration:o,FunctionExpression:o}}}),rE=nz({name:"implicit-arrow-linebreak",meta:{type:"layout",docs:{description:"Enforce the location of arrow function bodies"},fixable:"whitespace",schema:[{type:"string",enum:["beside","below"]}],messages:{expected:"Expected a linebreak before this expression.",unexpected:"Expected no linebreak before this expression."}},create(e){let t=e.sourceCode,n=e.options[0]||"beside";return{ArrowFunctionExpression:r=>(function(r){if("BlockStatement"===r.body.type)return;let i=t.getTokenBefore(r.body,nU.isNotOpeningParenToken),s=t.getTokenAfter(i),a=(0,nU.isTokenOnSameLine)(i,s);a&&"below"===n?e.report({node:s,messageId:"expected",fix:e=>e.insertTextBefore(s,"\n")}):a||"beside"!==n||e.report({node:s,messageId:"unexpected",fix:e=>nX(t,i,s)?null:e.replaceTextRange([i.range[1],s.range[0]]," ")})})(r)}}}),rk=nz({name:"indent-binary-ops",meta:{type:"layout",docs:{description:"Indentation for binary operators"},fixable:"whitespace",schema:[{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["tab"]}]}],messages:{wrongIndentation:"Expected indentation of {{expected}}"}},defaultOptions:[2],create:(e,t)=>{let{sourceCode:n}=e,r="tab"===t[0]?" ":" ".repeat(t[0]??2),i=new Map;function s(e){return i.has(e)?i.get(e):n.lines[e-1].match(/^\s*/)?.[0]??""}function a(a,o){var l,p;if(a.loc.start.line===a.loc.end.line)return;let c=n.getFirstToken(o),u=n.getTokenBefore(c);for(;"("===u.value;)if(c=u,(u=n.getTokenBefore(c)).range[0]<=o.parent.range[0])return;let d=n.getTokenBefore(a),f=n.getTokenBefore(u);if(c.loc.start.line===f.loc.start.line)return;let m=(l=f.loc.start.line,n.tokensAndComments.find(e=>e.loc.start.line===l)),h=(p=f.loc.start.line,[...n.tokensAndComments].reverse().find(e=>e.loc.end.line===p)),g=nb(m)&&!["typeof","instanceof","this"].includes(m.value)||m?.type==="Identifier"&&"type"===m.value&&function(t,n){for(;n.parent;)if("TSTypeAliasDeclaration"===(n=n.parent).type&&e.sourceCode.getTokenBefore(n.id)===t)return!0;return!1}(m,a)||[":","[","(","<"].concat(np).includes(h?.value||"")||["[","(","{","=>",":"].concat(np).includes(d?.value||"")&&m?.loc.start.line===d?.loc.start.line,y=h?.value===")"&&function(e){let t=n.tokensAndComments.filter(t=>t.loc.start.line===e),r=0,i=0;for(let e of t)"("===e.value&&r++,")"===e.value&&i++;return r<i}(f.loc.start.line)&&!["]",")","}"].includes(m?.value||""),x=s(f.loc.start.line),T=s(c.loc.start.line),S=function(e,n,i){if(n&&!i)return e+r;if(!n&&i)return"tab"===t[0]?e.slice(1):e.slice(t[0]??2);return e}(x,g,y);if(S!==T){let r={line:c.loc.start.line,column:0},s={line:c.loc.start.line,column:T.length};e.report({loc:{start:r,end:s},messageId:"wrongIndentation",data:{expected:`${S.length} ${"tab"===t[0]?"tab":"space"}${1===S.length?"":"s"}`},fix:e=>e.replaceTextRange([n.getIndexFromLoc(r),n.getIndexFromLoc(s)],S)}),i.set(c.loc.start.line,S)}}return{BinaryExpression(e){a(e,e.right)},LogicalExpression(e){a(e,e.right)},TSUnionType(e){e.types.length>1&&e.types.forEach(t=>{a(e,t)})},TSIntersectionType(e){e.types.length>1&&e.types.forEach(t=>{a(e,t)})}}}});const rw=new Set(["AssignmentExpression","AssignmentPattern","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AwaitExpression","BlockStatement","BinaryExpression","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DoWhileStatement","DebuggerStatement","EmptyStatement","ExpressionStatement","ForStatement","ForInStatement","ForOfStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition",em.AST_NODE_TYPES.AccessorProperty,"RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","WithStatement","YieldExpression","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXEmptyExpression","JSXExpressionContainer","JSXElement","JSXClosingElement","JSXOpeningElement","JSXAttribute","JSXSpreadAttribute","JSXText","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ExportSpecifier","ImportDeclaration","ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier","ImportExpression","ImportAttribute",em.AST_NODE_TYPES.TSAbstractKeyword,em.AST_NODE_TYPES.TSAnyKeyword,em.AST_NODE_TYPES.TSBooleanKeyword,em.AST_NODE_TYPES.TSNeverKeyword,em.AST_NODE_TYPES.TSNumberKeyword,em.AST_NODE_TYPES.TSStringKeyword,em.AST_NODE_TYPES.TSSymbolKeyword,em.AST_NODE_TYPES.TSUndefinedKeyword,em.AST_NODE_TYPES.TSUnknownKeyword,em.AST_NODE_TYPES.TSVoidKeyword,em.AST_NODE_TYPES.TSNullKeyword,em.AST_NODE_TYPES.TSAbstractPropertyDefinition,em.AST_NODE_TYPES.TSAbstractAccessorProperty,em.AST_NODE_TYPES.TSAbstractMethodDefinition,em.AST_NODE_TYPES.TSArrayType,em.AST_NODE_TYPES.TSAsExpression,em.AST_NODE_TYPES.TSCallSignatureDeclaration,em.AST_NODE_TYPES.TSConditionalType,em.AST_NODE_TYPES.TSConstructorType,em.AST_NODE_TYPES.TSConstructSignatureDeclaration,em.AST_NODE_TYPES.TSDeclareFunction,em.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,em.AST_NODE_TYPES.TSEnumDeclaration,em.AST_NODE_TYPES.TSEnumBody,em.AST_NODE_TYPES.TSEnumMember,em.AST_NODE_TYPES.TSExportAssignment,em.AST_NODE_TYPES.TSExternalModuleReference,em.AST_NODE_TYPES.TSFunctionType,em.AST_NODE_TYPES.TSImportType,em.AST_NODE_TYPES.TSIndexedAccessType,em.AST_NODE_TYPES.TSIndexSignature,em.AST_NODE_TYPES.TSInferType,em.AST_NODE_TYPES.TSInterfaceBody,em.AST_NODE_TYPES.TSInterfaceDeclaration,em.AST_NODE_TYPES.TSInterfaceHeritage,em.AST_NODE_TYPES.TSImportEqualsDeclaration,em.AST_NODE_TYPES.TSLiteralType,em.AST_NODE_TYPES.TSMappedType,em.AST_NODE_TYPES.TSMethodSignature,"TSMinusToken",em.AST_NODE_TYPES.TSModuleBlock,em.AST_NODE_TYPES.TSModuleDeclaration,em.AST_NODE_TYPES.TSNonNullExpression,em.AST_NODE_TYPES.TSParameterProperty,"TSPlusToken",em.AST_NODE_TYPES.TSPropertySignature,em.AST_NODE_TYPES.TSQualifiedName,"TSQuestionToken",em.AST_NODE_TYPES.TSRestType,em.AST_NODE_TYPES.TSThisType,em.AST_NODE_TYPES.TSTupleType,em.AST_NODE_TYPES.TSTypeAliasDeclaration,em.AST_NODE_TYPES.TSTypeAnnotation,em.AST_NODE_TYPES.TSTypeLiteral,em.AST_NODE_TYPES.TSTypeOperator,em.AST_NODE_TYPES.TSTypeParameter,em.AST_NODE_TYPES.TSTypeParameterDeclaration,em.AST_NODE_TYPES.TSTypeParameterInstantiation,em.AST_NODE_TYPES.TSTypeReference,em.AST_NODE_TYPES.Decorator]);var rv=class{_values;constructor(e){this._values=Array(e+1)}insert(e,t){this._values[e]=t}findLastNotAfter(e){let t=this._values;for(let n=e;n>=0;n--){let e=t[n];if(e)return e}}deleteRange(e,t){this._values.fill(void 0,e,t)}},rA=class{sourceCode;firstTokensByLineNumber;constructor(e){this.sourceCode=e,this.firstTokensByLineNumber=new Map;let t=e.tokensAndComments;for(let n=0;n<t.length;n++){let r=t[n];this.firstTokensByLineNumber.has(r.loc.start.line)||this.firstTokensByLineNumber.set(r.loc.start.line,r),!this.firstTokensByLineNumber.has(r.loc.end.line)&&e.text.slice(r.range[1]-r.loc.end.column,r.range[1]).trim()&&this.firstTokensByLineNumber.set(r.loc.end.line,r)}}getFirstTokenOfLine(e){return this.firstTokensByLineNumber.get(e.loc.start.line)}isFirstTokenOfLine(e){return this.getFirstTokenOfLine(e)===e}getTokenIndent(e){return this.sourceCode.text.slice(e.range[0]-e.loc.start.column,e.range[0])}},rC=class{_tokenInfo;_indentSize;_indentType;_indexMap;_lockedFirstTokens=new WeakMap;_desiredIndentCache=new WeakMap;_ignoredTokens=new WeakSet;constructor(e,t,n,r){this._tokenInfo=e,this._indentSize=t,this._indentType=n,this._indexMap=new rv(r),this._indexMap.insert(0,{offset:0,from:null,force:!1})}_getOffsetDescriptor(e){return this._indexMap.findLastNotAfter(e.range[0])}matchOffsetOf(e,t){this._lockedFirstTokens.set(t,e)}setDesiredOffset(e,t,n){e&&this.setDesiredOffsets(e.range,t,n)}setDesiredOffsets(e,t,n,r=!1){let i={offset:n,from:t,force:r},s=this._indexMap.findLastNotAfter(e[1]),a=t&&t.range[0]>=e[0]&&t.range[1]<=e[1],o=a&&this._getOffsetDescriptor(t);this._indexMap.deleteRange(e[0]+1,e[1]),this._indexMap.insert(e[0],i),a&&(this._indexMap.insert(t.range[0],o),this._indexMap.insert(t.range[1],i)),this._indexMap.insert(e[1],s)}getDesiredIndent(e){if(!this._desiredIndentCache.has(e))if(this._ignoredTokens.has(e))this._desiredIndentCache.set(e,this._tokenInfo.getTokenIndent(e));else if(this._lockedFirstTokens.has(e)){let t=this._lockedFirstTokens.get(e),n=this._tokenInfo.getFirstTokenOfLine(t);this._desiredIndentCache.set(e,this.getDesiredIndent(n)+this._indentType.repeat(t.loc.start.column-n.loc.start.column))}else{let t=this._getOffsetDescriptor(e),n=!t.from||t.from.loc.start.line!==e.loc.start.line||/^\s*?\n/u.test(e.value)||t.force?t.offset*this._indentSize:0;this._desiredIndentCache.set(e,(t.from?this.getDesiredIndent(t.from):"")+this._indentType.repeat(n))}return this._desiredIndentCache.get(e)}ignoreToken(e){this._tokenInfo.isFirstTokenOfLine(e)&&this._ignoredTokens.add(e)}getFirstDependency(e){return this._getOffsetDescriptor(e).from}};const r_={oneOf:[{type:"integer",minimum:0},{type:"string",enum:["first","off"]}]};var rO=nz({name:"indent",meta:{type:"layout",docs:{description:"Enforce consistent indentation"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["tab"]},{type:"integer",minimum:0}]},{type:"object",properties:{SwitchCase:{type:"integer",minimum:0,default:0},VariableDeclarator:{oneOf:[r_,{type:"object",properties:{var:r_,let:r_,const:r_,using:r_},additionalProperties:!1}]},assignmentOperator:{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["off"]}]},outerIIFEBody:{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["off"]}]},MemberExpression:{oneOf:[{type:"integer",minimum:0},{type:"string",enum:["off"]}]},FunctionDeclaration:{type:"object",properties:{parameters:r_,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},FunctionExpression:{type:"object",properties:{parameters:r_,body:{type:"integer",minimum:0},returnType:{type:"integer",minimum:0}},additionalProperties:!1},StaticBlock:{type:"object",properties:{body:{type:"integer",minimum:0}},additionalProperties:!1},CallExpression:{type:"object",properties:{arguments:r_},additionalProperties:!1},ArrayExpression:r_,ObjectExpression:r_,ImportDeclaration:r_,flatTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressions:{type:"boolean",default:!1},offsetTernaryExpressionsOffsetCallExpressions:{type:"boolean",default:!0},ignoredNodes:{type:"array",items:{type:"string",not:{pattern:":exit$"}}},ignoreComments:{type:"boolean",default:!1},tabLength:{type:"number",default:4}},additionalProperties:!1}],messages:{wrongIndentation:"Expected indentation of {{expected}} but found {{actual}}."}},defaultOptions:[4,{SwitchCase:1,flatTernaryExpressions:!1,ignoredNodes:[]}],create(e,t){let n="space",r=4,i={SwitchCase:0,VariableDeclarator:{var:1,let:1,const:1,using:1},outerIIFEBody:1,assignmentOperator:1,FunctionDeclaration:{parameters:1,body:1,returnType:1},FunctionExpression:{parameters:1,body:1,returnType:1},StaticBlock:{body:1},CallExpression:{arguments:1},MemberExpression:1,ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:[],ignoreComments:!1,offsetTernaryExpressions:!1,offsetTernaryExpressionsOffsetCallExpressions:!0,tabLength:4};if(t.length){"tab"===t[0]?(r=1,n="tab"):(r=t[0]??r,n="space");let e=t[1];e&&(Object.assign(i,e),("number"==typeof e.VariableDeclarator||"first"===e.VariableDeclarator)&&(i.VariableDeclarator={var:e.VariableDeclarator,let:e.VariableDeclarator,const:e.VariableDeclarator,using:e.VariableDeclarator}))}let s=e.sourceCode,a=new rA(s),o=new rC(a,r,"space"===n?" ":" ",s.text.length),l=new WeakSet;function p(e,t,r){let i=`space${1===t?"":"s"}`,s=`tab${1===r?"":"s"}`;return{expected:`${e} ${n}${1===e?"":"s"}`,actual:t>0?"space"===n?t:`${t} ${i}`:r>0?"tab"===n?r:`${r} ${s}`:"0"}}function c(e,t){return a.getTokenIndent(e)===t}function u(e,t,n,r){function i(e){let n=s.getTokenBefore(e);for(;(0,nU.isOpeningParenToken)(n)&&n!==t;)n=s.getTokenBefore(n);return s.getTokenAfter(n)}o.setDesiredOffsets([t.range[1],n.range[0]],t,"number"==typeof r?r:1),o.setDesiredOffset(n,t,0),("first"!==r||!e.length||e[0])&&e.forEach((n,l)=>{if(n&&("off"===r&&o.ignoreToken(i(n)),0!==l))if("first"===r&&a.isFirstTokenOfLine(i(n)))o.matchOffsetOf(i(e[0]),i(n));else{let r=e[l-1],a=r&&i(r),p=r&&s.getLastToken(r);r&&p.loc.end.line-function(e){let t=e.match(/\s*$/u)[0].match(nu());return null===t?0:t.length}(p.value)>t.loc.end.line&&o.setDesiredOffsets([r.range[1],n.range[1]],a,0)}})}function d(e){if("BlockStatement"!==e.type){let t=s.getTokenBefore(e,nU.isNotOpeningParenToken),n=s.getFirstToken(e),r=s.getLastToken(e);for(;(0,nU.isOpeningParenToken)(s.getTokenBefore(n))&&(0,nU.isClosingParenToken)(s.getTokenAfter(r));)n=s.getTokenBefore(n),r=s.getTokenAfter(r);o.setDesiredOffsets([n.range[0],r.range[1]],t,1)}}function f(e){let t;t=e.arguments.length?s.getTokenAfter(e.typeArguments??e.callee,nU.isOpeningParenToken):s.getLastToken(e,1);let n=s.getLastToken(e);if(l.add(t),l.add(n),"optional"in e&&e.optional){let n=s.getTokenAfter(e.callee,nU.isOptionalChainPunctuator),r=s.getTokensBetween(e.callee,n,{filter:nU.isClosingParenToken}).length,i=r?s.getTokenBefore(e.callee,{skip:r-1}):s.getFirstToken(e.callee),a=s.getTokenBefore(n),l=(0,nU.isTokenOnSameLine)(a,t)?a:i;o.setDesiredOffset(n,l,1)}let r="TaggedTemplateExpression"===e.callee.type?s.getFirstToken(e.callee.quasi):e.typeArguments??t,a=s.getTokenBefore(r);o.setDesiredOffset(t,a,0),u(e.arguments,t,n,i.CallExpression.arguments)}function m(e){let t=new Set(s.getTokens(e,{includeComments:!0}));t.forEach(e=>{if(!t.has(o.getFirstDependency(e))){let t=a.getFirstTokenOfLine(e);e===t?o.ignoreToken(e):o.setDesiredOffset(e,t,0)}})}function h(e,t){let n=e.loc.end.line,r=t.loc.start.line;if(n===r||n===r-1)return!1;for(let e=n+1;e<r;++e)if(!a.firstTokensByLineNumber.has(e))return!0;return!1}let g=new Set;function y(e){let t=s.getTokenBefore(e),n=s.getTokenAfter(e);"number"==typeof i.assignmentOperator?(o.setDesiredOffset(e,t,i.assignmentOperator),o.setDesiredOffset(n,e,i.assignmentOperator)):(o.ignoreToken(e),o.ignoreToken(n))}function x(e){let t=e.type===em.AST_NODE_TYPES.TSTupleType?e.elementTypes:e.elements,n=s.getFirstToken(e),r=s.getTokenAfter([...t].reverse().find(e=>e)||n,nU.isClosingBracketToken);u(t,n,r,i.ArrayExpression)}function T(e,t){let n=s.getFirstToken(e,nU.isOpeningBraceToken),r=s.getTokenAfter(t.length?t[t.length-1]:n,nU.isClosingBraceToken);u(t,n,r,i.ObjectExpression)}function S(e,t,n,r){let a=s.getFirstToken(e);if(!i.flatTernaryExpressions||!(0,nU.isTokenOnSameLine)(t,n)||function(e,t){let n=t;for(;n.parent&&!n.parent.type.endsWith("Statement")&&!n.parent.type.endsWith("Declaration");)n=n.parent;return!(n=n.parent)||n.loc.start.line===e.loc.start.line}(a,e)){let e=s.getFirstTokenBetween(t,n,nS),l=s.getFirstTokenBetween(n,r,nU.isColonToken),p=s.getTokenAfter(e),c=s.getTokenBefore(l),u=s.getTokenAfter(l);o.setDesiredOffset(e,a,1),o.setDesiredOffset(l,a,1);let d=1;if(i.offsetTernaryExpressions){"Punctuator"===p.type&&(d=2);let e=ny(n).type;i.offsetTernaryExpressionsOffsetCallExpressions&&("CallExpression"===e||"AwaitExpression"===e)&&(d=2)}if(o.setDesiredOffset(p,a,d),(0,nU.isTokenOnSameLine)(c,u))o.setDesiredOffset(u,p,0);else{let e=1;if(i.offsetTernaryExpressions){"Punctuator"===u.type&&(e=2);let t=ny(r).type;i.offsetTernaryExpressionsOffsetCallExpressions&&("CallExpression"===t||"AwaitExpression"===t)&&(e=2)}o.setDesiredOffset(u,a,e)}}}function b(e,t,n){let r=s.getFirstTokenBetween(e,t,e=>e.value===n),i=s.getTokenAfter(r);o.ignoreToken(r),o.ignoreToken(i),o.setDesiredOffset(i,r,0)}function E(e,t,n,r=!1){let a=s.getFirstTokenBetween(t,n,nU.isNotClosingParenToken),l=s.getTokenAfter(a),p=s.getTokensBetween(t,n,{filter:nU.isClosingParenToken}).length,c=p?s.getTokenBefore(t,{skip:p-1}):s.getFirstToken(t),u=s.getTokenBefore(a),d=r?a:l;r&&(o.setDesiredOffset(s.getLastToken(e),a,0),o.setDesiredOffsets(n.range,a,1));let f=(0,nU.isTokenOnSameLine)(u,d)?u:c;"number"==typeof i.MemberExpression?(o.setDesiredOffset(a,f,i.MemberExpression),o.setDesiredOffset(l,r?a:f,i.MemberExpression)):(o.ignoreToken(a),o.ignoreToken(l),o.setDesiredOffset(a,f,0),o.setDesiredOffset(l,a,0))}function k(e){let t;t=e.parent&&function(e){if(!e.parent||"CallExpression"!==e.parent.type||e.parent.callee!==e)return!1;let t=e.parent&&e.parent.parent;for(;"UnaryExpression"===t.type&&["!","~","+","-"].includes(t.operator)||"AssignmentExpression"===t.type||"LogicalExpression"===t.type||"SequenceExpression"===t.type||"VariableDeclarator"===t.type;)t=t.parent;return("ExpressionStatement"===t.type||"VariableDeclaration"===t.type)&&"Program"===t.parent.type}(e.parent)?i.outerIIFEBody:e.parent&&("FunctionExpression"===e.parent.type||"ArrowFunctionExpression"===e.parent.type)?i.FunctionExpression.body:e.parent&&"FunctionDeclaration"===e.parent.type?i.FunctionDeclaration.body:1,na.has(e.parent.type)||o.setDesiredOffset(s.getFirstToken(e),s.getFirstToken(e.parent),0),u(e.type===em.AST_NODE_TYPES.TSEnumBody?e.members:e.body,s.getFirstToken(e),s.getLastToken(e),t)}function w(e,t){let n=s.getFirstToken(e),r=s.getTokenBefore(t[0],nU.isNotOpeningParenToken);o.setDesiredOffsets([r.range[0],e.body.range[0]],n,1)}function v(e){let t,n=s.getFirstToken(e),r=s.getLastToken(e);if(e.computed){let r=s.getTokenBefore(e.key,nU.isOpeningBracketToken),i=t=s.getTokenAfter(e.key,nU.isClosingBracketToken),a=[r.range[1],i.range[0]];r!==n&&o.setDesiredOffset(r,n,0),o.setDesiredOffsets(a,r,1),o.setDesiredOffset(i,r,0)}else{let r=t=s.getFirstToken(e.key);e.decorators?.length||r===n||o.setDesiredOffset(r,n,1)}if(e.value){let t=s.getTokenBefore(e.value,nT);y(t),(0,nU.isSemicolonToken)(r)&&o.setDesiredOffset(r,t,1)}else(0,nU.isSemicolonToken)(r)&&o.setDesiredOffset(r,t,1)}let A=[],C={};for(let[t,c]of Object.entries({ArrayExpression:x,ArrayPattern:x,ObjectExpression(e){T(e,e.properties)},ObjectPattern(e){T(e,e.properties)},ArrowFunctionExpression(e){let t=s.getFirstToken(e,{skip:+!!e.async});if((0,nU.isOpeningParenToken)(t)){let n=s.getTokenBefore(e.returnType??e.body,{filter:nU.isClosingParenToken});l.add(t),l.add(n),u(e.params,t,n,i.FunctionExpression.parameters)}d(e.body)},AssignmentExpression(e){y(s.getFirstTokenBetween(e.left,e.right,t=>t.value===e.operator))},AssignmentPattern(e){y(s.getFirstTokenBetween(e.left,e.right,nT))},BinaryExpression(e){b(e.left,e.right,e.operator)},LogicalExpression(e){b(e.left,e.right,e.operator)},BlockStatement:k,ClassBody:k,CallExpression:f,ClassDeclaration(e){e.superClass&&w(e,[e.superClass])},ClassExpression(e){e.superClass&&w(e,[e.superClass])},ConditionalExpression(e){S(e,e.test,e.consequent,e.alternate)},"DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement":function(e){d(e.body)},ExportNamedDeclaration(e){if(null===e.declaration){let t=e.source?s.getTokenBefore(e.source,nU.isClosingBraceToken):s.getLastToken(e,nU.isClosingBraceToken);if(u(e.specifiers,s.getFirstToken(e,{skip:1}),t,1),e.source){let n=s.getTokenAfter(t,e=>"Identifier"===e.type&&"from"===e.value),r=s.getLastToken(e,nU.isNotSemicolonToken);o.setDesiredOffsets([n.range[0],r.range[1]],s.getFirstToken(e),1);let i=s.getLastToken(e,nU.isClosingBraceToken);if(i&&e.source.range[1]<i.range[0]){let t=s.getTokenAfter(e.source,nU.isOpeningBraceToken);u(e.attributes,t,i,1)}}}},ExportAllDeclaration(e){let t=s.getTokenAfter(e.exported||s.getFirstToken(e),e=>"Identifier"===e.type&&"from"===e.value),n=s.getLastToken(e,nU.isNotSemicolonToken);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,nU.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let t=s.getTokenAfter(e.source,nU.isOpeningBraceToken);u(e.attributes,t,r,1)}},ForStatement(e){let t=s.getFirstToken(e,1);e.init&&o.setDesiredOffsets(e.init.range,t,1),e.test&&o.setDesiredOffsets(e.test.range,t,1),e.update&&o.setDesiredOffsets(e.update.range,t,1),d(e.body)},"FunctionDeclaration, FunctionExpression":function(e){let t=s.getTokenBefore(e.returnType??e.body,{filter:nU.isClosingParenToken}),n=s.getTokenBefore(e.params.length?e.params[0].decorators?.[0]??e.params[0]:t,{filter:nU.isOpeningParenToken});l.add(n),l.add(t),u(e.params,n,t,i[e.type].parameters),e.returnType&&o.setDesiredOffsets(e.returnType.range,t,i[e.type].returnType)},IfStatement(e){d(e.consequent),e.alternate&&d(e.alternate)},":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit":function(e){let t;for(let n of("IfStatement"===e.type?(t=[e.consequent],e.alternate&&t.push(e.alternate)):t=[e.body],t)){let t=s.getLastToken(n);if((0,nU.isSemicolonToken)(t)){let n=s.getTokenBefore(t),r=s.getTokenAfter(t);!(0,nU.isTokenOnSameLine)(n,t)&&r&&(0,nU.isTokenOnSameLine)(t,r)&&o.setDesiredOffset(t,s.getFirstToken(e),0)}}},ImportDeclaration(e){if(e.specifiers.some(e=>"ImportSpecifier"===e.type)){let t=s.getFirstToken(e,nU.isOpeningBraceToken),n=s.getTokenBefore(e.source,nU.isClosingBraceToken);u(e.specifiers.filter(e=>"ImportSpecifier"===e.type),t,n,i.ImportDeclaration)}let t=e.specifiers.length?s.getTokenAfter(e.specifiers[e.specifiers.length-1],e=>"Identifier"===e.type&&"from"===e.value):s.getFirstToken(e,e=>"Identifier"===e.type&&"from"===e.value),n=s.getLastToken(e,nU.isNotSemicolonToken);t&&o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1);let r=s.getLastToken(e,nU.isClosingBraceToken);if(r&&e.source.range[1]<r.range[0]){let i=s.getTokenAfter(e.source,nU.isOpeningBraceToken);if(!t){let t=s.getTokenBefore(i,e=>"with"===e.value);o.setDesiredOffsets([t.range[0],n.range[1]],s.getFirstToken(e),1)}u(e.attributes,i,r,1)}},ImportExpression(e){let t=s.getFirstToken(e,1),n=s.getLastToken(e);l.add(t),l.add(n),o.setDesiredOffset(t,s.getTokenBefore(t),0),u([e.source],t,n,i.CallExpression.arguments)},MemberExpression(e){E(e,e.object,e.property,e.computed)},MetaProperty(e){E(e,e.meta,e.property)},NewExpression(e){(e.arguments.length>0||(0,nU.isClosingParenToken)(s.getLastToken(e))&&(0,nU.isOpeningParenToken)(s.getLastToken(e,1)))&&f(e)},Property(e){if(!e.shorthand&&!e.method&&"init"===e.kind){let t=s.getFirstTokenBetween(e.key,e.value,nU.isColonToken);o.ignoreToken(s.getTokenAfter(t))}},PropertyDefinition:v,AccessorProperty:v,TSAbstractPropertyDefinition:v,TSAbstractAccessorProperty:v,StaticBlock(e){let t=s.getFirstToken(e,{skip:1}),n=s.getLastToken(e);u(e.body,t,n,i.StaticBlock.body)},SwitchStatement(e){let t=s.getTokenAfter(e.discriminant,nU.isOpeningBraceToken),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,i.SwitchCase),e.cases.length&&nJ(s,e.cases[e.cases.length-1],n).forEach(e=>o.ignoreToken(e))},SwitchCase(e){if(1!==e.consequent.length||"BlockStatement"!==e.consequent[0].type){let t=s.getFirstToken(e),n=s.getTokenAfter(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)}},TemplateLiteral(e){e.expressions.forEach((t,a)=>{let l=e.quasis[a],p=e.quasis[a+1],c=nY(l)?s.getFirstToken(l):null,u=(0,nU.isTokenOnSameLine)(l,t),d=(0,nU.isTokenOnSameLine)(t,p);if(c||d&&!u){o.setDesiredOffsets([l.range[1],p.range[0]],c,1),o.setDesiredOffset(s.getFirstToken(p),c,0);return}let f=s.text.slice(l.range[1]-l.loc.end.column,l.range[1]-2).split(""),m=f.findIndex(e=>" "!==e&&" "!==e);-1===m&&(m=f.length);let h=f.slice(0,m).filter(e=>" "===e).length,g=m-h+Math.ceil(h/("tab"===n?i.tabLength:r)),y=d?g:g+1;o.setDesiredOffsets([l.range[1],p.range[0]],c,y),o.setDesiredOffset(s.getFirstToken(p),c,g)})},VariableDeclaration(e){if(0===e.declarations.length)return;let t="await using"===e.kind?"using":e.kind,n=Object.prototype.hasOwnProperty.call(i.VariableDeclarator,t)?i.VariableDeclarator[t]:1,l="first"===n,p=s.getFirstToken(e),c=s.getLastToken(e);if(e.declarations.at(-1).loc.start.line>e.loc.start.line){if(l){u(e.declarations,p,c,n);let t=s.getFirstToken(e.declarations[0]);n=(a.getTokenIndent(t).length-a.getTokenIndent(p).length)/r}o.setDesiredOffsets(e.range,p,n,!0)}else l&&(n=1),o.setDesiredOffsets(e.range,p,n);(0,nU.isSemicolonToken)(c)&&o.ignoreToken(c)},VariableDeclarator(e){e.init&&y(s.getTokenBefore(e.init,nU.isNotOpeningParenToken));let t=s.getLastToken(e);(0,nU.isSemicolonToken)(t)&&o.ignoreToken(t)},JSXText(t){if(!t.parent||"JSXElement"!==t.parent.type&&"JSXFragment"!==t.parent.type)return;let i=t.value,s="space"===n?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,a=Array.from(String(i).matchAll(s),e=>e[1]?e[1].length:0),o=a.length>0,l=function(t,r=!1,i=!1){let s=e.sourceCode.getText(t,t.loc.start.column),a=s.split("\n");s=r?a[a.length-1]:a[0];let o=i?",":"",l=("space"===n?RegExp(`^[ ${o}]+`):RegExp(`^[ ${o}]+`)).exec(s);return l?l[0].length:0}(t.parent)+r;o&&!a.every(e=>e===l)&&a.forEach(r=>{e.report({node:t,messageId:"wrongIndentation",data:p(l,r,r),fix(e){let r="space"===n?" ":" ",i=Array(l+1).join(r),s=t.raw.replace(/\n[\t ]*(\S)/g,(e,t)=>`
3
+ ${i}${t}`);return e.replaceText(t,s)}})})},JSXAttribute(e){e.value&&y(s.getFirstTokenBetween(e.name,e.value,nT))},JSXElement(e){e.closingElement&&u(e.children,s.getFirstToken(e.openingElement),s.getFirstToken(e.closingElement),1)},JSXOpeningElement(e){let t,n=s.getFirstToken(e);e.selfClosing?(t=s.getLastToken(e,{skip:1}),o.setDesiredOffset(s.getLastToken(e),t,0)):t=s.getLastToken(e),o.setDesiredOffsets(e.name.range,n,0),u(e.attributes,n,t,1)},JSXClosingElement(e){let t=s.getFirstToken(e);o.setDesiredOffsets(e.name.range,t,1)},JSXFragment(e){let t=s.getFirstToken(e.openingFragment),n=s.getFirstToken(e.closingFragment);u(e.children,t,n,1)},JSXOpeningFragment(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets(e.range,t,1),o.matchOffsetOf(t,n)},JSXClosingFragment(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets(e.range,t,1);let r=s.getLastToken(e,e=>"/"===e.value);if(r){let e=(0,nU.isTokenOnSameLine)(r,n)?r:n;o.matchOffsetOf(t,e)}},JSXExpressionContainer(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXSpreadAttribute(e){let t=s.getFirstToken(e),n=s.getLastToken(e);o.setDesiredOffsets([t.range[1],n.range[0]],t,1)},JSXMemberExpression(e){E(e,e.object,e.property)},TSTypeAliasDeclaration(e){y(s.getTokenBefore(e.typeAnnotation,nU.isNotOpeningParenToken));let t=s.getLastToken(e);(0,nU.isSemicolonToken)(t)&&o.ignoreToken(t)},TSTupleType:x,TSEnumBody:k,TSEnumMember(e){e.initializer&&y(s.getTokenBefore(e.initializer,nT))},TSTypeLiteral(e){T(e,e.members)},TSMappedType(e){let t=s.getTokenBefore(e.constraint||e.typeParameter),n=[{parent:e,type:em.AST_NODE_TYPES.Property,key:e.key||e.typeParameter,value:e.typeAnnotation,range:[t.range[0],e.typeAnnotation?e.typeAnnotation.range[1]:t.range[0]],loc:{start:t.loc.start,end:e.typeAnnotation?e.typeAnnotation.loc.end:t.loc.end},kind:"init",computed:!1,method:!1,optional:!1,shorthand:!1}];T(e,n)},TSAsExpression(e){b(e.expression,e.typeAnnotation,"as")},TSConditionalType(e){S(e,{parent:e,type:em.AST_NODE_TYPES.BinaryExpression,operator:"extends",left:e.checkType,right:e.extendsType,range:[e.checkType.range[0],e.extendsType.range[1]],loc:{start:e.checkType.loc.start,end:e.extendsType.loc.end}},e.trueType,e.falseType)},TSImportEqualsDeclaration(e){e.moduleReference&&y(s.getTokenBefore(e.moduleReference,nT));let t=s.getLastToken(e);(0,nU.isSemicolonToken)(t)&&o.ignoreToken(t)},TSIndexedAccessType(e){E(e,e.objectType,e.indexType,!0)},TSInterfaceBody:k,TSInterfaceDeclaration(e){0!==e.extends.length&&w(e,e.extends)},TSQualifiedName(e){E(e,e.left,e.right)},TSTypeParameter(e){e.default&&y(s.getTokenBefore(e.default,nT))},TSTypeParameterDeclaration(e){if(!e.params.length)return;let t=s.getFirstToken(e),n=s.getLastToken(e);u(e.params,t,n,1)},TSTypeParameterInstantiation(e){if(!e.params.length)return;let t=s.getFirstToken(e),n=s.getLastToken(e);u(e.params,t,n,1)},TSModuleBlock:k,"*":function(e){let t=s.getFirstToken(e);t&&!g.has(t)&&o.setDesiredOffsets(e.range,t,0)}}))C[t]=e=>A.push({listener:c,node:e});let _=new Set;function O(e){_.add(e),g.add(s.getFirstToken(e))}let P=i.ignoredNodes.reduce((e,t)=>Object.assign(e,{[t]:O}),{});return{...C,...P,"*:exit":function(e){rw.has(e.type)||O(e)},"Program:exit":function(){i.ignoreComments&&s.getAllComments().forEach(e=>o.ignoreToken(e));for(let e=0;e<A.length;e++){let t=A[e];_.has(t.node)||t.listener?.(t.node)}_.forEach(m),function(e){let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];(0,nU.isOpeningParenToken)(i)?t.push(i):(0,nU.isClosingParenToken)(i)&&n.push({left:t.pop(),right:i})}for(let e=n.length-1;e>=0;e--){let t=n[e].left,r=n[e].right;if(!l.has(t)&&!l.has(r)){let e=new Set(s.getTokensBetween(t,r));e.forEach(n=>{e.has(o.getFirstDependency(n))||o.setDesiredOffset(n,t,1)})}o.setDesiredOffset(r,t,0)}}(s.ast.tokens);let t=new WeakMap;for(let e=0;e<s.ast.comments.length;e++){let n=s.ast.comments[e],r=s.getTokenBefore(n,{includeComments:!0}),i=t.has(r)?t.get(r):r;t.set(n,i)}for(let n=1;n<s.lines.length+1;n++){if(!a.firstTokensByLineNumber.has(n))continue;let r=a.firstTokensByLineNumber.get(n);if(r.loc.start.line===n){if((0,nU.isCommentToken)(r)){let e=t.get(r),n=e?s.getTokenAfter(e):s.ast.tokens[0],i=e&&!h(e,r),a=n&&!h(r,n);if(n&&(0,nU.isSemicolonToken)(n)&&!(0,nU.isTokenOnSameLine)(r,n)&&o.setDesiredOffset(r,n,0),i&&c(r,o.getDesiredIndent(e))||a&&c(r,o.getDesiredIndent(n)))continue}c(r,o.getDesiredIndent(r))||function(t,n){let r=Array.from(a.getTokenIndent(t)),i=r.filter(e=>" "===e).length,s=r.filter(e=>" "===e).length;e.report({node:t,messageId:"wrongIndentation",data:p(n.length,i,s),loc:{start:{line:t.loc.start.line,column:0},end:{line:t.loc.start.line,column:t.loc.start.column}},fix(e){let r=[t.range[0]-t.loc.start.column,t.range[0]];return e.replaceTextRange(r,n)}})}(r,o.getDesiredIndent(r))}}}}}});const rP=new Set(["a","abbr","acronym","b","bdo","big","button","cite","code","dfn","em","i","img","input","kbd","label","map","object","q","samp","script","select","small","span","strong","sub","sup","textarea","tt","var"]);var rI=nz({name:"jsx-child-element-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces inside of curly braces in JSX attributes and expressions"},messages:{spacingAfterPrev:"Ambiguous spacing after previous element {{element}}",spacingBeforeNext:"Ambiguous spacing before next element {{element}}"},schema:[]},create(e){let t=/^[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*\S/,n=/\S[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*$/,r=e=>e.openingElement&&e.openingElement.name&&"JSXIdentifier"===e.openingElement.name.type&&e.openingElement.name.name||"",i=e=>"JSXElement"===e.type&&rP.has(r(e)),s=s=>{let a=null,o=null;[...s.children,null].forEach(s=>{(a||s)&&(!a||i(a))&&o&&("Literal"===o.type||"JSXText"===o.type)&&(!s||i(s))&&(a&&String(o.value).match(t)?e.report({messageId:"spacingAfterPrev",node:a,loc:a.loc.end,data:{element:r(a)}}):s&&String(o.value).match(n)&&e.report({messageId:"spacingBeforeNext",node:s,loc:s.loc.start,data:{element:r(s)}})),a=o,o=s})};return{JSXElement:s,JSXFragment:s}}}),rN=nz({name:"jsx-closing-bracket-location",meta:{type:"layout",docs:{description:"Enforce closing bracket location in JSX"},fixable:"code",messages:{bracketLocation:"The closing bracket must be {{location}}{{details}}"},schema:[{anyOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"object",properties:{location:{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]}},additionalProperties:!1},{type:"object",properties:{nonEmpty:{oneOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"boolean",enum:[!1]}]},selfClosing:{oneOf:[{type:"string",enum:["after-props","props-aligned","tag-aligned","line-aligned"]},{type:"boolean",enum:[!1]}]}},additionalProperties:!1}]}]},create(e){let t={"after-props":"placed after the last prop","after-tag":"placed after the opening tag","props-aligned":"aligned with the last prop","tag-aligned":"aligned with the opening tag","line-aligned":"aligned with the line containing the opening tag"},n="tag-aligned",r=e.options[0],i={nonEmpty:n,selfClosing:n};function s(e,t){switch(t){case"props-aligned":return e.lastProp.column;case"tag-aligned":return e.opening.column;case"line-aligned":return e.openingStartOfLine.column;default:return null}}function a(e,t){switch(t){case"after-tag":return e.tag.line===e.closing.line;case"after-props":return e.lastProp.lastLine===e.closing.line;case"props-aligned":case"tag-aligned":case"line-aligned":return s(e,t)===e.closing.column;default:return!0}}return"string"==typeof r?(i.nonEmpty=r,i.selfClosing=r):"object"==typeof r&&("location"in r&&(i.nonEmpty=r.location,i.selfClosing=r.location),"nonEmpty"in r&&(i.nonEmpty=r.nonEmpty),"selfClosing"in r&&(i.selfClosing=r.selfClosing)),{"JSXOpeningElement:exit":function(n){let r,o=n.attributes.at(-1),l=o?o.range[1]:null,p=function(t){let n,r=e.sourceCode,i=r.getFirstToken(t).loc.start,s=r.getLastTokens(t,t.selfClosing?2:1)[0].loc.start,a=r.getFirstToken(t.name).loc.start;t.attributes.length&&(n=t.attributes[t.attributes.length-1],n={column:r.getFirstToken(n).loc.start.column,firstLine:r.getFirstToken(n).loc.start.line,lastLine:r.getLastToken(n).loc.end.line});let o=r.lines[i.line-1],l=r.lines[s.line-1],p={openTab:/^\t/.test(o),closeTab:/^\t/.test(l)},c={column:/^\s*/.exec(o)?.[0].length,line:i.line};return{isTab:p,tag:a,opening:i,closing:s,lastProp:n,selfClosing:t.selfClosing,openingStartOfLine:c}}(n),c=void 0===p.lastProp?"after-tag":p.opening.line===p.lastProp.lastLine?"after-props":p.selfClosing?i.selfClosing:i.nonEmpty,u=!0;"tag-aligned"===c&&(u=p.isTab.openTab===p.isTab.closeTab);let d=e.sourceCode.getCommentsInside(n).at(-1),f=d&&d.range[0]>(o??n.name).range[1];if(("after-props"===c||"after-tag"===c)&&!(a(p,c)&&u)&&f&&(c="line-aligned"),a(p,c)&&u)return;let m={location:t[c],details:""},h=s(p,c);null!==h&&(r=p.lastProp&&p.lastProp.lastLine===p.closing.line,m.details=` (expected column ${h+1}${r?" on the next line)":")"}`),e.report({node:n,messageId:"bracketLocation",loc:p.closing,data:m,fix(t){let i=p.selfClosing?"/>":">";switch(c){case"after-tag":if(l)return t.replaceTextRange([l,n.range[1]],(r?"\n":"")+i);return t.replaceTextRange([n.name.range[1],n.range[1]],(r?"\n":" ")+i);case"after-props":return t.replaceTextRange([l,n.range[1]],(r?"\n":"")+i);case"props-aligned":case"tag-aligned":case"line-aligned":{let r=f?d.range[1]:l;return t.replaceTextRange([r,n.range[1]],`
4
+ ${function(t,n,r){let i,s=[];switch(n){case"props-aligned":i=/^\s*/.exec(e.sourceCode.lines[t.lastProp.firstLine-1])[0];break;case"tag-aligned":case"line-aligned":i=/^\s*/.exec(e.sourceCode.lines[t.opening.line-1])[0];break;default:i=""}return i.length+1<(r||0)&&(s=Array.from({length:+r+1-i.length})),i+s.join(" ")}(p,c,h)}${i}`)}}return null}})}}}});const rL="tag-aligned",rD={"tag-aligned":"matchIndent","line-aligned":"alignWithOpening"};var rB=nz({name:"jsx-closing-tag-location",meta:{type:"layout",docs:{description:"Enforce closing tag location for multiline JSX"},fixable:"whitespace",messages:{onOwnLine:"Closing tag of a multiline JSX expression must be on its own line.",matchIndent:"Expected closing tag to match indentation of opening.",alignWithOpening:"Expected closing tag to be aligned with the line containing the opening tag"},schema:[{anyOf:[{type:"string",enum:["tag-aligned","line-aligned"],default:rL}]}]},defaultOptions:[rL],create(e){let t=e.options[0]||rL;function n(n){if(!n.parent)return;let r=e.sourceCode,i="openingFragment"in n.parent?n.parent.openingFragment:n.parent.openingElement,s=r.getFirstToken(i).loc.start,a=r.lines[s.line-1],o={column:/^\s*/.exec(a)?.[0].length,line:s.line};if(i.loc.start.line===n.loc.start.line||i.loc.start.column===n.loc.start.column&&"tag-aligned"===t||o.column===n.loc.start.column&&"line-aligned"===t)return;let l=n$(e,n)?rD[t]:"onOwnLine";e.report({node:n,messageId:l,loc:n.loc,fix(r){let s=Array((("line-aligned"===t?o.column:i.loc.start.column)||0)+1).join(" ");return n$(e,n)?r.replaceTextRange([n.range[0]-n.loc.start.column,n.range[0]],s):r.insertTextBefore(n,`
5
+ ${s}`)}})}return{JSXClosingElement:n,JSXClosingFragment:n}}});const rj="always",rR="never",rF="ignore",rM=[rj,rR,rF],rV={props:rR,children:rR,propElementValues:rF};var r$=nz({name:"jsx-curly-brace-presence",meta:{type:"layout",docs:{description:"Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes"},fixable:"code",messages:{unnecessaryCurly:"Curly braces are unnecessary here.",missingCurly:"Need to wrap this literal in a JSX expression."},schema:[{anyOf:[{type:"object",properties:{props:{type:"string",enum:rM},children:{type:"string",enum:rM},propElementValues:{type:"string",enum:rM}},additionalProperties:!1},{type:"string",enum:rM}]}]},create(e){let t=e.options[0],n="string"==typeof t?{props:t,children:t,propElementValues:rF}:Object.assign({},rV,t);function r(e){return nU.LINEBREAK_MATCHER.test(e)}function i(e){return/&[A-Z\d#]+;/gi.test(e)}function s(e){return""===e.replace(/&[A-Z\d#]+;/gi,"").trim()}function a(e){return/['"]/.test(e)}function o(e,t){return e.includes("\\")||i(e)||"JSXAttribute"!==t.parent.type&&/[{<>}]/.test(e)}function l(e){if("JSXExpressionContainer"===e.type){let t=e.expression.value;return!!t&&nM(t)}return!1}function p(e){return r(e)&&""===e.trim()}function c(t){e.report({messageId:"unnecessaryCurly",node:t,fix(n){let r,i=t.expression;return r=n0(i)?e.sourceCode.getText(i):"JSXAttribute"===t.parent.type?`"${"TemplateLiteral"===i.type?i.quasis[0].value.raw:i.raw.slice(1,-1)}"`:n0(i)?e.sourceCode.getText(i):"TemplateLiteral"===i.type?i.quasis[0].value.cooked:i.value,n.replaceText(t,r)}})}function u(e){return e.type&&"Literal"===e.type&&e.value&&nM(e.value)}function d(e){return/^\s|\s$/.test(e)}function f(e,t,n){return"JSXAttribute"===e.type&&"string"==typeof t.props&&t.props===n||n0(e)&&"string"==typeof t.children&&t.children===n}function m(e,t){for(let n=1;n<t.length-1;n++)if(e===t[n])return[t[n-1],t[n+1]];return e===t[0]&&t[1]?[t[1]]:e===t[t.length-1]&&t[t.length-2]?[t[t.length-2]]:[]}return{"JSXAttribute > JSXExpressionContainer > JSXElement":function(e){n.propElementValues===rR&&c(e.parent)},JSXExpressionContainer(t){(function(e,t){var n,r;let i=e.parent;return!(i.type&&"JSXAttribute"===i.type&&e.expression&&e.expression.type&&"Literal"!==e.expression.type&&"StringLiteral"!==e.expression.type&&"TemplateLiteral"!==e.expression.type||n0(i)&&(n=i.children)&&m(e,n.filter(e=>!u(e))).some(e=>e.type&&"JSXExpressionContainer"===e.type))&&!(l(e)&&(r=i.children)&&m(e,r.filter(e=>!u(e))).some(e=>e.type&&["JSXExpressionContainer","JSXElement"].includes(e.type))||i.children&&1===i.children.length&&l(e))&&f(i,t,rR)})(t,n)&&function(t){let n=t.expression,r=n.type,i=e.sourceCode;if(!i.getCommentsInside||!(i.getCommentsInside(t).length>0)){var s;!(("Literal"===r||"JSXText"===r)&&"string"==typeof n.value&&("JSXAttribute"===t.parent.type&&!u(n)||!(n.type&&"Literal"===n.type&&n.value&&d(n.value)))&&(s=n.value,!/\/\*/.test(s))&&!o(n.raw,t)&&(n0(t.parent)||!a(n.value)))?"TemplateLiteral"!==r||0!==n.expressions.length||n.quasis[0].value.raw.includes("\n")||d(n.quasis[0].value.raw)||o(n.quasis[0].value.raw,t)||a(n.quasis[0].value.cooked)?n0(n)&&c(t):c(t):c(t)}}(t)},"JSXAttribute > JSXElement, Literal, JSXText":function(t){(function(e,t){if(n0(e))return t.propElementValues!==rF;if(p(e.raw)||s(e.raw))return!1;let n=e.parent;return!(n.children&&1===n.children.length&&l(n.children[0]))&&f(n,t,rj)})(t,n)&&e.report({messageId:"missingCurly",node:t,fix(n){var a;if(n0(t))return n.replaceText(t,`{${e.sourceCode.getText(t)}}`);if(s(t.raw)||"JSXAttribute"===t.parent.type&&r(t.raw)||p(t.raw))return null;let o="JSXAttribute"===t.parent.type?`{"${t.raw.slice(1,-1).replace(/\\/g,"\\\\").replace(/\\"/g,'"').replace(/"/g,'\\"')}"}`:r(a=t.raw)?a.split("\n").map(e=>{if(""===e.trim())return e;let t=e.search(/\S/),n=e.slice(0,t),r=e.slice(t);return i(e)?`${n}${function(e){let t="<HTML_ENTITY>",n=e.split(/&[A-Z\d#]+;/gi).map(e=>""===e?"":`{${JSON.stringify(e)}}`).join(t);return e.match(/&[A-Z\d#]+;/gi).reduce((e,n)=>e.replace(t,n),n)}(r)}`:`${n}{${JSON.stringify(r)}}`}).join("\n"):`{${JSON.stringify(a)}}`;return n.replaceText(t,o)}})}}}}),rq=nz({name:"jsx-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent linebreaks in curly braces in JSX attributes and expressions"},fixable:"whitespace",schema:[{anyOf:[{type:"string",enum:["consistent","never"]},{type:"object",properties:{singleline:{type:"string",enum:["consistent","require","forbid"]},multiline:{type:"string",enum:["consistent","require","forbid"]}},additionalProperties:!1}]}],messages:{expectedBefore:"Expected newline before '}'.",expectedAfter:"Expected newline after '{'.",unexpectedBefore:"Unexpected newline before '}'.",unexpectedAfter:"Unexpected newline after '{'."}},create(e){let t=e.sourceCode,n=function(e){let t=e.options[0]||"consistent";return"consistent"===t?{multiline:"consistent",singleline:"consistent"}:"never"===t?{multiline:"forbid",singleline:"forbid"}:{multiline:t.multiline||"consistent",singleline:t.singleline||"consistent"}}(e);return{JSXExpressionContainer(r){!function(r,i){let s=r.leftCurly,a=r.rightCurly,o=t.getTokenAfter(s),l=t.getTokenBefore(a),p=!(0,nU.isTokenOnSameLine)(s,o),c=!(0,nU.isTokenOnSameLine)(l,a),u=function(e,t){switch(!nY(e)?n.multiline:n.singleline){case"forbid":return!1;case"require":return!0;default:return t}}(i,p);p&&!u?e.report({node:s,messageId:"unexpectedAfter",fix:e=>t.getText().slice(s.range[1],o?.range[0]).trim()?null:e.removeRange([s.range[1],o.range[0]])}):!p&&u&&e.report({node:s,messageId:"expectedAfter",fix:e=>e.insertTextAfter(s,"\n")}),c&&!u?e.report({node:a,messageId:"unexpectedBefore",fix:e=>t.getText().slice(l.range[1],a.range[0]).trim()?null:e.removeRange([l.range[1],a.range[0]])}):!c&&u&&e.report({node:a,messageId:"expectedBefore",fix:e=>e.insertTextBefore(a,"\n")})}({leftCurly:t.getFirstToken(r),rightCurly:t.getLastToken(r)},r.expression)}}}});const rY="always",rX="never",rJ=[rY,rX],rU={type:"object",properties:{when:{type:"string",enum:rJ},allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:rJ}},additionalProperties:!1}},additionalProperties:!1},rW={anyOf:[rU,{type:"boolean"}]};var rK=nz({name:"jsx-curly-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces inside of curly braces in JSX attributes and expressions"},fixable:"code",messages:{noNewlineAfter:"There should be no newline after '{{token}}'",noNewlineBefore:"There should be no newline before '{{token}}'",noSpaceAfter:"There should be no space after '{{token}}'",noSpaceBefore:"There should be no space before '{{token}}'",spaceNeededAfter:"A space is required after '{{token}}'",spaceNeededBefore:"A space is required before '{{token}}'"},schema:{type:"array",items:[{anyOf:[{type:"object",additionalProperties:!1,properties:{...rU.properties,attributes:rW,children:rW}},{type:"string",enum:rJ}]},{type:"object",properties:{allowMultiline:{type:"boolean"},spacing:{type:"object",properties:{objectLiterals:{type:"string",enum:rJ}},additionalProperties:!1}},additionalProperties:!1}]}},create(e){function t(e,n,r=!1){let i=!0===e?{}:e,s=i.when||n.when,a="allowMultiline"in i?i.allowMultiline:n.allowMultiline,o=(i.spacing||{}).objectLiterals||n.objectLiteralSpaces;return r&&(o=o||s),{when:s,allowMultiline:a,objectLiteralSpaces:o}}let n=e.options[0]||{};rJ.includes(n)&&(n=Object.assign({when:e.options[0]},e.options[1]));let r=t(n,{when:rX,allowMultiline:!0}),i=!("attributes"in n)||n.attributes,s=i?t(i,r,!0):null,a="children"in n&&n.children,o=a?t(a,r,!0):null;function l(t,n,r,i,s=""){let a=e.sourceCode.text.slice(n,r);return a="start"===i?a.replace(/^\s+/gm,""):a.replace(/\s+$/gm,""),s===rY&&("start"===i?a+=" ":a=` ${a}`),t.replaceTextRange([n,r],a)}function p(t,n,r){e.report({node:t,loc:n.loc.start,messageId:"noNewlineAfter",data:{token:n.value},fix(t){let i=e.sourceCode.getTokenAfter(n);return l(t,n.range[1],i.range[0],"start",r)}})}function c(t,n,r){e.report({node:t,loc:n.loc.start,messageId:"noNewlineBefore",data:{token:n.value},fix:t=>l(t,e.sourceCode.getTokenBefore(n).range[1],n.range[0],"end",r)})}function u(t){let n;switch(t.parent?.type){case"JSXAttribute":case"JSXOpeningElement":n=s;break;case"JSXElement":case"JSXFragment":n=o;break;default:return}if(null===n)return;let r=e.sourceCode,i=r.getFirstToken(t),a=r.getLastToken(t),u=r.getTokenAfter(i,{includeComments:!0}),d=r.getTokenBefore(a,{includeComments:!0});if(!u){u=r.getTokenAfter(i);let e=r.getCommentsBefore(u);u=e?e[0]:u}if(!d){d=r.getTokenBefore(a);let e=r.getCommentsAfter(d);d=e?e[e.length-1]:d}let f=i.value===u.value?n.objectLiteralSpaces:n.when;f===rY?(r.isSpaceBetween(i,u)?n.allowMultiline||(0,nU.isTokenOnSameLine)(i,u)||p(t,i,f):e.report({node:t,loc:i.loc.start,messageId:"spaceNeededAfter",data:{token:i.value},fix:e=>e.insertTextAfter(i," ")}),r.isSpaceBetween(d,a)?n.allowMultiline||(0,nU.isTokenOnSameLine)(d,a)||c(t,a,f):e.report({node:t,loc:a.loc.start,messageId:"spaceNeededBefore",data:{token:a.value},fix:e=>e.insertTextBefore(a," ")})):f===rX&&((0,nU.isTokenOnSameLine)(i,u)?r.isSpaceBetween(i,u)&&e.report({node:t,loc:i.loc.start,messageId:"noSpaceAfter",data:{token:i.value},fix(t){let n=e.sourceCode,r=n.getTokenAfter(i),s=n.getCommentsAfter(i);return s.length>0?l(t,i.range[1],Math.min(r.range[0],s[0].range[0]),"start"):l(t,i.range[1],r.range[0],"start")}}):n.allowMultiline||p(t,i,f),(0,nU.isTokenOnSameLine)(d,a)?r.isSpaceBetween(d,a)&&e.report({node:t,loc:a.loc.start,messageId:"noSpaceBefore",data:{token:a.value},fix(t){let n=e.sourceCode,r=n.getTokenBefore(a),i=n.getCommentsBefore(a);return i.length>0?l(t,Math.max(r.range[1],i[0].range[1]),a.range[0],"end"):l(t,r.range[1],a.range[0],"end")}}):n.allowMultiline||c(t,a,f))}return{JSXExpressionContainer:u,JSXSpreadAttribute:u}}}),rH=nz({name:"jsx-equals-spacing",meta:{type:"layout",docs:{description:"Enforce or disallow spaces around equal signs in JSX attributes"},fixable:"code",messages:{noSpaceBefore:"There should be no space before '='",noSpaceAfter:"There should be no space after '='",needSpaceBefore:"A space is required before '='",needSpaceAfter:"A space is required after '='"},schema:[{type:"string",enum:["always","never"]}]},create(e){let t=e.options[0]||"never";return{JSXOpeningElement(n){n.attributes.forEach(n=>{if("JSXSpreadAttribute"===n.type||null===n.value)return;let r=e.sourceCode,i=r.getTokenAfter(n.name),s=r.isSpaceBetween(n.name,i),a=r.isSpaceBetween(i,n.value);"never"===t?(s&&e.report({node:n,messageId:"noSpaceBefore",loc:i.loc.start,fix:e=>e.removeRange([n.name.range[1],i.range[0]])}),a&&e.report({node:n,messageId:"noSpaceAfter",loc:i.loc.start,fix:e=>e.removeRange([i.range[1],n.value.range[0]])})):"always"===t&&(s||e.report({messageId:"needSpaceBefore",node:n,loc:i.loc.start,fix:e=>e.insertTextBefore(i," ")}),a||e.report({node:n,messageId:"needSpaceAfter",loc:i.loc.start,fix:e=>e.insertTextAfter(i," ")}))})}}}}),rG=nz({name:"jsx-first-prop-new-line",meta:{type:"layout",docs:{description:"Enforce proper position of the first property in JSX"},fixable:"code",messages:{propOnNewLine:"Property should be placed on a new line",propOnSameLine:"Property should be placed on the same line as the component declaration"},schema:[{type:"string",enum:["always","never","multiline","multiline-multiprop","multiprop"]}]},create(e){let t=e.options[0]||"multiline-multiprop";return{JSXOpeningElement(n){if("multiline"===t&&!nY(n)||"multiline-multiprop"===t&&!nY(n)&&n.attributes.length>1||"multiprop"===t&&n.attributes.length>1||"always"===t)n.attributes.some(t=>(t.loc.start.line===n.loc.start.line&&e.report({node:t,messageId:"propOnNewLine",fix:e=>e.replaceTextRange([(n.typeArguments||n.name).range[1],t.range[0]],"\n")}),!0));else if("never"===t&&n.attributes.length>0||"multiprop"===t&&!nY(n)&&n.attributes.length<=1){let t=n.attributes[0];n.loc.start.line<t.loc.start.line&&e.report({node:t,messageId:"propOnSameLine",fix:e=>e.replaceTextRange([n.name.range[1],t.range[0]]," ")})}}}}}),rz=nz({name:"jsx-function-call-newline",meta:{type:"layout",docs:{description:"Enforce line breaks before and after JSX elements when they are used as arguments to a function."},fixable:"whitespace",messages:{missingLineBreak:"Missing line break around JSX"},schema:[{type:"string",enum:["always","multiline"]}]},create(e){let t=e.options[0]||"multiline";function n(n){if(!n||!n0(n))return;let r=e.sourceCode;if("always"===t||!nY(n)){let t=function(t){let n=e.sourceCode.getTokenBefore(t);return!!(0,nU.isTokenOnSameLine)(n,t)}(n),i=function(t){let n=e.sourceCode.getTokenAfter(t);return!function(e,t){let n=e.sourceCode.getTokenAfter(t);return!!n&&","===n.value&&n.range[0]>=t.range[1]}(e,t)&&t.loc.end.line===n.loc.end.line}(n);(t||i)&&e.report({node:n,messageId:"missingLineBreak",fix:e=>{let s=r.getText(n);return t&&(s=`
6
6
  ${s}`),i&&(s=`${s}
7
- `),e.replaceText(n,s)}})}}function r(e){0!==e.arguments.length&&e.arguments.forEach(n)}return{CallExpression(e){r(e)},NewExpression(e){r(e)}}}})}),ay=nH(()=>{sB(),sM(),ek=sF({name:"jsx-indent-props",meta:{type:"layout",docs:{description:"Enforce props indentation in JSX"},fixable:"code",messages:{wrongIndent:"Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."},schema:[{anyOf:[{type:"string",enum:["tab","first"]},{type:"integer"},{type:"object",properties:{indentMode:{anyOf:[{type:"string",enum:["tab","first"]},{type:"integer"}]},ignoreTernaryOperator:{type:"boolean"}},additionalProperties:!1}]}]},create(e){let t=e.options[0],n="space",r=4,i={isUsingOperator:!1,currentOperator:!1},s=!1;if(e.options.length){let i="object"==typeof e.options[0]?"object"==typeof t&&t.indentMode:t;"first"===i?(r="first",n="space"):"tab"===i?(r=1,n="tab"):"number"==typeof i&&(r=i,n="space"),"object"==typeof t&&t.ignoreTernaryOperator&&(s=!0)}function a(t){let r=e.sourceCode.getText(t,t.loc.start.column+0);r=r.split("\n")[0];let s=("space"===n?/^ +/:/^\t+/).exec(r),a=/^[ \t]*:/.test(r)||/^[ \t]*\?/.test(r),o=/</.test(r);return i.currentOperator=!1,a?(i.isUsingOperator=!0,i.currentOperator=!0):o&&(i.isUsingOperator=!1),s?s[0].length:0}return{JSXOpeningElement(t){let o;if(t.attributes.length){var l;let p;o="first"===r?t.attributes[0].loc.start.column:a(t)+r,l=t.attributes,p=o,l.forEach(t=>{let o=a(t);!i.isUsingOperator||i.currentOperator||"first"===r||s||(p+=r,i.isUsingOperator=!1),"ArrayExpression"!==t.type&&"ObjectExpression"!==t.type&&o!==p&&sA(e,t)&&e.report({node:t,messageId:"wrongIndent",data:{needed:p,type:n,characters:1===p?"character":"characters",gotten:o},fix:e=>e.replaceTextRange([t.range[0]-t.loc.start.column,t.range[0]],Array(p+1).join("space"===n?" ":" "))})})}}}}})}),ax=nH(()=>{sB(),sJ(),sM(),ew=sF({name:"jsx-indent",meta:{type:"layout",docs:{description:"Enforce JSX indentation. Deprecated, use `indent` rule instead."},deprecated:!0,fixable:"whitespace",messages:{wrongIndent:"Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."},schema:[{anyOf:[{type:"string",enum:["tab"]},{type:"integer"}]},{type:"object",properties:{checkAttributes:{type:"boolean"},indentLogicalExpressions:{type:"boolean"}},additionalProperties:!1}]},create(e){i9('rule("jsx-indent")','"indent"');let t="space",n=4;e.options.length&&("tab"===e.options[0]?(n=1,t="tab"):"number"==typeof e.options[0]&&(n=e.options[0],t="space"));let r="space"===t?" ":" ",i=e.options[1]||{},s=i.checkAttributes||!1,a=i.indentLogicalExpressions||!1;function o(n,i,s,a){let o={needed:i,type:t,characters:1===i?"character":"characters",gotten:s};e.report({node:n,messageId:"wrongIndent",data:o,fix:function(t,n){let i=Array(n+1).join(r);if("JSXText"===t.type||"Literal"===t.type)return function(e){let n=t.raw.replace(/\n[\t ]*(\S)/g,(e,t)=>`
7
+ `),e.replaceText(n,s)}})}}function r(e){0!==e.arguments.length&&e.arguments.forEach(n)}return{CallExpression(e){r(e)},NewExpression(e){r(e)}}}}),rQ=nz({name:"jsx-indent-props",meta:{type:"layout",docs:{description:"Enforce props indentation in JSX"},fixable:"code",messages:{wrongIndent:"Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."},schema:[{anyOf:[{type:"string",enum:["tab","first"]},{type:"integer"},{type:"object",properties:{indentMode:{anyOf:[{type:"string",enum:["tab","first"]},{type:"integer"}]},ignoreTernaryOperator:{type:"boolean"}},additionalProperties:!1}]}]},create(e){let t=e.options[0],n="space",r=4,i={isUsingOperator:!1,currentOperator:!1},s=!1;if(e.options.length){let i="object"==typeof e.options[0]?"object"==typeof t&&t.indentMode:t;"first"===i?(r="first",n="space"):"tab"===i?(r=1,n="tab"):"number"==typeof i&&(r=i,n="space"),"object"==typeof t&&t.ignoreTernaryOperator&&(s=!0)}function a(t){let r=e.sourceCode.getText(t,t.loc.start.column+0);r=r.split("\n")[0];let s=("space"===n?/^ +/:/^\t+/).exec(r),a=/^[ \t]*:/.test(r)||/^[ \t]*\?/.test(r),o=/</.test(r);return i.currentOperator=!1,a?(i.isUsingOperator=!0,i.currentOperator=!0):o&&(i.isUsingOperator=!1),s?s[0].length:0}return{JSXOpeningElement(t){let o;if(t.attributes.length){var l;let p;o="first"===r?t.attributes[0].loc.start.column:a(t)+r,l=t.attributes,p=o,l.forEach(t=>{let o=a(t);!i.isUsingOperator||i.currentOperator||"first"===r||s||(p+=r,i.isUsingOperator=!1),"ArrayExpression"!==t.type&&"ObjectExpression"!==t.type&&o!==p&&n$(e,t)&&e.report({node:t,messageId:"wrongIndent",data:{needed:p,type:n,characters:1===p?"character":"characters",gotten:o},fix:e=>e.replaceTextRange([t.range[0]-t.loc.start.column,t.range[0]],Array(p+1).join("space"===n?" ":" "))})})}}}}}),rZ=nz({name:"jsx-indent",meta:{type:"layout",docs:{description:"Enforce JSX indentation. Deprecated, use `indent` rule instead."},deprecated:{message:"The rule was replaced with a more general rule.",deprecatedSince:"5.0.0",replacedBy:[{rule:{name:"indent",url:"https://eslint.style/rules/indent"}}]},fixable:"whitespace",messages:{wrongIndent:"Expected indentation of {{needed}} {{type}} {{characters}} but found {{gotten}}."},schema:[{anyOf:[{type:"string",enum:["tab"]},{type:"integer"}]},{type:"object",properties:{checkAttributes:{type:"boolean"},indentLogicalExpressions:{type:"boolean"}},additionalProperties:!1}]},create(e){let t="space",n=4;e.options.length&&("tab"===e.options[0]?(n=1,t="tab"):"number"==typeof e.options[0]&&(n=e.options[0],t="space"));let r="space"===t?" ":" ",i=e.options[1]||{},s=i.checkAttributes||!1,a=i.indentLogicalExpressions||!1;function o(n,i,s,a){let o={needed:i,type:t,characters:1===i?"character":"characters",gotten:s};e.report({node:n,messageId:"wrongIndent",data:o,fix:function(t,n){let i=Array(n+1).join(r);if("JSXText"===t.type||"Literal"===t.type)return function(e){let n=t.raw.replace(/\n[\t ]*(\S)/g,(e,t)=>`
8
8
  ${i}${t}`);return e.replaceText(t,n)};if("ReturnStatement"===t.type){let n=e.sourceCode.getText(t);if(n.split("\n").length>1)return function(e){let r=n.lastIndexOf("\n"),s=n.slice(r).replace(/^\n[\t ]*(\S)/,(e,t)=>`
9
- ${i}${t}`);return e.replaceTextRange([t.range[0]+r,t.range[1]],s)}}return function(e){return e.replaceTextRange([t.range[0]-t.loc.start.column,t.range[0]],i)}}(n,i),...{}})}function l(n,r=!1,i=!1){let s=e.sourceCode.getText(n,n.loc.start.column+0),a=s.split("\n");s=r?a[a.length-1]:a[0];let o=i?",":"",p=("space"===t?RegExp(`^[ ${o}]+`):RegExp(`^[ ${o}]+`)).exec(s);return p?p[0].length:0}function p(e){return e.parent&&e.parent.parent&&"LogicalExpression"===e.parent.parent.type&&e.parent.parent.right===e.parent&&!a}function c(t){return t.parent&&t.parent.parent&&"ConditionalExpression"===t.parent.parent.type&&t.parent.parent.alternate===t.parent&&"("!==e.sourceCode.getTokenBefore(t).value}function u(t,r,i=!1){let s=l(t,!1,i),a=p(t)&&s-r===n,d=c(t)&&s-r==0;s!==r&&sA(e,t)&&!a&&!d&&o(t,r,s)}function d(t){let r=e.sourceCode,i=r.getTokenBefore(t);if(!i)return;if("JSXText"===i.type||(0,sL.isCommaToken)(i))i="Literal"===(i=r.getNodeByRangeIndex(i.range[0])).type||"JSXText"===i.type?i.parent:i;else if((0,sL.isColonToken)(i)){do i=r.getTokenBefore(i);while("Punctuator"===i.type&&"/"!==i.value);for(i=r.getNodeByRangeIndex(i.range[0]);i.parent&&"ConditionalExpression"!==i.parent.type;)i=i.parent}let s=l(i="JSXExpressionContainer"===i.type?i.expression:i),a=i.loc.start.line===t.loc.start.line||p(t)||c(t)||function(e){if(!e.parent||!e.parent.parent||"ExpressionStatement"!==e.parent.parent.type)return!1;let t=e.parent.parent;return!!(t.parent&&"BlockStatement"===t.parent.type&&t.parent.parent&&"DoExpression"===t.parent.parent.type)&&t.parent.body[0]!==t}(t)?0:n;u(t,s+a)}function f(e){if(!e.parent)return;let t=l(e.parent.openingElement||e.parent.openingFragment);u(e,t)}function m(e){if(!e.parent||"JSXElement"!==e.parent.type&&"JSXFragment"!==e.parent.type)return;let r=l(e.parent);!function(e,n){let r=e.value,i="space"===t?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,s=Array.from(String(r).matchAll(i),e=>e[1]?e[1].length:0);s.length>0&&!s.every(e=>e===n)&&s.forEach(t=>{o(e,n,t)})}(e,r+n)}return{JSXOpeningElement:d,JSXOpeningFragment:d,JSXClosingElement:f,JSXClosingFragment:f,JSXAttribute:function(t){if(!s||!t.value||"JSXExpressionContainer"!==t.value.type)return;let n=l(t.name),r=e.sourceCode.getLastToken(t.value),i=sv(e,r);if(i.loc.start.line!==r.loc.start.line)return;let a=t.name.loc.start.line===i.loc.start.line?0:n;u(i,a)},JSXExpressionContainer(e){if(!e.parent)return;let t=l(e.parent);u(e,t+n)},Literal:m,JSXText:m,ReturnStatement(t){if(!t.parent||!t.argument||!sq(t.argument))return;let n=t.parent;for(;n&&"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type;)n=n.parent;if(!n||!function(e,t,n=!1,r=!1){let i=e=>{if(!e)return!1;switch(e.type){case"ConditionalExpression":if(n)return i(e.consequent)&&i(e.alternate);return i(e.consequent)||i(e.alternate);case"LogicalExpression":if(n)return i(e.left)&&i(e.right);return i(e.left)||i(e.right);case"SequenceExpression":return i(e.expressions[e.expressions.length-1]);case"JSXElement":case"JSXFragment":return!0;case"Literal":if(!r&&null===e.value)return!0;return!1;case"Identifier":return sq(function(e,t){var n;let r=(n=function(e){let t=e.getScope(),n=t.variables;for(;"global"!==t.type;)n=(t=t.upper).variables.concat(n);return t.childScopes.length&&(n=t.childScopes[0].variables.concat(n),t.childScopes[0].childScopes.length&&(n=t.childScopes[0].childScopes[0].variables.concat(n))),n.reverse(),n}(e),n.find(e=>e.name===t));return r&&r.defs[0]&&r.defs[0].node?"TypeAlias"===r.defs[0].node.type?r.defs[0].node.right:"ImportBinding"===r.defs[0].type?r.defs[0].node:r.defs[0].node.init:null}(t,e.name));default:return!1}},s=!1;return!function(e,t){let n=e.type;"ReturnStatement"===n?t(e.argument,()=>{}):"ArrowFunctionExpression"===n&&e.expression?t(e.body,()=>{}):("FunctionExpression"===n||"FunctionDeclaration"===n||"ArrowFunctionExpression"===n||"MethodDefinition"===n)&&function(e,t){let n=Object.assign({},{fallback:e=>Object.keys(e).filter(e=>"children"===e||"argument"===e)},t);n.keys=Object.assign({},t.keys,{JSXElement:["children"],JSXFragment:["children"]}),i4.traverse(e,n)}(e.body,{enter(e){let n=()=>{this.break()};switch(e.type){case"ReturnStatement":this.skip(),t(e.argument,n);return;case"BlockStatement":case"IfStatement":case"ForStatement":case"WhileStatement":case"SwitchStatement":case"SwitchCase":return;default:this.skip()}}})}(e,(e,t)=>{i(e)&&(s=!0,t())}),s}(t,e,!0))return;let r=l(t),i=l(t,!0);r!==i&&o(t,r,i)}}}})}),aT=nH(()=>{sB(),sM(),ev=sF({name:"jsx-max-props-per-line",meta:{type:"layout",docs:{description:"Enforce maximum of props on a single line in JSX"},fixable:"code",messages:{newLine:"Prop `{{prop}}` must be placed on a new line"},schema:[{anyOf:[{type:"object",properties:{maximum:{type:"object",properties:{single:{type:"integer",minimum:1},multi:{type:"integer",minimum:1}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{maximum:{type:"number",minimum:1},when:{type:"string",enum:["always","multiline"]}},additionalProperties:!1}]}]},create(e){let t=e.options[0]||{},n=t.maximum||1,r="number"==typeof n?{single:"multiline"===t.when?1/0:n,multi:n}:{single:n.single||1/0,multi:n.multi||1/0};return{JSXOpeningElement(t){if(!t.attributes.length)return;let n=s_(t);if((n?r.single:r.multi)===1/0)return;let i=[[t.attributes[0]]];t.attributes.reduce((e,t)=>((0,sL.isTokenOnSameLine)(e,t)?i[i.length-1].push(t):i.push([t]),t)),i.forEach(i=>{let s=n&&i[0].loc.start.line===t.loc.start.line?r.single:r.multi;if(i.length>s){var a;let t="JSXSpreadAttribute"===(a=i[s]).type?e.sourceCode.getText(a.argument):a.name.name;e.report({messageId:"newLine",node:i[s],data:{prop:t},fix:function(t,n){let r=e.sourceCode,i=[],s=t[0].range[0],a=t[t.length-1].range[1];for(let e=0;e<t.length;e+=n){let s=t.slice(e,e+n);i.push(s.reduce((e,t)=>""===e?r.getText(t):`${e} ${r.getText(t)}`,""))}let o=i.join("\n");return function(e){return e.replaceTextRange([s,a],o)}}(i,s)})}})}}}})}),aS=nH(()=>{sB(),sM(),eA=sF({name:"jsx-newline",meta:{type:"layout",docs:{description:"Require or prevent a new line after jsx elements and expressions."},fixable:"code",messages:{require:"JSX element should start in a new line",prevent:"JSX element should not start in a new line",allowMultilines:"Multiline JSX elements should start in a new line"},schema:[{type:"object",properties:{prevent:{default:!1,type:"boolean"},allowMultilines:{default:!1,type:"boolean"}},additionalProperties:!1,if:{properties:{allowMultilines:{const:!0}}},then:{properties:{prevent:{const:!0}},required:["prevent"]}}]},create(e){let t=new Set,n=e.sourceCode;function r(e){let t=n.getText(e);return/^\s*\{\/\*/.test(t)}function i(e){return!r(e)&&("JSXElement"===e.type||"JSXExpressionContainer"===e.type)}return{"Program:exit":function(){t.forEach(t=>{t.children.forEach((t,s,a)=>{if("JSXElement"===t.type||"JSXExpressionContainer"===t.type){let o=e.options[0]||{},l=o.prevent||!1,p=o.allowMultilines||!1,c=a[s+1],u=a[s+2];if(!(c&&u&&("Literal"===c.type||"JSXText"===c.type)))return;let d=!/\n\s*\n/.test(c.value);if(r(t))return;let f=a.slice(s+2).find(i);if(p&&(!s_(t)||f&&!s_(f))){if(!d)return;let t=/(\n)(?!.*\1)/g;e.report({messageId:"allowMultilines",node:u,fix:e=>e.replaceText(c,n.getText(c).replace(t,"\n\n"))});return}if(d===l)return;let m=l?/(\n\n)(?!.*\1)/g:/(\n)(?!.*\1)/g,h=l?"\n":"\n\n";e.report({messageId:l?"prevent":"require",node:u,fix:e=>e.replaceText(c,n.getText(c).replace(m,h))})}})})},":matches(JSXElement, JSXFragment) > :matches(JSXElement, JSXExpressionContainer)":e=>{t.add(e.parent)}}}})}),ab=nH(()=>{sB(),sM(),e_=sF({name:"jsx-one-expression-per-line",meta:{type:"layout",docs:{description:"Require one JSX element per line"},fixable:"whitespace",messages:{moveToNewLine:"`{{descriptor}}` must be placed on a new line"},schema:[{type:"object",properties:{allow:{type:"string",enum:["none","literal","single-child","single-line","non-jsx"]}},default:eC={allow:"none"},additionalProperties:!1}]},create(e){let t=Object.assign({},eC,e.options[0]);function n(n){let r=n.children;if(!r||!r.length||"non-jsx"===t.allow&&!r.some(e=>"JSXFragment"===e.type||"JSXElement"===e.type))return;let i=n.openingElement||n.openingFragment,s=n.closingElement||n.closingFragment,a=i.loc.start.line,o=i.loc.end.line,l=s.loc.start.line,p=s.loc.end.line;if(1===r.length){let e=r[0];if(a===o&&o===l&&l===p&&p===e.loc.start.line&&e.loc.start.line===e.loc.end.line&&("single-child"===t.allow||"literal"===t.allow&&("Literal"===e.type||"JSXText"===e.type)||"single-line"===t.allow))return}if("single-line"===t.allow){let e=r[0],t=r[r.length-1],n=t.loc.end.line-e.loc.start.line,i=0;if(("Literal"===e.type||"JSXText"===e.type)&&/^\s*?\n/.test(e.raw)&&(i+=1),("Literal"===t.type||"JSXText"===t.type)&&/\n\s*$/.test(t.raw)&&(i+=1),0===n&&0===i||2===n&&2===i)return}let c={},u={};r.forEach(e=>{let t=0,n=0;if("Literal"===e.type||"JSXText"===e.type){if(sw(e.raw))return;t=(e.raw.match(/^\s*\n/g)||[]).length,n=(e.raw.match(/\n\s*$/g)||[]).length}let r=e.loc.start.line+t,i=e.loc.end.line-n;r===i?(c[r]||(c[r]=[]),c[r].push(e)):(c[r]||(c[r]=[]),c[r].push(e),c[i]||(c[i]=[]),c[i].push(e))}),Object.keys(c).forEach(t=>{let n=parseInt(t,10),r=c[n].length-1;c[n].forEach((t,a)=>{let p,d;if(0===a?n===o&&(p=i):p=c[n][a-1],a===r&&n===l&&(d=s),!p&&!d)return;let f=e.sourceCode.getText(t),m=!!(p&&(()=>{let n=e.sourceCode.getTokensBetween(p,t)[0];return("Literal"===p.type||"JSXText"===p.type)&&p.raw.endsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.startsWith(" ")||sw(n?.value)})()),h=!!(d&&(()=>{let n=e.sourceCode.getTokensBetween(t,d)[0];return("Literal"===d.type||"JSXText"===d.type)&&d.raw.startsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.endsWith(" ")||sw(n?.value)})()),g=!!p,y=!!d,x=`${t.loc.start.line},${t.loc.start.column}`;u[x]||(u[x]={node:t,source:f,descriptor:"openingElement"in t&&t.openingElement&&"name"in t.openingElement.name?String(t.openingElement.name.name):e.sourceCode.getText(t).replace(/\n/g,"")}),m&&(u[x].leadingSpace=!0),g&&(u[x].leadingNewLine=!0),y&&(u[x].trailingNewLine=!0),h&&(u[x].trailingSpace=!0)})}),Object.keys(u).forEach(t=>{let n=u[t],r=n.node,i=n.descriptor,s=n.source.replace(/(^ +| +$)/g,""),a=n.leadingSpace?"\n{' '}":"",o=n.trailingSpace?"{' '}\n":"",l=n.leadingNewLine?"\n":"",p=n.trailingNewLine?"\n":"",c=`${a}${l}${s}${p}${o}`;e.report({messageId:"moveToNewLine",node:r,data:{descriptor:i},fix:e=>e.replaceText(r,c)})})}return{JSXElement:n,JSXFragment:n}}})}),aE={};function ak(){if(eP)return eO;eP=1;let e="[^\\\\/]",t="[^/]",n="(?:\\/|$)",r="(?:^|\\/)",i=`\\.{1,2}${n}`,s=`(?!${r}${i})`,a=`(?!\\.{0,1}${n})`,o=`(?!${i})`,l=`${t}*?`,p={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:t,END_ANCHOR:n,DOTS_SLASH:i,NO_DOT:"(?!\\.)",NO_DOTS:s,NO_DOT_SLASH:a,NO_DOTS_SLASH:o,QMARK_NO_DOT:"[^.\\/]",STAR:l,START_ANCHOR:r,SEP:"/"},c={...p,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};return eO={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:p}}function aw(){if(eI)return aE;eI=1;let{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:r}=ak();return aE.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),aE.hasRegexChars=e=>n.test(e),aE.isRegexChar=e=>1===e.length&&aE.hasRegexChars(e),aE.escapeRegex=e=>e.replace(r,"\\$1"),aE.toPosixSlashes=t=>t.replace(e,"/"),aE.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return"undefined"!=typeof process&&!!process.platform&&"win32"===process.platform},aE.removeBackslashes=e=>e.replace(t,e=>"\\"===e?"":e),aE.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return -1===r?e:"\\"===e[r-1]?aE.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`},aE.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},aE.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},aE.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r},aE}var av=nF(function(){if(eM)return eF;eM=1;let e=function(){if(eR)return ej;eR=1;let e=function(){if(eN)return eL;eN=1;let e=aw(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:u,CHAR_QUESTION_MARK:d,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=ak(),g=e=>e===o||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return eL=(x,T)=>{let S,b,E=T||{},k=x.length-1,w=!0===E.parts||!0===E.scanToEnd,v=[],A=[],C=[],_=x,O=-1,P=0,I=0,L=!1,N=!1,D=!1,B=!1,j=!1,R=!1,F=!1,M=!1,V=!1,$=!1,q=0,Y={value:"",depth:0,isGlob:!1},X=()=>O>=k,J=()=>_.charCodeAt(O+1),U=()=>(S=b,_.charCodeAt(++O));for(;O<k;){let e;if((b=U())===r){F=Y.backslashes=!0,(b=U())===l&&(R=!0);continue}if(!0===R||b===l){for(q++;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,U();continue}if(b===l){q++;continue}if(!0!==R&&b===s&&(b=U())===s||!0!==R&&b===i){if(L=Y.isBrace=!0,D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===f&&0==--q){R=!1,L=Y.isBrace=!0,$=!0;break}}if(!0===w)continue;break}if(b===o){if(v.push(O),A.push(Y),Y={value:"",depth:0,isGlob:!1},!0===$)continue;if(S===s&&O===P+1){P+=2;continue}I=O+1;continue}if(!0!==E.noext&&!0==(b===u||b===n||b===t||b===d||b===a)&&J()===p){if(D=Y.isGlob=!0,B=Y.isExtglob=!0,$=!0,b===a&&O===P&&(V=!0),!0===w){for(;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,b=U();continue}if(b===m){D=Y.isGlob=!0,$=!0;break}}continue}break}if(b===t){if(S===t&&(j=Y.isGlobstar=!0),D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===d){if(D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===c){for(;!0!==X()&&(e=U());){if(e===r){F=Y.backslashes=!0,U();continue}if(e===h){N=Y.isBracket=!0,D=Y.isGlob=!0,$=!0;break}}if(!0===w)continue;break}if(!0!==E.nonegate&&b===a&&O===P){M=Y.negated=!0,P++;continue}if(!0!==E.noparen&&b===p){if(D=Y.isGlob=!0,!0===w){for(;!0!==X()&&(b=U());){if(b===p){F=Y.backslashes=!0,b=U();continue}if(b===m){$=!0;break}}continue}break}if(!0===D){if($=!0,!0===w)continue;break}}!0===E.noext&&(B=!1,D=!1);let W=_,K="",H="";P>0&&(K=_.slice(0,P),_=_.slice(P),I-=P),W&&!0===D&&I>0?(W=_.slice(0,I),H=_.slice(I)):!0===D?(W="",H=_):W=_,W&&""!==W&&"/"!==W&&W!==_&&g(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===E.unescape&&(H&&(H=e.removeBackslashes(H)),W&&!0===F&&(W=e.removeBackslashes(W)));let G={prefix:K,input:x,start:P,base:W,glob:H,isBrace:L,isBracket:N,isGlob:D,isExtglob:B,isGlobstar:j,negated:M,negatedExtglob:V};if(!0===E.tokens&&(G.maxDepth=0,g(b)||A.push(Y),G.tokens=A),!0===E.parts||!0===E.tokens){let e;for(let t=0;t<v.length;t++){let n=e?e+1:P,r=v[t],i=x.slice(n,r);E.tokens&&(0===t&&0!==P?(A[t].isPrefix=!0,A[t].value=K):A[t].value=i,y(A[t]),G.maxDepth+=A[t].depth),(0!==t||""!==i)&&C.push(i),e=r}if(e&&e+1<x.length){let t=x.slice(e+1);C.push(t),E.tokens&&(A[A.length-1].value=t,y(A[A.length-1]),G.maxDepth+=A[A.length-1].depth)}G.slashes=v,G.parts=C}return G}}(),t=function(){if(eB)return eD;eB=1;let e=ak(),t=aw(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:a}=e,o=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,p=(c,u)=>{let d;if("string"!=typeof c)throw TypeError("Expected a string");c=a[c]||c;let f={...u},m="number"==typeof f.maxLength?Math.min(n,f.maxLength):n,h=c.length;if(h>m)throw SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${m}`);let g={type:"bos",value:"",output:f.prepend||""},y=[g],x=f.capture?"":"?:",T=e.globChars(f.windows),S=e.extglobChars(T),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:k,ONE_CHAR:w,DOTS_SLASH:v,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:_,QMARK:O,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:L}=T,N=e=>`(${x}(?:(?!${L}${e.dot?v:b}).)*?)`,D=f.dot?"":A,B=f.dot?O:P,j=!0===f.bash?N(f):I;f.capture&&(j=`(${j})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);let R={input:c,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};h=(c=t.removePrefix(c,R)).length;let F=[],M=[],V=[],$=g,q=()=>R.index===h-1,Y=R.peek=(e=1)=>c[R.index+e],X=R.advance=()=>c[++R.index]||"",J=()=>c.slice(R.index+1),U=(e="",t=0)=>{R.consumed+=e,R.index+=t},W=e=>{R.output+=null!=e.output?e.output:e.value,U(e.value)},K=()=>{let e=1;for(;"!"===Y()&&("("!==Y(2)||"?"===Y(3));)X(),R.start++,e++;return e%2!=0&&(R.negated=!0,R.start++,!0)},H=e=>{R[e]++,V.push(e)},G=e=>{R[e]--,V.pop()},z=e=>{if("globstar"===$.type){let t=R.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||F.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(R.output=R.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=j,R.output+=$.output)}if(F.length&&"paren"!==e.type&&(F[F.length-1].inner+=e.value),(e.value||e.output)&&W(e),$&&"text"===$.type&&"text"===e.type){$.output=($.output||$.value)+e.value,$.value+=e.value;return}e.prev=$,y.push(e),$=e},Q=(e,t)=>{let n={...S[t],conditions:1,inner:""};n.prev=$,n.parens=R.parens,n.output=R.output;let r=(f.capture?"(":"")+n.open;H("parens"),z({type:e,value:t,output:R.output?"":w}),z({type:"paren",extglob:!0,value:X(),output:r}),F.push(n)},Z=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=j;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=N(f)),(r!==j||q()||/^\)+$/.test(J()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=J())&&/^\.[^\\/.]+$/.test(t)){let i=p(t,{...u,fastpaths:!1}).output;n=e.close=`)${i})${r})`}"bos"===e.prev.type&&(R.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:d,output:n}),G("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(s,(t,n,r,i,s,a)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(s?O.repeat(s.length):""):0===a?B+(s?O.repeat(s.length):""):O.repeat(r.length):"."===i?b.repeat(r.length):"*"===i?n?n+i+(s?j:""):j:n?t:`\\${t}`);return(!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===f.contains)?R.output=c:R.output=t.wrapOutput(n,R,u),R}for(;!q();){if("\0"===(d=X()))continue;if("\\"===d){let e=Y();if("/"===e&&!0!==f.bash||"."===e||";"===e)continue;if(!e){z({type:"text",value:d+="\\"});continue}let t=/^\\+/.exec(J()),n=0;if(t&&t[0].length>2&&(n=t[0].length,R.index+=n,n%2!=0&&(d+="\\")),!0===f.unescape?d=X():d+=X(),0===R.brackets){z({type:"text",value:d});continue}}if(R.brackets>0&&("]"!==d||"["===$.value||"[^"===$.value)){if(!1!==f.posix&&":"===d){let e=$.value.slice(1);if(e.includes("[")&&($.posix=!0,e.includes(":"))){let e=$.value.lastIndexOf("["),t=$.value.slice(0,e),n=r[$.value.slice(e+2)];if(n){$.value=t+n,R.backtrack=!0,X(),g.output||1!==y.indexOf($)||(g.output=w);continue}}}("["===d&&":"!==Y()||"-"===d&&"]"===Y())&&(d=`\\${d}`),"]"===d&&("["===$.value||"[^"===$.value)&&(d=`\\${d}`),!0===f.posix&&"!"===d&&"["===$.value&&(d="^"),$.value+=d,W({value:d});continue}if(1===R.quotes&&'"'!==d){d=t.escapeRegex(d),$.value+=d,W({value:d});continue}if('"'===d){R.quotes=+(1!==R.quotes),!0===f.keepQuotes&&z({type:"text",value:d});continue}if("("===d){H("parens"),z({type:"paren",value:d});continue}if(")"===d){if(0===R.parens&&!0===f.strictBrackets)throw SyntaxError(l("opening","("));let e=F[F.length-1];if(e&&R.parens===e.parens+1){Z(F.pop());continue}z({type:"paren",value:d,output:R.parens?")":"\\)"}),G("parens");continue}if("["===d){if(!0!==f.nobracket&&J().includes("]"))H("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw SyntaxError(l("closing","]"));d=`\\${d}`}z({type:"bracket",value:d});continue}if("]"===d){if(!0===f.nobracket||$&&"bracket"===$.type&&1===$.value.length){z({type:"text",value:d,output:`\\${d}`});continue}if(0===R.brackets){if(!0===f.strictBrackets)throw SyntaxError(l("opening","["));z({type:"text",value:d,output:`\\${d}`});continue}G("brackets");let e=$.value.slice(1);if(!0===$.posix||"^"!==e[0]||e.includes("/")||(d=`/${d}`),$.value+=d,W({value:d}),!1===f.literalBrackets||t.hasRegexChars(e))continue;let n=t.escapeRegex($.value);if(R.output=R.output.slice(0,-$.value.length),!0===f.literalBrackets){R.output+=n,$.value=n;continue}$.value=`(${x}${n}|${$.value})`,R.output+=$.value;continue}if("{"===d&&!0!==f.nobrace){H("braces");let e={type:"brace",value:d,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};M.push(e),z(e);continue}if("}"===d){let e=M[M.length-1];if(!0===f.nobrace||!e){z({type:"text",value:d,output:d});continue}let t=")";if(!0===e.dots){let e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=o(n,f),R.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let n=R.output.slice(0,e.outputIndex),r=R.tokens.slice(e.tokensIndex);for(let i of(e.value=e.output="\\{",d=t="\\}",R.output=n,r))R.output+=i.output||i.value}z({type:"brace",value:d,output:t}),G("braces"),M.pop();continue}if("|"===d){F.length>0&&F[F.length-1].conditions++,z({type:"text",value:d});continue}if(","===d){let e=d,t=M[M.length-1];t&&"braces"===V[V.length-1]&&(t.comma=!0,e="|"),z({type:"comma",value:d,output:e});continue}if("/"===d){if("dot"===$.type&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",y.pop(),$=g;continue}z({type:"slash",value:d,output:k});continue}if("."===d){if(R.braces>0&&"dot"===$.type){"."===$.value&&($.output=b);let e=M[M.length-1];$.type="dots",$.output+=d,$.value+=d,e.dots=!0;continue}if(R.braces+R.parens===0&&"bos"!==$.type&&"slash"!==$.type){z({type:"text",value:d,output:b});continue}z({type:"dot",value:d,output:b});continue}if("?"===d){if(!($&&"("===$.value)&&!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){Q("qmark",d);continue}if($&&"paren"===$.type){let e=Y(),t=d;("("!==$.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${d}`),z({type:"text",value:d,output:t});continue}if(!0!==f.dot&&("slash"===$.type||"bos"===$.type)){z({type:"qmark",value:d,output:P});continue}z({type:"qmark",value:d,output:O});continue}if("!"===d){if(!0!==f.noextglob&&"("===Y()&&("?"!==Y(2)||!/[!=<:]/.test(Y(3)))){Q("negate",d);continue}if(!0!==f.nonegate&&0===R.index){K();continue}}if("+"===d){if(!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){Q("plus",d);continue}if($&&"("===$.value||!1===f.regex){z({type:"plus",value:d,output:E});continue}if($&&("bracket"===$.type||"paren"===$.type||"brace"===$.type)||R.parens>0){z({type:"plus",value:d});continue}z({type:"plus",value:E});continue}if("@"===d){if(!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){z({type:"at",extglob:!0,value:d,output:""});continue}z({type:"text",value:d});continue}if("*"!==d){("$"===d||"^"===d)&&(d=`\\${d}`);let e=i.exec(J());e&&(d+=e[0],R.index+=e[0].length),z({type:"text",value:d});continue}if($&&("globstar"===$.type||!0===$.star)){$.type="star",$.star=!0,$.value+=d,$.output=j,R.backtrack=!0,R.globstar=!0,U(d);continue}let e=J();if(!0!==f.noextglob&&/^\([^?]/.test(e)){Q("star",d);continue}if("star"===$.type){if(!0===f.noglobstar){U(d);continue}let t=$.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){z({type:"star",value:d,output:""});continue}let s=R.braces>0&&("comma"===t.type||"brace"===t.type),a=F.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!s&&!a){z({type:"star",value:d,output:""});continue}for(;"/**"===e.slice(0,3);){let t=c[R.index+4];if(t&&"/"!==t)break;e=e.slice(3),U("/**",3)}if("bos"===t.type&&q()){$.type="globstar",$.value+=d,$.output=N(f),R.output=$.output,R.globstar=!0,U(d);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&q()){R.output=R.output.slice(0,-(t.output+$.output).length),t.output=`(?:${t.output}`,$.type="globstar",$.output=N(f)+(f.strictSlashes?")":"|$)"),$.value+=d,R.globstar=!0,R.output+=t.output+$.output,U(d);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){let n=void 0!==e[1]?"|$":"";R.output=R.output.slice(0,-(t.output+$.output).length),t.output=`(?:${t.output}`,$.type="globstar",$.output=`${N(f)}${k}|${k}${n})`,$.value+=d,R.output+=t.output+$.output,R.globstar=!0,U(d+X()),z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){$.type="globstar",$.value+=d,$.output=`(?:^|${k}|${N(f)}${k})`,R.output=$.output,R.globstar=!0,U(d+X()),z({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-$.output.length),$.type="globstar",$.output=N(f),$.value+=d,R.output+=$.output,R.globstar=!0,U(d);continue}let n={type:"star",value:d,output:j};if(!0===f.bash){n.output=".*?",("bos"===$.type||"slash"===$.type)&&(n.output=D+n.output),z(n);continue}if($&&("bracket"===$.type||"paren"===$.type)&&!0===f.regex){n.output=d,z(n);continue}(R.index===R.start||"slash"===$.type||"dot"===$.type)&&("dot"===$.type?(R.output+=C,$.output+=C):!0===f.dot?(R.output+=_,$.output+=_):(R.output+=D,$.output+=D),"*"!==Y()&&(R.output+=w,$.output+=w)),z(n)}for(;R.brackets>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing","]"));R.output=t.escapeLast(R.output,"["),G("brackets")}for(;R.parens>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing",")"));R.output=t.escapeLast(R.output,"("),G("parens")}for(;R.braces>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing","}"));R.output=t.escapeLast(R.output,"{"),G("braces")}if(!0!==f.strictSlashes&&("star"===$.type||"bracket"===$.type)&&z({type:"maybe_slash",value:"",output:`${k}?`}),!0===R.backtrack)for(let e of(R.output="",R.tokens))R.output+=null!=e.output?e.output:e.value,e.suffix&&(R.output+=e.suffix);return R};return p.fastpaths=(r,i)=>{let s={...i},o="number"==typeof s.maxLength?Math.min(n,s.maxLength):n,l=r.length;if(l>o)throw SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${o}`);r=a[r]||r;let{DOT_LITERAL:p,SLASH_LITERAL:c,ONE_CHAR:u,DOTS_SLASH:d,NO_DOT:f,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:y}=e.globChars(s.windows),x=s.dot?m:f,T=s.dot?h:f,S=s.capture?"":"?:",b=!0===s.bash?".*?":g;s.capture&&(b=`(${b})`);let E=e=>!0===e.noglobstar?b:`(${S}(?:(?!${y}${e.dot?d:p}).)*?)`,k=e=>{switch(e){case"*":return`${x}${u}${b}`;case".*":return`${p}${u}${b}`;case"*.*":return`${x}${b}${p}${u}${b}`;case"*/*":return`${x}${b}${c}${u}${T}${b}`;case"**":return x+E(s);case"**/*":return`(?:${x}${E(s)}${c})?${T}${u}${b}`;case"**/*.*":return`(?:${x}${E(s)}${c})?${T}${b}${p}${u}${b}`;case"**/.*":return`(?:${x}${E(s)}${c})?${p}${u}${b}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=k(t[1]);if(!n)return;return n+p+t[2]}}},w=k(t.removePrefix(r,{negated:!1,prefix:""}));return w&&!0!==s.strictSlashes&&(w+=`${c}?`),w},eD=p}(),n=aw(),r=ak(),i=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>i(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!r)throw TypeError("Expected pattern to be a non-empty string");let s=t||{},a=s.windows,o=r?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=o.state;delete o.state;let p=()=>!1;if(s.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};p=i(s.ignore,e,n)}let c=(n,r=!1)=>{let{isMatch:c,match:u,output:d}=i.test(n,o,t,{glob:e,posix:a}),f={glob:e,state:l,regex:o,posix:a,input:n,output:d,match:u,isMatch:c};return("function"==typeof s.onResult&&s.onResult(f),!1===c)?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(c.state=l),c};return i.test=(e,t,r,{glob:s,posix:a}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let o=r||{},l=o.format||(a?n.toPosixSlashes:null),p=e===s,c=p&&l?l(e):e;return!1===p&&(p=(c=l?l(e):e)===s),(!1===p||!0===o.capture)&&(p=!0===o.matchBase||!0===o.basename?i.matchBase(e,t,r,a):t.exec(c)),{isMatch:!!p,match:p,output:c}},i.matchBase=(e,t,r)=>(t instanceof RegExp?t:i.makeRe(t,r)).test(n.basename(e)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;let s=t||{},a=s.contains?"":"^",o=s.contains?"":"$",l=`${a}(?:${e.output})${o}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let p=i.toRegex(l,t);return!0===r&&(p.state=e),p},i.makeRe=(e,n={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return!1!==n.fastpaths&&("."===e[0]||"*"===e[0])&&(a.output=t.fastpaths(e,n)),a.output||(a=t(e,n)),i.compileRe(a,n,r,s)},i.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=r,ej=i}(),t=aw();function n(r,i,s=!1){return i&&(null===i.windows||void 0===i.windows)&&(i={...i,windows:t.isWindows()}),e(r,i,s)}return Object.assign(n,e),eF=n}());function aA(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function aC(e){let t=e.toUpperCase();return e===t&&t!==e.toLowerCase()}var a_=nH(()=>{sJ(),sM(),eV=sF({name:"jsx-pascal-case",meta:{type:"suggestion",docs:{description:"Enforce PascalCase for user-defined JSX components"},messages:{usePascalCase:"Imported JSX component {{name}} must be in PascalCase",usePascalOrSnakeCase:"Imported JSX component {{name}} must be in PascalCase or SCREAMING_SNAKE_CASE"},schema:[{type:"object",properties:{allowAllCaps:{type:"boolean"},allowLeadingUnderscore:{type:"boolean"},allowNamespace:{type:"boolean"},ignore:{items:{type:"string"},type:"array",uniqueItems:!0}},additionalProperties:!1}]},create(e){let{allowAllCaps:t=!1,allowLeadingUnderscore:n=!1,allowNamespace:r=!1,ignore:i=[]}=e.options[0]||{},s=av(i,{noglobstar:!0});return{JSXOpeningElement(a){if(s$(a))return;let o=sX(a),l=[o],p=0;o.includes(":")?l=o.split(":"):o.includes(".")&&(l=o.split("."));do{let r=l[p];if(1===r.length)return;let o=s(r)||i.includes(r),c=n&&r.startsWith("_")?r.slice(1):r,u=!(!aC(c.charAt(0))||Array.prototype.some.call(c.slice(1),e=>e.toLowerCase()===e.toUpperCase()&&!aA(e)))&&Array.prototype.some.call(c.slice(1),e=>(function(e){let t=e.toLowerCase();return e===t&&t!==e.toUpperCase()})(e)||aA(e)),d=t&&function(e){let t=e.charAt(0);if(!(aC(t)||aA(t)))return!1;for(let t=1;t<e.length-1;t+=1){let n=e.charAt(t);if(!(aC(n)||aA(n)||"_"===n))return!1}let n=e.charAt(e.length-1);return!!(aC(n)||aA(n))}(c);if(!u&&!d&&!o){let n=t?"usePascalOrSnakeCase":"usePascalCase";e.report({messageId:n,node:a,data:{name:r}});break}p+=1}while(p<l.length&&!r)}}}})}),aO=nH(()=>{sM(),e$=sF({name:"jsx-props-no-multi-spaces",meta:{type:"layout",docs:{description:"Disallow multiple spaces between inline JSX props"},fixable:"code",messages:{noLineGap:"Expected no line gap between “{{prop1}}” and “{{prop2}}”",onlyOneSpace:"Expected only one space between “{{prop1}}” and “{{prop2}}”"},schema:[]},create(e){let t=e.sourceCode;function n(e){switch(e.type){case"JSXSpreadAttribute":return t.getText(e.argument);case"JSXIdentifier":return e.name;case"JSXMemberExpression":return`${n(e.object)}.${e.property.name}`;default:return e.name?e.name.name:`${t.getText(e.object)}.${e.property.name}`}}return{JSXOpeningElement(r){r.attributes.reduce((r,i)=>{var s,a;return function(e,n){let r=[].concat(e,t.getCommentsBefore?t.getCommentsBefore(n):[],n);for(let e=1;e<r.length;e+=1){let t=r[e-1];if(r[e].loc.start.line-t.loc.end.line>=2)return!0}return!1}(s=r,a=i)&&e.report({messageId:"noLineGap",node:a,data:{prop1:n(s),prop2:n(a)}}),s.loc.end.line===a.loc.end.line&&" "!==t.text.slice(s.range[1],a.range[0])&&e.report({node:a,messageId:"onlyOneSpace",data:{prop1:n(s),prop2:n(a)},fix:e=>e.replaceTextRange([s.range[1],a.range[0]]," ")}),i},function(e){let t=e.name;if(void 0!==e.typeArguments&&e.typeArguments?.type==="TSTypeParameterInstantiation"){let n=e.typeArguments;return Object.assign({},e,{range:[t.range[0],n?.range[1]]})}return t}(r))}}}})}),aP=nH(()=>{sB(),sM(),eq={"prefer-double":{quote:'"',description:"singlequote",convert:e=>e.replace(/'/gu,'"')},"prefer-single":{quote:"'",description:"doublequote",convert:e=>e.replace(/"/gu,"'")}},eY=sF({name:"jsx-quotes",meta:{type:"layout",docs:{description:"Enforce the consistent use of either double or single quotes in JSX attributes"},fixable:"whitespace",schema:[{type:"string",enum:["prefer-single","prefer-double"]}],messages:{unexpected:"Unexpected usage of {{description}}."}},create(e){let t=eq[e.options[0]||"prefer-double"];return{JSXAttribute(n){let r=n.value;r&&sm(r)&&!(r.value.includes(t.quote)||sg(r.raw,t.quote))&&e.report({node:r,messageId:"unexpected",data:{description:t.description},fix:e=>e.replaceText(r,t.convert(r.raw))})}}}})}),aI=nH(()=>{sJ(),sM(),eJ=sF({name:"jsx-self-closing-comp",meta:{type:"layout",docs:{description:"Disallow extra closing tags for components without children"},fixable:"code",messages:{notSelfClosing:"Empty components are self-closing"},schema:[{type:"object",properties:{component:{default:(eX={component:!0,html:!0}).component,type:"boolean"},html:{default:eX.html,type:"boolean"}},additionalProperties:!1}]},create:e=>({JSXOpeningElement(t){(function(t){var n;let r=Object.assign({},eX,e.options[0]);return(r.component&&(n=t).name&&("JSXIdentifier"===n.name.type||"JSXMemberExpression"===n.name.type)&&!s$(n)||r.html&&s$(t))&&!t.selfClosing&&(0===t.parent.children.length||function(e){let t=e.parent.children;return 1===t.length&&"JSXText"===t[0].type&&t[0].value.includes("\n")&&""===t[0].value.replace(/(?!\xA0)\s/g,"")}(t))})(t)&&e.report({messageId:"notSelfClosing",node:t,fix(e){let n=t.range[1]-1,r=t.parent.closingElement?.range[1]??NaN;return e.replaceTextRange([n,r]," />")}})}})})});function aL(e){return/^on[A-Z]/.test(e)}function aN(e,t){return t.indexOf(e.split(":")[0])}function aD(e){let t=eK.get(e);return!!t&&!!t.hasComment}function aB(e,t,n,r,i){let s=eH.get(e)||[];s.includes(t)||(s.push(t),eH.set(e,s),r.report({node:e.name??"",messageId:t,fix:function(e,t,n){let r=t.sourceCode,i=e.attributes.slice(0),s=t.options[0]||{},a=s.ignoreCase||!1,o=s.callbacksLast||!1,l=s.shorthandFirst||!1,p=s.shorthandLast||!1,c=s.multiline||"ignore",u=s.noSortAlphabetically||!1,d=s.reservedFirst||!1,f={ignoreCase:a,callbacksLast:o,shorthandFirst:l,shorthandLast:p,multiline:c,noSortAlphabetically:u,reservedFirst:d,reservedList:n,reservedLast:s.reservedLast||[],locale:s.locale||"auto"},m=function(e,t){let n=t.sourceCode,r=[],i=0;function s(e){r[i-1].push(e)}for(let t=0;t<e.length;t++){let a=e[t],o=e[t+1],l=a.loc.start.line,p=[];try{p=n.getCommentsAfter(a)}catch{}let c=e[t-1],u="JSXSpreadAttribute"===a.type;if(c&&("JSXSpreadAttribute"!==c.type||u)||(r[(i+=1)-1]=[]),!u)if(0===p.length)eK.set(a,{end:a.range[1],hasComment:!1}),s(a);else{let e=p[0],r=e.loc.start.line;if(1===p.length)l+1===r&&o?(eK.set(a,{end:o.range[1],hasComment:!0}),s(a),t+=1):l===r&&("Block"===e.type&&o?(eK.set(a,{end:o.range[1],hasComment:!0}),t+=1):"Block"===e.type?eK.set(a,{end:e.range[1],hasComment:!0}):eK.set(a,{end:e.range[1],hasComment:!1}),s(a));else if(p.length>1&&l+1===p[1].loc.start.line&&o){let e=n.getCommentsAfter(o);eK.set(a,{end:o.range[1],hasComment:!0}),1===e.length&&o.loc.start.line===e[0].loc.start.line&&eK.set(a,{end:e[0].range[1],hasComment:!0}),s(a),t+=1}}}return r}(i,t),h=m.slice(0).map(e=>[...e].sort((e,t)=>(function(e,t,n){let r=sY(e),i=sY(t),s=r.split(":")[0],a=i.split(":")[0],o=aD(e),l=aD(t);if(o&&!l)return 1;if(!o&&l)return -1;if(n.reservedFirst){let e=aN(r,n.reservedList),t=aN(i,n.reservedList);if(e>-1&&-1===t)return -1;if(-1===e&&t>-1)return 1;if(e>-1&&t>-1&&s!==a)return e>t?1:-1}if(n.reservedLast.length>0){let e=aN(r,n.reservedLast),t=aN(i,n.reservedLast);if(e>-1&&-1===t)return 1;if(-1===e&&t>-1)return -1;if(e>-1&&t>-1&&s!==a)return e>t?-1:1}if(n.callbacksLast){let e=aL(r),t=aL(i);if(e&&!t)return 1;if(!e&&t)return -1}if(n.shorthandFirst||n.shorthandLast){let r=n.shorthandFirst?-1:1;if(!e.value&&t.value)return r;if(e.value&&!t.value)return-r}if("ignore"!==n.multiline){let r="first"===n.multiline?-1:1,i=!s_(e),s=!s_(t);if(i&&!s)return r;if(!i&&s)return-r}if(n.noSortAlphabetically)return 0;let p="auto"===n.locale?void 0:n.locale;return n.ignoreCase?(r=r.toLowerCase(),i=i.toLowerCase(),r.localeCompare(i,p)):r===i?0:"auto"===n.locale?r<i?-1:1:r.localeCompare(i,p)})(e,t,f)));return function(e){let t=[],n=r.getText();m.forEach((e,r)=>{e.forEach((e,i)=>{let s=h[r][i],a=n.slice(s.range[0],eK.get(s).end);t.push({range:[e.range[0],eK.get(e).end],text:a})})}),t.sort((e,t)=>t.range[0]-e.range[0]);let i=t[0],s=t[t.length-1],a=s?s.range[0]:0,o=i?i.range[1]:-0;return t.forEach(e=>{n=`${n.slice(0,e.range[0])}${e.text}${n.slice(e.range[1])}`}),e.replaceTextRange([a,o],n.slice(a,o))}}(n,r,i)}))}var aj=nH(()=>{sB(),sJ(),sM(),eU={listIsEmpty:"A customized reserved first list must not be empty",listReservedPropsFirst:"Reserved props must be listed before all other props",listReservedPropsLast:"Reserved props must be listed after all other props",listCallbacksLast:"Callbacks must be listed after all other props",listShorthandFirst:"Shorthand props must be listed before all other props",listShorthandLast:"Shorthand props must be listed after all other props",listMultilineFirst:"Multiline props must be listed before all other props",listMultilineLast:"Multiline props must be listed after all other props",sortPropsByAlpha:"Props should be sorted alphabetically"},eW=["children","dangerouslySetInnerHTML","key","ref"],eH=new WeakMap,eG=sF({name:"jsx-sort-props",meta:{type:"layout",docs:{description:"Enforce props alphabetical sorting"},fixable:"code",messages:eU,schema:[{type:"object",properties:{callbacksLast:{type:"boolean"},shorthandFirst:{type:"boolean"},shorthandLast:{type:"boolean"},multiline:{type:"string",enum:["ignore","first","last"],default:"ignore"},ignoreCase:{type:"boolean"},noSortAlphabetically:{type:"boolean"},reservedFirst:{oneOf:[{type:"array",items:{type:"string"}},{type:"boolean"}]},reservedLast:{type:"array",items:{type:"string"}},locale:{type:"string",default:"auto"}},additionalProperties:!1}]},create(e){let t=e.options[0]||{},n=t.ignoreCase||!1,r=t.callbacksLast||!1,i=t.shorthandFirst||!1,s=t.shorthandLast||!1,a=t.multiline||"ignore",o=t.noSortAlphabetically||!1,l=t.reservedFirst||!1,p=function(e,t){if(t&&Array.isArray(t)&&0===t.length)return function(t){e.report({node:t,messageId:"listIsEmpty"})}}(e,l),c=Array.isArray(l)?l:eW,u=t.reservedLast||[],d=t.locale||"auto";return{Program(){eK=new WeakMap},JSXOpeningElement(t){let f=l&&!s$(t)?c.filter(e=>"dangerouslySetInnerHTML"!==e):c;t.attributes.reduce((c,m,h,g)=>{if("JSXSpreadAttribute"===m.type)return g[h+1];let y=sY(c),x=sY(m),T=y.split(":")[0],S=x.split(":")[0],b=c.value,E=m.value,k=aL(y),w=aL(x);if(n&&(y=y.toLowerCase(),x=x.toLowerCase()),l){if(p)return p(m),c;let n=aN(y,f),r=aN(x,f);if(n>-1&&-1===r)return m;if(!0!==l&&n>r||-1===n&&r>-1)return aB(m,"listReservedPropsFirst",t,e,f),c;if(n>-1&&r>-1&&r>n&&T!==S)return m}if(u.length>0){let n=aN(y,u),r=aN(x,u);if(-1===n&&r>-1)return m;if(n<r||n>-1&&-1===r)return aB(m,"listReservedPropsLast",t,e,f),c;if(n>-1&&r>-1&&r>n&&T!==S)return m}if(r){if(!k&&w)return m;if(k&&!w)return aB(c,"listCallbacksLast",t,e,f),c}if(i){if(E&&!b)return m;if(!E&&b)return aB(m,"listShorthandFirst",t,e,f),c}if(s){if(!E&&b)return m;if(E&&!b)return aB(c,"listShorthandLast",t,e,f),c}let v=!s_(c),A=!s_(m);if("first"===a){if(v&&!A)return m;if(!v&&A)return aB(m,"listMultilineFirst",t,e,f),c}else if("last"===a){if(!v&&A)return m;if(v&&!A)return aB(c,"listMultilineLast",t,e,f),c}return!o&&(n||"auto"!==d?y.localeCompare(x,"auto"===d?void 0:d)>0:y>x)?(aB(m,"sortPropsByAlpha",t,e,f),c):m},t.attributes[0])}}}})});function aR(e,t,n){let r,i=e.sourceCode;if("selfClosing"in t&&t.selfClosing){let s=i.getLastTokens(t,2);r=!i.isSpaceBetween(s[0],s[1]),"never"===n?r||e.report({node:t,messageId:"selfCloseSlashNoSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.removeRange([s[0].range[1],s[1].range[0]])}):"always"===n&&r&&e.report({node:t,messageId:"selfCloseSlashNeedSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.insertTextBefore(s[1]," ")})}else{let s=i.getFirstTokens(t,2);r=!i.isSpaceBetween(s[0],s[1]),"never"===n?r||e.report({node:t,messageId:"closeSlashNoSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.removeRange([s[0].range[1],s[1].range[0]])}):"always"===n&&r&&e.report({node:t,messageId:"closeSlashNeedSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.insertTextBefore(s[1]," ")})}}function aF(e,t,n){let r=e.sourceCode,i=r.getTokenBefore(t.name);if("allow-multiline"===n&&i.loc.start.line!==t.name.loc.start.line)return;let s=!r.isSpaceBetween(i,t.name);"never"===n||"allow-multiline"===n?s||e.report({node:t,messageId:"afterOpenNoSpace",loc:{start:i.loc.start,end:t.name.loc.start},fix:e=>e.removeRange([i.range[1],t.name.range[0]])}):"always"===n&&s&&e.report({node:t,messageId:"afterOpenNeedSpace",loc:{start:i.loc.start,end:t.name.loc.start},fix:e=>e.insertTextBefore(t.name," ")})}function aM(e,t,n){if(!("selfClosing"in t&&t.selfClosing)){let r=e.sourceCode,i="proportional-always"===n?sC(t):r.getLastTokens(t,2)[0],s=r.getTokenAfter(i);if(!s_(t)&&"proportional-always"===n&&(0,sL.isTokenOnSameLine)(i,s))return void e.report({node:t,messageId:"beforeCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(i.loc.start.line!==s.loc.start.line)return;let a=!r.isSpaceBetween(i,s);"never"!==n||a?"always"===n&&a?e.report({node:t,loc:{start:i.loc.end,end:s.loc.start},messageId:"beforeCloseNeedSpace",fix:e=>e.insertTextBefore(s," ")}):"proportional-always"===n&&"JSXOpeningElement"===t.type&&a!==s_(t)&&e.report({node:t,messageId:"beforeCloseNeedSpace",loc:{start:i.loc.end,end:s.loc.start},fix:e=>e.insertTextBefore(s," ")}):e.report({node:t,messageId:"beforeCloseNoSpace",loc:{start:i.loc.end,end:s.loc.start},fix:e=>e.removeRange([i.range[1],s.range[0]])})}}var aV=nH(()=>{sB(),sM(),eQ=sF({name:"jsx-tag-spacing",meta:{type:"layout",docs:{description:"Enforce whitespace in and around the JSX opening and closing brackets"},fixable:"whitespace",messages:{selfCloseSlashNoSpace:"Whitespace is forbidden between `/` and `>`; write `/>`",selfCloseSlashNeedSpace:"Whitespace is required between `/` and `>`; write `/ >`",closeSlashNoSpace:"Whitespace is forbidden between `<` and `/`; write `</`",closeSlashNeedSpace:"Whitespace is required between `<` and `/`; write `< /`",beforeSelfCloseNoSpace:"A space is forbidden before closing bracket",beforeSelfCloseNeedSpace:"A space is required before closing bracket",beforeSelfCloseNeedNewline:"A newline is required before closing bracket",afterOpenNoSpace:"A space is forbidden after opening bracket",afterOpenNeedSpace:"A space is required after opening bracket",beforeCloseNoSpace:"A space is forbidden before closing bracket",beforeCloseNeedSpace:"Whitespace is required before closing bracket",beforeCloseNeedNewline:"A newline is required before closing bracket"},schema:[{type:"object",properties:{closingSlash:{type:"string",enum:["always","never","allow"]},beforeSelfClosing:{type:"string",enum:["always","proportional-always","never","allow"]},afterOpening:{type:"string",enum:["always","allow-multiline","never","allow"]},beforeClosing:{type:"string",enum:["always","proportional-always","never","allow"]}},default:ez={closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"allow"},additionalProperties:!1}]},create(e){let t=Object.assign({},ez,e.options[0]);return{JSXOpeningElement(n){"allow"!==t.closingSlash&&n.selfClosing&&aR(e,n,t.closingSlash),"allow"!==t.afterOpening&&aF(e,n,t.afterOpening),"allow"!==t.beforeSelfClosing&&n.selfClosing&&function(e,t,n){let r=e.sourceCode,i=sC(t),s=r.getTokenAfter(i);if(!s_(t)&&"proportional-always"===n&&(0,sL.isTokenOnSameLine)(i,s))return e.report({node:t,messageId:"beforeSelfCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(!(0,sL.isTokenOnSameLine)(i,s))return;let a=!r.isSpaceBetween(i,s);("always"===n||"proportional-always"===n)&&a?e.report({node:t,messageId:"beforeSelfCloseNeedSpace",loc:s.loc.start,fix:e=>e.insertTextBefore(s," ")}):"never"!==n||a||e.report({node:t,messageId:"beforeSelfCloseNoSpace",loc:s.loc.start,fix(e){let t=r.getTokenBefore(s);return e.removeRange([t.range[1],s.range[0]])}})}(e,n,t.beforeSelfClosing),"allow"!==t.beforeClosing&&aM(e,n,t.beforeClosing)},JSXClosingElement(n){"allow"!==t.afterOpening&&aF(e,n,t.afterOpening),"allow"!==t.closingSlash&&aR(e,n,t.closingSlash),"allow"!==t.beforeClosing&&aM(e,n,t.beforeClosing)}}}})}),a$=nH(()=>{sB(),sJ(),sM(),eZ={declaration:"parens",assignment:"parens",return:"parens",arrow:"parens",condition:"ignore",logical:"ignore",prop:"ignore",propertyValue:"ignore"},e0=sF({name:"jsx-wrap-multilines",meta:{type:"layout",docs:{description:"Disallow missing parentheses around multiline JSX"},fixable:"code",messages:{missingParens:"Missing parentheses around multilines JSX",parensOnNewLines:"Parentheses around JSX should be on separate lines"},schema:[{type:"object",properties:{declaration:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},assignment:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},return:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},arrow:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},condition:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},logical:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},prop:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},propertyValue:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]}},additionalProperties:!1}]},create(e){function t(t){let n=e.options[0]||{};return t in n?n[t]:eZ[t]}function n(e){let n=t(e);return n&&"ignore"!==n}function r(n,r){if(!n||!sq(n))return;let i=e.sourceCode,s=t(r);if(!0!==s&&"parens"!==s||(0,sL.isParenthesized)(n,e.sourceCode)||s_(n)||e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(${i.getText(n)})`)}),"parens-new-line"===s&&!s_(n))if((0,sL.isParenthesized)(n,e.sourceCode)){let t=function(t){let n=e.sourceCode.getTokenBefore(t);return!!(0,sL.isParenthesized)(t,e.sourceCode)&&!!(0,sL.isTokenOnSameLine)(n,t)}(n),r=function(t){let n=e.sourceCode.getTokenAfter(t);return!!(0,sL.isParenthesized)(t,e.sourceCode)&&!!(0,sL.isTokenOnSameLine)(t,n)}(n);(t||r)&&e.report({node:n,messageId:"parensOnNewLines",fix:e=>{let s=i.getText(n);return t&&(s=`
9
+ ${i}${t}`);return e.replaceTextRange([t.range[0]+r,t.range[1]],s)}}return function(e){return e.replaceTextRange([t.range[0]-t.loc.start.column,t.range[0]],i)}}(n,i),...{}})}function l(n,r=!1,i=!1){let s=e.sourceCode.getText(n,n.loc.start.column+0),a=s.split("\n");s=r?a[a.length-1]:a[0];let o=i?",":"",p=("space"===t?RegExp(`^[ ${o}]+`):RegExp(`^[ ${o}]+`)).exec(s);return p?p[0].length:0}function p(e){return e.parent&&e.parent.parent&&"LogicalExpression"===e.parent.parent.type&&e.parent.parent.right===e.parent&&!a}function c(t){return t.parent&&t.parent.parent&&"ConditionalExpression"===t.parent.parent.type&&t.parent.parent.alternate===t.parent&&"("!==e.sourceCode.getTokenBefore(t).value}function u(t,r,i=!1){let s=l(t,!1,i),a=p(t)&&s-r===n,d=c(t)&&s-r==0;s!==r&&n$(e,t)&&!a&&!d&&o(t,r,s)}function d(t){let r=e.sourceCode,i=r.getTokenBefore(t);if(!i)return;if("JSXText"===i.type||(0,nU.isCommaToken)(i))i="Literal"===(i=r.getNodeByRangeIndex(i.range[0])).type||"JSXText"===i.type?i.parent:i;else if((0,nU.isColonToken)(i)){do i=r.getTokenBefore(i);while("Punctuator"===i.type&&"/"!==i.value);for(i=r.getNodeByRangeIndex(i.range[0]);i.parent&&"ConditionalExpression"!==i.parent.type;)i=i.parent}let s=l(i="JSXExpressionContainer"===i.type?i.expression:i),a=i.loc.start.line===t.loc.start.line||p(t)||c(t)||function(e){if(!e.parent||!e.parent.parent||"ExpressionStatement"!==e.parent.parent.type)return!1;let t=e.parent.parent;return!!(t.parent&&"BlockStatement"===t.parent.type&&t.parent.parent&&"DoExpression"===t.parent.parent.type)&&t.parent.body[0]!==t}(t)?0:n;u(t,s+a)}function f(e){if(!e.parent)return;let t=l(e.parent.openingElement||e.parent.openingFragment);u(e,t)}function m(e){if(!e.parent||"JSXElement"!==e.parent.type&&"JSXFragment"!==e.parent.type)return;let r=l(e.parent);!function(e,n){let r=e.value,i="space"===t?/\n( *)[\t ]*\S/g:/\n(\t*)[\t ]*\S/g,s=Array.from(String(r).matchAll(i),e=>e[1]?e[1].length:0);s.length>0&&!s.every(e=>e===n)&&s.forEach(t=>{o(e,n,t)})}(e,r+n)}return{JSXOpeningElement:d,JSXOpeningFragment:d,JSXClosingElement:f,JSXClosingFragment:f,JSXAttribute:function(t){if(!s||!t.value||"JSXExpressionContainer"!==t.value.type)return;let n=l(t.name),r=e.sourceCode.getLastToken(t.value),i=nV(e,r);if(i.loc.start.line!==r.loc.start.line)return;let a=t.name.loc.start.line===i.loc.start.line?0:n;u(i,a)},JSXExpressionContainer(e){if(!e.parent)return;let t=l(e.parent);u(e,t+n)},Literal:m,JSXText:m,ReturnStatement(t){if(!t.parent||!t.argument||!n0(t.argument))return;let n=t.parent;for(;n&&"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type;)n=n.parent;if(!n||!function(e,t,n=!1,r=!1){let i=e=>{if(!e)return!1;switch(e.type){case"ConditionalExpression":if(n)return i(e.consequent)&&i(e.alternate);return i(e.consequent)||i(e.alternate);case"LogicalExpression":if(n)return i(e.left)&&i(e.right);return i(e.left)||i(e.right);case"SequenceExpression":return i(e.expressions[e.expressions.length-1]);case"JSXElement":case"JSXFragment":return!0;case"Literal":if(!r&&null===e.value)return!0;return!1;case"Identifier":return n0(function(e,t){var n;let r=(n=function(e){let t=e.getScope(),n=t.variables;for(;"global"!==t.type;)n=(t=t.upper).variables.concat(n);return t.childScopes.length&&(n=t.childScopes[0].variables.concat(n),t.childScopes[0].childScopes.length&&(n=t.childScopes[0].childScopes[0].variables.concat(n))),n.reverse(),n}(e),n.find(e=>e.name===t));return r&&r.defs[0]&&r.defs[0].node?"TypeAlias"===r.defs[0].node.type?r.defs[0].node.right:"ImportBinding"===r.defs[0].type?r.defs[0].node:r.defs[0].node.init:null}(t,e.name));default:return!1}},s=!1;return!function(e,t){let n=e.type;"ReturnStatement"===n?t(e.argument,()=>{}):"ArrowFunctionExpression"===n&&e.expression?t(e.body,()=>{}):("FunctionExpression"===n||"FunctionDeclaration"===n||"ArrowFunctionExpression"===n||"MethodDefinition"===n)&&function(e,t){let n=Object.assign({},{fallback:e=>Object.keys(e).filter(e=>"children"===e||"argument"===e)},t);n.keys=Object.assign({},t.keys,{JSXElement:["children"],JSXFragment:["children"]}),ne.traverse(e,n)}(e.body,{enter(e){let n=()=>{this.break()};switch(e.type){case"ReturnStatement":this.skip(),t(e.argument,n);return;case"BlockStatement":case"IfStatement":case"ForStatement":case"WhileStatement":case"SwitchStatement":case"SwitchCase":return;default:this.skip()}}})}(e,(e,t)=>{i(e)&&(s=!0,t())}),s}(t,e,!0))return;let r=l(t),i=l(t,!0);r!==i&&o(t,r,i)}}}}),r0=nz({name:"jsx-max-props-per-line",meta:{type:"layout",docs:{description:"Enforce maximum of props on a single line in JSX"},fixable:"code",messages:{newLine:"Prop `{{prop}}` must be placed on a new line"},schema:[{anyOf:[{type:"object",properties:{maximum:{type:"object",properties:{single:{type:"integer",minimum:1},multi:{type:"integer",minimum:1}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{maximum:{type:"number",minimum:1},when:{type:"string",enum:["always","multiline"]}},additionalProperties:!1}]}]},create(e){let t=e.options[0]||{},n=t.maximum||1,r="number"==typeof n?{single:"multiline"===t.when?1/0:n,multi:n}:{single:n.single||1/0,multi:n.multi||1/0};return{JSXOpeningElement(t){if(!t.attributes.length)return;let n=nY(t);if((n?r.single:r.multi)===1/0)return;let i=[[t.attributes[0]]];t.attributes.reduce((e,t)=>((0,nU.isTokenOnSameLine)(e,t)?i[i.length-1].push(t):i.push([t]),t)),i.forEach(i=>{let s=n&&i[0].loc.start.line===t.loc.start.line?r.single:r.multi;if(i.length>s){var a;let t="JSXSpreadAttribute"===(a=i[s]).type?e.sourceCode.getText(a.argument):a.name.name;e.report({messageId:"newLine",node:i[s],data:{prop:t},fix:function(t,n){let r=e.sourceCode,i=[],s=t[0].range[0],a=t[t.length-1].range[1];for(let e=0;e<t.length;e+=n){let s=t.slice(e,e+n);i.push(s.reduce((e,t)=>""===e?r.getText(t):`${e} ${r.getText(t)}`,""))}let o=i.join("\n");return function(e){return e.replaceTextRange([s,a],o)}}(i,s)})}})}}}}),r1=nz({name:"jsx-newline",meta:{type:"layout",docs:{description:"Require or prevent a new line after jsx elements and expressions."},fixable:"code",messages:{require:"JSX element should start in a new line",prevent:"JSX element should not start in a new line",allowMultilines:"Multiline JSX elements should start in a new line"},schema:[{type:"object",properties:{prevent:{default:!1,type:"boolean"},allowMultilines:{default:!1,type:"boolean"}},additionalProperties:!1,if:{properties:{allowMultilines:{const:!0}}},then:{properties:{prevent:{const:!0}},required:["prevent"]}}]},create(e){let t=new Set,n=e.sourceCode;function r(e){let t=n.getText(e);return/^\s*\{\/\*/.test(t)}function i(e){return!r(e)&&("JSXElement"===e.type||"JSXExpressionContainer"===e.type)}return{"Program:exit":function(){t.forEach(t=>{t.children.forEach((t,s,a)=>{if("JSXElement"===t.type||"JSXExpressionContainer"===t.type){let o=e.options[0]||{},l=o.prevent||!1,p=o.allowMultilines||!1,c=a[s+1],u=a[s+2];if(!(c&&u&&("Literal"===c.type||"JSXText"===c.type)))return;let d=!/\n\s*\n/.test(c.value);if(r(t))return;let f=a.slice(s+2).find(i);if(p&&(!nY(t)||f&&!nY(f))){if(!d)return;let t=/(\n)(?!.*\1)/g;e.report({messageId:"allowMultilines",node:u,fix:e=>e.replaceText(c,n.getText(c).replace(t,"\n\n"))});return}if(d===l)return;let m=l?/(\n\n)(?!.*\1)/g:/(\n)(?!.*\1)/g,h=l?"\n":"\n\n";e.report({messageId:l?"prevent":"require",node:u,fix:e=>e.replaceText(c,n.getText(c).replace(m,h))})}})})},":matches(JSXElement, JSXFragment) > :matches(JSXElement, JSXExpressionContainer)":e=>{t.add(e.parent)}}}});const r2={allow:"none"};var r3=nz({name:"jsx-one-expression-per-line",meta:{type:"layout",docs:{description:"Require one JSX element per line"},fixable:"whitespace",messages:{moveToNewLine:"`{{descriptor}}` must be placed on a new line"},schema:[{type:"object",properties:{allow:{type:"string",enum:["none","literal","single-child","single-line","non-jsx"]}},default:r2,additionalProperties:!1}]},create(e){let t=Object.assign({},r2,e.options[0]);function n(t,n){e.report({messageId:"moveToNewLine",node:t,data:{descriptor:"openingElement"in t&&t.openingElement&&"name"in t.openingElement.name?String(t.openingElement.name.name):e.sourceCode.getText(t).replace(/\n/g,"")},fix:n})}function r(r){let i=r.children;if(!i||!i.length||"non-jsx"===t.allow&&!i.some(e=>"JSXFragment"===e.type||"JSXElement"===e.type))return;let s="JSXFragment"===r.type,a=s?r.openingFragment:r.openingElement,o=s?r.closingFragment:r.closingElement,l=a.loc.start.line,p=a.loc.end.line,c=o.loc.start.line,u=o.loc.end.line;if(1===i.length){let e=i[0];if(l===p&&p===c&&c===u&&u===e.loc.start.line&&e.loc.start.line===e.loc.end.line&&("single-child"===t.allow||"literal"===t.allow&&("Literal"===e.type||"JSXText"===e.type)||"single-line"===t.allow))return}if("single-line"===t.allow){let e=i[0],t=i[i.length-1],n=t.loc.end.line-e.loc.start.line,r=0;if(("Literal"===e.type||"JSXText"===e.type)&&/^\s*?\n/.test(e.raw)&&(r+=1),("Literal"===t.type||"JSXText"===t.type)&&/\n\s*$/.test(t.raw)&&(r+=1),0===n&&0===r||2===n&&2===r)return}let d={},f={};i.forEach(e=>{let t=0,n=0;if("Literal"===e.type||"JSXText"===e.type){if(nM(e.raw))return;t=(e.raw.match(/^\s*\n/g)||[]).length,n=(e.raw.match(/\n\s*$/g)||[]).length}let r=e.loc.start.line+t,i=e.loc.end.line-n;r===i?(d[r]||(d[r]=[]),d[r].push(e)):(d[r]||(d[r]=[]),d[r].push(e),d[i]||(d[i]=[]),d[i].push(e))});let m=Object.keys(d);if(1===m.length&&"single-line"===t.allow){let e=parseInt(m[0]),t=d[e],r=t[0];e===p&&n(r,e=>e.insertTextBefore(r,"\n"));let i=t.at(-1);e===c&&n(i,e=>e.insertTextAfter(i,"\n"))}else m.forEach(t=>{let n=parseInt(t,10),r=d[n].length-1;d[n].forEach((t,i)=>{let s,l;if(0===i?n===p&&(s=a):s=d[n][i-1],i===r&&n===c&&(l=o),!s&&!l)return;let u=e.sourceCode.getText(t),m=!!(s&&(()=>{let n=e.sourceCode.getTokensBetween(s,t)[0];return("Literal"===s.type||"JSXText"===s.type)&&s.raw.endsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.startsWith(" ")||nM(n?.value)})()),h=!!(l&&(()=>{let n=e.sourceCode.getTokensBetween(t,l)[0];return("Literal"===l.type||"JSXText"===l.type)&&l.raw.startsWith(" ")||("Literal"===t.type||"JSXText"===t.type)&&t.raw.endsWith(" ")||nM(n?.value)})()),g=!!s,y=!!l,x=`${t.loc.start.line},${t.loc.start.column}`;f[x]||(f[x]={node:t,source:u}),m&&(f[x].leadingSpace=!0),g&&(f[x].leadingNewLine=!0),y&&(f[x].trailingNewLine=!0),h&&(f[x].trailingSpace=!0)})}),Object.keys(f).forEach(e=>{let t=f[e],r=t.node,i=t.source.replace(/(^ +| +$)/g,""),s=t.leadingSpace?"\n{' '}":"",a=t.trailingSpace?"{' '}\n":"",o=t.leadingNewLine?"\n":"",l=t.trailingNewLine?"\n":"",p=`${s}${o}${i}${l}${a}`;n(r,e=>e.replaceText(r,p))})}return{JSXElement:r,JSXFragment:r}}}),r6={};function r4(){if(h)return m;h=1;let e="[^\\\\/]",t="[^/]",n="(?:\\/|$)",r="(?:^|\\/)",i=`\\.{1,2}${n}`,s=`(?!${r}${i})`,a=`(?!\\.{0,1}${n})`,o=`(?!${i})`,l=`${t}*?`,p={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:t,END_ANCHOR:n,DOTS_SLASH:i,NO_DOT:"(?!\\.)",NO_DOTS:s,NO_DOT_SLASH:a,NO_DOTS_SLASH:o,QMARK_NO_DOT:"[^.\\/]",STAR:l,START_ANCHOR:r,SEP:"/"},c={...p,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};return m={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:p}}function r5(){if(g)return r6;g=1;let{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:r}=r4();return r6.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r6.hasRegexChars=e=>n.test(e),r6.isRegexChar=e=>1===e.length&&r6.hasRegexChars(e),r6.escapeRegex=e=>e.replace(r,"\\$1"),r6.toPosixSlashes=t=>t.replace(e,"/"),r6.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return"undefined"!=typeof process&&!!process.platform&&"win32"===process.platform},r6.removeBackslashes=e=>e.replace(t,e=>"\\"===e?"":e),r6.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return -1===r?e:"\\"===e[r-1]?r6.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`},r6.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},r6.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},r6.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r},r6}var r9=j(function(){if(w)return k;w=1;let e=function(){if(E)return b;E=1;let e=function(){if(x)return y;x=1;let e=r5(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:u,CHAR_QUESTION_MARK:d,CHAR_RIGHT_CURLY_BRACE:f,CHAR_RIGHT_PARENTHESES:m,CHAR_RIGHT_SQUARE_BRACKET:h}=r4(),g=e=>e===o||e===r,T=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return y=(y,x)=>{let S,b,E=x||{},k=y.length-1,w=!0===E.parts||!0===E.scanToEnd,v=[],A=[],C=[],_=y,O=-1,P=0,I=0,N=!1,L=!1,D=!1,B=!1,j=!1,R=!1,F=!1,M=!1,V=!1,$=!1,q=0,Y={value:"",depth:0,isGlob:!1},X=()=>O>=k,J=()=>_.charCodeAt(O+1),U=()=>(S=b,_.charCodeAt(++O));for(;O<k;){let e;if((b=U())===r){F=Y.backslashes=!0,(b=U())===l&&(R=!0);continue}if(!0===R||b===l){for(q++;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,U();continue}if(b===l){q++;continue}if(!0!==R&&b===s&&(b=U())===s||!0!==R&&b===i){if(N=Y.isBrace=!0,D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===f&&0==--q){R=!1,N=Y.isBrace=!0,$=!0;break}}if(!0===w)continue;break}if(b===o){if(v.push(O),A.push(Y),Y={value:"",depth:0,isGlob:!1},!0===$)continue;if(S===s&&O===P+1){P+=2;continue}I=O+1;continue}if(!0!==E.noext&&!0==(b===u||b===n||b===t||b===d||b===a)&&J()===p){if(D=Y.isGlob=!0,B=Y.isExtglob=!0,$=!0,b===a&&O===P&&(V=!0),!0===w){for(;!0!==X()&&(b=U());){if(b===r){F=Y.backslashes=!0,b=U();continue}if(b===m){D=Y.isGlob=!0,$=!0;break}}continue}break}if(b===t){if(S===t&&(j=Y.isGlobstar=!0),D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===d){if(D=Y.isGlob=!0,$=!0,!0===w)continue;break}if(b===c){for(;!0!==X()&&(e=U());){if(e===r){F=Y.backslashes=!0,U();continue}if(e===h){L=Y.isBracket=!0,D=Y.isGlob=!0,$=!0;break}}if(!0===w)continue;break}if(!0!==E.nonegate&&b===a&&O===P){M=Y.negated=!0,P++;continue}if(!0!==E.noparen&&b===p){if(D=Y.isGlob=!0,!0===w){for(;!0!==X()&&(b=U());){if(b===p){F=Y.backslashes=!0,b=U();continue}if(b===m){$=!0;break}}continue}break}if(!0===D){if($=!0,!0===w)continue;break}}!0===E.noext&&(B=!1,D=!1);let W=_,K="",H="";P>0&&(K=_.slice(0,P),_=_.slice(P),I-=P),W&&!0===D&&I>0?(W=_.slice(0,I),H=_.slice(I)):!0===D?(W="",H=_):W=_,W&&""!==W&&"/"!==W&&W!==_&&g(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===E.unescape&&(H&&(H=e.removeBackslashes(H)),W&&!0===F&&(W=e.removeBackslashes(W)));let G={prefix:K,input:y,start:P,base:W,glob:H,isBrace:N,isBracket:L,isGlob:D,isExtglob:B,isGlobstar:j,negated:M,negatedExtglob:V};if(!0===E.tokens&&(G.maxDepth=0,g(b)||A.push(Y),G.tokens=A),!0===E.parts||!0===E.tokens){let e;for(let t=0;t<v.length;t++){let n=e?e+1:P,r=v[t],i=y.slice(n,r);E.tokens&&(0===t&&0!==P?(A[t].isPrefix=!0,A[t].value=K):A[t].value=i,T(A[t]),G.maxDepth+=A[t].depth),(0!==t||""!==i)&&C.push(i),e=r}if(e&&e+1<y.length){let t=y.slice(e+1);C.push(t),E.tokens&&(A[A.length-1].value=t,T(A[A.length-1]),G.maxDepth+=A[A.length-1].depth)}G.slashes=v,G.parts=C}return G}}(),t=function(){if(S)return T;S=1;let e=r4(),t=r5(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:a}=e,o=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,p=(c,u)=>{let d;if("string"!=typeof c)throw TypeError("Expected a string");c=a[c]||c;let f={...u},m="number"==typeof f.maxLength?Math.min(n,f.maxLength):n,h=c.length;if(h>m)throw SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${m}`);let g={type:"bos",value:"",output:f.prepend||""},y=[g],x=f.capture?"":"?:",T=e.globChars(f.windows),S=e.extglobChars(T),{DOT_LITERAL:b,PLUS_LITERAL:E,SLASH_LITERAL:k,ONE_CHAR:w,DOTS_SLASH:v,NO_DOT:A,NO_DOT_SLASH:C,NO_DOTS_SLASH:_,QMARK:O,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:N}=T,L=e=>`(${x}(?:(?!${N}${e.dot?v:b}).)*?)`,D=f.dot?"":A,B=f.dot?O:P,j=!0===f.bash?L(f):I;f.capture&&(j=`(${j})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);let R={input:c,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};h=(c=t.removePrefix(c,R)).length;let F=[],M=[],V=[],$=g,q=()=>R.index===h-1,Y=R.peek=(e=1)=>c[R.index+e],X=R.advance=()=>c[++R.index]||"",J=()=>c.slice(R.index+1),U=(e="",t=0)=>{R.consumed+=e,R.index+=t},W=e=>{R.output+=null!=e.output?e.output:e.value,U(e.value)},K=()=>{let e=1;for(;"!"===Y()&&("("!==Y(2)||"?"===Y(3));)X(),R.start++,e++;return e%2!=0&&(R.negated=!0,R.start++,!0)},H=e=>{R[e]++,V.push(e)},G=e=>{R[e]--,V.pop()},z=e=>{if("globstar"===$.type){let t=R.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||F.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(R.output=R.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=j,R.output+=$.output)}if(F.length&&"paren"!==e.type&&(F[F.length-1].inner+=e.value),(e.value||e.output)&&W(e),$&&"text"===$.type&&"text"===e.type){$.output=($.output||$.value)+e.value,$.value+=e.value;return}e.prev=$,y.push(e),$=e},Q=(e,t)=>{let n={...S[t],conditions:1,inner:""};n.prev=$,n.parens=R.parens,n.output=R.output;let r=(f.capture?"(":"")+n.open;H("parens"),z({type:e,value:t,output:R.output?"":w}),z({type:"paren",extglob:!0,value:X(),output:r}),F.push(n)},Z=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=j;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=L(f)),(r!==j||q()||/^\)+$/.test(J()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=J())&&/^\.[^\\/.]+$/.test(t)){let i=p(t,{...u,fastpaths:!1}).output;n=e.close=`)${i})${r})`}"bos"===e.prev.type&&(R.negatedExtglob=!0)}z({type:"paren",extglob:!0,value:d,output:n}),G("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(s,(t,n,r,i,s,a)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(s?O.repeat(s.length):""):0===a?B+(s?O.repeat(s.length):""):O.repeat(r.length):"."===i?b.repeat(r.length):"*"===i?n?n+i+(s?j:""):j:n?t:`\\${t}`);return(!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===f.contains)?R.output=c:R.output=t.wrapOutput(n,R,u),R}for(;!q();){if("\0"===(d=X()))continue;if("\\"===d){let e=Y();if("/"===e&&!0!==f.bash||"."===e||";"===e)continue;if(!e){z({type:"text",value:d+="\\"});continue}let t=/^\\+/.exec(J()),n=0;if(t&&t[0].length>2&&(n=t[0].length,R.index+=n,n%2!=0&&(d+="\\")),!0===f.unescape?d=X():d+=X(),0===R.brackets){z({type:"text",value:d});continue}}if(R.brackets>0&&("]"!==d||"["===$.value||"[^"===$.value)){if(!1!==f.posix&&":"===d){let e=$.value.slice(1);if(e.includes("[")&&($.posix=!0,e.includes(":"))){let e=$.value.lastIndexOf("["),t=$.value.slice(0,e),n=r[$.value.slice(e+2)];if(n){$.value=t+n,R.backtrack=!0,X(),g.output||1!==y.indexOf($)||(g.output=w);continue}}}("["===d&&":"!==Y()||"-"===d&&"]"===Y())&&(d=`\\${d}`),"]"===d&&("["===$.value||"[^"===$.value)&&(d=`\\${d}`),!0===f.posix&&"!"===d&&"["===$.value&&(d="^"),$.value+=d,W({value:d});continue}if(1===R.quotes&&'"'!==d){d=t.escapeRegex(d),$.value+=d,W({value:d});continue}if('"'===d){R.quotes=+(1!==R.quotes),!0===f.keepQuotes&&z({type:"text",value:d});continue}if("("===d){H("parens"),z({type:"paren",value:d});continue}if(")"===d){if(0===R.parens&&!0===f.strictBrackets)throw SyntaxError(l("opening","("));let e=F[F.length-1];if(e&&R.parens===e.parens+1){Z(F.pop());continue}z({type:"paren",value:d,output:R.parens?")":"\\)"}),G("parens");continue}if("["===d){if(!0!==f.nobracket&&J().includes("]"))H("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw SyntaxError(l("closing","]"));d=`\\${d}`}z({type:"bracket",value:d});continue}if("]"===d){if(!0===f.nobracket||$&&"bracket"===$.type&&1===$.value.length){z({type:"text",value:d,output:`\\${d}`});continue}if(0===R.brackets){if(!0===f.strictBrackets)throw SyntaxError(l("opening","["));z({type:"text",value:d,output:`\\${d}`});continue}G("brackets");let e=$.value.slice(1);if(!0===$.posix||"^"!==e[0]||e.includes("/")||(d=`/${d}`),$.value+=d,W({value:d}),!1===f.literalBrackets||t.hasRegexChars(e))continue;let n=t.escapeRegex($.value);if(R.output=R.output.slice(0,-$.value.length),!0===f.literalBrackets){R.output+=n,$.value=n;continue}$.value=`(${x}${n}|${$.value})`,R.output+=$.value;continue}if("{"===d&&!0!==f.nobrace){H("braces");let e={type:"brace",value:d,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};M.push(e),z(e);continue}if("}"===d){let e=M[M.length-1];if(!0===f.nobrace||!e){z({type:"text",value:d,output:d});continue}let t=")";if(!0===e.dots){let e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=o(n,f),R.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let n=R.output.slice(0,e.outputIndex),r=R.tokens.slice(e.tokensIndex);for(let i of(e.value=e.output="\\{",d=t="\\}",R.output=n,r))R.output+=i.output||i.value}z({type:"brace",value:d,output:t}),G("braces"),M.pop();continue}if("|"===d){F.length>0&&F[F.length-1].conditions++,z({type:"text",value:d});continue}if(","===d){let e=d,t=M[M.length-1];t&&"braces"===V[V.length-1]&&(t.comma=!0,e="|"),z({type:"comma",value:d,output:e});continue}if("/"===d){if("dot"===$.type&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",y.pop(),$=g;continue}z({type:"slash",value:d,output:k});continue}if("."===d){if(R.braces>0&&"dot"===$.type){"."===$.value&&($.output=b);let e=M[M.length-1];$.type="dots",$.output+=d,$.value+=d,e.dots=!0;continue}if(R.braces+R.parens===0&&"bos"!==$.type&&"slash"!==$.type){z({type:"text",value:d,output:b});continue}z({type:"dot",value:d,output:b});continue}if("?"===d){if(!($&&"("===$.value)&&!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){Q("qmark",d);continue}if($&&"paren"===$.type){let e=Y(),t=d;("("!==$.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${d}`),z({type:"text",value:d,output:t});continue}if(!0!==f.dot&&("slash"===$.type||"bos"===$.type)){z({type:"qmark",value:d,output:P});continue}z({type:"qmark",value:d,output:O});continue}if("!"===d){if(!0!==f.noextglob&&"("===Y()&&("?"!==Y(2)||!/[!=<:]/.test(Y(3)))){Q("negate",d);continue}if(!0!==f.nonegate&&0===R.index){K();continue}}if("+"===d){if(!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){Q("plus",d);continue}if($&&"("===$.value||!1===f.regex){z({type:"plus",value:d,output:E});continue}if($&&("bracket"===$.type||"paren"===$.type||"brace"===$.type)||R.parens>0){z({type:"plus",value:d});continue}z({type:"plus",value:E});continue}if("@"===d){if(!0!==f.noextglob&&"("===Y()&&"?"!==Y(2)){z({type:"at",extglob:!0,value:d,output:""});continue}z({type:"text",value:d});continue}if("*"!==d){("$"===d||"^"===d)&&(d=`\\${d}`);let e=i.exec(J());e&&(d+=e[0],R.index+=e[0].length),z({type:"text",value:d});continue}if($&&("globstar"===$.type||!0===$.star)){$.type="star",$.star=!0,$.value+=d,$.output=j,R.backtrack=!0,R.globstar=!0,U(d);continue}let e=J();if(!0!==f.noextglob&&/^\([^?]/.test(e)){Q("star",d);continue}if("star"===$.type){if(!0===f.noglobstar){U(d);continue}let t=$.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){z({type:"star",value:d,output:""});continue}let s=R.braces>0&&("comma"===t.type||"brace"===t.type),a=F.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!s&&!a){z({type:"star",value:d,output:""});continue}for(;"/**"===e.slice(0,3);){let t=c[R.index+4];if(t&&"/"!==t)break;e=e.slice(3),U("/**",3)}if("bos"===t.type&&q()){$.type="globstar",$.value+=d,$.output=L(f),R.output=$.output,R.globstar=!0,U(d);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&q()){R.output=R.output.slice(0,-(t.output+$.output).length),t.output=`(?:${t.output}`,$.type="globstar",$.output=L(f)+(f.strictSlashes?")":"|$)"),$.value+=d,R.globstar=!0,R.output+=t.output+$.output,U(d);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){let n=void 0!==e[1]?"|$":"";R.output=R.output.slice(0,-(t.output+$.output).length),t.output=`(?:${t.output}`,$.type="globstar",$.output=`${L(f)}${k}|${k}${n})`,$.value+=d,R.output+=t.output+$.output,R.globstar=!0,U(d+X()),z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){$.type="globstar",$.value+=d,$.output=`(?:^|${k}|${L(f)}${k})`,R.output=$.output,R.globstar=!0,U(d+X()),z({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-$.output.length),$.type="globstar",$.output=L(f),$.value+=d,R.output+=$.output,R.globstar=!0,U(d);continue}let n={type:"star",value:d,output:j};if(!0===f.bash){n.output=".*?",("bos"===$.type||"slash"===$.type)&&(n.output=D+n.output),z(n);continue}if($&&("bracket"===$.type||"paren"===$.type)&&!0===f.regex){n.output=d,z(n);continue}(R.index===R.start||"slash"===$.type||"dot"===$.type)&&("dot"===$.type?(R.output+=C,$.output+=C):!0===f.dot?(R.output+=_,$.output+=_):(R.output+=D,$.output+=D),"*"!==Y()&&(R.output+=w,$.output+=w)),z(n)}for(;R.brackets>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing","]"));R.output=t.escapeLast(R.output,"["),G("brackets")}for(;R.parens>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing",")"));R.output=t.escapeLast(R.output,"("),G("parens")}for(;R.braces>0;){if(!0===f.strictBrackets)throw SyntaxError(l("closing","}"));R.output=t.escapeLast(R.output,"{"),G("braces")}if(!0!==f.strictSlashes&&("star"===$.type||"bracket"===$.type)&&z({type:"maybe_slash",value:"",output:`${k}?`}),!0===R.backtrack)for(let e of(R.output="",R.tokens))R.output+=null!=e.output?e.output:e.value,e.suffix&&(R.output+=e.suffix);return R};return p.fastpaths=(r,i)=>{let s={...i},o="number"==typeof s.maxLength?Math.min(n,s.maxLength):n,l=r.length;if(l>o)throw SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${o}`);r=a[r]||r;let{DOT_LITERAL:p,SLASH_LITERAL:c,ONE_CHAR:u,DOTS_SLASH:d,NO_DOT:f,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:y}=e.globChars(s.windows),x=s.dot?m:f,T=s.dot?h:f,S=s.capture?"":"?:",b=!0===s.bash?".*?":g;s.capture&&(b=`(${b})`);let E=e=>!0===e.noglobstar?b:`(${S}(?:(?!${y}${e.dot?d:p}).)*?)`,k=e=>{switch(e){case"*":return`${x}${u}${b}`;case".*":return`${p}${u}${b}`;case"*.*":return`${x}${b}${p}${u}${b}`;case"*/*":return`${x}${b}${c}${u}${T}${b}`;case"**":return x+E(s);case"**/*":return`(?:${x}${E(s)}${c})?${T}${u}${b}`;case"**/*.*":return`(?:${x}${E(s)}${c})?${T}${b}${p}${u}${b}`;case"**/.*":return`(?:${x}${E(s)}${c})?${p}${u}${b}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=k(t[1]);if(!n)return;return n+p+t[2]}}},w=k(t.removePrefix(r,{negated:!1,prefix:""}));return w&&!0!==s.strictSlashes&&(w+=`${c}?`),w},T=p}(),n=r5(),r=r4(),i=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>i(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!r)throw TypeError("Expected pattern to be a non-empty string");let s=t||{},a=s.windows,o=r?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=o.state;delete o.state;let p=()=>!1;if(s.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};p=i(s.ignore,e,n)}let c=(n,r=!1)=>{let{isMatch:c,match:u,output:d}=i.test(n,o,t,{glob:e,posix:a}),f={glob:e,state:l,regex:o,posix:a,input:n,output:d,match:u,isMatch:c};return("function"==typeof s.onResult&&s.onResult(f),!1===c)?(f.isMatch=!1,!!r&&f):p(n)?("function"==typeof s.onIgnore&&s.onIgnore(f),f.isMatch=!1,!!r&&f):("function"==typeof s.onMatch&&s.onMatch(f),!r||f)};return n&&(c.state=l),c};return i.test=(e,t,r,{glob:s,posix:a}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let o=r||{},l=o.format||(a?n.toPosixSlashes:null),p=e===s,c=p&&l?l(e):e;return!1===p&&(p=(c=l?l(e):e)===s),(!1===p||!0===o.capture)&&(p=!0===o.matchBase||!0===o.basename?i.matchBase(e,t,r,a):t.exec(c)),{isMatch:!!p,match:p,output:c}},i.matchBase=(e,t,r)=>(t instanceof RegExp?t:i.makeRe(t,r)).test(n.basename(e)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;let s=t||{},a=s.contains?"":"^",o=s.contains?"":"$",l=`${a}(?:${e.output})${o}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let p=i.toRegex(l,t);return!0===r&&(p.state=e),p},i.makeRe=(e,n={},r=!1,s=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return!1!==n.fastpaths&&("."===e[0]||"*"===e[0])&&(a.output=t.fastpaths(e,n)),a.output||(a=t(e,n)),i.compileRe(a,n,r,s)},i.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=r,b=i}(),t=r5();function n(r,i,s=!1){return i&&(null===i.windows||void 0===i.windows)&&(i={...i,windows:t.isWindows()}),e(r,i,s)}return Object.assign(n,e),k=n}());function r8(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function r7(e){let t=e.toUpperCase();return e===t&&t!==e.toLowerCase()}var ie=nz({name:"jsx-pascal-case",meta:{type:"suggestion",docs:{description:"Enforce PascalCase for user-defined JSX components"},messages:{usePascalCase:"Imported JSX component {{name}} must be in PascalCase",usePascalOrSnakeCase:"Imported JSX component {{name}} must be in PascalCase or SCREAMING_SNAKE_CASE"},schema:[{type:"object",properties:{allowAllCaps:{type:"boolean"},allowLeadingUnderscore:{type:"boolean"},allowNamespace:{type:"boolean"},ignore:{items:{type:"string"},type:"array",uniqueItems:!0}},additionalProperties:!1}]},create(e){let{allowAllCaps:t=!1,allowLeadingUnderscore:n=!1,allowNamespace:r=!1,ignore:i=[]}=e.options[0]||{},s=r9(i,{noglobstar:!0});return{JSXOpeningElement(a){if(nZ(a))return;let o=n2(a),l=[o],p=0;o.includes(":")?l=o.split(":"):o.includes(".")&&(l=o.split("."));do{let r=l[p];if(1===r.length)return;let o=s(r)||i.includes(r),c=n&&r.startsWith("_")?r.slice(1):r,u=!(!r7(c.charAt(0))||Array.prototype.some.call(c.slice(1),e=>e.toLowerCase()===e.toUpperCase()&&!r8(e)))&&Array.prototype.some.call(c.slice(1),e=>(function(e){let t=e.toLowerCase();return e===t&&t!==e.toUpperCase()})(e)||r8(e)),d=t&&function(e){let t=e.charAt(0);if(!(r7(t)||r8(t)))return!1;for(let t=1;t<e.length-1;t+=1){let n=e.charAt(t);if(!(r7(n)||r8(n)||"_"===n))return!1}let n=e.charAt(e.length-1);return!!(r7(n)||r8(n))}(c);if(!u&&!d&&!o){let n=t?"usePascalOrSnakeCase":"usePascalCase";e.report({messageId:n,node:a,data:{name:r}});break}p+=1}while(p<l.length&&!r)}}}}),it=nz({name:"jsx-props-no-multi-spaces",meta:{type:"layout",docs:{description:"Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead."},deprecated:{message:"The rule was replaced with a more general rule.",deprecatedSince:"5.0.0",replacedBy:[{rule:{name:"no-multi-spaces",url:"https://eslint.style/rules/no-multi-spaces"}}]},fixable:"code",messages:{noLineGap:"Expected no line gap between “{{prop1}}” and “{{prop2}}”",onlyOneSpace:"Expected only one space between “{{prop1}}” and “{{prop2}}”"},schema:[]},create(e){let t=e.sourceCode;function n(e){switch(e.type){case"JSXSpreadAttribute":return t.getText(e.argument);case"JSXIdentifier":return e.name;case"JSXMemberExpression":return`${n(e.object)}.${e.property.name}`;default:return e.name?e.name.name:`${t.getText(e.object)}.${e.property.name}`}}return{JSXOpeningElement(r){r.attributes.reduce((r,i)=>{var s,a;return function(e,n){let r=[].concat(e,t.getCommentsBefore?t.getCommentsBefore(n):[],n);for(let e=1;e<r.length;e+=1){let t=r[e-1];if(r[e].loc.start.line-t.loc.end.line>=2)return!0}return!1}(s=r,a=i)&&e.report({messageId:"noLineGap",node:a,data:{prop1:n(s),prop2:n(a)}}),s.loc.end.line===a.loc.end.line&&" "!==t.text.slice(s.range[1],a.range[0])&&e.report({node:a,messageId:"onlyOneSpace",data:{prop1:n(s),prop2:n(a)},fix:e=>e.replaceTextRange([s.range[1],a.range[0]]," ")}),i},function(e){let t=e.name;if(void 0!==e.typeArguments&&e.typeArguments?.type==="TSTypeParameterInstantiation"){let n=e.typeArguments;return Object.assign({},e,{range:[t.range[0],n?.range[1]]})}return t}(r))}}}});const ir={"prefer-double":{quote:'"',description:"singlequote",convert:e=>e.replace(/'/gu,'"')},"prefer-single":{quote:"'",description:"doublequote",convert:e=>e.replace(/"/gu,"'")}};var ii=nz({name:"jsx-quotes",meta:{type:"layout",docs:{description:"Enforce the consistent use of either double or single quotes in JSX attributes"},fixable:"whitespace",schema:[{type:"string",enum:["prefer-single","prefer-double"]}],messages:{unexpected:"Unexpected usage of {{description}}."}},create(e){let t=ir[e.options[0]||"prefer-double"];return{JSXAttribute(n){let r=n.value;r&&n_(r)&&!(r.value.includes(t.quote)||nP(r.raw,t.quote))&&e.report({node:r,messageId:"unexpected",data:{description:t.description},fix:e=>e.replaceText(r,t.convert(r.raw))})}}}});const is={component:!0,html:!0};var ia=nz({name:"jsx-self-closing-comp",meta:{type:"layout",docs:{description:"Disallow extra closing tags for components without children"},fixable:"code",messages:{notSelfClosing:"Empty components are self-closing"},schema:[{type:"object",properties:{component:{default:is.component,type:"boolean"},html:{default:is.html,type:"boolean"}},additionalProperties:!1}]},create:e=>({JSXOpeningElement(t){(function(t){var n;let r=Object.assign({},is,e.options[0]);return(r.component&&(n=t).name&&("JSXIdentifier"===n.name.type||"JSXMemberExpression"===n.name.type)&&!nZ(n)||r.html&&nZ(t))&&!t.selfClosing&&(0===t.parent.children.length||function(e){let t=e.parent.children;return 1===t.length&&"JSXText"===t[0].type&&t[0].value.includes("\n")&&""===t[0].value.replace(/(?!\xA0)\s/g,"")}(t))})(t)&&e.report({messageId:"notSelfClosing",node:t,fix(e){let n=t.range[1]-1,r=t.parent.closingElement?.range[1]??NaN;return e.replaceTextRange([n,r]," />")}})}})});function io(e){return/^on[A-Z]/.test(e)}const il=["children","dangerouslySetInnerHTML","key","ref"];function ip(e,t){return t.indexOf(e.split(":")[0])}function ic(e){let n=t.get(e);return!!n&&!!n.hasComment}const iu=new WeakMap;function id(e,n,r,i,s){let a=iu.get(e)||[];a.includes(n)||(a.push(n),iu.set(e,a),i.report({node:e.name??"",messageId:n,fix:function(e,n,r){let i=n.sourceCode,s=e.attributes.slice(0),a=n.options[0]||{},o=a.ignoreCase||!1,l=a.callbacksLast||!1,p=a.shorthandFirst||!1,c=a.shorthandLast||!1,u=a.multiline||"ignore",d=a.noSortAlphabetically||!1,f=a.reservedFirst||!1,m={ignoreCase:o,callbacksLast:l,shorthandFirst:p,shorthandLast:c,multiline:u,noSortAlphabetically:d,reservedFirst:f,reservedList:r,reservedLast:a.reservedLast||[],locale:a.locale||"auto"},h=function(e,n){let r=n.sourceCode,i=[],s=0;function a(e){i[s-1].push(e)}for(let n=0;n<e.length;n++){let o=e[n],l=e[n+1],p=o.loc.start.line,c=[];try{c=r.getCommentsAfter(o)}catch{}let u=e[n-1],d="JSXSpreadAttribute"===o.type;if(u&&("JSXSpreadAttribute"!==u.type||d)||(i[(s+=1)-1]=[]),!d)if(0===c.length)t.set(o,{end:o.range[1],hasComment:!1}),a(o);else{let e=c[0],i=e.loc.start.line;if(1===c.length)p+1===i&&l?(t.set(o,{end:l.range[1],hasComment:!0}),a(o),n+=1):p===i&&("Block"===e.type&&l?(t.set(o,{end:l.range[1],hasComment:!0}),n+=1):"Block"===e.type?t.set(o,{end:e.range[1],hasComment:!0}):t.set(o,{end:e.range[1],hasComment:!1}),a(o));else if(c.length>1&&p+1===c[1].loc.start.line&&l){let e=r.getCommentsAfter(l);t.set(o,{end:l.range[1],hasComment:!0}),1===e.length&&l.loc.start.line===e[0].loc.start.line&&t.set(o,{end:e[0].range[1],hasComment:!0}),a(o),n+=1}}}return i}(s,n),g=h.slice(0).map(e=>[...e].sort((e,t)=>(function(e,t,n){let r=n1(e),i=n1(t),s=r.split(":")[0],a=i.split(":")[0],o=ic(e),l=ic(t);if(o&&!l)return 1;if(!o&&l)return -1;if(n.reservedFirst){let e=ip(r,n.reservedList),t=ip(i,n.reservedList);if(e>-1&&-1===t)return -1;if(-1===e&&t>-1)return 1;if(e>-1&&t>-1&&s!==a)return e>t?1:-1}if(n.reservedLast.length>0){let e=ip(r,n.reservedLast),t=ip(i,n.reservedLast);if(e>-1&&-1===t)return 1;if(-1===e&&t>-1)return -1;if(e>-1&&t>-1&&s!==a)return e>t?-1:1}if(n.callbacksLast){let e=io(r),t=io(i);if(e&&!t)return 1;if(!e&&t)return -1}if(n.shorthandFirst||n.shorthandLast){let r=n.shorthandFirst?-1:1;if(!e.value&&t.value)return r;if(e.value&&!t.value)return-r}if("ignore"!==n.multiline){let r="first"===n.multiline?-1:1,i=!nY(e),s=!nY(t);if(i&&!s)return r;if(!i&&s)return-r}if(n.noSortAlphabetically)return 0;let p="auto"===n.locale?void 0:n.locale;return n.ignoreCase?(r=r.toLowerCase(),i=i.toLowerCase(),r.localeCompare(i,p)):r===i?0:"auto"===n.locale?r<i?-1:1:r.localeCompare(i,p)})(e,t,m)));return function(e){let n=[],r=i.getText();h.forEach((e,i)=>{e.forEach((e,s)=>{let a=g[i][s],o=r.slice(a.range[0],t.get(a).end);n.push({range:[e.range[0],t.get(e).end],text:o})})}),n.sort((e,t)=>t.range[0]-e.range[0]);let s=n[0],a=n[n.length-1],o=a?a.range[0]:0,l=s?s.range[1]:-0;return n.forEach(e=>{r=`${r.slice(0,e.range[0])}${e.text}${r.slice(e.range[1])}`}),e.replaceTextRange([o,l],r.slice(o,l))}}(r,i,s)}))}var im=nz({name:"jsx-sort-props",meta:{type:"layout",docs:{description:"Enforce props alphabetical sorting"},fixable:"code",messages:{listIsEmpty:"A customized reserved first list must not be empty",listReservedPropsFirst:"Reserved props must be listed before all other props",listReservedPropsLast:"Reserved props must be listed after all other props",listCallbacksLast:"Callbacks must be listed after all other props",listShorthandFirst:"Shorthand props must be listed before all other props",listShorthandLast:"Shorthand props must be listed after all other props",listMultilineFirst:"Multiline props must be listed before all other props",listMultilineLast:"Multiline props must be listed after all other props",sortPropsByAlpha:"Props should be sorted alphabetically"},schema:[{type:"object",properties:{callbacksLast:{type:"boolean"},shorthandFirst:{type:"boolean"},shorthandLast:{type:"boolean"},multiline:{type:"string",enum:["ignore","first","last"],default:"ignore"},ignoreCase:{type:"boolean"},noSortAlphabetically:{type:"boolean"},reservedFirst:{oneOf:[{type:"array",items:{type:"string"}},{type:"boolean"}]},reservedLast:{type:"array",items:{type:"string"}},locale:{type:"string",default:"auto"}},additionalProperties:!1}]},create(e){let n=e.options[0]||{},r=n.ignoreCase||!1,i=n.callbacksLast||!1,s=n.shorthandFirst||!1,a=n.shorthandLast||!1,o=n.multiline||"ignore",l=n.noSortAlphabetically||!1,p=n.reservedFirst||!1,c=function(e,t){if(t&&Array.isArray(t)&&0===t.length)return function(t){e.report({node:t,messageId:"listIsEmpty"})}}(e,p),u=Array.isArray(p)?p:il,d=n.reservedLast||[],f=n.locale||"auto";return{Program(){t=new WeakMap},JSXOpeningElement(t){let n=p&&!nZ(t)?u.filter(e=>"dangerouslySetInnerHTML"!==e):u;t.attributes.reduce((u,m,h,g)=>{if("JSXSpreadAttribute"===m.type)return g[h+1];let y=n1(u),x=n1(m),T=y.split(":")[0],S=x.split(":")[0],b=u.value,E=m.value,k=io(y),w=io(x);if(r&&(y=y.toLowerCase(),x=x.toLowerCase()),p){if(c)return c(m),u;let r=ip(y,n),i=ip(x,n);if(r>-1&&-1===i)return m;if(!0!==p&&r>i||-1===r&&i>-1)return id(m,"listReservedPropsFirst",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(d.length>0){let r=ip(y,d),i=ip(x,d);if(-1===r&&i>-1)return m;if(r<i||r>-1&&-1===i)return id(m,"listReservedPropsLast",t,e,n),u;if(r>-1&&i>-1&&i>r&&T!==S)return m}if(i){if(!k&&w)return m;if(k&&!w)return id(u,"listCallbacksLast",t,e,n),u}if(s){if(E&&!b)return m;if(!E&&b)return id(m,"listShorthandFirst",t,e,n),u}if(a){if(!E&&b)return m;if(E&&!b)return id(u,"listShorthandLast",t,e,n),u}let v=!nY(u),A=!nY(m);if("first"===o){if(v&&!A)return m;if(!v&&A)return id(m,"listMultilineFirst",t,e,n),u}else if("last"===o){if(!v&&A)return m;if(v&&!A)return id(u,"listMultilineLast",t,e,n),u}return!l&&(r||"auto"!==f?y.localeCompare(x,"auto"===f?void 0:f)>0:y>x)?(id(m,"sortPropsByAlpha",t,e,n),u):m},t.attributes[0])}}}});function ih(e,t,n){let r,i=e.sourceCode;if("selfClosing"in t&&t.selfClosing){let s=i.getLastTokens(t,2);r=!i.isSpaceBetween(s[0],s[1]),"never"===n?r||e.report({node:t,messageId:"selfCloseSlashNoSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.removeRange([s[0].range[1],s[1].range[0]])}):"always"===n&&r&&e.report({node:t,messageId:"selfCloseSlashNeedSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.insertTextBefore(s[1]," ")})}else{let s=i.getFirstTokens(t,2);r=!i.isSpaceBetween(s[0],s[1]),"never"===n?r||e.report({node:t,messageId:"closeSlashNoSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.removeRange([s[0].range[1],s[1].range[0]])}):"always"===n&&r&&e.report({node:t,messageId:"closeSlashNeedSpace",loc:{start:s[0].loc.start,end:s[1].loc.end},fix:e=>e.insertTextBefore(s[1]," ")})}}function ig(e,t,n){let r=e.sourceCode,i=r.getTokenBefore(t.name);if("allow-multiline"===n&&i.loc.start.line!==t.name.loc.start.line)return;let s=!r.isSpaceBetween(i,t.name);"never"===n||"allow-multiline"===n?s||e.report({node:t,messageId:"afterOpenNoSpace",loc:{start:i.loc.start,end:t.name.loc.start},fix:e=>e.removeRange([i.range[1],t.name.range[0]])}):"always"===n&&s&&e.report({node:t,messageId:"afterOpenNeedSpace",loc:{start:i.loc.start,end:t.name.loc.start},fix:e=>e.insertTextBefore(t.name," ")})}function iy(e,t,n){if(!("selfClosing"in t&&t.selfClosing)){let r=e.sourceCode,i="proportional-always"===n?nq(t):r.getLastTokens(t,2)[0],s=r.getTokenAfter(i);if(!nY(t)&&"proportional-always"===n&&(0,nU.isTokenOnSameLine)(i,s))return void e.report({node:t,messageId:"beforeCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(i.loc.start.line!==s.loc.start.line)return;let a=!r.isSpaceBetween(i,s);"never"!==n||a?"always"===n&&a?e.report({node:t,loc:{start:i.loc.end,end:s.loc.start},messageId:"beforeCloseNeedSpace",fix:e=>e.insertTextBefore(s," ")}):"proportional-always"===n&&"JSXOpeningElement"===t.type&&a!==nY(t)&&e.report({node:t,messageId:"beforeCloseNeedSpace",loc:{start:i.loc.end,end:s.loc.start},fix:e=>e.insertTextBefore(s," ")}):e.report({node:t,messageId:"beforeCloseNoSpace",loc:{start:i.loc.end,end:s.loc.start},fix:e=>e.removeRange([i.range[1],s.range[0]])})}}const ix={closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"allow"};var iT=nz({name:"jsx-tag-spacing",meta:{type:"layout",docs:{description:"Enforce whitespace in and around the JSX opening and closing brackets"},fixable:"whitespace",messages:{selfCloseSlashNoSpace:"Whitespace is forbidden between `/` and `>`; write `/>`",selfCloseSlashNeedSpace:"Whitespace is required between `/` and `>`; write `/ >`",closeSlashNoSpace:"Whitespace is forbidden between `<` and `/`; write `</`",closeSlashNeedSpace:"Whitespace is required between `<` and `/`; write `< /`",beforeSelfCloseNoSpace:"A space is forbidden before closing bracket",beforeSelfCloseNeedSpace:"A space is required before closing bracket",beforeSelfCloseNeedNewline:"A newline is required before closing bracket",afterOpenNoSpace:"A space is forbidden after opening bracket",afterOpenNeedSpace:"A space is required after opening bracket",beforeCloseNoSpace:"A space is forbidden before closing bracket",beforeCloseNeedSpace:"Whitespace is required before closing bracket",beforeCloseNeedNewline:"A newline is required before closing bracket"},schema:[{type:"object",properties:{closingSlash:{type:"string",enum:["always","never","allow"]},beforeSelfClosing:{type:"string",enum:["always","proportional-always","never","allow"]},afterOpening:{type:"string",enum:["always","allow-multiline","never","allow"]},beforeClosing:{type:"string",enum:["always","proportional-always","never","allow"]}},default:ix,additionalProperties:!1}]},create(e){let t=Object.assign({},ix,e.options[0]);return{JSXOpeningElement(n){"allow"!==t.closingSlash&&n.selfClosing&&ih(e,n,t.closingSlash),"allow"!==t.afterOpening&&ig(e,n,t.afterOpening),"allow"!==t.beforeSelfClosing&&n.selfClosing&&function(e,t,n){let r=e.sourceCode,i=nq(t),s=r.getTokenAfter(i);if(!nY(t)&&"proportional-always"===n&&(0,nU.isTokenOnSameLine)(i,s))return e.report({node:t,messageId:"beforeSelfCloseNeedNewline",loc:i.loc.end,fix:e=>e.insertTextBefore(s,"\n")});if(!(0,nU.isTokenOnSameLine)(i,s))return;let a=!r.isSpaceBetween(i,s);("always"===n||"proportional-always"===n)&&a?e.report({node:t,messageId:"beforeSelfCloseNeedSpace",loc:s.loc.start,fix:e=>e.insertTextBefore(s," ")}):"never"!==n||a||e.report({node:t,messageId:"beforeSelfCloseNoSpace",loc:s.loc.start,fix(e){let t=r.getTokenBefore(s);return e.removeRange([t.range[1],s.range[0]])}})}(e,n,t.beforeSelfClosing),"allow"!==t.beforeClosing&&iy(e,n,t.beforeClosing)},JSXClosingElement(n){"allow"!==t.afterOpening&&ig(e,n,t.afterOpening),"allow"!==t.closingSlash&&ih(e,n,t.closingSlash),"allow"!==t.beforeClosing&&iy(e,n,t.beforeClosing)}}}});const iS={declaration:"parens",assignment:"parens",return:"parens",arrow:"parens",condition:"ignore",logical:"ignore",prop:"ignore",propertyValue:"ignore"};var ib=nz({name:"jsx-wrap-multilines",meta:{type:"layout",docs:{description:"Disallow missing parentheses around multiline JSX"},fixable:"code",messages:{missingParens:"Missing parentheses around multilines JSX",parensOnNewLines:"Parentheses around JSX should be on separate lines"},schema:[{type:"object",properties:{declaration:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},assignment:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},return:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},arrow:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},condition:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},logical:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},prop:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]},propertyValue:{type:["string","boolean"],enum:[!0,!1,"ignore","parens","parens-new-line"]}},additionalProperties:!1}]},create(e){function t(t){let n=e.options[0]||{};return t in n?n[t]:iS[t]}function n(e){let n=t(e);return n&&"ignore"!==n}function r(n,r){if(!n||!n0(n))return;let i=e.sourceCode,s=t(r);if(!0!==s&&"parens"!==s||(0,nU.isParenthesized)(n,e.sourceCode)||nY(n)||e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(${i.getText(n)})`)}),"parens-new-line"===s&&!nY(n))if((0,nU.isParenthesized)(n,e.sourceCode)){let t=function(t){let n=e.sourceCode.getTokenBefore(t);return!!(0,nU.isParenthesized)(t,e.sourceCode)&&!!(0,nU.isTokenOnSameLine)(n,t)}(n),r=function(t){let n=e.sourceCode.getTokenAfter(t);return!!(0,nU.isParenthesized)(t,e.sourceCode)&&!!(0,nU.isTokenOnSameLine)(t,n)}(n);(t||r)&&e.report({node:n,messageId:"parensOnNewLines",fix:e=>{let s=i.getText(n);return t&&(s=`
10
10
  ${s}`),r&&(s=`${s}
11
11
  `),e.replaceText(n,s)}})}else{let t=i.getTokenBefore(n),r=i.getTokenAfter(n),s=n.loc.start;if(t.loc.end.line<s.line){let a=i.getText().slice(t.range[1],n.range[0]).trim(),o=/^\t/.test(i.lines[s.line-1]),l=o?" ":" ",p=l.repeat(s.column),c=l.repeat(Math.max(0,s.column-(o?1:2)));e.report({node:n,messageId:"missingParens",fix:e=>e.replaceTextRange([t.range[0],r&&(";"===r.value||"}"===r.value)?r.range[0]:n.range[1]],`${function(e){let t="{"===e.value||"["===e.value;return`${e.value.trim()}${t?"":" "}`}(t)}(
12
12
  ${p}${a}${a.length>0?`
13
13
  ${p}`:""}${i.getText(n)}
14
14
  ${c})`)})}else e.report({node:n,messageId:"missingParens",fix:e=>e.replaceText(n,`(
15
15
  ${i.getText(n)}
16
- )`)})}}return{VariableDeclarator(e){let t="declaration";if(n(t)){if(!n("condition")&&e.init&&"ConditionalExpression"===e.init.type){r(e.init.consequent,t),r(e.init.alternate,t);return}r(e.init,t)}},AssignmentExpression(e){let t="assignment";if(n(t)){if(!n("condition")&&"ConditionalExpression"===e.right.type){r(e.right.consequent,t),r(e.right.alternate,t);return}r(e.right,t)}},ReturnStatement(e){let t="return";n(t)&&r(e.argument,t)},"ArrowFunctionExpression:exit":e=>{let t=e.body,i="arrow";n(i)&&"BlockStatement"!==t.type&&r(t,i)},ConditionalExpression(e){let t="condition";n(t)&&(r(e.consequent,t),r(e.alternate,t))},LogicalExpression(e){let t="logical";n(t)&&r(e.right,t)},JSXAttribute(e){let t="prop";n(t)&&e.value&&"JSXExpressionContainer"===e.value.type&&r(e.value.expression,t)},ObjectExpression(e){let t="propertyValue";n(t)&&e.properties.forEach(e=>{"Property"===e.type&&"JSXElement"===e.value.type&&r(e.value,t)})}}}})});function aq(e,t){return e.mode=t.mode||"strict",void 0!==t.beforeColon?e.beforeColon=+t.beforeColon:e.beforeColon=0,void 0!==t.afterColon?e.afterColon=+t.afterColon:e.afterColon=1,void 0!==t.align&&("object"==typeof t.align?e.align=t.align:e.align={on:t.align,mode:e.mode,beforeColon:e.beforeColon,afterColon:e.afterColon}),e}var aY=nH(()=>{sB(),sM(),e1=sF({name:"key-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing between property names and type annotations in types and interfaces"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{align:{anyOf:[{type:"string",enum:["colon","value"]},{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"},ignoredNodes:{type:"array",items:{type:"string",enum:["ObjectExpression","ObjectPattern","ImportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","TSTypeLiteral","TSInterfaceBody","ClassBody"]}}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{align:{anyOf:[{type:"string",enum:["colon","value"]},{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},align:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{extraKey:"Extra space after {{computed}}key '{{key}}'.",extraValue:"Extra space before value for {{computed}}key '{{key}}'.",missingKey:"Missing space after {{computed}}key '{{key}}'.",missingValue:"Missing space before value for {{computed}}key '{{key}}'."}},defaultOptions:[{}],create(e,[t]){var n;let r=t||{},i=(n={},"object"==typeof r.align?(n.align=aq({},r.align),n.align.on=r.align.on||"colon",n.align.mode=r.align.mode||"strict",n.multiLine=aq({},r.multiLine||r),n.singleLine=aq({},r.singleLine||r)):(n.multiLine=aq({},r.multiLine||r),n.singleLine=aq({},r.singleLine||r),n.multiLine.align&&(n.align={on:n.multiLine.align.on,mode:n.multiLine.align.mode||n.multiLine.mode,beforeColon:n.multiLine.align.beforeColon,afterColon:n.multiLine.align.afterColon})),n.ignoredNodes=r.ignoredNodes||[],n),s=i.multiLine,a=i.singleLine,o=i.align||null,l=i.ignoredNodes,p=e.sourceCode;function c(e,t){if("TSImportType"===e.type)return"options"in e&&!!e.options&&s_(e.options);let n=t.getTokenBefore(e.attributes[0],sL.isOpeningBraceToken),r=t.getTokenAfter(e.attributes[e.attributes.length-1],sL.isClosingBraceToken);return(0,sL.isTokenOnSameLine)(r,n)}function u(e){return"ImportAttribute"===e.type||!("method"in e&&e.method||"shorthand"in e&&e.shorthand||"kind"in e&&"init"!==e.kind||"Property"!==e.type)}function d(e){return p.getTokenAfter(e,sL.isColonToken)}function f(e){let t=d(e);return p.getTokenBefore(t)}function m(t,n,r,i,s){let a=r.length-i;if((a&&"strict"===s||a<0&&"minimum"===s||a>0&&!i&&"minimum"===s)&&!(i&&sL.LINEBREAK_MATCHER.test(r))){let r,i=d(t.key),s=p.getTokenBefore(i,{includeComments:!0}),o=p.getTokenAfter(i,{includeComments:!0}),l="key"===n,c=a>0,u=Math.abs(a),f=Array(u+1).join(" "),m=l?s.loc.end:i.loc.start,h=l?i.loc.start:o.loc.start,g=l?s.loc:o.loc;if(c){let e;e=l?[s.range[1],s.range[1]+u]:[o.range[0]-u,o.range[0]],r=function(t){return t.removeRange(e)}}else r=l?function(e){return e.insertTextAfter(s,f)}:function(e){return e.insertTextBefore(o,f)};e.report({node:t[n],loc:c?{start:m,end:h}:g,messageId:c?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",data:{computed:"ImportAttribute"!==t.type&&t.computed?"computed ":"",key:function(e){let t=e.key;return"ImportAttribute"!==e.type&&e.computed?p.getText().slice(t.range[0],t.range[1]):sn(e)}(t)},fix:r})}}function h(e){let t=p.getFirstToken(e),n=f(e.key);return sU(p.getText().slice(t.range[0],n.range[1]))}function g(e){let t=/(\s*):(\s*)/u.exec(p.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function y(e,t){if(l.includes(e.parent.type))return;let n=g(e);n&&(m(e,"key",n.beforeColon,t.beforeColon,t.mode),m(e,"value",n.afterColon,t.afterColon,t.mode))}function x(e,t){let n=e.length;for(let r=0;r<n;r++)y(e[r],t)}function T(e){(1===e.length?[e]:e.reduce((e,t)=>{let n=e.at(-1),r=n.at(-1);return!r||function(e,t){let n=e.loc.start.line,r=(u(t)?function(e){let t=d(e);return p.getTokenAfter(t)}(t.key):t).loc.start.line;if(r-n<=1)return!0;let i=p.getCommentsBefore(t);if(i.length&&i[0].loc.start.line-n<=1&&r-i.at(-1).loc.end.line<=1){for(let e=1;e<i.length;e++)if(i[e].loc.start.line-i[e-1].loc.end.line>1)return!1;return!0}return!1}(r,t)?n.push(t):e.push([t]),e},[[]])).forEach(e=>{let t=e.filter(u);t.length>0&&function(e){let[t]=e,n=e.at(-1);return(0,sL.isTokenOnSameLine)(n,t)}(t)?x(t,s):function(e){let t,n,r,i=e.length,a=e.map(h),l=o.on,p=Math.max(...a);o&&i>1?(t=o.beforeColon,n=o.afterColon):(t=s.beforeColon,n=s.afterColon),r=o.mode,p+="colon"===l?t:n;for(let s=0;s<i;s++){let i=e[s],o=g(i);if(o){let e=a[s];"value"===l?(m(i,"key",o.beforeColon,t,r),m(i,"value",o.afterColon,p-e,r)):(m(i,"key",o.beforeColon,p-e,r),m(i,"value",o.afterColon,n,r))}}}(t)})}function S(e){!l.includes(e.type)&&e.attributes&&e.attributes.length&&(c(e,p)?x(e.attributes,a):T(e.attributes))}function b(e){let t=e.line-1;return sU(p.lines.at(t).slice(0,e.column))}function E(e){return(e.type===ro.AST_NODE_TYPES.TSPropertySignature||e.type===ro.AST_NODE_TYPES.TSIndexSignature||e.type===ro.AST_NODE_TYPES.PropertyDefinition)&&!!e.typeAnnotation}function k(e){return E(e)&&(0,sL.isTokenOnSameLine)(e,e.typeAnnotation)}function w(e){return e.type!==ro.AST_NODE_TYPES.TSIndexSignature?p.getText(e.key):p.getText(e).slice(0,p.getTokenAfter(e.parameters.at(-1),sL.isClosingBracketToken).range[1]-e.range[0])}function v(e){return f(e.type!==ro.AST_NODE_TYPES.TSIndexSignature?e.key:e.parameters.at(-1)).loc.end}function A(t,n,r){let{typeAnnotation:i}=t,s=i.loc.start.column-v(t).column-n;("strict"===r?s:s<0)&&e.report({node:t,messageId:s>0?"extraKey":"missingKey",fix:e=>s>0?e.removeRange([i.range[0]-s,i.range[0]]):e.insertTextBefore(i," ".repeat(-s)),data:{computed:"",key:w(t)}})}function C(t,n,r){let{typeAnnotation:i}=t,s=p.getFirstToken(i),a=p.getTokenAfter(s,{includeComments:!0}).loc.start.column-s.loc.start.column-1-n;("strict"===r?a:a<0)&&e.report({node:t,messageId:a>0?"extraValue":"missingValue",fix:e=>a>0?e.removeRange([s.range[1],s.range[1]+a]):e.insertTextAfter(s," ".repeat(-a)),data:{computed:"",key:w(t)}})}function _(t){if(l.includes(t.type))return;let n=t.type===ro.AST_NODE_TYPES.TSTypeLiteral?t.members:t.body,i=[],s=[];if(r.align||r.multiLine?.align){let e,t=[];for(let r of(i.push(t),n)){let n=t.at(-1);n!==e&&(n=void 0),n&&function(e,t){let n=e.loc.start.line,r=(E(t)?t.typeAnnotation:t).loc.start.line;if(r===n)return!1;if(r-n==1)return!0;let i=p.getCommentsBefore(t);if(i.length&&i[0].loc.start.line-n<=1&&r-i.at(-1).loc.end.line<=1){for(let e=1;e<i.length;e++)if(i[e].loc.start.line-i[e-1].loc.end.line>1)return!1;return!0}return!1}(n,r)?t.push(r):e?.loc.start.line===r.loc.start.line?(n&&(s.push(n),t.pop()),s.push(r)):(t=[r],i.push(t)),e=r}s=s.concat(...i.filter(e=>1===e.length)),i=i.filter(e=>e.length>=2)}else s=n;for(let t of i)!function(t){let n=0,i=("object"==typeof r.align?r.align.on:"object"==typeof r.multiLine?.align?r.multiLine.align.on:r.multiLine?.align??r.align)??"colon",s=+!!("object"==typeof r.align?r.align.beforeColon:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.beforeColon:r.multiLine.beforeColon:r.beforeColon),a=+!!(("object"==typeof r.align?r.align.afterColon:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.afterColon:r.multiLine.afterColon:r.afterColon)??!0),o=("object"==typeof r.align?r.align.mode:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.mode??r.multiLine.mode:r.multiLine.mode:r.mode)??"strict";for(let e of t)if(E(e)){let t=b(v(e));n=Math.max(n,"colon"===i?t+s:t+1+a+s)}for(let r of t){if(!k(r))continue;let{typeAnnotation:t}=r,l="colon"===i?t:t.typeAnnotation,p=b(l.loc.start)-n;p&&e.report({node:r,messageId:p>0?"colon"===i?"extraKey":"extraValue":"colon"===i?"missingKey":"missingValue",fix:e=>p>0?e.removeRange([l.range[0]-p,l.range[0]]):e.insertTextBefore(l," ".repeat(-p)),data:{computed:"",key:w(r)}}),"colon"===i?C(r,a,o):A(r,s,o)}}(t);for(let e of s)!function(e,{singleLine:t}){let n=(t?r.singleLine?r.singleLine.beforeColon:r.beforeColon:r.multiLine?r.multiLine.beforeColon:r.beforeColon)??!1,i=(t?r.singleLine?r.singleLine.afterColon:r.afterColon:r.multiLine?r.multiLine.afterColon:r.afterColon)??!0,s=(t?r.singleLine?r.singleLine.mode:r.mode:r.multiLine?r.multiLine.mode:r.mode)??"strict";k(e)&&(A(e,+!!n,s),C(e,+!!i,s))}(e,{singleLine:s_(t)})}return{...o?{ObjectExpression(e){l.includes(e.type)||(s_(e)?x(e.properties.filter(u),a):T(e.properties))},ImportDeclaration(e){S(e)},ExportNamedDeclaration(e){S(e)},ExportAllDeclaration(e){S(e)}}:{Property(e){y(e,s_(e.parent)?a:s)},ImportAttribute(e){let t=e.parent;y(e,c(t,p)?a:s)}},TSTypeLiteral:_,TSInterfaceBody:_,ClassBody:_}}})}),aX=nH(()=>{sB(),sM(),e2=/^[)\]}>]$/u,e3=/^(?:[([{<~!]|\+\+?|--?)$/u,e6=/^[)\]}>*]$/u,e4=/^[{*]$/u,e5=/\$\{$/u,e9=/^\}/u,e8=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u,te=sF({name:"keyword-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after keywords"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0},overrides:{type:"object",properties:(e7=T.concat(["accessor","as","async","await","from","get","let","of","satisfies","set","using","yield","type"])).reduce((e,t)=>(e[t]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},e),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},defaultOptions:[{}],create(e){let t=e.sourceCode,n=new WeakSet;function r(e){return"Template"===e.type&&e5.test(e.value)}function i(e){return"Template"===e.type&&e9.test(e.value)}function s(i,s){let a=t.getTokenBefore(i);a&&(e8.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,sL.isTokenOnSameLine)(a,i)&&!t.isSpaceBetween(a,i)&&e.report({loc:i.loc,messageId:"expectedBefore",data:i,fix:e=>e.insertTextBefore(i," ")})}function a(i,s){let a=t.getTokenBefore(i);a&&(e8.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,sL.isTokenOnSameLine)(a,i)&&t.isSpaceBetween(a,i)&&e.report({loc:{start:a.loc.end,end:i.loc.start},messageId:"unexpectedBefore",data:i,fix:e=>e.removeRange([a.range[1],i.range[0]])})}function o(r,s){let a=t.getTokenAfter(r);a&&(e8.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,sL.isTokenOnSameLine)(r,a)&&!t.isSpaceBetween(r,a)&&e.report({loc:r.loc,messageId:"expectedAfter",data:r,fix:e=>e.insertTextAfter(r," ")})}function l(r,s){let a=t.getTokenAfter(r);a&&(e8.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,sL.isTokenOnSameLine)(r,a)&&t.isSpaceBetween(r,a)&&e.report({loc:{start:r.loc.end,end:a.loc.start},messageId:"unexpectedAfter",data:r,fix:e=>e.removeRange([r.range[1],a.range[0]])})}let p=function(e={}){let t=!1!==e.before,n=!1!==e.after,r={before:t?s:a,after:n?o:l},i=e&&e.overrides||{},p=Object.create(null);for(let e=0;e<e7.length;++e){let c=e7[e],u=i[c];if(u){let e="before"in u?u.before:t,r="after"in u?u.after:n;p[c]={before:e?s:a,after:r?o:l}}else p[c]=r}return p}(e.options[0]);function c(e,t){p[e.value].before(e,t||e2)}function u(e,t){p[e.value].after(e,t||e3)}function d(e){c(e),u(e)}function f(e){let n=e&&t.getFirstToken(e);if(n){if(!so(n)){if("VariableDeclaration"!==e.type)return;else if("using"!==e.kind&&"await using"!==e.kind||"Identifier"!==n.type)return}d(n)}}function m(e){let n=e&&t.getFirstToken(e);so(n)&&c(n)}function h(e){if(e){let n=t.getTokenBefore(e,so);n&&d(n)}}function g(e){let n=e&&t.getFirstToken(e);n&&(so(n)&&"function"===n.value||"async"===n.value)&&c(n)}function y(e){f(e),h(e.superClass)}function x(e){let n=t.getFirstToken(e);if(c(n,e6),u(n,e4),"ExportDefaultDeclaration"===e.type&&d(t.getTokenAfter(n)),"ExportAllDeclaration"===e.type&&e.exported){let n=t.getTokenBefore(e.exported);c(n,e6),u(n,e4)}if("source"in e&&e.source){let n=t.getTokenBefore(e.source);if(c(n,e6),u(n,e4),e.attributes){let n=t.getTokenAfter(e.source);so(n)&&d(n)}}"ExportDefaultDeclaration"!==e.type&&function(e){let n;switch(e.type){case ro.AST_NODE_TYPES.ImportDeclaration:n=e.importKind;break;case ro.AST_NODE_TYPES.ExportAllDeclaration:case ro.AST_NODE_TYPES.ExportNamedDeclaration:n=e.exportKind}if("type"!==n)return;let r=t.getFirstToken(e,{skip:1});(0,sL.isTypeKeyword)(r)&&(c(r,e6),u(r,e4))}(e)}function T(e){if("static"in e&&e.static&&f(e),"get"===e.kind||"set"===e.kind||("method"in e&&e.method||"MethodDefinition"===e.type)&&"async"in e.value&&e.value.async||e.type===ro.AST_NODE_TYPES.AccessorProperty){let n=t.getTokenBefore(e.key,e=>{switch(e.value){case"get":case"set":case"async":case"accessor":return!0;default:return!1}});if(!n)throw Error("Failed to find token get, set, or async beside method name");d(n)}}return{DebuggerStatement:f,WithStatement:f,BreakStatement:f,ContinueStatement:f,ReturnStatement:f,ThrowStatement:f,TryStatement(e){f(e),e.handler&&(e.handler.param?m(e.handler):f(e.handler)),h(e.finalizer)},IfStatement(e){f(e),h(e.alternate)},SwitchStatement:f,SwitchCase:f,DoWhileStatement(e){f(e),h(e.test)},ForInStatement(e){f(e);let n=t.getTokenBefore(e.right,sL.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForOfStatement(e){e.await?(c(t.getFirstToken(e,0)),u(t.getFirstToken(e,1))):f(e);let n=t.getTokenBefore(e.right,sL.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForStatement:f,WhileStatement:f,ClassDeclaration:y,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,FunctionDeclaration:g,ImportDeclaration:x,VariableDeclaration:f,ArrowFunctionExpression:g,AwaitExpression(e){c(t.getFirstToken(e))},ClassExpression:y,FunctionExpression:g,NewExpression:m,Super:m,ThisExpression:m,UnaryExpression:m,YieldExpression:m,ImportSpecifier(e){e.imported.range[0]!==e.local.range[0]&&c(t.getTokenBefore(e.local),e6)},ExportSpecifier(e){if(e.local.range[0]!==e.exported.range[0]){let n=t.getTokenBefore(e.exported);c(n,e6),u(n,e4)}},ImportNamespaceSpecifier(e){c(t.getFirstToken(e,1),e6)},MethodDefinition:T,PropertyDefinition:T,AccessorProperty:T,StaticBlock:f,Property:T,BinaryExpression(e){if(">"!==e.operator)return;let r=t.getTokenBefore(e.right,sL.isNotOpeningParenToken);n.add(r)},TSAsExpression(e){d(sK(t.getTokenAfter(e.expression,e=>"as"===e.value),sW("as",e.type)))},TSSatisfiesExpression(e){d(sK(t.getTokenAfter(e.expression,e=>"satisfies"===e.value),sW("satisfies",e.type)))}}}})}),aJ=nH(()=>{sB(),sM(),tt=sF({name:"line-comment-position",meta:{type:"layout",docs:{description:"Enforce position of line comments"},schema:[{oneOf:[{type:"string",enum:["above","beside"]},{type:"object",properties:{position:{type:"string",enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(e){let t,n,r,i=e.options[0],s=!0;i&&"string"!=typeof i?(t=!i.position||"above"===i.position,r=RegExp(n=i.ignorePattern,"u"),s=Object.hasOwn(i,"applyDefaultIgnorePatterns")?i.applyDefaultIgnorePatterns:!1!==i.applyDefaultPatterns,void 0!==i.applyDefaultPatterns&&i9('option("applyDefaultPatterns")','"applyDefaultIgnorePatterns"',"line-comment-position")):t=!i||"above"===i;let a=f,o=/^\s*falls?\s?through/u,l=e.sourceCode;return{Program(){l.getAllComments().forEach(i=>{if("Line"!==i.type||s&&(a.test(i.value)||o.test(i.value))||n&&r.test(i.value))return;let p=l.getTokenBefore(i,{includeComments:!0}),c=p&&(0,sL.isTokenOnSameLine)(p,i);t?c&&e.report({node:i,messageId:"above"}):c||e.report({node:i,messageId:"beside"})})}}}})}),aU=nH(()=>{sB(),sM(),tn=sF({name:"linebreak-style",meta:{type:"layout",docs:{description:"Enforce consistent linebreak style"},fixable:"whitespace",schema:[{type:"string",enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(e){let t=e.sourceCode;return{Program:function(n){let r,i="unix"===(e.options[0]||"unix"),s=i?"\n":"\r\n",a=t.getText(),o=i8(),l=0;for(;null!==(r=o.exec(a));){if(l++,r[0]===s)continue;let a=r.index,o=[a,a+r[0].length];e.report({node:n,loc:{start:{line:l,column:t.lines[l-1].length},end:{line:l+1,column:0}},messageId:i?"expectedLF":"expectedCRLF",fix:e=>e.replaceTextRange(o,s)})}}}}})}),aW=nH(()=>{sB(),sM(),tr=sF({name:"lines-around-comment",meta:{type:"layout",docs:{description:"Require empty lines around comments"},schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},allowInterfaceStart:{type:"boolean"},allowInterfaceEnd:{type:"boolean"},allowTypeStart:{type:"boolean"},allowTypeEnd:{type:"boolean"},allowEnumStart:{type:"boolean"},allowEnumEnd:{type:"boolean"},allowModuleStart:{type:"boolean"},allowModuleEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace",messages:{after:"Expected line after comment.",before:"Expected line before comment."}},defaultOptions:[{beforeBlockComment:!0}],create(e,[t]){let n=f,r=RegExp(t.ignorePattern??"","u"),i=e.sourceCode,s=i.getAllComments(),a=i.lines,o=a.length+1,l=function(e){let t=[];return e.forEach(e=>{let n=e.loc.start.line,r=e.loc.end.line;t.push(n,r)}),t}(s),p=function(e){let t=[];return e.forEach((e,n)=>{e.trim()||t.push(n+1)}),t}(a),c=new Set(l.concat(p));function u(e){let t=i.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){let n=i.getFirstToken(t,{skip:1});return n&&e.range[0]>=n.range[0]?t:null}return t}function d(e,t){let n=u(e);if(n&&n.type===t){let t=n;return"StaticBlock"===n.type?t=i.getFirstToken(n,{skip:1}):"SwitchStatement"===n.type&&(t=i.getTokenAfter(n.discriminant,{filter:sL.isOpeningBraceToken})),!!t&&e.loc.start.line-t.loc.start.line==1}return!1}function m(e,t){let n=u(e);return!!n&&n.type===t&&n.loc.end.line-e.loc.end.line==1}function h(e){return d(e,ro.AST_NODE_TYPES.ClassBody)}function g(e){return m(e,ro.AST_NODE_TYPES.ClassBody)}function y(s,{before:a,after:l}){if(!1!==t.applyDefaultIgnorePatterns&&n.test(s.value)||t.ignorePattern&&r.test(s.value))return;let p=s.loc.start.line-1,u=s.loc.end.line+1;if(p<1&&(a=!1),u>=o&&(l=!1),function(e){let t=e;do t=i.getTokenBefore(t,{includeComments:!0});while(t&&(0,sL.isCommentToken)(t));if(t&&(0,sL.isTokenOnSameLine)(t,e))return!0;t=e;do t=i.getTokenAfter(t,{includeComments:!0});while(t&&(0,sL.isCommentToken)(t));return!!(t&&(0,sL.isTokenOnSameLine)(e,t))}(s))return;let f=!!t.allowBlockStart&&(d(s,ro.AST_NODE_TYPES.ClassBody)||d(s,ro.AST_NODE_TYPES.BlockStatement)||d(s,ro.AST_NODE_TYPES.StaticBlock)||d(s,ro.AST_NODE_TYPES.SwitchCase)||d(s,ro.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassStart&&h(s)),y=!!t.allowBlockEnd&&(m(s,ro.AST_NODE_TYPES.ClassBody)||m(s,ro.AST_NODE_TYPES.BlockStatement)||m(s,ro.AST_NODE_TYPES.StaticBlock)||m(s,ro.AST_NODE_TYPES.SwitchCase)||m(s,ro.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassEnd&&g(s)),x=!!t.allowClassStart&&h(s),T=!!t.allowClassEnd&&g(s),S=!!t.allowObjectStart&&(d(s,ro.AST_NODE_TYPES.ObjectExpression)||d(s,ro.AST_NODE_TYPES.ObjectPattern)),b=!!t.allowObjectEnd&&(m(s,ro.AST_NODE_TYPES.ObjectExpression)||m(s,ro.AST_NODE_TYPES.ObjectPattern)),E=!!t.allowArrayStart&&(d(s,ro.AST_NODE_TYPES.ArrayExpression)||d(s,ro.AST_NODE_TYPES.ArrayPattern)),k=!!t.allowArrayEnd&&(m(s,ro.AST_NODE_TYPES.ArrayExpression)||m(s,ro.AST_NODE_TYPES.ArrayPattern)),w=!!t.allowInterfaceStart&&d(s,ro.AST_NODE_TYPES.TSInterfaceBody),v=!!t.allowInterfaceEnd&&m(s,ro.AST_NODE_TYPES.TSInterfaceBody),A=!!t.allowTypeStart&&d(s,ro.AST_NODE_TYPES.TSTypeLiteral),C=!!t.allowTypeEnd&&m(s,ro.AST_NODE_TYPES.TSTypeLiteral),_=!!t.allowEnumStart&&(d(s,ro.AST_NODE_TYPES.TSEnumBody)||d(s,ro.AST_NODE_TYPES.TSEnumDeclaration)),O=!!t.allowEnumEnd&&(m(s,ro.AST_NODE_TYPES.TSEnumBody)||m(s,ro.AST_NODE_TYPES.TSEnumDeclaration)),P=!!t.allowModuleStart&&d(s,ro.AST_NODE_TYPES.TSModuleBlock),I=!!t.allowModuleEnd&&m(s,ro.AST_NODE_TYPES.TSModuleBlock),L=f||x||S||E||w||A||_||P,N=y||T||b||k||v||C||O||I,D=i.getTokenBefore(s,{includeComments:!0}),B=i.getTokenAfter(s,{includeComments:!0});if(!L&&a&&!c.has(p)&&!((0,sL.isCommentToken)(D)&&(0,sL.isTokenOnSameLine)(D,s))){let t=s.range[0]-s.loc.start.column,n=[t,t];e.report({node:s,messageId:"before",fix:e=>e.insertTextBeforeRange(n,"\n")})}N||!l||c.has(u)||(0,sL.isCommentToken)(B)&&(0,sL.isTokenOnSameLine)(s,B)||e.report({node:s,messageId:"after",fix:e=>e.insertTextAfter(s,"\n")})}return{Program(){s.forEach(e=>{e.type===ro.AST_TOKEN_TYPES.Line?(t.beforeLineComment||t.afterLineComment)&&y(e,{after:t.afterLineComment,before:t.beforeLineComment}):e.type===ro.AST_TOKEN_TYPES.Block?(t.beforeBlockComment||t.afterBlockComment)&&y(e,{after:t.afterBlockComment,before:t.beforeBlockComment}):sl(e)&&t.afterHashbangComment&&y(e,{after:t.afterHashbangComment,before:!1})})}}}})}),aK=nH(()=>{sB(),sM(),ti={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}},ts=sF({name:"lines-between-class-members",meta:{type:"layout",docs:{description:"Require or disallow an empty line between class members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{type:"string",enum:["always","never"]},prev:{type:"string",enum:["method","field","*"]},next:{type:"string",enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{type:"string",enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1},exceptAfterOverload:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},defaultOptions:["always",{exceptAfterOverload:!0,exceptAfterSingleLine:!1}],create(e,[t,n]){let r=[];r[0]=e.options[0]||"always",r[1]=e.options[1]||{exceptAfterSingleLine:!1};let i="object"==typeof r[0]?r[0].enforce:[{blankLine:r[0],prev:"*",next:"*"}],s=e.sourceCode;function a(e,t,n){let r=s.getTokenAfter(e,{includeComments:!0});return r!==t&&r.loc.start.line-e.loc.end.line<=n?a(r,t,n):e}let o=n?.exceptAfterOverload&&("always"===t||"string"!=typeof t&&t?.enforce.some(({blankLine:e,prev:t,next:n})=>"always"===e&&"field"!==t&&"field"!==n));return{ClassBody(t){let n=o?t.body.filter(e=>e.type!==ro.AST_NODE_TYPES.TSAbstractMethodDefinition&&e.type!==ro.AST_NODE_TYPES.MethodDefinition||e.value.type!==ro.AST_NODE_TYPES.TSEmptyBodyFunctionExpression):t.body;for(let t=0;t<n.length-1;t++){let o=s.getFirstToken(n[t]),{curLast:l,nextFirst:p}=function(e,t){let n=s.getLastToken(e),r=s.getTokenBefore(n),i=s.getFirstToken(t);return(0,sL.isSemicolonToken)(n)&&!(0,sL.isTokenOnSameLine)(r,n)&&(0,sL.isTokenOnSameLine)(n,i)?{curLast:r,nextFirst:n}:{curLast:n,nextFirst:i}}(n[t],n[t+1]),c=!!(0,sL.isTokenOnSameLine)(o,l)&&r[1].exceptAfterSingleLine,u=a(l,p,1),d=function e(t,n,r){let i=s.getTokenBefore(t,{includeComments:!0});return i!==n&&t.loc.start.line-i.loc.end.line<=r?e(i,n,r):t}(p,l,1),f=d.loc.start.line-u.loc.end.line>1,m=0!==s.getTokensBetween(u,d,{includeComments:!0}).length,h=a(l,p,0),g=function(e,t){for(let n=i.length-1;n>=0;--n){let r=i[n];if(ti[r.prev].test(e)&&ti[r.next].test(t))return r.blankLine}return null}(n[t],n[t+1]);"never"===g&&f?e.report({node:n[t+1],messageId:"never",fix:e=>m?null:e.replaceTextRange([u.range[1],d.range[0]],"\n")}):"always"!==g||c||f||e.report({node:n[t+1],messageId:"always",fix:e=>m?null:e.insertTextAfter(h,"\n")})}}}}})}),aH=nH(()=>{sB(),sM(),tl=sF({name:"max-len",meta:{type:"layout",docs:{description:"Enforce a maximum line length"},schema:[to={anyOf:[ta={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},{type:"integer",minimum:0}]},to,ta],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(e){let t=/[^:/?#]:\/\/[^?#]/u,n=e.sourceCode,r=Object.assign({},e.options[e.options.length-1]);"number"==typeof e.options[0]&&(r.code=e.options[0]),"number"==typeof e.options[1]&&(r.tabWidth=e.options[1]);let i="number"==typeof r.code?r.code:80,s="number"==typeof r.tabWidth?r.tabWidth:4,a=!!r.ignoreComments,o=!!r.ignoreStrings,l=!!r.ignoreTemplateLiterals,p=!!r.ignoreRegExpLiterals,c=!!r.ignoreTrailingComments||!!r.ignoreComments,u=!!r.ignoreUrls,d=r.comments,f=null;function m(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function h(e,t){return e.slice(0,t.loc.start.column).replace(/\s+$/u,"")}function g(e){let t={};for(let r=0;r<e.length;r++){let i=e[r];for(let e=i.loc.start.line;e<=i.loc.end.line;++e){var n;Array.isArray(t[n=e])||(t[n]=[]),t[n].push(i)}}return t}return r.ignorePattern&&(f=RegExp(r.ignorePattern,"u")),{Program:function(r){let y=n.lines,x=a||d||c?function(){let e=[];return n.getAllComments().forEach(t=>{let r=n.getNodeByRangeIndex(t.range[0]);r&&r.parent&&"JSXEmptyExpression"===r.type&&"JSXExpressionContainer"===r.parent.type&&s_(r.parent)?e[e.length-1]!==r.parent&&e.push(r.parent):e.push(t)}),e}():[],T=0,S=g(n.ast.tokens.filter(e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type)),b=g(n.ast.tokens.filter(e=>"Template"===e.type)),E=g(n.ast.tokens.filter(e=>"RegularExpression"===e.type));y.forEach((n,g)=>{var y;let k,w,v=g+1,A=!1;if(T<x.length){let e=null;do e=x[++T];while(e&&e.loc.start.line<=v);if(function(e,t,n){let r=n.loc.start,i=n.loc.end,s=!e.slice(0,n.loc.start.column).trim();return n&&(r.line<t||r.line===t&&s)&&(i.line>t||i.line===t&&i.column===e.length)}(n,v,e=x[--T]))A=!0,k=n;else if(c&&m(n,v,e)){k=h(n,e);let t=T;for(;m(k,v,x[--t]);)k=h(k,x[t])}else k=n}else k=n;if(f&&f.test(k)||u&&t.test(k)||o&&S[v]||l&&b[v]||p&&E[v])return;let C=(w=0,(y=k).replace(/\t/gu,(e,t)=>{let n=t+w;return w+=s-(s?n%s:0)-1,""}),Array.from(y).length+w),_=A&&d;if(A&&a)return;let O={start:{line:v,column:0},end:{line:v,column:k.length}};_?C>d&&e.report({node:r,loc:O,messageId:"maxComment",data:{lineLength:C,maxCommentLength:d}}):C>i&&e.report({node:r,loc:O,messageId:"max",data:{lineLength:C,maxLength:i}})})}}}})}),aG=nH(()=>{sB(),sM(),tc=sF({name:"max-statements-per-line",meta:{type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1},ignoredNodes:{type:"array",items:{type:"string",enum:tp=["BreakStatement","ClassDeclaration","ContinueStatement","DebuggerStatement","DoWhileStatement","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","LabeledStatement","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","VariableDeclaration","WhileStatement","WithStatement","ExportNamedDeclaration","ExportDefaultDeclaration","ExportAllDeclaration"]}}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=void 0!==n.max?n.max:1,i=n.ignoredNodes||[],s=0,a=0,o=null,l=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function p(){o&&e.report({node:o,messageId:"exceed",data:{numberOfStatementsOnThisLine:a,maxStatementsPerLine:r,statements:1===a?"statement":"statements"}}),o=null}function c(e){let t=e.loc.start.line;(!(e.parent&&l.test(e.parent.type))||"alternate"in e.parent&&e.parent.alternate===e)&&(t===s?a+=1:(p(),a=1,s=t),a===r+1&&(o=o||e))}function u(e){let n=t.getLastToken(e,sL.isNotSemicolonToken).loc.end.line;n!==s&&(p(),a=1,s=n)}let d={"Program:exit":p};for(let e of tp)i.includes(e)||(d[e]=c,d[`${e}:exit`]=u);return d}})}),az=nH(()=>{sB(),sM(),td=sF({name:"member-delimiter-style",meta:{type:"layout",docs:{description:"Require a specific member delimiter style for interfaces and type literals"},fixable:"whitespace",messages:{unexpectedComma:"Unexpected separator (,).",unexpectedSemi:"Unexpected separator (;).",expectedComma:"Expected a comma.",expectedSemi:"Expected a semicolon."},schema:[{$defs:{multiLineOption:{type:"string",enum:["none","semi","comma"]},singleLineOption:{type:"string",enum:["semi","comma"]},delimiterConfig:tu={type:"object",properties:{multiline:{type:"object",properties:{delimiter:{$ref:"#/items/0/$defs/multiLineOption"},requireLast:{type:"boolean"}},additionalProperties:!1},singleline:{type:"object",properties:{delimiter:{$ref:"#/items/0/$defs/singleLineOption"},requireLast:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}},type:"object",properties:{...tu.properties,overrides:{type:"object",properties:{interface:{$ref:"#/items/0/$defs/delimiterConfig"},typeLiteral:{$ref:"#/items/0/$defs/delimiterConfig"}},additionalProperties:!1},multilineDetection:{type:"string",enum:["brackets","last-member"]}},additionalProperties:!1}]},defaultOptions:[{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1},multilineDetection:"brackets"}],create(e,[t]){let n=e.sourceCode,r=t.overrides??{},i=sR(t,r.interface),s=sR(t,r.typeLiteral);function a(r){let a=r.type===ro.AST_NODE_TYPES.TSInterfaceBody?r.body:r.members,o=s_(r);"last-member"===t.multilineDetection&&!o&&a.length>0&&a[a.length-1].loc.end.line===r.loc.end.line&&(o=!0);let l=r.type===ro.AST_NODE_TYPES.TSInterfaceBody?i:s,p=o?{...l.singleline,type:"single-line"}:{...l.multiline,type:"multi-line"};a.forEach((t,r)=>{!function(t,r,i){function s(e){return i&&!r.requireLast?"none"===e:r.delimiter===e}let a=null,o=!1,l=n.getLastToken(t,{includeComments:!1});if(!l)return;let p=n.getCommentsAfter(l).pop(),c=n.getLines()[l?.loc.start.line-1],u=s("semi"),d=s("comma"),f=s("none");";"===l.value?d?a="expectedComma":f&&(o=!0,a="unexpectedSemi"):","===l.value?u?a="expectedSemi":f&&(o=!0,a="unexpectedComma"):u?(o=!0,a="expectedSemi"):d&&(o=!0,a="expectedComma"),a&&e.report({node:l,loc:{start:{line:l.loc.end.line,column:l.loc.end.column},end:{line:l.loc.end.line,column:l.loc.end.column}},messageId:a,fix:function({optsNone:e,optsSemi:t,lastToken:n,commentsAfterLastToken:r,missingDelimiter:i,lastTokenLine:s,isSingleLine:a}){if(!e||n.loc.start.column===s.length-1||r&&(r.loc.end.line>n.loc.end.line||r.loc.end.column===s.length)||a)return r=>{if(e)return r.remove(n);let s=t?";":",";return i?r.insertTextAfter(n,s):r.replaceText(n,s)}}({optsNone:f,optsSemi:u,lastToken:l,commentsAfterLastToken:p,missingDelimiter:o,lastTokenLine:c,isSingleLine:"single-line"===r.type})})}(t,p??{},r===a.length-1)})}return{TSInterfaceBody:a,TSTypeLiteral:a}}})}),aQ=nH(()=>{sB(),sM(),tf=sF({name:"multiline-comment-style",meta:{type:"suggestion",docs:{description:"Enforce a particular style for multiline comments"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"],type:"string"}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"],type:"string"},{type:"object",properties:{checkJSDoc:{type:"boolean"},checkExclamation:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(e){let t=e.sourceCode,n=e.options[0]||"starred-block",r=e.options[1]||{},i=!!r.checkJSDoc,s=!!r.checkExclamation;function a(e){return/^\s*\*/u.test(e)}function o([e]){if("Block"!==e.type)return!1;let t=e.value.split(sL.LINEBREAK_MATCHER);return t.length>0&&t.every((e,n)=>0===n||n===t.length-1?sw(e):a(e))}function l([e]){if("Block"!==e.type)return!1;let t=e.value.split(sL.LINEBREAK_MATCHER);return/^\*\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&sw(t.at(-1))}function p([e]){if("Block"!==e.type)return!1;let t=e.value.split(sL.LINEBREAK_MATCHER);return/^!\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&sw(t.at(-1))}function c(e){let[n]=e;if("Line"===n.type){let t=e.map(({value:e})=>e).filter(e=>e.trim().length).every(e=>e.startsWith(" "));return e.map(({value:e})=>t?e.replace(/^ /u,""):e)}if(o(e)){let e=n.value.split(sL.LINEBREAK_MATCHER).filter((e,t,n)=>0!==t&&t!==n.length-1).map(e=>e.replace(b,"")),t=e.map(e=>e.replace(/\s*\*/u,"")).filter(e=>e.trim().length).every(e=>e.startsWith(" "));return e.map(e=>e.replace(t?/\s*\* ?/u:/\s*\*/u,""))}return function(e){let n=e.value.split(sL.LINEBREAK_MATCHER).map(e=>e.replace(b,"")),r=`${t.text.slice(e.range[0]-e.loc.start.column,e.range[0])} `,i="";for(let[e,t]of n.entries()){if(!t.trim().length||0===e)continue;let[,n]=t.match(/^(\s*\*?\s*)/u);if(n.length<r.length){let e=r.slice(n.length-r.length);e.length>i.length&&(i=e)}}return n.map(e=>{let[,t,n]=e.match(/^(\s*\*?\s*)(.*)/u);return t.length>r.length?`${t.slice(r.length-(i.length+t.length))}${n}`:t.length<r.length?`${t.slice(r.length)}${n}`:n})}(n)}function u(e){return t.text.slice(e.range[0]-e.loc.start.column,e.range[0])}function d(e,t){return`/* ${t.join(`
17
- ${u(e)} `)} */`}let m={"starred-block":function(n){let[r]=n,i=c(n);if(!i.some(e=>e.includes("*/")))if(n.length>1)e.report({loc:{start:r.loc.start,end:n.at(-1).loc.end},messageId:"expectedBlock",fix(e){let t=[r.range[0],n.at(-1).range[1]];return i.some(e=>e.startsWith("/"))?null:e.replaceTextRange(t,function(e,t){let n=u(e);return`/*
16
+ )`)})}}return{VariableDeclarator(e){let t="declaration";if(n(t)){if(!n("condition")&&e.init&&"ConditionalExpression"===e.init.type){r(e.init.consequent,t),r(e.init.alternate,t);return}r(e.init,t)}},AssignmentExpression(e){let t="assignment";if(n(t)){if(!n("condition")&&"ConditionalExpression"===e.right.type){r(e.right.consequent,t),r(e.right.alternate,t);return}r(e.right,t)}},ReturnStatement(e){let t="return";n(t)&&r(e.argument,t)},"ArrowFunctionExpression:exit":e=>{let t=e.body,i="arrow";n(i)&&"BlockStatement"!==t.type&&r(t,i)},ConditionalExpression(e){let t="condition";n(t)&&(r(e.consequent,t),r(e.alternate,t))},LogicalExpression(e){let t="logical";n(t)&&r(e.right,t)},JSXAttribute(e){let t="prop";n(t)&&e.value&&"JSXExpressionContainer"===e.value.type&&r(e.value.expression,t)},ObjectExpression(e){let t="propertyValue";n(t)&&e.properties.forEach(e=>{"Property"===e.type&&"JSXElement"===e.value.type&&r(e.value,t)})}}}});function iE(e,t){return e.mode=t.mode||"strict",void 0!==t.beforeColon?e.beforeColon=+t.beforeColon:e.beforeColon=0,void 0!==t.afterColon?e.afterColon=+t.afterColon:e.afterColon=1,void 0!==t.align&&("object"==typeof t.align?e.align=t.align:e.align={on:t.align,mode:e.mode,beforeColon:e.beforeColon,afterColon:e.afterColon}),e}var ik=nz({name:"key-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing between property names and type annotations in types and interfaces"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{align:{anyOf:[{type:"string",enum:["colon","value"]},{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"},ignoredNodes:{type:"array",items:{type:"string",enum:["ObjectExpression","ObjectPattern","ImportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","TSTypeLiteral","TSInterfaceBody","ClassBody"]}}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{align:{anyOf:[{type:"string",enum:["colon","value"]},{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}]},mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1},{type:"object",properties:{singleLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},multiLine:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1},align:{type:"object",properties:{mode:{type:"string",enum:["strict","minimum"]},on:{type:"string",enum:["colon","value"]},beforeColon:{type:"boolean"},afterColon:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}]}],messages:{extraKey:"Extra space after {{computed}}key '{{key}}'.",extraValue:"Extra space before value for {{computed}}key '{{key}}'.",missingKey:"Missing space after {{computed}}key '{{key}}'.",missingValue:"Missing space before value for {{computed}}key '{{key}}'."}},defaultOptions:[{}],create(e,[t]){var n;let r=t||{},i=(n={},"object"==typeof r.align?(n.align=iE({},r.align),n.align.on=r.align.on||"colon",n.align.mode=r.align.mode||"strict",n.multiLine=iE({},r.multiLine||r),n.singleLine=iE({},r.singleLine||r)):(n.multiLine=iE({},r.multiLine||r),n.singleLine=iE({},r.singleLine||r),n.multiLine.align&&(n.align={on:n.multiLine.align.on,mode:n.multiLine.align.mode||n.multiLine.mode,beforeColon:n.multiLine.align.beforeColon,afterColon:n.multiLine.align.afterColon})),n.ignoredNodes=r.ignoredNodes||[],n),s=i.multiLine,a=i.singleLine,o=i.align||null,l=i.ignoredNodes,p=e.sourceCode;function c(e,t){if("TSImportType"===e.type)return"options"in e&&!!e.options&&nY(e.options);let n=t.getTokenBefore(e.attributes[0],nU.isOpeningBraceToken),r=t.getTokenAfter(e.attributes[e.attributes.length-1],nU.isClosingBraceToken);return(0,nU.isTokenOnSameLine)(r,n)}function u(e){return"ImportAttribute"===e.type||!("method"in e&&e.method||"shorthand"in e&&e.shorthand||"kind"in e&&"init"!==e.kind||"Property"!==e.type)}function d(e){return p.getTokenAfter(e,nU.isColonToken)}function f(e){let t=d(e);return p.getTokenBefore(t)}function m(t,n,r,i,s){let a=r.length-i;if((a&&"strict"===s||a<0&&"minimum"===s||a>0&&!i&&"minimum"===s)&&!(i&&nU.LINEBREAK_MATCHER.test(r))){let r,i=d(t.key),s=p.getTokenBefore(i,{includeComments:!0}),o=p.getTokenAfter(i,{includeComments:!0}),l="key"===n,c=a>0,u=Math.abs(a),f=Array(u+1).join(" "),m=l?s.loc.end:i.loc.start,h=l?i.loc.start:o.loc.start,g=l?s.loc:o.loc;if(c){let e;e=l?[s.range[1],s.range[1]+u]:[o.range[0]-u,o.range[0]],r=function(t){return t.removeRange(e)}}else r=l?function(e){return e.insertTextAfter(s,f)}:function(e){return e.insertTextBefore(o,f)};e.report({node:t[n],loc:c?{start:m,end:h}:g,messageId:c?"key"===n?"extraKey":"extraValue":"key"===n?"missingKey":"missingValue",data:{computed:"ImportAttribute"!==t.type&&t.computed?"computed ":"",key:function(e){let t=e.key;return"ImportAttribute"!==e.type&&e.computed?p.getText().slice(t.range[0],t.range[1]):ng(e)}(t)},fix:r})}}function h(e){let t=p.getFirstToken(e),n=f(e.key);return n3(p.getText().slice(t.range[0],n.range[1]))}function g(e){let t=/(\s*):(\s*)/u.exec(p.getText().slice(e.key.range[1],e.value.range[0]));return t?{beforeColon:t[1],afterColon:t[2]}:null}function y(e,t){if(l.includes(e.parent.type))return;let n=g(e);n&&(m(e,"key",n.beforeColon,t.beforeColon,t.mode),m(e,"value",n.afterColon,t.afterColon,t.mode))}function x(e,t){let n=e.length;for(let r=0;r<n;r++)y(e[r],t)}function T(e){(1===e.length?[e]:e.reduce((e,t)=>{let n=e.at(-1),r=n.at(-1);return!r||function(e,t){let n=e.loc.start.line,r=(u(t)?function(e){let t=d(e);return p.getTokenAfter(t)}(t.key):t).loc.start.line;if(r-n<=1)return!0;let i=p.getCommentsBefore(t);if(i.length&&i[0].loc.start.line-n<=1&&r-i.at(-1).loc.end.line<=1){for(let e=1;e<i.length;e++)if(i[e].loc.start.line-i[e-1].loc.end.line>1)return!1;return!0}return!1}(r,t)?n.push(t):e.push([t]),e},[[]])).forEach(e=>{let t=e.filter(u);t.length>0&&function(e){let[t]=e,n=e.at(-1);return(0,nU.isTokenOnSameLine)(n,t)}(t)?x(t,s):function(e){let t,n,r,i=e.length,a=e.map(h),l=o.on,p=Math.max(...a);o&&i>1?(t=o.beforeColon,n=o.afterColon):(t=s.beforeColon,n=s.afterColon),r=o.mode,p+="colon"===l?t:n;for(let s=0;s<i;s++){let i=e[s],o=g(i);if(o){let e=a[s];"value"===l?(m(i,"key",o.beforeColon,t,r),m(i,"value",o.afterColon,p-e,r)):(m(i,"key",o.beforeColon,p-e,r),m(i,"value",o.afterColon,n,r))}}}(t)})}function S(e){!l.includes(e.type)&&e.attributes&&e.attributes.length&&(c(e,p)?x(e.attributes,a):T(e.attributes))}function b(e){let t=e.line-1;return n3(p.lines.at(t).slice(0,e.column))}function E(e){return(e.type===em.AST_NODE_TYPES.TSPropertySignature||e.type===em.AST_NODE_TYPES.TSIndexSignature||e.type===em.AST_NODE_TYPES.PropertyDefinition)&&!!e.typeAnnotation}function k(e){return E(e)&&(0,nU.isTokenOnSameLine)(e,e.typeAnnotation)}function w(e){return e.type!==em.AST_NODE_TYPES.TSIndexSignature?p.getText(e.key):p.getText(e).slice(0,p.getTokenAfter(e.parameters.at(-1),nU.isClosingBracketToken).range[1]-e.range[0])}function v(e){return f(e.type!==em.AST_NODE_TYPES.TSIndexSignature?e.key:e.parameters.at(-1)).loc.end}function A(t,n,r){let{typeAnnotation:i}=t,s=i.loc.start.column-v(t).column-n;("strict"===r?s:s<0)&&e.report({node:t,messageId:s>0?"extraKey":"missingKey",fix:e=>s>0?e.removeRange([i.range[0]-s,i.range[0]]):e.insertTextBefore(i," ".repeat(-s)),data:{computed:"",key:w(t)}})}function C(t,n,r){let{typeAnnotation:i}=t,s=p.getFirstToken(i),a=p.getTokenAfter(s,{includeComments:!0}).loc.start.column-s.loc.start.column-1-n;("strict"===r?a:a<0)&&e.report({node:t,messageId:a>0?"extraValue":"missingValue",fix:e=>a>0?e.removeRange([s.range[1],s.range[1]+a]):e.insertTextAfter(s," ".repeat(-a)),data:{computed:"",key:w(t)}})}function _(t){if(l.includes(t.type))return;let n=t.type===em.AST_NODE_TYPES.TSTypeLiteral?t.members:t.body,i=[],s=[];if(r.align||r.multiLine?.align){let e,t=[];for(let r of(i.push(t),n)){let n=t.at(-1);n!==e&&(n=void 0),n&&function(e,t){let n=e.loc.start.line,r=(E(t)?t.typeAnnotation:t).loc.start.line;if(r===n)return!1;if(r-n==1)return!0;let i=p.getCommentsBefore(t);if(i.length&&i[0].loc.start.line-n<=1&&r-i.at(-1).loc.end.line<=1){for(let e=1;e<i.length;e++)if(i[e].loc.start.line-i[e-1].loc.end.line>1)return!1;return!0}return!1}(n,r)?t.push(r):e?.loc.start.line===r.loc.start.line?(n&&(s.push(n),t.pop()),s.push(r)):(t=[r],i.push(t)),e=r}s=s.concat(...i.filter(e=>1===e.length)),i=i.filter(e=>e.length>=2)}else s=n;for(let t of i)!function(t){let n=0,i=("object"==typeof r.align?r.align.on:"object"==typeof r.multiLine?.align?r.multiLine.align.on:r.multiLine?.align??r.align)??"colon",s=+!!("object"==typeof r.align?r.align.beforeColon:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.beforeColon:r.multiLine.beforeColon:r.beforeColon),a=+!!(("object"==typeof r.align?r.align.afterColon:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.afterColon:r.multiLine.afterColon:r.afterColon)??!0),o=("object"==typeof r.align?r.align.mode:r.multiLine?"object"==typeof r.multiLine.align?r.multiLine.align.mode??r.multiLine.mode:r.multiLine.mode:r.mode)??"strict";for(let e of t)if(E(e)){let t=b(v(e));n=Math.max(n,"colon"===i?t+s:t+1+a+s)}for(let r of t){if(!k(r))continue;let{typeAnnotation:t}=r,l="colon"===i?t:t.typeAnnotation,p=b(l.loc.start)-n;p&&e.report({node:r,messageId:p>0?"colon"===i?"extraKey":"extraValue":"colon"===i?"missingKey":"missingValue",fix:e=>p>0?e.removeRange([l.range[0]-p,l.range[0]]):e.insertTextBefore(l," ".repeat(-p)),data:{computed:"",key:w(r)}}),"colon"===i?C(r,a,o):A(r,s,o)}}(t);for(let e of s)!function(e,{singleLine:t}){let n=(t?r.singleLine?r.singleLine.beforeColon:r.beforeColon:r.multiLine?r.multiLine.beforeColon:r.beforeColon)??!1,i=(t?r.singleLine?r.singleLine.afterColon:r.afterColon:r.multiLine?r.multiLine.afterColon:r.afterColon)??!0,s=(t?r.singleLine?r.singleLine.mode:r.mode:r.multiLine?r.multiLine.mode:r.mode)??"strict";k(e)&&(A(e,+!!n,s),C(e,+!!i,s))}(e,{singleLine:nY(t)})}return{...o?{ObjectExpression(e){l.includes(e.type)||(nY(e)?x(e.properties.filter(u),a):T(e.properties))},ImportDeclaration(e){S(e)},ExportNamedDeclaration(e){S(e)},ExportAllDeclaration(e){S(e)}}:{Property(e){y(e,nY(e.parent)?a:s)},ImportAttribute(e){let t=e.parent;y(e,c(t,p)?a:s)}},TSTypeLiteral:_,TSInterfaceBody:_,ClassBody:_}}});const iw=/^[)\]}>]$/u,iv=/^(?:[([{<~!]|\+\+?|--?)$/u,iA=/^[)\]}>*]$/u,iC=/^[{*]$/u,i_=/\$\{$/u,iO=/^\}/u,iP=/^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u;var iI=nz({name:"keyword-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after keywords"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!0},after:{type:"boolean",default:!0},overrides:{type:"object",properties:nc.reduce((e,t)=>(e[t]={type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1},e),{}),additionalProperties:!1}},additionalProperties:!1}],messages:{expectedBefore:'Expected space(s) before "{{value}}".',expectedAfter:'Expected space(s) after "{{value}}".',unexpectedBefore:'Unexpected space(s) before "{{value}}".',unexpectedAfter:'Unexpected space(s) after "{{value}}".'}},defaultOptions:[{}],create(e){let t=e.sourceCode,n=new WeakSet;function r(e){return"Template"===e.type&&i_.test(e.value)}function i(e){return"Template"===e.type&&iO.test(e.value)}function s(i,s){let a=t.getTokenBefore(i);a&&(iP.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,nU.isTokenOnSameLine)(a,i)&&!t.isSpaceBetween(a,i)&&e.report({loc:i.loc,messageId:"expectedBefore",data:i,fix:e=>e.insertTextBefore(i," ")})}function a(i,s){let a=t.getTokenBefore(i);a&&(iP.test(a.type)||s.test(a.value))&&!r(a)&&!n.has(a)&&(0,nU.isTokenOnSameLine)(a,i)&&t.isSpaceBetween(a,i)&&e.report({loc:{start:a.loc.end,end:i.loc.start},messageId:"unexpectedBefore",data:i,fix:e=>e.removeRange([a.range[1],i.range[0]])})}function o(r,s){let a=t.getTokenAfter(r);a&&(iP.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,nU.isTokenOnSameLine)(r,a)&&!t.isSpaceBetween(r,a)&&e.report({loc:r.loc,messageId:"expectedAfter",data:r,fix:e=>e.insertTextAfter(r," ")})}function l(r,s){let a=t.getTokenAfter(r);a&&(iP.test(a.type)||s.test(a.value))&&!i(a)&&!n.has(a)&&(0,nU.isTokenOnSameLine)(r,a)&&t.isSpaceBetween(r,a)&&e.report({loc:{start:r.loc.end,end:a.loc.start},messageId:"unexpectedAfter",data:r,fix:e=>e.removeRange([r.range[1],a.range[0]])})}let p=function(e={}){let t=!1!==e.before,n=!1!==e.after,r={before:t?s:a,after:n?o:l},i=e&&e.overrides||{},p=Object.create(null);for(let e=0;e<nc.length;++e){let c=nc[e],u=i[c];if(u){let e="before"in u?u.before:t,r="after"in u?u.after:n;p[c]={before:e?s:a,after:r?o:l}}else p[c]=r}return p}(e.options[0]);function c(e,t){p[e.value].before(e,t||iw)}function u(e,t){p[e.value].after(e,t||iv)}function d(e){c(e),u(e)}function f(e){let n=e&&t.getFirstToken(e);if(n){if(!nb(n)){if("VariableDeclaration"!==e.type)return;else if("using"!==e.kind&&"await using"!==e.kind||"Identifier"!==n.type)return}d(n)}}function m(e){let n=e&&t.getFirstToken(e);nb(n)&&c(n)}function h(e){if(e){let n=t.getTokenBefore(e,nb);n&&d(n)}}function g(e){let n=e&&t.getFirstToken(e);n&&(nb(n)&&"function"===n.value||"async"===n.value)&&c(n)}function y(e){f(e),h(e.superClass)}function x(e){let n=t.getFirstToken(e);if(c(n,iA),u(n,iC),"ExportDefaultDeclaration"===e.type&&d(t.getTokenAfter(n)),"ExportAllDeclaration"===e.type&&e.exported){let n=t.getTokenBefore(e.exported);c(n,iA),u(n,iC)}if("source"in e&&e.source){let n=t.getTokenBefore(e.source);if(c(n,iA),u(n,iC),e.attributes){let n=t.getTokenAfter(e.source);nb(n)&&d(n)}}"ExportDefaultDeclaration"!==e.type&&function(e){let n;switch(e.type){case em.AST_NODE_TYPES.ImportDeclaration:n=e.importKind;break;case em.AST_NODE_TYPES.ExportAllDeclaration:case em.AST_NODE_TYPES.ExportNamedDeclaration:n=e.exportKind}if("type"!==n)return;let r=t.getFirstToken(e,{skip:1});(0,nU.isTypeKeyword)(r)&&(c(r,iA),u(r,iC))}(e)}function T(e){if("static"in e&&e.static&&f(e),"get"===e.kind||"set"===e.kind||("method"in e&&e.method||"MethodDefinition"===e.type)&&"async"in e.value&&e.value.async||e.type===em.AST_NODE_TYPES.AccessorProperty){let n=t.getTokenBefore(e.key,e=>{switch(e.value){case"get":case"set":case"async":case"accessor":return!0;default:return!1}});if(!n)throw Error("Failed to find token get, set, or async beside method name");d(n)}}return{DebuggerStatement:f,WithStatement:f,BreakStatement:f,ContinueStatement:f,ReturnStatement:f,ThrowStatement:f,TryStatement(e){f(e),e.handler&&(e.handler.param?m(e.handler):f(e.handler)),h(e.finalizer)},IfStatement(e){f(e),h(e.alternate)},SwitchStatement:f,SwitchCase:f,DoWhileStatement(e){f(e),h(e.test)},ForInStatement(e){f(e);let n=t.getTokenBefore(e.right,nU.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForOfStatement(e){e.await?(c(t.getFirstToken(e,0)),u(t.getFirstToken(e,1))):f(e);let n=t.getTokenBefore(e.right,nU.isNotOpeningParenToken);"PrivateIdentifier"!==t.getTokenBefore(n).type&&c(n),u(n)},ForStatement:f,WhileStatement:f,ClassDeclaration:y,ExportNamedDeclaration:x,ExportDefaultDeclaration:x,ExportAllDeclaration:x,FunctionDeclaration:g,ImportDeclaration:x,VariableDeclaration:f,ArrowFunctionExpression:g,AwaitExpression(e){c(t.getFirstToken(e))},ClassExpression:y,FunctionExpression:g,NewExpression:m,Super:m,ThisExpression:m,UnaryExpression:m,YieldExpression:m,ImportSpecifier(e){e.imported.range[0]!==e.local.range[0]&&c(t.getTokenBefore(e.local),iA)},ExportSpecifier(e){if(e.local.range[0]!==e.exported.range[0]){let n=t.getTokenBefore(e.exported);c(n,iA),u(n,iC)}},ImportNamespaceSpecifier(e){c(t.getFirstToken(e,1),iA)},MethodDefinition:T,PropertyDefinition:T,AccessorProperty:T,StaticBlock:f,Property:T,BinaryExpression(e){if(">"!==e.operator)return;let r=t.getTokenBefore(e.right,nU.isNotOpeningParenToken);n.add(r)},TSAsExpression(e){d(t.getTokenAfter(e.expression,e=>"as"===e.value))},TSSatisfiesExpression(e){d(t.getTokenAfter(e.expression,e=>"satisfies"===e.value))}}}}),iN=nz({name:"line-comment-position",meta:{type:"layout",docs:{description:"Enforce position of line comments"},schema:[{oneOf:[{type:"string",enum:["above","beside"]},{type:"object",properties:{position:{type:"string",enum:["above","beside"]},ignorePattern:{type:"string"},applyDefaultPatterns:{type:"boolean"},applyDefaultIgnorePatterns:{type:"boolean"}},additionalProperties:!1}]}],messages:{above:"Expected comment to be above code.",beside:"Expected comment to be beside code."}},create(e){let t,n,r,i=e.options[0],s=!0;i&&"string"!=typeof i?(t=!i.position||"above"===i.position,r=RegExp(n=i.ignorePattern,"u"),s=Object.hasOwn(i,"applyDefaultIgnorePatterns")?i.applyDefaultIgnorePatterns:!1!==i.applyDefaultPatterns,void 0!==i.applyDefaultPatterns&&nn('option("applyDefaultPatterns")','"applyDefaultIgnorePatterns"',"line-comment-position")):t=!i||"above"===i;let a=/^\s*falls?\s?through/u,o=e.sourceCode;return{Program(){o.getAllComments().forEach(i=>{if("Line"!==i.type||s&&(ni.test(i.value)||a.test(i.value))||n&&r.test(i.value))return;let l=o.getTokenBefore(i,{includeComments:!0}),p=l&&(0,nU.isTokenOnSameLine)(l,i);t?p&&e.report({node:i,messageId:"above"}):p||e.report({node:i,messageId:"beside"})})}}}}),iL=nz({name:"linebreak-style",meta:{type:"layout",docs:{description:"Enforce consistent linebreak style"},fixable:"whitespace",schema:[{type:"string",enum:["unix","windows"]}],messages:{expectedLF:"Expected linebreaks to be 'LF' but found 'CRLF'.",expectedCRLF:"Expected linebreaks to be 'CRLF' but found 'LF'."}},create(e){let t=e.sourceCode;return{Program:function(n){let r,i="unix"===(e.options[0]||"unix"),s=i?"\n":"\r\n",a=t.getText(),o=nu(),l=0;for(;null!==(r=o.exec(a));){if(l++,r[0]===s)continue;let a=r.index,o=[a,a+r[0].length];e.report({node:n,loc:{start:{line:l,column:t.lines[l-1].length},end:{line:l+1,column:0}},messageId:i?"expectedLF":"expectedCRLF",fix:e=>e.replaceTextRange(o,s)})}}}}}),iD=nz({name:"lines-around-comment",meta:{type:"layout",docs:{description:"Require empty lines around comments"},schema:[{type:"object",properties:{beforeBlockComment:{type:"boolean",default:!0},afterBlockComment:{type:"boolean",default:!1},beforeLineComment:{type:"boolean",default:!1},afterLineComment:{type:"boolean",default:!1},allowBlockStart:{type:"boolean",default:!1},allowBlockEnd:{type:"boolean",default:!1},allowClassStart:{type:"boolean"},allowClassEnd:{type:"boolean"},allowObjectStart:{type:"boolean"},allowObjectEnd:{type:"boolean"},allowArrayStart:{type:"boolean"},allowArrayEnd:{type:"boolean"},allowInterfaceStart:{type:"boolean"},allowInterfaceEnd:{type:"boolean"},allowTypeStart:{type:"boolean"},allowTypeEnd:{type:"boolean"},allowEnumStart:{type:"boolean"},allowEnumEnd:{type:"boolean"},allowModuleStart:{type:"boolean"},allowModuleEnd:{type:"boolean"},ignorePattern:{type:"string"},applyDefaultIgnorePatterns:{type:"boolean"},afterHashbangComment:{type:"boolean"}},additionalProperties:!1}],fixable:"whitespace",messages:{after:"Expected line after comment.",before:"Expected line before comment."}},defaultOptions:[{beforeBlockComment:!0}],create(e,[t]){let n=RegExp(t.ignorePattern??"","u"),r=e.sourceCode,i=r.getAllComments(),s=r.lines,a=s.length+1,o=function(e){let t=[];return e.forEach(e=>{let n=e.loc.start.line,r=e.loc.end.line;t.push(n,r)}),t}(i),l=function(e){let t=[];return e.forEach((e,n)=>{e.trim()||t.push(n+1)}),t}(s),p=new Set(o.concat(l));function c(e){let t=r.getNodeByRangeIndex(e.range[0]);if(t&&"StaticBlock"===t.type){let n=r.getFirstToken(t,{skip:1});return n&&e.range[0]>=n.range[0]?t:null}return t}function u(e,t){let n=c(e);if(n&&n.type===t){let t=n;return"StaticBlock"===n.type?t=r.getFirstToken(n,{skip:1}):"SwitchStatement"===n.type&&(t=r.getTokenAfter(n.discriminant,{filter:nU.isOpeningBraceToken})),!!t&&e.loc.start.line-t.loc.start.line==1}return!1}function d(e,t){let n=c(e);return!!n&&n.type===t&&n.loc.end.line-e.loc.end.line==1}function f(e){return u(e,em.AST_NODE_TYPES.ClassBody)}function m(e){return d(e,em.AST_NODE_TYPES.ClassBody)}function h(i,{before:s,after:o}){if(!1!==t.applyDefaultIgnorePatterns&&ni.test(i.value)||t.ignorePattern&&n.test(i.value))return;let l=i.loc.start.line-1,c=i.loc.end.line+1;if(l<1&&(s=!1),c>=a&&(o=!1),function(e){let t=e;do t=r.getTokenBefore(t,{includeComments:!0});while(t&&(0,nU.isCommentToken)(t));if(t&&(0,nU.isTokenOnSameLine)(t,e))return!0;t=e;do t=r.getTokenAfter(t,{includeComments:!0});while(t&&(0,nU.isCommentToken)(t));return!!(t&&(0,nU.isTokenOnSameLine)(e,t))}(i))return;let h=!!t.allowBlockStart&&(u(i,em.AST_NODE_TYPES.ClassBody)||u(i,em.AST_NODE_TYPES.BlockStatement)||u(i,em.AST_NODE_TYPES.StaticBlock)||u(i,em.AST_NODE_TYPES.SwitchCase)||u(i,em.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassStart&&f(i)),g=!!t.allowBlockEnd&&(d(i,em.AST_NODE_TYPES.ClassBody)||d(i,em.AST_NODE_TYPES.BlockStatement)||d(i,em.AST_NODE_TYPES.StaticBlock)||d(i,em.AST_NODE_TYPES.SwitchCase)||d(i,em.AST_NODE_TYPES.SwitchStatement))&&!(!1===t.allowClassEnd&&m(i)),y=!!t.allowClassStart&&f(i),x=!!t.allowClassEnd&&m(i),T=!!t.allowObjectStart&&(u(i,em.AST_NODE_TYPES.ObjectExpression)||u(i,em.AST_NODE_TYPES.ObjectPattern)),S=!!t.allowObjectEnd&&(d(i,em.AST_NODE_TYPES.ObjectExpression)||d(i,em.AST_NODE_TYPES.ObjectPattern)),b=!!t.allowArrayStart&&(u(i,em.AST_NODE_TYPES.ArrayExpression)||u(i,em.AST_NODE_TYPES.ArrayPattern)),E=!!t.allowArrayEnd&&(d(i,em.AST_NODE_TYPES.ArrayExpression)||d(i,em.AST_NODE_TYPES.ArrayPattern)),k=!!t.allowInterfaceStart&&u(i,em.AST_NODE_TYPES.TSInterfaceBody),w=!!t.allowInterfaceEnd&&d(i,em.AST_NODE_TYPES.TSInterfaceBody),v=!!t.allowTypeStart&&u(i,em.AST_NODE_TYPES.TSTypeLiteral),A=!!t.allowTypeEnd&&d(i,em.AST_NODE_TYPES.TSTypeLiteral),C=!!t.allowEnumStart&&(u(i,em.AST_NODE_TYPES.TSEnumBody)||u(i,em.AST_NODE_TYPES.TSEnumDeclaration)),_=!!t.allowEnumEnd&&(d(i,em.AST_NODE_TYPES.TSEnumBody)||d(i,em.AST_NODE_TYPES.TSEnumDeclaration)),O=!!t.allowModuleStart&&u(i,em.AST_NODE_TYPES.TSModuleBlock),P=!!t.allowModuleEnd&&d(i,em.AST_NODE_TYPES.TSModuleBlock),I=h||y||T||b||k||v||C||O,N=g||x||S||E||w||A||_||P,L=r.getTokenBefore(i,{includeComments:!0}),D=r.getTokenAfter(i,{includeComments:!0});if(!I&&s&&!p.has(l)&&!((0,nU.isCommentToken)(L)&&(0,nU.isTokenOnSameLine)(L,i))){let t=i.range[0]-i.loc.start.column,n=[t,t];e.report({node:i,messageId:"before",fix:e=>e.insertTextBeforeRange(n,"\n")})}N||!o||p.has(c)||(0,nU.isCommentToken)(D)&&(0,nU.isTokenOnSameLine)(i,D)||e.report({node:i,messageId:"after",fix:e=>e.insertTextAfter(i,"\n")})}return{Program(){i.forEach(e=>{e.type===em.AST_TOKEN_TYPES.Line?(t.beforeLineComment||t.afterLineComment)&&h(e,{after:t.afterLineComment,before:t.beforeLineComment}):e.type===em.AST_TOKEN_TYPES.Block?(t.beforeBlockComment||t.afterBlockComment)&&h(e,{after:t.afterBlockComment,before:t.beforeBlockComment}):nE(e)&&t.afterHashbangComment&&h(e,{after:t.afterHashbangComment,before:!1})})}}}});const iB={"*":{test:()=>!0},field:{test:e=>"PropertyDefinition"===e.type},method:{test:e=>"MethodDefinition"===e.type}};var ij=nz({name:"lines-between-class-members",meta:{type:"layout",docs:{description:"Require or disallow an empty line between class members"},fixable:"whitespace",schema:[{anyOf:[{type:"object",properties:{enforce:{type:"array",items:{type:"object",properties:{blankLine:{type:"string",enum:["always","never"]},prev:{type:"string",enum:["method","field","*"]},next:{type:"string",enum:["method","field","*"]}},additionalProperties:!1,required:["blankLine","prev","next"]},minItems:1}},additionalProperties:!1,required:["enforce"]},{type:"string",enum:["always","never"]}]},{type:"object",properties:{exceptAfterSingleLine:{type:"boolean",default:!1},exceptAfterOverload:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{never:"Unexpected blank line between class members.",always:"Expected blank line between class members."}},defaultOptions:["always",{exceptAfterOverload:!0,exceptAfterSingleLine:!1}],create(e,[t,n]){let r=[];r[0]=e.options[0]||"always",r[1]=e.options[1]||{exceptAfterSingleLine:!1};let i="object"==typeof r[0]?r[0].enforce:[{blankLine:r[0],prev:"*",next:"*"}],s=e.sourceCode;function a(e,t,n){let r=s.getTokenAfter(e,{includeComments:!0});return r!==t&&r.loc.start.line-e.loc.end.line<=n?a(r,t,n):e}let o=n?.exceptAfterOverload&&("always"===t||"string"!=typeof t&&t?.enforce.some(({blankLine:e,prev:t,next:n})=>"always"===e&&"field"!==t&&"field"!==n));return{ClassBody(t){let n=o?t.body.filter(e=>e.type!==em.AST_NODE_TYPES.TSAbstractMethodDefinition&&e.type!==em.AST_NODE_TYPES.MethodDefinition||e.value.type!==em.AST_NODE_TYPES.TSEmptyBodyFunctionExpression):t.body;for(let t=0;t<n.length-1;t++){let o=s.getFirstToken(n[t]),{curLast:l,nextFirst:p}=function(e,t){let n=s.getLastToken(e),r=s.getTokenBefore(n),i=s.getFirstToken(t);return(0,nU.isSemicolonToken)(n)&&!(0,nU.isTokenOnSameLine)(r,n)&&(0,nU.isTokenOnSameLine)(n,i)?{curLast:r,nextFirst:n}:{curLast:n,nextFirst:i}}(n[t],n[t+1]),c=!!(0,nU.isTokenOnSameLine)(o,l)&&r[1].exceptAfterSingleLine,u=a(l,p,1),d=function e(t,n,r){let i=s.getTokenBefore(t,{includeComments:!0});return i!==n&&t.loc.start.line-i.loc.end.line<=r?e(i,n,r):t}(p,l,1),f=d.loc.start.line-u.loc.end.line>1,m=0!==s.getTokensBetween(u,d,{includeComments:!0}).length,h=a(l,p,0),g=function(e,t){for(let n=i.length-1;n>=0;--n){let r=i[n];if(iB[r.prev].test(e)&&iB[r.next].test(t))return r.blankLine}return null}(n[t],n[t+1]);"never"===g&&f?e.report({node:n[t+1],messageId:"never",fix:e=>m?null:e.replaceTextRange([u.range[1],d.range[0]],"\n")}):"always"!==g||c||f||e.report({node:n[t+1],messageId:"always",fix:e=>m?null:e.insertTextAfter(h,"\n")})}}}}});const iR={type:"object",properties:{code:{type:"integer",minimum:0},comments:{type:"integer",minimum:0},tabWidth:{type:"integer",minimum:0},ignorePattern:{type:"string"},ignoreComments:{type:"boolean"},ignoreStrings:{type:"boolean"},ignoreUrls:{type:"boolean"},ignoreTemplateLiterals:{type:"boolean"},ignoreRegExpLiterals:{type:"boolean"},ignoreTrailingComments:{type:"boolean"}},additionalProperties:!1},iF={anyOf:[iR,{type:"integer",minimum:0}]};var iM=nz({name:"max-len",meta:{type:"layout",docs:{description:"Enforce a maximum line length"},schema:[iF,iF,iR],messages:{max:"This line has a length of {{lineLength}}. Maximum allowed is {{maxLength}}.",maxComment:"This line has a comment length of {{lineLength}}. Maximum allowed is {{maxCommentLength}}."}},create(e){let t=/[^:/?#]:\/\/[^?#]/u,n=e.sourceCode,r=Object.assign({},e.options[e.options.length-1]);"number"==typeof e.options[0]&&(r.code=e.options[0]),"number"==typeof e.options[1]&&(r.tabWidth=e.options[1]);let i="number"==typeof r.code?r.code:80,s="number"==typeof r.tabWidth?r.tabWidth:4,a=!!r.ignoreComments,o=!!r.ignoreStrings,l=!!r.ignoreTemplateLiterals,p=!!r.ignoreRegExpLiterals,c=!!r.ignoreTrailingComments||!!r.ignoreComments,u=!!r.ignoreUrls,d=r.comments,f=null;function m(e,t,n){return n&&n.loc.start.line===t&&t<=n.loc.end.line&&(n.loc.end.line>t||n.loc.end.column===e.length)}function h(e,t){return e.slice(0,t.loc.start.column).replace(/\s+$/u,"")}function g(e){let t={};for(let r=0;r<e.length;r++){let i=e[r];for(let e=i.loc.start.line;e<=i.loc.end.line;++e){var n;Array.isArray(t[n=e])||(t[n]=[]),t[n].push(i)}}return t}return r.ignorePattern&&(f=RegExp(r.ignorePattern,"u")),{Program:function(r){let y=n.lines,x=a||d||c?function(){let e=[];return n.getAllComments().forEach(t=>{let r=n.getNodeByRangeIndex(t.range[0]);r&&r.parent&&"JSXEmptyExpression"===r.type&&"JSXExpressionContainer"===r.parent.type&&nY(r.parent)?e[e.length-1]!==r.parent&&e.push(r.parent):e.push(t)}),e}():[],T=0,S=g(n.ast.tokens.filter(e=>"String"===e.type||"JSXText"===e.type&&"JSXAttribute"===n.getNodeByRangeIndex(e.range[0]-1).type)),b=g(n.ast.tokens.filter(e=>"Template"===e.type)),E=g(n.ast.tokens.filter(e=>"RegularExpression"===e.type));y.forEach((n,g)=>{var y;let k,w,v=g+1,A=!1;if(T<x.length){let e=null;do e=x[++T];while(e&&e.loc.start.line<=v);if(function(e,t,n){let r=n.loc.start,i=n.loc.end,s=!e.slice(0,n.loc.start.column).trim();return n&&(r.line<t||r.line===t&&s)&&(i.line>t||i.line===t&&i.column===e.length)}(n,v,e=x[--T]))A=!0,k=n;else if(c&&m(n,v,e)){k=h(n,e);let t=T;for(;m(k,v,x[--t]);)k=h(k,x[t])}else k=n}else k=n;if(f&&f.test(k)||u&&t.test(k)||o&&S[v]||l&&b[v]||p&&E[v])return;let C=(w=0,(y=k).replace(/\t/gu,(e,t)=>{let n=t+w;return w+=s-(s?n%s:0)-1,""}),Array.from(y).length+w),_=A&&d;if(A&&a)return;let O={start:{line:v,column:0},end:{line:v,column:k.length}};_?C>d&&e.report({node:r,loc:O,messageId:"maxComment",data:{lineLength:C,maxCommentLength:d}}):C>i&&e.report({node:r,loc:O,messageId:"max",data:{lineLength:C,maxLength:i}})})}}}});const iV=["BreakStatement","ClassDeclaration","ContinueStatement","DebuggerStatement","DoWhileStatement","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","LabeledStatement","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","VariableDeclaration","WhileStatement","WithStatement","ExportNamedDeclaration","ExportDefaultDeclaration","ExportAllDeclaration"];var i$=nz({name:"max-statements-per-line",meta:{type:"layout",docs:{description:"Enforce a maximum number of statements allowed per line"},schema:[{type:"object",properties:{max:{type:"integer",minimum:1,default:1},ignoredNodes:{type:"array",items:{type:"string",enum:iV}}},additionalProperties:!1}],messages:{exceed:"This line has {{numberOfStatementsOnThisLine}} {{statements}}. Maximum allowed is {{maxStatementsPerLine}}."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=void 0!==n.max?n.max:1,i=n.ignoredNodes||[],s=0,a=0,o=null,l=/^(?:(?:DoWhile|For|ForIn|ForOf|If|Labeled|While)Statement|Export(?:Default|Named)Declaration)$/u;function p(){o&&e.report({node:o,messageId:"exceed",data:{numberOfStatementsOnThisLine:a,maxStatementsPerLine:r,statements:1===a?"statement":"statements"}}),o=null}function c(e){let t=e.loc.start.line;(!(e.parent&&l.test(e.parent.type))||"alternate"in e.parent&&e.parent.alternate===e)&&(t===s?a+=1:(p(),a=1,s=t),a===r+1&&(o=o||e))}function u(e){let n=t.getLastToken(e,nU.isNotSemicolonToken).loc.end.line;n!==s&&(p(),a=1,s=n)}let d={"Program:exit":p};for(let e of iV)i.includes(e)||(d[e]=c,d[`${e}:exit`]=u);return d}});const iq={type:"object",properties:{multiline:{type:"object",properties:{delimiter:{$ref:"#/items/0/$defs/multiLineOption"},requireLast:{type:"boolean"}},additionalProperties:!1},singleline:{type:"object",properties:{delimiter:{$ref:"#/items/0/$defs/singleLineOption"},requireLast:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1};var iY=nz({name:"member-delimiter-style",meta:{type:"layout",docs:{description:"Require a specific member delimiter style for interfaces and type literals"},fixable:"whitespace",messages:{unexpectedComma:"Unexpected separator (,).",unexpectedSemi:"Unexpected separator (;).",expectedComma:"Expected a comma.",expectedSemi:"Expected a semicolon."},schema:[{$defs:{multiLineOption:{type:"string",enum:["none","semi","comma"]},singleLineOption:{type:"string",enum:["semi","comma"]},delimiterConfig:iq},type:"object",properties:{...iq.properties,overrides:{type:"object",properties:{interface:{$ref:"#/items/0/$defs/delimiterConfig"},typeLiteral:{$ref:"#/items/0/$defs/delimiterConfig"}},additionalProperties:!1},multilineDetection:{type:"string",enum:["brackets","last-member"]}},additionalProperties:!1}]},defaultOptions:[{multiline:{delimiter:"semi",requireLast:!0},singleline:{delimiter:"semi",requireLast:!1},multilineDetection:"brackets"}],create(e,[t]){let n=e.sourceCode,r=t.overrides??{},i=nG(t,r.interface),s=nG(t,r.typeLiteral);function a(r){let a=r.type===em.AST_NODE_TYPES.TSInterfaceBody?r.body:r.members,o=nY(r);"last-member"===t.multilineDetection&&!o&&a.length>0&&a[a.length-1].loc.end.line===r.loc.end.line&&(o=!0);let l=r.type===em.AST_NODE_TYPES.TSInterfaceBody?i:s,p=o?{...l.singleline,type:"single-line"}:{...l.multiline,type:"multi-line"};a.forEach((t,r)=>{!function(t,r,i){function s(e){return i&&!r.requireLast?"none"===e:r.delimiter===e}let a=null,o=!1,l=n.getLastToken(t,{includeComments:!1});if(!l)return;let p=n.getCommentsAfter(l).pop(),c=n.getLines()[l?.loc.start.line-1],u=s("semi"),d=s("comma"),f=s("none");";"===l.value?d?a="expectedComma":f&&(o=!0,a="unexpectedSemi"):","===l.value?u?a="expectedSemi":f&&(o=!0,a="unexpectedComma"):u?(o=!0,a="expectedSemi"):d&&(o=!0,a="expectedComma"),a&&e.report({node:l,loc:{start:{line:l.loc.end.line,column:l.loc.end.column},end:{line:l.loc.end.line,column:l.loc.end.column}},messageId:a,fix:function({optsNone:e,optsSemi:t,lastToken:n,commentsAfterLastToken:r,missingDelimiter:i,lastTokenLine:s,isSingleLine:a}){if(!e||n.loc.start.column===s.length-1||r&&(r.loc.end.line>n.loc.end.line||r.loc.end.column===s.length)||a)return r=>{if(e)return r.remove(n);let s=t?";":",";return i?r.insertTextAfter(n,s):r.replaceText(n,s)}}({optsNone:f,optsSemi:u,lastToken:l,commentsAfterLastToken:p,missingDelimiter:o,lastTokenLine:c,isSingleLine:"single-line"===r.type})})}(t,p??{},r===a.length-1)})}return{TSInterfaceBody:a,TSTypeLiteral:a}}}),iX=nz({name:"multiline-comment-style",meta:{type:"suggestion",docs:{description:"Enforce a particular style for multiline comments"},fixable:"whitespace",schema:{anyOf:[{type:"array",items:[{enum:["starred-block","bare-block"],type:"string"}],additionalItems:!1},{type:"array",items:[{enum:["separate-lines"],type:"string"},{type:"object",properties:{checkJSDoc:{type:"boolean"},checkExclamation:{type:"boolean"}},additionalProperties:!1}],additionalItems:!1}]},messages:{expectedBlock:"Expected a block comment instead of consecutive line comments.",expectedBareBlock:"Expected a block comment without padding stars.",startNewline:"Expected a linebreak after '/*'.",endNewline:"Expected a linebreak before '*/'.",missingStar:"Expected a '*' at the start of this line.",alignment:"Expected this line to be aligned with the start of the comment.",expectedLines:"Expected multiple line comments instead of a block comment."}},create(e){let t=e.sourceCode,n=e.options[0]||"starred-block",r=e.options[1]||{},i=!!r.checkJSDoc,s=!!r.checkExclamation;function a(e){return/^\s*\*/u.test(e)}function o([e]){if("Block"!==e.type)return!1;let t=e.value.split(nU.LINEBREAK_MATCHER);return t.length>0&&t.every((e,n)=>0===n||n===t.length-1?nM(e):a(e))}function l([e]){if("Block"!==e.type)return!1;let t=e.value.split(nU.LINEBREAK_MATCHER);return/^\*\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&nM(t.at(-1))}function p([e]){if("Block"!==e.type)return!1;let t=e.value.split(nU.LINEBREAK_MATCHER);return/^!\s*$/u.test(t[0])&&t.slice(1,-1).every(e=>/^\s* /u.test(e))&&nM(t.at(-1))}function c(e){let[n]=e;if("Line"===n.type){let t=e.every(({value:e})=>0===e.trim().length||e.startsWith(" "));return e.map(({value:e})=>t?e.replace(/^ /u,""):e)}if(o(e)){let e=n.value.split(nU.LINEBREAK_MATCHER).slice(1,-1).map(e=>e.replace(nF,"")),t=e.every(e=>{let t=e.replace(/\s*\*/u,"");return 0===t.trim().length||t.startsWith(" ")});return e.map(e=>e.replace(t?/\s*\* ?/u:/\s*\*/u,""))}return function(e){let n=e.value.split(nU.LINEBREAK_MATCHER).map(e=>e.replace(nF,"")),r=`${t.text.slice(e.range[0]-e.loc.start.column,e.range[0])} `,i="";for(let[e,t]of n.entries()){if(!t.trim().length||0===e)continue;let[,n]=t.match(/^(\s*\*?\s*)/u);if(n.length<r.length){let e=r.slice(n.length-r.length);e.length>i.length&&(i=e)}}return n.map(e=>{let[,t,n]=e.match(/^(\s*\*?\s*)(.*)/u);return t.length>r.length?`${t.slice(r.length-(i.length+t.length))}${n}`:t.length<r.length?`${t.slice(r.length)}${n}`:n})}(n)}function u(e){return t.text.slice(e.range[0]-e.loc.start.column,e.range[0])}function d(e,t){return`/* ${t.join(`
17
+ ${u(e)} `)} */`}let f={"starred-block":function(n){let[r]=n,i=c(n);if(!i.some(e=>e.includes("*/")))if(n.length>1)e.report({loc:{start:r.loc.start,end:n.at(-1).loc.end},messageId:"expectedBlock",fix(e){let t=[r.range[0],n.at(-1).range[1]];return i.some(e=>e.startsWith("/"))?null:e.replaceTextRange(t,function(e,t){let n=u(e);return`/*
18
18
  ${t.map(e=>`${n} * ${e}`).join("\n")}
19
- ${n} */`}(r,i))}});else{let n=r.value.split(sL.LINEBREAK_MATCHER),i=u(r),s=`${i} *`;if(!/^[*!]?\s*$/u.test(n[0])){let t=/^[*!]/.test(r.value)?r.range[0]+1:r.range[0];e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"startNewline",fix:e=>e.insertTextAfterRange([t,t+2],`
20
- ${s}`)})}sw(n.at(-1))||e.report({loc:{start:{line:r.loc.end.line,column:r.loc.end.column-2},end:r.loc.end},messageId:"endNewline",fix:e=>e.replaceTextRange([r.range[1]-2,r.range[1]],`
21
- ${s}/`)});for(let i=r.loc.start.line+1;i<=r.loc.end.line;i++){let o=t.lines[i-1],l=a(o)?"alignment":"missingStar";o.startsWith(s)||e.report({loc:{start:{line:i,column:0},end:{line:i,column:o.length}},messageId:l,fix(e){let a,p=t.getIndexFromLoc({line:i,column:0});if("alignment"===l){let[,t=""]=o.match(/^(\s*\*)/u)||[],n=p+t.length;return e.replaceTextRange([p,n],s)}let[,c=""]=o.match(/^(\s*)/u)||[],u=p+c.length;for(let[e,i]of n.entries()){if(!/\S+/u.test(i))continue;let[,n="",s=""]=t.lines[r.loc.start.line-1+e].match(/^(\s*(?:\/?\*)?(\s*))/u)||[];a=`${c.slice(n.length)}${s}`,/^\s*\//u.test(o)&&0===a.length&&(a+=" ");break}return e.replaceTextRange([p,u],`${s}${a}`)}})}}},"separate-lines":function(n){let[r]=n,a=l(n),o=p(n);if("Block"!==r.type||!i&&a||!s&&o)return;let d=c(n);(a||o)&&(d=d.slice(1,d.length-1));let f=t.getTokenAfter(r,{includeComments:!0});f&&(0,sL.isTokenOnSameLine)(r,f)||e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"expectedLines",fix:e=>e.replaceText(r,d.map(e=>`// ${e}`).join(`
22
- ${u(r)}`))})},"bare-block":function(t){if(l(t)||p(t))return;let[n]=t,r=c(t);"Line"===n.type&&r.length>1&&!r.some(e=>e.includes("*/"))&&e.report({loc:{start:n.loc.start,end:t.at(-1).loc.end},messageId:"expectedBlock",fix:e=>e.replaceTextRange([n.range[0],t.at(-1).range[1]],d(n,r))}),o(t)&&e.report({loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+2}},messageId:"expectedBareBlock",fix:e=>e.replaceText(n,d(n,r))})}};return{Program:()=>t.getAllComments().filter(e=>{if(sl(e)||f.test(e.value))return!1;let n=t.getTokenBefore(e,{includeComments:!0});return!n||n.loc.end.line<e.loc.start.line}).reduce((e,n,r,i)=>{let s=t.getTokenBefore(n,{includeComments:!0});return"Line"===n.type&&r&&"Line"===i[r-1].type&&s&&s.loc.end.line===n.loc.start.line-1&&s===i[r-1]?e.at(-1).push(n):e.push([n]),e},[]).forEach(e=>{1===e.length&&s_(e[0])||(0,m[n])(e)})}}})}),aZ=nH(()=>{sB(),sM(),tm=sF({name:"multiline-ternary",meta:{type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions"},schema:[{type:"string",enum:["always","always-multiline","never"]},{type:"object",properties:{ignoreJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(e){let t=e.sourceCode,n="never"!==e.options[0],r="always-multiline"===e.options[0],i=e.options[1]&&e.options[1].ignoreJSX;return{ConditionalExpression(s){let a=t.getTokenAfter(s.test,sL.isNotClosingParenToken),o=t.getTokenAfter(s.consequent,sL.isNotClosingParenToken),l=t.getFirstToken(s),p=t.getTokenBefore(a),c=t.getTokenAfter(a),u=t.getTokenBefore(o),d=t.getTokenAfter(o),f=(0,sL.isTokenOnSameLine)(p,c),m=(0,sL.isTokenOnSameLine)(u,d),h=!!t.getCommentsInside(s).length;if(i&&("JSXElement"===s.parent.type||"JSXFragment"===s.parent.type||"JSXExpressionContainer"===s.parent.type))return null;if(n){if(r&&s_(s))return;f&&e.report({node:s.test,loc:{start:l.loc.start,end:p.loc.end},messageId:"expectedTestCons",fix:e=>h?null:e.replaceTextRange([p.range[1],a.range[0]],"\n")}),m&&e.report({node:s.consequent,loc:{start:c.loc.start,end:u.loc.end},messageId:"expectedConsAlt",fix:e=>h?null:e.replaceTextRange([u.range[1],o.range[0]],"\n")})}else f||e.report({node:s.test,loc:{start:l.loc.start,end:p.loc.end},messageId:"unexpectedTestCons",fix(e){if(h)return null;let t=[],n=(0,sL.isTokenOnSameLine)(p,a),r=(0,sL.isTokenOnSameLine)(a,c);return n||t.push(e.removeRange([p.range[1],a.range[0]])),r||t.push(e.removeRange([a.range[1],c.range[0]])),t}}),m||e.report({node:s.consequent,loc:{start:c.loc.start,end:u.loc.end},messageId:"unexpectedConsAlt",fix(e){if(h)return null;let t=[],n=(0,sL.isTokenOnSameLine)(u,o),r=(0,sL.isTokenOnSameLine)(o,d);return n||t.push(e.removeRange([u.range[1],o.range[0]])),r||t.push(e.removeRange([o.range[1],d.range[0]])),t}})}}}})}),a0=nH(()=>{sB(),sM(),th=sF({name:"new-parens",meta:{type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments"},fixable:"code",schema:[{type:"string",enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(e){let t="never"!==e.options[0],n=e.sourceCode;return{NewExpression(r){if(0!==r.arguments.length)return;let i=n.getLastToken(r),s=i&&(0,sL.isClosingParenToken)(i),a=n.getTokenBefore(i),o=s&&(0,sL.isOpeningParenToken)(a)&&r.callee.range[1]<r.range[1];t?o||e.report({node:r,messageId:"missing",fix:e=>e.insertTextAfter(r,"()")}):o&&e.report({node:r,messageId:"unnecessary",fix:e=>[e.remove(a),e.remove(i),e.insertTextBefore(r,"("),e.insertTextAfter(r,")")]})}}}})}),a1=nH(()=>{sB(),sM(),tg=sF({name:"newline-per-chained-call",meta:{type:"layout",docs:{description:"Require a newline after each call in a method chain"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(e){let t=(e.options[0]||{}).ignoreChainWithDepth||2,n=e.sourceCode;return{"CallExpression:exit":function(r){let i=sr(r.callee);if("MemberExpression"!==i.type)return;let s=sr(i.object),a=1;for(;s&&"callee"in s&&s.callee;){a+=1;let e=sr(s.callee);if(!("object"in e))break;s=sr(e.object)}if(a>t&&(0,sL.isTokenOnSameLine)(i.object,i.property)){let t=n.getTokenAfter(i.object,sL.isNotClosingParenToken);e.report({node:i.property,loc:{start:t.loc.start,end:i.loc.end},messageId:"expected",data:{callee:function(e){var t;let r=(t=e).computed?t.optional?"?.[":"[":t.optional?"?.":".",i=n.getText(e.property).split(sL.LINEBREAK_MATCHER),s=e.computed&&1===i.length?"]":"";return r+i[0]+s}(i)},fix:e=>e.insertTextBefore(t,"\n")})}}}}})}),a2=nH(()=>{sB(),sM(),ty=sF({name:"no-confusing-arrow",meta:{type:"layout",docs:{description:"Disallow arrow functions where they could be confused with comparisons"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(e){let t=e.options[0]||{},n=t.allowParens||void 0===t.allowParens,r=t.onlyOneSimpleParam,i=e.sourceCode;return{ArrowFunctionExpression:function(t){let s=t.body;"ConditionalExpression"!==s.type||n&&si(i,s)||r&&(1!==t.params.length||"Identifier"!==t.params[0].type)||e.report({node:t,messageId:"confusing",fix:e=>n?e.replaceText(t.body,`(${i.getText(t.body)})`):null})}}}})}),a3=nH(()=>{sB(),sM(),tx=sF({name:"no-extra-parens",meta:{type:"layout",docs:{description:"Disallow unnecessary parentheses"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["functions"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["all"]},{type:"object",properties:{conditionalAssign:{type:"boolean"},ternaryOperandBinaryExpressions:{type:"boolean"},nestedBinaryExpressions:{type:"boolean"},returnAssign:{type:"boolean"},ignoreJSX:{type:"string",enum:["none","all","single-line","multi-line"]},enforceForArrowConditionals:{type:"boolean"},enforceForSequenceExpressions:{type:"boolean"},enforceForNewInMemberExpressions:{type:"boolean"},enforceForFunctionPrototypeMethods:{type:"boolean"},allowParensAfterCommentPattern:{type:"string"},nestedConditionalExpressions:{type:"boolean"},allowNodesInSpreadElement:{type:"object",properties:{ConditionalExpression:{type:"boolean"},LogicalExpression:{type:"boolean"},AwaitExpression:{type:"boolean"}},additionalProperties:!1}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpected:"Unnecessary parentheses around expression."}},defaultOptions:["all"],create(e){let t,n=e.sourceCode,r=new WeakSet,i="functions"!==e.options[0],s=i&&e.options[1]&&!1===e.options[1].conditionalAssign,a=i&&e.options[1]&&!1===e.options[1].ternaryOperandBinaryExpressions,o=i&&e.options[1]&&!1===e.options[1].nestedBinaryExpressions,l=i&&e.options[1]&&!1===e.options[1].returnAssign,p=i&&e.options[1]&&e.options[1].ignoreJSX,c=i&&e.options[1]&&!1===e.options[1].enforceForArrowConditionals,u=i&&e.options[1]&&!1===e.options[1].enforceForSequenceExpressions,d=i&&e.options[1]&&!1===e.options[1].enforceForNewInMemberExpressions,f=i&&e.options[1]&&!1===e.options[1].enforceForFunctionPrototypeMethods,m=i&&e.options[1]&&e.options[1].allowParensAfterCommentPattern,h=i&&e.options[1]&&!1===e.options[1].nestedConditionalExpressions,g=i&&e.options[1]&&new Set(Object.entries(e.options[1].allowNodesInSpreadElement||{}).filter(([e,t])=>t).map(([e])=>e)),y=sy({type:"AssignmentExpression"}),x=sy({type:"UpdateExpression"});function T(e){let t=sr(e);if("CallExpression"!==t.type)return!1;let n=sr(t.callee);return"MemberExpression"===n.type&&"FunctionExpression"===n.object.type&&["call","apply"].includes(sn(n))}function S(e){if("JSXElement"===e.type||"JSXFragment"===e.type)switch(p){case"all":return!1;case"multi-line":return s_(e);case"single-line":return!s_(e)}return!("SequenceExpression"===e.type&&u||T(e)&&f)&&(i||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)}function b(e){return(0,sL.isParenthesized)(1,e,n)}function E(e){return(0,sL.isParenthesized)(2,e,n)}function k(e){return S(e)&&b(e)}function w(e){return S(e)&&E(e)}function v(e,t){return!!(S(e)&&b(e)&&(sy(e)>=t||E(e)))}function A(e){return s&&e.test&&"AssignmentExpression"===e.test.type}function C(e){let t=n.getLastToken(e),r=n.getTokenBefore(t);return e.arguments.length>0||(0,sL.isOpeningParenToken)(r)&&(0,sL.isClosingParenToken)(t)&&e.callee.range[1]<e.range[1]}function _(e){let t=e.object,n=e.object.type;for(;"MemberExpression"===n&&"object"in t;)n=(t=t.object).type;return"CallExpression"===n}function O(e){return"AssignmentExpression"===e.type||"ConditionalExpression"===e.type&&("AssignmentExpression"===e.consequent.type||"AssignmentExpression"===e.alternate.type)||"left"in e&&(!!e.left&&"AssignmentExpression"===e.left.type||!!e.right&&"AssignmentExpression"===e.right.type)}function P(e){return!!l&&!!function(e){for(let t=e;t;t=t.parent)if("ReturnStatement"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"!==t.body.type)return!0;return!1}(e)&&("ReturnStatement"===e.type?e.argument&&O(e.argument):"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?O(e.body):O(e))}function I(e,t){return(0,sL.isTokenOnSameLine)(e,t)?k(t):w(t)}function L(e){let t=sr(e);return"CallExpression"===t.type&&"FunctionExpression"===t.callee.type}function N(e){return!!(e&&("Identifier"===e.type||"MemberExpression"===e.type))}function D(i){let s=n.getTokenBefore(i),a=n.getTokenAfter(i);if(!E(i)){if(r.has(n.getFirstToken(i))||L(i)&&!("callee"in i&&b(i.callee)))return;if(m){let e=n.getCommentsBefore(s),t=e.length,r=RegExp(m,"u");if(t>0&&r.test(e[t-1].value))return}}function o(){e.report({node:i,loc:s.loc,messageId:"unexpected",fix:"Literal"!==i.type||"string"!=typeof i.value||E(i)||!sf(i.parent)?e=>{let t=n.text.slice(s.range[1],a.range[0]);return e.replaceTextRange([s.range[0],a.range[1]],(!function(e){let t=n.getTokenBefore(e),r=n.getTokenBefore(t,{includeComments:!0}),i=n.getTokenAfter(t,{includeComments:!0});return r&&r.range[1]===t.range[0]&&t.range[1]===i.range[0]&&!sE(r,i)}(i)?"":" ")+t+(!function(e){let t=n.getTokensAfter(e,{count:2}),r=t[0],i=t[1],s=n.getLastToken(e);return r&&i&&!n.isSpaceBetween(r,i)&&!sE(s,i)}(i)?"":" "))}:null})}if(t)return void t.reports.push({node:i,finishReport:o});o()}function B(e){"argument"in e&&e.argument&&v(e.argument,sy(e))&&D(e.argument)}function j(e){let t=(0,sL.isTypeAssertion)(e.left),n=(0,sL.isTypeAssertion)(e.right);if(t&&n)return;let r=e=>{let t=sy(e),n=sy(e.left),r=sy(e.right),i="**"===e.operator,s=o&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type),a=o&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!s&&k(e.left)&&(!(["AwaitExpression","UnaryExpression"].includes(e.left.type)&&i)&&!su(e.left,e)&&!("ReturnStatement"===e.parent.type&&e.parent.loc.start.line!==e.left.loc.start.line&&!b(e))&&(n>t||n===t&&!i)||E(e.left))&&D(e.left),!a&&k(e.right)&&(!su(e.right,e)&&(r>t||r===t&&i)||E(e.right))&&D(e.right)};return r(t?{...e,left:{...e.left,type:ro.AST_NODE_TYPES.SequenceExpression}}:n?{...e,right:{...e.right,type:ro.AST_NODE_TYPES.SequenceExpression}}:e)}function R(e){let t=e=>{let t=e.callee;v(t,sy(e))&&(w(t)||!(L(e)||"NewExpression"===t.type&&!C(t)&&!("NewExpression"===e.type&&!C(e))||"NewExpression"===e.type&&"MemberExpression"===t.type&&_(t)||(!("optional"in e)||!e.optional)&&"ChainExpression"===t.type))&&D(e.callee),e.arguments.forEach(e=>{v(e,y)&&D(e)})};return t((0,sL.isTypeAssertion)(e.callee)?{...e,callee:{...e.callee,type:ro.AST_NODE_TYPES.SequenceExpression}}:e.typeArguments&&1===e.arguments.length&&n.getTokenAfter(e.callee,sL.isOpeningParenToken)!==n.getTokenBefore(e.arguments[0],sL.isOpeningParenToken)?{...e,arguments:[{...e.arguments[0],type:ro.AST_NODE_TYPES.SequenceExpression}]}:e)}function F(e){e.superClass&&(sy(e.superClass)>x?k(e.superClass):w(e.superClass))&&D(e.superClass)}function M(e){let t=b(e)?n.getTokenBefore(e):n.getFirstToken(e),i=n.getTokenAfter(t,sL.isNotOpeningParenToken),s=i?n.getTokenAfter(i):null,a=i?n.getTokenAfter(i,sL.isNotClosingParenToken):null;(0,sL.isOpeningParenToken)(t)&&((0,sL.isOpeningBraceToken)(i)||so(i)&&("function"===i.value||"class"===i.value||"let"===i.value&&a&&((0,sL.isOpeningBracketToken)(a)||"Identifier"===a.type))||i&&"Identifier"===i.type&&"async"===i.value&&so(s)&&"function"===s.value)&&r.add(i),("ExportDefaultDeclaration"===e.parent.type?v(e,y):k(e))&&D(e)}function V(e){return(0,sL.isTypeAssertion)(e.argument)?B({...e,argument:{...e.argument,type:ro.AST_NODE_TYPES.SequenceExpression}}):B(e)}function $(e){e.computed&&v(e.key,y)&&D(e.key),e.value&&v(e.value,y)&&D(e.value)}function q(e){e.types.forEach(t=>{(o&&(0,sL.isNodeOfTypes)([ro.AST_NODE_TYPES.TSUnionType,ro.AST_NODE_TYPES.TSIntersectionType])(t)?E(t):v(t,sy(e)))&&D(t)})}return{ArrayExpression(e){e.elements.map(e=>(0,sL.isTypeAssertion)(e)?{...e,type:ro.AST_NODE_TYPES.FunctionExpression}:e).forEach(e=>{e&&v(e,y)&&D(e)})},ArrayPattern(e){e.elements.forEach(e=>{e&&N(e)&&k(e)&&D(e)})},ArrowFunctionExpression(e){if((0,sL.isTypeAssertion)(e.body)||P(e)||"ConditionalExpression"===e.body.type&&c||"BlockStatement"===e.body.type)return;let t=n.getFirstToken(e.body,sL.isNotOpeningParenToken),i=n.getTokenBefore(t);(0,sL.isOpeningParenToken)(i)&&(0,sL.isOpeningBraceToken)(t)&&r.add(t),v(e.body,y)&&D(e.body)},AssignmentExpression(e){N(e.left)&&k(e.left)&&(!function({left:e,operator:t,right:n}){if("Identifier"===e.type&&["=","&&=","||=","??="].includes(t)){let e=n.type;if("ArrowFunctionExpression"===e||("FunctionExpression"===e||"ClassExpression"===e)&&!n.id)return!0}return!1}(e)||E(e.left))&&D(e.left),!P(e)&&v(e.right,sy(e))&&D(e.right)},AssignmentPattern(e){let{left:t,right:n}=e;N(t)&&k(t)&&D(t),n&&v(n,y)&&D(n)},AwaitExpression:e=>(0,sL.isTypeAssertion)(e.argument)?B({...e,argument:{...e.argument,type:ro.AST_NODE_TYPES.SequenceExpression}}):B(e),BinaryExpression(e){t&&"in"===e.operator&&t.inExpressionNodes.push(e),j(e)},CallExpression:R,ClassDeclaration:e=>e.superClass?.type===ro.AST_NODE_TYPES.TSAsExpression?F({...e,superClass:{...e.superClass,type:ro.AST_NODE_TYPES.SequenceExpression}}):F(e),ClassExpression:e=>e.superClass?.type===ro.AST_NODE_TYPES.TSAsExpression?F({...e,superClass:{...e.superClass,type:ro.AST_NODE_TYPES.SequenceExpression}}):F(e),ConditionalExpression(e){let t=e=>{if(P(e))return;let t=new Set(["BinaryExpression","LogicalExpression"]);!(a&&t.has(e.test.type))&&!(h&&["ConditionalExpression"].includes(e.test.type))&&!A(e)&&v(e.test,sy({type:"LogicalExpression",operator:"||"}))&&D(e.test),!(a&&t.has(e.consequent.type))&&!(h&&["ConditionalExpression"].includes(e.consequent.type))&&v(e.consequent,y)&&D(e.consequent),!(a&&t.has(e.alternate.type))&&!(h&&["ConditionalExpression"].includes(e.alternate.type))&&v(e.alternate,y)&&D(e.alternate)};return t((0,sL.isTypeAssertion)(e.test)?{...e,test:{...e.test,type:ro.AST_NODE_TYPES.SequenceExpression}}:(0,sL.isTypeAssertion)(e.consequent)?{...e,consequent:{...e.consequent,type:ro.AST_NODE_TYPES.SequenceExpression}}:(0,sL.isTypeAssertion)(e.alternate)?{...e,alternate:{...e.alternate,type:ro.AST_NODE_TYPES.SequenceExpression}}:e)},DoWhileStatement(e){k(e.test)&&!A(e)&&D(e.test)},ExportDefaultDeclaration(e){M(e.declaration)},ExpressionStatement(e){M(e.expression)},ForInStatement(e){if(!(0,sL.isTypeAssertion)(e.right)){if("VariableDeclaration"!==e.left.type){let t=n.getFirstToken(e.left,sL.isNotOpeningParenToken);"let"===t.value&&(0,sL.isOpeningBracketToken)(n.getTokenAfter(t,sL.isNotClosingParenToken))&&r.add(t)}k(e.left)&&D(e.left),k(e.right)&&D(e.right)}},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){let t=n.getFirstToken(e.left,sL.isNotOpeningParenToken);"let"===t.value&&r.add(t)}k(e.left)&&D(e.left),!(0,sL.isTypeAssertion)(e.right)&&v(e.right,y)&&D(e.right)},ForStatement(e){if(e.test&&k(e.test)&&!A(e)&&!(0,sL.isTypeAssertion)(e.test)&&D(e.test),e.update&&k(e.update)&&!(0,sL.isTypeAssertion)(e.update)&&D(e.update),e.init&&!(0,sL.isTypeAssertion)(e.init)){if("VariableDeclaration"!==e.init.type){let t=n.getFirstToken(e.init,sL.isNotOpeningParenToken);"let"===t.value&&(0,sL.isOpeningBracketToken)(n.getTokenAfter(t,sL.isNotClosingParenToken))&&r.add(t)}t={upper:t,inExpressionNodes:[],reports:[]},k(e.init)&&D(e.init)}},"ForStatement > *.init:exit":function(e){if(!(0,sL.isTypeAssertion)(e)){t?.reports.length&&t.inExpressionNodes.forEach(n=>{var r;let i=(function(e,t){let n=[e],r=e;for(;r!==t;){if(null==(r=r.parent))throw Error("Nodes are not in the ancestor-descendant relationship.");n.push(r)}return n})(n,e).reverse(),s=null;for(let e=0;e<i.length;e++){let n=i[e];if(e<i.length-1&&function(e,t){switch(e.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return e.params.includes(t);case"CallExpression":case"NewExpression":return e.arguments.includes(t);case"MemberExpression":return e.computed&&e.property===t;case"ConditionalExpression":return e.consequent===t;default:return!1}}(n,i[e+1]))return;if(b(n))if(!function(e){return t?.reports.some(t=>t.node===e)}(n))return;else{if(E(n))return;s||(s=n)}}s&&(r=s,t&&(t.reports=t.reports.filter(e=>e.node!==r)))});let{upper:n,inExpressionNodes:r,reports:i}=t??{};n?(n.inExpressionNodes.push(...r??[]),n.reports.push(...i??[])):i?.forEach(({finishReport:e})=>e()),t=n}},IfStatement(e){k(e.test)&&!A(e)&&D(e.test)},ImportExpression(e){let{source:t}=e;"SequenceExpression"===t.type?w(t)&&D(t):k(t)&&D(t)},LogicalExpression:j,MemberExpression(e){let t=e=>{let t=function e(t){return"MemberExpression"===t.type&&("NewExpression"===t.parent.type&&t.parent.callee===t||"object"in t.parent&&t.parent.object===t&&e(t.parent))}(e)&&_(e)?w(e.object):k(e.object)&&!(T(e.parent)&&"callee"in e.parent&&e.parent.callee===e&&f);t&&sy(e.object)>=sy(e)&&(e.computed||!(sx(e.object)||sh(e.object)))&&D(e.object),t&&"CallExpression"===e.object.type&&D(e.object),t&&!d&&"NewExpression"===e.object.type&&C(e.object)&&D(e.object),t&&e.optional&&"ChainExpression"===e.object.type&&D(e.object),e.computed&&k(e.property)&&D(e.property)};return t((0,sL.isTypeAssertion)(e.object)?{...e,object:{...e.object,type:ro.AST_NODE_TYPES.SequenceExpression}}:(0,sL.isTypeAssertion)(e.property)?{...e,property:{...e.property,type:ro.AST_NODE_TYPES.FunctionExpression}}:e)},MethodDefinition(e){e.computed&&v(e.key,y)&&D(e.key)},NewExpression:R,ObjectExpression(e){e.properties.forEach(e=>{"Property"===e.type&&e.value&&v(e.value,y)&&D(e.value)})},ObjectPattern(e){e.properties.forEach(({value:e})=>{e&&N(e)&&k(e)&&D(e)})},Property(e){if(e.computed){let{key:t}=e;t&&v(t,y)&&D(t)}},PropertyDefinition:$,AccessorProperty:$,RestElement(e){let t=e.argument;N(t)&&k(t)&&D(t)},ReturnStatement(e){let t=n.getFirstToken(e);!P(e)&&e.argument&&t&&I(t,e.argument)&&!sh(e.argument)&&D(e.argument)},SequenceExpression(e){let t=sy(e);e.expressions.forEach(e=>{v(e,t)&&D(e)})},SpreadElement(e){!((0,sL.isTypeAssertion)(e.argument)||g&&g.has(e.argument.type))&&v(e.argument,y)&&D(e.argument)},SwitchCase(e){e.test&&!(0,sL.isTypeAssertion)(e.test)&&k(e.test)&&D(e.test)},SwitchStatement(e){k(e.discriminant)&&D(e.discriminant)},TemplateLiteral(e){e.expressions.forEach(e=>{k(e)&&D(e)})},ThrowStatement(e){if(!e.argument||(0,sL.isTypeAssertion)(e.argument))return;let t=n.getFirstToken(e);t&&I(t,e.argument)&&D(e.argument)},UnaryExpression:V,UpdateExpression(e){if((0,sL.isTypeAssertion)(e.argument))return V(e);if(e.prefix)B(e);else{let{argument:t}=e,r=n.getLastToken(e);(0,sL.isTokenOnSameLine)(t,r)?B(e):w(t)&&D(t)}},VariableDeclarator(e){let t=e=>{e.init&&v(e.init,y)&&!sh(e.init)&&D(e.init)};return t((0,sL.isTypeAssertion)(e.init)?{...e,type:ro.AST_NODE_TYPES.VariableDeclarator,init:{...e.init,type:ro.AST_NODE_TYPES.FunctionExpression}}:e)},WhileStatement(e){k(e.test)&&!A(e)&&D(e.test)},WithStatement(e){k(e.object)&&D(e.object)},YieldExpression(e){if(!e.argument||(0,sL.isTypeAssertion)(e.argument))return;let t=n.getFirstToken(e);(sy(e.argument)>=sy(e)&&t&&I(t,e.argument)||w(e.argument))&&D(e.argument)},TSArrayType(e){v(e.elementType,sy(e))&&D(e.elementType)},TSIntersectionType:q,TSUnionType:q,TSTypeAnnotation(e){k(e.typeAnnotation)&&D(e.typeAnnotation)},TSTypeAliasDeclaration(e){k(e.typeAnnotation)&&D(e.typeAnnotation)},TSEnumMember(e){e.initializer&&k(e.initializer)&&D(e.initializer)}}}})}),a6=nH(()=>{sB(),sM(),sH(),tT=sF({name:"no-extra-semi",meta:{type:"layout",docs:{description:"Disallow unnecessary semicolons"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},defaultOptions:[],create(e){let t=e.sourceCode;function n(n){e.report({node:n,messageId:"unexpected",fix:!function(e){let n=t.getTokenAfter(e);return!n||"String"!==n.type||!sf(t.getNodeByRangeIndex(n.range[0]).parent)}(n)?null:t=>new k(t,e.sourceCode).retainSurroundingTokens(n).remove(n)})}function r(e){for(let r=e;"Punctuator"===r.type&&!(0,sL.isClosingBraceToken)(r);r=t.getTokenAfter(r))(0,sL.isSemicolonToken)(r)&&n(r)}return{EmptyStatement(e){["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(e.parent.type)||n(e)},ClassBody(e){r(t.getFirstToken(e,1))},MethodDefinition(e){r(t.getTokenAfter(e))},PropertyDefinition(e){r(t.getTokenAfter(e))},AccessorProperty(e){r(t.getTokenAfter(e))},StaticBlock(e){r(t.getTokenAfter(e))},TSAbstractMethodDefinition(e){r(t.getTokenAfter(e))},TSAbstractPropertyDefinition(e){r(t.getTokenAfter(e))}}}})}),a4=nH(()=>{sB(),sM(),tS=sF({name:"no-floating-decimal",meta:{type:"layout",docs:{description:"Disallow leading or trailing decimal points in numeric literals"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(e){let t=e.sourceCode;return{Literal(n){"number"==typeof n.value&&(n.raw.startsWith(".")&&e.report({node:n,messageId:"leading",fix(e){let r=t.getTokenBefore(n),i=r&&r.range[1]===n.range[0]&&!sE(r,`0${n.raw}`);return e.insertTextBefore(n,i?" 0":"0")}}),n.raw.indexOf(".")===n.raw.length-1&&e.report({node:n,messageId:"trailing",fix:e=>e.insertTextAfter(n,"0")}))}}}})});function a5(e){return"ConditionalExpression"===e.type?e.test:e.left}var a9=nH(()=>{sB(),sM(),tA=[].concat(tb=["+","-","*","/","%","**"],tE=["&","|","^","~","<<",">>",">>>"],tk=["==","!=","===","!==",">",">=","<","<="],tw=["&&","||"],tv=["in","instanceof"],["?:"],["??"]),tC=[tb,tE,tk,tw,tv],t_=/^(?:Binary|Logical|Conditional)Expression$/u,tO=sF({name:"no-mixed-operators",meta:{type:"layout",docs:{description:"Disallow mixed binary operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{type:"string",enum:tA},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(e){let t=e.sourceCode,n=function(e={}){return{groups:e.groups&&e.groups.length>0?e.groups:tC,allowSamePrecedence:!1!==e.allowSamePrecedence}}(e.options[0]);function r(e){return t.getTokenAfter(a5(e),sL.isNotClosingParenToken)}function i(i){var s;t_.test(i.parent.type)&&(s=i).operator!==s.parent.operator&&!si(t,s)&&!function(e){var t,r,i;let s=e.parent;return t=n.groups??[],r=e.operator,i="ConditionalExpression"===s.type?"?:":s.operator,!t.some(e=>e.includes(r)&&e.includes(i))||n.allowSamePrecedence&&sy(e)===sy(s)}(i)&&function(t){let n=t.parent,i=a5(n)===t?t:n,s=a5(n)!==t?t:n,a={leftOperator:i.operator||"?:",rightOperator:s.operator||"?:"};e.report({node:i,loc:r(i).loc,messageId:"unexpectedMixedOperator",data:a}),e.report({node:s,loc:r(s).loc,messageId:"unexpectedMixedOperator",data:a})}(i)}return{BinaryExpression:i,LogicalExpression:i}}})}),a8=nH(()=>{sM(),tP=sF({name:"no-mixed-spaces-and-tabs",meta:{type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation"},schema:[{oneOf:[{type:"string",enum:["smart-tabs"]},{type:"boolean"}]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(e){let t,n=e.sourceCode;switch(e.options[0]){case!0:case"smart-tabs":t=!0;break;default:t=!1}return{"Program:exit":function(r){let i=n.lines,s=n.getAllComments(),a=new Set;s.forEach(e=>{for(let t=e.loc.start.line+1;t<=e.loc.end.line;t++)a.add(t)});let o=/^(?=( +|\t+))\1(?:\t| )/u;t&&(o=/^(?=(\t*))\1(?=( +))\2\t/u),i.forEach((t,i)=>{let s=o.exec(t);if(s){let t=i+1,o={start:{line:t,column:s[0].length-2},end:{line:t,column:s[0].length}};if(!a.has(t)){let t=n.getNodeByRangeIndex(n.getIndexFromLoc(o.start));t&&["Literal","TemplateElement"].includes(t.type)||e.report({node:r,loc:o,messageId:"mixedSpacesAndTabs"})}}})}}}})}),a7=nH(()=>{sB(),sM(),tI=sF({name:"no-multi-spaces",meta:{type:"layout",docs:{description:"Disallow multiple spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1},includeTabs:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=n.ignoreEOLComments,i=Object.assign({Property:!0,ImportAttribute:!0},n.exceptions),s=Object.keys(i).some(e=>i[e]),a=!1===n.includeTabs?/ {2}/:/[ \t]{2}/;function o(e){let t=e.value.split("\n"),n=t[0],r=`${n.slice(0,12)}...`;return 1===t.length&&n.length<=12?n:r}return{Program(){t.tokensAndComments.forEach((n,l,p)=>{let c;if(l===p.length-1)return;let u=p[l+1];if(a.test(t.text.slice(n.range[1],u.range[0]))&&!(n.loc.end.line<u.loc.start.line)&&(!(r&&(0,sL.isCommentToken)(u))||l!==p.length-2&&!(u.loc.end.line<p[l+2].loc.start.line))){if(s){let e=t.getNodeByRangeIndex(u.range[0]-1);if(e&&i[e.type])return}c="Block"===u.type?`/*${o(u)}*/`:"Line"===u.type?`//${o(u)}`:u.value,e.report({node:u,loc:{start:n.loc.end,end:u.loc.start},messageId:"multipleSpaces",data:{displayValue:c},fix:e=>e.replaceTextRange([n.range[1],u.range[0]]," ")})}})}}}})}),oe=nH(()=>{sM(),tL=sF({name:"no-multiple-empty-lines",meta:{type:"layout",docs:{description:"Disallow multiple empty lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(e){let t=2,n=2,r=2;e.options.length&&e.options[0]&&(t=e.options[0].max,n=void 0!==e.options[0].maxEOF?e.options[0].maxEOF:t,r=void 0!==e.options[0].maxBOF?e.options[0].maxBOF:t);let i=e.sourceCode,s=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,a=new Set;return{TemplateLiteral(e){e.quasis.forEach(e=>{for(let t=e.loc.start.line;t<e.loc.end.line;t++)a.add(t)})},"Program:exit":function(o){return s.reduce((e,t,n)=>((t.trim()||a.has(n+1))&&e.push(n+1),e),[]).concat(s.length+1).reduce((a,l)=>{let p,c;return 0===a?(p="blankBeginningOfFile",c=r):l===s.length+1?(p="blankEndOfFile",c=n):(p="consecutiveBlank",c=t),l-a-1>c&&e.report({node:o,loc:{start:{line:a+c+1,column:0},end:{line:l,column:0}},messageId:p,data:{max:c,pluralizedLines:1===c?"line":"lines"},fix(e){let t=i.getIndexFromLoc({line:a+1,column:0}),n=l-c,r=n<=s.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),l},0)}}}})}),ot=nH(()=>{sM(),tN=/\t+/gu,tD=/\S/u,tB=sF({name:"no-tabs",meta:{type:"layout",docs:{description:"Disallow all tabs"},schema:[{type:"object",properties:{allowIndentationTabs:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedTab:"Unexpected tab character."}},create(e){let t=e.sourceCode,n=e.options&&e.options[0]&&e.options[0].allowIndentationTabs;return{Program(r){t.getLines().forEach((t,i)=>{let s;for(;null!==(s=tN.exec(t));)(!n||tD.test(t.slice(0,s.index)))&&e.report({node:r,loc:{start:{line:i+1,column:s.index},end:{line:i+1,column:s.index+s[0].length}},messageId:"unexpectedTab"})})}}}})}),on=nH(()=>{sB(),sM(),tj=sF({name:"no-trailing-spaces",meta:{type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(e){let t=e.sourceCode,n="[ \xa0 -​ ]",r=`^${n}*$`,i=`${n}+$`,s=e.options[0]||{},a=s.skipBlankLines||!1,o=s.ignoreComments||!1;return{Program:function(n){let s=RegExp(i,"u"),l=RegExp(r,"u"),p=t.lines,c=t.getText().match(i8()),u=function(e){let t=new Set;return e.forEach(e=>{let n="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let r=e.loc.start.line;r<=n;r++)t.add(r)}),t}(t.getAllComments()),d=0;for(let r=0,i=p.length;r<i;r++){let i=r+1,f=c&&c[r]?c[r].length:1,m=p[r].length+f,h=s.exec(p[r]);if(h){let s={start:{line:i,column:h.index},end:{line:i,column:m-f}},c=d+s.start.column,g=d+s.end.column,y=t.getNodeByRangeIndex(c);if(y&&"TemplateElement"===y.type&&c>y.parent.range[0]&&g<y.parent.range[1]||a&&l.test(p[r])){d+=m;continue}let x=[c,g];o&&u.has(i)||function(t,n,r){e.report({node:t,loc:n,messageId:"trailingSpace",fix:e=>e.removeRange(r)})}(n,s,x)}d+=m}}}}})}),or=nH(()=>{sB(),sM(),tR=sF({name:"no-whitespace-before-property",meta:{type:"layout",docs:{description:"Disallow whitespace before properties"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(e){let t=e.sourceCode;return{MemberExpression(n){let r,i;if((0,sL.isTokenOnSameLine)(n.object,n.property)){var s,a;n.computed?(r=t.getTokenBefore(n.property,sL.isOpeningBracketToken),i=t.getTokenBefore(r,+!!n.optional)):(r=t.getFirstToken(n.property),i=t.getTokenBefore(r,1)),t.isSpaceBetween(i,r)&&(s=i,a=r,e.report({node:n,messageId:"unexpectedWhitespace",data:{propName:t.getText(n.property)},fix(e){let r="";return!n.computed&&!n.optional&&sx(n.object)||t.commentsExistBetween(s,a)?null:(n.optional?r="?.":n.computed||(r="."),e.replaceTextRange([s.range[1],a.range[0]],r))}}))}}}}})}),oi=nH(()=>{sB(),sM(),tM=sF({name:"nonblock-statement-body-position",meta:{type:"layout",docs:{description:"Enforce the location of single-line statements"},fixable:"whitespace",schema:[tF={type:"string",enum:["beside","below","any"]},{type:"object",properties:{overrides:{type:"object",properties:{if:tF,else:tF,while:tF,do:tF,for:tF},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(e){let t=e.sourceCode;function n(n,r){let i=e.options[1]&&e.options[1].overrides&&e.options[1].overrides[r]||e.options[0]||"beside";if("BlockStatement"===n.type||"any"===i)return;let s=t.getTokenBefore(n),a=(0,sL.isTokenOnSameLine)(s,n);a&&"below"===i?e.report({node:n,messageId:"expectLinebreak",fix:e=>e.insertTextBefore(n,"\n")}):a||"beside"!==i||e.report({node:n,messageId:"expectNoLinebreak",fix:e=>t.getText().slice(s.range[1],n.range[0]).trim()?null:e.replaceTextRange([s.range[1],n.range[0]]," ")})}return{IfStatement(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:e=>n(e.body,"while"),DoWhileStatement:e=>n(e.body,"do"),ForStatement:e=>n(e.body,"for"),ForInStatement:e=>n(e.body,"for"),ForOfStatement:e=>n(e.body,"for")}}})}),os=nH(()=>{sB(),sM(),tq=sF({name:"object-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[tV={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{ObjectExpression:tV,ObjectPattern:tV,ImportDeclaration:tV,ExportDeclaration:tV,TSTypeLiteral:tV,TSInterfaceBody:tV,TSEnumBody:tV},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},defaultOptions:[{ObjectExpression:t$={multiline:!1,minProperties:1/0,consistent:!0},ObjectPattern:t$,ImportDeclaration:t$,ExportDeclaration:t$,TSTypeLiteral:t$,TSInterfaceBody:t$}],create(e){let t=e.sourceCode;function n(e){let t=!1,n=1/0,r=!1;return e?"always"===e?n=0:"never"===e?n=1/0:(t=!!e.multiline,n=e.minProperties||1/0,r=!!e.consistent):r=!0,{multiline:t,minProperties:n,consistent:r}}function r(e){return"object"==typeof e&&null!==e}function i(e){return r(e)||"string"==typeof e}let s=function(e){if(r(e)&&Object.values(e).some(i))return{ObjectExpression:n(e.ObjectExpression),ObjectPattern:n(e.ObjectPattern),ImportDeclaration:n(e.ImportDeclaration),ExportNamedDeclaration:n(e.ExportDeclaration),TSTypeLiteral:n(e.TSTypeLiteral),TSInterfaceBody:n(e.TSInterfaceBody),TSEnumBody:n(e.TSEnumBody)};let t=n(e);return{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportNamedDeclaration:t,TSTypeLiteral:t,TSInterfaceBody:t,TSEnumBody:t}}(e.options[0]);function a(n){var r,i;let a,o,l=s[n.type];if("ImportDeclaration"===n.type&&!n.specifiers.some(e=>"ImportSpecifier"===e.type)||"ExportNamedDeclaration"===n.type&&!n.specifiers.some(e=>"ExportSpecifier"===e.type))return;let p=t.getFirstToken(n,e=>"{"===e.value);a="ObjectPattern"===n.type&&n.typeAnnotation?t.getTokenBefore(n.typeAnnotation):t.getLastToken(n,e=>"}"===e.value);let c=t.getTokenAfter(p,{includeComments:!0}),u=t.getTokenBefore(a,{includeComments:!0}),d=(r=c,i=u,(o="ObjectExpression"===n.type||"ObjectPattern"===n.type?n.properties:"TSTypeLiteral"===n.type?n.members:"TSInterfaceBody"===n.type?n.body:"TSEnumBody"===n.type?n.members:n.specifiers.filter(e=>"ImportSpecifier"===e.type||"ExportSpecifier"===e.type)).length>=l.minProperties||l.multiline&&o.length>0&&!(0,sL.isTokenOnSameLine)(i,r)),f=(0,sL.isCommentToken)(c),m=(0,sL.isCommentToken)(u);if(c=t.getTokenAfter(p),u=t.getTokenBefore(a),d)(0,sL.isTokenOnSameLine)(p,c)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>f?null:e.insertTextAfter(p,"\n")}),(0,sL.isTokenOnSameLine)(u,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix:e=>m?null:e.insertTextBefore(a,"\n")});else{let t=l.consistent,r=!(0,sL.isTokenOnSameLine)(p,c),i=!(0,sL.isTokenOnSameLine)(u,a);(!t&&r||t&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>f?null:e.removeRange([p.range[1],c.range[0]])}),(!t&&i||t&&!r&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix:e=>m?null:e.removeRange([u.range[1],a.range[0]])})}}return{ObjectExpression:a,ObjectPattern:a,ImportDeclaration:a,ExportNamedDeclaration:a,TSTypeLiteral:a,TSInterfaceBody:a,TSEnumBody:a}}})}),oa=nH(()=>{sB(),sM(),tY=sF({name:"object-curly-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside braces"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},defaultOptions:["never"],create(e){let[t,n]=e.options,r="always"===t,i=e.sourceCode;function s(e){return!!n&&!r===n[e]}let a={spaced:r,arraysInObjectsException:s("arraysInObjects"),objectsInObjectsException:s("objectsInObjects")};function o(t,n,r){let s=i.getTokenAfter(n,{includeComments:!0});if((0,sL.isTokenOnSameLine)(n,s)){let r=i.isSpaceBetween(n,s),o=i.getNodeByRangeIndex(s.range[0]).type,l=a.arraysInObjectsException&&[ro.AST_NODE_TYPES.TSMappedType,ro.AST_NODE_TYPES.TSIndexSignature].includes(o)?!a.spaced:a.spaced;l&&!r&&e.report({node:t,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix:e=>e.insertTextAfter(n," ")}),!l&&r&&s.type!==ro.AST_TOKEN_TYPES.Line&&function(t,n){let r=i.getTokenAfter(n,{includeComments:!0});e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceAfter",data:{token:n.value},fix:e=>e.removeRange([n.range[1],r.range[0]])})}(t,n)}let o=i.getTokenBefore(r,{includeComments:!0});if((0,sL.isTokenOnSameLine)(o,r)){let n=a.arraysInObjectsException&&(0,sL.isClosingBracketToken)(o)||a.objectsInObjectsException&&(0,sL.isClosingBraceToken)(o)?i.getNodeByRangeIndex(o.range[0]).type:void 0,s=a.arraysInObjectsException&&[ro.AST_NODE_TYPES.ArrayExpression,ro.AST_NODE_TYPES.TSTupleType].includes(n)||a.objectsInObjectsException&&void 0!==n&&[ro.AST_NODE_TYPES.ObjectExpression,ro.AST_NODE_TYPES.ObjectPattern,ro.AST_NODE_TYPES.TSMappedType,ro.AST_NODE_TYPES.TSTypeLiteral].includes(n)?!a.spaced:a.spaced,l=i.isSpaceBetween(o,r);s&&!l&&e.report({node:t,loc:r.loc,messageId:"requireSpaceBefore",data:{token:r.value},fix:e=>e.insertTextBefore(r," ")}),!s&&l&&function(t,n){let r=i.getTokenBefore(n,{includeComments:!0});e.report({node:t,loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{token:n.value},fix:e=>e.removeRange([r.range[1],n.range[0]])})}(t,r)}}function l(e,t){if(0!==t.length)o(e,i.getTokenBefore(t[0],sL.isOpeningBraceToken),i.getTokenAfter(t.at(-1),sL.isClosingBraceToken))}return{ObjectPattern(e){l(e,e.properties)},ObjectExpression(e){l(e,e.properties)},ImportDeclaration(e){e.attributes&&l(e,e.attributes);let t=e.specifiers.findIndex(e=>"ImportSpecifier"===e.type);-1!==t&&l(e,e.specifiers.slice(t))},ExportNamedDeclaration(e){l(e,e.specifiers),e.attributes&&l(e,e.attributes)},ExportAllDeclaration(e){e.attributes&&l(e,e.attributes)},TSMappedType(e){let t=i.getFirstToken(e),n=i.getLastToken(e);o(e,t,n)},TSTypeLiteral(e){l(e,e.members)},TSInterfaceBody(e){l(e,e.body)},TSEnumBody(e){l(e,e.members)}}}})}),oo=nH(()=>{sB(),sM(),tX=sF({name:"object-property-newline",meta:{type:"layout",docs:{description:"Enforce placing object properties on separate lines"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},defaultOptions:[{allowAllPropertiesOnSameLine:!1}],create(e){let t=e.options[0]&&e.options[0].allowAllPropertiesOnSameLine,n=t?"propertiesOnNewlineAll":"propertiesOnNewline",r=e.sourceCode;function i(i,s){if(t&&s.length>1){let e=r.getFirstToken(s[0]),t=r.getLastToken(s[s.length-1]);if((0,sL.isTokenOnSameLine)(e,t))return}for(let t=1;t<s.length;t++){let a=r.getLastToken(s[t-1]),o=r.getFirstToken(s[t]);(0,sL.isTokenOnSameLine)(a,o)&&e.report({node:i,loc:o.loc,messageId:n,fix(e){let t=[r.getTokenBefore(o).range[1],o.range[0]];return r.text.slice(t[0],t[1]).trim()?null:e.replaceTextRange(t,"\n")}})}}return{ObjectExpression(e){i(e,e.properties)},TSTypeLiteral(e){i(e,e.members)},TSInterfaceBody(e){i(e,e.body)}}}})}),ol=nH(()=>{sB(),sM(),tJ=sF({name:"one-var-declaration-per-line",meta:{type:"layout",docs:{description:"Require or disallow newlines around variable declarations"},schema:[{type:"string",enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(e){let{sourceCode:t}=e,n="always"===e.options[0];return{VariableDeclaration:function(r){var i;let s;"ForStatement"!==(i=r.parent.type)&&"ForInStatement"!==i&&"ForOfStatement"!==i&&r.declarations.forEach(i=>{if(s&&(0,sL.isTokenOnSameLine)(s,i)&&(n||s.init||i.init)){let n=e=>e.insertTextBefore(i,"\n"),s=t.getTokenBefore(i,{includeComments:!1});if(s){let e=t.text.slice(s.range[1],i.range[0]);n=t=>t.replaceTextRange([s.range[1],i.range[0]],`${e}
23
- `)}e.report({node:r,messageId:"expectVarOnNewline",loc:i.loc,fix:n})}s=i})}}}})}),op=nH(()=>{sB(),sM(),tU=sF({name:"operator-linebreak",meta:{type:"layout",docs:{description:"Enforce consistent linebreak style for operators"},schema:[{oneOf:[{type:"string",enum:["after","before","none"]},{type:"null"}]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{type:"string",enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(e){let t=!e.options[0],n=e.options[0]||"after",r=e.options[1]||{},i=r.overrides?Object.assign({},r.overrides):{};t&&!i["?"]&&(i["?"]="before"),t&&!i[":"]&&(i[":"]="before");let s=e.sourceCode;function a(t,r,a){let o=s.getTokenBefore(r,e=>e.value===a),l=s.getTokenBefore(o),p=s.getTokenAfter(o),c=i[a],u=c||n,d=e=>{let t,n,r=s.getTokenBefore(o),i=s.getTokenAfter(o),a=s.text.slice(r.range[1],o.range[0]),l=s.text.slice(o.range[1],i.range[0]),p=!(0,sL.isTokenOnSameLine)(r,o);if(!(0,sL.isTokenOnSameLine)(o,i)!==p&&"none"!==u){if(s.getTokenBefore(o,{includeComments:!0})!==r&&s.getTokenAfter(o,{includeComments:!0})!==i)return null;t=l,n=a}else{let e=i8();if(t="before"===u||a.trim()?a:a.replace(e,""),n="after"===u||l.trim()?l:l.replace(e,""),t===a&&n===l)return null}return""===n&&"Punctuator"===i.type&&"+-".includes(o.value)&&i.value===o.value&&(n+=" "),e.replaceTextRange([r.range[1],i.range[0]],t+o.value+n)};(0,sL.isTokenOnSameLine)(l,o)&&(0,sL.isTokenOnSameLine)(o,p)||("ignore"===c||(0,sL.isTokenOnSameLine)(l,o)||(0,sL.isTokenOnSameLine)(o,p)?"before"===u&&(0,sL.isTokenOnSameLine)(l,o)?e.report({node:t,loc:o.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:d}):"after"===u&&(0,sL.isTokenOnSameLine)(o,p)?e.report({node:t,loc:o.loc,messageId:"operatorAtEnd",data:{operator:a},fix:d}):"none"===u&&e.report({node:t,loc:o.loc,messageId:"noLinebreak",data:{operator:a},fix:d}):e.report({node:t,loc:o.loc,messageId:"badLinebreak",data:{operator:a},fix:d}))}function o(e){a(e,e.right,e.operator)}return{BinaryExpression:o,LogicalExpression:o,AssignmentExpression:o,VariableDeclarator(e){e.init&&a(e,e.init,"=")},PropertyDefinition(e){e.value&&a(e,e.value,"=")},AccessorProperty(e){e.value&&a(e,e.value,"=")},ConditionalExpression(e){a(e,e.consequent,"?"),a(e,e.alternate,":")},TSImportEqualsDeclaration(e){a(e,e.moduleReference,"=")},TSTypeAliasDeclaration(e){a(e,e.typeAnnotation,"=")},TSConditionalType(e){a(e,e.trueType,"?"),a(e,e.falseType,":")},TSIntersectionType(e){let{types:t}=e;for(let e=0;e<t.length-1;e++)a(t[e],t[e+1],"&")},TSUnionType(e){let{types:t}=e;for(let e=0;e<t.length-1;e++)a(t[e],t[e+1],"|")},TSTypeParameter(e){e.default&&a(e,e.default,"=")},TSEnumMember(e){e.initializer&&a(e,e.initializer,"=")}}}})}),oc=nH(()=>{sB(),sM(),tK=sF({name:"padded-blocks",meta:{type:"layout",docs:{description:"Require or disallow padding within blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:tW=["always","never","start","end"]},{type:"object",properties:{blocks:{type:"string",enum:tW},switches:{type:"string",enum:tW},classes:{type:"string",enum:tW}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{missingPadBlock:"Block must be padded by blank lines.",extraPadBlock:"Block must not be padded by blank lines."}},create(e){let t={},n=e.options[0]||"always",r=e.options[1]||{};"string"==typeof n?(t.blocks=n,t.switches=n,t.classes=n):Object.assign(t,n),r.allowSingleLineBlocks??=!1;let i=e.sourceCode;function s(e){return"Line"===e.type||"Block"===e.type}function a(e,t){return t.loc.start.line-e.loc.end.line>=2}function o(n){let o=function(e){let t,n=e;do t=n,n=i.getTokenAfter(n,{includeComments:!0});while(s(n)&&(0,sL.isTokenOnSameLine)(t,n));return n}("SwitchStatement"===n.type?i.getTokenBefore(n.cases[0]):"StaticBlock"===n.type?i.getFirstToken(n,{skip:1}):i.getFirstToken(n)),l=i.getTokenBefore(o,{includeComments:!0}),p=function(e){let t,n=e;do t=n,n=i.getTokenBefore(n,{includeComments:!0});while(s(n)&&(0,sL.isTokenOnSameLine)(n,t));return n}(i.getLastToken(n)),c=i.getTokenAfter(p,{includeComments:!0}),u=a(l,o),d=a(p,c);if(r.allowSingleLineBlocks&&(0,sL.isTokenOnSameLine)(l,c))return;let f=function(e){switch(e.type){case"BlockStatement":case"StaticBlock":return t.blocks;case"SwitchStatement":return t.switches;case"ClassBody":return t.classes;default:throw Error("unreachable")}}(n);u?("never"===f||"end"===f)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.replaceTextRange([l.range[1],o.range[0]-o.loc.start.column],"\n"),messageId:"extraPadBlock"}):("always"===f||"start"===f)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.insertTextAfter(l,"\n"),messageId:"missingPadBlock"}),d?("never"===f||"start"===f)&&e.report({node:n,loc:{end:c.loc.start,start:p.loc.end},messageId:"extraPadBlock",fix:e=>e.replaceTextRange([p.range[1],c.range[0]-c.loc.start.column],"\n")}):("always"===f||"end"===f)&&e.report({node:n,loc:{end:c.loc.start,start:p.loc.end},fix:e=>e.insertTextBefore(c,"\n"),messageId:"missingPadBlock"})}let l={};return Object.prototype.hasOwnProperty.call(t,"switches")&&(l.SwitchStatement=function(e){0!==e.cases.length&&o(e)}),Object.prototype.hasOwnProperty.call(t,"blocks")&&(l.BlockStatement=function(e){0!==e.body.length&&o(e)},l.StaticBlock=l.BlockStatement),Object.prototype.hasOwnProperty.call(t,"classes")&&(l.ClassBody=function(e){0!==e.body.length&&o(e)}),l}})});function ou(e,t){return{test(n,r){let i=r.getFirstToken(n)?.value===t,s=Array.isArray(e)?e.includes(n.type):e===n.type;return i&&s}}}function od(e){return{test:t=>t.type===e}}function of(e){if(e.type===ro.AST_NODE_TYPES.ExpressionStatement){let t=sr(e.expression);if(t.type===ro.AST_NODE_TYPES.UnaryExpression&&(t=sr(t.argument)),t.type===ro.AST_NODE_TYPES.CallExpression){let e=t.callee;for(;e.type===ro.AST_NODE_TYPES.SequenceExpression;)e=e.expressions[e.expressions.length-1];return(0,sL.isFunction)(e)}}return!1}function om(e){if(e.type===ro.AST_NODE_TYPES.VariableDeclaration){let t=e.declarations[0];if(t?.init){let e=t?.init;for(;e.type===ro.AST_NODE_TYPES.MemberExpression;)e=e.object;if(e.type===ro.AST_NODE_TYPES.CallExpression&&e.callee.type===ro.AST_NODE_TYPES.Identifier)return"require"===e.callee.name}}return!1}function oh(e,t){if(e.type===ro.AST_NODE_TYPES.DoWhileStatement&&e.body.type===ro.AST_NODE_TYPES.BlockStatement||of(e))return!0;let n=t.getLastToken(e,sL.isNotSemicolonToken),r=n&&(0,sL.isClosingBraceToken)(n)?t.getNodeByRangeIndex(n.range[0]):null;return!!r&&(r.type===ro.AST_NODE_TYPES.BlockStatement||r.type===ro.AST_NODE_TYPES.SwitchStatement)}function og(e,t){return sf(e)&&e.expression.type===ro.AST_NODE_TYPES.Literal&&"string"==typeof e.expression.value&&!(0,sL.isParenthesized)(e.expression,t)}function oy(e,t){if(og(e,t)&&e.parent&&"body"in e.parent&&Array.isArray(e.parent.body)){for(let n of e.parent.body){if(n===e)break;if(!og(n,t))return!1}return!0}return!1}function ox(e){if(e.type===ro.AST_NODE_TYPES.ExpressionStatement){let t=e.expression;if(t.type===ro.AST_NODE_TYPES.AssignmentExpression){let e=t.left;if(e.type===ro.AST_NODE_TYPES.MemberExpression){for(;e.object.type===ro.AST_NODE_TYPES.MemberExpression;)e=e.object;return e.object.type===ro.AST_NODE_TYPES.Identifier&&("exports"===e.object.name||"module"===e.object.name&&e.property.type===ro.AST_NODE_TYPES.Identifier&&"exports"===e.property.name)}}}return!1}function oT(e,t){return e.type===ro.AST_NODE_TYPES.ExpressionStatement&&!oy(e,t)}function oS(e,t){let n=t.getLastToken(e),r=t.getTokenBefore(n),i=t.getTokenAfter(n);return r&&i&&r.range[0]>=e.range[0]&&(0,sL.isSemicolonToken)(n)&&!(0,sL.isTokenOnSameLine)(r,n)&&(0,sL.isTokenOnSameLine)(n,i)?r:n}function ob(e,t,n){return t+n}function oE(){}function ok(e,t,n,r){0!==r.length&&e.report({node:n,messageId:"unexpectedBlankLine",fix(t){if(r.length>=2)return null;let n=r[0][0],i=r[0][1],s=n.range[1],a=i.range[0],o=e.getSourceCode().text.slice(s,a).replace(tQ,ob);return t.replaceTextRange([s,a],o)}})}function ow(e,t,n,r){r.length>0||e.report({node:n,messageId:"expectedBlankLine",fix(r){let i=e.sourceCode,s=oS(t,i),a=i.getFirstTokenBetween(s,n,{includeComments:!0,filter:e=>!(0,sL.isTokenOnSameLine)(s,e)||(s=e,!1)})||n,o=(0,sL.isTokenOnSameLine)(s,a)?"\n\n":"\n";return r.insertTextAfter(s,o)}})}var ov=nH(()=>{sB(),sM(),tH=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,tG=/^require\(/u,tz=`[${Array.from(m).join("")}]`,tQ=RegExp(String.raw`^(\s*?${tz})\s*${tz}(\s*;?)$`,"u"),tZ={any:{verify:oE},never:{verify:ok},always:{verify:ow}},t0={"block-like":{test:oh},expression:{test:oT},export:ou([ro.AST_NODE_TYPES.ExportAllDeclaration,ro.AST_NODE_TYPES.ExportDefaultDeclaration,ro.AST_NODE_TYPES.ExportNamedDeclaration],"export"),var:ou(ro.AST_NODE_TYPES.VariableDeclaration,"var"),let:ou(ro.AST_NODE_TYPES.VariableDeclaration,"let"),const:ou(ro.AST_NODE_TYPES.VariableDeclaration,"const"),using:{test:e=>"VariableDeclaration"===e.type&&("using"===e.kind||"await using"===e.kind)}},t1={"*":{test:()=>!0},exports:{test:ox},require:{test:om},directive:{test:oy},iife:{test:of},block:od(ro.AST_NODE_TYPES.BlockStatement),empty:od(ro.AST_NODE_TYPES.EmptyStatement),function:od(ro.AST_NODE_TYPES.FunctionDeclaration),"ts-method":od(ro.AST_NODE_TYPES.TSMethodSignature),break:ou(ro.AST_NODE_TYPES.BreakStatement,"break"),case:ou(ro.AST_NODE_TYPES.SwitchCase,"case"),class:ou(ro.AST_NODE_TYPES.ClassDeclaration,"class"),continue:ou(ro.AST_NODE_TYPES.ContinueStatement,"continue"),debugger:ou(ro.AST_NODE_TYPES.DebuggerStatement,"debugger"),default:ou([ro.AST_NODE_TYPES.SwitchCase,ro.AST_NODE_TYPES.ExportDefaultDeclaration],"default"),do:ou(ro.AST_NODE_TYPES.DoWhileStatement,"do"),for:ou([ro.AST_NODE_TYPES.ForStatement,ro.AST_NODE_TYPES.ForInStatement,ro.AST_NODE_TYPES.ForOfStatement],"for"),if:ou(ro.AST_NODE_TYPES.IfStatement,"if"),import:ou(ro.AST_NODE_TYPES.ImportDeclaration,"import"),return:ou(ro.AST_NODE_TYPES.ReturnStatement,"return"),switch:ou(ro.AST_NODE_TYPES.SwitchStatement,"switch"),throw:ou(ro.AST_NODE_TYPES.ThrowStatement,"throw"),try:ou(ro.AST_NODE_TYPES.TryStatement,"try"),while:ou([ro.AST_NODE_TYPES.WhileStatement,ro.AST_NODE_TYPES.DoWhileStatement],"while"),with:ou(ro.AST_NODE_TYPES.WithStatement,"with"),"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&tH.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&!!e.declarations[0].init&&tG.test(t.getText(e.declarations[0].init))},enum:ou(ro.AST_NODE_TYPES.TSEnumDeclaration,"enum"),interface:ou(ro.AST_NODE_TYPES.TSInterfaceDeclaration,"interface"),type:ou(ro.AST_NODE_TYPES.TSTypeAliasDeclaration,"type"),"function-overload":od(ro.AST_NODE_TYPES.TSDeclareFunction),...Object.fromEntries(Object.entries(t0).flatMap(([e,t])=>[[e,t],[`singleline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&s_(e)}],[`multiline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&!s_(e)}]]))},t2=sF({name:"padding-line-between-statements",meta:{type:"layout",docs:{description:"Require or disallow padding lines between statements"},fixable:"whitespace",hasSuggestions:!1,schema:{$defs:{paddingType:{type:"string",enum:Object.keys(tZ)},statementType:{type:"string",enum:Object.keys(t1)},statementOption:{anyOf:[{$ref:"#/$defs/statementType"},{type:"array",items:{$ref:"#/$defs/statementType"},minItems:1,uniqueItems:!0,additionalItems:!1}]}},type:"array",additionalItems:!1,items:{type:"object",properties:{blankLine:{$ref:"#/$defs/paddingType"},prev:{$ref:"#/$defs/statementOption"},next:{$ref:"#/$defs/statementOption"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},defaultOptions:[],create(e){let t=e.sourceCode,n=e.options||[],r=null;function i(){r={upper:r,prevNode:null}}function s(){r&&(r=r.upper)}function a(e,n){let r=e;for(;r.type===ro.AST_NODE_TYPES.LabeledStatement;)r=r.body;return Array.isArray(n)?n.some(a.bind(null,r)):t1[n].test(r,t)}function o(i){if(!i.parent||![ro.AST_NODE_TYPES.BlockStatement,ro.AST_NODE_TYPES.Program,ro.AST_NODE_TYPES.StaticBlock,ro.AST_NODE_TYPES.SwitchCase,ro.AST_NODE_TYPES.SwitchStatement,ro.AST_NODE_TYPES.TSInterfaceBody,ro.AST_NODE_TYPES.TSModuleBlock,ro.AST_NODE_TYPES.TSTypeLiteral].includes(i.parent.type))return;let s=r.prevNode;if(s){let r=function(e,t){for(let r=n.length-1;r>=0;--r){let i=n[r];if(a(e,i.prev)&&a(t,i.next))return tZ[i.blankLine]}return tZ.any}(s,i),o=function(e,n){let r=[],i=oS(e,t);if(n.loc.start.line-i.loc.end.line>=2)do{let e=t.getTokenAfter(i,{includeComments:!0});e.loc.start.line-i.loc.end.line>=2&&r.push([i,e]),i=e}while(i.range[0]<n.range[0]);return r}(s,i);r.verify(e,s,i,o)}r.prevNode=i}function l(e){o(e),i()}return{Program:i,BlockStatement:i,SwitchStatement:i,StaticBlock:i,TSInterfaceBody:i,TSModuleBlock:i,TSTypeLiteral:i,"Program:exit":s,"BlockStatement:exit":s,"SwitchStatement:exit":s,"StaticBlock:exit":s,"TSInterfaceBody:exit":s,"TSModuleBlock:exit":s,"TSTypeLiteral:exit":s,":statement":o,SwitchCase:l,TSDeclareFunction:l,TSMethodSignature:l,"SwitchCase:exit":s,"TSDeclareFunction:exit":s,"TSMethodSignature:exit":s}}})}),oA=nH(()=>{sB(),sM(),t3=sF({name:"quote-props",meta:{type:"layout",docs:{description:"Require quotes around object literal, type literal, interfaces and enums property names"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},defaultOptions:["always"],create(e){let t=e.options[0],n=e.options[1]&&e.options[1].keywords,r=!e.options[1]||!1!==e.options[1].unnecessary,i=e.options[1]&&e.options[1].numbers,s=e.sourceCode;function a(e){return T.includes(e)}function o(e,t,n=!1){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].includes(t[0].type)||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function l(e){return"Identifier"===e.type?e.name:e.value}function p(e){return sm(e)?s.getText(e):`"${"Identifier"===e.type?e.name:e.value}"`}function c(t){if("Property"===t.type&&(t.method||t.computed||t.shorthand)||"ImportAttribute"!==t.type&&t.computed)return;let s="TSEnumMember"===t.type?t.id:t.key;if("Literal"===s.type&&"string"==typeof s.value){let p;try{p=i0(s.value)}catch{return}if(1!==p.length||a(p[0].value)&&n)return;r&&o(s.value,p,i)&&e.report({node:t,messageId:"unnecessarilyQuotedProperty",data:{property:s.value},fix:e=>e.replaceText(s,l(s))})}else n&&"Identifier"===s.type&&a(s.name)?e.report({node:t,messageId:"unquotedReservedProperty",data:{property:s.name},fix:e=>e.replaceText(s,p(s))}):i&&sb(s)&&e.report({node:t,messageId:"unquotedNumericProperty",data:{property:s.value},fix:e=>e.replaceText(s,p(s))})}function u(t){if("Property"===t.type&&(t.method||t.computed||t.shorthand)||"ImportAttribute"!==t.type&&t.computed)return;let n="TSEnumMember"===t.type?t.id:t.key;("Literal"!==n.type||"string"!=typeof n.value)&&e.report({node:t,messageId:"unquotedPropertyFound",data:{property:n.name||n.value},fix:e=>e.replaceText(n,p(n))})}function d(e,t){m(e.filter(e=>"SpreadElement"!==e.type&&e.key&&!e.method&&!e.computed&&!e.shorthand),t)}function f(e){e&&("consistent"===t&&m(e,!1),"consistent-as-needed"===t&&m(e,!0))}function m(t,r){let i=[],s=[],c=null,u=!1;t.forEach(e=>{let t=e.key;if("Literal"===t.type&&"string"==typeof t.value){if(i.push(e),r){let e;try{e=i0(t.value)}catch{u=!0;return}u=u||!o(t.value,e)||n&&a(e[0].value)}}else n&&r&&"Identifier"===t.type&&a(t.name)?(s.push(e),u=!0,c=t.name):s.push(e)}),r&&i.length&&!u?i.forEach(t=>{let n=t.key;e.report({node:t,messageId:"redundantQuoting",fix:e=>e.replaceText(n,l(n))})}):s.length&&c?s.forEach(t=>{e.report({node:t,messageId:"requireQuotesDueToReservedWord",data:{property:c},fix:e=>e.replaceText(t.key,p(t.key))})}):i.length&&s.length&&s.forEach(t=>{e.report({node:t,messageId:"inconsistentlyQuotedProperty",data:{key:t.key.name||t.key.value},fix:e=>e.replaceText(t.key,p(t.key))})})}return{Property(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ObjectExpression(e){"consistent"===t&&d(e.properties,!1),"consistent-as-needed"===t&&d(e.properties,!0)},ImportAttribute(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ImportDeclaration(e){f(e.attributes)},ExportAllDeclaration(e){f(e.attributes)},ExportNamedDeclaration(e){f(e.attributes)},TSPropertySignature(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},TSEnumMember(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},TSTypeLiteral(e){"consistent"===t&&d(e.members,!1),"consistent-as-needed"===t&&d(e.members,!0)},TSInterfaceBody(e){"consistent"===t&&d(e.body,!1),"consistent-as-needed"===t&&d(e.body,!0)},TSEnumDeclaration(e){let n=(e.body?.members||e.members).map(e=>({...e,key:e.id}));"consistent"===t&&d(n,!1),"consistent-as-needed"===t&&d(n,!0)}}}})});function oC(e){let t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(e,r,i)=>r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?`\\${e}`:i&&"`"===n?"\\n":e)+t}var o_=nH(()=>{sB(),sM(),t6={double:{quote:'"',alternateQuote:"'",description:"doublequote",convert:oC},single:{quote:"'",alternateQuote:'"',description:"singlequote",convert:oC},backtick:{quote:"`",alternateQuote:'"',description:"backtick",convert:oC}},t4=RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(m).join("")}]`,"u"),t5=sF({name:"quotes",meta:{type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes"},fixable:"code",schema:[{type:"string",enum:["single","double","backtick"]},{anyOf:[{type:"string",enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{anyOf:[{type:"boolean"},{type:"string",enum:["never","avoidEscape","always"]}]},ignoreStringLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},defaultOptions:["double",{allowTemplateLiterals:"never",avoidEscape:!1,ignoreStringLiterals:!1}],create(e){let t=e.options[0],n=t6[t||"double"],r=e.options[1],i=e.sourceCode,s=!1,a=!1,o=!1,l=!1;return"object"==typeof r?(s=!0===r.avoidEscape,a=!0===r.ignoreStringLiterals,"string"==typeof r.allowTemplateLiterals?l=(o="always"===r.allowTemplateLiterals)||"avoidEscape"===r.allowTemplateLiterals:"boolean"==typeof r.allowTemplateLiterals&&(i9('value(boolean) for "allowTemplateLiterals"','"always"/"never"',"quotes"),o=!0===r.allowTemplateLiterals,l=!0===r.allowTemplateLiterals)):"avoid-escape"===r&&(i9('option("avoid-escape")','"avoidEscape"',"quotes"),s=!0),{Literal(r){if(a)return;let o=r.value,l=r.raw;if(n&&"string"==typeof o){let a="backtick"===t&&function(e){let t=e.parent;if(!t)return!1;switch(t.type){case ro.AST_NODE_TYPES.ExpressionStatement:return!si(i,e)&&function(e){if(!e.parent||!sf(e.parent))return!1;let t=e.parent.parent;if(!t||!("body"in t)||!Array.isArray(t.body))return!1;for(let n=0;n<t.body.length;++n){let r=t.body[n];if(r===e.parent)return!0;if(!("ExpressionStatement"===r.type&&"Literal"===r.expression.type&&"string"==typeof r.expression.value&&!si(i,r.expression)))break}return!1}(e);case ro.AST_NODE_TYPES.Property:case ro.AST_NODE_TYPES.MethodDefinition:return t.key===e&&!t.computed;case ro.AST_NODE_TYPES.ImportDeclaration:case ro.AST_NODE_TYPES.ExportNamedDeclaration:return t.source===e;case ro.AST_NODE_TYPES.ExportAllDeclaration:return t.exported===e||t.source===e;case ro.AST_NODE_TYPES.ImportSpecifier:return t.imported===e;case ro.AST_NODE_TYPES.ExportSpecifier:return t.local===e||t.exported===e;case ro.AST_NODE_TYPES.ImportAttribute:return t.value===e;case ro.AST_NODE_TYPES.TSAbstractMethodDefinition:case ro.AST_NODE_TYPES.TSMethodSignature:case ro.AST_NODE_TYPES.TSPropertySignature:case ro.AST_NODE_TYPES.TSModuleDeclaration:case ro.AST_NODE_TYPES.TSExternalModuleReference:return!0;case ro.AST_NODE_TYPES.TSEnumMember:return e===t.id;case ro.AST_NODE_TYPES.TSAbstractPropertyDefinition:case ro.AST_NODE_TYPES.PropertyDefinition:case ro.AST_NODE_TYPES.AccessorProperty:return t.key===e&&!t.computed;case ro.AST_NODE_TYPES.TSLiteralType:return t.parent?.type===ro.AST_NODE_TYPES.TSImportType;default:return!1}}(r)||!!r.parent&&("JSXAttribute"===r.parent.type||"JSXElement"===r.parent.type||"JSXFragment"===r.parent.type)||sg(l,n.quote);!a&&s&&(a=sg(l,n.alternateQuote)&&l.includes(n.quote)),a||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>"backtick"===t&&sk(l)?null:e.replaceText(r,n.convert(r.raw))})}},TemplateLiteral(r){!(o||"backtick"===t||"TaggedTemplateExpression"===r.parent.type&&r===r.parent.quasi||r.expressions.length>0||r.quasis.length>=1&&t4.test(r.quasis[0].value.raw))&&(l&&s&&i.getText(r).includes(n.quote)||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>sf(r.parent)&&!si(i,r)?null:e.replaceText(r,n.convert(i.getText(r)))}))}}}})}),oO=nH(()=>{sM(),t9=sF({name:"rest-spread-spacing",meta:{type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(e){let t=e.sourceCode,n="always"===e.options[0];function r(r){let i,s=t.getFirstToken(r),a=t.getTokenAfter(s),o=t.isSpaceBetween(s,a);switch(r.type){case"SpreadElement":i="spread","ObjectExpression"===r.parent.type&&(i+=" property");break;case"RestElement":i="rest","ObjectPattern"===r.parent.type&&(i+=" property");break;default:return}n&&!o?e.report({node:r,loc:s.loc,messageId:"expectedWhitespace",data:{type:i},fix:e=>e.replaceTextRange([s.range[1],a.range[0]]," ")}):!n&&o&&e.report({node:r,loc:{start:s.loc.end,end:a.loc.start},messageId:"unexpectedWhitespace",data:{type:i},fix:e=>e.removeRange([s.range[1],a.range[0]])})}return{SpreadElement:r,RestElement:r}}})}),oP=nH(()=>{sB(),sM(),t8=sF({name:"semi-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(e){let t=e.options[0],n=e.sourceCode,r=!1,i=!0;function s(t,s){if((0,sL.isSemicolonToken)(t)){if(function(e){let t=n.getTokenBefore(e);return t&&(0,sL.isTokenOnSameLine)(t,e)&&n.isSpaceBetween(t,e)}(t)){if(!r){let r=n.getTokenBefore(t),i={start:r.loc.end,end:t.loc.start};e.report({node:s,loc:i,messageId:"unexpectedWhitespaceBefore",fix:e=>e.removeRange([r.range[1],t.range[0]])})}}else if(r){let n=t.loc;e.report({node:s,loc:n,messageId:"missingWhitespaceBefore",fix:e=>e.insertTextBefore(t," ")})}if(!function(e){let t=n.getTokenBefore(e);return!(t&&(0,sL.isTokenOnSameLine)(e,t))}(t)&&!function(e){let t=n.getTokenAfter(e);return!(t&&(0,sL.isTokenOnSameLine)(e,t))}(t)&&!function(e){let t=n.getTokenAfter(e);return t&&(0,sL.isClosingBraceToken)(t)||(0,sL.isClosingParenToken)(t)}(t)){if(function(e){let t=n.getTokenAfter(e);return t&&(0,sL.isTokenOnSameLine)(e,t)&&n.isSpaceBetween(e,t)}(t)){if(!i){let r=n.getTokenAfter(t),i={start:t.loc.end,end:r.loc.start};e.report({node:s,loc:i,messageId:"unexpectedWhitespaceAfter",fix:e=>e.removeRange([t.range[1],r.range[0]])})}}else if(i){let n=t.loc;e.report({node:s,loc:n,messageId:"missingWhitespaceAfter",fix:e=>e.insertTextAfter(t," ")})}}}}function a(e){s(n.getLastToken(e),e)}return"object"==typeof t&&(r=t.before,i=t.after),{VariableDeclaration:a,ExpressionStatement:a,BreakStatement:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ReturnStatement:a,ThrowStatement:a,ImportDeclaration:a,ExportNamedDeclaration:a,ExportAllDeclaration:a,ExportDefaultDeclaration:a,ForStatement(e){e.init&&s(n.getTokenAfter(e.init),e),e.test&&s(n.getTokenAfter(e.test),e)},PropertyDefinition:a,AccessorProperty:a,TSDeclareFunction:a,TSTypeAliasDeclaration:a,TSTypeAnnotation(e){let t=new Set([ro.AST_NODE_TYPES.TSDeclareFunction]);e.parent&&!t.has(e.parent.type)&&a(e.parent)}}}})}),oI=nH(()=>{sB(),sM(),t7=sF({name:"semi-style",meta:{type:"layout",docs:{description:"Enforce location of semicolons"},schema:[{type:"string",enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(e){let t=e.sourceCode,n=e.options[0]||"last";function r(n,r){let i=t.getTokenBefore(n),s=t.getTokenAfter(n),a=!i||(0,sL.isTokenOnSameLine)(i,n),o=!s||(0,sL.isTokenOnSameLine)(n,s);("last"!==r||a)&&("first"!==r||o)||e.report({loc:n.loc,messageId:"expectedSemiColon",data:{pos:"last"===r?"the end of the previous line":"the beginning of the next line"},fix(e){if(i&&s&&t.commentsExistBetween(i,s))return null;let a=i?i.range[1]:n.range[0],o=s?s.range[0]:n.range[1];return e.replaceTextRange([a,o],"last"===r?";\n":"\n;")}})}return{"BreakStatement,ContinueStatement,DebuggerStatement,DoWhileStatement,ExportAllDeclaration,ExportDefaultDeclaration,ExportNamedDeclaration,ExpressionStatement,ImportDeclaration,ReturnStatement,ThrowStatement,VariableDeclaration,PropertyDefinition,AccessorProperty"(e){if("first"===n&&function(e){if(!e.parent)return!0;let t=e.parent.type;if("IfStatement"===t&&e.parent.consequent===e&&e.parent.alternate||"DoWhileStatement"===t)return!0;let n=function(e){let t=e.type;return"BlockStatement"===t||"StaticBlock"===t||"Program"===t||"ClassBody"===t?e.body:"SwitchCase"===t?e.consequent:null}(e.parent);return null!==n&&n[n.length-1]===e}(e))return;let i=t.getLastToken(e);(0,sL.isSemicolonToken)(i)&&r(i,n)},ForStatement(e){let n=e.init&&t.getTokenAfter(e.init,sL.isSemicolonToken),i=e.test&&t.getTokenAfter(e.test,sL.isSemicolonToken);n&&r(n,"last"),i&&r(i,"last")}}}})}),oL=nH(()=>{sB(),sM(),sH(),ne=sF({name:"semi",meta:{type:"layout",docs:{description:"Require or disallow semicolons instead of ASI"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{type:"string",enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{type:"string",enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},defaultOptions:["always",{omitLastInOneLineBlock:!1,beforeStatementContinuationChars:"any"}],create(e){let t=/^[-[(/+`]/u,n=new Set(["get","set","static"]),r=new Set(["*","in","instanceof"]),i=e.options[1],s="never"===e.options[0],a=!!(i&&"omitLastInOneLineBlock"in i&&i.omitLastInOneLineBlock),o=!!(i&&"omitLastInOneLineClassBody"in i&&i.omitLastInOneLineClassBody),l=i&&"beforeStatementContinuationChars"in i&&i.beforeStatementContinuationChars||"any",p=e.sourceCode;function c(t,n=!1){let r,i,s=p.getLastToken(t),a="missingSemi";n?(a="extraSemi",i=s.loc,r=function(e){return new k(e,p).retainSurroundingTokens(s).remove(s)}):(i={start:s.loc.end,end:sS(p,s.loc.end)},r=function(e){return e.insertTextAfter(s,";")}),e.report({node:t,loc:i,messageId:a,fix:r})}function u(e){return!!e&&t.test(e.value)&&"++"!==e.value&&"--"!==e.value}function d(e){let t=p.getLastToken(e),i=(0,sL.isSemicolonToken)(t);if(s){let t=p.getTokenAfter(e);!i||(!function(e){let t=p.getTokenAfter(e);return!t||(0,sL.isClosingBraceToken)(t)||(0,sL.isSemicolonToken)(t)}(p.getLastToken(e))?function(e){if("PropertyDefinition"!==e.type)return!1;if(!e.computed&&"Identifier"===e.key.type&&"name"in e.key&&n.has(e.key.name)&&!(e.static&&"static"===e.key.name)&&!e.value)return!0;let t=p.getTokenAfter(e);return r.has(t.value)}(e)||function(e){let t=p.getLastToken(e,1),n=p.getTokenAfter(e);return!!n&&(0,sL.isTokenOnSameLine)(t,n)}(e)||("PropertyDefinition"===e.type||"never"!==l||function(e){let t=e.type;return"DoWhileStatement"!==t&&"BreakStatement"!==t&&"ContinueStatement"!==t&&"DebuggerStatement"!==t&&"ImportDeclaration"!==t&&"ExportAllDeclaration"!==t&&("ReturnStatement"===t?!!e.argument:"ExportNamedDeclaration"===t?!!e.declaration:!function(e){if(!(0,sL.isClosingBraceToken)(e))return!1;let t=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===t.type&&"ArrowFunctionExpression"===t.parent.type}(p.getLastToken(e,1)))}(e))&&u(p.getTokenAfter(e))?1:0:0)?!i&&"always"===l&&"PropertyDefinition"!==e.type&&u(t)&&c(e):c(e,!0)}else{let t=a&&function(e){let t=e.parent,n=p.getTokenAfter(e);if(!n||"}"!==n.value)return!1;if("BlockStatement"===t.type)return s_(t);if("StaticBlock"===t.type){let e=p.getFirstToken(t,{skip:1});return(0,sL.isTokenOnSameLine)(t,e)}return!1}(e),n=o&&function(e){let t=e.parent,n=p.getTokenAfter(e);return!!n&&"}"===n.value&&"ClassBody"===t.type&&s_(t)}(e),r=t||n;i&&r?c(e,!0):i||r||c(e)}}return{VariableDeclaration(e){let t=e.parent;"ForStatement"===t.type&&t.init===e||/^For(?:In|Of)Statement/u.test(t.type)&&t.left===e||d(e)},ExpressionStatement:d,ReturnStatement:d,ThrowStatement:d,DoWhileStatement:d,DebuggerStatement:d,BreakStatement:d,ContinueStatement:d,ImportDeclaration:d,ExportAllDeclaration:d,ExportNamedDeclaration(e){e.declaration||d(e)},ExportDefaultDeclaration(e){e.declaration.type!==ro.AST_NODE_TYPES.TSInterfaceDeclaration&&(/(?:Class|Function)Declaration/u.test(e.declaration.type)||d(e))},PropertyDefinition:d,AccessorProperty:d,TSAbstractPropertyDefinition:d,TSDeclareFunction:d,TSExportAssignment:d,TSImportEqualsDeclaration:d,TSTypeAliasDeclaration:d,TSEmptyBodyFunctionExpression:d}}})}),oN=nH(()=>{sB(),sM(),nt=sF({name:"space-before-blocks",meta:{type:"layout",docs:{description:"Enforce consistent spacing before blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{keywords:{type:"string",enum:["always","never","off"]},functions:{type:"string",enum:["always","never","off"]},classes:{type:"string",enum:["always","never","off"]},modules:{type:"string",enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r=!0,i=!0,s=!0,a=!0,o=!1,l=!1,p=!1,c=!1;function u(e){if(!("parent"in e))return!1;let t=e.parent;return"BlockStatement"===e.type&&(0,sL.isFunction)(t)&&t.body===e}function d(t){let d=n.getTokenBefore(t);if(d&&!((0,sL.isArrowToken)(d)||so(d)&&!u(t)||(0,sL.isColonToken)(d)&&"parent"in t&&t.parent&&"SwitchCase"===t.parent.type&&d===sd(t.parent,n))&&(0,sL.isTokenOnSameLine)(d,t)){let f,m,h=n.isSpaceBetween(d,t);u(t)?(f=r,m=o):"ClassBody"===t.type||"TSEnumBody"===t.type||"TSInterfaceBody"===t.type?(f=s,m=p):"TSModuleBlock"===t.type?(f=a,m=c):(f=i,m=l),f&&!h?e.report({node:t,messageId:"missingSpace",fix:e=>e.insertTextBefore(t," ")}):m&&h&&e.report({node:t,messageId:"unexpectedSpace",fix:e=>e.removeRange([d.range[1],t.range[0]])})}}return"object"==typeof t?(r="always"===t.functions,i="always"===t.keywords,s="always"===t.classes,a="always"===t.modules,o="never"===t.functions,l="never"===t.keywords,p="never"===t.classes,c="never"===t.modules):"never"===t&&(r=!1,i=!1,s=!1,a=!1,o=!0,l=!0,p=!0,c=!0),{BlockStatement:d,ClassBody:d,SwitchStatement(e){let t=e.cases;d(t.length>0?n.getTokenBefore(t[0]):n.getLastToken(e,1))},TSEnumBody:d,TSInterfaceBody:d,TSModuleBlock:d}}})}),oD=nH(()=>{sB(),sM(),nn=sF({name:"space-before-function-paren",meta:{type:"layout",docs:{description:"Enforce consistent spacing before function parenthesis"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{anonymous:{type:"string",enum:["always","never","ignore"]},named:{type:"string",enum:["always","never","ignore"]},asyncArrow:{type:"string",enum:["always","never","ignore"]},catch:{type:"string",enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r="string"==typeof t?t:"always",i="object"==typeof t?t:{};function s(e){let t,s,o=function(e){if(e.type===ro.AST_NODE_TYPES.ArrowFunctionExpression){if(e.async&&(0,sL.isOpeningParenToken)(n.getFirstToken(e,{skip:1})))return i.asyncArrow??r}else if(function(e){if(null!=e.id)return!0;let t=e.parent;return t.type===ro.AST_NODE_TYPES.MethodDefinition||t.type===ro.AST_NODE_TYPES.TSAbstractMethodDefinition||t.type===ro.AST_NODE_TYPES.Property&&("get"===t.kind||"set"===t.kind||t.method)}(e))return i.named??r;else if(!e.generator)return i.anonymous??r;return"ignore"}(e);"ignore"!==o&&("always"!==o||!e.typeParameters||e.id)&&(e.typeParameters?(t=n.getLastToken(e.typeParameters),s=n.getTokenAfter(t)):(s=n.getFirstToken(e,sL.isOpeningParenToken),t=n.getTokenBefore(s)),a(e,t,s,o))}function a(t,r,i,s){let a=n.isSpaceBetween(r,i);a&&"never"===s?e.report({node:t,loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedSpace",fix:e=>{let t=n.getCommentsBefore(i);return t.some(e=>"Line"===e.type)?null:e.replaceTextRange([r.range[1],i.range[0]],t.reduce((e,t)=>e+n.getText(t),""))}}):a||"always"!==s||e.report({node:t,loc:i.loc,messageId:"missingSpace",fix:e=>e.insertTextAfter(r," ")})}return{ArrowFunctionExpression:s,FunctionDeclaration:s,FunctionExpression:s,TSEmptyBodyFunctionExpression:s,TSDeclareFunction:s,CatchClause(e){if(!e.param)return;let t=i.catch??r;if("ignore"===t)return;let s=n.getFirstToken(e,sL.isOpeningParenToken);a(e,n.getTokenBefore(s),s,t)}}}})}),oB=nH(()=>{sB(),sM(),nr=sF({name:"space-in-parens",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside parentheses"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string",enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(e){let t="always"===e.options[0],n=e.options[1]&&e.options[1].exceptions||[],r={braceException:!1,bracketException:!1,parenException:!1,empty:!1},i={openers:[],closers:[]};n.length&&(r.braceException=n.includes("{}"),r.bracketException=n.includes("[]"),r.parenException=n.includes("()"),r.empty=n.includes("empty"));let s=e.sourceCode;function a(e){return i.openers.includes(e.value)}function o(e){return i.closers.includes(e.value)}return{Program:function(n){i=function(){let e=[],t=[];return r.braceException&&(e.push("{"),t.push("}")),r.bracketException&&(e.push("["),t.push("]")),r.parenException&&(e.push("("),t.push(")")),r.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}();let l=s.tokensAndComments;l.forEach((i,p)=>{let c=l[p-1],u=l[p+1];((0,sL.isOpeningParenToken)(i)||(0,sL.isClosingParenToken)(i))&&("("===i.value&&!(s.isSpaceBetween(i,u)||!r.empty&&(0,sL.isClosingParenToken)(u))&&(t?!a(u):a(u))&&e.report({node:n,loc:i.loc,messageId:"missingOpeningSpace",fix:e=>e.insertTextAfter(i," ")}),"("===i.value&&(0,sL.isTokenOnSameLine)(i,u)&&"Line"!==u.type&&s.isSpaceBetween(i,u)&&(t?a(u):!a(u))&&e.report({node:n,loc:{start:i.loc.end,end:u.loc.start},messageId:"rejectedOpeningSpace",fix:e=>e.removeRange([i.range[1],u.range[0]])}),")"===i.value&&!(s.isSpaceBetween(c,i)||!r.empty&&(0,sL.isOpeningParenToken)(c))&&(t?!o(c):o(c))&&e.report({node:n,loc:i.loc,messageId:"missingClosingSpace",fix:e=>e.insertTextBefore(i," ")}),")"===i.value&&(0,sL.isTokenOnSameLine)(c,i)&&s.isSpaceBetween(c,i)&&(t?o(c):!o(c))&&e.report({node:n,loc:{start:c.loc.end,end:i.loc.start},messageId:"rejectedClosingSpace",fix:e=>e.removeRange([c.range[1],i.range[0]])}))})}}}})}),oj=nH(()=>{sB(),sM(),ni=["|","&"],ns=sF({name:"space-infix-ops",meta:{type:"layout",docs:{description:"Require spacing around infix operators"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1},ignoreTypes:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},defaultOptions:[{int32Hint:!1,ignoreTypes:!1}],create(e){let t=!!e.options[0]&&!0===e.options[0].int32Hint,n=!!e.options[0]&&!0===e.options[0].ignoreTypes,r=e.sourceCode;function i(t,n){e.report({node:t,loc:n.loc,messageId:"missingSpace",data:{operator:n.value},fix(e){let t=r.getTokenBefore(n),i=r.getTokenAfter(n),s="";return n.range[0]-t.range[1]==0&&(s=" "),s+=n.value,i.range[0]-n.range[1]==0&&(s+=" "),e.replaceText(n,s)}})}function s(e,t,n){let i=r.getFirstTokenBetween(e,t,e=>e.value===n),s=r.getTokenBefore(i),a=r.getTokenAfter(i);return r.isSpaceBetween(s,i)&&r.isSpaceBetween(i,a)?null:i}function a(e){let n="typeAnnotation"in e.left&&e.left.typeAnnotation?e.left.typeAnnotation:e.left,a=s(n,e.right,"operator"in e&&e.operator?e.operator:"=");a&&!(t&&r.getText(e).endsWith("|0"))&&i(e,a)}function o(e){return e.type===ro.AST_TOKEN_TYPES.Punctuator&&/^[=?:]$/.test(e.value)}function l(e,t,n){if(!n||!t)return;let s=r.getFirstTokenBetween(t,n,o),a=r.getTokenBefore(s),l=r.getTokenAfter(s);r.isSpaceBetween(a,s)&&r.isSpaceBetween(s,l)||i(e,s)}function p(e){let t=e.optional&&!e.typeAnnotation?r.getTokenAfter(e.key):e.typeAnnotation??e.key;l(e,t,e.value)}function c(e){e.types.forEach(t=>{let s=t.type===ro.AST_NODE_TYPES.TSFunctionType?sL.isNotOpeningParenToken:0,a=r.getTokenBefore(t,s);if(!n&&null!=a&&ni.includes(a.value)){let t=r.getTokenBefore(a),n=r.getTokenAfter(a);r.isSpaceBetween(t,a)&&r.isSpaceBetween(a,n)||i(e,a)}})}return{AssignmentExpression:a,AssignmentPattern:a,BinaryExpression:a,LogicalExpression:a,ConditionalExpression:function(e){let t=s(e.test,e.consequent,"?"),n=s(e.consequent,e.alternate,":");t&&i(e,t),n&&i(e,n)},VariableDeclarator:function(e){let t=e.id.typeAnnotation?e.id.typeAnnotation:e.id,n=e.init;if(n){let r=s(t,n,"=");r&&i(e,r)}},TSEnumMember:function(e){l(e,e.id,e.initializer)},PropertyDefinition:p,AccessorProperty:p,TSTypeAliasDeclaration:function(e){l(e,e.typeParameters??e.id,e.typeAnnotation)},TSUnionType:c,TSIntersectionType:c,TSConditionalType:function(e){l(e,e.extendsType,e.trueType),l(e,e.trueType,e.falseType)}}}})}),oR=nH(()=>{sB(),sM(),na=sF({name:"space-unary-ops",meta:{type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",wordOperator:"Unary word operator '{{word}}' must be followed by whitespace.",operator:"Unary operator '{{operator}}' must be followed by whitespace.",beforeUnaryExpressions:"Space is required before unary expressions '{{token}}'."}},create(e){let t=e.options[0]||{words:!0,nonwords:!1},n=e.sourceCode;function r(e){return t.overrides&&Object.prototype.hasOwnProperty.call(t.overrides,e)}function i(e){return t.overrides?.[e]}function s(t,n,r,i){r.range[0]===n.range[1]&&e.report({node:t,messageId:"wordOperator",data:{word:i},fix:e=>e.insertTextAfter(n," ")})}function a(t,n,r,i){sE(n,r)&&r.range[0]>n.range[1]&&e.report({node:t,messageId:"unexpectedAfterWord",data:{word:i},fix:e=>e.removeRange([n.range[1],r.range[0]])})}function o(e,n,o,l){r(l)?i(l)?s(e,n,o,l):a(e,n,o,l):t.words?s(e,n,o,l):a(e,n,o,l)}function l(t,n,r){if("prefix"in t&&t.prefix)t&&"UnaryExpression"===t.type&&t.argument&&"UnaryExpression"===t.argument.type&&"!"===t.argument.operator||n.range[1]!==r.range[0]||e.report({node:t,messageId:"operator",data:{operator:n.value},fix:e=>e.insertTextAfter(n," ")});else n.range[1]===r.range[0]&&e.report({node:t,messageId:"beforeUnaryExpressions",data:{token:r.value},fix:e=>e.insertTextBefore(r," ")})}function p(t,n,r){"prefix"in t&&t.prefix?r.range[0]>n.range[1]&&e.report({node:t,messageId:"unexpectedAfter",data:{operator:n.value},fix:e=>sE(n,r)?e.removeRange([n.range[1],r.range[0]]):null}):r.range[0]>n.range[1]&&e.report({node:t,messageId:"unexpectedBefore",data:{operator:r.value},fix:e=>e.removeRange([n.range[1],r.range[0]])})}function c(e){let s="UpdateExpression"!==e.type||e.prefix?n.getFirstTokens(e,2):n.getLastTokens(e,2),a=s[0],c=s[1];if(("NewExpression"===e.type||e.prefix)&&so(a))return void o(e,a,c,a.value);let u="prefix"in e&&e.prefix?s[0].value:s[1].value;r(u)?i(u)?l(e,a,c):p(e,a,c):t.nonwords?l(e,a,c):p(e,a,c)}return{UnaryExpression:c,UpdateExpression:c,NewExpression:c,YieldExpression:function(e){let t=n.getFirstTokens(e,3);e.argument&&!e.delegate&&o(e,t[0],t[1],"yield")},AwaitExpression:function(e){let t=n.getFirstTokens(e,3);o(e,t[0],t[1],"await")}}}})});function oF(e){return`(?:${function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e)})`}function oM(e){return`${oF(e)}+`}function oV(e){let t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=oM(e[0]):(t+="(?:",t+=e.map(oM).join("|"),t+=")"),t+=`(?:$|[${Array.from(m).join("")}]))`),t}var o$=nH(()=>{sB(),sM(),no=sF({name:"spaced-comment",meta:{type:"layout",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(e){let t=e.sourceCode,n="never"!==e.options[0],r=e.options[1]||{},i=r.block&&r.block.balanced,s=["block","line"].reduce((e,t)=>{var s;let a,o=(s=r[t]&&r[t]?.markers||r.markers||[]).includes("*")?s:s.concat("*"),l=r[t]&&r[t]?.exceptions||r.exceptions||[];return e[t]={beginRegex:n?(a="^",1===o.length?a+=oF(o[0]):(a+="(?:",a+=o.map(oF).join("|"),a+=")"),a+="?",RegExp(a+=oV(l),"u")):RegExp(`^(${o.map(oF).join("|")})?[ ]+`,"u"),endRegex:i&&n?RegExp(`${oV(l)}$`,"u"):RegExp("[ ]+$","u"),hasExceptions:l.length>0,captureMarker:RegExp(`^(${o.map(oF).join("|")})`,"u"),markers:new Set(o)},e},{});function a(t,r,i,s){let a="block"===t.type.toLowerCase()?"/*":"//";e.report({node:t,fix(e){let r=t.range[0],s=r+2;return n?(i&&(s+=i[0].length),e.insertTextAfterRange([r,s]," ")):(i&&(s+=i[0].length),e.replaceTextRange([r,s],a+(i&&i[1]?i[1]:"")))},messageId:r,data:{refChar:s}})}function o(t,r,i){e.report({node:t,fix(e){if(n)return e.insertTextAfterRange([t.range[0],t.range[1]-2]," ");let r=t.range[1]-2,s=r;return i&&(s-=i[0].length),e.replaceTextRange([s,r],"")},messageId:r})}return{Program(){t.getAllComments().forEach(e=>{sl(e)||function(e){let t=e.type.toLowerCase(),r=s[t],l="block"===t?"/*":"//";if(0===e.value.length||r.markers.has(e.value)||"line"===t&&(e.value.startsWith("/ <reference")||e.value.startsWith("/ <amd")))return;let p=r.beginRegex.exec(e.value),c=r.endRegex.exec(e.value);if(n){if(!p){let t=r.captureMarker.exec(e.value),n=t?l+t[0]:l;r.hasExceptions?a(e,"expectedExceptionAfter",t,n):a(e,"expectedSpaceAfter",t,n)}i&&"block"===t&&!c&&o(e,"expectedSpaceBefore",null)}else p&&(p[1]?a(e,"unexpectedSpaceAfterMarker",p,p[1]):a(e,"unexpectedSpaceAfter",p,l)),i&&"block"===t&&c&&o(e,"unexpectedSpaceBefore",c)}(e)})}}}})}),oq=nH(()=>{sB(),sM(),nl=sF({name:"switch-colon-spacing",meta:{type:"layout",docs:{description:"Enforce spacing around colons of switch statements"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=!0===n.before,i=!1!==n.after;function s(e,n,r){return(0,sL.isClosingBraceToken)(n)||!(0,sL.isTokenOnSameLine)(e,n)||t.isSpaceBetween(e,n)===r}function a(e,n,r,i){return sO(t,n,r)?null:i?e.insertTextAfter(n," "):e.removeRange([n.range[1],r.range[0]])}return{SwitchCase(n){let o=sd(n,t),l=t.getTokenBefore(o),p=t.getTokenAfter(o);s(l,o,r)||e.report({node:n,loc:o.loc,messageId:r?"expectedBefore":"unexpectedBefore",fix:e=>a(e,l,o,r)}),s(o,p,i)||e.report({node:n,loc:o.loc,messageId:i?"expectedAfter":"unexpectedAfter",fix:e=>a(e,o,p,i)})}}}})}),oY=nH(()=>{sB(),sM(),np=sF({name:"template-curly-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(e){let t=e.sourceCode,n="always"===e.options[0];return{TemplateElement(r){let i=t.getFirstToken(r);!function(r){if(!r.value.startsWith("}"))return;let i=t.getTokenBefore(r,{includeComments:!0}),s=t.isSpaceBetween(i,r);(0,sL.isTokenOnSameLine)(i,r)&&(n&&!s&&e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+1}},messageId:"expectedBefore",fix:e=>e.insertTextBefore(r," ")}),!n&&s&&e.report({loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedBefore",fix:e=>e.removeRange([i.range[1],r.range[0]])}))}(i),function(r){if(!r.value.endsWith("${"))return;let i=t.getTokenAfter(r,{includeComments:!0}),s=t.isSpaceBetween(r,i);(0,sL.isTokenOnSameLine)(r,i)&&(n&&!s&&e.report({loc:{start:{line:r.loc.end.line,column:r.loc.end.column-2},end:r.loc.end},messageId:"expectedAfter",fix:e=>e.insertTextAfter(r," ")}),!n&&s&&e.report({loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedAfter",fix:e=>e.removeRange([r.range[1],i.range[0]])}))}(i)}}}})}),oX=nH(()=>{sM(),nc=sF({name:"template-tag-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(e){let t="always"!==e.options[0],n=e.sourceCode;return{TaggedTemplateExpression:function(r){let i=n.getTokenBefore(r.quasi),s=n.getFirstToken(r.quasi),a=n.isSpaceBetween(i,s);t&&a?e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpected",fix(e){let t=n.getCommentsBefore(r.quasi);return t.some(e=>"Line"===e.type)?null:e.replaceTextRange([i.range[1],s.range[0]],t.reduce((e,t)=>e+n.getText(t),""))}}):t||a||e.report({node:r,loc:{start:r.loc.start,end:s.loc.start},messageId:"missing",fix:e=>e.insertTextAfter(i," ")})}}}})}),oJ=nH(()=>{sB(),sM(),nu=sF({name:"type-annotation-spacing",meta:{type:"layout",docs:{description:"Require consistent spacing around type annotations"},fixable:"whitespace",messages:{expectedSpaceAfter:"Expected a space after the '{{type}}'.",expectedSpaceBefore:"Expected a space before the '{{type}}'.",unexpectedSpaceAfter:"Unexpected space after the '{{type}}'.",unexpectedSpaceBefore:"Unexpected space before the '{{type}}'.",unexpectedSpaceBetween:"Unexpected space between the '{{previousToken}}' and the '{{type}}'."},schema:[{$defs:{spacingConfig:{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}},type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},overrides:{type:"object",properties:{colon:{$ref:"#/items/0/$defs/spacingConfig"},arrow:{$ref:"#/items/0/$defs/spacingConfig"},variable:{$ref:"#/items/0/$defs/spacingConfig"},parameter:{$ref:"#/items/0/$defs/spacingConfig"},property:{$ref:"#/items/0/$defs/spacingConfig"},returnType:{$ref:"#/items/0/$defs/spacingConfig"}},additionalProperties:!1}},additionalProperties:!1}]},defaultOptions:[{}],create(e,[t]){let n=[":","=>"],r=e.sourceCode,i=function(e){let t={...e?.before!==void 0?{before:e.before}:{},...e?.after!==void 0?{after:e.after}:{}},n=e?.overrides??{},r={before:!1,after:!0,...t,...n?.colon};return{colon:r,arrow:{before:!0,after:!0,...t,...n?.arrow},variable:{...r,...n?.variable},property:{...r,...n?.property},parameter:{...r,...n?.parameter},returnType:{...r,...n?.returnType}}}(t);function s(t){let s=r.getTokenBefore(t,sL.isNotOpeningParenToken),a=s,o=r.getTokenBefore(s),l=s.value;if(!n.includes(l))return;let{before:p,after:c}=function(e,t){let n=t?.parent?.parent;if((0,sL.isTSFunctionType)(n)||(0,sL.isTSConstructorType)(n))return e.arrow;if((0,sL.isIdentifier)(n)){let t=n?.parent;return(0,sL.isVariableDeclarator)(t)?e.variable:(0,sL.isFunctionOrFunctionType)(t)?e.parameter:e.colon}return(0,sL.isClassOrTypeElement)(n)?e.property:(0,sL.isFunction)(n)?e.returnType:e.colon}(i,t);":"===l&&"?"===o.value&&(r.isSpaceBetween(o,a)&&e.report({node:a,messageId:"unexpectedSpaceBetween",data:{type:l,previousToken:o.value},fix:e=>e.removeRange([o.range[1],a.range[0]])}),l="?:",a=o,("+"===(o=r.getTokenBefore(o)).value||"-"===o.value)&&(l=`${o.value}?:`,a=o,o=r.getTokenBefore(o)));let u=r.isSpaceBetween(s,t);c&&!u?e.report({node:s,messageId:"expectedSpaceAfter",data:{type:l},fix:e=>e.insertTextAfter(s," ")}):!c&&u&&e.report({node:s,messageId:"unexpectedSpaceAfter",data:{type:l},fix:e=>e.removeRange([s.range[1],t.range[0]])});let d=r.isSpaceBetween(o,a);p&&!d?e.report({node:a,messageId:"expectedSpaceBefore",data:{type:l},fix:e=>e.insertTextAfter(o," ")}):!p&&d&&e.report({node:a,messageId:"unexpectedSpaceBefore",data:{type:l},fix:e=>e.removeRange([o.range[1],a.range[0]])})}return{TSMappedType(e){e.typeAnnotation&&s(e.typeAnnotation)},TSTypeAnnotation(e){s(e.typeAnnotation)}}}})}),oU=nH(()=>{sM(),nd=new Set(["TSCallSignatureDeclaration","ArrowFunctionExpression","TSFunctionType","FunctionExpression"]),nf=sF({name:"type-generic-spacing",meta:{type:"layout",docs:{description:"Enforces consistent spacing inside TypeScript type generics"},fixable:"whitespace",schema:[],messages:{genericSpacingMismatch:"Generic spaces mismatch"}},defaultOptions:[],create:e=>{let t=e.sourceCode;function n(n,r){let i=t.text.slice(n.range[1],r.range[0]);/\s/.test(i)&&!/^[\r\n]/.test(i)&&e.report({loc:{start:n.loc.end,end:r.loc.start},messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[1],r.range[0]],"")}})}function r(e,r){if(e){let r=t.getTokenAfter(e);r&&n(e,r)}if(r){let e=t.getTokenBefore(r);e&&n(e,r)}}return{TSTypeParameterInstantiation:e=>{let n=e.params;if(0!==n.length)r(t.getTokenBefore(n[0]),t.getTokenAfter(n[n.length-1]))},TSTypeParameterDeclaration:n=>{if(!nd.has(n.parent.type)){let r=t.text.slice(0,n.range[0]),i=r.match(/(\s+)$/)?.[0];i&&i.length&&e.report({node:n,messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[0]-i.length,n.range[0]],"")}})}let i=n.params;if(0!==i.length){r(t.getTokenBefore(i[0]),t.getTokenAfter(i[i.length-1]));for(let r=1;r<i.length;r++){let s=i[r-1],a=i[r],o=s.range[1],l=a.range[0],p=t.text.slice(o,l);", "===p||p.match(/,\s*\n/)||e.report({*fix(e){yield e.replaceTextRange([o,l],", ")},loc:{start:s.loc.end,end:a.loc.start},messageId:"genericSpacingMismatch",node:n})}}},TSTypeParameter:n=>{if(!n.default)return;let r=n.constraint||n.name,i=r.range[1],s=n.default.range[0],a=t.text.slice(i,s);a.match(/(?:^|[^ ]) = (?:$|[^ ])/)||e.report({*fix(e){yield e.replaceTextRange([i,s],a.replace(/\s*=\s*/," = "))},loc:{start:r.loc.end,end:n.default.loc.start},messageId:"genericSpacingMismatch",node:n})}}}})}),oW=nH(()=>{sM(),nm=/^([\w$]+)(\s*)(\?\s*)?:(\s*)(.*)$/,nh=sF({name:"type-named-tuple-spacing",meta:{type:"layout",docs:{description:"Expect space before the type declaration in the named tuple"},fixable:"whitespace",schema:[],messages:{expectedSpaceAfter:"Expected a space after the ':'.",unexpectedSpaceBetween:"Unexpected space between '?' and the ':'.",unexpectedSpaceBefore:"Unexpected space before the ':'."}},defaultOptions:[],create:e=>{let t=e.getSourceCode();return{TSNamedTupleMember:n=>{let r=t.text.slice(n.range[0],n.range[1]),i=r.match(nm);if(!i)return;let s=n.label.name,a=i[2],o=i[3],l=i[4],p=i[5];function c(){let e=s;return n.optional&&(e+="?"),e+=": ",e+=p}o?.length>1&&e.report({node:n,messageId:"unexpectedSpaceBetween",*fix(e){yield e.replaceTextRange(n.range,r.replace(nm,c()))}}),a?.length&&e.report({node:n,messageId:"unexpectedSpaceBefore",*fix(e){yield e.replaceTextRange(n.range,r.replace(nm,c()))}}),null!=l&&1!==l.length&&e.report({node:n,messageId:"expectedSpaceAfter",*fix(e){yield e.replaceTextRange(n.range,r.replace(nm,c()))}})}}}})}),oK=nH(()=>{sB(),sM(),ng=sF({name:"wrap-iife",meta:{type:"layout",docs:{description:"Require parentheses around immediate `function` invocations"},schema:[{type:"string",enum:["outside","inside","any"]},{type:"object",properties:{functionPrototypeMethods:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{wrapInvocation:"Wrap an immediate function invocation in parentheses.",wrapExpression:"Wrap only the function expression in parens.",moveInvocation:"Move the invocation into the parens that contain the function."}},create(e){let t=e.options[0]||"outside",n=e.options[1]&&e.options[1].functionPrototypeMethods,r=e.sourceCode;return{CallExpression(i){let s=function(e){let t=sr(e.callee);return"FunctionExpression"===t.type?t:n&&"MemberExpression"===t.type&&"FunctionExpression"===t.object.type&&("call"===sn(t)||"apply"===sn(t))?t.object:null}(i);if(!s)return;let a=si(r,i),o=si(r,s);a||o?"inside"!==t||o?"outside"!==t||a||e.report({node:i,messageId:"moveInvocation",fix(e){let t=r.getTokenAfter(s);return e.replaceTextRange([t.range[0],i.range[1]],`${r.getText().slice(t.range[1],i.range[1])})`)}}):e.report({node:i,messageId:"wrapExpression",fix(e){if((0,sL.isParenthesized)(i,r)&&!function(e){let t=e.parent?.type==="ChainExpression"?e.parent:e;return t.parent?.type==="NewExpression"&&t.parent.callee===t}(i)){let t=r.getTokenAfter(i);return e.replaceTextRange([s.range[1],t.range[1]],`)${r.getText().slice(s.range[1],t.range[0])}`)}return e.replaceText(s,`(${r.getText(s)})`)}}):e.report({node:i,messageId:"wrapInvocation",fix(e){let n="inside"===t?s:i;return e.replaceText(n,`(${r.getText(n)})`)}})}}}})}),oH=nH(()=>{sM(),ny=sF({name:"wrap-regex",meta:{type:"layout",docs:{description:"Require parenthesis around regex literals"},schema:[],fixable:"code",messages:{requireParens:"Wrap the regexp literal in parens to disambiguate the slash."}},create(e){let t=e.sourceCode;return{Literal(n){if("RegularExpression"===t.getFirstToken(n).type){let r=t.getTokenBefore(n),i=t.getTokenAfter(n),{parent:s}=n;"MemberExpression"!==s.type||s.object!==n||r&&"("===r.value&&i&&")"===i.value||e.report({node:n,messageId:"requireParens",fix:e=>e.replaceText(n,`(${t.getText(n)})`)})}}}}})}),oG=nH(()=>{sM(),nx=sF({name:"yield-star-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){let t=e.sourceCode,n=function(e="after"){return"string"==typeof e?({before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}})[e]:e}(e.options[0]);function r(r,i,s){if(t.isSpaceBetween(i,s)!==n[r]){let t="*"===i.value,a=n[r],o=t?i:s;e.report({node:o,messageId:a?"before"===r?"missingBefore":"missingAfter":"before"===r?"unexpectedBefore":"unexpectedAfter",fix:e=>a?t?e.insertTextAfter(o," "):e.insertTextBefore(o," "):e.removeRange([i.range[1],s.range[0]])})}}return{YieldExpression:function(e){if(!("delegate"in e&&e.delegate))return;let n=t.getFirstTokens(e,3),i=n[0],s=n[1],a=n[2];r("before",i,s),r("after",s,a)}}}})}),oz=nH(()=>{sG(),sz(),sQ(),sZ(),s0(),s1(),s2(),s3(),s6(),s4(),s5(),s8(),s7(),ae(),at(),an(),ar(),ai(),as(),aa(),ao(),al(),ap(),ac(),au(),ad(),af(),am(),ah(),ag(),ay(),ax(),aT(),aS(),ab(),a_(),aO(),aP(),aI(),aj(),aV(),a$(),aY(),aX(),aJ(),aU(),aW(),aK(),aH(),aG(),az(),aQ(),aZ(),a0(),a1(),a2(),a3(),a6(),a4(),a9(),a8(),a7(),oe(),ot(),on(),or(),oi(),os(),oa(),oo(),ol(),op(),oc(),ov(),oA(),o_(),oO(),oP(),oI(),oL(),oN(),oD(),oB(),oj(),oR(),o$(),oq(),oY(),oX(),oJ(),oU(),oW(),oK(),oH(),oG(),nT={"array-bracket-newline":w,"array-bracket-spacing":v,"array-element-newline":A,"arrow-parens":C,"arrow-spacing":_,"block-spacing":O,"brace-style":P,"comma-dangle":L,"comma-spacing":N,"comma-style":D,"computed-property-spacing":B,"curly-newline":V,"dot-location":$,"eol-last":q,"function-call-argument-newline":Y,"function-call-spacing":X,"function-paren-newline":J,"generator-star-spacing":W,"implicit-arrow-linebreak":K,indent:et,"indent-binary-ops":H,"jsx-child-element-spacing":er,"jsx-closing-bracket-location":ei,"jsx-closing-tag-location":eo,"jsx-curly-brace-presence":ed,"jsx-curly-newline":ef,"jsx-curly-spacing":eT,"jsx-equals-spacing":eS,"jsx-first-prop-new-line":eb,"jsx-function-call-newline":eE,"jsx-indent":ew,"jsx-indent-props":ek,"jsx-max-props-per-line":ev,"jsx-newline":eA,"jsx-one-expression-per-line":e_,"jsx-pascal-case":eV,"jsx-props-no-multi-spaces":e$,"jsx-quotes":eY,"jsx-self-closing-comp":eJ,"jsx-sort-props":eG,"jsx-tag-spacing":eQ,"jsx-wrap-multilines":e0,"key-spacing":e1,"keyword-spacing":te,"line-comment-position":tt,"linebreak-style":tn,"lines-around-comment":tr,"lines-between-class-members":ts,"max-len":tl,"max-statements-per-line":tc,"member-delimiter-style":td,"multiline-comment-style":tf,"multiline-ternary":tm,"new-parens":th,"newline-per-chained-call":tg,"no-confusing-arrow":ty,"no-extra-parens":tx,"no-extra-semi":tT,"no-floating-decimal":tS,"no-mixed-operators":tO,"no-mixed-spaces-and-tabs":tP,"no-multi-spaces":tI,"no-multiple-empty-lines":tL,"no-tabs":tB,"no-trailing-spaces":tj,"no-whitespace-before-property":tR,"nonblock-statement-body-position":tM,"object-curly-newline":tq,"object-curly-spacing":tY,"object-property-newline":tX,"one-var-declaration-per-line":tJ,"operator-linebreak":tU,"padded-blocks":tK,"padding-line-between-statements":t2,"quote-props":t3,quotes:t5,"rest-spread-spacing":t9,semi:ne,"semi-spacing":t8,"semi-style":t7,"space-before-blocks":nt,"space-before-function-paren":nn,"space-in-parens":nr,"space-infix-ops":ns,"space-unary-ops":na,"spaced-comment":no,"switch-colon-spacing":nl,"template-curly-spacing":np,"template-tag-spacing":nc,"type-annotation-spacing":nu,"type-generic-spacing":nf,"type-named-tuple-spacing":nh,"wrap-iife":ng,"wrap-regex":ny,"yield-star-spacing":nx}}),oQ=nH(()=>{oz(),nS={rules:nT}});function oZ(e={}){let{arrowParens:t=!1,blockSpacing:n=!0,braceStyle:r="stroustrup",commaDangle:i="always-multiline",indent:s=2,jsx:a=!0,pluginName:o="@stylistic",quoteProps:l="consistent-as-needed",quotes:p="single",semi:c=!1,severity:u="error"}=e,d={"@stylistic/array-bracket-spacing":[u,"never"],"@stylistic/arrow-parens":[u,t?"always":"as-needed",{requireForBlockBody:!0}],"@stylistic/arrow-spacing":[u,{after:!0,before:!0}],"@stylistic/block-spacing":[u,n?"always":"never"],"@stylistic/brace-style":[u,r,{allowSingleLine:!0}],"@stylistic/comma-dangle":[u,i],"@stylistic/comma-spacing":[u,{after:!0,before:!1}],"@stylistic/comma-style":[u,"last"],"@stylistic/computed-property-spacing":[u,"never",{enforceForClassMembers:!0}],"@stylistic/dot-location":[u,"property"],"@stylistic/eol-last":u,"@stylistic/generator-star-spacing":[u,{after:!0,before:!1}],"@stylistic/indent":[u,s,{ArrayExpression:1,CallExpression:{arguments:1},flatTernaryExpressions:!1,FunctionDeclaration:{body:1,parameters:1,returnType:1},FunctionExpression:{body:1,parameters:1,returnType:1},ignoreComments:!1,ignoredNodes:["TSUnionType","TSIntersectionType","TSTypeParameterInstantiation","FunctionExpression > .params[decorators.length > 0]","FunctionExpression > .params > :matches(Decorator, :not(:first-child))"],ImportDeclaration:1,MemberExpression:1,ObjectExpression:1,offsetTernaryExpressions:!0,outerIIFEBody:1,SwitchCase:1,tabLength:"tab"===s?4:s,VariableDeclarator:1}],"@stylistic/indent-binary-ops":[u,s],"@stylistic/key-spacing":[u,{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":[u,{after:!0,before:!0}],"@stylistic/lines-between-class-members":[u,"always",{exceptAfterSingleLine:!0}],"@stylistic/max-statements-per-line":[u,{max:1}],"@stylistic/member-delimiter-style":[u,{multiline:{delimiter:c?"semi":"none",requireLast:c},multilineDetection:"brackets",overrides:{interface:{multiline:{delimiter:c?"semi":"none",requireLast:c}}},singleline:{delimiter:c?"semi":"comma"}}],"@stylistic/multiline-ternary":[u,"always-multiline"],"@stylistic/new-parens":u,"@stylistic/no-extra-parens":[u,"functions"],"@stylistic/no-floating-decimal":u,"@stylistic/no-mixed-operators":[u,{allowSamePrecedence:!0,groups:[["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]]}],"@stylistic/no-mixed-spaces-and-tabs":u,"@stylistic/no-multi-spaces":u,"@stylistic/no-multiple-empty-lines":[u,{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-tabs":"tab"===s?"off":u,"@stylistic/no-trailing-spaces":u,"@stylistic/no-whitespace-before-property":u,"@stylistic/object-curly-spacing":[u,"always"],"@stylistic/operator-linebreak":[u,"before"],"@stylistic/padded-blocks":[u,{blocks:"never",classes:"never",switches:"never"}],"@stylistic/quote-props":[u,l],"@stylistic/quotes":[u,p,{allowTemplateLiterals:"always",avoidEscape:!1}],"@stylistic/rest-spread-spacing":[u,"never"],"@stylistic/semi":[u,c?"always":"never"],"@stylistic/semi-spacing":[u,{after:!0,before:!1}],"@stylistic/space-before-blocks":[u,"always"],"@stylistic/space-before-function-paren":[u,{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-in-parens":[u,"never"],"@stylistic/space-infix-ops":u,"@stylistic/space-unary-ops":[u,{nonwords:!1,words:!0}],"@stylistic/spaced-comment":[u,"always",{block:{balanced:!0,exceptions:["*"],markers:["!"]},line:{exceptions:["/","#"],markers:["/"]}}],"@stylistic/template-curly-spacing":u,"@stylistic/template-tag-spacing":[u,"never"],"@stylistic/type-annotation-spacing":[u,{}],"@stylistic/type-generic-spacing":u,"@stylistic/type-named-tuple-spacing":u,"@stylistic/wrap-iife":[u,"any",{functionPrototypeMethods:!0}],"@stylistic/yield-star-spacing":[u,{after:!0,before:!1}],...a?{"@stylistic/jsx-closing-bracket-location":u,"@stylistic/jsx-closing-tag-location":u,"@stylistic/jsx-curly-brace-presence":[u,{propElementValues:"always"}],"@stylistic/jsx-curly-newline":u,"@stylistic/jsx-curly-spacing":[u,"never"],"@stylistic/jsx-equals-spacing":u,"@stylistic/jsx-first-prop-new-line":u,"@stylistic/jsx-function-call-newline":[u,"multiline"],"@stylistic/jsx-indent-props":[u,s],"@stylistic/jsx-max-props-per-line":[u,{maximum:1,when:"multiline"}],"@stylistic/jsx-one-expression-per-line":[u,{allow:"single-child"}],"@stylistic/jsx-quotes":u,"@stylistic/jsx-tag-spacing":[u,{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"@stylistic/jsx-wrap-multilines":[u,{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",propertyValue:"parens-new-line",return:"parens-new-line"}]}:{}};if("@stylistic"!==o){let e=/^@stylistic\//;d=Object.fromEntries(Object.entries(d).map(([t,n])=>[t.replace(e,`${o}/`),n]))}return{plugins:{[o]:nS},rules:d}}var o0=nH(()=>{oQ()}),o1={rules:{"array-bracket-newline":0,"array-bracket-spacing":0,"array-element-newline":0,"arrow-parens":0,"arrow-spacing":0,"block-spacing":0,"brace-style":0,"comma-dangle":0,"comma-spacing":0,"comma-style":0,"computed-property-spacing":0,"dot-location":0,"eol-last":0,"func-call-spacing":0,"function-call-argument-newline":0,"function-paren-newline":0,"generator-star-spacing":0,"implicit-arrow-linebreak":0,indent:0,"jsx-quotes":0,"key-spacing":0,"keyword-spacing":0,"linebreak-style":0,"lines-around-comment":0,"lines-between-class-members":0,"max-len":0,"max-statements-per-line":0,"multiline-ternary":0,"new-parens":0,"newline-per-chained-call":0,"no-confusing-arrow":0,"no-extra-parens":0,"no-extra-semi":0,"no-floating-decimal":0,"no-mixed-operators":0,"no-mixed-spaces-and-tabs":0,"no-multi-spaces":0,"no-multiple-empty-lines":0,"no-tabs":0,"no-trailing-spaces":0,"no-whitespace-before-property":0,"nonblock-statement-body-position":0,"object-curly-newline":0,"object-curly-spacing":0,"object-property-newline":0,"one-var-declaration-per-line":0,"operator-linebreak":0,"padded-blocks":0,"padding-line-between-statements":0,"quote-props":0,quotes:0,"rest-spread-spacing":0,semi:0,"semi-spacing":0,"semi-style":0,"space-before-blocks":0,"space-before-function-paren":0,"space-in-parens":0,"space-infix-ops":0,"space-unary-ops":0,"spaced-comment":0,"switch-colon-spacing":0,"template-curly-spacing":0,"template-tag-spacing":0,"wrap-iife":0,"wrap-regex":0,"yield-star-spacing":0,"@typescript-eslint/block-spacing":0,"@typescript-eslint/brace-style":0,"@typescript-eslint/comma-dangle":0,"@typescript-eslint/comma-spacing":0,"@typescript-eslint/func-call-spacing":0,"@typescript-eslint/indent":0,"@typescript-eslint/key-spacing":0,"@typescript-eslint/keyword-spacing":0,"@typescript-eslint/lines-around-comment":0,"@typescript-eslint/lines-between-class-members":0,"@typescript-eslint/member-delimiter-style":0,"@typescript-eslint/no-extra-parens":0,"@typescript-eslint/no-extra-semi":0,"@typescript-eslint/object-curly-spacing":0,"@typescript-eslint/padding-line-between-statements":0,"@typescript-eslint/quotes":0,"@typescript-eslint/semi":0,"@typescript-eslint/space-before-blocks":0,"@typescript-eslint/space-before-function-paren":0,"@typescript-eslint/space-infix-ops":0,"@typescript-eslint/type-annotation-spacing":0,"react/jsx-child-element-spacing":0,"react/jsx-closing-bracket-location":0,"react/jsx-closing-tag-location":0,"react/jsx-curly-brace-presence":0,"react/jsx-curly-newline":0,"react/jsx-curly-spacing":0,"react/jsx-equals-spacing":0,"react/jsx-first-prop-new-line":0,"react/jsx-indent":0,"react/jsx-indent-props":0,"react/jsx-max-props-per-line":0,"react/jsx-newline":0,"react/jsx-one-expression-per-line":0,"react/jsx-props-no-multi-spaces":0,"react/self-closing-comp":0,"react/jsx-sort-props":0,"react/jsx-tag-spacing":0,"react/jsx-wrap-multilines":0}},o2=nH(()=>{oQ(),o0(),nb=[/^jsx-/,/^curly-newline$/],nE=function(e,t,n){let r=Object.fromEntries(Object.entries(e.rules).filter(([e,t])=>t.meta.fixable&&!t.meta.deprecated&&e===t.meta.docs.url.split("/").pop()&&(!n||n(e,t))).map(([e])=>[`${t}/${e}`,2]));return{plugins:{[t]:e},rules:r}}(nS,"@stylistic",e=>!nb.some(t=>t.test(e))),nk=oZ(),nw=new Proxy({"disable-legacy":o1,customize:oZ,recommended:nk,"recommended-flat":nk,all:nE,"all-flat":nE},{get(e,t,n){let r=t.toString();return r.endsWith("-flat")&&i9(`config("${r}")`,`"${r.replace("-flat","")}"`),Reflect.get(e,t,n)}})});nH(()=>{o2(),oQ(),nv=Object.assign(nS,{configs:nw})})();const o3=nA.memo(nL,"@eslint-react/eslint-plugin"),o6=nA.memo(nB.fixupPluginRules(nD),"eslint-plugin-ssr-friendly");exports.next=function(){return[{...nC.flatConfig.coreWebVitals,files:[nA.constants.GLOB_TS,nA.constants.GLOB_TSX,nA.constants.GLOB_JSX],rules:{...nC.flatConfig.coreWebVitals.rules,"@next/next/no-img-element":"warn"}}]},exports.react=function({reactCompiler:e="error",additionalHooks:t="(useIsomorphicLayoutEffect|useSukkaManyOtherCustomEffectHookExample)",nextjs:n=!1,remix:r=!1,reactRefresh:i={},additionalHooksWithType:s={useLayoutEffect:["useIsomorphicLayoutEffect"],useEffect:["useAbortableEffect"]},additionalComponents:a=[{name:"Link",as:"a",attributes:[{name:"to",as:"href"},{name:"rel",as:"rel"}]}]}={}){let{allowConstantExport:o=!1}=i;return[{name:"@eslint-sukka/react base",files:[nA.constants.GLOB_TS,nA.constants.GLOB_TSX,nA.constants.GLOB_JSX],plugins:{"jsx-a11y-minimal":nA.memo(n_.eslint_plugin_jsx_a11y_minimal,"@eslint-sukka/eslint-plugin-react-jsx-a11y#eslint_plugin_jsx_a11y_minimal"),"react-hooks":nA.memo(nO,"eslint-plugin-react-hooks"),"@stylistic":nA.memo(nv,"@stylistic/eslint-plugin"),"react-prefer-function-component":nA.memo(nq,"eslint-plugin-react-prefer-function-component"),"react-compiler":nA.memo(nP,"eslint-plugin-react-compiler"),...o3.configs.recommended.plugins,"ssr-friendly":o6,"react-refresh":nI},settings:{"react-x":{version:"detect",additionalHooks:s,additionalComponents:a}},languageOptions:{globals:nA.globals.browser},rules:{...nO.configs.recommended.rules,"react-compiler/react-compiler":e,"react-hooks/exhaustive-deps":["error",{additionalHooks:t}],"@stylistic/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],...o3.configs.recommended.rules,"@eslint-react/no-string-refs":"error","@eslint-react/no-comment-textnodes":"error","@eslint-react/dom/no-unsafe-target-blank":"error","@eslint-react/no-children-prop":"error","@eslint-react/dom/no-dangerously-set-innerhtml-with-children":"error","@eslint-react/dom/no-render-return-value":"error","@eslint-react/no-direct-mutation-state":"error","@eslint-react/dom/no-find-dom-node":"error","@eslint-react/no-unsafe-component-will-mount":"warn","@eslint-react/no-unsafe-component-will-receive-props":"warn","@eslint-react/no-unsafe-component-will-update":"warn","@eslint-react/prefer-destructuring-assignment":"warn","@eslint-react/no-unused-state":"error","@eslint-react/no-access-state-in-setstate":"error","@eslint-react/dom/no-script-url":"error","@eslint-react/no-unused-class-component-members":"error","@eslint-react/naming-convention/component-name":["error",{rule:"PascalCase"}],"@eslint-react/naming-convention/filename":["error",{rule:"kebab-case"}],"@eslint-react/naming-convention/filename-extension":["error",{allow:"as-needed"}],"@eslint-react/naming-convention/use-state":"error","react-prefer-function-component/react-prefer-function-component":"error","@stylistic/jsx-self-closing-comp":"error","@eslint-react/prefer-shorthand-boolean":"error","@stylistic/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"@stylistic/jsx-indent-props":["error",2],"@stylistic/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"@stylistic/jsx-wrap-multilines":["error",{declaration:"parens-new-line",assignment:"parens-new-line",return:"parens-new-line",arrow:"parens-new-line",condition:"ignore",logical:"ignore",prop:"ignore"}],"@stylistic/jsx-first-prop-new-line":["error","multiline-multiprop"],"@stylistic/jsx-function-call-newline":["error","multiline"],"@stylistic/jsx-equals-spacing":["error","never"],"@stylistic/jsx-indent":"off","@stylistic/jsx-child-element-spacing":"error","@stylistic/jsx-closing-bracket-location":["error","line-aligned"],"@stylistic/jsx-tag-spacing":["error",{closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"never"}],"@eslint-react/dom/no-children-in-void-dom-elements":"error","@stylistic/jsx-curly-brace-presence":["error",{props:"never",children:"never"}],"@stylistic/jsx-props-no-multi-spaces":"error","@eslint-react/prefer-shorthand-fragment":"error","@stylistic/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"@eslint-react/no-missing-key":"error","@eslint-react/no-array-index-key":"error","@eslint-react/no-duplicate-key":"error","@eslint-react/no-implicit-key":"error","@eslint-react/jsx-uses-react":"off","@eslint-react/no-useless-fragment":"error","@eslint-react/no-unstable-context-value":"error","@eslint-react/no-nested-components":"error","@eslint-react/dom/no-missing-iframe-sandbox":"warn","@eslint-react/dom/no-unsafe-iframe-sandbox":"warn","@eslint-react/no-leaked-conditional-rendering":"error","@eslint-react/no-unstable-default-props":"error","@eslint-react/dom/no-missing-button-type":"error","@eslint-react/dom/no-namespace":"error","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"],ignoreClassesThatImplementAnInterface:"public-fields"}],"jsx-a11y-minimal/alt-text":["warn",{elements:["img"],img:["Image"]}],"jsx-a11y-minimal/aria-props":"warn","jsx-a11y-minimal/aria-proptypes":"warn","jsx-a11y-minimal/aria-role":"warn","jsx-a11y-minimal/aria-unsupported-elements":"warn","jsx-a11y-minimal/iframe-has-title":"warn","jsx-a11y-minimal/no-access-key":"warn","jsx-a11y-minimal/role-has-required-aria-props":"warn","jsx-a11y-minimal/role-supports-aria-props":"warn","jsx-a11y-minimal/tabindex-no-positive":"warn","react-refresh/only-export-components":["warn",{allowConstantExport:o,allowExportNames:[...n?["config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...r?["meta","links","headers","loader","action"]:[]]}]}},{files:["**/app/**/_*.cjs",String.raw`**/app/**/\[*.?([cm])[j]s?(x)`,"**/pages/_(app|document).?([cm])[jt]s?(x)"],rules:{"@eslint-react/naming-convention/filename":"off"}}]},exports.stylex=function({opt:e={}}={}){return[{plugins:{"@stylexjs":nj},files:[nA.constants.GLOB_TS,nA.constants.GLOB_TSX,nA.constants.GLOB_JSX],rules:{"@stylexjs/valid-styles":["error",e],"@stylexjs/valid-shorthands":["error",e],"@stylexjs/sort-keys":"off"}}]};
19
+ ${n} */`}(r,i))}});else{let n=r.value.split(nU.LINEBREAK_MATCHER),i=u(r),s=`${i} *`;if(!/^[*!]?\s*$/u.test(n[0])){let t=/^[*!]/.test(r.value)?r.range[0]+1:r.range[0];e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"startNewline",fix:e=>e.insertTextAfterRange([t,t+2],`
20
+ ${s}`)})}nM(n.at(-1))||e.report({loc:{start:{line:r.loc.end.line,column:r.loc.end.column-2},end:r.loc.end},messageId:"endNewline",fix:e=>e.replaceTextRange([r.range[1]-2,r.range[1]],`
21
+ ${s}/`)});for(let i=r.loc.start.line+1;i<=r.loc.end.line;i++){let o=t.lines[i-1],l=a(o)?"alignment":"missingStar";o.startsWith(s)||e.report({loc:{start:{line:i,column:0},end:{line:i,column:o.length}},messageId:l,fix(e){let a,p=t.getIndexFromLoc({line:i,column:0});if("alignment"===l){let[,t=""]=o.match(/^(\s*\*)/u)||[],n=p+t.length;return e.replaceTextRange([p,n],s)}let[,c=""]=o.match(/^(\s*)/u)||[],u=p+c.length;for(let[e,i]of n.entries()){if(!/\S+/u.test(i))continue;let[,n="",s=""]=t.lines[r.loc.start.line-1+e].match(/^(\s*(?:\/?\*)?(\s*))/u)||[];a=`${c.slice(n.length)}${s}`,/^\s*\//u.test(o)&&0===a.length&&(a+=" ");break}return e.replaceTextRange([p,u],`${s}${a}`)}})}}},"separate-lines":function(n){let[r]=n,a=l(n),o=p(n);if("Block"!==r.type||!i&&a||!s&&o)return;let d=c(n);(a||o)&&(d=d.slice(1,d.length-1));let f=t.getTokenAfter(r,{includeComments:!0});f&&(0,nU.isTokenOnSameLine)(r,f)||e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+2}},messageId:"expectedLines",fix:e=>e.replaceText(r,d.map(e=>`// ${e}`).join(`
22
+ ${u(r)}`))})},"bare-block":function(t){if(l(t)||p(t))return;let[n]=t,r=c(t);"Line"===n.type&&r.length>1&&!r.some(e=>e.includes("*/"))&&e.report({loc:{start:n.loc.start,end:t.at(-1).loc.end},messageId:"expectedBlock",fix:e=>e.replaceTextRange([n.range[0],t.at(-1).range[1]],d(n,r))}),o(t)&&e.report({loc:{start:n.loc.start,end:{line:n.loc.start.line,column:n.loc.start.column+2}},messageId:"expectedBareBlock",fix:e=>e.replaceText(n,d(n,r))})}};return{Program(){let e=[];t.getAllComments().forEach((n,r,i)=>{if(nE(n)||ni.test(n.value))return;let s=t.getTokenBefore(n,{includeComments:!0});if(!s||!(s.loc.end.line>=n.loc.start.line))return"Line"===n.type&&r&&"Line"===i[r-1].type&&s&&s.loc.end.line===n.loc.start.line-1&&s===i[r-1]?e.at(-1).push(n):e.push([n]),e}),e.forEach(e=>{1===e.length&&nY(e[0])||(0,f[n])(e)})}}}}),iJ=nz({name:"multiline-ternary",meta:{type:"layout",docs:{description:"Enforce newlines between operands of ternary expressions"},schema:[{type:"string",enum:["always","always-multiline","never"]},{type:"object",properties:{ignoreJSX:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{expectedTestCons:"Expected newline between test and consequent of ternary expression.",expectedConsAlt:"Expected newline between consequent and alternate of ternary expression.",unexpectedTestCons:"Unexpected newline between test and consequent of ternary expression.",unexpectedConsAlt:"Unexpected newline between consequent and alternate of ternary expression."},fixable:"whitespace"},create(e){let t=e.sourceCode,n="never"!==e.options[0],r="always-multiline"===e.options[0],i=e.options[1]&&e.options[1].ignoreJSX;return{ConditionalExpression(s){let a=t.getTokenAfter(s.test,nU.isNotClosingParenToken),o=t.getTokenAfter(s.consequent,nU.isNotClosingParenToken),l=t.getFirstToken(s),p=t.getTokenBefore(a),c=t.getTokenAfter(a),u=t.getTokenBefore(o),d=t.getTokenAfter(o),f=(0,nU.isTokenOnSameLine)(p,c),m=(0,nU.isTokenOnSameLine)(u,d),h=!!t.getCommentsInside(s).length;if(i&&("JSXElement"===s.parent.type||"JSXFragment"===s.parent.type||"JSXExpressionContainer"===s.parent.type))return null;if(n){if(r&&nY(s))return;f&&e.report({node:s.test,loc:{start:l.loc.start,end:p.loc.end},messageId:"expectedTestCons",fix:e=>h?null:e.replaceTextRange([p.range[1],a.range[0]],"\n")}),m&&e.report({node:s.consequent,loc:{start:c.loc.start,end:u.loc.end},messageId:"expectedConsAlt",fix:e=>h?null:e.replaceTextRange([u.range[1],o.range[0]],"\n")})}else f||e.report({node:s.test,loc:{start:l.loc.start,end:p.loc.end},messageId:"unexpectedTestCons",fix(e){if(h)return null;let t=[],n=(0,nU.isTokenOnSameLine)(p,a),r=(0,nU.isTokenOnSameLine)(a,c);return n||t.push(e.removeRange([p.range[1],a.range[0]])),r||t.push(e.removeRange([a.range[1],c.range[0]])),t}}),m||e.report({node:s.consequent,loc:{start:c.loc.start,end:u.loc.end},messageId:"unexpectedConsAlt",fix(e){if(h)return null;let t=[],n=(0,nU.isTokenOnSameLine)(u,o),r=(0,nU.isTokenOnSameLine)(o,d);return n||t.push(e.removeRange([u.range[1],o.range[0]])),r||t.push(e.removeRange([o.range[1],d.range[0]])),t}})}}}}),iU=nz({name:"new-parens",meta:{type:"layout",docs:{description:"Enforce or disallow parentheses when invoking a constructor with no arguments"},fixable:"code",schema:[{type:"string",enum:["always","never"]}],messages:{missing:"Missing '()' invoking a constructor.",unnecessary:"Unnecessary '()' invoking a constructor with no arguments."}},create(e){let t="never"!==e.options[0],n=e.sourceCode;return{NewExpression(r){if(0!==r.arguments.length)return;let i=n.getLastToken(r),s=i&&(0,nU.isClosingParenToken)(i),a=n.getTokenBefore(i),o=s&&(0,nU.isOpeningParenToken)(a)&&r.callee.range[1]<r.range[1];t?o||e.report({node:r,messageId:"missing",fix:e=>e.insertTextAfter(r,"()")}):o&&e.report({node:r,messageId:"unnecessary",fix:e=>[e.remove(a),e.remove(i),e.insertTextBefore(r,"("),e.insertTextAfter(r,")")]})}}}}),iW=nz({name:"newline-per-chained-call",meta:{type:"layout",docs:{description:"Require a newline after each call in a method chain"},fixable:"whitespace",schema:[{type:"object",properties:{ignoreChainWithDepth:{type:"integer",minimum:1,maximum:10,default:2}},additionalProperties:!1}],messages:{expected:"Expected line break before `{{callee}}`."}},create(e){let t=(e.options[0]||{}).ignoreChainWithDepth||2,n=e.sourceCode;return{"CallExpression:exit":function(r){let i=ny(r.callee);if("MemberExpression"!==i.type)return;let s=ny(i.object),a=1;for(;s&&"callee"in s&&s.callee;){a+=1;let e=ny(s.callee);if(!("object"in e))break;s=ny(e.object)}if(a>t&&(0,nU.isTokenOnSameLine)(i.object,i.property)){let t=n.getTokenAfter(i.object,nU.isNotClosingParenToken);e.report({node:i.property,loc:{start:t.loc.start,end:i.loc.end},messageId:"expected",data:{callee:function(e){var t;let r=(t=e).computed?t.optional?"?.[":"[":t.optional?"?.":".",i=n.getText(e.property).split(nU.LINEBREAK_MATCHER),s=e.computed&&1===i.length?"]":"";return r+i[0]+s}(i)},fix:e=>e.insertTextBefore(t,"\n")})}}}}}),iK=nz({name:"no-confusing-arrow",meta:{type:"layout",docs:{description:"Disallow arrow functions where they could be confused with comparisons"},fixable:"code",schema:[{type:"object",properties:{allowParens:{type:"boolean",default:!0},onlyOneSimpleParam:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{confusing:"Arrow function used ambiguously with a conditional expression."}},create(e){let t=e.options[0]||{},n=t.allowParens||void 0===t.allowParens,r=t.onlyOneSimpleParam,i=e.sourceCode;return{ArrowFunctionExpression:function(t){let s=t.body;"ConditionalExpression"!==s.type||n&&nx(i,s)||r&&(1!==t.params.length||"Identifier"!==t.params[0].type)||e.report({node:t,messageId:"confusing",fix:e=>n?e.replaceText(t.body,`(${i.getText(t.body)})`):null})}}}});const iH=(0,nU.isNodeOfTypes)([em.AST_NODE_TYPES.TSAsExpression,em.AST_NODE_TYPES.TSNonNullExpression,em.AST_NODE_TYPES.TSSatisfiesExpression,em.AST_NODE_TYPES.TSTypeAssertion]);var iG=nz({name:"no-extra-parens",meta:{type:"layout",docs:{description:"Disallow unnecessary parentheses"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["functions"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["all"]},{type:"object",properties:{conditionalAssign:{type:"boolean"},ternaryOperandBinaryExpressions:{type:"boolean"},nestedBinaryExpressions:{type:"boolean"},returnAssign:{type:"boolean"},ignoreJSX:{type:"string",enum:["none","all","single-line","multi-line"]},enforceForArrowConditionals:{type:"boolean"},enforceForSequenceExpressions:{type:"boolean"},enforceForNewInMemberExpressions:{type:"boolean"},enforceForFunctionPrototypeMethods:{type:"boolean"},allowParensAfterCommentPattern:{type:"string"},nestedConditionalExpressions:{type:"boolean"},allowNodesInSpreadElement:{type:"object",properties:{ConditionalExpression:{type:"boolean"},LogicalExpression:{type:"boolean"},AwaitExpression:{type:"boolean"}},additionalProperties:!1},ignoredNodes:{type:"array",items:{type:"string",not:{type:"string",pattern:":exit$"}}}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{unexpected:"Unnecessary parentheses around expression."}},defaultOptions:["all"],create(e,[t,n]){let r,i=e.sourceCode,s=new WeakSet,a="functions"!==t,o=a&&n?.conditionalAssign===!1,l=a&&n?.ternaryOperandBinaryExpressions===!1,p=a&&n?.nestedBinaryExpressions===!1,c=a&&n?.returnAssign===!1,u=a&&n?.ignoreJSX,d=a&&n?.enforceForArrowConditionals===!1,f=a&&n?.enforceForSequenceExpressions===!1,m=a&&n?.enforceForNewInMemberExpressions===!1,h=a&&n?.enforceForFunctionPrototypeMethods===!1,g=a&&n?.allowParensAfterCommentPattern,y=a&&n?.nestedConditionalExpressions===!1,x=a&&e.options[1]&&new Set(Object.entries(e.options[1].allowNodesInSpreadElement||{}).filter(([e,t])=>t).map(([e])=>e));d&&nn('option("enforceForArrowConditionals")','"ignoreNodes"',"no-extra-parens"),m&&nn('option("enforceForNewInMemberExpressions")','"ignoreNodes"',"no-extra-parens"),x&&nn('option("allowNodesInSpreadElement")','"ignoreNodes"',"no-extra-parens");let T=nI({type:"AssignmentExpression"}),S=nI({type:"UpdateExpression"});function b(e){let t=ny(e);if("CallExpression"!==t.type)return!1;let n=ny(t.callee);return"MemberExpression"===n.type&&"FunctionExpression"===n.object.type&&["call","apply"].includes(ng(n))}function E(e){if("JSXElement"===e.type||"JSXFragment"===e.type)switch(u){case"all":return!1;case"multi-line":return nY(e);case"single-line":return!nY(e)}return!("SequenceExpression"===e.type&&f||b(e)&&h)&&(a||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type)}function k(e){return(0,nU.isParenthesized)(1,e,i)}function w(e){return(0,nU.isParenthesized)(2,e,i)}function v(e){return E(e)&&k(e)}function A(e){return E(e)&&w(e)}function C(e,t){return!!(E(e)&&k(e)&&(nI(e)>=t||w(e)))}function _(e){return o&&e.test&&"AssignmentExpression"===e.test.type}function O(e){let t=i.getLastToken(e),n=i.getTokenBefore(t);return e.arguments.length>0||(0,nU.isOpeningParenToken)(n)&&(0,nU.isClosingParenToken)(t)&&e.callee.range[1]<e.range[1]}function P(e){let t=e.object,n=e.object.type;for(;"MemberExpression"===n&&"object"in t;)n=(t=t.object).type;return"CallExpression"===n}function I(e){return"AssignmentExpression"===e.type||"ConditionalExpression"===e.type&&("AssignmentExpression"===e.consequent.type||"AssignmentExpression"===e.alternate.type)||"left"in e&&(!!e.left&&"AssignmentExpression"===e.left.type||!!e.right&&"AssignmentExpression"===e.right.type)}function N(e){return!!c&&!!function(e){for(let t=e;t;t=t.parent)if("ReturnStatement"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"!==t.body.type)return!0;return!1}(e)&&("ReturnStatement"===e.type?e.argument&&I(e.argument):"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?I(e.body):I(e))}function L(e,t){return(0,nU.isTokenOnSameLine)(e,t)?v(t):A(t)}function D(e){let t=ny(e);return"CallExpression"===t.type&&"FunctionExpression"===t.callee.type}function B(e){return!!(e&&("Identifier"===e.type||"MemberExpression"===e.type))}function j(t){let n=i.getTokenBefore(t),a=i.getTokenAfter(t);if(!w(t)){if(s.has(i.getFirstToken(t))||D(t)&&!("callee"in t&&k(t.callee)))return;if(g){let e=i.getCommentsBefore(n),t=e.length,r=RegExp(g,"u");if(t>0&&r.test(e[t-1].value))return}}function o(){e.report({node:t,loc:n.loc,messageId:"unexpected",fix:"Literal"!==t.type||"string"!=typeof t.value||w(t)||!nC(t.parent)?e=>{let r=i.text.slice(n.range[1],a.range[0]);return e.replaceTextRange([n.range[0],a.range[1]],(!function(e){let t=i.getTokenBefore(e),n=i.getTokenBefore(t,{includeComments:!0}),r=i.getTokenAfter(t,{includeComments:!0});return n&&n.range[1]===t.range[0]&&t.range[1]===r.range[0]&&!nj(n,r)}(t)?"":" ")+r+(!function(e){let t=i.getTokensAfter(e,{count:2}),n=t[0],r=t[1],s=i.getLastToken(e);return n&&r&&!i.isSpaceBetween(n,r)&&!nj(s,r)}(t)?"":" "))}:null})}if(r)return void r.reports.push({node:t,finishReport:o});o()}function R(e){"argument"in e&&e.argument&&C(e.argument,nI(e))&&j(e.argument)}function F(e){let t=iH(e.left),n=iH(e.right);if(t&&n)return;let r=e=>{let t=nI(e),n=nI(e.left),r=nI(e.right),i="**"===e.operator,s=p&&("BinaryExpression"===e.left.type||"LogicalExpression"===e.left.type),a=p&&("BinaryExpression"===e.right.type||"LogicalExpression"===e.right.type);!s&&v(e.left)&&(!(["AwaitExpression","UnaryExpression"].includes(e.left.type)&&i)&&!nv(e.left,e)&&!("ReturnStatement"===e.parent.type&&e.parent.loc.start.line!==e.left.loc.start.line&&!k(e))&&(n>t||n===t&&!i)||w(e.left))&&j(e.left),!a&&v(e.right)&&(!nv(e.right,e)&&(r>t||r===t&&i)||w(e.right))&&j(e.right)};return r(t?{...e,left:{...e.left,type:em.AST_NODE_TYPES.SequenceExpression}}:n?{...e,right:{...e.right,type:em.AST_NODE_TYPES.SequenceExpression}}:e)}function M(e){let t=e=>{let t=e.callee;C(t,nI(e))&&(A(t)||!(D(e)||"NewExpression"===t.type&&!O(t)&&!("NewExpression"===e.type&&!O(e))||"NewExpression"===e.type&&"MemberExpression"===t.type&&P(t)||(!("optional"in e)||!e.optional)&&"ChainExpression"===t.type))&&j(e.callee),e.arguments.forEach(e=>{C(e,T)&&j(e)})};return t(iH(e.callee)?{...e,callee:{...e.callee,type:em.AST_NODE_TYPES.SequenceExpression}}:e.typeArguments&&1===e.arguments.length&&i.getTokenAfter(e.callee,nU.isOpeningParenToken)!==i.getTokenBefore(e.arguments[0],nU.isOpeningParenToken)?{...e,arguments:[{...e.arguments[0],type:em.AST_NODE_TYPES.SequenceExpression}]}:e)}function V(e){e.superClass&&(nI(e.superClass)>S?v(e.superClass):A(e.superClass))&&j(e.superClass)}function $(e){let t=k(e)?i.getTokenBefore(e):i.getFirstToken(e),n=i.getTokenAfter(t,nU.isNotOpeningParenToken),r=n?i.getTokenAfter(n):null,a=n?i.getTokenAfter(n,nU.isNotClosingParenToken):null;(0,nU.isOpeningParenToken)(t)&&((0,nU.isOpeningBraceToken)(n)||nb(n)&&("function"===n.value||"class"===n.value||"let"===n.value&&a&&((0,nU.isOpeningBracketToken)(a)||"Identifier"===a.type))||n&&"Identifier"===n.type&&"async"===n.value&&nb(r)&&"function"===r.value)&&s.add(n),("ExportDefaultDeclaration"===e.parent.type?C(e,T):v(e))&&j(e)}function q(e){return iH(e.argument)?R({...e,argument:{...e.argument,type:em.AST_NODE_TYPES.SequenceExpression}}):R(e)}function Y(e){e.computed&&C(e.key,T)&&j(e.key),e.value&&C(e.value,T)&&j(e.value)}function X(e){e.types.forEach(t=>{(p&&(0,nU.isNodeOfTypes)([em.AST_NODE_TYPES.TSUnionType,em.AST_NODE_TYPES.TSIntersectionType])(t)?w(t):C(t,nI(e)))&&j(t)})}let J={ArrayExpression(e){e.elements.map(e=>iH(e)?{...e,type:em.AST_NODE_TYPES.FunctionExpression}:e).forEach(e=>{e&&C(e,T)&&j(e)})},ArrayPattern(e){e.elements.forEach(e=>{e&&B(e)&&v(e)&&j(e)})},ArrowFunctionExpression(e){if(iH(e.body)||N(e)||"ConditionalExpression"===e.body.type&&d||"BlockStatement"===e.body.type)return;let t=i.getFirstToken(e.body,nU.isNotOpeningParenToken),n=i.getTokenBefore(t);(0,nU.isOpeningParenToken)(n)&&(0,nU.isOpeningBraceToken)(t)&&s.add(t),C(e.body,T)&&j(e.body)},AssignmentExpression(e){B(e.left)&&v(e.left)&&(!function({left:e,operator:t,right:n}){if("Identifier"===e.type&&["=","&&=","||=","??="].includes(t)){let e=n.type;if("ArrowFunctionExpression"===e||("FunctionExpression"===e||"ClassExpression"===e)&&!n.id)return!0}return!1}(e)||w(e.left))&&j(e.left),!N(e)&&C(e.right,nI(e))&&j(e.right)},AssignmentPattern(e){let{left:t,right:n}=e;B(t)&&v(t)&&j(t),n&&C(n,T)&&j(n)},AwaitExpression:e=>iH(e.argument)?R({...e,argument:{...e.argument,type:em.AST_NODE_TYPES.SequenceExpression}}):R(e),BinaryExpression(e){r&&"in"===e.operator&&r.inExpressionNodes.push(e),F(e)},CallExpression:M,ClassDeclaration:e=>e.superClass?.type===em.AST_NODE_TYPES.TSAsExpression?V({...e,superClass:{...e.superClass,type:em.AST_NODE_TYPES.SequenceExpression}}):V(e),ClassExpression:e=>e.superClass?.type===em.AST_NODE_TYPES.TSAsExpression?V({...e,superClass:{...e.superClass,type:em.AST_NODE_TYPES.SequenceExpression}}):V(e),ConditionalExpression(e){let t=e=>{if(N(e))return;let t=new Set(["BinaryExpression","LogicalExpression"]);!(l&&t.has(e.test.type))&&!(y&&["ConditionalExpression"].includes(e.test.type))&&!_(e)&&C(e.test,nI({type:"LogicalExpression",operator:"||"}))&&j(e.test),!(l&&t.has(e.consequent.type))&&!(y&&["ConditionalExpression"].includes(e.consequent.type))&&C(e.consequent,T)&&j(e.consequent),!(l&&t.has(e.alternate.type))&&!(y&&["ConditionalExpression"].includes(e.alternate.type))&&C(e.alternate,T)&&j(e.alternate)};return t(iH(e.test)?{...e,test:{...e.test,type:em.AST_NODE_TYPES.SequenceExpression}}:iH(e.consequent)?{...e,consequent:{...e.consequent,type:em.AST_NODE_TYPES.SequenceExpression}}:iH(e.alternate)?{...e,alternate:{...e.alternate,type:em.AST_NODE_TYPES.SequenceExpression}}:e)},DoWhileStatement(e){v(e.test)&&!_(e)&&j(e.test)},ExportDefaultDeclaration(e){$(e.declaration)},ExpressionStatement(e){$(e.expression)},ForInStatement(e){if(!iH(e.right)){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,nU.isNotOpeningParenToken);"let"===t.value&&(0,nU.isOpeningBracketToken)(i.getTokenAfter(t,nU.isNotClosingParenToken))&&s.add(t)}v(e.left)&&j(e.left),v(e.right)&&j(e.right)}},ForOfStatement(e){if("VariableDeclaration"!==e.left.type){let t=i.getFirstToken(e.left,nU.isNotOpeningParenToken);"let"===t.value&&s.add(t)}v(e.left)&&j(e.left),!iH(e.right)&&C(e.right,T)&&j(e.right)},ForStatement(e){if(e.test&&v(e.test)&&!_(e)&&!iH(e.test)&&j(e.test),e.update&&v(e.update)&&!iH(e.update)&&j(e.update),e.init&&!iH(e.init)){if("VariableDeclaration"!==e.init.type){let t=i.getFirstToken(e.init,nU.isNotOpeningParenToken);"let"===t.value&&(0,nU.isOpeningBracketToken)(i.getTokenAfter(t,nU.isNotClosingParenToken))&&s.add(t)}r={upper:r,inExpressionNodes:[],reports:[]},v(e.init)&&j(e.init)}},"ForStatement > *.init:exit":function(e){if(!iH(e)){r?.reports.length&&r.inExpressionNodes.forEach(t=>{var n;let i=(function(e,t){let n=[e],r=e;for(;r!==t;){if(null==(r=r.parent))throw Error("Nodes are not in the ancestor-descendant relationship.");n.push(r)}return n})(t,e).reverse(),s=null;for(let e=0;e<i.length;e++){let t=i[e];if(e<i.length-1&&function(e,t){switch(e.type){case"ArrayExpression":case"ArrayPattern":case"BlockStatement":case"ObjectExpression":case"ObjectPattern":case"TemplateLiteral":return!0;case"ArrowFunctionExpression":case"FunctionExpression":return e.params.includes(t);case"CallExpression":case"NewExpression":return e.arguments.includes(t);case"MemberExpression":return e.computed&&e.property===t;case"ConditionalExpression":return e.consequent===t;default:return!1}}(t,i[e+1]))return;if(k(t))if(!function(e){return r?.reports.some(t=>t.node===e)}(t))return;else{if(w(t))return;s||(s=t)}}s&&(n=s,r&&(r.reports=r.reports.filter(e=>e.node!==n)))});let{upper:t,inExpressionNodes:n,reports:i}=r??{};t?(t.inExpressionNodes.push(...n??[]),t.reports.push(...i??[])):i?.forEach(({finishReport:e})=>e()),r=t}},IfStatement(e){v(e.test)&&!_(e)&&j(e.test)},ImportExpression(e){let{source:t}=e;"SequenceExpression"===t.type?A(t)&&j(t):v(t)&&j(t)},LogicalExpression:F,MemberExpression(e){let t=e=>{let t=function e(t){return"MemberExpression"===t.type&&("NewExpression"===t.parent.type&&t.parent.callee===t||"object"in t.parent&&t.parent.object===t&&e(t.parent))}(e)&&P(e)?A(e.object):v(e.object)&&!(b(e.parent)&&"callee"in e.parent&&e.parent.callee===e&&h);t&&nI(e.object)>=nI(e)&&(e.computed||!(nN(e.object)||nO(e.object)))&&j(e.object),t&&"CallExpression"===e.object.type&&j(e.object),t&&!m&&"NewExpression"===e.object.type&&O(e.object)&&j(e.object),t&&e.optional&&"ChainExpression"===e.object.type&&j(e.object),e.computed&&v(e.property)&&j(e.property)};return t(iH(e.object)?{...e,object:{...e.object,type:em.AST_NODE_TYPES.SequenceExpression}}:iH(e.property)?{...e,property:{...e.property,type:em.AST_NODE_TYPES.FunctionExpression}}:e)},MethodDefinition(e){e.computed&&C(e.key,T)&&j(e.key)},NewExpression:M,ObjectExpression(e){e.properties.forEach(e=>{"Property"===e.type&&e.value&&C(e.value,T)&&j(e.value)})},ObjectPattern(e){e.properties.forEach(({value:e})=>{e&&B(e)&&v(e)&&j(e)})},Property(e){if(e.computed){let{key:t}=e;t&&C(t,T)&&j(t)}},PropertyDefinition:Y,AccessorProperty:Y,RestElement(e){let t=e.argument;B(t)&&v(t)&&j(t)},ReturnStatement(e){let t=i.getFirstToken(e);!N(e)&&e.argument&&t&&L(t,e.argument)&&!nO(e.argument)&&j(e.argument)},SequenceExpression(e){let t=nI(e);e.expressions.forEach(e=>{C(e,t)&&j(e)})},SpreadElement(e){!(iH(e.argument)||x&&x.has(e.argument.type))&&C(e.argument,T)&&j(e.argument)},SwitchCase(e){e.test&&!iH(e.test)&&v(e.test)&&j(e.test)},SwitchStatement(e){v(e.discriminant)&&j(e.discriminant)},TemplateLiteral(e){e.expressions.forEach(e=>{v(e)&&j(e)})},ThrowStatement(e){if(!e.argument||iH(e.argument))return;let t=i.getFirstToken(e);t&&L(t,e.argument)&&j(e.argument)},UnaryExpression:q,UpdateExpression(e){if(iH(e.argument))return q(e);if(e.prefix)R(e);else{let{argument:t}=e,n=i.getLastToken(e);(0,nU.isTokenOnSameLine)(t,n)?R(e):A(t)&&j(t)}},VariableDeclarator(e){let t=e=>{e.init&&C(e.init,T)&&!nO(e.init)&&j(e.init)};return t(iH(e.init)?{...e,type:em.AST_NODE_TYPES.VariableDeclarator,init:{...e.init,type:em.AST_NODE_TYPES.FunctionExpression}}:e)},WhileStatement(e){v(e.test)&&!_(e)&&j(e.test)},WithStatement(e){v(e.object)&&j(e.object)},YieldExpression(e){if(!e.argument||iH(e.argument))return;let t=i.getFirstToken(e);(nI(e.argument)>=nI(e)&&t&&L(t,e.argument)||A(e.argument))&&j(e.argument)},TSArrayType(e){C(e.elementType,nI(e))&&j(e.elementType)},TSIntersectionType:X,TSUnionType:X,TSTypeAnnotation(e){v(e.typeAnnotation)&&j(e.typeAnnotation)},TSTypeAliasDeclaration(e){v(e.typeAnnotation)&&j(e.typeAnnotation)},TSEnumMember(e){e.initializer&&v(e.initializer)&&j(e.initializer)}},U={},W=new Set,K=[];for(let e in J)U[e]=t=>K.push({node:t,listener:J[e]});return{...U,...n?.ignoredNodes?.reduce((e,t)=>Object.assign(e,{[t]:e=>W.add(e)}),{}),"Program:exit":function(){for(let e=0;e<K.length;e++){let{node:t,listener:n}=K[e];W.has(t)||n(t)}}}}}),iz=nz({name:"no-extra-semi",meta:{type:"layout",docs:{description:"Disallow unnecessary semicolons"},fixable:"code",schema:[],messages:{unexpected:"Unnecessary semicolon."}},defaultOptions:[],create(e){let t=e.sourceCode;function n(n){e.report({node:n,messageId:"unexpected",fix:!function(e){let n=t.getTokenAfter(e);return!n||"String"!==n.type||!nC(t.getNodeByRangeIndex(n.range[0]).parent)}(n)?null:t=>new n6(t,e.sourceCode).retainSurroundingTokens(n).remove(n)})}function r(e){for(let r=e;"Punctuator"===r.type&&!(0,nU.isClosingBraceToken)(r);r=t.getTokenAfter(r))(0,nU.isSemicolonToken)(r)&&n(r)}return{EmptyStatement(e){["ForStatement","ForInStatement","ForOfStatement","WhileStatement","DoWhileStatement","IfStatement","LabeledStatement","WithStatement"].includes(e.parent.type)||n(e)},ClassBody(e){r(t.getFirstToken(e,1))},MethodDefinition(e){r(t.getTokenAfter(e))},PropertyDefinition(e){r(t.getTokenAfter(e))},AccessorProperty(e){r(t.getTokenAfter(e))},StaticBlock(e){r(t.getTokenAfter(e))},TSAbstractMethodDefinition(e){r(t.getTokenAfter(e))},TSAbstractPropertyDefinition(e){r(t.getTokenAfter(e))}}}}),iQ=nz({name:"no-floating-decimal",meta:{type:"layout",docs:{description:"Disallow leading or trailing decimal points in numeric literals"},schema:[],fixable:"code",messages:{leading:"A leading decimal point can be confused with a dot.",trailing:"A trailing decimal point can be confused with a dot."}},create(e){let t=e.sourceCode;return{Literal(n){"number"==typeof n.value&&(n.raw.startsWith(".")&&e.report({node:n,messageId:"leading",fix(e){let r=t.getTokenBefore(n),i=r&&r.range[1]===n.range[0]&&!nj(r,`0${n.raw}`);return e.insertTextBefore(n,i?" 0":"0")}}),n.raw.indexOf(".")===n.raw.length-1&&e.report({node:n,messageId:"trailing",fix:e=>e.insertTextAfter(n,"0")}))}}}});const iZ=["+","-","*","/","%","**"],i0=["&","|","^","~","<<",">>",">>>"],i1=["==","!=","===","!==",">",">=","<","<="],i2=["&&","||"],i3=["in","instanceof"],i6=[].concat(iZ,i0,i1,i2,i3,["?:"],["??"]),i4=[iZ,i0,i1,i2,i3],i5=/^(?:Binary|Logical|Conditional)Expression$/u;function i9(e){return"ConditionalExpression"===e.type?e.test:e.left}var i8=nz({name:"no-mixed-operators",meta:{type:"layout",docs:{description:"Disallow mixed binary operators"},schema:[{type:"object",properties:{groups:{type:"array",items:{type:"array",items:{type:"string",enum:i6},minItems:2,uniqueItems:!0},uniqueItems:!0},allowSamePrecedence:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedMixedOperator:"Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."}},create(e){let t=e.sourceCode,n=function(e={}){return{groups:e.groups&&e.groups.length>0?e.groups:i4,allowSamePrecedence:!1!==e.allowSamePrecedence}}(e.options[0]);function r(e){return t.getTokenAfter(i9(e),nU.isNotClosingParenToken)}function i(i){var s;i5.test(i.parent.type)&&(s=i).operator!==s.parent.operator&&!nx(t,s)&&!function(e){var t,r,i;let s=e.parent;return t=n.groups??[],r=e.operator,i="ConditionalExpression"===s.type?"?:":s.operator,!t.some(e=>e.includes(r)&&e.includes(i))||n.allowSamePrecedence&&nI(e)===nI(s)}(i)&&function(t){let n=t.parent,i=i9(n)===t?t:n,s=i9(n)!==t?t:n,a={leftOperator:i.operator||"?:",rightOperator:s.operator||"?:"};e.report({node:i,loc:r(i).loc,messageId:"unexpectedMixedOperator",data:a}),e.report({node:s,loc:r(s).loc,messageId:"unexpectedMixedOperator",data:a})}(i)}return{BinaryExpression:i,LogicalExpression:i}}}),i7=nz({name:"no-mixed-spaces-and-tabs",meta:{type:"layout",docs:{description:"Disallow mixed spaces and tabs for indentation"},schema:[{oneOf:[{type:"string",enum:["smart-tabs"]},{type:"boolean"}]}],messages:{mixedSpacesAndTabs:"Mixed spaces and tabs."}},create(e){let t,n=e.sourceCode;switch(e.options[0]){case!0:case"smart-tabs":t=!0;break;default:t=!1}return{"Program:exit":function(r){let i=n.lines,s=n.getAllComments(),a=new Set;s.forEach(e=>{for(let t=e.loc.start.line+1;t<=e.loc.end.line;t++)a.add(t)});let o=/^(?=( +|\t+))\1(?:\t| )/u;t&&(o=/^(?=(\t*))\1(?=( +))\2\t/u),i.forEach((t,i)=>{let s=o.exec(t);if(s){let t=i+1,o={start:{line:t,column:s[0].length-2},end:{line:t,column:s[0].length}};if(!a.has(t)){let t=n.getNodeByRangeIndex(n.getIndexFromLoc(o.start));t&&["Literal","TemplateElement"].includes(t.type)||e.report({node:r,loc:o,messageId:"mixedSpacesAndTabs"})}}})}}}}),se=nz({name:"no-multi-spaces",meta:{type:"layout",docs:{description:"Disallow multiple spaces"},fixable:"whitespace",schema:[{type:"object",properties:{exceptions:{type:"object",patternProperties:{"^([A-Z][a-z]*)+$":{type:"boolean"}},additionalProperties:!1},ignoreEOLComments:{type:"boolean",default:!1},includeTabs:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{multipleSpaces:"Multiple spaces found before '{{displayValue}}'."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=n.ignoreEOLComments,i=Object.assign({Property:!0,ImportAttribute:!0},n.exceptions),s=Object.keys(i).some(e=>i[e]),a=!1===n.includeTabs?/ {2}/:/[ \t]{2}/;function o(e){let t=e.value.split("\n"),n=t[0],r=`${n.slice(0,12)}...`;return 1===t.length&&n.length<=12?n:r}return{Program(){t.tokensAndComments.forEach((n,l,p)=>{let c;if(l===p.length-1)return;let u=p[l+1];if(a.test(t.text.slice(n.range[1],u.range[0]))&&!(n.loc.end.line<u.loc.start.line)&&(!(r&&(0,nU.isCommentToken)(u))||l!==p.length-2&&!(u.loc.end.line<p[l+2].loc.start.line))){if(s){let e=t.getNodeByRangeIndex(u.range[0]-1);if(e&&i[e.type])return}c="Block"===u.type?`/*${o(u)}*/`:"Line"===u.type?`//${o(u)}`:u.value,e.report({node:u,loc:{start:n.loc.end,end:u.loc.start},messageId:"multipleSpaces",data:{displayValue:c},fix:e=>e.replaceTextRange([n.range[1],u.range[0]]," ")})}})}}}}),st=nz({name:"no-multiple-empty-lines",meta:{type:"layout",docs:{description:"Disallow multiple empty lines"},fixable:"whitespace",schema:[{type:"object",properties:{max:{type:"integer",minimum:0},maxEOF:{type:"integer",minimum:0},maxBOF:{type:"integer",minimum:0}},required:["max"],additionalProperties:!1}],messages:{blankBeginningOfFile:"Too many blank lines at the beginning of file. Max of {{max}} allowed.",blankEndOfFile:"Too many blank lines at the end of file. Max of {{max}} allowed.",consecutiveBlank:"More than {{max}} blank {{pluralizedLines}} not allowed."}},create(e){let t=2,n=2,r=2;e.options.length&&e.options[0]&&(t=e.options[0].max,n=void 0!==e.options[0].maxEOF?e.options[0].maxEOF:t,r=void 0!==e.options[0].maxBOF?e.options[0].maxBOF:t);let i=e.sourceCode,s=""===i.lines[i.lines.length-1]?i.lines.slice(0,-1):i.lines,a=new Set;return{TemplateLiteral(e){e.quasis.forEach(e=>{for(let t=e.loc.start.line;t<e.loc.end.line;t++)a.add(t)})},"Program:exit":function(o){return s.reduce((e,t,n)=>((t.trim()||a.has(n+1))&&e.push(n+1),e),[]).concat(s.length+1).reduce((a,l)=>{let p,c;return 0===a?(p="blankBeginningOfFile",c=r):l===s.length+1?(p="blankEndOfFile",c=n):(p="consecutiveBlank",c=t),l-a-1>c&&e.report({node:o,loc:{start:{line:a+c+1,column:0},end:{line:l,column:0}},messageId:p,data:{max:c,pluralizedLines:1===c?"line":"lines"},fix(e){let t=i.getIndexFromLoc({line:a+1,column:0}),n=l-c,r=n<=s.length?i.getIndexFromLoc({line:n,column:0}):i.text.length;return e.removeRange([t,r])}}),l},0)}}}});const sn=/\t+/gu,sr=/\S/u;var si=nz({name:"no-tabs",meta:{type:"layout",docs:{description:"Disallow all tabs"},schema:[{type:"object",properties:{allowIndentationTabs:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{unexpectedTab:"Unexpected tab character."}},create(e){let t=e.sourceCode,n=e.options&&e.options[0]&&e.options[0].allowIndentationTabs;return{Program(r){t.getLines().forEach((t,i)=>{let s;for(;null!==(s=sn.exec(t));)(!n||sr.test(t.slice(0,s.index)))&&e.report({node:r,loc:{start:{line:i+1,column:s.index},end:{line:i+1,column:s.index+s[0].length}},messageId:"unexpectedTab"})})}}}}),ss=nz({name:"no-trailing-spaces",meta:{type:"layout",docs:{description:"Disallow trailing whitespace at the end of lines"},fixable:"whitespace",schema:[{type:"object",properties:{skipBlankLines:{type:"boolean",default:!1},ignoreComments:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{trailingSpace:"Trailing spaces not allowed."}},create(e){let t=e.sourceCode,n="[ \xa0 -​ ]",r=`^${n}*$`,i=`${n}+$`,s=e.options[0]||{},a=s.skipBlankLines||!1,o=s.ignoreComments||!1;return{Program:function(n){let s=RegExp(i,"u"),l=RegExp(r,"u"),p=t.lines,c=t.getText().match(nu()),u=function(e){let t=new Set;return e.forEach(e=>{let n="Block"===e.type?e.loc.end.line-1:e.loc.end.line;for(let r=e.loc.start.line;r<=n;r++)t.add(r)}),t}(t.getAllComments()),d=0;for(let r=0,i=p.length;r<i;r++){let i=r+1,f=c&&c[r]?c[r].length:1,m=p[r].length+f,h=s.exec(p[r]);if(h){let s={start:{line:i,column:h.index},end:{line:i,column:m-f}},c=d+s.start.column,g=d+s.end.column,y=t.getNodeByRangeIndex(c);if(y&&"TemplateElement"===y.type&&c>y.parent.range[0]&&g<y.parent.range[1]||a&&l.test(p[r])){d+=m;continue}let x=[c,g];o&&u.has(i)||function(t,n,r){e.report({node:t,loc:n,messageId:"trailingSpace",fix:e=>e.removeRange(r)})}(n,s,x)}d+=m}}}}}),sa=nz({name:"no-whitespace-before-property",meta:{type:"layout",docs:{description:"Disallow whitespace before properties"},fixable:"whitespace",schema:[],messages:{unexpectedWhitespace:"Unexpected whitespace before property {{propName}}."}},create(e){let t=e.sourceCode;return{MemberExpression(n){let r,i;if((0,nU.isTokenOnSameLine)(n.object,n.property)){var s,a;n.computed?(r=t.getTokenBefore(n.property,nU.isOpeningBracketToken),i=t.getTokenBefore(r,+!!n.optional)):(r=t.getFirstToken(n.property),i=t.getTokenBefore(r,1)),t.isSpaceBetween(i,r)&&(s=i,a=r,e.report({node:n,messageId:"unexpectedWhitespace",data:{propName:t.getText(n.property)},fix(e){let r="";return!n.computed&&!n.optional&&nN(n.object)||t.commentsExistBetween(s,a)?null:(n.optional?r="?.":n.computed||(r="."),e.replaceTextRange([s.range[1],a.range[0]],r))}}))}}}}});const so={type:"string",enum:["beside","below","any"]};var sl=nz({name:"nonblock-statement-body-position",meta:{type:"layout",docs:{description:"Enforce the location of single-line statements"},fixable:"whitespace",schema:[so,{type:"object",properties:{overrides:{type:"object",properties:{if:so,else:so,while:so,do:so,for:so},additionalProperties:!1}},additionalProperties:!1}],messages:{expectNoLinebreak:"Expected no linebreak before this statement.",expectLinebreak:"Expected a linebreak before this statement."}},create(e){let t=e.sourceCode;function n(n,r){let i=e.options[1]&&e.options[1].overrides&&e.options[1].overrides[r]||e.options[0]||"beside";if("BlockStatement"===n.type||"any"===i)return;let s=t.getTokenBefore(n),a=(0,nU.isTokenOnSameLine)(s,n);a&&"below"===i?e.report({node:n,messageId:"expectLinebreak",fix:e=>e.insertTextBefore(n,"\n")}):a||"beside"!==i||e.report({node:n,messageId:"expectNoLinebreak",fix:e=>t.getText().slice(s.range[1],n.range[0]).trim()?null:e.replaceTextRange([s.range[1],n.range[0]]," ")})}return{IfStatement(e){n(e.consequent,"if"),e.alternate&&"IfStatement"!==e.alternate.type&&n(e.alternate,"else")},WhileStatement:e=>n(e.body,"while"),DoWhileStatement:e=>n(e.body,"do"),ForStatement:e=>n(e.body,"for"),ForInStatement:e=>n(e.body,"for"),ForOfStatement:e=>n(e.body,"for")}}});const sp={oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{multiline:{type:"boolean"},minProperties:{type:"integer",minimum:0},consistent:{type:"boolean"}},additionalProperties:!1,minProperties:1}]},sc={multiline:!1,minProperties:1/0,consistent:!0};var su=nz({name:"object-curly-newline",meta:{type:"layout",docs:{description:"Enforce consistent line breaks after opening and before closing braces"},fixable:"whitespace",schema:[{oneOf:[sp,{type:"object",properties:{ObjectExpression:sp,ObjectPattern:sp,ImportDeclaration:sp,ExportDeclaration:sp,TSTypeLiteral:sp,TSInterfaceBody:sp,TSEnumBody:sp},additionalProperties:!1,minProperties:1}]}],messages:{unexpectedLinebreakBeforeClosingBrace:"Unexpected line break before this closing brace.",unexpectedLinebreakAfterOpeningBrace:"Unexpected line break after this opening brace.",expectedLinebreakBeforeClosingBrace:"Expected a line break before this closing brace.",expectedLinebreakAfterOpeningBrace:"Expected a line break after this opening brace."}},defaultOptions:[{ObjectExpression:sc,ObjectPattern:sc,ImportDeclaration:sc,ExportDeclaration:sc,TSTypeLiteral:sc,TSInterfaceBody:sc}],create(e){let t=e.sourceCode;function n(e){let t=!1,n=1/0,r=!1;return e?"always"===e?n=0:"never"===e?n=1/0:(t=!!e.multiline,n=e.minProperties||1/0,r=!!e.consistent):r=!0,{multiline:t,minProperties:n,consistent:r}}function r(e){return"object"==typeof e&&null!==e}function i(e){return r(e)||"string"==typeof e}let s=function(e){if(r(e)&&Object.values(e).some(i))return{ObjectExpression:n(e.ObjectExpression),ObjectPattern:n(e.ObjectPattern),ImportDeclaration:n(e.ImportDeclaration),ExportNamedDeclaration:n(e.ExportDeclaration),TSTypeLiteral:n(e.TSTypeLiteral),TSInterfaceBody:n(e.TSInterfaceBody),TSEnumBody:n(e.TSEnumBody)};let t=n(e);return{ObjectExpression:t,ObjectPattern:t,ImportDeclaration:t,ExportNamedDeclaration:t,TSTypeLiteral:t,TSInterfaceBody:t,TSEnumBody:t}}(e.options[0]);function a(n){var r,i;let a,o,l=s[n.type];if("ImportDeclaration"===n.type&&!n.specifiers.some(e=>"ImportSpecifier"===e.type)||"ExportNamedDeclaration"===n.type&&!n.specifiers.some(e=>"ExportSpecifier"===e.type))return;let p=t.getFirstToken(n,e=>"{"===e.value);a="ObjectPattern"===n.type&&n.typeAnnotation?t.getTokenBefore(n.typeAnnotation):t.getLastToken(n,e=>"}"===e.value);let c=t.getTokenAfter(p,{includeComments:!0}),u=t.getTokenBefore(a,{includeComments:!0}),d=(r=c,i=u,(o="ObjectExpression"===n.type||"ObjectPattern"===n.type?n.properties:"TSTypeLiteral"===n.type?n.members:"TSInterfaceBody"===n.type?n.body:"TSEnumBody"===n.type?n.members:n.specifiers.filter(e=>"ImportSpecifier"===e.type||"ExportSpecifier"===e.type)).length>=l.minProperties||l.multiline&&o.length>0&&!(0,nU.isTokenOnSameLine)(i,r)),f=(0,nU.isCommentToken)(c),m=(0,nU.isCommentToken)(u);if(c=t.getTokenAfter(p),u=t.getTokenBefore(a),d)(0,nU.isTokenOnSameLine)(p,c)&&e.report({messageId:"expectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>f?null:e.insertTextAfter(p,"\n")}),(0,nU.isTokenOnSameLine)(u,a)&&e.report({messageId:"expectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix:e=>m?null:e.insertTextBefore(a,"\n")});else{let t=l.consistent,r=!(0,nU.isTokenOnSameLine)(p,c),i=!(0,nU.isTokenOnSameLine)(u,a);(!t&&r||t&&r&&!i)&&e.report({messageId:"unexpectedLinebreakAfterOpeningBrace",node:n,loc:p.loc,fix:e=>f?null:e.removeRange([p.range[1],c.range[0]])}),(!t&&i||t&&!r&&i)&&e.report({messageId:"unexpectedLinebreakBeforeClosingBrace",node:n,loc:a.loc,fix:e=>m?null:e.removeRange([u.range[1],a.range[0]])})}}return{ObjectExpression:a,ObjectPattern:a,ImportDeclaration:a,ExportNamedDeclaration:a,TSTypeLiteral:a,TSInterfaceBody:a,TSEnumBody:a}}}),sd=nz({name:"object-curly-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside braces"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{arraysInObjects:{type:"boolean"},objectsInObjects:{type:"boolean"}},additionalProperties:!1}],messages:{requireSpaceBefore:"A space is required before '{{token}}'.",requireSpaceAfter:"A space is required after '{{token}}'.",unexpectedSpaceBefore:"There should be no space before '{{token}}'.",unexpectedSpaceAfter:"There should be no space after '{{token}}'."}},defaultOptions:["never"],create(e){let[t,n]=e.options,r="always"===t,i=e.sourceCode;function s(e){return!!n&&!r===n[e]}let a={spaced:r,arraysInObjectsException:s("arraysInObjects"),objectsInObjectsException:s("objectsInObjects")};function o(t,n,r){let s=i.getTokenAfter(n,{includeComments:!0});if((0,nU.isTokenOnSameLine)(n,s)){let r=i.isSpaceBetween(n,s),o=i.getNodeByRangeIndex(s.range[0]).type,l=a.arraysInObjectsException&&[em.AST_NODE_TYPES.TSMappedType,em.AST_NODE_TYPES.TSIndexSignature].includes(o)?!a.spaced:a.spaced;l&&!r&&e.report({node:t,loc:n.loc,messageId:"requireSpaceAfter",data:{token:n.value},fix:e=>e.insertTextAfter(n," ")}),!l&&r&&s.type!==em.AST_TOKEN_TYPES.Line&&function(t,n){let r=i.getTokenAfter(n,{includeComments:!0});e.report({node:t,loc:{start:n.loc.end,end:r.loc.start},messageId:"unexpectedSpaceAfter",data:{token:n.value},fix:e=>e.removeRange([n.range[1],r.range[0]])})}(t,n)}let o=i.getTokenBefore(r,{includeComments:!0});if((0,nU.isTokenOnSameLine)(o,r)){let n=a.arraysInObjectsException&&(0,nU.isClosingBracketToken)(o)||a.objectsInObjectsException&&(0,nU.isClosingBraceToken)(o)?i.getNodeByRangeIndex(o.range[0]).type:void 0,s=a.arraysInObjectsException&&[em.AST_NODE_TYPES.ArrayExpression,em.AST_NODE_TYPES.TSTupleType].includes(n)||a.objectsInObjectsException&&void 0!==n&&[em.AST_NODE_TYPES.ObjectExpression,em.AST_NODE_TYPES.ObjectPattern,em.AST_NODE_TYPES.TSMappedType,em.AST_NODE_TYPES.TSTypeLiteral].includes(n)?!a.spaced:a.spaced,l=i.isSpaceBetween(o,r);s&&!l&&e.report({node:t,loc:r.loc,messageId:"requireSpaceBefore",data:{token:r.value},fix:e=>e.insertTextBefore(r," ")}),!s&&l&&function(t,n){let r=i.getTokenBefore(n,{includeComments:!0});e.report({node:t,loc:{start:r.loc.end,end:n.loc.start},messageId:"unexpectedSpaceBefore",data:{token:n.value},fix:e=>e.removeRange([r.range[1],n.range[0]])})}(t,r)}}function l(e,t){if(0!==t.length)o(e,i.getTokenBefore(t[0],nU.isOpeningBraceToken),i.getTokenAfter(t.at(-1),nU.isClosingBraceToken))}return{ObjectPattern(e){l(e,e.properties)},ObjectExpression(e){l(e,e.properties)},ImportDeclaration(e){e.attributes&&l(e,e.attributes);let t=e.specifiers.findIndex(e=>"ImportSpecifier"===e.type);-1!==t&&l(e,e.specifiers.slice(t))},ExportNamedDeclaration(e){l(e,e.specifiers),e.attributes&&l(e,e.attributes)},ExportAllDeclaration(e){e.attributes&&l(e,e.attributes)},TSMappedType(e){let t=i.getFirstToken(e),n=i.getLastToken(e);o(e,t,n)},TSTypeLiteral(e){l(e,e.members)},TSInterfaceBody(e){l(e,e.body)},TSEnumBody(e){l(e,e.members)}}}}),sf=nz({name:"object-property-newline",meta:{type:"layout",docs:{description:"Enforce placing object properties on separate lines"},schema:[{type:"object",properties:{allowAllPropertiesOnSameLine:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"whitespace",messages:{propertiesOnNewlineAll:"Object properties must go on a new line if they aren't all on the same line.",propertiesOnNewline:"Object properties must go on a new line."}},defaultOptions:[{allowAllPropertiesOnSameLine:!1}],create(e){let t=e.options[0]&&e.options[0].allowAllPropertiesOnSameLine,n=t?"propertiesOnNewlineAll":"propertiesOnNewline",r=e.sourceCode;function i(i,s){if(t&&s.length>1){let e=r.getFirstToken(s[0]),t=r.getLastToken(s[s.length-1]);if((0,nU.isTokenOnSameLine)(e,t))return}for(let t=1;t<s.length;t++){let a=r.getLastToken(s[t-1]),o=r.getFirstToken(s[t]);(0,nU.isTokenOnSameLine)(a,o)&&e.report({node:i,loc:o.loc,messageId:n,fix(e){let t=[r.getTokenBefore(o).range[1],o.range[0]];return r.text.slice(t[0],t[1]).trim()?null:e.replaceTextRange(t,"\n")}})}}return{ObjectExpression(e){i(e,e.properties)},TSTypeLiteral(e){i(e,e.members)},TSInterfaceBody(e){i(e,e.body)}}}}),sm=nz({name:"one-var-declaration-per-line",meta:{type:"layout",docs:{description:"Require or disallow newlines around variable declarations"},schema:[{type:"string",enum:["always","initializations"]}],fixable:"whitespace",messages:{expectVarOnNewline:"Expected variable declaration to be on a new line."}},create(e){let{sourceCode:t}=e,n="always"===e.options[0];return{VariableDeclaration:function(r){var i;let s;"ForStatement"!==(i=r.parent.type)&&"ForInStatement"!==i&&"ForOfStatement"!==i&&r.declarations.forEach(i=>{if(s&&(0,nU.isTokenOnSameLine)(s,i)&&(n||s.init||i.init)){let n=e=>e.insertTextBefore(i,"\n"),s=t.getTokenBefore(i,{includeComments:!1});if(s){let e=t.text.slice(s.range[1],i.range[0]);n=t=>t.replaceTextRange([s.range[1],i.range[0]],`${e}
23
+ `)}e.report({node:r,messageId:"expectVarOnNewline",loc:i.loc,fix:n})}s=i})}}}}),sh=nz({name:"operator-linebreak",meta:{type:"layout",docs:{description:"Enforce consistent linebreak style for operators"},schema:[{oneOf:[{type:"string",enum:["after","before","none"]},{type:"null"}]},{type:"object",properties:{overrides:{type:"object",additionalProperties:{type:"string",enum:["after","before","none","ignore"]}}},additionalProperties:!1}],fixable:"code",messages:{operatorAtBeginning:"'{{operator}}' should be placed at the beginning of the line.",operatorAtEnd:"'{{operator}}' should be placed at the end of the line.",badLinebreak:"Bad line breaking before and after '{{operator}}'.",noLinebreak:"There should be no line break before or after '{{operator}}'."}},create(e){let t=!e.options[0],n=e.options[0]||"after",r=e.options[1]||{},i=r.overrides?Object.assign({},r.overrides):{};t&&!i["?"]&&(i["?"]="before"),t&&!i[":"]&&(i[":"]="before");let s=e.sourceCode;function a(t,r,a){let o=s.getTokenBefore(r,e=>e.value===a),l=s.getTokenBefore(o),p=s.getTokenAfter(o),c=i[a],u=c||n,d=e=>{let t,n,r=s.getTokenBefore(o),i=s.getTokenAfter(o),a=s.text.slice(r.range[1],o.range[0]),l=s.text.slice(o.range[1],i.range[0]),p=!(0,nU.isTokenOnSameLine)(r,o);if(!(0,nU.isTokenOnSameLine)(o,i)!==p&&"none"!==u){if(s.getTokenBefore(o,{includeComments:!0})!==r&&s.getTokenAfter(o,{includeComments:!0})!==i)return null;t=l,n=a}else{let e=nu();if(t="before"===u||a.trim()?a:a.replace(e,""),n="after"===u||l.trim()?l:l.replace(e,""),t===a&&n===l)return null}return""===n&&"Punctuator"===i.type&&"+-".includes(o.value)&&i.value===o.value&&(n+=" "),e.replaceTextRange([r.range[1],i.range[0]],t+o.value+n)};(0,nU.isTokenOnSameLine)(l,o)&&(0,nU.isTokenOnSameLine)(o,p)||("ignore"===c||(0,nU.isTokenOnSameLine)(l,o)||(0,nU.isTokenOnSameLine)(o,p)?"before"===u&&(0,nU.isTokenOnSameLine)(l,o)?e.report({node:t,loc:o.loc,messageId:"operatorAtBeginning",data:{operator:a},fix:d}):"after"===u&&(0,nU.isTokenOnSameLine)(o,p)?e.report({node:t,loc:o.loc,messageId:"operatorAtEnd",data:{operator:a},fix:d}):"none"===u&&e.report({node:t,loc:o.loc,messageId:"noLinebreak",data:{operator:a},fix:d}):e.report({node:t,loc:o.loc,messageId:"badLinebreak",data:{operator:a},fix:d}))}function o(e){a(e,e.right,e.operator)}return{BinaryExpression:o,LogicalExpression:o,AssignmentExpression:o,VariableDeclarator(e){e.init&&a(e,e.init,"=")},PropertyDefinition(e){e.value&&a(e,e.value,"=")},AccessorProperty(e){e.value&&a(e,e.value,"=")},ConditionalExpression(e){a(e,e.consequent,"?"),a(e,e.alternate,":")},TSImportEqualsDeclaration(e){a(e,e.moduleReference,"=")},TSTypeAliasDeclaration(e){a(e,e.typeAnnotation,"=")},TSConditionalType(e){a(e,e.trueType,"?"),a(e,e.falseType,":")},TSIntersectionType(e){let{types:t}=e;for(let e=0;e<t.length-1;e++)a(t[e],t[e+1],"&")},TSUnionType(e){let{types:t}=e;for(let e=0;e<t.length-1;e++)a(t[e],t[e+1],"|")},TSTypeParameter(e){e.default&&a(e,e.default,"=")},TSEnumMember(e){e.initializer&&a(e,e.initializer,"=")}}}});const sg=["always","never","start","end"];var sy=nz({name:"padded-blocks",meta:{type:"layout",docs:{description:"Require or disallow padding within blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:sg},{type:"object",properties:{blocks:{type:"string",enum:sg},switches:{type:"string",enum:sg},classes:{type:"string",enum:sg}},additionalProperties:!1,minProperties:1}]},{type:"object",properties:{allowSingleLineBlocks:{type:"boolean"}},additionalProperties:!1}],messages:{missingPadBlock:"Block must be padded by blank lines.",extraPadBlock:"Block must not be padded by blank lines."}},create(e){let t={},n=e.options[0]||"always",r=e.options[1]||{};"string"==typeof n?(t.blocks=n,t.switches=n,t.classes=n):Object.assign(t,n),r.allowSingleLineBlocks??=!1;let i=e.sourceCode;function s(e){return"Line"===e.type||"Block"===e.type}function a(e,t){return t.loc.start.line-e.loc.end.line>=2}function o(n){let o=function(e){let t,n=e;do t=n,n=i.getTokenAfter(n,{includeComments:!0});while(s(n)&&(0,nU.isTokenOnSameLine)(t,n));return n}("SwitchStatement"===n.type?i.getTokenBefore(n.cases[0]):"StaticBlock"===n.type?i.getFirstToken(n,{skip:1}):i.getFirstToken(n)),l=i.getTokenBefore(o,{includeComments:!0}),p=function(e){let t,n=e;do t=n,n=i.getTokenBefore(n,{includeComments:!0});while(s(n)&&(0,nU.isTokenOnSameLine)(n,t));return n}(i.getLastToken(n)),c=i.getTokenAfter(p,{includeComments:!0}),u=a(l,o),d=a(p,c);if(r.allowSingleLineBlocks&&(0,nU.isTokenOnSameLine)(l,c))return;let f=function(e){switch(e.type){case"BlockStatement":case"StaticBlock":return t.blocks;case"SwitchStatement":return t.switches;case"ClassBody":return t.classes;default:throw Error("unreachable")}}(n);u?("never"===f||"end"===f)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.replaceTextRange([l.range[1],o.range[0]-o.loc.start.column],"\n"),messageId:"extraPadBlock"}):("always"===f||"start"===f)&&e.report({node:n,loc:{start:l.loc.start,end:o.loc.start},fix:e=>e.insertTextAfter(l,"\n"),messageId:"missingPadBlock"}),d?("never"===f||"start"===f)&&e.report({node:n,loc:{end:c.loc.start,start:p.loc.end},messageId:"extraPadBlock",fix:e=>e.replaceTextRange([p.range[1],c.range[0]-c.loc.start.column],"\n")}):("always"===f||"end"===f)&&e.report({node:n,loc:{end:c.loc.start,start:p.loc.end},fix:e=>e.insertTextBefore(c,"\n"),messageId:"missingPadBlock"})}let l={};return Object.prototype.hasOwnProperty.call(t,"switches")&&(l.SwitchStatement=function(e){0!==e.cases.length&&o(e)}),Object.prototype.hasOwnProperty.call(t,"blocks")&&(l.BlockStatement=function(e){0!==e.body.length&&o(e)},l.StaticBlock=l.BlockStatement),Object.prototype.hasOwnProperty.call(t,"classes")&&(l.ClassBody=function(e){0!==e.body.length&&o(e)}),l}});const sx=/^(?:module\s*\.\s*)?exports(?:\s*\.|\s*\[|$)/u,sT=/^require\(/u,sS=`[${Array.from(ns).join("")}]`,sb=RegExp(String.raw`^(\s*?${sS})\s*${sS}(\s*;?)$`,"u");function sE(e,t){return{test(n,r){let i=r.getFirstToken(n)?.value===t,s=Array.isArray(e)?e.includes(n.type):e===n.type;return i&&s}}}function sk(e){return{test:t=>t.type===e}}function sw(e){if(e.type===em.AST_NODE_TYPES.ExpressionStatement){let t=ny(e.expression);if(t.type===em.AST_NODE_TYPES.UnaryExpression&&(t=ny(t.argument)),t.type===em.AST_NODE_TYPES.CallExpression){let e=t.callee;for(;e.type===em.AST_NODE_TYPES.SequenceExpression;)e=e.expressions[e.expressions.length-1];return(0,nU.isFunction)(e)}}return!1}function sv(e,t){return nC(e)&&e.expression.type===em.AST_NODE_TYPES.Literal&&"string"==typeof e.expression.value&&!(0,nU.isParenthesized)(e.expression,t)}function sA(e,t){if(sv(e,t)&&e.parent&&"body"in e.parent&&Array.isArray(e.parent.body)){for(let n of e.parent.body){if(n===e)break;if(!sv(n,t))return!1}return!0}return!1}function sC(e,t){let n=t.getLastToken(e),r=t.getTokenBefore(n),i=t.getTokenAfter(n);return r&&i&&r.range[0]>=e.range[0]&&(0,nU.isSemicolonToken)(n)&&!(0,nU.isTokenOnSameLine)(r,n)&&(0,nU.isTokenOnSameLine)(n,i)?r:n}function s_(e,t,n){return t+n}const sO={any:{verify:function(){}},never:{verify:function(e,t,n,r){0!==r.length&&e.report({node:n,messageId:"unexpectedBlankLine",fix(t){if(r.length>=2)return null;let n=r[0][0],i=r[0][1],s=n.range[1],a=i.range[0],o=e.getSourceCode().text.slice(s,a).replace(sb,s_);return t.replaceTextRange([s,a],o)}})}},always:{verify:function(e,t,n,r){r.length>0||e.report({node:n,messageId:"expectedBlankLine",fix(r){let i=e.sourceCode,s=sC(t,i),a=i.getFirstTokenBetween(s,n,{includeComments:!0,filter:e=>!(0,nU.isTokenOnSameLine)(s,e)||(s=e,!1)})||n,o=(0,nU.isTokenOnSameLine)(s,a)?"\n\n":"\n";return r.insertTextAfter(s,o)}})}}},sP={"block-like":{test:function(e,t){if(e.type===em.AST_NODE_TYPES.DoWhileStatement&&e.body.type===em.AST_NODE_TYPES.BlockStatement||sw(e))return!0;let n=t.getLastToken(e,nU.isNotSemicolonToken),r=n&&(0,nU.isClosingBraceToken)(n)?t.getNodeByRangeIndex(n.range[0]):null;return!!r&&(r.type===em.AST_NODE_TYPES.BlockStatement||r.type===em.AST_NODE_TYPES.SwitchStatement)}},expression:{test:function(e,t){return e.type===em.AST_NODE_TYPES.ExpressionStatement&&!sA(e,t)}},return:sE(em.AST_NODE_TYPES.ReturnStatement,"return"),export:sE([em.AST_NODE_TYPES.ExportAllDeclaration,em.AST_NODE_TYPES.ExportDefaultDeclaration,em.AST_NODE_TYPES.ExportNamedDeclaration],"export"),var:sE(em.AST_NODE_TYPES.VariableDeclaration,"var"),let:sE(em.AST_NODE_TYPES.VariableDeclaration,"let"),const:sE(em.AST_NODE_TYPES.VariableDeclaration,"const"),using:{test:e=>"VariableDeclaration"===e.type&&("using"===e.kind||"await using"===e.kind)},type:sE(em.AST_NODE_TYPES.TSTypeAliasDeclaration,"type")},sI={"*":{test:()=>!0},exports:{test:function(e){if(e.type===em.AST_NODE_TYPES.ExpressionStatement){let t=e.expression;if(t.type===em.AST_NODE_TYPES.AssignmentExpression){let e=t.left;if(e.type===em.AST_NODE_TYPES.MemberExpression){for(;e.object.type===em.AST_NODE_TYPES.MemberExpression;)e=e.object;return e.object.type===em.AST_NODE_TYPES.Identifier&&("exports"===e.object.name||"module"===e.object.name&&e.property.type===em.AST_NODE_TYPES.Identifier&&"exports"===e.property.name)}}}return!1}},require:{test:function(e){if(e.type===em.AST_NODE_TYPES.VariableDeclaration){let t=e.declarations[0];if(t?.init){let e=t?.init;for(;e.type===em.AST_NODE_TYPES.MemberExpression;)e=e.object;if(e.type===em.AST_NODE_TYPES.CallExpression&&e.callee.type===em.AST_NODE_TYPES.Identifier)return"require"===e.callee.name}}return!1}},directive:{test:sA},iife:{test:sw},block:sk(em.AST_NODE_TYPES.BlockStatement),empty:sk(em.AST_NODE_TYPES.EmptyStatement),function:sk(em.AST_NODE_TYPES.FunctionDeclaration),"ts-method":sk(em.AST_NODE_TYPES.TSMethodSignature),break:sE(em.AST_NODE_TYPES.BreakStatement,"break"),case:sE(em.AST_NODE_TYPES.SwitchCase,"case"),class:sE(em.AST_NODE_TYPES.ClassDeclaration,"class"),continue:sE(em.AST_NODE_TYPES.ContinueStatement,"continue"),debugger:sE(em.AST_NODE_TYPES.DebuggerStatement,"debugger"),default:sE([em.AST_NODE_TYPES.SwitchCase,em.AST_NODE_TYPES.ExportDefaultDeclaration],"default"),do:sE(em.AST_NODE_TYPES.DoWhileStatement,"do"),for:sE([em.AST_NODE_TYPES.ForStatement,em.AST_NODE_TYPES.ForInStatement,em.AST_NODE_TYPES.ForOfStatement],"for"),if:sE(em.AST_NODE_TYPES.IfStatement,"if"),import:sE(em.AST_NODE_TYPES.ImportDeclaration,"import"),switch:sE(em.AST_NODE_TYPES.SwitchStatement,"switch"),throw:sE(em.AST_NODE_TYPES.ThrowStatement,"throw"),try:sE(em.AST_NODE_TYPES.TryStatement,"try"),while:sE([em.AST_NODE_TYPES.WhileStatement,em.AST_NODE_TYPES.DoWhileStatement],"while"),with:sE(em.AST_NODE_TYPES.WithStatement,"with"),"cjs-export":{test:(e,t)=>"ExpressionStatement"===e.type&&"AssignmentExpression"===e.expression.type&&sx.test(t.getText(e.expression.left))},"cjs-import":{test:(e,t)=>"VariableDeclaration"===e.type&&e.declarations.length>0&&!!e.declarations[0].init&&sT.test(t.getText(e.declarations[0].init))},enum:sE(em.AST_NODE_TYPES.TSEnumDeclaration,"enum"),interface:sE(em.AST_NODE_TYPES.TSInterfaceDeclaration,"interface"),"function-overload":sk(em.AST_NODE_TYPES.TSDeclareFunction),...Object.fromEntries(Object.entries(sP).flatMap(([e,t])=>[[e,t],[`singleline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&nY(e)}],[`multiline-${e}`,{...t,test:(e,n)=>t.test(e,n)&&!nY(e)}]]))};var sN=nz({name:"padding-line-between-statements",meta:{type:"layout",docs:{description:"Require or disallow padding lines between statements"},fixable:"whitespace",hasSuggestions:!1,schema:{$defs:{paddingType:{type:"string",enum:Object.keys(sO)},statementType:{type:"string",enum:Object.keys(sI)},statementOption:{anyOf:[{$ref:"#/$defs/statementType"},{type:"array",items:{$ref:"#/$defs/statementType"},minItems:1,uniqueItems:!0,additionalItems:!1}]}},type:"array",additionalItems:!1,items:{type:"object",properties:{blankLine:{$ref:"#/$defs/paddingType"},prev:{$ref:"#/$defs/statementOption"},next:{$ref:"#/$defs/statementOption"}},additionalProperties:!1,required:["blankLine","prev","next"]}},messages:{unexpectedBlankLine:"Unexpected blank line before this statement.",expectedBlankLine:"Expected blank line before this statement."}},defaultOptions:[],create(e){let t=e.sourceCode,n=e.options||[],r=null;function i(){r={upper:r,prevNode:null}}function s(){r&&(r=r.upper)}function a(e,n){let r=e;for(;r.type===em.AST_NODE_TYPES.LabeledStatement;)r=r.body;return Array.isArray(n)?n.some(a.bind(null,r)):sI[n].test(r,t)}function o(i){if(!i.parent||![em.AST_NODE_TYPES.BlockStatement,em.AST_NODE_TYPES.Program,em.AST_NODE_TYPES.StaticBlock,em.AST_NODE_TYPES.SwitchCase,em.AST_NODE_TYPES.SwitchStatement,em.AST_NODE_TYPES.TSInterfaceBody,em.AST_NODE_TYPES.TSModuleBlock,em.AST_NODE_TYPES.TSTypeLiteral].includes(i.parent.type))return;let s=r.prevNode;if(s){let r=function(e,t){for(let r=n.length-1;r>=0;--r){let i=n[r];if(a(e,i.prev)&&a(t,i.next))return sO[i.blankLine]}return sO.any}(s,i),o=function(e,n){let r=[],i=sC(e,t);if(n.loc.start.line-i.loc.end.line>=2)do{let e=t.getTokenAfter(i,{includeComments:!0});e.loc.start.line-i.loc.end.line>=2&&r.push([i,e]),i=e}while(i.range[0]<n.range[0]);return r}(s,i);r.verify(e,s,i,o)}r.prevNode=i}function l(e){o(e),i()}return{Program:i,"Program:exit":s,BlockStatement:i,"BlockStatement:exit":s,SwitchStatement:i,"SwitchStatement:exit":s,SwitchCase:l,"SwitchCase:exit":s,StaticBlock:i,"StaticBlock:exit":s,TSInterfaceBody:i,"TSInterfaceBody:exit":s,TSModuleBlock:i,"TSModuleBlock:exit":s,TSTypeLiteral:i,"TSTypeLiteral:exit":s,TSDeclareFunction:l,"TSDeclareFunction:exit":s,TSMethodSignature:l,"TSMethodSignature:exit":s,":statement":o}}}),sL=nz({name:"quote-props",meta:{type:"layout",docs:{description:"Require quotes around object literal, type literal, interfaces and enums property names"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["always","as-needed","consistent","consistent-as-needed"]}],minItems:0,maxItems:1},{type:"array",items:[{type:"string",enum:["always","as-needed","consistent","consistent-as-needed"]},{type:"object",properties:{keywords:{type:"boolean"},unnecessary:{type:"boolean"},numbers:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{requireQuotesDueToReservedWord:"Properties should be quoted as '{{property}}' is a reserved word.",inconsistentlyQuotedProperty:"Inconsistently quoted property '{{key}}' found.",unnecessarilyQuotedProperty:"Unnecessarily quoted property '{{property}}' found.",unquotedReservedProperty:"Unquoted reserved word '{{property}}' used as key.",unquotedNumericProperty:"Unquoted number literal '{{property}}' used as key.",unquotedPropertyFound:"Unquoted property '{{property}}' found.",redundantQuoting:"Properties shouldn't be quoted as all quotes are redundant."}},defaultOptions:["always"],create(e){let t=e.options[0],n=e.options[1]&&e.options[1].keywords,r=!e.options[1]||!1!==e.options[1].unnecessary,i=e.options[1]&&e.options[1].numbers,s=e.sourceCode;function a(e){return nc.includes(e)}function o(e,t,n=!1){return 1===t.length&&0===t[0].start&&t[0].end===e.length&&(["Identifier","Keyword","Null","Boolean"].includes(t[0].type)||"Numeric"===t[0].type&&!n&&String(+t[0].value)===t[0].value)}function l(e){return"Identifier"===e.type?e.name:e.value}function p(e){return n_(e)?s.getText(e):`"${"Identifier"===e.type?e.name:e.value}"`}function c(t){if("Property"===t.type&&(t.method||t.computed||t.shorthand)||"ImportAttribute"!==t.type&&t.computed)return;let s="TSEnumMember"===t.type?t.id:t.key;if("Literal"===s.type&&"string"==typeof s.value){let p;try{p=t4(s.value)}catch{return}if(1!==p.length||a(p[0].value)&&n)return;r&&o(s.value,p,i)&&e.report({node:t,messageId:"unnecessarilyQuotedProperty",data:{property:s.value},fix:e=>e.replaceText(s,l(s))})}else n&&"Identifier"===s.type&&a(s.name)?e.report({node:t,messageId:"unquotedReservedProperty",data:{property:s.name},fix:e=>e.replaceText(s,p(s))}):i&&nB(s)&&e.report({node:t,messageId:"unquotedNumericProperty",data:{property:s.value},fix:e=>e.replaceText(s,p(s))})}function u(t){if("Property"===t.type&&(t.method||t.computed||t.shorthand)||"ImportAttribute"!==t.type&&t.computed)return;let n="TSEnumMember"===t.type?t.id:t.key;("Literal"!==n.type||"string"!=typeof n.value)&&e.report({node:t,messageId:"unquotedPropertyFound",data:{property:n.name||n.value},fix:e=>e.replaceText(n,p(n))})}function d(e,t){m(e.filter(e=>"SpreadElement"!==e.type&&e.key&&!e.method&&!e.computed&&!e.shorthand),t)}function f(e){e&&("consistent"===t&&m(e,!1),"consistent-as-needed"===t&&m(e,!0))}function m(t,r){let i=[],s=[],c=null,u=!1;t.forEach(e=>{let t=e.key;if("Literal"===t.type&&"string"==typeof t.value){if(i.push(e),r){let e;try{e=t4(t.value)}catch{u=!0;return}u=u||!o(t.value,e)||n&&a(e[0].value)}}else n&&r&&"Identifier"===t.type&&a(t.name)?(s.push(e),u=!0,c=t.name):s.push(e)}),r&&i.length&&!u?i.forEach(t=>{let n=t.key;e.report({node:t,messageId:"redundantQuoting",fix:e=>e.replaceText(n,l(n))})}):s.length&&c?s.forEach(t=>{e.report({node:t,messageId:"requireQuotesDueToReservedWord",data:{property:c},fix:e=>e.replaceText(t.key,p(t.key))})}):i.length&&s.length&&s.forEach(t=>{e.report({node:t,messageId:"inconsistentlyQuotedProperty",data:{key:t.key.name||t.key.value},fix:e=>e.replaceText(t.key,p(t.key))})})}return{Property(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ObjectExpression(e){"consistent"===t&&d(e.properties,!1),"consistent-as-needed"===t&&d(e.properties,!0)},ImportAttribute(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},ImportDeclaration(e){f(e.attributes)},ExportAllDeclaration(e){f(e.attributes)},ExportNamedDeclaration(e){f(e.attributes)},TSPropertySignature(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},TSEnumMember(e){"always"!==t&&t||u(e),"as-needed"===t&&c(e)},TSTypeLiteral(e){"consistent"===t&&d(e.members,!1),"consistent-as-needed"===t&&d(e.members,!0)},TSInterfaceBody(e){"consistent"===t&&d(e.body,!1),"consistent-as-needed"===t&&d(e.body,!0)},TSEnumDeclaration(e){let n=(e.body?.members||e.members).map(e=>({...e,key:e.id}));"consistent"===t&&d(n,!1),"consistent-as-needed"===t&&d(n,!0)}}}});function sD(e){let t=this.quote,n=e[0];return t===n?e:t+e.slice(1,-1).replace(/\\(\$\{|\r\n?|\n|.)|["'`]|\$\{|(\r\n?|\n)/gu,(e,r,i)=>r===n||"`"===n&&"${"===r?r:e===t||"`"===t&&"${"===e?`\\${e}`:i&&"`"===n?"\\n":e)+t}const sB={double:{quote:'"',alternateQuote:"'",description:"doublequote",convert:sD},single:{quote:"'",alternateQuote:'"',description:"singlequote",convert:sD},backtick:{quote:"`",alternateQuote:'"',description:"backtick",convert:sD}},sj=RegExp(String.raw`(^|[^\\])(\\\\)*[${Array.from(ns).join("")}]`,"u"),sR="avoid-escape";var sF=nz({name:"quotes",meta:{type:"layout",docs:{description:"Enforce the consistent use of either backticks, double, or single quotes"},fixable:"code",schema:[{type:"string",enum:["single","double","backtick"]},{anyOf:[{type:"string",enum:["avoid-escape"]},{type:"object",properties:{avoidEscape:{type:"boolean"},allowTemplateLiterals:{anyOf:[{type:"boolean"},{type:"string",enum:["never","avoidEscape","always"]}]},ignoreStringLiterals:{type:"boolean"}},additionalProperties:!1}]}],messages:{wrongQuotes:"Strings must use {{description}}."}},defaultOptions:["double",{allowTemplateLiterals:"never",avoidEscape:!1,ignoreStringLiterals:!1}],create(e){let t=e.options[0],n=sB[t||"double"],r=e.options[1],i=e.sourceCode,s=!1,a=!1,o=!1,l=!1;return"object"==typeof r?(s=!0===r.avoidEscape,a=!0===r.ignoreStringLiterals,"string"==typeof r.allowTemplateLiterals?l=(o="always"===r.allowTemplateLiterals)||"avoidEscape"===r.allowTemplateLiterals:"boolean"==typeof r.allowTemplateLiterals&&(nn('value(boolean) for "allowTemplateLiterals"','"always"/"never"',"quotes"),o=!0===r.allowTemplateLiterals,l=!0===r.allowTemplateLiterals)):r===sR&&(nn(`option("${sR}")`,'"avoidEscape"',"quotes"),s=!0),{Literal(r){if(a)return;let o=r.value,l=r.raw;if(n&&"string"==typeof o){let a="backtick"===t&&function(e){let t=e.parent;if(!t)return!1;switch(t.type){case em.AST_NODE_TYPES.ExpressionStatement:return!nx(i,e)&&function(e){if(!e.parent||!nC(e.parent))return!1;let t=e.parent.parent;if(!t||!("body"in t)||!Array.isArray(t.body))return!1;for(let n=0;n<t.body.length;++n){let r=t.body[n];if(r===e.parent)return!0;if(!("ExpressionStatement"===r.type&&"Literal"===r.expression.type&&"string"==typeof r.expression.value&&!nx(i,r.expression)))break}return!1}(e);case em.AST_NODE_TYPES.Property:case em.AST_NODE_TYPES.MethodDefinition:return t.key===e&&!t.computed;case em.AST_NODE_TYPES.ImportDeclaration:case em.AST_NODE_TYPES.ExportNamedDeclaration:return t.source===e;case em.AST_NODE_TYPES.ExportAllDeclaration:return t.exported===e||t.source===e;case em.AST_NODE_TYPES.ImportSpecifier:return t.imported===e;case em.AST_NODE_TYPES.ExportSpecifier:return t.local===e||t.exported===e;case em.AST_NODE_TYPES.ImportAttribute:return t.value===e;case em.AST_NODE_TYPES.TSAbstractMethodDefinition:case em.AST_NODE_TYPES.TSMethodSignature:case em.AST_NODE_TYPES.TSPropertySignature:case em.AST_NODE_TYPES.TSModuleDeclaration:case em.AST_NODE_TYPES.TSExternalModuleReference:return!0;case em.AST_NODE_TYPES.TSEnumMember:return e===t.id;case em.AST_NODE_TYPES.TSAbstractPropertyDefinition:case em.AST_NODE_TYPES.PropertyDefinition:case em.AST_NODE_TYPES.AccessorProperty:return t.key===e&&!t.computed;case em.AST_NODE_TYPES.TSLiteralType:return t.parent?.type===em.AST_NODE_TYPES.TSImportType;default:return!1}}(r)||!!r.parent&&("JSXAttribute"===r.parent.type||"JSXElement"===r.parent.type||"JSXFragment"===r.parent.type)||nP(l,n.quote);!a&&s&&(a=nP(l,n.alternateQuote)&&l.includes(n.quote)),a||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>"backtick"===t&&nR(l)?null:e.replaceText(r,n.convert(r.raw))})}},TemplateLiteral(r){!(o||"backtick"===t||"TaggedTemplateExpression"===r.parent.type&&r===r.parent.quasi||r.expressions.length>0||r.quasis.length>=1&&sj.test(r.quasis[0].value.raw))&&(l&&s&&i.getText(r).includes(n.quote)||e.report({node:r,messageId:"wrongQuotes",data:{description:n.description},fix:e=>nC(r.parent)&&!nx(i,r)?null:e.replaceText(r,n.convert(i.getText(r)))}))}}}}),sM=nz({name:"rest-spread-spacing",meta:{type:"layout",docs:{description:"Enforce spacing between rest and spread operators and their expressions"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{unexpectedWhitespace:"Unexpected whitespace after {{type}} operator.",expectedWhitespace:"Expected whitespace after {{type}} operator."}},create(e){let t=e.sourceCode,n="always"===e.options[0];function r(r){let i,s=t.getFirstToken(r),a=t.getTokenAfter(s),o=t.isSpaceBetween(s,a);switch(r.type){case"SpreadElement":i="spread","ObjectExpression"===r.parent.type&&(i+=" property");break;case"RestElement":i="rest","ObjectPattern"===r.parent.type&&(i+=" property");break;default:return}n&&!o?e.report({node:r,loc:s.loc,messageId:"expectedWhitespace",data:{type:i},fix:e=>e.replaceTextRange([s.range[1],a.range[0]]," ")}):!n&&o&&e.report({node:r,loc:{start:s.loc.end,end:a.loc.start},messageId:"unexpectedWhitespace",data:{type:i},fix:e=>e.removeRange([s.range[1],a.range[0]])})}return{SpreadElement:r,RestElement:r}}}),sV=nz({name:"semi-spacing",meta:{type:"layout",docs:{description:"Enforce consistent spacing before and after semicolons"},fixable:"whitespace",schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],messages:{unexpectedWhitespaceBefore:"Unexpected whitespace before semicolon.",unexpectedWhitespaceAfter:"Unexpected whitespace after semicolon.",missingWhitespaceBefore:"Missing whitespace before semicolon.",missingWhitespaceAfter:"Missing whitespace after semicolon."}},create(e){let t=e.options[0],n=e.sourceCode,r=!1,i=!0;function s(t,s){if((0,nU.isSemicolonToken)(t)){if(function(e){let t=n.getTokenBefore(e);return t&&(0,nU.isTokenOnSameLine)(t,e)&&n.isSpaceBetween(t,e)}(t)){if(!r){let r=n.getTokenBefore(t),i={start:r.loc.end,end:t.loc.start};e.report({node:s,loc:i,messageId:"unexpectedWhitespaceBefore",fix:e=>e.removeRange([r.range[1],t.range[0]])})}}else if(r){let n=t.loc;e.report({node:s,loc:n,messageId:"missingWhitespaceBefore",fix:e=>e.insertTextBefore(t," ")})}if(!function(e){let t=n.getTokenBefore(e);return!(t&&(0,nU.isTokenOnSameLine)(e,t))}(t)&&!function(e){let t=n.getTokenAfter(e);return!(t&&(0,nU.isTokenOnSameLine)(e,t))}(t)&&!function(e){let t=n.getTokenAfter(e);return t&&(0,nU.isClosingBraceToken)(t)||(0,nU.isClosingParenToken)(t)}(t)){if(function(e){let t=n.getTokenAfter(e);return t&&(0,nU.isTokenOnSameLine)(e,t)&&n.isSpaceBetween(e,t)}(t)){if(!i){let r=n.getTokenAfter(t),i={start:t.loc.end,end:r.loc.start};e.report({node:s,loc:i,messageId:"unexpectedWhitespaceAfter",fix:e=>e.removeRange([t.range[1],r.range[0]])})}}else if(i){let n=t.loc;e.report({node:s,loc:n,messageId:"missingWhitespaceAfter",fix:e=>e.insertTextAfter(t," ")})}}}}function a(e){s(n.getLastToken(e),e)}return"object"==typeof t&&(r=t.before,i=t.after),{VariableDeclaration:a,ExpressionStatement:a,BreakStatement:a,ContinueStatement:a,DebuggerStatement:a,DoWhileStatement:a,ReturnStatement:a,ThrowStatement:a,ImportDeclaration:a,ExportNamedDeclaration:a,ExportAllDeclaration:a,ExportDefaultDeclaration:a,ForStatement(e){e.init&&s(n.getTokenAfter(e.init),e),e.test&&s(n.getTokenAfter(e.test),e)},PropertyDefinition:a,AccessorProperty:a,TSDeclareFunction:a,TSTypeAliasDeclaration:a,TSTypeAnnotation(e){let t=new Set([em.AST_NODE_TYPES.TSDeclareFunction]);e.parent&&!t.has(e.parent.type)&&a(e.parent)}}}}),s$=nz({name:"semi-style",meta:{type:"layout",docs:{description:"Enforce location of semicolons"},schema:[{type:"string",enum:["last","first"]}],fixable:"whitespace",messages:{expectedSemiColon:"Expected this semicolon to be at {{pos}}."}},create(e){let t=e.sourceCode,n=e.options[0]||"last";function r(n,r){let i=t.getTokenBefore(n),s=t.getTokenAfter(n),a=!i||(0,nU.isTokenOnSameLine)(i,n),o=!s||(0,nU.isTokenOnSameLine)(n,s);("last"!==r||a)&&("first"!==r||o)||e.report({loc:n.loc,messageId:"expectedSemiColon",data:{pos:"last"===r?"the end of the previous line":"the beginning of the next line"},fix(e){if(i&&s&&t.commentsExistBetween(i,s))return null;let a=i?i.range[1]:n.range[0],o=s?s.range[0]:n.range[1];return e.replaceTextRange([a,o],"last"===r?";\n":"\n;")}})}return{"BreakStatement,ContinueStatement,DebuggerStatement,DoWhileStatement,ExportAllDeclaration,ExportDefaultDeclaration,ExportNamedDeclaration,ExpressionStatement,ImportDeclaration,ReturnStatement,ThrowStatement,VariableDeclaration,PropertyDefinition,AccessorProperty"(e){if("first"===n&&function(e){if(!e.parent)return!0;let t=e.parent.type;if("IfStatement"===t&&e.parent.consequent===e&&e.parent.alternate||"DoWhileStatement"===t)return!0;let n=function(e){let t=e.type;return"BlockStatement"===t||"StaticBlock"===t||"Program"===t||"ClassBody"===t?e.body:"SwitchCase"===t?e.consequent:null}(e.parent);return null!==n&&n[n.length-1]===e}(e))return;let i=t.getLastToken(e);(0,nU.isSemicolonToken)(i)&&r(i,n)},ForStatement(e){let n=e.init&&t.getTokenAfter(e.init,nU.isSemicolonToken),i=e.test&&t.getTokenAfter(e.test,nU.isSemicolonToken);n&&r(n,"last"),i&&r(i,"last")}}}}),sq=nz({name:"semi",meta:{type:"layout",docs:{description:"Require or disallow semicolons instead of ASI"},fixable:"code",schema:{anyOf:[{type:"array",items:[{type:"string",enum:["never"]},{type:"object",properties:{beforeStatementContinuationChars:{type:"string",enum:["always","any","never"]}},additionalProperties:!1}],minItems:0,maxItems:2},{type:"array",items:[{type:"string",enum:["always"]},{type:"object",properties:{omitLastInOneLineBlock:{type:"boolean"},omitLastInOneLineClassBody:{type:"boolean"}},additionalProperties:!1}],minItems:0,maxItems:2}]},messages:{missingSemi:"Missing semicolon.",extraSemi:"Extra semicolon."}},defaultOptions:["always",{omitLastInOneLineBlock:!1,beforeStatementContinuationChars:"any"}],create(e){let t=/^[-[(/+`]/u,n=new Set(["get","set","static"]),r=new Set(["*","in","instanceof"]),i=e.options[1],s="never"===e.options[0],a=!!(i&&"omitLastInOneLineBlock"in i&&i.omitLastInOneLineBlock),o=!!(i&&"omitLastInOneLineClassBody"in i&&i.omitLastInOneLineClassBody),l=i&&"beforeStatementContinuationChars"in i&&i.beforeStatementContinuationChars||"any",p=e.sourceCode;function c(t,n=!1){let r,i,s=p.getLastToken(t),a="missingSemi";n?(a="extraSemi",i=s.loc,r=function(e){return new n6(e,p).retainSurroundingTokens(s).remove(s)}):(i={start:s.loc.end,end:nD(p,s.loc.end)},r=function(e){return e.insertTextAfter(s,";")}),e.report({node:t,loc:i,messageId:a,fix:r})}function u(e){return!!e&&t.test(e.value)&&"++"!==e.value&&"--"!==e.value}function d(e){let t=p.getLastToken(e),i=(0,nU.isSemicolonToken)(t);if(s){let t=p.getTokenAfter(e);!i||(!function(e){let t=p.getTokenAfter(e);return!t||(0,nU.isClosingBraceToken)(t)||(0,nU.isSemicolonToken)(t)}(p.getLastToken(e))?function(e){if("PropertyDefinition"!==e.type)return!1;if(!e.computed&&"Identifier"===e.key.type&&"name"in e.key&&n.has(e.key.name)&&!(e.static&&"static"===e.key.name)&&!e.value)return!0;let t=p.getTokenAfter(e);return r.has(t.value)}(e)||function(e){let t=p.getLastToken(e,1),n=p.getTokenAfter(e);return!!n&&(0,nU.isTokenOnSameLine)(t,n)}(e)||("PropertyDefinition"===e.type||"never"!==l||function(e){let t=e.type;return"DoWhileStatement"!==t&&"BreakStatement"!==t&&"ContinueStatement"!==t&&"DebuggerStatement"!==t&&"ImportDeclaration"!==t&&"ExportAllDeclaration"!==t&&("ReturnStatement"===t?!!e.argument:"ExportNamedDeclaration"===t?!!e.declaration:!function(e){if(!(0,nU.isClosingBraceToken)(e))return!1;let t=p.getNodeByRangeIndex(e.range[0]);return"BlockStatement"===t.type&&"ArrowFunctionExpression"===t.parent.type}(p.getLastToken(e,1)))}(e))&&u(p.getTokenAfter(e))?1:0:0)?!i&&"always"===l&&"PropertyDefinition"!==e.type&&u(t)&&c(e):c(e,!0)}else{let t=a&&function(e){let t=e.parent,n=p.getTokenAfter(e);if(!n||"}"!==n.value)return!1;if("BlockStatement"===t.type)return nY(t);if("StaticBlock"===t.type){let e=p.getFirstToken(t,{skip:1});return(0,nU.isTokenOnSameLine)(t,e)}return!1}(e),n=o&&function(e){let t=e.parent,n=p.getTokenAfter(e);return!!n&&"}"===n.value&&"ClassBody"===t.type&&nY(t)}(e),r=t||n;i&&r?c(e,!0):i||r||c(e)}}return{VariableDeclaration(e){let t=e.parent;"ForStatement"===t.type&&t.init===e||/^For(?:In|Of)Statement/u.test(t.type)&&t.left===e||d(e)},ExpressionStatement:d,ReturnStatement:d,ThrowStatement:d,DoWhileStatement:d,DebuggerStatement:d,BreakStatement:d,ContinueStatement:d,ImportDeclaration:d,ExportAllDeclaration:d,ExportNamedDeclaration(e){e.declaration||d(e)},ExportDefaultDeclaration(e){e.declaration.type!==em.AST_NODE_TYPES.TSInterfaceDeclaration&&(/(?:Class|Function)Declaration/u.test(e.declaration.type)||d(e))},PropertyDefinition:d,AccessorProperty:d,TSAbstractPropertyDefinition:d,TSDeclareFunction:d,TSExportAssignment:d,TSImportEqualsDeclaration:d,TSTypeAliasDeclaration:d,TSEmptyBodyFunctionExpression:d}}}),sY=nz({name:"space-before-blocks",meta:{type:"layout",docs:{description:"Enforce consistent spacing before blocks"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{keywords:{type:"string",enum:["always","never","off"]},functions:{type:"string",enum:["always","never","off"]},classes:{type:"string",enum:["always","never","off"]},modules:{type:"string",enum:["always","never","off"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before opening brace.",missingSpace:"Missing space before opening brace."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r=!0,i=!0,s=!0,a=!0,o=!1,l=!1,p=!1,c=!1;function u(e){if(!("parent"in e))return!1;let t=e.parent;return"BlockStatement"===e.type&&(0,nU.isFunction)(t)&&t.body===e}function d(t){let d=n.getTokenBefore(t);if(d&&!((0,nU.isArrowToken)(d)||nb(d)&&!u(t)||(0,nU.isColonToken)(d)&&"parent"in t&&t.parent&&"SwitchCase"===t.parent.type&&d===nA(t.parent,n))&&(0,nU.isTokenOnSameLine)(d,t)){let f,m,h=n.isSpaceBetween(d,t);u(t)?(f=r,m=o):"ClassBody"===t.type||"TSEnumBody"===t.type||"TSInterfaceBody"===t.type?(f=s,m=p):"TSModuleBlock"===t.type?(f=a,m=c):(f=i,m=l),f&&!h?e.report({node:t,messageId:"missingSpace",fix:e=>e.insertTextBefore(t," ")}):m&&h&&e.report({node:t,messageId:"unexpectedSpace",fix:e=>e.removeRange([d.range[1],t.range[0]])})}}return"object"==typeof t?(r="always"===t.functions,i="always"===t.keywords,s="always"===t.classes,a="always"===t.modules,o="never"===t.functions,l="never"===t.keywords,p="never"===t.classes,c="never"===t.modules):"never"===t&&(r=!1,i=!1,s=!1,a=!1,o=!0,l=!0,p=!0,c=!0),{BlockStatement:d,ClassBody:d,SwitchStatement(e){let t=e.cases;d(t.length>0?n.getTokenBefore(t[0]):n.getLastToken(e,1))},TSEnumBody:d,TSInterfaceBody:d,TSModuleBlock:d}}}),sX=nz({name:"space-before-function-paren",meta:{type:"layout",docs:{description:"Enforce consistent spacing before function parenthesis"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["always","never"]},{type:"object",properties:{anonymous:{type:"string",enum:["always","never","ignore"]},named:{type:"string",enum:["always","never","ignore"]},asyncArrow:{type:"string",enum:["always","never","ignore"]},catch:{type:"string",enum:["always","never","ignore"]}},additionalProperties:!1}]}],messages:{unexpectedSpace:"Unexpected space before function parentheses.",missingSpace:"Missing space before function parentheses."}},defaultOptions:["always"],create(e,[t]){let n=e.sourceCode,r="string"==typeof t?t:"always",i="object"==typeof t?t:{};function s(e){let t,s,o=function(e){if(e.type===em.AST_NODE_TYPES.ArrowFunctionExpression){if(e.async&&(0,nU.isOpeningParenToken)(n.getFirstToken(e,{skip:1})))return i.asyncArrow??r}else if(function(e){if(null!=e.id)return!0;let t=e.parent;return t.type===em.AST_NODE_TYPES.MethodDefinition||t.type===em.AST_NODE_TYPES.TSAbstractMethodDefinition||t.type===em.AST_NODE_TYPES.Property&&("get"===t.kind||"set"===t.kind||t.method)}(e))return i.named??r;else if(!e.generator)return i.anonymous??r;return"ignore"}(e);"ignore"!==o&&("always"!==o||!e.typeParameters||e.id)&&(e.typeParameters?(t=n.getLastToken(e.typeParameters),s=n.getTokenAfter(t)):(s=n.getFirstToken(e,nU.isOpeningParenToken),t=n.getTokenBefore(s)),a(e,t,s,o))}function a(t,r,i,s){let a=n.isSpaceBetween(r,i);a&&"never"===s?e.report({node:t,loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedSpace",fix:e=>{let t=n.getCommentsBefore(i);return t.some(e=>"Line"===e.type)?null:e.replaceTextRange([r.range[1],i.range[0]],t.reduce((e,t)=>e+n.getText(t),""))}}):a||"always"!==s||e.report({node:t,loc:i.loc,messageId:"missingSpace",fix:e=>e.insertTextAfter(r," ")})}return{ArrowFunctionExpression:s,FunctionDeclaration:s,FunctionExpression:s,TSEmptyBodyFunctionExpression:s,TSDeclareFunction:s,CatchClause(e){if(!e.param)return;let t=i.catch??r;if("ignore"===t)return;let s=n.getFirstToken(e,nU.isOpeningParenToken);a(e,n.getTokenBefore(s),s,t)}}}}),sJ=nz({name:"space-in-parens",meta:{type:"layout",docs:{description:"Enforce consistent spacing inside parentheses"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string",enum:["{}","[]","()","empty"]},uniqueItems:!0}},additionalProperties:!1}],messages:{missingOpeningSpace:"There must be a space after this paren.",missingClosingSpace:"There must be a space before this paren.",rejectedOpeningSpace:"There should be no space after this paren.",rejectedClosingSpace:"There should be no space before this paren."}},create(e){let t="always"===e.options[0],n=e.options[1]&&e.options[1].exceptions||[],r={braceException:!1,bracketException:!1,parenException:!1,empty:!1},i={openers:[],closers:[]};n.length&&(r.braceException=n.includes("{}"),r.bracketException=n.includes("[]"),r.parenException=n.includes("()"),r.empty=n.includes("empty"));let s=e.sourceCode;function a(e){return i.openers.includes(e.value)}function o(e){return i.closers.includes(e.value)}return{Program:function(n){i=function(){let e=[],t=[];return r.braceException&&(e.push("{"),t.push("}")),r.bracketException&&(e.push("["),t.push("]")),r.parenException&&(e.push("("),t.push(")")),r.empty&&(e.push(")"),t.push("(")),{openers:e,closers:t}}();let l=s.tokensAndComments;l.forEach((i,p)=>{let c=l[p-1],u=l[p+1];((0,nU.isOpeningParenToken)(i)||(0,nU.isClosingParenToken)(i))&&("("===i.value&&!(s.isSpaceBetween(i,u)||!r.empty&&(0,nU.isClosingParenToken)(u))&&(t?!a(u):a(u))&&e.report({node:n,loc:i.loc,messageId:"missingOpeningSpace",fix:e=>e.insertTextAfter(i," ")}),"("===i.value&&(0,nU.isTokenOnSameLine)(i,u)&&"Line"!==u.type&&s.isSpaceBetween(i,u)&&(t?a(u):!a(u))&&e.report({node:n,loc:{start:i.loc.end,end:u.loc.start},messageId:"rejectedOpeningSpace",fix:e=>e.removeRange([i.range[1],u.range[0]])}),")"===i.value&&!(s.isSpaceBetween(c,i)||!r.empty&&(0,nU.isOpeningParenToken)(c))&&(t?!o(c):o(c))&&e.report({node:n,loc:i.loc,messageId:"missingClosingSpace",fix:e=>e.insertTextBefore(i," ")}),")"===i.value&&(0,nU.isTokenOnSameLine)(c,i)&&s.isSpaceBetween(c,i)&&(t?o(c):!o(c))&&e.report({node:n,loc:{start:c.loc.end,end:i.loc.start},messageId:"rejectedClosingSpace",fix:e=>e.removeRange([c.range[1],i.range[0]])}))})}}}});const sU=["|","&"];var sW=nz({name:"space-infix-ops",meta:{type:"layout",docs:{description:"Require spacing around infix operators"},fixable:"whitespace",schema:[{type:"object",properties:{int32Hint:{type:"boolean",default:!1},ignoreTypes:{type:"boolean",default:!1}},additionalProperties:!1}],messages:{missingSpace:"Operator '{{operator}}' must be spaced."}},defaultOptions:[{int32Hint:!1,ignoreTypes:!1}],create(e){let t=!!e.options[0]&&!0===e.options[0].int32Hint,n=!!e.options[0]&&!0===e.options[0].ignoreTypes,r=e.sourceCode;function i(t,n){e.report({node:t,loc:n.loc,messageId:"missingSpace",data:{operator:n.value},fix(e){let t=r.getTokenBefore(n),i=r.getTokenAfter(n),s="";return n.range[0]-t.range[1]==0&&(s=" "),s+=n.value,i.range[0]-n.range[1]==0&&(s+=" "),e.replaceText(n,s)}})}function s(e,t,n){let i=r.getFirstTokenBetween(e,t,e=>e.value===n),s=r.getTokenBefore(i),a=r.getTokenAfter(i);return r.isSpaceBetween(s,i)&&r.isSpaceBetween(i,a)?null:i}function a(e){let n="typeAnnotation"in e.left&&e.left.typeAnnotation?e.left.typeAnnotation:e.left,a=s(n,e.right,"operator"in e&&e.operator?e.operator:"=");a&&!(t&&r.getText(e).endsWith("|0"))&&i(e,a)}function o(e){return e.type===em.AST_TOKEN_TYPES.Punctuator&&/^[=?:]$/.test(e.value)}function l(e,t,n){if(!n||!t)return;let s=r.getFirstTokenBetween(t,n,o),a=r.getTokenBefore(s),l=r.getTokenAfter(s);r.isSpaceBetween(a,s)&&r.isSpaceBetween(s,l)||i(e,s)}function p(e){let t=e.optional&&!e.typeAnnotation?r.getTokenAfter(e.key):e.typeAnnotation??e.key;l(e,t,e.value)}function c(e){e.types.forEach(t=>{let s=t.type===em.AST_NODE_TYPES.TSFunctionType?nU.isNotOpeningParenToken:0,a=r.getTokenBefore(t,s);if(!n&&null!=a&&sU.includes(a.value)){let t=r.getTokenBefore(a),n=r.getTokenAfter(a);r.isSpaceBetween(t,a)&&r.isSpaceBetween(a,n)||i(e,a)}})}return{AssignmentExpression:a,AssignmentPattern:a,BinaryExpression:a,LogicalExpression:a,ConditionalExpression:function(e){let t=s(e.test,e.consequent,"?"),n=s(e.consequent,e.alternate,":");t&&i(e,t),n&&i(e,n)},VariableDeclarator:function(e){let t=e.id.typeAnnotation?e.id.typeAnnotation:e.id,n=e.init;if(n){let r=s(t,n,"=");r&&i(e,r)}},TSEnumMember:function(e){l(e,e.id,e.initializer)},PropertyDefinition:p,AccessorProperty:p,TSTypeAliasDeclaration:function(e){l(e,e.typeParameters??e.id,e.typeAnnotation)},TSUnionType:c,TSIntersectionType:c,TSConditionalType:function(e){l(e,e.extendsType,e.trueType),l(e,e.trueType,e.falseType)}}}}),sK=nz({name:"space-unary-ops",meta:{type:"layout",docs:{description:"Enforce consistent spacing before or after unary operators"},fixable:"whitespace",schema:[{type:"object",properties:{words:{type:"boolean",default:!0},nonwords:{type:"boolean",default:!1},overrides:{type:"object",additionalProperties:{type:"boolean"}}},additionalProperties:!1}],messages:{unexpectedBefore:"Unexpected space before unary operator '{{operator}}'.",unexpectedAfter:"Unexpected space after unary operator '{{operator}}'.",unexpectedAfterWord:"Unexpected space after unary word operator '{{word}}'.",requireAfterWord:"Unary word operator '{{word}}' must be followed by whitespace.",requireAfter:"Unary operator '{{operator}}' must be followed by whitespace.",requireBefore:"Space is required before unary operator '{{operator}}'."}},create(e){let t=e.options[0]||{words:!0,nonwords:!1},n=e.sourceCode;function r(e){return t.overrides&&Object.prototype.hasOwnProperty.call(t.overrides,e)}function i(e){return t.overrides?.[e]}function s(n,s,a,o){(r(o)?i(o):t.words)?a.range[0]===s.range[1]&&e.report({node:n,messageId:"requireAfterWord",data:{word:o},fix:e=>e.insertTextAfter(s," ")}):nj(s,a)&&a.range[0]>s.range[1]&&e.report({node:n,messageId:"unexpectedAfterWord",data:{word:o},fix:e=>e.removeRange([s.range[1],a.range[0]])})}function a(t,n,r){if("prefix"in t&&t.prefix)t&&"UnaryExpression"===t.type&&t.argument&&"UnaryExpression"===t.argument.type&&"!"===t.argument.operator||n.range[1]!==r.range[0]||e.report({node:t,messageId:"requireAfter",data:{operator:n.value},fix:e=>e.insertTextAfter(n," ")});else n.range[1]===r.range[0]&&e.report({node:t,messageId:"requireBefore",data:{operator:r.value},fix:e=>e.insertTextBefore(r," ")})}function o(t,n,r){"prefix"in t&&t.prefix?r.range[0]>n.range[1]&&e.report({node:t,messageId:"unexpectedAfter",data:{operator:n.value},fix:e=>nj(n,r)?e.removeRange([n.range[1],r.range[0]]):null}):r.range[0]>n.range[1]&&e.report({node:t,messageId:"unexpectedBefore",data:{operator:r.value},fix:e=>e.removeRange([n.range[1],r.range[0]])})}function l(e){let l="UpdateExpression"!==e.type||e.prefix?n.getFirstTokens(e,2):n.getLastTokens(e,2),p=l[0],c=l[1];if(("NewExpression"===e.type||e.prefix)&&nb(p))return void s(e,p,c,p.value);let u="prefix"in e&&e.prefix?l[0].value:l[1].value;(r(u)?i(u):t.nonwords)?a(e,p,c):o(e,p,c)}return{UnaryExpression:l,UpdateExpression:l,NewExpression:l,YieldExpression:function(e){let t=n.getFirstTokens(e,3);e.argument&&!e.delegate&&s(e,t[0],t[1],"yield")},AwaitExpression:function(e){let t=n.getFirstTokens(e,3);s(e,t[0],t[1],"await")},TSNonNullExpression:function(e){let s=n.getLastToken(e,e=>"!"===e.value),l=n.getTokenBefore(s);(r("!")?i("!"):t.nonwords)?a(e,l,s):o(e,l,s)}}}});function sH(e){return`(?:${function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e)})`}function sG(e){return`${sH(e)}+`}function sz(e){let t="";return 0===e.length?t+="\\s":(t+="(?:\\s|",1===e.length?t+=sG(e[0]):(t+="(?:",t+=e.map(sG).join("|"),t+=")"),t+=`(?:$|[${Array.from(ns).join("")}]))`),t}var sQ=nz({name:"spaced-comment",meta:{type:"layout",docs:{description:"Enforce consistent spacing after the `//` or `/*` in a comment"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]},{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},line:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}}},additionalProperties:!1},block:{type:"object",properties:{exceptions:{type:"array",items:{type:"string"}},markers:{type:"array",items:{type:"string"}},balanced:{type:"boolean",default:!1}},additionalProperties:!1}},additionalProperties:!1}],messages:{unexpectedSpaceAfterMarker:"Unexpected space or tab after marker ({{refChar}}) in comment.",expectedExceptionAfter:"Expected exception block, space or tab after '{{refChar}}' in comment.",unexpectedSpaceBefore:"Unexpected space or tab before '*/' in comment.",unexpectedSpaceAfter:"Unexpected space or tab after '{{refChar}}' in comment.",expectedSpaceBefore:"Expected space or tab before '*/' in comment.",expectedSpaceAfter:"Expected space or tab after '{{refChar}}' in comment."}},create(e){let t=e.sourceCode,n="never"!==e.options[0],r=e.options[1]||{},i=r.block&&r.block.balanced,s=["block","line"].reduce((e,t)=>{var s;let a,o=(s=r[t]&&r[t]?.markers||r.markers||[]).includes("*")?s:s.concat("*"),l=r[t]&&r[t]?.exceptions||r.exceptions||[];return e[t]={beginRegex:n?(a="^",1===o.length?a+=sH(o[0]):(a+="(?:",a+=o.map(sH).join("|"),a+=")"),a+="?",RegExp(a+=sz(l),"u")):RegExp(`^(${o.map(sH).join("|")})?[ ]+`,"u"),endRegex:i&&n?RegExp(`${sz(l)}$`,"u"):RegExp("[ ]+$","u"),hasExceptions:l.length>0,captureMarker:RegExp(`^(${o.map(sH).join("|")})`,"u"),markers:new Set(o)},e},{});function a(t,r,i,s){let a="block"===t.type.toLowerCase()?"/*":"//";e.report({node:t,fix(e){let r=t.range[0],s=r+2;return n?(i&&(s+=i[0].length),e.insertTextAfterRange([r,s]," ")):(i&&(s+=i[0].length),e.replaceTextRange([r,s],a+(i&&i[1]?i[1]:"")))},messageId:r,data:{refChar:s}})}function o(t,r,i){e.report({node:t,fix(e){if(n)return e.insertTextAfterRange([t.range[0],t.range[1]-2]," ");let r=t.range[1]-2,s=r;return i&&(s-=i[0].length),e.replaceTextRange([s,r],"")},messageId:r})}return{Program(){t.getAllComments().forEach(e=>{nE(e)||function(e){let t=e.type.toLowerCase(),r=s[t],l="block"===t?"/*":"//";if(0===e.value.length||r.markers.has(e.value)||"line"===t&&(e.value.startsWith("/ <reference")||e.value.startsWith("/ <amd")))return;let p=r.beginRegex.exec(e.value),c=r.endRegex.exec(e.value);if(n){if(!p){let t=r.captureMarker.exec(e.value),n=t?l+t[0]:l;r.hasExceptions?a(e,"expectedExceptionAfter",t,n):a(e,"expectedSpaceAfter",t,n)}i&&"block"===t&&!c&&o(e,"expectedSpaceBefore",null)}else p&&(p[1]?a(e,"unexpectedSpaceAfterMarker",p,p[1]):a(e,"unexpectedSpaceAfter",p,l)),i&&"block"===t&&c&&o(e,"unexpectedSpaceBefore",c)}(e)})}}}}),sZ=nz({name:"switch-colon-spacing",meta:{type:"layout",docs:{description:"Enforce spacing around colons of switch statements"},schema:[{type:"object",properties:{before:{type:"boolean",default:!1},after:{type:"boolean",default:!0}},additionalProperties:!1}],fixable:"whitespace",messages:{expectedBefore:"Expected space(s) before this colon.",expectedAfter:"Expected space(s) after this colon.",unexpectedBefore:"Unexpected space(s) before this colon.",unexpectedAfter:"Unexpected space(s) after this colon."}},create(e){let t=e.sourceCode,n=e.options[0]||{},r=!0===n.before,i=!1!==n.after;function s(e,n,r){return(0,nU.isClosingBraceToken)(n)||!(0,nU.isTokenOnSameLine)(e,n)||t.isSpaceBetween(e,n)===r}function a(e,n,r,i){return nX(t,n,r)?null:i?e.insertTextAfter(n," "):e.removeRange([n.range[1],r.range[0]])}return{SwitchCase(n){let o=nA(n,t),l=t.getTokenBefore(o),p=t.getTokenAfter(o);s(l,o,r)||e.report({node:n,loc:o.loc,messageId:r?"expectedBefore":"unexpectedBefore",fix:e=>a(e,l,o,r)}),s(o,p,i)||e.report({node:n,loc:o.loc,messageId:i?"expectedAfter":"unexpectedAfter",fix:e=>a(e,o,p,i)})}}}}),s0=nz({name:"template-curly-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing around embedded expressions of template strings"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{expectedBefore:"Expected space(s) before '}'.",expectedAfter:"Expected space(s) after '${'.",unexpectedBefore:"Unexpected space(s) before '}'.",unexpectedAfter:"Unexpected space(s) after '${'."}},create(e){let t=e.sourceCode,n="always"===e.options[0];return{TemplateElement(r){let i=t.getFirstToken(r);!function(r){if(!r.value.startsWith("}"))return;let i=t.getTokenBefore(r,{includeComments:!0}),s=t.isSpaceBetween(i,r);(0,nU.isTokenOnSameLine)(i,r)&&(n&&!s&&e.report({loc:{start:r.loc.start,end:{line:r.loc.start.line,column:r.loc.start.column+1}},messageId:"expectedBefore",fix:e=>e.insertTextBefore(r," ")}),!n&&s&&e.report({loc:{start:i.loc.end,end:r.loc.start},messageId:"unexpectedBefore",fix:e=>e.removeRange([i.range[1],r.range[0]])}))}(i),function(r){if(!r.value.endsWith("${"))return;let i=t.getTokenAfter(r,{includeComments:!0}),s=t.isSpaceBetween(r,i);(0,nU.isTokenOnSameLine)(r,i)&&(n&&!s&&e.report({loc:{start:{line:r.loc.end.line,column:r.loc.end.column-2},end:r.loc.end},messageId:"expectedAfter",fix:e=>e.insertTextAfter(r," ")}),!n&&s&&e.report({loc:{start:r.loc.end,end:i.loc.start},messageId:"unexpectedAfter",fix:e=>e.removeRange([r.range[1],i.range[0]])}))}(i)}}}}),s1=nz({name:"template-tag-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing between template tags and their literals"},fixable:"whitespace",schema:[{type:"string",enum:["always","never"]}],messages:{unexpected:"Unexpected space between template tag and template literal.",missing:"Missing space between template tag and template literal."}},create(e){let t="always"!==e.options[0],n=e.sourceCode;return{TaggedTemplateExpression:function(r){let i=n.getTokenBefore(r.quasi),s=n.getFirstToken(r.quasi),a=n.isSpaceBetween(i,s);t&&a?e.report({node:r,loc:{start:i.loc.end,end:s.loc.start},messageId:"unexpected",fix(e){let t=n.getCommentsBefore(r.quasi);return t.some(e=>"Line"===e.type)?null:e.replaceTextRange([i.range[1],s.range[0]],t.reduce((e,t)=>e+n.getText(t),""))}}):t||a||e.report({node:r,loc:{start:r.loc.start,end:s.loc.start},messageId:"missing",fix:e=>e.insertTextAfter(i," ")})}}}}),s2=nz({name:"type-annotation-spacing",meta:{type:"layout",docs:{description:"Require consistent spacing around type annotations"},fixable:"whitespace",messages:{expectedSpaceAfter:"Expected a space after the '{{type}}'.",expectedSpaceBefore:"Expected a space before the '{{type}}'.",unexpectedSpaceAfter:"Unexpected space after the '{{type}}'.",unexpectedSpaceBefore:"Unexpected space before the '{{type}}'.",unexpectedSpaceBetween:"Unexpected space between the '{{previousToken}}' and the '{{type}}'."},schema:[{$defs:{spacingConfig:{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}},type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"},overrides:{type:"object",properties:{colon:{$ref:"#/items/0/$defs/spacingConfig"},arrow:{$ref:"#/items/0/$defs/spacingConfig"},variable:{$ref:"#/items/0/$defs/spacingConfig"},parameter:{$ref:"#/items/0/$defs/spacingConfig"},property:{$ref:"#/items/0/$defs/spacingConfig"},returnType:{$ref:"#/items/0/$defs/spacingConfig"}},additionalProperties:!1}},additionalProperties:!1}]},defaultOptions:[{}],create(e,[t]){let n=[":","=>"],r=e.sourceCode,i=function(e){let t={...e?.before!==void 0?{before:e.before}:{},...e?.after!==void 0?{after:e.after}:{}},n=e?.overrides??{},r={before:!1,after:!0,...t,...n?.colon};return{colon:r,arrow:{before:!0,after:!0,...t,...n?.arrow},variable:{...r,...n?.variable},property:{...r,...n?.property},parameter:{...r,...n?.parameter},returnType:{...r,...n?.returnType}}}(t);function s(t){let s=r.getTokenBefore(t,nU.isNotOpeningParenToken),a=s,o=r.getTokenBefore(s),l=s.value;if(!n.includes(l))return;let{before:p,after:c}=function(e,t){let n=t?.parent?.parent;if((0,nU.isTSFunctionType)(n)||(0,nU.isTSConstructorType)(n))return e.arrow;if((0,nU.isIdentifier)(n)){let t=n?.parent;return(0,nU.isVariableDeclarator)(t)?e.variable:(0,nU.isFunctionOrFunctionType)(t)?e.parameter:e.colon}return(0,nU.isClassOrTypeElement)(n)?e.property:(0,nU.isFunction)(n)?e.returnType:e.colon}(i,t);":"===l&&"?"===o.value&&(r.isSpaceBetween(o,a)&&e.report({node:a,messageId:"unexpectedSpaceBetween",data:{type:l,previousToken:o.value},fix:e=>e.removeRange([o.range[1],a.range[0]])}),l="?:",a=o,("+"===(o=r.getTokenBefore(o)).value||"-"===o.value)&&(l=`${o.value}?:`,a=o,o=r.getTokenBefore(o)));let u=r.isSpaceBetween(s,t);c&&!u?e.report({node:s,messageId:"expectedSpaceAfter",data:{type:l},fix:e=>e.insertTextAfter(s," ")}):!c&&u&&e.report({node:s,messageId:"unexpectedSpaceAfter",data:{type:l},fix:e=>e.removeRange([s.range[1],t.range[0]])});let d=r.isSpaceBetween(o,a);p&&!d?e.report({node:a,messageId:"expectedSpaceBefore",data:{type:l},fix:e=>e.insertTextAfter(o," ")}):!p&&d&&e.report({node:a,messageId:"unexpectedSpaceBefore",data:{type:l},fix:e=>e.removeRange([o.range[1],a.range[0]])})}return{TSMappedType(e){e.typeAnnotation&&s(e.typeAnnotation)},TSTypeAnnotation(e){s(e.typeAnnotation)}}}});const s3=new Set(["TSCallSignatureDeclaration","ArrowFunctionExpression","TSFunctionType","FunctionExpression","ClassExpression"]);var s6=nz({name:"type-generic-spacing",meta:{type:"layout",docs:{description:"Enforces consistent spacing inside TypeScript type generics"},fixable:"whitespace",schema:[],messages:{genericSpacingMismatch:"Generic spaces mismatch"}},defaultOptions:[],create:e=>{let t=e.sourceCode;function n(n,r){let i=t.text.slice(n.range[1],r.range[0]);/\s/.test(i)&&!/^[\r\n]/.test(i)&&e.report({loc:{start:n.loc.end,end:r.loc.start},messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[1],r.range[0]],"")}})}function r(e,r){if(e){let r=t.getTokenAfter(e);r&&n(e,r)}if(r){let e=t.getTokenBefore(r);e&&n(e,r)}}return{TSTypeParameterInstantiation:e=>{let n=e.params;if(0!==n.length)r(t.getTokenBefore(n[0]),t.getTokenAfter(n[n.length-1]))},TSTypeParameterDeclaration:n=>{if(!s3.has(n.parent.type)){let r=t.text.slice(0,n.range[0]),i=r.match(/(\s+)$/)?.[0];i&&i.length&&e.report({node:n,messageId:"genericSpacingMismatch",*fix(e){yield e.replaceTextRange([n.range[0]-i.length,n.range[0]],"")}})}let i=n.params;if(0!==i.length){r(t.getTokenBefore(i[0]),t.getTokenAfter(i[i.length-1]));for(let r=1;r<i.length;r++){let s=i[r-1],a=i[r],o=s.range[1],l=a.range[0],p=t.text.slice(o,l);", "===p||p.match(/,\s*\n/)||e.report({*fix(e){yield e.replaceTextRange([o,l],", ")},loc:{start:s.loc.end,end:a.loc.start},messageId:"genericSpacingMismatch",node:n})}}},TSTypeParameter:n=>{if(!n.default)return;let r=n.constraint||n.name,i=r.range[1],s=n.default.range[0],a=t.text.slice(i,s);a.match(/(?:^|[^ ]) = (?:$|[^ ])/)||e.report({*fix(e){yield e.replaceTextRange([i,s],a.replace(/\s*=\s*/," = "))},loc:{start:r.loc.end,end:n.default.loc.start},messageId:"genericSpacingMismatch",node:n})}}}});const s4=/^([\w$]+)(\s*)(\?\s*)?:(\s*)(.*)$/;var s5={rules:{"array-bracket-newline":n4,"array-bracket-spacing":n5,"array-element-newline":n9,"arrow-parens":n8,"arrow-spacing":n7,"block-spacing":re,"brace-style":rt,"comma-dangle":rr,"comma-spacing":ri,"comma-style":rs,"computed-property-spacing":ra,"curly-newline":rm,"dot-location":rh,"eol-last":rg,"function-call-argument-newline":ry,"function-call-spacing":rx,"function-paren-newline":rT,"generator-star-spacing":rb,"implicit-arrow-linebreak":rE,indent:rO,"indent-binary-ops":rk,"jsx-child-element-spacing":rI,"jsx-closing-bracket-location":rN,"jsx-closing-tag-location":rB,"jsx-curly-brace-presence":r$,"jsx-curly-newline":rq,"jsx-curly-spacing":rK,"jsx-equals-spacing":rH,"jsx-first-prop-new-line":rG,"jsx-function-call-newline":rz,"jsx-indent":rZ,"jsx-indent-props":rQ,"jsx-max-props-per-line":r0,"jsx-newline":r1,"jsx-one-expression-per-line":r3,"jsx-pascal-case":ie,"jsx-props-no-multi-spaces":it,"jsx-quotes":ii,"jsx-self-closing-comp":ia,"jsx-sort-props":im,"jsx-tag-spacing":iT,"jsx-wrap-multilines":ib,"key-spacing":ik,"keyword-spacing":iI,"line-comment-position":iN,"linebreak-style":iL,"lines-around-comment":iD,"lines-between-class-members":ij,"max-len":iM,"max-statements-per-line":i$,"member-delimiter-style":iY,"multiline-comment-style":iX,"multiline-ternary":iJ,"new-parens":iU,"newline-per-chained-call":iW,"no-confusing-arrow":iK,"no-extra-parens":iG,"no-extra-semi":iz,"no-floating-decimal":iQ,"no-mixed-operators":i8,"no-mixed-spaces-and-tabs":i7,"no-multi-spaces":se,"no-multiple-empty-lines":st,"no-tabs":si,"no-trailing-spaces":ss,"no-whitespace-before-property":sa,"nonblock-statement-body-position":sl,"object-curly-newline":su,"object-curly-spacing":sd,"object-property-newline":sf,"one-var-declaration-per-line":sm,"operator-linebreak":sh,"padded-blocks":sy,"padding-line-between-statements":sN,"quote-props":sL,quotes:sF,"rest-spread-spacing":sM,semi:sq,"semi-spacing":sV,"semi-style":s$,"space-before-blocks":sY,"space-before-function-paren":sX,"space-in-parens":sJ,"space-infix-ops":sW,"space-unary-ops":sK,"spaced-comment":sQ,"switch-colon-spacing":sZ,"template-curly-spacing":s0,"template-tag-spacing":s1,"type-annotation-spacing":s2,"type-generic-spacing":s6,"type-named-tuple-spacing":nz({name:"type-named-tuple-spacing",meta:{type:"layout",docs:{description:"Expect space before the type declaration in the named tuple"},fixable:"whitespace",schema:[],messages:{expectedSpaceAfter:"Expected a space after the ':'.",unexpectedSpaceBetween:"Unexpected space between '?' and the ':'.",unexpectedSpaceBefore:"Unexpected space before the ':'."}},defaultOptions:[],create:e=>{let t=e.getSourceCode();return{TSNamedTupleMember:n=>{let r=t.text.slice(n.range[0],n.range[1]),i=r.match(s4);if(!i)return;let s=n.label.name,a=i[2],o=i[3],l=i[4],p=i[5];function c(){let e=s;return n.optional&&(e+="?"),e+=": ",e+=p}o?.length>1&&e.report({node:n,messageId:"unexpectedSpaceBetween",*fix(e){yield e.replaceTextRange(n.range,r.replace(s4,c()))}}),a?.length&&e.report({node:n,messageId:"unexpectedSpaceBefore",*fix(e){yield e.replaceTextRange(n.range,r.replace(s4,c()))}}),null!=l&&1!==l.length&&e.report({node:n,messageId:"expectedSpaceAfter",*fix(e){yield e.replaceTextRange(n.range,r.replace(s4,c()))}})}}}}),"wrap-iife":nz({name:"wrap-iife",meta:{type:"layout",docs:{description:"Require parentheses around immediate `function` invocations"},schema:[{type:"string",enum:["outside","inside","any"]},{type:"object",properties:{functionPrototypeMethods:{type:"boolean",default:!1}},additionalProperties:!1}],fixable:"code",messages:{wrapInvocation:"Wrap an immediate function invocation in parentheses.",wrapExpression:"Wrap only the function expression in parens.",moveInvocation:"Move the invocation into the parens that contain the function."}},create(e){let t=e.options[0]||"outside",n=e.options[1]&&e.options[1].functionPrototypeMethods,r=e.sourceCode;return{CallExpression(i){let s=function(e){let t=ny(e.callee);return"FunctionExpression"===t.type?t:n&&"MemberExpression"===t.type&&"FunctionExpression"===t.object.type&&("call"===ng(t)||"apply"===ng(t))?t.object:null}(i);if(!s)return;let a=nx(r,i),o=nx(r,s);a||o?"inside"!==t||o?"outside"!==t||a||e.report({node:i,messageId:"moveInvocation",fix(e){let t=r.getTokenAfter(s);return e.replaceTextRange([t.range[0],i.range[1]],`${r.getText().slice(t.range[1],i.range[1])})`)}}):e.report({node:i,messageId:"wrapExpression",fix(e){if((0,nU.isParenthesized)(i,r)&&!function(e){let t=e.parent?.type==="ChainExpression"?e.parent:e;return t.parent?.type==="NewExpression"&&t.parent.callee===t}(i)){let t=r.getTokenAfter(i);return e.replaceTextRange([s.range[1],t.range[1]],`)${r.getText().slice(s.range[1],t.range[0])}`)}return e.replaceText(s,`(${r.getText(s)})`)}}):e.report({node:i,messageId:"wrapInvocation",fix(e){let n="inside"===t?s:i;return e.replaceText(n,`(${r.getText(n)})`)}})}}}}),"wrap-regex":nz({name:"wrap-regex",meta:{type:"layout",docs:{description:"Require parenthesis around regex literals"},schema:[],fixable:"code",messages:{requireParens:"Wrap the regexp literal in parens to disambiguate the slash."}},create(e){let t=e.sourceCode;return{Literal(n){if("RegularExpression"===t.getFirstToken(n).type){let r=t.getTokenBefore(n),i=t.getTokenAfter(n),{parent:s}=n;"MemberExpression"!==s.type||s.object!==n||r&&"("===r.value&&i&&")"===i.value||e.report({node:n,messageId:"requireParens",fix:e=>e.replaceText(n,`(${t.getText(n)})`)})}}}}}),"yield-star-spacing":nz({name:"yield-star-spacing",meta:{type:"layout",docs:{description:"Require or disallow spacing around the `*` in `yield*` expressions"},fixable:"whitespace",schema:[{oneOf:[{type:"string",enum:["before","after","both","neither"]},{type:"object",properties:{before:{type:"boolean"},after:{type:"boolean"}},additionalProperties:!1}]}],messages:{missingBefore:"Missing space before *.",missingAfter:"Missing space after *.",unexpectedBefore:"Unexpected space before *.",unexpectedAfter:"Unexpected space after *."}},create(e){let t=e.sourceCode,n=function(e="after"){return"string"==typeof e?({before:{before:!0,after:!1},after:{before:!1,after:!0},both:{before:!0,after:!0},neither:{before:!1,after:!1}})[e]:e}(e.options[0]);function r(r,i,s){if(t.isSpaceBetween(i,s)!==n[r]){let t="*"===i.value,a=n[r],o=t?i:s;e.report({node:o,messageId:a?"before"===r?"missingBefore":"missingAfter":"before"===r?"unexpectedBefore":"unexpectedAfter",fix:e=>a?t?e.insertTextAfter(o," "):e.insertTextBefore(o," "):e.removeRange([i.range[1],s.range[0]])})}}return{YieldExpression:function(e){if(!("delegate"in e&&e.delegate))return;let n=t.getFirstTokens(e,3),i=n[0],s=n[1],a=n[2];r("before",i,s),r("after",s,a)}}}})}};function s9(e={}){let{arrowParens:t=!1,blockSpacing:n=!0,braceStyle:r="stroustrup",commaDangle:i="always-multiline",indent:s=2,jsx:a=!0,pluginName:o="@stylistic",quoteProps:l="consistent-as-needed",quotes:p="single",semi:c=!1,severity:u="error"}=e,d={"@stylistic/array-bracket-spacing":[u,"never"],"@stylistic/arrow-parens":[u,t?"always":"as-needed",{requireForBlockBody:!0}],"@stylistic/arrow-spacing":[u,{after:!0,before:!0}],"@stylistic/block-spacing":[u,n?"always":"never"],"@stylistic/brace-style":[u,r,{allowSingleLine:!0}],"@stylistic/comma-dangle":[u,i],"@stylistic/comma-spacing":[u,{after:!0,before:!1}],"@stylistic/comma-style":[u,"last"],"@stylistic/computed-property-spacing":[u,"never",{enforceForClassMembers:!0}],"@stylistic/dot-location":[u,"property"],"@stylistic/eol-last":u,"@stylistic/generator-star-spacing":[u,{after:!0,before:!1}],"@stylistic/indent":[u,s,{ArrayExpression:1,CallExpression:{arguments:1},flatTernaryExpressions:!1,FunctionDeclaration:{body:1,parameters:1,returnType:1},FunctionExpression:{body:1,parameters:1,returnType:1},ignoreComments:!1,ignoredNodes:["TSUnionType","TSIntersectionType"],ImportDeclaration:1,MemberExpression:1,ObjectExpression:1,offsetTernaryExpressions:!0,outerIIFEBody:1,SwitchCase:1,tabLength:"tab"===s?4:s,VariableDeclarator:1}],"@stylistic/indent-binary-ops":[u,s],"@stylistic/key-spacing":[u,{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":[u,{after:!0,before:!0}],"@stylistic/lines-between-class-members":[u,"always",{exceptAfterSingleLine:!0}],"@stylistic/max-statements-per-line":[u,{max:1}],"@stylistic/member-delimiter-style":[u,{multiline:{delimiter:c?"semi":"none",requireLast:c},multilineDetection:"brackets",overrides:{interface:{multiline:{delimiter:c?"semi":"none",requireLast:c}}},singleline:{delimiter:c?"semi":"comma"}}],"@stylistic/multiline-ternary":[u,"always-multiline"],"@stylistic/new-parens":u,"@stylistic/no-extra-parens":[u,"functions"],"@stylistic/no-floating-decimal":u,"@stylistic/no-mixed-operators":[u,{allowSamePrecedence:!0,groups:[["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]]}],"@stylistic/no-mixed-spaces-and-tabs":u,"@stylistic/no-multi-spaces":u,"@stylistic/no-multiple-empty-lines":[u,{max:1,maxBOF:0,maxEOF:0}],"@stylistic/no-tabs":"tab"===s?"off":u,"@stylistic/no-trailing-spaces":u,"@stylistic/no-whitespace-before-property":u,"@stylistic/object-curly-spacing":[u,"always"],"@stylistic/operator-linebreak":[u,"before"],"@stylistic/padded-blocks":[u,{blocks:"never",classes:"never",switches:"never"}],"@stylistic/quote-props":[u,l],"@stylistic/quotes":[u,p,{allowTemplateLiterals:"always",avoidEscape:!1}],"@stylistic/rest-spread-spacing":[u,"never"],"@stylistic/semi":[u,c?"always":"never"],"@stylistic/semi-spacing":[u,{after:!0,before:!1}],"@stylistic/space-before-blocks":[u,"always"],"@stylistic/space-before-function-paren":[u,{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-in-parens":[u,"never"],"@stylistic/space-infix-ops":u,"@stylistic/space-unary-ops":[u,{nonwords:!1,words:!0}],"@stylistic/spaced-comment":[u,"always",{block:{balanced:!0,exceptions:["*"],markers:["!"]},line:{exceptions:["/","#"],markers:["/"]}}],"@stylistic/template-curly-spacing":u,"@stylistic/template-tag-spacing":[u,"never"],"@stylistic/type-annotation-spacing":[u,{}],"@stylistic/type-generic-spacing":u,"@stylistic/type-named-tuple-spacing":u,"@stylistic/wrap-iife":[u,"any",{functionPrototypeMethods:!0}],"@stylistic/yield-star-spacing":[u,{after:!0,before:!1}],...a?{"@stylistic/jsx-closing-bracket-location":u,"@stylistic/jsx-closing-tag-location":u,"@stylistic/jsx-curly-brace-presence":[u,{propElementValues:"always"}],"@stylistic/jsx-curly-newline":u,"@stylistic/jsx-curly-spacing":[u,"never"],"@stylistic/jsx-equals-spacing":u,"@stylistic/jsx-first-prop-new-line":u,"@stylistic/jsx-function-call-newline":[u,"multiline"],"@stylistic/jsx-indent-props":[u,s],"@stylistic/jsx-max-props-per-line":[u,{maximum:1,when:"multiline"}],"@stylistic/jsx-one-expression-per-line":[u,{allow:"single-child"}],"@stylistic/jsx-quotes":u,"@stylistic/jsx-tag-spacing":[u,{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"@stylistic/jsx-wrap-multilines":[u,{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",propertyValue:"parens-new-line",return:"parens-new-line"}]}:{}};if("@stylistic"!==o){let e=/^@stylistic\//;d=Object.fromEntries(Object.entries(d).map(([t,n])=>[t.replace(e,`${o}/`),n]))}return{plugins:{[o]:s5},rules:d}}const s8=[/^jsx-/,/^curly-newline$/],s7=function(e,t,n){let r=Object.fromEntries(Object.entries(e.rules).filter(([e,t])=>t.meta.fixable&&!t.meta.deprecated&&e===t.meta.docs.url.split("/").pop()&&(!n||n(e,t))).map(([e])=>[`${t}/${e}`,2]));return{plugins:{[t]:e},rules:r}}(s5,"@stylistic",e=>!s8.some(t=>t.test(e))),ae=s9(),at=Object.assign(s5,{configs:new Proxy({"disable-legacy":{rules:{"array-bracket-newline":0,"array-bracket-spacing":0,"array-element-newline":0,"arrow-parens":0,"arrow-spacing":0,"block-spacing":0,"brace-style":0,"comma-dangle":0,"comma-spacing":0,"comma-style":0,"computed-property-spacing":0,"dot-location":0,"eol-last":0,"func-call-spacing":0,"function-call-argument-newline":0,"function-paren-newline":0,"generator-star-spacing":0,"implicit-arrow-linebreak":0,indent:0,"jsx-quotes":0,"key-spacing":0,"keyword-spacing":0,"linebreak-style":0,"lines-around-comment":0,"lines-between-class-members":0,"max-len":0,"max-statements-per-line":0,"multiline-ternary":0,"new-parens":0,"newline-per-chained-call":0,"no-confusing-arrow":0,"no-extra-parens":0,"no-extra-semi":0,"no-floating-decimal":0,"no-mixed-operators":0,"no-mixed-spaces-and-tabs":0,"no-multi-spaces":0,"no-multiple-empty-lines":0,"no-tabs":0,"no-trailing-spaces":0,"no-whitespace-before-property":0,"nonblock-statement-body-position":0,"object-curly-newline":0,"object-curly-spacing":0,"object-property-newline":0,"one-var-declaration-per-line":0,"operator-linebreak":0,"padded-blocks":0,"padding-line-between-statements":0,"quote-props":0,quotes:0,"rest-spread-spacing":0,semi:0,"semi-spacing":0,"semi-style":0,"space-before-blocks":0,"space-before-function-paren":0,"space-in-parens":0,"space-infix-ops":0,"space-unary-ops":0,"spaced-comment":0,"switch-colon-spacing":0,"template-curly-spacing":0,"template-tag-spacing":0,"wrap-iife":0,"wrap-regex":0,"yield-star-spacing":0,"@typescript-eslint/block-spacing":0,"@typescript-eslint/brace-style":0,"@typescript-eslint/comma-dangle":0,"@typescript-eslint/comma-spacing":0,"@typescript-eslint/func-call-spacing":0,"@typescript-eslint/indent":0,"@typescript-eslint/key-spacing":0,"@typescript-eslint/keyword-spacing":0,"@typescript-eslint/lines-around-comment":0,"@typescript-eslint/lines-between-class-members":0,"@typescript-eslint/member-delimiter-style":0,"@typescript-eslint/no-extra-parens":0,"@typescript-eslint/no-extra-semi":0,"@typescript-eslint/object-curly-spacing":0,"@typescript-eslint/padding-line-between-statements":0,"@typescript-eslint/quotes":0,"@typescript-eslint/semi":0,"@typescript-eslint/space-before-blocks":0,"@typescript-eslint/space-before-function-paren":0,"@typescript-eslint/space-infix-ops":0,"@typescript-eslint/type-annotation-spacing":0,"react/jsx-child-element-spacing":0,"react/jsx-closing-bracket-location":0,"react/jsx-closing-tag-location":0,"react/jsx-curly-brace-presence":0,"react/jsx-curly-newline":0,"react/jsx-curly-spacing":0,"react/jsx-equals-spacing":0,"react/jsx-first-prop-new-line":0,"react/jsx-indent":0,"react/jsx-indent-props":0,"react/jsx-max-props-per-line":0,"react/jsx-newline":0,"react/jsx-one-expression-per-line":0,"react/jsx-pascal-case":0,"react/jsx-props-no-multi-spaces":0,"react/self-closing-comp":0,"react/jsx-sort-props":0,"react/jsx-tag-spacing":0,"react/jsx-wrap-multilines":0}},customize:s9,recommended:ae,"recommended-flat":ae,all:s7,"all-flat":s7},{get(e,t,n){let r=t.toString();return r.endsWith("-flat")&&nn(`config("${r}")`,`"${r.replace("-flat","")}"`),Reflect.get(e,t,n)}})}),an=v.memo(I,"@eslint-react/eslint-plugin"),ar=v.memo(D.fixupPluginRules(L),"eslint-plugin-ssr-friendly");async function ai({opt:e={}}={}){return[{plugins:{"@stylexjs":await import("@stylexjs/eslint-plugin")},files:[v.constants.GLOB_TS,v.constants.GLOB_TSX,v.constants.GLOB_JSX],rules:{"@stylexjs/valid-styles":["error",e],"@stylexjs/valid-shorthands":["error",e],"@stylexjs/sort-keys":"off"}}]}exports.next=function(){return[{...A.flatConfig.coreWebVitals,files:[v.constants.GLOB_TS,v.constants.GLOB_TSX,v.constants.GLOB_JSX],rules:{...A.flatConfig.coreWebVitals.rules,"@next/next/no-img-element":"off"}}]},exports.react=function({reactCompiler:e="error",additionalHooks:t="(useIsomorphicLayoutEffect|useSukkaManyOtherCustomEffectHookExample)",nextjs:n=!1,remix:r=!1,reactRefresh:i={},additionalHooksWithType:s={useLayoutEffect:["useIsomorphicLayoutEffect"],useEffect:["useAbortableEffect"]},additionalComponents:a=[{name:"Link",as:"a",attributes:[{name:"to",as:"href"},{name:"rel",as:"rel"}]}]}={}){let{allowConstantExport:o=!1}=i;return[{name:"@eslint-sukka/react base",files:[v.constants.GLOB_TS,v.constants.GLOB_TSX,v.constants.GLOB_JSX],plugins:{"jsx-a11y-minimal":v.memo(C.eslint_plugin_jsx_a11y_minimal,"@eslint-sukka/eslint-plugin-react-jsx-a11y#eslint_plugin_jsx_a11y_minimal"),"react-hooks":v.memo(_,"eslint-plugin-react-hooks"),"@stylistic":v.memo(at,"@stylistic/eslint-plugin"),"react-prefer-function-component":v.memo(V,"eslint-plugin-react-prefer-function-component"),"react-compiler":v.memo(O,"eslint-plugin-react-compiler"),...an.configs.recommended.plugins,"ssr-friendly":ar,"react-refresh":P},settings:{"react-x":{version:"detect",additionalHooks:s,additionalComponents:a}},languageOptions:{globals:v.globals.browser},rules:{..._.configs.recommended.rules,"react-compiler/react-compiler":e,"react-hooks/exhaustive-deps":["error",{additionalHooks:t}],"@stylistic/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],...an.configs.recommended.rules,"@eslint-react/no-string-refs":"error","@eslint-react/no-comment-textnodes":"error","@eslint-react/dom/no-unsafe-target-blank":"error","@eslint-react/no-children-prop":"error","@eslint-react/dom/no-dangerously-set-innerhtml-with-children":"error","@eslint-react/dom/no-render-return-value":"error","@eslint-react/no-direct-mutation-state":"error","@eslint-react/dom/no-find-dom-node":"error","@eslint-react/no-unsafe-component-will-mount":"warn","@eslint-react/no-unsafe-component-will-receive-props":"warn","@eslint-react/no-unsafe-component-will-update":"warn","@eslint-react/prefer-destructuring-assignment":"warn","@eslint-react/no-unused-state":"error","@eslint-react/no-access-state-in-setstate":"error","@eslint-react/dom/no-script-url":"error","@eslint-react/no-unused-class-component-members":"error","@eslint-react/naming-convention/component-name":["error",{rule:"PascalCase"}],"@eslint-react/naming-convention/filename":["error",{rule:"kebab-case"}],"@eslint-react/naming-convention/filename-extension":["error",{allow:"as-needed"}],"@eslint-react/naming-convention/use-state":"error","react-prefer-function-component/react-prefer-function-component":"error","@stylistic/jsx-self-closing-comp":"error","@eslint-react/prefer-shorthand-boolean":"error","@stylistic/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"@stylistic/jsx-indent-props":["error",2],"@stylistic/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"@stylistic/jsx-wrap-multilines":["error",{declaration:"parens-new-line",assignment:"parens-new-line",return:"parens-new-line",arrow:"parens-new-line",condition:"ignore",logical:"ignore",prop:"ignore"}],"@stylistic/jsx-first-prop-new-line":["error","multiline-multiprop"],"@stylistic/jsx-function-call-newline":["error","multiline"],"@stylistic/jsx-equals-spacing":["error","never"],"@stylistic/jsx-indent":"off","@stylistic/jsx-child-element-spacing":"error","@stylistic/jsx-closing-bracket-location":["error","line-aligned"],"@stylistic/jsx-tag-spacing":["error",{closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"never"}],"@eslint-react/dom/no-children-in-void-dom-elements":"error","@stylistic/jsx-curly-brace-presence":["error",{props:"never",children:"never"}],"@eslint-react/prefer-shorthand-fragment":"error","@stylistic/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"@eslint-react/no-missing-key":"error","@eslint-react/no-array-index-key":"error","@eslint-react/no-duplicate-key":"error","@eslint-react/no-implicit-key":"error","@eslint-react/jsx-uses-react":"off","@eslint-react/no-useless-fragment":"error","@eslint-react/no-unstable-context-value":"error","@eslint-react/no-nested-components":"error","@eslint-react/dom/no-missing-iframe-sandbox":"warn","@eslint-react/dom/no-unsafe-iframe-sandbox":"warn","@eslint-react/no-leaked-conditional-rendering":"error","@eslint-react/no-unstable-default-props":"error","@eslint-react/dom/no-missing-button-type":"error","@eslint-react/dom/no-namespace":"error","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"],ignoreClassesThatImplementAnInterface:"public-fields"}],"jsx-a11y-minimal/alt-text":["warn",{elements:["img"],img:["Image"]}],"jsx-a11y-minimal/aria-props":"warn","jsx-a11y-minimal/aria-proptypes":"warn","jsx-a11y-minimal/aria-role":"warn","jsx-a11y-minimal/aria-unsupported-elements":"warn","jsx-a11y-minimal/iframe-has-title":"warn","jsx-a11y-minimal/no-access-key":"warn","jsx-a11y-minimal/role-has-required-aria-props":"warn","jsx-a11y-minimal/role-supports-aria-props":"warn","jsx-a11y-minimal/tabindex-no-positive":"warn","react-refresh/only-export-components":["warn",{allowConstantExport:o,allowExportNames:[...n?["config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...r?["meta","links","headers","loader","action"]:[]]}]}},{files:["**/app/**/_*.cjs",String.raw`**/app/**/\[*.?([cm])[j]s?(x)`,"**/pages/_(app|document).?([cm])[jt]s?(x)"],rules:{"@eslint-react/naming-convention/filename":"off"}}]},exports.stylex=ai;